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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
61,200
|
cpu_get_num_math()
|
monkey531[P]llama/common/common.cpp
|
int32_t cpu_get_num_math() {
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
int n_cpu = sysconf(_SC_NPROCESSORS_ONLN);
if (n_cpu < 1) {
return cpu_get_num_physical_cores();
}
if (is_hybrid_cpu()) {
cpu_set_t affinity;
if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) {
int result = cpu_count_math_cpus(n_cpu);
pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity);
if (result > 0) {
return result;
}
}
}
#endif
return cpu_get_num_physical_cores();
}
|
O3
|
cpp
|
cpu_get_num_math():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp # imm = 0x100
movl $0x54, %edi
callq 0x1a4a0
movq %rax, %rbx
testl %ebx, %ebx
jle 0x2274d
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testw %dx, %dx
jns 0x22776
callq 0x1a630
movq %rax, %r14
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %rax, %rdi
callq 0x1ad60
testl %eax, %eax
jne 0x22776
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %r15d # imm = 0x3FF
ja 0x226ef
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %r15d, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movl $0x80, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1ad20
testl %eax, %eax
jne 0x22761
xorl %ecx, %ecx
movl $0x1a, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
andl $0xff000000, %eax # imm = 0xFF000000
xorl %ecx, %ecx
cmpl $0x20000000, %eax # imm = 0x20000000
setne %cl
addl %ecx, %ebp
addl %ecx, %r15d
incl %r15d
cmpl %ebx, %r15d
jl 0x226a7
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x1ad20
testl %ebp, %ebp
jne 0x2277d
jmp 0x22776
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x222cc
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x1ad20
callq 0x222cc
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_Z16cpu_get_num_mathv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 100h
mov edi, 54h ; 'T'
call _sysconf
mov rbx, rax
test ebx, ebx
jle loc_2274D
mov eax, 7
xor ecx, ecx
mov rsi, rbx
cpuid
xchg rsi, rbx
test dx, dx
jns loc_22776
call _pthread_self
mov r14, rax
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, rax
call _pthread_getaffinity_np
test eax, eax
jnz loc_22776
xor r15d, r15d
mov r12, rsp
xor ebp, ebp
loc_226A7:
xorps xmm0, xmm0
movaps [rsp+128h+var_B8], xmm0
movaps [rsp+128h+var_C8], xmm0
movaps [rsp+128h+var_D8], xmm0
movaps [rsp+128h+var_E8], xmm0
movaps [rsp+128h+var_F8], xmm0
movaps [rsp+128h+var_108], xmm0
movaps [rsp+128h+var_118], xmm0
movaps [rsp+128h+var_128], xmm0
cmp r15d, 3FFh
ja short loc_226EF
mov eax, 1
mov ecx, r15d
shl rax, cl
mov ecx, r15d
shr ecx, 6
or qword ptr [rsp+rcx*8+128h+var_128], rax
loc_226EF:
mov esi, 80h
mov rdi, r14
mov rdx, r12
call _pthread_setaffinity_np
test eax, eax
jnz short loc_22761
xor ecx, ecx
mov eax, 1Ah
mov rsi, rbx
cpuid
xchg rsi, rbx
and eax, 0FF000000h
xor ecx, ecx
cmp eax, 20000000h
setnz cl
add ebp, ecx
add r15d, ecx
inc r15d
cmp r15d, ebx
jl loc_226A7
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
test ebp, ebp
jnz short loc_2277D
jmp short loc_22776
loc_2274D:
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
loc_22761:
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
loc_22776:
call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
mov ebp, eax
loc_2277D:
mov eax, ebp
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long cpu_get_num_math(void)
{
long long v0; // rbx
long long v2; // rsi
long long v7; // rbx
long long v8; // rsi
long long v9; // rt0
long long v10; // r14
unsigned int v11; // r15d
unsigned int v12; // ebp
long long v13; // rcx
long long v14; // r8
long long v15; // r9
long long v17; // rsi
long long v22; // rcx
__int128 v24; // [rsp+0h] [rbp-128h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
__int128 v26; // [rsp+20h] [rbp-108h]
__int128 v27; // [rsp+30h] [rbp-F8h]
__int128 v28; // [rsp+40h] [rbp-E8h]
__int128 v29; // [rsp+50h] [rbp-D8h]
__int128 v30; // [rsp+60h] [rbp-C8h]
__int128 v31; // [rsp+70h] [rbp-B8h]
_BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF
v0 = sysconf(84LL);
if ( (int)v0 <= 0 )
return cpu_get_num_physical_cores();
_RAX = 7LL;
v2 = v0;
__asm { cpuid }
v9 = v2;
v8 = _RBX;
v7 = v9;
if ( (_RDX & 0x8000u) != 0LL )
{
v10 = pthread_self(84LL, v8, _RDX, _RCX);
if ( !(unsigned int)pthread_getaffinity_np(v10, 128LL, v32) )
{
v11 = 0;
v12 = 0;
do
{
v31 = 0LL;
v30 = 0LL;
v29 = 0LL;
v28 = 0LL;
v27 = 0LL;
v26 = 0LL;
v25 = 0LL;
v24 = 0LL;
if ( v11 <= 0x3FF )
*((_QWORD *)&v24 + (v11 >> 6)) |= 1LL << v11;
if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(
v10,
128LL,
&v24) )
{
pthread_setaffinity_np(
v10,
128LL,
v32,
v13,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
return (unsigned int)cpu_get_num_physical_cores();
}
_RAX = 26LL;
v17 = v7;
__asm { cpuid }
v7 = v17;
v22 = (_RAX & 0xFF000000) != 0x20000000;
v12 += v22;
v11 += v22 + 1;
}
while ( (int)v11 < (int)v17 );
pthread_setaffinity_np(
v10,
128LL,
v32,
v22,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
if ( v12 )
return v12;
}
}
return (unsigned int)cpu_get_num_physical_cores();
}
|
cpu_get_num_math:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x100
MOV EDI,0x54
CALL 0x0011a4a0
MOV RBX,RAX
TEST EBX,EBX
JLE 0x0012274d
MOV EAX,0x7
XOR ECX,ECX
MOV RSI,RBX
CPUID
XCHG RBX,RSI
TEST DX,DX
JNS 0x00122776
CALL 0x0011a630
MOV R14,RAX
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,RAX
CALL 0x0011ad60
TEST EAX,EAX
JNZ 0x00122776
XOR R15D,R15D
MOV R12,RSP
XOR EBP,EBP
LAB_001226a7:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP R15D,0x3ff
JA 0x001226ef
MOV EAX,0x1
MOV ECX,R15D
SHL RAX,CL
MOV ECX,R15D
SHR ECX,0x6
OR qword ptr [RSP + RCX*0x8],RAX
LAB_001226ef:
MOV ESI,0x80
MOV RDI,R14
MOV RDX,R12
CALL 0x0011ad20
TEST EAX,EAX
JNZ 0x00122761
XOR ECX,ECX
MOV EAX,0x1a
MOV RSI,RBX
CPUID
XCHG RBX,RSI
AND EAX,0xff000000
XOR ECX,ECX
CMP EAX,0x20000000
SETNZ CL
ADD EBP,ECX
ADD R15D,ECX
INC R15D
CMP R15D,EBX
JL 0x001226a7
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x0011ad20
TEST EBP,EBP
JNZ 0x0012277d
JMP 0x00122776
LAB_0012274d:
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001222cc
LAB_00122761:
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x0011ad20
LAB_00122776:
CALL 0x001222cc
MOV EBP,EAX
LAB_0012277d:
MOV EAX,EBP
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0012270d) */
/* WARNING: Removing unreachable block (ram,0x0012266c) */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_math() */
ulong cpu_get_num_math(void)
{
long lVar1;
uint *puVar2;
uint uVar3;
int iVar4;
long lVar5;
pthread_t __th;
ulong uVar6;
uint uVar7;
uint uVar8;
cpu_set_t local_128;
cpu_set_t local_a8;
lVar5 = sysconf(0x54);
if ((int)lVar5 < 1) {
uVar6 = cpu_get_num_physical_cores();
return uVar6;
}
lVar1 = cpuid_Extended_Feature_Enumeration_info(7);
if ((short)*(int4 *)(lVar1 + 8) < 0) {
__th = pthread_self();
iVar4 = pthread_getaffinity_np(__th,0x80,&local_a8);
if (iVar4 == 0) {
uVar8 = 0;
uVar7 = 0;
do {
local_128.__bits[0xe] = 0;
local_128.__bits[0xf] = 0;
local_128.__bits[0xc] = 0;
local_128.__bits[0xd] = 0;
local_128.__bits[10] = 0;
local_128.__bits[0xb] = 0;
local_128.__bits[8] = 0;
local_128.__bits[9] = 0;
local_128.__bits[6] = 0;
local_128.__bits[7] = 0;
local_128.__bits[4] = 0;
local_128.__bits[5] = 0;
local_128.__bits[2] = 0;
local_128.__bits[3] = 0;
local_128.__bits[0] = 0;
local_128.__bits[1] = 0;
if (uVar8 < 0x400) {
local_128.__bits[uVar8 >> 6] = local_128.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f);
}
iVar4 = pthread_setaffinity_np(__th,0x80,&local_128);
if (iVar4 != 0) {
pthread_setaffinity_np(__th,0x80,&local_a8);
goto LAB_00122776;
}
puVar2 = (uint *)cpuid(0x1a);
uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000);
uVar7 = uVar7 + uVar3;
uVar8 = uVar8 + uVar3 + 1;
} while ((int)uVar8 < (int)lVar5);
pthread_setaffinity_np(__th,0x80,&local_a8);
if (uVar7 != 0) goto LAB_0012277d;
}
}
LAB_00122776:
uVar7 = cpu_get_num_physical_cores();
LAB_0012277d:
return (ulong)uVar7;
}
|
|
61,201
|
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/minja.hpp
|
static std::string strip(const std::string & s) {
auto start = s.find_first_not_of(" \t\n\r");
if (start == std::string::npos) return "";
auto end = s.find_last_not_of(" \t\n\r");
return s.substr(start, end - start + 1);
}
|
O1
|
cpp
|
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7ab6f(%rip), %rsi # 0xf162a
movl $0x4, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x1ae70
cmpq $-0x1, %rax
je 0x76b05
movq %rax, %r15
leaq 0x7ab50(%rip), %rsi # 0xf162a
movl $0x4, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x1adc0
subq %r15, %rax
leaq 0x1(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1a8e0
jmp 0x76b1e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x7063e(%rip), %rdx # 0xe7151
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x21530
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
|
_ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
lea rsi, asc_F162A; " \t\n\r"
mov ecx, 4
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_76B05
mov r15, rax
lea rsi, asc_F162A; " \t\n\r"
mov ecx, 4
mov rdi, r14
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcmm; std::string::find_last_not_of(char const*,ulong,ulong)
sub rax, r15
lea rcx, [rax+1]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short loc_76B1E
loc_76B05:
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aExampleSpecifi+1Fh; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_76B1E:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
|
_QWORD * minja::strip(_QWORD *a1, long long a2)
{
long long first_not_of; // rax
long long v3; // r15
long long last_not_of; // rax
first_not_of = std::string::find_first_not_of(a2, " \t\n\r", 0LL, 4LL);
if ( first_not_of == -1 )
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "", (long long)"");
}
else
{
v3 = first_not_of;
last_not_of = std::string::find_last_not_of(a2, " \t\n\r", -1LL, 4LL);
std::string::substr(a1, a2, v3, last_not_of - v3 + 1);
}
return a1;
}
|
strip:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x1f162a]
MOV ECX,0x4
MOV RDI,R14
XOR EDX,EDX
CALL 0x0011ae70
CMP RAX,-0x1
JZ 0x00176b05
MOV R15,RAX
LEA RSI,[0x1f162a]
MOV ECX,0x4
MOV RDI,R14
MOV RDX,-0x1
CALL 0x0011adc0
SUB RAX,R15
LEA RCX,[RAX + 0x1]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011a8e0
JMP 0x00176b1e
LAB_00176b05:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[0x1e7151]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00121530
LAB_00176b1e:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* minja::strip(std::__cxx11::string const&) */
minja * __thiscall minja::strip(minja *this,string *param_1)
{
long lVar1;
lVar1 = std::__cxx11::string::find_first_not_of((char *)param_1,0x1f162a,0);
if (lVar1 == -1) {
*(minja **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>(this,"");
}
else {
std::__cxx11::string::find_last_not_of((char *)param_1,0x1f162a,0xffffffffffffffff);
std::__cxx11::string::substr((ulong)this,(ulong)param_1);
}
return this;
}
|
|
61,202
|
ma_multi_malloc
|
eloqsql/libmariadb/libmariadb/ma_alloc.c
|
void *ma_multi_malloc(myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
size_t tot_length,length;
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args, size_t);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *)malloc(tot_length)))
return 0;
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,size_t);
res+=ALIGN_SIZE(length);
}
va_end(args);
return start;
}
|
O0
|
c
|
ma_multi_malloc:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0x2b511
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rsi, -0x108(%rbp)
movl %edi, -0xc(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x2b59e
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x2b5bb
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x2b656
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x2b60e
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x2b62b
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x2b563
leaq -0x30(%rbp), %rax
movq -0x50(%rbp), %rdi
callq 0x135d0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x2b67a
movq $0x0, -0x8(%rbp)
jmp 0x2b7b0
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x2b6e1
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x2b6fe
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x2b7a4
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x2b75c
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x2b779
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x2b6a6
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopl (%rax)
|
ma_multi_malloc:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_2B511
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_2B511:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_108], rsi
mov [rbp+var_C], edi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov [rbp+var_50], 0
loc_2B563:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_2B59E
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_2B5BB
loc_2B59E:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_2B5BB:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_2B656
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_2B60E
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_2B62B
loc_2B60E:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_2B62B:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_2B563
loc_2B656:
lea rax, [rbp+var_30]
mov rdi, [rbp+var_50]
call _malloc
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_2B67A
mov [rbp+var_8], 0
jmp loc_2B7B0
loc_2B67A:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_2B6A6:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_2B6E1
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_2B6FE
loc_2B6E1:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_2B6FE:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_2B7A4
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_2B75C
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_2B779
loc_2B75C:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_2B779:
mov rax, [rbp+var_170]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_2B6A6
loc_2B7A4:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_2B7B0:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
|
long long ma_multi_malloc(int a1, ...)
{
_QWORD *overflow_arg_area; // rax
_QWORD *v2; // rax
_QWORD *v3; // rax
_QWORD *v4; // rax
long long i; // [rsp+120h] [rbp-50h]
long long j; // [rsp+128h] [rbp-48h]
long long v8; // [rsp+130h] [rbp-40h]
va_list va; // [rsp+140h] [rbp-30h] BYREF
int v10; // [rsp+164h] [rbp-Ch]
va_start(va, a1);
v10 = a1;
for ( i = 0LL; ; i += (*v2 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*overflow_arg_area )
break;
if ( va[0].gp_offset > 0x28 )
{
v2 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v2 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
v8 = malloc(i);
if ( !v8 )
return 0LL;
va_end(va);
va_start(va, a1);
for ( j = v8; ; j += (*v4 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
v3 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v3 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*v3 )
break;
*(_QWORD *)*v3 = j;
if ( va[0].gp_offset > 0x28 )
{
v4 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
return v8;
}
|
ma_multi_malloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x0012b511
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_0012b511:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV qword ptr [RBP + -0x108],RSI
MOV dword ptr [RBP + -0xc],EDI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV qword ptr [RBP + -0x50],0x0
LAB_0012b563:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x0012b59e
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0012b5bb
LAB_0012b59e:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_0012b5bb:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0012b656
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x0012b60e
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0012b62b
LAB_0012b60e:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_0012b62b:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0012b563
LAB_0012b656:
LEA RAX,[RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001135d0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0012b67a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012b7b0
LAB_0012b67a:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_0012b6a6:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x0012b6e1
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x0012b6fe
LAB_0012b6e1:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_0012b6fe:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0012b7a4
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x0012b75c
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0012b779
LAB_0012b75c:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_0012b779:
MOV RAX,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012b6a6
LAB_0012b7a4:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012b7b0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void * ma_multi_malloc(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12
,int8 param_13,int8 param_14)
{
char in_AL;
long *local_178;
long *local_160;
long *local_148;
long *local_130;
long local_118 [4];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
long local_60;
size_t local_58;
void *local_50;
long local_40;
uint local_38;
int4 local_34;
long *local_30;
long *local_28;
int4 local_14;
void *local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (long *)&stack0x00000008;
local_34 = 0x30;
local_38 = 8;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 1;
}
local_40 = *local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 1;
}
local_60 = *local_148;
local_58 = (local_60 + 7U & 0xfffffffffffffff8) + local_58;
}
local_118[1] = param_10;
local_118[2] = param_11;
local_118[3] = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_14 = param_9;
local_10 = malloc(local_58);
if (local_10 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
local_30 = (long *)&stack0x00000008;
local_38 = 8;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 1;
}
if ((int8 *)*local_160 == (int8 *)0x0) break;
*(int8 *)*local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 1;
}
local_50 = (void *)((*local_178 + 7U & 0xfffffffffffffff8) + (long)local_50);
}
}
return local_10;
}
|
|
61,203
|
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
const std::string counts =
FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
ColoredPrintf(GTestColor::kGreen, "[----------] ");
printf("%s from %s", counts.c_str(), test_case.name());
if (test_case.type_param() == nullptr) {
printf("\n");
} else {
printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param());
}
fflush(stdout);
}
|
O0
|
cpp
|
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0xc8c10
movl %eax, %esi
leaq 0x4b1a9(%rip), %rdx # 0x11c7da
leaq 0x4b59b(%rip), %rcx # 0x11cbd3
leaq 0x38(%rsp), %rdi
callq 0xd1740
leaq 0x4c196(%rip), %rsi # 0x11d7df
xorl %eax, %eax
movl $0x2, %edi
callq 0xd0b10
jmp 0xd1657
leaq 0x38(%rsp), %rdi
callq 0x1f1e0
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rdi
callq 0xf1790
movq %rax, 0x20(%rsp)
jmp 0xd1677
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rsi
leaq 0x4c186(%rip), %rdi # 0x11d80e
xorl %eax, %eax
callq 0x16060
jmp 0xd1691
movq 0x58(%rsp), %rdi
callq 0xf17b0
movq %rax, 0x10(%rsp)
jmp 0xd16a2
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
jne 0xd16d9
leaq 0x4c1df(%rip), %rdi # 0x11d893
xorl %eax, %eax
callq 0x16060
jmp 0xd16bd
jmp 0xd1708
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1dfd0
jmp 0xd1728
movq 0x58(%rsp), %rdi
callq 0xf17b0
movq %rax, 0x8(%rsp)
jmp 0xd16ea
movq 0x8(%rsp), %rdx
leaq 0x4c123(%rip), %rdi # 0x11d819
leaq 0x49da5(%rip), %rsi # 0x11b4a2
xorl %eax, %eax
callq 0x16060
jmp 0xd1706
jmp 0xd1708
movq 0xb37f1(%rip), %rax # 0x184f00
movq (%rax), %rdi
callq 0x16850
jmp 0xd1719
leaq 0x38(%rsp), %rdi
callq 0x1dfd0
addq $0x68, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x16cf0
nopw %cs:(%rax,%rax)
|
_ZN7testing8internal27PrettyUnitTestResultPrinter15OnTestCaseStartERKNS_9TestSuiteE:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov rdi, [rsp+68h+var_10]; this
call _ZNK7testing9TestSuite17test_to_run_countEv; testing::TestSuite::test_to_run_count(void)
mov esi, eax
lea rdx, aDeathtestPasse+36h; "test"
lea rcx, aAlsoRunDisable+12h; "tests"
lea rdi, [rsp+68h+var_30]
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
lea rsi, asc_11D7DF; "[----------] "
xor eax, eax
mov edi, 2
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_D1657:
lea rdi, [rsp+68h+var_30]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_10]; this
call _ZNK7testing9TestSuite4nameEv; testing::TestSuite::name(void)
mov [rsp+68h+var_48], rax
jmp short $+2
loc_D1677:
mov rdx, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_50]
lea rdi, aSFromS; "%s from %s"
xor eax, eax
call _printf
jmp short $+2
loc_D1691:
mov rdi, [rsp+68h+var_10]; this
call _ZNK7testing9TestSuite10type_paramEv; testing::TestSuite::type_param(void)
mov [rsp+68h+var_58], rax
jmp short $+2
loc_D16A2:
mov rax, [rsp+68h+var_58]
cmp rax, 0
jnz short loc_D16D9
lea rdi, aSFromSSMsTotal+19h; "\n"
xor eax, eax
call _printf
jmp short $+2
loc_D16BD:
jmp short loc_D1708
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_D1728
loc_D16D9:
mov rdi, [rsp+68h+var_10]; this
call _ZNK7testing9TestSuite10type_paramEv; testing::TestSuite::type_param(void)
mov [rsp+68h+var_60], rax
jmp short $+2
loc_D16EA:
mov rdx, [rsp+68h+var_60]
lea rdi, aWhereSS; ", where %s = %s\n"
lea rsi, _ZN7testing8internalL15kTypeParamLabelE; "TypeParam"
xor eax, eax
call _printf
jmp short $+2
loc_D1706:
jmp short $+2
loc_D1708:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_D1719:
lea rdi, [rsp+68h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 68h
retn
loc_D1728:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
void testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(
testing::internal::PrettyUnitTestResultPrinter *this,
const testing::TestSuite *a2)
{
int v2; // eax
int v3; // r8d
int v4; // r9d
const char *v5; // [rsp+8h] [rbp-60h]
const char *v6; // [rsp+18h] [rbp-50h]
const char *v7; // [rsp+20h] [rbp-48h]
_BYTE v8[32]; // [rsp+38h] [rbp-30h] BYREF
testing::TestSuite *v9; // [rsp+58h] [rbp-10h]
testing::internal::PrettyUnitTestResultPrinter *v10; // [rsp+60h] [rbp-8h]
v10 = this;
v9 = a2;
v2 = testing::TestSuite::test_to_run_count(a2);
testing::FormatCountableNoun[abi:cxx11]((unsigned int)v8, v2, (unsigned int)"test", (unsigned int)"tests", v3, v4);
testing::internal::ColoredPrintf(2u, (long long)"[----------] ");
v6 = (const char *)std::string::c_str((long long)v8);
v7 = (const char *)testing::TestSuite::name(v9);
printf("%s from %s", v6, v7);
if ( testing::TestSuite::type_param(v9) )
{
v5 = (const char *)testing::TestSuite::type_param(v9);
printf(", where %s = %s\n", "TypeParam", v5);
}
else
{
printf("\n");
}
fflush(stdout);
std::string::~string(v8);
}
|
OnTestCaseStart:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001c8c10
MOV ESI,EAX
LEA RDX,[0x21c7da]
LEA RCX,[0x21cbd3]
LEA RDI,[RSP + 0x38]
CALL 0x001d1740
LAB_001d1642:
LEA RSI,[0x21d7df]
XOR EAX,EAX
MOV EDI,0x2
CALL 0x001d0b10
JMP 0x001d1657
LAB_001d1657:
LEA RDI,[RSP + 0x38]
CALL 0x0011f1e0
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001f1790
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001d1677
LAB_001d1677:
MOV RDX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[0x21d80e]
XOR EAX,EAX
CALL 0x00116060
JMP 0x001d1691
LAB_001d1691:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001f17b0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001d16a2
LAB_001d16a2:
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,0x0
JNZ 0x001d16d9
LEA RDI,[0x21d893]
XOR EAX,EAX
CALL 0x00116060
JMP 0x001d16bd
LAB_001d16bd:
JMP 0x001d1708
LAB_001d16d9:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001f17b0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001d16ea
LAB_001d16ea:
MOV RDX,qword ptr [RSP + 0x8]
LEA RDI,[0x21d819]
LEA RSI,[0x21b4a2]
XOR EAX,EAX
CALL 0x00116060
JMP 0x001d1706
LAB_001d1706:
JMP 0x001d1708
LAB_001d1708:
MOV RAX,qword ptr [0x00284f00]
MOV RDI,qword ptr [RAX]
CALL 0x00116850
LAB_001d1717:
JMP 0x001d1719
LAB_001d1719:
LEA RDI,[RSP + 0x38]
CALL 0x0011dfd0
ADD RSP,0x68
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&) */
void __thiscall
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart
(PrettyUnitTestResultPrinter *this,TestSuite *param_1)
{
int iVar1;
int8 uVar2;
int8 uVar3;
long lVar4;
testing local_30 [32];
TestSuite *local_10;
PrettyUnitTestResultPrinter *local_8;
local_10 = param_1;
local_8 = this;
iVar1 = TestSuite::test_to_run_count(param_1);
FormatCountableNoun_abi_cxx11_(local_30,iVar1,"test","tests");
/* try { // try from 001d1642 to 001d1716 has its CatchHandler @ 001d16bf */
ColoredPrintf(2,"[----------] ");
uVar2 = std::__cxx11::string::c_str((string *)local_30);
uVar3 = TestSuite::name(local_10);
printf("%s from %s",uVar2,uVar3);
lVar4 = TestSuite::type_param(local_10);
if (lVar4 == 0) {
printf("\n");
}
else {
uVar2 = TestSuite::type_param(local_10);
printf(", where %s = %s\n","TypeParam",uVar2);
}
fflush(*(FILE **)PTR_stdout_00284f00);
std::__cxx11::string::~string((string *)local_30);
return;
}
|
|
61,204
|
ImPlot::Tag(int, double, ImVec4 const&, bool)
|
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
|
void Tag(ImAxis axis, double v, const ImVec4& color, bool round) {
ImPlotContext& gp = *GImPlot;
SetupLock();
char buff[IMPLOT_LABEL_MAX_SIZE];
ImPlotAxis& ax = gp.CurrentPlot->Axes[axis];
LabelAxisValue(ax, v, buff, sizeof(buff), round);
Tag(axis,v,color,"%s",buff);
}
|
O1
|
cpp
|
ImPlot::Tag(int, double, ImVec4 const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movsd %xmm0, 0x8(%rsp)
movl %edi, %r14d
movq 0x275d6f(%rip), %r15 # 0x336ca0
movq 0x50(%r15), %rax
cmpb $0x0, 0x9de(%rax)
jne 0xc0f43
callq 0xb930f
movq 0x50(%r15), %rax
movb $0x1, 0x9de(%rax)
movslq %r14d, %r14
imulq $0x178, %r14, %rcx # imm = 0x178
leaq (%rax,%rcx), %rdi
addq $0x18, %rdi
movzbl %bpl, %ecx
leaq 0x10(%rsp), %r15
movsd 0x8(%rsp), %xmm0
movq %r15, %rsi
movl $0x20, %edx
callq 0xb4b03
leaq 0x1e4994(%rip), %rdx # 0x2a5917
movl %r14d, %edi
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
movq %r15, %rcx
movb $0x1, %al
callq 0xc0e97
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ZN6ImPlot3TagEidRK6ImVec4b:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov ebp, edx
mov rbx, rsi
movsd [rsp+58h+var_50], xmm0
mov r14d, edi
mov r15, cs:GImPlot
mov rax, [r15+50h]
cmp byte ptr [rax+9DEh], 0
jnz short loc_C0F43
call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void)
loc_C0F43:
mov rax, [r15+50h]
mov byte ptr [rax+9DEh], 1
movsxd r14, r14d
imul rcx, r14, 178h
lea rdi, [rax+rcx]
add rdi, 18h; this
movzx ecx, bpl; int
lea r15, [rsp+58h+var_48]
movsd xmm0, [rsp+58h+var_50]; double
mov rsi, r15; ImPlotAxis *
mov edx, offset qword_20; char *
call _ZN6ImPlot14LabelAxisValueERK10ImPlotAxisdPcib; ImPlot::LabelAxisValue(ImPlotAxis const&,double,char *,int,bool)
lea rdx, a61f61f61f61fSi+2Fh; "%s"
mov edi, r14d
movsd xmm0, [rsp+58h+var_50]
mov rsi, rbx
mov rcx, r15
mov al, 1
call _ZN6ImPlot3TagEidRK6ImVec4PKcz; ImPlot::Tag(int,double,ImVec4 const&,char const*,...)
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ImPlot::Tag(
ImPlot *a1,
const char *a2,
char a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
ImGui *v12; // r15
long long v13; // rax
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-58h]
_BYTE v20[72]; // [rsp+10h] [rbp-48h] BYREF
v12 = GImPlot;
if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) )
ImPlot::SetupFinish(a1, a2);
v13 = *((_QWORD *)v12 + 10);
*(_BYTE *)(v13 + 2526) = 1;
ImPlot::LabelAxisValue((ImPlot *)(v13 + 376LL * (int)a1 + 24), (const ImPlotAxis *)v20, a4, (char *)&qword_20, a3);
return ImPlot::Tag(
(ImPlot *)(unsigned int)a1,
(long long)a2,
"%s",
(long long)v20,
v14,
v15,
a4,
a5,
a6,
a7,
v16,
v17,
a10,
a11,
v19);
}
|
Tag:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EBP,EDX
MOV RBX,RSI
MOVSD qword ptr [RSP + 0x8],XMM0
MOV R14D,EDI
MOV R15,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R15 + 0x50]
CMP byte ptr [RAX + 0x9de],0x0
JNZ 0x001c0f43
CALL 0x001b930f
LAB_001c0f43:
MOV RAX,qword ptr [R15 + 0x50]
MOV byte ptr [RAX + 0x9de],0x1
MOVSXD R14,R14D
IMUL RCX,R14,0x178
LEA RDI,[RAX + RCX*0x1]
ADD RDI,0x18
MOVZX ECX,BPL
LEA R15,[RSP + 0x10]
MOVSD XMM0,qword ptr [RSP + 0x8]
MOV RSI,R15
MOV EDX,0x20
CALL 0x001b4b03
LEA RDX,[0x3a5917]
MOV EDI,R14D
MOVSD XMM0,qword ptr [RSP + 0x8]
MOV RSI,RBX
MOV RCX,R15
MOV AL,0x1
CALL 0x001c0e97
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* ImPlot::Tag(int, double, ImVec4 const&, bool) */
void ImPlot::Tag(int param_1,double param_2,ImVec4 *param_3,bool param_4)
{
long lVar1;
char local_48 [40];
lVar1 = GImPlot;
if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') {
SetupFinish();
}
lVar1 = *(long *)(lVar1 + 0x50);
*(int1 *)(lVar1 + 0x9de) = 1;
LabelAxisValue((ImPlotAxis *)(lVar1 + (long)param_1 * 0x178 + 0x18),param_2,local_48,0x20,param_4)
;
Tag(param_1,param_2,param_3,"%s",local_48);
return;
}
|
|
61,205
|
el::base::utils::File::newFileStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
opengl-water/src/easylogging++.cc
|
base::type::fstream_t* File::newFileStream(const std::string& filename) {
base::type::fstream_t *fs = new base::type::fstream_t(filename.c_str(),
base::type::fstream_t::out
#if !defined(ELPP_FRESH_LOG_FILE)
| base::type::fstream_t::app
#endif
);
#if defined(ELPP_UNICODE)
std::locale elppUnicodeLocale("");
# if ELPP_OS_WINDOWS
std::locale elppUnicodeLocaleWindows(elppUnicodeLocale, new std::codecvt_utf8_utf16<wchar_t>);
elppUnicodeLocale = elppUnicodeLocaleWindows;
# endif // ELPP_OS_WINDOWS
fs->imbue(elppUnicodeLocale);
#endif // defined(ELPP_UNICODE)
if (fs->is_open()) {
fs->flush();
} else {
base::utils::safeDelete(fs);
ELPP_INTERNAL_ERROR("Bad file [" << filename << "]", true);
}
return fs;
}
|
O3
|
cpp
|
el::base::utils::File::newFileStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x210, %edi # imm = 0x210
callq 0x23170
movq %rax, %rbx
movq (%r14), %rsi
movq %rax, %rdi
movl $0x11, %edx
callq 0x23260
leaq 0x80(%rbx), %rdi
callq 0x237b0
testb %al, %al
je 0x2aaad
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x233b0
jmp 0x2aab8
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0x210, %esi # imm = 0x210
movq %rbx, %rdi
callq 0x23140
movq %r14, %rdi
callq 0x234d0
|
_ZN2el4base5utils4File13newFileStreamERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdi
mov edi, 210h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rsi, [r14]
mov rdi, rax
mov edx, 11h
call __ZNSt13basic_fstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::fstream::basic_fstream(char const*,std::_Ios_Openmode)
lea rdi, [rbx+80h]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_2AAAD
mov rdi, rbx
add rdi, 10h; this
call __ZNSo5flushEv; std::ostream::flush(void)
jmp short loc_2AAB8
loc_2AAAD:
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
xor ebx, ebx
loc_2AAB8:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
mov r14, rax
mov esi, 210h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
|
long long el::base::utils::File::newFileStream(_QWORD *a1)
{
long long v1; // rbx
v1 = operator new(0x210uLL);
std::fstream::basic_fstream(v1, *a1, 17LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v1 + 128) )
{
std::ostream::flush((std::ostream *)(v1 + 16));
}
else
{
(*(void ( **)(long long))(*(_QWORD *)v1 + 8LL))(v1);
return 0LL;
}
return v1;
}
|
newFileStream:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDI
MOV EDI,0x210
CALL 0x00123170
MOV RBX,RAX
MOV RSI,qword ptr [R14]
LAB_0012aa82:
MOV RDI,RAX
MOV EDX,0x11
CALL 0x00123260
LAB_0012aa8f:
LEA RDI,[RBX + 0x80]
CALL 0x001237b0
TEST AL,AL
JZ 0x0012aaad
MOV RDI,RBX
ADD RDI,0x10
CALL 0x001233b0
JMP 0x0012aab8
LAB_0012aaad:
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x8]
XOR EBX,EBX
LAB_0012aab8:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
/* el::base::utils::File::newFileStream(std::__cxx11::string const&) */
fstream * el::base::utils::File::newFileStream(string *param_1)
{
char cVar1;
fstream *pfVar2;
pfVar2 = (fstream *)operator_new(0x210);
/* try { // try from 0012aa82 to 0012aa8e has its CatchHandler @ 0012aac0 */
std::fstream::fstream(pfVar2,*(int8 *)param_1,0x11);
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 == '\0') {
(**(code **)(*(long *)pfVar2 + 8))(pfVar2);
pfVar2 = (fstream *)0x0;
}
else {
std::ostream::flush();
}
return pfVar2;
}
|
|
61,206
|
cleanup_dirname
|
eloqsql/mysys/mf_pack.c
|
size_t cleanup_dirname(register char *to, const char *from)
{
reg5 size_t length;
reg2 char * pos;
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("cleanup_dirname");
DBUG_PRINT("enter",("from: '%s'",from));
start=buff;
from_ptr=(char *) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skip device part */
length=(size_t) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
#endif
parent[0]=FN_LIBCHAR;
length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
{
for (l-- ; l ; *++pos= *from_ptr++, l--);
start= pos + 1; /* Don't look inside multi-byte char */
continue;
}
#endif
if (*pos == '/')
*pos = FN_LIBCHAR;
if (*pos == FN_LIBCHAR)
{
if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0)
{ /* If .../../; skip prev */
pos-=length;
if (pos != start)
{ /* not /../ */
pos--;
if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (!home_dir)
{
pos+=length+1; /* Don't unpack ~/.. */
continue;
}
pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
{
pos+=length+1; /* Don't unpack ./.. */
continue;
}
pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
(pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
continue;
}
}
}
else if ((size_t) (pos-start) == length-1 &&
!memcmp(start,parent+1,length-1))
start=pos; /* Starts with "../" */
else if (pos-start > 0 && pos[-1] == FN_LIBCHAR)
{
#ifdef FN_NETWORK_DRIVES
if (pos-start != 1)
#endif
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skip /./ */
}
}
(void) strmov(to,buff);
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_RETURN((size_t) (pos-buff));
}
|
O0
|
c
|
cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0x2bf18
leaq -0x210(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x238(%rbp)
movb $0x2f, -0xd(%rbp)
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
leaq 0x4cf6b(%rip), %rsi # 0x78eb2
callq 0x24270
leaq -0xd(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x238(%rbp)
movb (%rax), %al
movq -0x230(%rbp), %rcx
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x2c361
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2bfad
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2c348
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq -0x228(%rbp), %rax
jbe 0x2c264
movq -0x230(%rbp), %rdi
xorl %eax, %eax
subq -0x228(%rbp), %rax
addq %rax, %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x24120
cmpl $0x0, %eax
jne 0x2c264
movq -0x228(%rbp), %rdx
movq -0x230(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x2c25f
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x2c0ef
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x2c080
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2c0ef
leaq 0x357721(%rip), %rax # 0x3837a8
cmpq $0x0, (%rax)
jne 0x2c0ab
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x2c34a
leaq -0x210(%rbp), %rdi
leaq 0x3576ef(%rip), %rax # 0x3837a8
movq (%rax), %rsi
callq 0x24270
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2c0ed
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2c0ef
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x2c19b
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x2c122
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2c19b
leaq 0x357697(%rip), %rdi # 0x3837c0
movl $0x200, %esi # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0x2cfb0
cmpl $0x0, %eax
je 0x2c15a
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x2c34a
leaq -0x210(%rbp), %rdi
leaq 0x357658(%rip), %rsi # 0x3837c0
callq 0x24270
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2c199
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2c19b
movq -0x230(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x230(%rbp), %rcx
xorl %eax, %eax
cmpq -0x240(%rbp), %rcx
movb %al, -0x249(%rbp)
jb 0x2c1d7
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x249(%rbp)
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x2c1e3
jmp 0x2c1f7
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2c1a9
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7e, %eax
je 0x2c233
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
jb 0x2c25d
movq -0x230(%rbp), %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x24120
cmpl $0x0, %eax
jne 0x2c25d
movq -0x248(%rbp), %rdi
addq $0x1, %rdi
leaq -0xd(%rbp), %rsi
callq 0x24270
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x2c34a
jmp 0x2c25f
jmp 0x2c346
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
movq -0x228(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x2c2bc
movq -0x240(%rbp), %rdi
leaq -0xd(%rbp), %rsi
addq $0x1, %rsi
movq -0x228(%rbp), %rdx
subq $0x1, %rdx
callq 0x24120
cmpl $0x0, %eax
jne 0x2c2bc
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
jmp 0x2c344
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
jle 0x2c2f7
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2c2f7
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2c342
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x2c340
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0x2c340
movq -0x230(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0x2f, %eax
jne 0x2c340
movq -0x230(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x230(%rbp)
jmp 0x2c342
jmp 0x2c344
jmp 0x2c346
jmp 0x2c348
jmp 0x2c34a
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x2bf68
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x24270
jmp 0x2c376
jmp 0x2c378
movq -0x230(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2c3b2
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x242a0
nopw (%rax,%rax)
|
cleanup_dirname:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
jmp short $+2
loc_2BF18:
lea rax, [rbp+var_210]
mov [rbp+var_240], rax
mov rax, [rbp+var_220]
mov [rbp+var_238], rax
mov [rbp+var_D], 2Fh ; '/'
lea rdi, [rbp+var_D]
add rdi, 1
lea rsi, asc_78EB2; ".."
call _stpcpy
lea rcx, [rbp+var_D]
sub rax, rcx
mov [rbp+var_228], rax
mov rax, [rbp+var_240]
mov [rbp+var_230], rax
loc_2BF68:
mov rax, [rbp+var_238]
mov rcx, rax
add rcx, 1
mov [rbp+var_238], rcx
mov al, [rax]
mov rcx, [rbp+var_230]
mov [rcx], al
movsx eax, al
cmp eax, 0
jz loc_2C361
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2BFAD
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
loc_2BFAD:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz loc_2C348
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, [rbp+var_228]
jbe loc_2C264
mov rdi, [rbp+var_230]
xor eax, eax
sub rax, [rbp+var_228]
add rdi, rax
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz loc_2C264
mov rdx, [rbp+var_228]
mov rax, [rbp+var_230]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz loc_2C25F
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz loc_2C0EF
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_2C080
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_2C0EF
loc_2C080:
lea rax, home_dir
cmp qword ptr [rax], 0
jnz short loc_2C0AB
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_2C34A
loc_2C0AB:
lea rdi, [rbp+var_210]
lea rax, home_dir
mov rsi, [rax]
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2C0ED
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_2C0ED:
jmp short $+2
loc_2C0EF:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_2C19B
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_2C122
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_2C19B
loc_2C122:
lea rdi, curr_dir
mov esi, 200h
xor eax, eax
mov edx, eax
call my_getwd
cmp eax, 0
jz short loc_2C15A
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_2C34A
loc_2C15A:
lea rdi, [rbp+var_210]
lea rsi, curr_dir
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2C199
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_2C199:
jmp short $+2
loc_2C19B:
mov rax, [rbp+var_230]
mov [rbp+var_248], rax
loc_2C1A9:
mov rcx, [rbp+var_230]
xor eax, eax
cmp rcx, [rbp+var_240]
mov [rbp+var_249], al
jb short loc_2C1D7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_249], al
loc_2C1D7:
mov al, [rbp+var_249]
test al, 1
jnz short loc_2C1E3
jmp short loc_2C1F7
loc_2C1E3:
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_2C1A9
loc_2C1F7:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jz short loc_2C233
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jb short loc_2C25D
mov rdi, [rbp+var_230]
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz short loc_2C25D
loc_2C233:
mov rdi, [rbp+var_248]
add rdi, 1
lea rsi, [rbp+var_D]
call _stpcpy
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
jmp loc_2C34A
loc_2C25D:
jmp short $+2
loc_2C25F:
jmp loc_2C346
loc_2C264:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
mov rcx, [rbp+var_228]
sub rcx, 1
cmp rax, rcx
jnz short loc_2C2BC
mov rdi, [rbp+var_240]
lea rsi, [rbp+var_D]
add rsi, 1
mov rdx, [rbp+var_228]
sub rdx, 1
call _memcmp
cmp eax, 0
jnz short loc_2C2BC
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
jmp loc_2C344
loc_2C2BC:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 0
jle short loc_2C2F7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_2C2F7
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_2C342
loc_2C2F7:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 1
jle short loc_2C340
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Eh ; '.'
jnz short loc_2C340
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-2]
cmp eax, 2Fh ; '/'
jnz short loc_2C340
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_230], rax
loc_2C340:
jmp short $+2
loc_2C342:
jmp short $+2
loc_2C344:
jmp short $+2
loc_2C346:
jmp short $+2
loc_2C348:
jmp short $+2
loc_2C34A:
mov rax, [rbp+var_230]
add rax, 1
mov [rbp+var_230], rax
jmp loc_2BF68
loc_2C361:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call _stpcpy
jmp short $+2
loc_2C376:
jmp short $+2
loc_2C378:
mov rax, [rbp+var_230]
lea rcx, [rbp+var_210]
sub rax, rcx
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2C3B2
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_2C3B2:
call ___stack_chk_fail
|
long long cleanup_dirname(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
bool v4; // [rsp+17h] [rbp-249h]
_BYTE *v5; // [rsp+18h] [rbp-248h]
_BYTE *v6; // [rsp+20h] [rbp-240h]
_BYTE *i; // [rsp+30h] [rbp-230h]
unsigned long long v9; // [rsp+38h] [rbp-228h]
long long v10; // [rsp+48h] [rbp-218h]
_BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF
char v12; // [rsp+253h] [rbp-Dh] BYREF
_BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF
*(_QWORD *)&v13[4] = __readfsqword(0x28u);
v10 = a1;
v6 = v11;
v12 = 47;
v9 = stpcpy(v13, "..") - (_QWORD)&v12;
for ( i = v11; ; ++i )
{
v2 = a2++;
LOBYTE(v2) = *v2;
*i = (_BYTE)v2;
if ( !(_BYTE)v2 )
break;
if ( *i == 47 )
*i = 47;
if ( *i == 47 )
{
if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) )
{
i -= v9;
if ( i != v6 )
{
if ( *--i == 126 && (i == v6 || *(i - 1) == 47) )
{
if ( !home_dir )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, home_dir) - 1);
if ( *i == 47 )
--i;
}
if ( *i == 46 && (i == v6 || *(i - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1);
if ( *i == 47 )
--i;
}
v5 = i;
while ( 1 )
{
v4 = 0;
if ( i >= v6 )
v4 = *i != 47;
if ( !v4 )
break;
--i;
}
if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) )
{
i = (_BYTE *)stpcpy(v5 + 1, &v12);
*i = 47;
}
}
}
else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) )
{
v6 = i;
}
else if ( i - v6 > 0 && *(i - 1) == 47 )
{
--i;
}
else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 )
{
i -= 2;
}
}
}
stpcpy(v10, v11);
return i - v11;
}
|
cleanup_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x0012bf18
LAB_0012bf18:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x238],RAX
MOV byte ptr [RBP + -0xd],0x2f
LEA RDI,[RBP + -0xd]
ADD RDI,0x1
LEA RSI,[0x178eb2]
CALL 0x00124270
LEA RCX,[RBP + -0xd]
SUB RAX,RCX
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV qword ptr [RBP + -0x230],RAX
LAB_0012bf68:
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x238],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x230]
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0012c361
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012bfad
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
LAB_0012bfad:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012c348
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,qword ptr [RBP + -0x228]
JBE 0x0012c264
MOV RDI,qword ptr [RBP + -0x230]
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x228]
ADD RDI,RAX
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00124120
CMP EAX,0x0
JNZ 0x0012c264
MOV RDX,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x230]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x0012c25f
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x0012c0ef
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x0012c080
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x0012c0ef
LAB_0012c080:
LEA RAX,[0x4837a8]
CMP qword ptr [RAX],0x0
JNZ 0x0012c0ab
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012c34a
LAB_0012c0ab:
LEA RDI,[RBP + -0x210]
LEA RAX,[0x4837a8]
MOV RSI,qword ptr [RAX]
CALL 0x00124270
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012c0ed
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_0012c0ed:
JMP 0x0012c0ef
LAB_0012c0ef:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x0012c19b
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x0012c122
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x0012c19b
LAB_0012c122:
LEA RDI,[0x4837c0]
MOV ESI,0x200
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0012cfb0
CMP EAX,0x0
JZ 0x0012c15a
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012c34a
LAB_0012c15a:
LEA RDI,[RBP + -0x210]
LEA RSI,[0x4837c0]
CALL 0x00124270
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012c199
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_0012c199:
JMP 0x0012c19b
LAB_0012c19b:
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x248],RAX
LAB_0012c1a9:
MOV RCX,qword ptr [RBP + -0x230]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x240]
MOV byte ptr [RBP + -0x249],AL
JC 0x0012c1d7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x249],AL
LAB_0012c1d7:
MOV AL,byte ptr [RBP + -0x249]
TEST AL,0x1
JNZ 0x0012c1e3
JMP 0x0012c1f7
LAB_0012c1e3:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012c1a9
LAB_0012c1f7:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JZ 0x0012c233
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JC 0x0012c25d
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00124120
CMP EAX,0x0
JNZ 0x0012c25d
LAB_0012c233:
MOV RDI,qword ptr [RBP + -0x248]
ADD RDI,0x1
LEA RSI,[RBP + -0xd]
CALL 0x00124270
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
JMP 0x0012c34a
LAB_0012c25d:
JMP 0x0012c25f
LAB_0012c25f:
JMP 0x0012c346
LAB_0012c264:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x228]
SUB RCX,0x1
CMP RAX,RCX
JNZ 0x0012c2bc
MOV RDI,qword ptr [RBP + -0x240]
LEA RSI,[RBP + -0xd]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x228]
SUB RDX,0x1
CALL 0x00124120
CMP EAX,0x0
JNZ 0x0012c2bc
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x0012c344
LAB_0012c2bc:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x0
JLE 0x0012c2f7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x0012c2f7
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012c342
LAB_0012c2f7:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x0012c340
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2e
JNZ 0x0012c340
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x2]
CMP EAX,0x2f
JNZ 0x0012c340
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x230],RAX
LAB_0012c340:
JMP 0x0012c342
LAB_0012c342:
JMP 0x0012c344
LAB_0012c344:
JMP 0x0012c346
LAB_0012c346:
JMP 0x0012c348
LAB_0012c348:
JMP 0x0012c34a
LAB_0012c34a:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x0012bf68
LAB_0012c361:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x00124270
JMP 0x0012c376
LAB_0012c376:
JMP 0x0012c378
LAB_0012c378:
MOV RAX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012c3b2
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_0012c3b2:
CALL 0x001242a0
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong __n;
char *pcVar4;
long in_FS_OFFSET;
bool bVar5;
char *local_248;
char *local_240;
char *local_238;
char local_218 [515];
char local_15;
char acStack_14 [4];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = local_218;
local_15 = '/';
pcVar3 = stpcpy(acStack_14,"..");
__n = (long)pcVar3 - (long)&local_15;
local_240 = param_2;
local_238 = local_248;
do {
cVar1 = *local_240;
*local_238 = cVar1;
if (cVar1 == '\0') {
stpcpy(param_1,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)local_238 - (long)local_218;
}
if (*local_238 == '/') {
*local_238 = '/';
}
if (*local_238 == '/') {
if ((__n < (ulong)((long)local_238 - (long)local_248)) &&
(iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) {
local_238 = local_238 + -__n;
if (local_238 != local_248) {
pcVar3 = local_238 + -1;
if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) {
if (home_dir == (char *)0x0) {
local_238 = pcVar3 + __n + 1;
goto LAB_0012c34a;
}
pcVar4 = stpcpy(local_218,home_dir);
pcVar3 = pcVar4 + -1;
if (pcVar4[-1] == '/') {
pcVar3 = pcVar4 + -2;
}
}
local_238 = pcVar3;
pcVar3 = local_238;
if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
local_238 = local_238 + __n + 1;
goto LAB_0012c34a;
}
pcVar4 = stpcpy(local_218,&curr_dir);
local_238 = pcVar4 + -1;
pcVar3 = local_238;
if (*local_238 == '/') {
local_238 = pcVar4 + -2;
pcVar3 = local_238;
}
}
while( true ) {
bVar5 = false;
if (local_248 <= local_238) {
bVar5 = *local_238 != '/';
}
if (!bVar5) break;
local_238 = local_238 + -1;
}
if ((local_238[1] == '~') ||
((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) {
local_238 = stpcpy(pcVar3 + 1,&local_15);
*local_238 = '/';
}
}
}
else if (((long)local_238 - (long)local_248 == __n - 1) &&
(iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) {
local_248 = local_238;
}
else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) {
if ((1 < (long)local_238 - (long)local_248) &&
((local_238[-1] == '.' && (local_238[-2] == '/')))) {
local_238 = local_238 + -2;
}
}
else {
local_238 = local_238 + -1;
}
}
LAB_0012c34a:
local_238 = local_238 + 1;
local_240 = local_240 + 1;
} while( true );
}
|
|
61,207
|
my_strxfrm_pad_desc_and_reverse
|
eloqsql/strings/ctype-simple.c
|
size_t
my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend= strend;
}
return frmend - str;
}
|
O0
|
c
|
my_strxfrm_pad_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x78793
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x78793
movl -0x28(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x78793
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x98(%rdx), %ecx
cmpl %ecx, %eax
jae 0x7874f
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x78760
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x98(%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x7bc80
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x7bb40
movl -0x28(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x787f0
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x787f0
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x7bc80
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strxfrm_pad_desc_and_reverse:
push rbp
mov rbp, rsp
sub rsp, 40h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
cmp [rbp+var_24], 0
jz loc_78793
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_78793
mov eax, [rbp+var_28]
and eax, 40h
cmp eax, 0
jz short loc_78793
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov ecx, [rbp+var_24]
mov rdx, [rbp+var_8]
imul ecx, [rdx+98h]
cmp eax, ecx
jnb short loc_7874F
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_3C], eax
jmp short loc_78760
loc_7874F:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
imul eax, [rcx+98h]
mov [rbp+var_3C], eax
loc_78760:
mov eax, [rbp+var_3C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_2C]
mov edx, eax
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_0
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_78793:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_28]
mov ecx, [rbp+arg_0]
call my_strxfrm_desc_and_reverse
mov eax, [rbp+var_28]
and eax, 80h
cmp eax, 0
jz short loc_787F0
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_787F0
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_0
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
loc_787F0:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
add rsp, 40h
pop rbp
retn
|
long long my_strxfrm_pad_desc_and_reverse(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned int v8; // [rsp+4h] [rbp-3Ch]
unsigned long long v11; // [rsp+28h] [rbp-18h]
v11 = a3;
if ( a5 && a3 < a4 && (a6 & 0x40) != 0 )
{
if ( (int)a4 - (int)a3 >= (unsigned int)(*(_DWORD *)(a1 + 152) * a5) )
v8 = *(_DWORD *)(a1 + 152) * a5;
else
v8 = a4 - a3;
my_ci_fill_0(a1, a3, v8, *(unsigned __int8 *)(a1 + 176));
v11 += v8;
}
my_strxfrm_desc_and_reverse(a2, v11, a6, a7);
if ( (a6 & 0x80) != 0 && v11 < a4 )
{
my_ci_fill_0(a1, v11, a4 - v11, *(unsigned __int8 *)(a1 + 176));
v11 = a4;
}
return v11 - a2;
}
|
my_strxfrm_pad_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00178793
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00178793
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00178793
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x8]
IMUL ECX,dword ptr [RDX + 0x98]
CMP EAX,ECX
JNC 0x0017874f
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00178760
LAB_0017874f:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x98]
MOV dword ptr [RBP + -0x3c],EAX
LAB_00178760:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x0017bc80
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00178793:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + 0x10]
CALL 0x0017bb40
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001787f0
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001787f0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x0017bc80
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
LAB_001787f0:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_strxfrm_pad_desc_and_reverse
(long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6,
int4 param_7)
{
int4 local_44;
int8 local_20;
local_20 = param_3;
if (((param_5 != 0) && (param_3 < param_4)) && ((param_6 & 0x40) != 0)) {
if ((uint)((int)param_4 - (int)param_3) < (uint)(param_5 * *(int *)(param_1 + 0x98))) {
local_44 = (int)param_4 - (int)param_3;
}
else {
local_44 = param_5 * *(int *)(param_1 + 0x98);
}
my_ci_fill(param_1,param_3,local_44,*(int1 *)(param_1 + 0xb0));
local_20 = param_3 + local_44;
}
my_strxfrm_desc_and_reverse(param_2,local_20,param_6,param_7);
if (((param_6 & 0x80) != 0) && (local_20 < param_4)) {
my_ci_fill(param_1,local_20,param_4 - local_20,*(int1 *)(param_1 + 0xb0));
local_20 = param_4;
}
return local_20 - param_2;
}
|
|
61,208
|
JS_SetPrototypeInternal
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_SetPrototypeInternal(JSContext *ctx, JSValue obj,
JSValue proto_val,
BOOL throw_flag)
{
JSObject *proto, *p, *p1;
JSShape *sh;
if (throw_flag) {
if (JS_VALUE_GET_TAG(obj) == JS_TAG_NULL ||
JS_VALUE_GET_TAG(obj) == JS_TAG_UNDEFINED)
goto not_obj;
} else {
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
goto not_obj;
}
p = JS_VALUE_GET_OBJ(obj);
if (JS_VALUE_GET_TAG(proto_val) != JS_TAG_OBJECT) {
if (JS_VALUE_GET_TAG(proto_val) != JS_TAG_NULL) {
not_obj:
JS_ThrowTypeErrorNotAnObject(ctx);
return -1;
}
proto = NULL;
} else {
proto = JS_VALUE_GET_OBJ(proto_val);
}
if (throw_flag && JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return TRUE;
if (unlikely(p->class_id == JS_CLASS_PROXY))
return js_proxy_setPrototypeOf(ctx, obj, proto_val, throw_flag);
sh = p->shape;
if (sh->proto == proto)
return TRUE;
if (p == JS_VALUE_GET_OBJ(ctx->class_proto[JS_CLASS_OBJECT])) {
if (throw_flag) {
JS_ThrowTypeError(ctx, "'Immutable prototype object \'Object.prototype\' cannot have their prototype set'");
return -1;
}
return FALSE;
}
if (!p->extensible) {
if (throw_flag) {
JS_ThrowTypeError(ctx, "object is not extensible");
return -1;
} else {
return FALSE;
}
}
if (proto) {
/* check if there is a cycle */
p1 = proto;
do {
if (p1 == p) {
if (throw_flag) {
JS_ThrowTypeError(ctx, "circular prototype chain");
return -1;
} else {
return FALSE;
}
}
/* Note: for Proxy objects, proto is NULL */
p1 = p1->shape->proto;
} while (p1 != NULL);
js_dup(proto_val);
}
if (js_shape_prepare_update(ctx, p, NULL))
return -1;
sh = p->shape;
if (sh->proto)
JS_FreeValue(ctx, JS_MKPTR(JS_TAG_OBJECT, sh->proto));
sh->proto = proto;
return TRUE;
}
|
O0
|
c
|
JS_SetPrototypeInternal:
subq $0xb8, %rsp
movq %rsi, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x98(%rsp)
movq %rdi, 0x88(%rsp)
movl %r9d, 0x84(%rsp)
cmpl $0x0, 0x84(%rsp)
je 0x2d67f
movq 0xa8(%rsp), %rax
cmpl $0x2, %eax
je 0x2d67b
movq 0xa8(%rsp), %rax
cmpl $0x3, %eax
jne 0x2d67d
jmp 0x2d6b9
jmp 0x2d690
movq 0xa8(%rsp), %rax
cmpl $-0x1, %eax
je 0x2d68e
jmp 0x2d6b9
jmp 0x2d690
movq 0xa0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x98(%rsp), %rax
cmpl $-0x1, %eax
je 0x2d6eb
movq 0x98(%rsp), %rax
cmpl $0x2, %eax
je 0x2d6e0
jmp 0x2d6b9
movq 0x88(%rsp), %rdi
callq 0x2f5a0
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2d993
movq $0x0, 0x78(%rsp)
jmp 0x2d6f8
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
cmpl $0x0, 0x84(%rsp)
je 0x2d71f
movq 0xa8(%rsp), %rax
cmpl $-0x1, %eax
je 0x2d71f
movl $0x1, 0xb4(%rsp)
jmp 0x2d993
movq 0x70(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x30, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2d780
movq 0x88(%rsp), %rdi
movl 0x84(%rsp), %r9d
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %r8
callq 0x5fd30
movl %eax, 0xb4(%rsp)
jmp 0x2d993
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0x38(%rax), %rax
cmpq 0x78(%rsp), %rax
jne 0x2d7ae
movl $0x1, 0xb4(%rsp)
jmp 0x2d993
movq 0x70(%rsp), %rax
movq 0x88(%rsp), %rcx
movq 0x40(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jne 0x2d80f
cmpl $0x0, 0x84(%rsp)
je 0x2d7ff
movq 0x88(%rsp), %rdi
leaq 0xe07a7(%rip), %rsi # 0x10df85
movb $0x0, %al
callq 0x2d300
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2d993
movl $0x0, 0xb4(%rsp)
jmp 0x2d993
movq 0x70(%rsp), %rax
movb 0x5(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x2d867
cmpl $0x0, 0x84(%rsp)
je 0x2d857
movq 0x88(%rsp), %rdi
leaq 0xe079f(%rip), %rsi # 0x10dfd5
movb $0x0, %al
callq 0x2d300
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2d993
movl $0x0, 0xb4(%rsp)
jmp 0x2d993
cmpq $0x0, 0x78(%rsp)
je 0x2d90c
movq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x70(%rsp), %rax
jne 0x2d8d3
cmpl $0x0, 0x84(%rsp)
je 0x2d8c3
movq 0x88(%rsp), %rdi
leaq 0xe074c(%rip), %rsi # 0x10dfee
movb $0x0, %al
callq 0x2d300
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2d993
movl $0x0, 0xb4(%rsp)
jmp 0x2d993
movq 0x68(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x2d87d
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x216d0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x35970
cmpl $0x0, %eax
je 0x2d934
movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF
jmp 0x2d993
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x2d97a
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, (%rsp)
movq $-0x1, 0x8(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x23c90
movq 0x78(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rax)
movl $0x1, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_SetPrototypeInternal:
sub rsp, 0B8h
mov [rsp+0B8h+var_18], rsi
mov [rsp+0B8h+var_10], rdx
mov [rsp+0B8h+var_28], rcx
mov [rsp+0B8h+var_20], r8
mov [rsp+0B8h+var_30], rdi
mov [rsp+0B8h+var_34], r9d
cmp [rsp+0B8h+var_34], 0
jz short loc_2D67F
mov rax, [rsp+0B8h+var_10]
cmp eax, 2
jz short loc_2D67B
mov rax, [rsp+0B8h+var_10]
cmp eax, 3
jnz short loc_2D67D
loc_2D67B:
jmp short loc_2D6B9
loc_2D67D:
jmp short loc_2D690
loc_2D67F:
mov rax, [rsp+0B8h+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_2D68E
jmp short loc_2D6B9
loc_2D68E:
jmp short $+2
loc_2D690:
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_20]
cmp eax, 0FFFFFFFFh
jz short loc_2D6EB
mov rax, [rsp+0B8h+var_20]
cmp eax, 2
jz short loc_2D6E0
jmp short $+2
loc_2D6B9:
mov rdi, [rsp+0B8h+var_30]
call JS_ThrowTypeErrorNotAnObject
mov [rsp+0B8h+var_68], rax
mov [rsp+0B8h+var_60], rdx
mov [rsp+0B8h+var_4], 0FFFFFFFFh
jmp loc_2D993
loc_2D6E0:
mov [rsp+0B8h+var_40], 0
jmp short loc_2D6F8
loc_2D6EB:
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_40], rax
loc_2D6F8:
cmp [rsp+0B8h+var_34], 0
jz short loc_2D71F
mov rax, [rsp+0B8h+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_2D71F
mov [rsp+0B8h+var_4], 1
jmp loc_2D993
loc_2D71F:
mov rax, [rsp+0B8h+var_48]
movzx eax, word ptr [rax+6]
cmp eax, 30h ; '0'
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2D780
mov rdi, [rsp+0B8h+var_30]
mov r9d, [rsp+0B8h+var_34]
mov rsi, [rsp+0B8h+var_18]
mov rdx, [rsp+0B8h+var_10]
mov rcx, [rsp+0B8h+var_28]
mov r8, [rsp+0B8h+var_20]
call js_proxy_setPrototypeOf
mov [rsp+0B8h+var_4], eax
jmp loc_2D993
loc_2D780:
mov rax, [rsp+0B8h+var_48]
mov rax, [rax+18h]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_58]
mov rax, [rax+38h]
cmp rax, [rsp+0B8h+var_40]
jnz short loc_2D7AE
mov [rsp+0B8h+var_4], 1
jmp loc_2D993
loc_2D7AE:
mov rax, [rsp+0B8h+var_48]
mov rcx, [rsp+0B8h+var_30]
mov rcx, [rcx+40h]
cmp rax, [rcx+10h]
jnz short loc_2D80F
cmp [rsp+0B8h+var_34], 0
jz short loc_2D7FF
mov rdi, [rsp+0B8h+var_30]
lea rsi, aImmutableProto; "'Immutable prototype object 'Object.pro"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+0B8h+var_78], rax
mov [rsp+0B8h+var_70], rdx
mov [rsp+0B8h+var_4], 0FFFFFFFFh
jmp loc_2D993
loc_2D7FF:
mov [rsp+0B8h+var_4], 0
jmp loc_2D993
loc_2D80F:
mov rax, [rsp+0B8h+var_48]
mov al, [rax+5]
and al, 1
cmp al, 0
jnz short loc_2D867
cmp [rsp+0B8h+var_34], 0
jz short loc_2D857
mov rdi, [rsp+0B8h+var_30]
lea rsi, aObjectIsNotExt; "object is not extensible"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0B8h+var_88], rax
mov [rsp+0B8h+var_80], rdx
mov [rsp+0B8h+var_4], 0FFFFFFFFh
jmp loc_2D993
loc_2D857:
mov [rsp+0B8h+var_4], 0
jmp loc_2D993
loc_2D867:
cmp [rsp+0B8h+var_40], 0
jz loc_2D90C
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_50], rax
loc_2D87D:
mov rax, [rsp+0B8h+var_50]
cmp rax, [rsp+0B8h+var_48]
jnz short loc_2D8D3
cmp [rsp+0B8h+var_34], 0
jz short loc_2D8C3
mov rdi, [rsp+0B8h+var_30]
lea rsi, aCircularProtot; "circular prototype chain"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_90], rdx
mov [rsp+0B8h+var_4], 0FFFFFFFFh
jmp loc_2D993
loc_2D8C3:
mov [rsp+0B8h+var_4], 0
jmp loc_2D993
loc_2D8D3:
mov rax, [rsp+0B8h+var_50]
mov rax, [rax+18h]
mov rax, [rax+38h]
mov [rsp+0B8h+var_50], rax
cmp [rsp+0B8h+var_50], 0
jnz short loc_2D87D
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_20]
call js_dup
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_A0], rdx
loc_2D90C:
mov rdi, [rsp+0B8h+var_30]
mov rsi, [rsp+0B8h+var_48]
xor eax, eax
mov edx, eax
call js_shape_prepare_update
cmp eax, 0
jz short loc_2D934
mov [rsp+0B8h+var_4], 0FFFFFFFFh
jmp short loc_2D993
loc_2D934:
mov rax, [rsp+0B8h+var_48]
mov rax, [rax+18h]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_58]
cmp qword ptr [rax+38h], 0
jz short loc_2D97A
mov rdi, [rsp+0B8h+var_30]
mov rax, [rsp+0B8h+var_58]
mov rax, [rax+38h]
mov [rsp+0B8h+var_B8], rax
mov [rsp+0B8h+var_B0], 0FFFFFFFFFFFFFFFFh
mov rsi, [rsp+0B8h+var_B8]
mov rdx, [rsp+0B8h+var_B0]
call JS_FreeValue
loc_2D97A:
mov rcx, [rsp+0B8h+var_40]
mov rax, [rsp+0B8h+var_58]
mov [rax+38h], rcx
mov [rsp+0B8h+var_4], 1
loc_2D993:
mov eax, [rsp+0B8h+var_4]
add rsp, 0B8h
retn
|
long long JS_SetPrototypeInternal(
long long a1,
long long a2,
long long a3,
_DWORD *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; // rcx
char v16; // [rsp+0h] [rbp-B8h]
long long v17; // [rsp+60h] [rbp-58h]
_DWORD *v18; // [rsp+68h] [rbp-50h]
_DWORD *v19; // [rsp+78h] [rbp-40h]
if ( (_DWORD)a6 )
{
if ( (_DWORD)a3 == 2 || (_DWORD)a3 == 3 )
goto LABEL_9;
}
else if ( (_DWORD)a3 != -1 )
{
LABEL_9:
JS_ThrowTypeErrorNotAnObject(a1);
return (unsigned int)-1;
}
if ( (_DWORD)a5 == -1 )
{
v19 = a4;
}
else
{
if ( (_DWORD)a5 != 2 )
goto LABEL_9;
v19 = 0LL;
}
if ( !(_DWORD)a6 || (_DWORD)a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 48 )
{
return (unsigned int)js_proxy_setPrototypeOf(a1, a2, a3, a4, a5, (unsigned int)a6);
}
else if ( *(_DWORD **)(*(_QWORD *)(a2 + 24) + 56LL) == v19 )
{
return 1;
}
else
{
v14 = *(_QWORD *)(a1 + 64);
if ( a2 == *(_QWORD *)(v14 + 16) )
{
if ( (_DWORD)a6 )
{
JS_ThrowTypeError(
a1,
(long long)"'Immutable prototype object 'Object.prototype' cannot have their prototype set'",
a3,
v14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v16);
return (unsigned int)-1;
}
else
{
return 0;
}
}
else if ( (*(_BYTE *)(a2 + 5) & 1) != 0 )
{
if ( v19 )
{
v18 = v19;
while ( v18 != (_DWORD *)a2 )
{
v18 = *(_DWORD **)(*((_QWORD *)v18 + 3) + 56LL);
if ( !v18 )
{
js_dup(a4, a5);
goto LABEL_35;
}
}
if ( (_DWORD)a6 )
{
JS_ThrowTypeError(
a1,
(long long)"circular prototype chain",
a3,
v14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v16);
return (unsigned int)-1;
}
else
{
return 0;
}
}
else
{
LABEL_35:
if ( (unsigned int)js_shape_prepare_update(a1, a2, 0LL) )
{
return (unsigned int)-1;
}
else
{
v17 = *(_QWORD *)(a2 + 24);
if ( *(_QWORD *)(v17 + 56) )
JS_FreeValue(a1, *(_QWORD *)(v17 + 56), -1LL);
*(_QWORD *)(v17 + 56) = v19;
return 1;
}
}
}
else if ( (_DWORD)a6 )
{
JS_ThrowTypeError(
a1,
(long long)"object is not extensible",
a3,
v14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v16);
return (unsigned int)-1;
}
else
{
return 0;
}
}
}
else
{
return 1;
}
}
|
JS_SetPrototypeInternal:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0xa8],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x98],R8
MOV qword ptr [RSP + 0x88],RDI
MOV dword ptr [RSP + 0x84],R9D
CMP dword ptr [RSP + 0x84],0x0
JZ 0x0012d67f
MOV RAX,qword ptr [RSP + 0xa8]
CMP EAX,0x2
JZ 0x0012d67b
MOV RAX,qword ptr [RSP + 0xa8]
CMP EAX,0x3
JNZ 0x0012d67d
LAB_0012d67b:
JMP 0x0012d6b9
LAB_0012d67d:
JMP 0x0012d690
LAB_0012d67f:
MOV RAX,qword ptr [RSP + 0xa8]
CMP EAX,-0x1
JZ 0x0012d68e
JMP 0x0012d6b9
LAB_0012d68e:
JMP 0x0012d690
LAB_0012d690:
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x98]
CMP EAX,-0x1
JZ 0x0012d6eb
MOV RAX,qword ptr [RSP + 0x98]
CMP EAX,0x2
JZ 0x0012d6e0
JMP 0x0012d6b9
LAB_0012d6b9:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0012f5a0
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV dword ptr [RSP + 0xb4],0xffffffff
JMP 0x0012d993
LAB_0012d6e0:
MOV qword ptr [RSP + 0x78],0x0
JMP 0x0012d6f8
LAB_0012d6eb:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x78],RAX
LAB_0012d6f8:
CMP dword ptr [RSP + 0x84],0x0
JZ 0x0012d71f
MOV RAX,qword ptr [RSP + 0xa8]
CMP EAX,-0x1
JZ 0x0012d71f
MOV dword ptr [RSP + 0xb4],0x1
JMP 0x0012d993
LAB_0012d71f:
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x30
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012d780
MOV RDI,qword ptr [RSP + 0x88]
MOV R9D,dword ptr [RSP + 0x84]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
MOV RCX,qword ptr [RSP + 0x90]
MOV R8,qword ptr [RSP + 0x98]
CALL 0x0015fd30
MOV dword ptr [RSP + 0xb4],EAX
JMP 0x0012d993
LAB_0012d780:
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX + 0x38]
CMP RAX,qword ptr [RSP + 0x78]
JNZ 0x0012d7ae
MOV dword ptr [RSP + 0xb4],0x1
JMP 0x0012d993
LAB_0012d7ae:
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RCX + 0x40]
CMP RAX,qword ptr [RCX + 0x10]
JNZ 0x0012d80f
CMP dword ptr [RSP + 0x84],0x0
JZ 0x0012d7ff
MOV RDI,qword ptr [RSP + 0x88]
LEA RSI,[0x20df85]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV dword ptr [RSP + 0xb4],0xffffffff
JMP 0x0012d993
LAB_0012d7ff:
MOV dword ptr [RSP + 0xb4],0x0
JMP 0x0012d993
LAB_0012d80f:
MOV RAX,qword ptr [RSP + 0x70]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x1
CMP AL,0x0
JNZ 0x0012d867
CMP dword ptr [RSP + 0x84],0x0
JZ 0x0012d857
MOV RDI,qword ptr [RSP + 0x88]
LEA RSI,[0x20dfd5]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV dword ptr [RSP + 0xb4],0xffffffff
JMP 0x0012d993
LAB_0012d857:
MOV dword ptr [RSP + 0xb4],0x0
JMP 0x0012d993
LAB_0012d867:
CMP qword ptr [RSP + 0x78],0x0
JZ 0x0012d90c
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x68],RAX
LAB_0012d87d:
MOV RAX,qword ptr [RSP + 0x68]
CMP RAX,qword ptr [RSP + 0x70]
JNZ 0x0012d8d3
CMP dword ptr [RSP + 0x84],0x0
JZ 0x0012d8c3
MOV RDI,qword ptr [RSP + 0x88]
LEA RSI,[0x20dfee]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0xb4],0xffffffff
JMP 0x0012d993
LAB_0012d8c3:
MOV dword ptr [RSP + 0xb4],0x0
JMP 0x0012d993
LAB_0012d8d3:
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JNZ 0x0012d87d
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x001216d0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
LAB_0012d90c:
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x70]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00135970
CMP EAX,0x0
JZ 0x0012d934
MOV dword ptr [RSP + 0xb4],0xffffffff
JMP 0x0012d993
LAB_0012d934:
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0012d97a
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],-0x1
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x00123c90
LAB_0012d97a:
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX + 0x38],RCX
MOV dword ptr [RSP + 0xb4],0x1
LAB_0012d993:
MOV EAX,dword ptr [RSP + 0xb4]
ADD RSP,0xb8
RET
|
int4
JS_SetPrototypeInternal
(long param_1,long param_2,int8 param_3,long param_4,int8 param_5,int param_6)
{
long lVar1;
int4 uVar2;
int iVar3;
long local_50;
long local_40;
iVar3 = (int)param_3;
if (param_6 == 0) {
if (iVar3 != -1) goto LAB_0012d6b9;
}
else if ((iVar3 == 2) || (iVar3 == 3)) goto LAB_0012d6b9;
local_40 = param_4;
if ((int)param_5 != -1) {
if ((int)param_5 != 2) {
LAB_0012d6b9:
JS_ThrowTypeErrorNotAnObject(param_1);
return 0xffffffff;
}
local_40 = 0;
}
if ((param_6 != 0) && (iVar3 != -1)) {
return 1;
}
if (*(short *)(param_2 + 6) == 0x30) {
uVar2 = js_proxy_setPrototypeOf(param_1,param_2,param_3,param_4,param_5,param_6);
return uVar2;
}
if (*(long *)(*(long *)(param_2 + 0x18) + 0x38) == local_40) {
return 1;
}
if (param_2 == *(long *)(*(long *)(param_1 + 0x40) + 0x10)) {
if (param_6 != 0) {
JS_ThrowTypeError(param_1,
"\'Immutable prototype object \'Object.prototype\' cannot have their prototype set\'"
);
return 0xffffffff;
}
return 0;
}
if ((*(byte *)(param_2 + 5) & 1) == 0) {
if (param_6 != 0) {
JS_ThrowTypeError(param_1,"object is not extensible");
return 0xffffffff;
}
return 0;
}
if (local_40 != 0) {
local_50 = local_40;
do {
if (local_50 == param_2) {
if (param_6 != 0) {
JS_ThrowTypeError(param_1,"circular prototype chain");
return 0xffffffff;
}
return 0;
}
local_50 = *(long *)(*(long *)(local_50 + 0x18) + 0x38);
} while (local_50 != 0);
js_dup(param_4,param_5);
}
iVar3 = js_shape_prepare_update(param_1,param_2,0);
if (iVar3 != 0) {
return 0xffffffff;
}
lVar1 = *(long *)(param_2 + 0x18);
if (*(long *)(lVar1 + 0x38) != 0) {
JS_FreeValue(param_1,*(int8 *)(lVar1 + 0x38),0xffffffffffffffff);
}
*(long *)(lVar1 + 0x38) = local_40;
return 1;
}
|
|
61,209
|
JS_SetPrototypeInternal
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_SetPrototypeInternal(JSContext *ctx, JSValue obj,
JSValue proto_val,
BOOL throw_flag)
{
JSObject *proto, *p, *p1;
JSShape *sh;
if (throw_flag) {
if (JS_VALUE_GET_TAG(obj) == JS_TAG_NULL ||
JS_VALUE_GET_TAG(obj) == JS_TAG_UNDEFINED)
goto not_obj;
} else {
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
goto not_obj;
}
p = JS_VALUE_GET_OBJ(obj);
if (JS_VALUE_GET_TAG(proto_val) != JS_TAG_OBJECT) {
if (JS_VALUE_GET_TAG(proto_val) != JS_TAG_NULL) {
not_obj:
JS_ThrowTypeErrorNotAnObject(ctx);
return -1;
}
proto = NULL;
} else {
proto = JS_VALUE_GET_OBJ(proto_val);
}
if (throw_flag && JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return TRUE;
if (unlikely(p->class_id == JS_CLASS_PROXY))
return js_proxy_setPrototypeOf(ctx, obj, proto_val, throw_flag);
sh = p->shape;
if (sh->proto == proto)
return TRUE;
if (p == JS_VALUE_GET_OBJ(ctx->class_proto[JS_CLASS_OBJECT])) {
if (throw_flag) {
JS_ThrowTypeError(ctx, "'Immutable prototype object \'Object.prototype\' cannot have their prototype set'");
return -1;
}
return FALSE;
}
if (!p->extensible) {
if (throw_flag) {
JS_ThrowTypeError(ctx, "object is not extensible");
return -1;
} else {
return FALSE;
}
}
if (proto) {
/* check if there is a cycle */
p1 = proto;
do {
if (p1 == p) {
if (throw_flag) {
JS_ThrowTypeError(ctx, "circular prototype chain");
return -1;
} else {
return FALSE;
}
}
/* Note: for Proxy objects, proto is NULL */
p1 = p1->shape->proto;
} while (p1 != NULL);
js_dup(proto_val);
}
if (js_shape_prepare_update(ctx, p, NULL))
return -1;
sh = p->shape;
if (sh->proto)
JS_FreeValue(ctx, JS_MKPTR(JS_TAG_OBJECT, sh->proto));
sh->proto = proto;
return TRUE;
}
|
O1
|
c
|
JS_SetPrototypeInternal:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
testl %r9d, %r9d
je 0x22758
movl %edx, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x2275d
jmp 0x22773
cmpl $-0x1, %edx
jne 0x22773
movq 0x8(%rsp), %r14
cmpl $-0x1, %r8d
je 0x22793
cmpl $0x2, %r8d
jne 0x22773
xorl %r15d, %r15d
jmp 0x22798
leaq 0x7c8ab(%rip), %rsi # 0x9f025
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%rsp), %r15
testl %r9d, %r9d
setne %sil
cmpl $-0x1, %edx
setne %dil
movl $0x1, %eax
testb %dil, %sil
jne 0x22789
cmpw $0x30, 0x6(%r14)
je 0x22889
movq 0x18(%r14), %rdx
cmpq %r15, 0x38(%rdx)
je 0x22789
movq 0x40(%rbx), %rax
cmpq 0x10(%rax), %r14
je 0x227e9
testb $0x1, 0x5(%r14)
jne 0x227fe
testl %r9d, %r9d
je 0x22882
leaq 0x7c78a(%rip), %rsi # 0x9ef71
jmp 0x2277a
testl %r9d, %r9d
je 0x22882
leaq 0x7c728(%rip), %rsi # 0x9ef21
jmp 0x2277a
testq %r15, %r15
je 0x2282a
movq %r15, %rax
cmpq %r14, %rax
je 0x22871
movq 0x18(%rax), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
jne 0x22806
movq %rcx, 0x18(%rsp)
cmpl $-0x9, %r8d
jb 0x2282a
movq 0x18(%rsp), %rax
incl (%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2631e
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x22789
movq 0x18(%r14), %r14
movq 0x38(%r14), %rsi
testq %rsi, %rsi
je 0x22863
movq 0x18(%rbx), %rdi
movq $-0x1, %rdx
callq 0x1d8c6
movq %r15, 0x38(%r14)
movl $0x1, %eax
jmp 0x22789
testl %r9d, %r9d
je 0x22882
leaq 0x7c70d(%rip), %rsi # 0x9ef8a
jmp 0x2277a
xorl %eax, %eax
jmp 0x22789
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3d2a8
|
JS_SetPrototypeInternal:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
mov [rsp+38h+var_30], rsi
mov [rsp+38h+var_28], rcx
test r9d, r9d
jz short loc_22758
mov eax, edx
and eax, 0FFFFFFFEh
cmp eax, 2
jnz short loc_2275D
jmp short loc_22773
loc_22758:
cmp edx, 0FFFFFFFFh
jnz short loc_22773
loc_2275D:
mov r14, [rsp+38h+var_30]
cmp r8d, 0FFFFFFFFh
jz short loc_22793
cmp r8d, 2
jnz short loc_22773
xor r15d, r15d
jmp short loc_22798
loc_22773:
lea rsi, aOperandPrototy+20h; "not an object"
loc_2277A:
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
loc_22789:
add rsp, 20h
pop rbx
pop r14
pop r15
retn
loc_22793:
mov r15, [rsp+38h+var_28]
loc_22798:
test r9d, r9d
setnz sil
cmp edx, 0FFFFFFFFh
setnz dil
mov eax, 1
test sil, dil
jnz short loc_22789
cmp word ptr [r14+6], 30h ; '0'
jz loc_22889
mov rdx, [r14+18h]
cmp [rdx+38h], r15
jz short loc_22789
mov rax, [rbx+40h]
cmp r14, [rax+10h]
jz short loc_227E9
test byte ptr [r14+5], 1
jnz short loc_227FE
test r9d, r9d
jz loc_22882
lea rsi, aObjectIsNotExt; "object is not extensible"
jmp short loc_2277A
loc_227E9:
test r9d, r9d
jz loc_22882
lea rsi, aImmutableProto; "'Immutable prototype object 'Object.pro"...
jmp loc_2277A
loc_227FE:
test r15, r15
jz short loc_2282A
mov rax, r15
loc_22806:
cmp rax, r14
jz short loc_22871
mov rax, [rax+18h]
mov rax, [rax+38h]
test rax, rax
jnz short loc_22806
mov [rsp+38h+var_20], rcx
cmp r8d, 0FFFFFFF7h
jb short loc_2282A
mov rax, [rsp+38h+var_20]
inc dword ptr [rax]
loc_2282A:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call js_shape_prepare_update
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz loc_22789
mov r14, [r14+18h]
mov rsi, [r14+38h]
test rsi, rsi
jz short loc_22863
mov rdi, [rbx+18h]
mov rdx, 0FFFFFFFFFFFFFFFFh
call JS_FreeValueRT
loc_22863:
mov [r14+38h], r15
mov eax, 1
jmp loc_22789
loc_22871:
test r9d, r9d
jz short loc_22882
lea rsi, aCircularProtot; "circular prototype chain"
jmp loc_2277A
loc_22882:
xor eax, eax
jmp loc_22789
loc_22889:
mov rsi, [rsp+38h+var_30]
mov rdi, rbx
add rsp, 20h
pop rbx
pop r14
pop r15
jmp js_proxy_setPrototypeOf
|
long long JS_SetPrototypeInternal(
long long a1,
long long a2,
long long a3,
_DWORD *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *v14; // r15
char *v15; // rsi
long long result; // rax
_DWORD *v17; // rax
int v18; // ecx
long long v19; // r14
_DWORD *v20; // rsi
char v21; // [rsp+0h] [rbp-38h]
if ( (_DWORD)a6 )
{
if ( (a3 & 0xFFFFFFFE) == 2 )
goto LABEL_8;
}
else if ( (_DWORD)a3 != -1 )
{
goto LABEL_8;
}
if ( (_DWORD)a5 == -1 )
{
v14 = a4;
goto LABEL_12;
}
if ( (_DWORD)a5 != 2 )
{
LABEL_8:
v15 = "not an object";
LABEL_9:
JS_ThrowTypeError(a1, (long long)v15, a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v21);
return 0xFFFFFFFFLL;
}
v14 = 0LL;
LABEL_12:
result = 1LL;
if ( (_DWORD)a3 == -1 || (_DWORD)a6 == 0 )
{
if ( *(_WORD *)(a2 + 6) == 48 )
return js_proxy_setPrototypeOf(a1, a2);
a3 = *(_QWORD *)(a2 + 24);
if ( *(_DWORD **)(a3 + 56) != v14 )
{
if ( a2 == *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL) )
{
if ( (_DWORD)a6 )
{
v15 = "'Immutable prototype object 'Object.prototype' cannot have their prototype set'";
goto LABEL_9;
}
return 0LL;
}
if ( (*(_BYTE *)(a2 + 5) & 1) == 0 )
{
if ( (_DWORD)a6 )
{
v15 = "object is not extensible";
goto LABEL_9;
}
return 0LL;
}
if ( v14 )
{
v17 = v14;
while ( v17 != (_DWORD *)a2 )
{
v17 = *(_DWORD **)(*((_QWORD *)v17 + 3) + 56LL);
if ( !v17 )
{
if ( (unsigned int)a5 >= 0xFFFFFFF7 )
++*a4;
goto LABEL_27;
}
}
if ( !(_DWORD)a6 )
return 0LL;
v15 = "circular prototype chain";
goto LABEL_9;
}
LABEL_27:
v18 = js_shape_prepare_update(a1, a2, 0LL);
result = 0xFFFFFFFFLL;
if ( !v18 )
{
v19 = *(_QWORD *)(a2 + 24);
v20 = *(_DWORD **)(v19 + 56);
if ( v20 )
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20, -1LL);
*(_QWORD *)(v19 + 56) = v14;
return 1LL;
}
}
}
return result;
}
|
JS_SetPrototypeInternal:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RCX
TEST R9D,R9D
JZ 0x00122758
MOV EAX,EDX
AND EAX,0xfffffffe
CMP EAX,0x2
JNZ 0x0012275d
JMP 0x00122773
LAB_00122758:
CMP EDX,-0x1
JNZ 0x00122773
LAB_0012275d:
MOV R14,qword ptr [RSP + 0x8]
CMP R8D,-0x1
JZ 0x00122793
CMP R8D,0x2
JNZ 0x00122773
XOR R15D,R15D
JMP 0x00122798
LAB_00122773:
LEA RSI,[0x19f025]
LAB_0012277a:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
MOV EAX,0xffffffff
LAB_00122789:
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
LAB_00122793:
MOV R15,qword ptr [RSP + 0x10]
LAB_00122798:
TEST R9D,R9D
SETNZ SIL
CMP EDX,-0x1
SETNZ DIL
MOV EAX,0x1
TEST SIL,DIL
JNZ 0x00122789
CMP word ptr [R14 + 0x6],0x30
JZ 0x00122889
MOV RDX,qword ptr [R14 + 0x18]
CMP qword ptr [RDX + 0x38],R15
JZ 0x00122789
MOV RAX,qword ptr [RBX + 0x40]
CMP R14,qword ptr [RAX + 0x10]
JZ 0x001227e9
TEST byte ptr [R14 + 0x5],0x1
JNZ 0x001227fe
TEST R9D,R9D
JZ 0x00122882
LEA RSI,[0x19ef71]
JMP 0x0012277a
LAB_001227e9:
TEST R9D,R9D
JZ 0x00122882
LEA RSI,[0x19ef21]
JMP 0x0012277a
LAB_001227fe:
TEST R15,R15
JZ 0x0012282a
MOV RAX,R15
LAB_00122806:
CMP RAX,R14
JZ 0x00122871
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x38]
TEST RAX,RAX
JNZ 0x00122806
MOV qword ptr [RSP + 0x18],RCX
CMP R8D,-0x9
JC 0x0012282a
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_0012282a:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0012631e
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x00122789
MOV R14,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [R14 + 0x38]
TEST RSI,RSI
JZ 0x00122863
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,-0x1
CALL 0x0011d8c6
LAB_00122863:
MOV qword ptr [R14 + 0x38],R15
MOV EAX,0x1
JMP 0x00122789
LAB_00122871:
TEST R9D,R9D
JZ 0x00122882
LEA RSI,[0x19ef8a]
JMP 0x0012277a
LAB_00122882:
XOR EAX,EAX
JMP 0x00122789
LAB_00122889:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
JMP 0x0013d2a8
|
int8
JS_SetPrototypeInternal
(long param_1,int *param_2,uint param_3,int *param_4,uint param_5,int param_6)
{
long *plVar1;
long lVar2;
long lVar3;
int iVar4;
int *piVar5;
int8 uVar6;
char *pcVar7;
int *piVar8;
if (param_6 == 0) {
if (param_3 == 0xffffffff) goto LAB_0012275d;
}
else if ((param_3 & 0xfffffffe) != 2) {
LAB_0012275d:
piVar8 = param_4;
if (param_5 != 0xffffffff) {
if (param_5 != 2) goto LAB_00122773;
piVar8 = (int *)0x0;
}
if (param_6 != 0 && param_3 != 0xffffffff) {
return 1;
}
if (*(short *)((long)param_2 + 6) == 0x30) {
uVar6 = js_proxy_setPrototypeOf(param_1,param_2);
return uVar6;
}
if (*(int **)(*(long *)(param_2 + 6) + 0x38) == piVar8) {
return 1;
}
if (param_2 == *(int **)(*(long *)(param_1 + 0x40) + 0x10)) {
if (param_6 == 0) {
return 0;
}
pcVar7 = "\'Immutable prototype object \'Object.prototype\' cannot have their prototype set\'"
;
}
else {
if ((*(byte *)((long)param_2 + 5) & 1) != 0) {
piVar5 = piVar8;
if (piVar8 != (int *)0x0) {
do {
if (piVar5 == param_2) {
if (param_6 == 0) {
return 0;
}
pcVar7 = "circular prototype chain";
goto LAB_0012277a;
}
plVar1 = (long *)(piVar5 + 6);
piVar5 = *(int **)(*plVar1 + 0x38);
} while (*(int **)(*plVar1 + 0x38) != (int *)0x0);
if (0xfffffff6 < param_5) {
*param_4 = *param_4 + 1;
}
}
iVar4 = js_shape_prepare_update(param_1,param_2,0);
if (iVar4 == 0) {
lVar2 = *(long *)(param_2 + 6);
lVar3 = *(long *)(lVar2 + 0x38);
if (lVar3 != 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar3,0xffffffffffffffff);
}
*(int **)(lVar2 + 0x38) = piVar8;
return 1;
}
return 0xffffffff;
}
if (param_6 == 0) {
return 0;
}
pcVar7 = "object is not extensible";
}
goto LAB_0012277a;
}
LAB_00122773:
pcVar7 = "not an object";
LAB_0012277a:
JS_ThrowTypeError(param_1,pcVar7);
return 0xffffffff;
}
|
|
61,210
|
translog_recover_page_up_to_sector
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_recover_page_up_to_sector(uchar *page, uint16 offset)
{
uint16 chunk_offset= translog_get_first_chunk_offset(page), valid_chunk_end;
DBUG_ENTER("translog_recover_page_up_to_sector");
DBUG_PRINT("enter", ("offset: %u first chunk: %u",
(uint) offset, (uint) chunk_offset));
while (chunk_offset < offset && page[chunk_offset] != TRANSLOG_FILLER)
{
uint16 chunk_length;
if ((chunk_length=
translog_get_total_chunk_length(page, chunk_offset)) == 0)
{
DBUG_PRINT("error", ("cant get chunk length (offset %u)",
(uint) chunk_offset));
DBUG_RETURN(1);
}
DBUG_PRINT("info", ("chunk: offset: %u length %u",
(uint) chunk_offset, (uint) chunk_length));
if (((ulong) chunk_offset) + ((ulong) chunk_length) > TRANSLOG_PAGE_SIZE)
{
DBUG_PRINT("error", ("damaged chunk (offset %u) in trusted area",
(uint) chunk_offset));
DBUG_RETURN(1);
}
chunk_offset+= chunk_length;
}
valid_chunk_end= chunk_offset;
/* end of trusted area - sector parsing */
while (page[chunk_offset] != TRANSLOG_FILLER)
{
uint16 chunk_length;
if ((chunk_length=
translog_get_total_chunk_length(page, chunk_offset)) == 0)
break;
DBUG_PRINT("info", ("chunk: offset: %u length %u",
(uint) chunk_offset, (uint) chunk_length));
if (((ulong) chunk_offset) + ((ulong) chunk_length) >
(uint) (offset + DISK_DRIVE_SECTOR_SIZE))
break;
chunk_offset+= chunk_length;
valid_chunk_end= chunk_offset;
}
DBUG_PRINT("info", ("valid chunk end offset: %u", (uint) valid_chunk_end));
memset(page + valid_chunk_end, TRANSLOG_FILLER,
TRANSLOG_PAGE_SIZE - valid_chunk_end);
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_recover_page_up_to_sector:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x53aa0
movsbl %al, %eax
movw %ax, -0x14(%rbp)
jmp 0x5a145
jmp 0x5a147
movzwl -0x14(%rbp), %ecx
movzwl -0x12(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x1b(%rbp)
jge 0x5a16f
movq -0x10(%rbp), %rax
movzwl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
setne %al
movb %al, -0x1b(%rbp)
movb -0x1b(%rbp), %al
testb $0x1, %al
jne 0x5a178
jmp 0x5a1d9
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0x53ad0
movw %ax, -0x18(%rbp)
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x5a1a0
jmp 0x5a193
jmp 0x5a195
jmp 0x5a197
movb $0x1, -0x1(%rbp)
jmp 0x5a277
jmp 0x5a1a2
jmp 0x5a1a4
movzwl -0x14(%rbp), %eax
movzwl -0x18(%rbp), %ecx
addq %rcx, %rax
cmpq $0x2000, %rax # imm = 0x2000
jbe 0x5a1c6
jmp 0x5a1b9
jmp 0x5a1bb
jmp 0x5a1bd
movb $0x1, -0x1(%rbp)
jmp 0x5a277
movzwl -0x18(%rbp), %ecx
movzwl -0x14(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x14(%rbp)
jmp 0x5a147
movw -0x14(%rbp), %ax
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rax
movzwl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
je 0x5a249
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0x53ad0
movw %ax, -0x1a(%rbp)
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x5a20f
jmp 0x5a249
jmp 0x5a211
jmp 0x5a213
movzwl -0x14(%rbp), %eax
movzwl -0x1a(%rbp), %ecx
addq %rcx, %rax
movzwl -0x12(%rbp), %ecx
addl $0x200, %ecx # imm = 0x200
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x5a231
jmp 0x5a249
movzwl -0x1a(%rbp), %ecx
movzwl -0x14(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movw -0x14(%rbp), %ax
movw %ax, -0x16(%rbp)
jmp 0x5a1e1
jmp 0x5a24b
jmp 0x5a24d
movq -0x10(%rbp), %rdi
movzwl -0x16(%rbp), %eax
cltq
addq %rax, %rdi
movzwl -0x16(%rbp), %ecx
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xff, %esi
callq 0x2a2c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
|
translog_recover_page_up_to_sector:
push rbp
mov rbp, rsp
sub rsp, 20h
mov ax, si
mov [rbp+var_10], rdi
mov [rbp+var_12], ax
mov rdi, [rbp+var_10]
call translog_get_first_chunk_offset
movsx eax, al
mov [rbp+var_14], ax
jmp short $+2
loc_5A145:
jmp short $+2
loc_5A147:
movzx ecx, [rbp+var_14]
movzx edx, [rbp+var_12]
xor eax, eax
cmp ecx, edx
mov [rbp+var_1B], al
jge short loc_5A16F
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0FFh
setnz al
mov [rbp+var_1B], al
loc_5A16F:
mov al, [rbp+var_1B]
test al, 1
jnz short loc_5A178
jmp short loc_5A1D9
loc_5A178:
mov rdi, [rbp+var_10]
movzx esi, [rbp+var_14]
call translog_get_total_chunk_length
mov [rbp+var_18], ax
movzx eax, ax
cmp eax, 0
jnz short loc_5A1A0
jmp short $+2
loc_5A193:
jmp short $+2
loc_5A195:
jmp short $+2
loc_5A197:
mov [rbp+var_1], 1
jmp loc_5A277
loc_5A1A0:
jmp short $+2
loc_5A1A2:
jmp short $+2
loc_5A1A4:
movzx eax, [rbp+var_14]
movzx ecx, [rbp+var_18]
add rax, rcx
cmp rax, 2000h
jbe short loc_5A1C6
jmp short $+2
loc_5A1B9:
jmp short $+2
loc_5A1BB:
jmp short $+2
loc_5A1BD:
mov [rbp+var_1], 1
jmp loc_5A277
loc_5A1C6:
movzx ecx, [rbp+var_18]
movzx eax, [rbp+var_14]
add eax, ecx
mov [rbp+var_14], ax
jmp loc_5A147
loc_5A1D9:
mov ax, [rbp+var_14]
mov [rbp+var_16], ax
loc_5A1E1:
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0FFh
jz short loc_5A249
mov rdi, [rbp+var_10]
movzx esi, [rbp+var_14]
call translog_get_total_chunk_length
mov [rbp+var_1A], ax
movzx eax, ax
cmp eax, 0
jnz short loc_5A20F
jmp short loc_5A249
loc_5A20F:
jmp short $+2
loc_5A211:
jmp short $+2
loc_5A213:
movzx eax, [rbp+var_14]
movzx ecx, [rbp+var_1A]
add rax, rcx
movzx ecx, [rbp+var_12]
add ecx, 200h
mov ecx, ecx
cmp rax, rcx
jbe short loc_5A231
jmp short loc_5A249
loc_5A231:
movzx ecx, [rbp+var_1A]
movzx eax, [rbp+var_14]
add eax, ecx
mov [rbp+var_14], ax
mov ax, [rbp+var_14]
mov [rbp+var_16], ax
jmp short loc_5A1E1
loc_5A249:
jmp short $+2
loc_5A24B:
jmp short $+2
loc_5A24D:
mov rdi, [rbp+var_10]
movzx eax, [rbp+var_16]
cdqe
add rdi, rax
movzx ecx, [rbp+var_16]
mov eax, 2000h
sub eax, ecx
mov eax, eax
mov edx, eax
mov esi, 0FFh
call _memset
mov [rbp+var_1], 0
loc_5A277:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char translog_recover_page_up_to_sector(long long a1, unsigned __int16 a2)
{
bool v3; // [rsp+5h] [rbp-1Bh]
unsigned __int16 v4; // [rsp+6h] [rbp-1Ah]
unsigned __int16 total_chunk_length; // [rsp+8h] [rbp-18h]
unsigned __int16 j; // [rsp+Ah] [rbp-16h]
unsigned __int16 i; // [rsp+Ch] [rbp-14h]
for ( i = translog_get_first_chunk_offset(a1); ; i += total_chunk_length )
{
v3 = 0;
if ( i < (int)a2 )
v3 = *(unsigned __int8 *)(a1 + i) != 255;
if ( !v3 )
break;
total_chunk_length = translog_get_total_chunk_length(a1, i);
if ( !total_chunk_length )
return 1;
if ( total_chunk_length + (unsigned long long)i > 0x2000 )
return 1;
}
for ( j = i; *(unsigned __int8 *)(a1 + i) != 255; j = i )
{
v4 = translog_get_total_chunk_length(a1, i);
if ( !v4 || v4 + (unsigned long long)i > (unsigned int)a2 + 512 )
break;
i += v4;
}
memset(j + a1, 255LL, 0x2000 - (unsigned int)j);
return 0;
}
|
translog_recover_page_up_to_sector:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AX,SI
MOV qword ptr [RBP + -0x10],RDI
MOV word ptr [RBP + -0x12],AX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00153aa0
MOVSX EAX,AL
MOV word ptr [RBP + -0x14],AX
JMP 0x0015a145
LAB_0015a145:
JMP 0x0015a147
LAB_0015a147:
MOVZX ECX,word ptr [RBP + -0x14]
MOVZX EDX,word ptr [RBP + -0x12]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x1b],AL
JGE 0x0015a16f
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xff
SETNZ AL
MOV byte ptr [RBP + -0x1b],AL
LAB_0015a16f:
MOV AL,byte ptr [RBP + -0x1b]
TEST AL,0x1
JNZ 0x0015a178
JMP 0x0015a1d9
LAB_0015a178:
MOV RDI,qword ptr [RBP + -0x10]
MOVZX ESI,word ptr [RBP + -0x14]
CALL 0x00153ad0
MOV word ptr [RBP + -0x18],AX
MOVZX EAX,AX
CMP EAX,0x0
JNZ 0x0015a1a0
JMP 0x0015a193
LAB_0015a193:
JMP 0x0015a195
LAB_0015a195:
JMP 0x0015a197
LAB_0015a197:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015a277
LAB_0015a1a0:
JMP 0x0015a1a2
LAB_0015a1a2:
JMP 0x0015a1a4
LAB_0015a1a4:
MOVZX EAX,word ptr [RBP + -0x14]
MOVZX ECX,word ptr [RBP + -0x18]
ADD RAX,RCX
CMP RAX,0x2000
JBE 0x0015a1c6
JMP 0x0015a1b9
LAB_0015a1b9:
JMP 0x0015a1bb
LAB_0015a1bb:
JMP 0x0015a1bd
LAB_0015a1bd:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015a277
LAB_0015a1c6:
MOVZX ECX,word ptr [RBP + -0x18]
MOVZX EAX,word ptr [RBP + -0x14]
ADD EAX,ECX
MOV word ptr [RBP + -0x14],AX
JMP 0x0015a147
LAB_0015a1d9:
MOV AX,word ptr [RBP + -0x14]
MOV word ptr [RBP + -0x16],AX
LAB_0015a1e1:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xff
JZ 0x0015a249
MOV RDI,qword ptr [RBP + -0x10]
MOVZX ESI,word ptr [RBP + -0x14]
CALL 0x00153ad0
MOV word ptr [RBP + -0x1a],AX
MOVZX EAX,AX
CMP EAX,0x0
JNZ 0x0015a20f
JMP 0x0015a249
LAB_0015a20f:
JMP 0x0015a211
LAB_0015a211:
JMP 0x0015a213
LAB_0015a213:
MOVZX EAX,word ptr [RBP + -0x14]
MOVZX ECX,word ptr [RBP + -0x1a]
ADD RAX,RCX
MOVZX ECX,word ptr [RBP + -0x12]
ADD ECX,0x200
MOV ECX,ECX
CMP RAX,RCX
JBE 0x0015a231
JMP 0x0015a249
LAB_0015a231:
MOVZX ECX,word ptr [RBP + -0x1a]
MOVZX EAX,word ptr [RBP + -0x14]
ADD EAX,ECX
MOV word ptr [RBP + -0x14],AX
MOV AX,word ptr [RBP + -0x14]
MOV word ptr [RBP + -0x16],AX
JMP 0x0015a1e1
LAB_0015a249:
JMP 0x0015a24b
LAB_0015a24b:
JMP 0x0015a24d
LAB_0015a24d:
MOV RDI,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RBP + -0x16]
CDQE
ADD RDI,RAX
MOVZX ECX,word ptr [RBP + -0x16]
MOV EAX,0x2000
SUB EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
MOV ESI,0xff
CALL 0x0012a2c0
MOV byte ptr [RBP + -0x1],0x0
LAB_0015a277:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 translog_recover_page_up_to_sector(long param_1,ushort param_2)
{
char cVar1;
ushort uVar2;
bool bVar3;
ushort local_1c;
cVar1 = translog_get_first_chunk_offset(param_1);
local_1c = (ushort)cVar1;
while( true ) {
bVar3 = false;
if (local_1c < param_2) {
bVar3 = *(char *)(param_1 + (ulong)local_1c) != -1;
}
if (!bVar3) {
for (; ((*(char *)(param_1 + (ulong)local_1c) != -1 &&
(uVar2 = translog_get_total_chunk_length(param_1,local_1c), uVar2 != 0)) &&
((uint)local_1c + (uint)uVar2 <= param_2 + 0x200)); local_1c = local_1c + uVar2) {
}
memset((void *)(param_1 + (int)(uint)local_1c),0xff,(ulong)(0x2000 - local_1c));
return 0;
}
uVar2 = translog_get_total_chunk_length(param_1,local_1c);
if (uVar2 == 0) {
return 1;
}
if (0x2000 < (ulong)local_1c + (ulong)uVar2) break;
local_1c = local_1c + uVar2;
}
return 1;
}
|
|
61,211
|
js_os_setReadHandler
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_setReadHandler(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSOSRWHandler *rh;
int fd;
JSValue func;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
func = argv[1];
if (JS_IsNull(func)) {
rh = find_rh(ts, fd);
if (rh) {
JS_FreeValue(ctx, rh->rw_func[magic]);
rh->rw_func[magic] = JS_NULL;
if (JS_IsNull(rh->rw_func[0]) &&
JS_IsNull(rh->rw_func[1])) {
/* remove the entry */
free_rw_handler(JS_GetRuntime(ctx), rh);
}
}
} else {
if (!JS_IsFunction(ctx, func))
return JS_ThrowTypeError(ctx, "not a function");
rh = find_rh(ts, fd);
if (!rh) {
rh = js_mallocz(ctx, sizeof(*rh));
if (!rh)
return JS_EXCEPTION;
rh->fd = fd;
rh->rw_func[0] = JS_NULL;
rh->rw_func[1] = JS_NULL;
list_add_tail(&rh->link, &ts->os_rw_handlers);
}
JS_FreeValue(ctx, rh->rw_func[magic]);
rh->rw_func[magic] = JS_DupValue(ctx, func);
}
return JS_UNDEFINED;
}
|
O1
|
c
|
js_os_setReadHandler:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movq %r8, %r15
movq %rdi, %rbx
callq 0x23dda
xorl %r13d, %r13d
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3e64f
movq %rax, %rbp
movq (%r15), %rdx
movq 0x8(%r15), %rcx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ba0c
movl $0x6, %r14d
testl %eax, %eax
jne 0x1cfed
movl %r12d, 0xc(%rsp)
movq 0x18(%r15), %r12
cmpl $0x2, %r12d
jne 0x1ce8a
movl 0x8(%rsp), %eax
movq %rbp, %r15
movl 0xc(%rsp), %ecx
movq 0x8(%r15), %r15
cmpq %rbp, %r15
je 0x1cec3
cmpl %eax, 0x10(%r15)
jne 0x1ce79
jmp 0x1cec6
movq 0x10(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x26e1a
testl %eax, %eax
je 0x1cf2e
movl 0x8(%rsp), %eax
movq %rbp, %r15
movq 0x8(%r15), %r15
cmpq %rbp, %r15
je 0x1cf57
cmpl %eax, 0x10(%r15)
jne 0x1ceab
jmp 0x1cf5a
xorl %r15d, %r15d
movl $0x3, %r14d
testq %r15, %r15
je 0x1cfea
movslq %ecx, %r12
shlq $0x4, %r12
movq 0x18(%r15,%r12), %rsi
movq 0x20(%r15,%r12), %rdx
movq %rbx, %rdi
callq 0x2190f
movl $0x0, 0x18(%r15,%r12)
movq $0x2, 0x20(%r15,%r12)
cmpl $0x2, 0x20(%r15)
jne 0x1cfea
cmpl $0x2, 0x30(%r15)
jne 0x1cfea
movq %rbx, %rdi
callq 0x23dda
movq %rax, %rdi
movq %r15, %rsi
callq 0x19369
jmp 0x1cfea
leaq 0x875f9(%rip), %rsi # 0xa452e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x265c3
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r13d
jmp 0x1cfef
xorl %r15d, %r15d
testq %r15, %r15
jne 0x1cfb1
movq %r13, 0x10(%rsp)
movl $0x38, %esi
movq %rbx, %rdi
callq 0xf0a2
xorl %r13d, %r13d
testq %rax, %rax
je 0x1cfed
movq %rax, %r15
movl 0x8(%rsp), %eax
movl %eax, 0x10(%r15)
movl %r13d, 0x18(%r15)
movl $0x2, %eax
movq %rax, 0x20(%r15)
movl %r13d, 0x28(%r15)
movq %rax, 0x30(%r15)
movq (%rbp), %rax
movq %r15, 0x8(%rax)
movq %rax, (%r15)
movq %rbp, 0x8(%r15)
movq %r15, (%rbp)
movq 0x10(%rsp), %r13
movslq 0xc(%rsp), %r14
shlq $0x4, %r14
movq 0x18(%r15,%r14), %rsi
movq 0x20(%r15,%r14), %rdx
movq %rbx, %rdi
callq 0x2190f
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20ab6
movq %rax, 0x18(%r15,%r14)
movq %rdx, 0x20(%r15,%r14)
movl $0x3, %r14d
xorl %r13d, %r13d
xorl %ecx, %ecx
orq %rcx, %r13
movq %r13, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_os_setReadHandler:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12d, r9d
mov r15, r8
mov rbx, rdi
call JS_GetRuntime
xor r13d, r13d
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
mov rbp, rax
mov rdx, [r15]
mov rcx, [r15+8]
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call JS_ToInt32
mov r14d, 6
test eax, eax
jnz loc_1CFED
mov [rsp+48h+var_3C], r12d
mov r12, [r15+18h]
cmp r12d, 2
jnz short loc_1CE8A
mov eax, [rsp+48h+var_40]
mov r15, rbp
mov ecx, [rsp+48h+var_3C]
loc_1CE79:
mov r15, [r15+8]
cmp r15, rbp
jz short loc_1CEC3
cmp [r15+10h], eax
jnz short loc_1CE79
jmp short loc_1CEC6
loc_1CE8A:
mov r13, [r15+10h]
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_IsFunction
test eax, eax
jz loc_1CF2E
mov eax, [rsp+48h+var_40]
mov r15, rbp
loc_1CEAB:
mov r15, [r15+8]
cmp r15, rbp
jz loc_1CF57
cmp [r15+10h], eax
jnz short loc_1CEAB
jmp loc_1CF5A
loc_1CEC3:
xor r15d, r15d
loc_1CEC6:
mov r14d, 3
test r15, r15
jz loc_1CFEA
movsxd r12, ecx
shl r12, 4
mov rsi, [r15+r12+18h]
mov rdx, [r15+r12+20h]
mov rdi, rbx
call JS_FreeValue
mov dword ptr [r15+r12+18h], 0
mov qword ptr [r15+r12+20h], 2
cmp dword ptr [r15+20h], 2
jnz loc_1CFEA
cmp dword ptr [r15+30h], 2
jnz loc_1CFEA
mov rdi, rbx
call JS_GetRuntime
mov rdi, rax
mov rsi, r15
call free_rw_handler
jmp loc_1CFEA
loc_1CF2E:
lea rsi, aSetAddIsNotAFu+0Bh; "not a function"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r13d, eax
jmp loc_1CFEF
loc_1CF57:
xor r15d, r15d
loc_1CF5A:
test r15, r15
jnz short loc_1CFB1
mov [rsp+48h+var_38], r13
mov esi, 38h ; '8'
mov rdi, rbx
call js_mallocz
xor r13d, r13d
test rax, rax
jz short loc_1CFED
mov r15, rax
mov eax, [rsp+48h+var_40]
mov [r15+10h], eax
mov [r15+18h], r13d
mov eax, 2
mov [r15+20h], rax
mov [r15+28h], r13d
mov [r15+30h], rax
mov rax, [rbp+0]
mov [rax+8], r15
mov [r15], rax
mov [r15+8], rbp
mov [rbp+0], r15
mov r13, [rsp+48h+var_38]
loc_1CFB1:
movsxd r14, [rsp+48h+var_3C]
shl r14, 4
mov rsi, [r15+r14+18h]
mov rdx, [r15+r14+20h]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_DupValue
mov [r15+r14+18h], rax
mov [r15+r14+20h], rdx
mov r14d, 3
loc_1CFEA:
xor r13d, r13d
loc_1CFED:
xor ecx, ecx
loc_1CFEF:
or r13, rcx
mov rax, r13
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_os_setReadHandler(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6)
{
int Runtime; // eax
long long v9; // r13
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
_QWORD *v14; // rbp
long long v15; // r12
_QWORD *v16; // r15
long long v17; // r13
int v18; // edx
int v19; // ecx
int v20; // r8d
int v21; // r9d
_QWORD *v22; // r15
long long v23; // r12
long long v24; // rsi
long long v25; // rdx
long long v26; // rcx
long long v27; // rax
long long v28; // rax
unsigned long long v29; // rcx
long long v30; // rax
long long v31; // rax
long long v32; // r14
long long v33; // rdx
int v35; // [rsp+8h] [rbp-40h] BYREF
int v36; // [rsp+Ch] [rbp-3Ch]
long long v37; // [rsp+10h] [rbp-38h]
Runtime = JS_GetRuntime(a1, a2, a3, a4);
v9 = 0LL;
v14 = (_QWORD *)js_std_cmd(0, Runtime, v10, v11, v12, v13);
if ( (unsigned int)JS_ToInt32(a1, &v35, *a5, a5[1]) )
goto LABEL_24;
v36 = a6;
v15 = a5[3];
if ( (_DWORD)v15 == 2 )
{
v16 = v14;
while ( 1 )
{
v16 = (_QWORD *)v16[1];
if ( v16 == v14 )
break;
if ( *((_DWORD *)v16 + 4) == v35 )
goto LABEL_13;
}
v16 = 0LL;
LABEL_13:
if ( v16 )
{
v23 = 2LL * v36;
v24 = v16[v23 + 3];
JS_FreeValue(a1, v24);
LODWORD(v16[v23 + 3]) = 0;
v16[v23 + 4] = 2LL;
if ( *((_DWORD *)v16 + 8) == 2 && *((_DWORD *)v16 + 12) == 2 )
{
v27 = JS_GetRuntime(a1, v24, v25, v26);
free_rw_handler(v27, v16);
}
}
goto LABEL_23;
}
v17 = a5[2];
if ( (unsigned int)JS_IsFunction(a1, v17, a5[3]) )
{
v22 = v14;
while ( 1 )
{
v22 = (_QWORD *)v22[1];
if ( v22 == v14 )
break;
if ( *((_DWORD *)v22 + 4) == v35 )
goto LABEL_19;
}
v22 = 0LL;
LABEL_19:
if ( !v22 )
{
v37 = v17;
v30 = js_mallocz(a1, 0x38uLL);
v9 = 0LL;
if ( !v30 )
{
LABEL_24:
v29 = 0LL;
return v29 | v9;
}
v22 = (_QWORD *)v30;
*(_DWORD *)(v30 + 16) = v35;
*(_DWORD *)(v30 + 24) = 0;
*(_QWORD *)(v30 + 32) = 2LL;
*(_DWORD *)(v30 + 40) = 0;
*(_QWORD *)(v30 + 48) = 2LL;
v31 = *v14;
*(_QWORD *)(v31 + 8) = v22;
*v22 = v31;
v22[1] = v14;
*v14 = v22;
v17 = v37;
}
v32 = 2LL * v36;
JS_FreeValue(a1, v22[v32 + 3]);
v22[v32 + 3] = JS_DupValue(a1, v17, v15);
v22[v32 + 4] = v33;
LABEL_23:
v9 = 0LL;
goto LABEL_24;
}
v28 = JS_ThrowTypeError(a1, (unsigned int)"not a function", v18, v19, v20, v21);
v29 = v28 & 0xFFFFFFFF00000000LL;
v9 = (unsigned int)v28;
return v29 | v9;
}
|
js_os_setReadHandler:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12D,R9D
MOV R15,R8
MOV RBX,RDI
CALL 0x00123dda
XOR R13D,R13D
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0013e64f
MOV RBP,RAX
MOV RDX,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0012ba0c
MOV R14D,0x6
TEST EAX,EAX
JNZ 0x0011cfed
MOV dword ptr [RSP + 0xc],R12D
MOV R12,qword ptr [R15 + 0x18]
CMP R12D,0x2
JNZ 0x0011ce8a
MOV EAX,dword ptr [RSP + 0x8]
MOV R15,RBP
MOV ECX,dword ptr [RSP + 0xc]
LAB_0011ce79:
MOV R15,qword ptr [R15 + 0x8]
CMP R15,RBP
JZ 0x0011cec3
CMP dword ptr [R15 + 0x10],EAX
JNZ 0x0011ce79
JMP 0x0011cec6
LAB_0011ce8a:
MOV R13,qword ptr [R15 + 0x10]
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00126e1a
TEST EAX,EAX
JZ 0x0011cf2e
MOV EAX,dword ptr [RSP + 0x8]
MOV R15,RBP
LAB_0011ceab:
MOV R15,qword ptr [R15 + 0x8]
CMP R15,RBP
JZ 0x0011cf57
CMP dword ptr [R15 + 0x10],EAX
JNZ 0x0011ceab
JMP 0x0011cf5a
LAB_0011cec3:
XOR R15D,R15D
LAB_0011cec6:
MOV R14D,0x3
TEST R15,R15
JZ 0x0011cfea
MOVSXD R12,ECX
SHL R12,0x4
MOV RSI,qword ptr [R15 + R12*0x1 + 0x18]
MOV RDX,qword ptr [R15 + R12*0x1 + 0x20]
MOV RDI,RBX
CALL 0x0012190f
MOV dword ptr [R15 + R12*0x1 + 0x18],0x0
MOV qword ptr [R15 + R12*0x1 + 0x20],0x2
CMP dword ptr [R15 + 0x20],0x2
JNZ 0x0011cfea
CMP dword ptr [R15 + 0x30],0x2
JNZ 0x0011cfea
MOV RDI,RBX
CALL 0x00123dda
MOV RDI,RAX
MOV RSI,R15
CALL 0x00119369
JMP 0x0011cfea
LAB_0011cf2e:
LEA RSI,[0x1a452e]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001265c3
MOV R14,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV R13D,EAX
JMP 0x0011cfef
LAB_0011cf57:
XOR R15D,R15D
LAB_0011cf5a:
TEST R15,R15
JNZ 0x0011cfb1
MOV qword ptr [RSP + 0x10],R13
MOV ESI,0x38
MOV RDI,RBX
CALL 0x0010f0a2
XOR R13D,R13D
TEST RAX,RAX
JZ 0x0011cfed
MOV R15,RAX
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [R15 + 0x10],EAX
MOV dword ptr [R15 + 0x18],R13D
MOV EAX,0x2
MOV qword ptr [R15 + 0x20],RAX
MOV dword ptr [R15 + 0x28],R13D
MOV qword ptr [R15 + 0x30],RAX
MOV RAX,qword ptr [RBP]
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [R15],RAX
MOV qword ptr [R15 + 0x8],RBP
MOV qword ptr [RBP],R15
MOV R13,qword ptr [RSP + 0x10]
LAB_0011cfb1:
MOVSXD R14,dword ptr [RSP + 0xc]
SHL R14,0x4
MOV RSI,qword ptr [R15 + R14*0x1 + 0x18]
MOV RDX,qword ptr [R15 + R14*0x1 + 0x20]
MOV RDI,RBX
CALL 0x0012190f
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00120ab6
MOV qword ptr [R15 + R14*0x1 + 0x18],RAX
MOV qword ptr [R15 + R14*0x1 + 0x20],RDX
MOV R14D,0x3
LAB_0011cfea:
XOR R13D,R13D
LAB_0011cfed:
XOR ECX,ECX
LAB_0011cfef:
OR R13,RCX
MOV RAX,R13
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_os_setReadHandler(int8 param_1)
{
int8 uVar1;
int iVar2;
int8 uVar3;
long *plVar4;
long *plVar5;
ulong uVar6;
int8 *in_R8;
int in_R9D;
long lVar7;
ulong uVar8;
int8 uVar9;
int1 auVar10 [16];
int local_40;
int local_3c;
int8 local_38;
uVar3 = JS_GetRuntime();
plVar4 = (long *)js_std_cmd(0,uVar3);
iVar2 = JS_ToInt32(param_1,&local_40,*in_R8,in_R8[1]);
uVar3 = 6;
if (iVar2 == 0) {
uVar1 = in_R8[3];
plVar5 = plVar4;
local_3c = in_R9D;
if ((int)uVar1 == 2) {
do {
plVar5 = (long *)plVar5[1];
if (plVar5 == plVar4) {
plVar5 = (long *)0x0;
break;
}
} while ((int)plVar5[2] != local_40);
if (plVar5 != (long *)0x0) {
lVar7 = (long)in_R9D;
JS_FreeValue(param_1,plVar5[lVar7 * 2 + 3],plVar5[lVar7 * 2 + 4]);
*(int4 *)(plVar5 + lVar7 * 2 + 3) = 0;
plVar5[lVar7 * 2 + 4] = 2;
if (((int)plVar5[4] == 2) && ((int)plVar5[6] == 2)) {
uVar3 = JS_GetRuntime(param_1);
free_rw_handler(uVar3,plVar5);
}
}
}
else {
uVar9 = in_R8[2];
iVar2 = JS_IsFunction(param_1,uVar9,uVar1);
if (iVar2 == 0) {
auVar10 = JS_ThrowTypeError(param_1,"not a function");
uVar3 = auVar10._8_8_;
uVar6 = auVar10._0_8_ & 0xffffffff00000000;
uVar8 = auVar10._0_8_ & 0xffffffff;
goto LAB_0011cfef;
}
do {
plVar5 = (long *)plVar5[1];
if (plVar5 == plVar4) {
plVar5 = (long *)0x0;
break;
}
} while ((int)plVar5[2] != local_40);
if (plVar5 == (long *)0x0) {
local_38 = uVar9;
plVar5 = (long *)js_mallocz(param_1,0x38);
if (plVar5 == (long *)0x0) goto LAB_0011cfed;
*(int *)(plVar5 + 2) = local_40;
*(int4 *)(plVar5 + 3) = 0;
plVar5[4] = 2;
*(int4 *)(plVar5 + 5) = 0;
plVar5[6] = 2;
lVar7 = *plVar4;
*(long **)(lVar7 + 8) = plVar5;
*plVar5 = lVar7;
plVar5[1] = (long)plVar4;
*plVar4 = (long)plVar5;
uVar9 = local_38;
}
lVar7 = (long)local_3c;
JS_FreeValue(param_1,plVar5[lVar7 * 2 + 3],plVar5[lVar7 * 2 + 4]);
auVar10 = JS_DupValue(param_1,uVar9,uVar1);
plVar5[lVar7 * 2 + 3] = auVar10._0_8_;
plVar5[lVar7 * 2 + 4] = auVar10._8_8_;
}
uVar3 = 3;
}
LAB_0011cfed:
uVar8 = 0;
uVar6 = 0;
LAB_0011cfef:
auVar10._8_8_ = uVar3;
auVar10._0_8_ = uVar8 | uVar6;
return auVar10;
}
|
|
61,212
|
js_os_setReadHandler
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_setReadHandler(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSOSRWHandler *rh;
int fd;
JSValue func;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
func = argv[1];
if (JS_IsNull(func)) {
rh = find_rh(ts, fd);
if (rh) {
JS_FreeValue(ctx, rh->rw_func[magic]);
rh->rw_func[magic] = JS_NULL;
if (JS_IsNull(rh->rw_func[0]) &&
JS_IsNull(rh->rw_func[1])) {
/* remove the entry */
free_rw_handler(JS_GetRuntime(ctx), rh);
}
}
} else {
if (!JS_IsFunction(ctx, func))
return JS_ThrowTypeError(ctx, "not a function");
rh = find_rh(ts, fd);
if (!rh) {
rh = js_mallocz(ctx, sizeof(*rh));
if (!rh)
return JS_EXCEPTION;
rh->fd = fd;
rh->rw_func[0] = JS_NULL;
rh->rw_func[1] = JS_NULL;
list_add_tail(&rh->link, &ts->os_rw_handlers);
}
JS_FreeValue(ctx, rh->rw_func[magic]);
rh->rw_func[magic] = JS_DupValue(ctx, func);
}
return JS_UNDEFINED;
}
|
O2
|
c
|
js_os_setReadHandler:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %r8, %r13
movq %rdi, %r14
callq 0x1dd35
movq %rax, %rdi
callq 0x13e3a
movq %rax, %r15
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x25187
pushq $0x6
popq %rbx
testl %eax, %eax
je 0x1762a
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r13), %r12
cmpl $0x2, %r12d
jne 0x17699
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0x19314
pushq $0x3
popq %rbx
testq %rax, %rax
je 0x17611
movq %rax, %r15
movslq %ebp, %r12
shlq $0x4, %r12
movq 0x18(%rax,%r12), %rsi
movq 0x20(%rax,%r12), %rdx
movq %r14, %rdi
callq 0x1bbce
andl $0x0, 0x18(%r15,%r12)
movq $0x2, 0x20(%r15,%r12)
cmpl $0x2, 0x20(%r15)
jne 0x17611
cmpl $0x2, 0x30(%r15)
jne 0x17611
movq %r14, %rdi
callq 0x1dd35
movq %rax, %rdi
movq %r15, %rsi
callq 0x13e46
jmp 0x17611
movq 0x10(%r13), %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20a2d
testl %eax, %eax
je 0x1774d
movq %r13, 0x10(%rsp)
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0x19314
movq %rax, %r13
testq %rax, %rax
jne 0x17712
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x1adf1
testq %rax, %rax
je 0x17611
movq %rax, %r13
movl 0xc(%rsp), %eax
movl %eax, 0x10(%r13)
andl $0x0, 0x18(%r13)
pushq $0x2
popq %rax
movq %rax, 0x20(%r13)
andl $0x0, 0x28(%r13)
movq %rax, 0x30(%r13)
movq (%r15), %rax
movq %r13, 0x8(%rax)
movq %rax, (%r13)
movq %r15, 0x8(%r13)
movq %r13, (%r15)
movslq %ebp, %rbx
shlq $0x4, %rbx
movq 0x18(%r13,%rbx), %rsi
movq 0x20(%r13,%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x1abab
movq %rax, 0x18(%r13,%rbx)
movq %rdx, 0x20(%r13,%rbx)
pushq $0x3
popq %rbx
jmp 0x17611
leaq 0x72d14(%rip), %rsi # 0x8a468
movq %r14, %rdi
xorl %eax, %eax
callq 0x201fd
movq %rdx, %rbx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
jmp 0x17615
|
js_os_setReadHandler:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r9d
mov r13, r8
mov r14, rdi
call JS_GetRuntime
mov rdi, rax
call js_get_thread_state
mov r15, rax
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+48h+var_3C]
mov rdi, r14
call JS_ToInt32
push 6
pop rbx
test eax, eax
jz short loc_1762A
loc_17611:
xor eax, eax
xor ecx, ecx
loc_17615:
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1762A:
mov r12, [r13+18h]
cmp r12d, 2
jnz short loc_17699
mov esi, [rsp+48h+var_3C]
mov rdi, r15
call find_rh
push 3
pop rbx
test rax, rax
jz short loc_17611
mov r15, rax
movsxd r12, ebp
shl r12, 4
mov rsi, [rax+r12+18h]
mov rdx, [rax+r12+20h]
mov rdi, r14
call JS_FreeValue
and dword ptr [r15+r12+18h], 0
mov qword ptr [r15+r12+20h], 2
cmp dword ptr [r15+20h], 2
jnz short loc_17611
cmp dword ptr [r15+30h], 2
jnz short loc_17611
mov rdi, r14
call JS_GetRuntime
mov rdi, rax
mov rsi, r15
call free_rw_handler
jmp loc_17611
loc_17699:
mov r13, [r13+10h]
mov rdi, r14
mov rsi, r13
mov rdx, r12
call JS_IsFunction
test eax, eax
jz loc_1774D
mov [rsp+48h+var_38], r13
mov esi, [rsp+48h+var_3C]
mov rdi, r15
call find_rh
mov r13, rax
test rax, rax
jnz short loc_17712
push 38h ; '8'
pop rsi
mov rdi, r14
call js_mallocz
test rax, rax
jz loc_17611
mov r13, rax
mov eax, [rsp+48h+var_3C]
mov [r13+10h], eax
and dword ptr [r13+18h], 0
push 2
pop rax
mov [r13+20h], rax
and dword ptr [r13+28h], 0
mov [r13+30h], rax
mov rax, [r15]
mov [rax+8], r13
mov [r13+0], rax
mov [r13+8], r15
mov [r15], r13
loc_17712:
movsxd rbx, ebp
shl rbx, 4
mov rsi, [r13+rbx+18h]
mov rdx, [r13+rbx+20h]
mov rdi, r14
call JS_FreeValue
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov rdx, r12
call JS_DupValue
mov [r13+rbx+18h], rax
mov [r13+rbx+20h], rdx
push 3
pop rbx
jmp loc_17611
loc_1774D:
lea rsi, aSetAddIsNotAFu+0Bh; "not a function"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov rbx, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov eax, eax
jmp loc_17615
|
unsigned long long js_os_setReadHandler(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6)
{
int Runtime; // eax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long *thread_state; // r15
long long v14; // rax
unsigned long long v15; // rcx
long long v17; // r12
long long rh; // rax
long long v19; // r15
long long v20; // r12
long long v21; // rax
long long v22; // r13
int v23; // edx
int v24; // ecx
int v25; // r8d
int v26; // r9d
_QWORD *v27; // r13
long long v28; // rax
long long v29; // rax
long long v30; // rbx
long long v31; // rdx
char v32; // [rsp+0h] [rbp-48h]
unsigned int v33; // [rsp+Ch] [rbp-3Ch] BYREF
long long v34; // [rsp+10h] [rbp-38h]
Runtime = JS_GetRuntime(a1);
thread_state = (long long *)js_get_thread_state(Runtime, a2, v9, v10, v11, v12, v32);
if ( (unsigned int)JS_ToInt32(a1, &v33, *a5, a5[1]) )
goto LABEL_2;
v17 = a5[3];
if ( (_DWORD)v17 == 2 )
{
rh = find_rh(thread_state, v33);
if ( rh )
{
v19 = rh;
v20 = 16LL * a6;
JS_FreeValue(a1, *(_QWORD *)(rh + v20 + 24));
*(_DWORD *)(v19 + v20 + 24) = 0;
*(_QWORD *)(v19 + v20 + 32) = 2LL;
if ( *(_DWORD *)(v19 + 32) == 2 && *(_DWORD *)(v19 + 48) == 2 )
{
v21 = JS_GetRuntime(a1);
free_rw_handler(v21, (long long *)v19);
}
}
goto LABEL_2;
}
v22 = a5[2];
if ( !(unsigned int)JS_IsFunction(a1, v22, v17) )
{
v14 = JS_ThrowTypeError(a1, (unsigned int)"not a function", v23, v24, v25, v26);
v15 = v14 & 0xFFFFFFFF00000000LL;
v14 = (unsigned int)v14;
return v15 | v14;
}
v34 = v22;
v27 = (_QWORD *)find_rh(thread_state, v33);
if ( v27 )
goto LABEL_13;
v28 = js_mallocz(a1, 56LL);
if ( v28 )
{
v27 = (_QWORD *)v28;
*(_DWORD *)(v28 + 16) = v33;
*(_DWORD *)(v28 + 24) = 0;
*(_QWORD *)(v28 + 32) = 2LL;
*(_DWORD *)(v28 + 40) = 0;
*(_QWORD *)(v28 + 48) = 2LL;
v29 = *thread_state;
*(_QWORD *)(v29 + 8) = v27;
*v27 = v29;
v27[1] = thread_state;
*thread_state = (long long)v27;
LABEL_13:
v30 = 2LL * a6;
JS_FreeValue(a1, v27[v30 + 3]);
v27[v30 + 3] = JS_DupValue(a1, v34, v17);
v27[v30 + 4] = v31;
}
LABEL_2:
v14 = 0LL;
v15 = 0LL;
return v15 | v14;
}
|
js_os_setReadHandler:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R9D
MOV R13,R8
MOV R14,RDI
CALL 0x0011dd35
MOV RDI,RAX
CALL 0x00113e3a
MOV R15,RAX
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0xc]
MOV RDI,R14
CALL 0x00125187
PUSH 0x6
POP RBX
TEST EAX,EAX
JZ 0x0011762a
LAB_00117611:
XOR EAX,EAX
XOR ECX,ECX
LAB_00117615:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011762a:
MOV R12,qword ptr [R13 + 0x18]
CMP R12D,0x2
JNZ 0x00117699
MOV ESI,dword ptr [RSP + 0xc]
MOV RDI,R15
CALL 0x00119314
PUSH 0x3
POP RBX
TEST RAX,RAX
JZ 0x00117611
MOV R15,RAX
MOVSXD R12,EBP
SHL R12,0x4
MOV RSI,qword ptr [RAX + R12*0x1 + 0x18]
MOV RDX,qword ptr [RAX + R12*0x1 + 0x20]
MOV RDI,R14
CALL 0x0011bbce
AND dword ptr [R15 + R12*0x1 + 0x18],0x0
MOV qword ptr [R15 + R12*0x1 + 0x20],0x2
CMP dword ptr [R15 + 0x20],0x2
JNZ 0x00117611
CMP dword ptr [R15 + 0x30],0x2
JNZ 0x00117611
MOV RDI,R14
CALL 0x0011dd35
MOV RDI,RAX
MOV RSI,R15
CALL 0x00113e46
JMP 0x00117611
LAB_00117699:
MOV R13,qword ptr [R13 + 0x10]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
CALL 0x00120a2d
TEST EAX,EAX
JZ 0x0011774d
MOV qword ptr [RSP + 0x10],R13
MOV ESI,dword ptr [RSP + 0xc]
MOV RDI,R15
CALL 0x00119314
MOV R13,RAX
TEST RAX,RAX
JNZ 0x00117712
PUSH 0x38
POP RSI
MOV RDI,R14
CALL 0x0011adf1
TEST RAX,RAX
JZ 0x00117611
MOV R13,RAX
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R13 + 0x10],EAX
AND dword ptr [R13 + 0x18],0x0
PUSH 0x2
POP RAX
MOV qword ptr [R13 + 0x20],RAX
AND dword ptr [R13 + 0x28],0x0
MOV qword ptr [R13 + 0x30],RAX
MOV RAX,qword ptr [R15]
MOV qword ptr [RAX + 0x8],R13
MOV qword ptr [R13],RAX
MOV qword ptr [R13 + 0x8],R15
MOV qword ptr [R15],R13
LAB_00117712:
MOVSXD RBX,EBP
SHL RBX,0x4
MOV RSI,qword ptr [R13 + RBX*0x1 + 0x18]
MOV RDX,qword ptr [R13 + RBX*0x1 + 0x20]
MOV RDI,R14
CALL 0x0011bbce
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R12
CALL 0x0011abab
MOV qword ptr [R13 + RBX*0x1 + 0x18],RAX
MOV qword ptr [R13 + RBX*0x1 + 0x20],RDX
PUSH 0x3
POP RBX
JMP 0x00117611
LAB_0011774d:
LEA RSI,[0x18a468]
MOV RDI,R14
XOR EAX,EAX
CALL 0x001201fd
MOV RBX,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV EAX,EAX
JMP 0x00117615
|
int1 [16] js_os_setReadHandler(int8 param_1)
{
int8 uVar1;
int iVar2;
int8 uVar3;
long *plVar4;
ulong uVar5;
long lVar6;
long *plVar7;
ulong uVar8;
int8 *in_R8;
int in_R9D;
long lVar9;
int1 auVar10 [16];
int8 uStack_50;
int4 local_3c;
int8 local_38;
uVar3 = JS_GetRuntime();
plVar4 = (long *)js_get_thread_state(uVar3);
iVar2 = JS_ToInt32(param_1,&local_3c,*in_R8,in_R8[1]);
uStack_50 = 6;
if (iVar2 == 0) {
uVar3 = in_R8[3];
if ((int)uVar3 == 2) {
lVar6 = find_rh(plVar4,local_3c);
uStack_50 = 3;
uVar3 = 3;
if (lVar6 != 0) {
lVar9 = (long)in_R9D * 0x10;
JS_FreeValue(param_1,*(int8 *)(lVar6 + 0x18 + lVar9),
*(int8 *)(lVar6 + 0x20 + lVar9));
*(int4 *)(lVar6 + 0x18 + lVar9) = 0;
*(int8 *)(lVar6 + 0x20 + lVar9) = 2;
uStack_50 = uVar3;
if ((*(int *)(lVar6 + 0x20) == 2) && (*(int *)(lVar6 + 0x30) == 2)) {
uVar3 = JS_GetRuntime(param_1);
free_rw_handler(uVar3,lVar6);
}
}
}
else {
uVar1 = in_R8[2];
iVar2 = JS_IsFunction(param_1,uVar1,uVar3);
if (iVar2 == 0) {
auVar10 = JS_ThrowTypeError(param_1,"not a function");
uStack_50 = auVar10._8_8_;
uVar8 = auVar10._0_8_ & 0xffffffff00000000;
uVar5 = auVar10._0_8_ & 0xffffffff;
goto LAB_00117615;
}
local_38 = uVar1;
plVar7 = (long *)find_rh(plVar4,local_3c);
if (plVar7 == (long *)0x0) {
plVar7 = (long *)js_mallocz(param_1,0x38);
if (plVar7 == (long *)0x0) goto LAB_00117611;
*(int4 *)(plVar7 + 2) = local_3c;
*(int4 *)(plVar7 + 3) = 0;
plVar7[4] = 2;
*(int4 *)(plVar7 + 5) = 0;
plVar7[6] = 2;
lVar6 = *plVar4;
*(long **)(lVar6 + 8) = plVar7;
*plVar7 = lVar6;
plVar7[1] = (long)plVar4;
*plVar4 = (long)plVar7;
}
lVar6 = (long)in_R9D;
JS_FreeValue(param_1,plVar7[lVar6 * 2 + 3],plVar7[lVar6 * 2 + 4]);
auVar10 = JS_DupValue(param_1,local_38,uVar3);
plVar7[lVar6 * 2 + 3] = auVar10._0_8_;
plVar7[lVar6 * 2 + 4] = auVar10._8_8_;
uStack_50 = 3;
}
}
LAB_00117611:
uVar5 = 0;
uVar8 = 0;
LAB_00117615:
auVar10._0_8_ = uVar5 | uVar8;
auVar10._8_8_ = uStack_50;
return auVar10;
}
|
|
61,213
|
LefDefParser::lefiMaxStackVia::setMaxStackViaRange(char const*, char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
|
void
lefiMaxStackVia::setMaxStackViaRange(const char *bottomLayer,
const char *topLayer)
{
hasRange_ = 1;
if (bottomLayer_) // May be lefrReset is called and
lefFree(bottomLayer_); // bottomLayer_ and/or topLayer_ have
if (topLayer_) // value malloc on them
lefFree(topLayer_);
bottomLayer_ = (char*) lefMalloc(strlen(bottomLayer) + 1);
strcpy(bottomLayer_, CASE(bottomLayer));
topLayer_ = (char*) lefMalloc(strlen(topLayer) + 1);
strcpy(topLayer_, CASE(topLayer));
//bottomLayer_ = strdup(bottomLayer);
//topLayer_ = strdup(topLayer);
}
|
O3
|
cpp
|
LefDefParser::lefiMaxStackVia::setMaxStackViaRange(char const*, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, 0x4(%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xdd38
callq 0x322d0
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xdd46
callq 0x322d0
movq %r15, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x30c15
movq %rax, %r12
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0x33e9a
movq %r12, %rdi
movq %rax, %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x30c15
movq %rax, %r15
movq %rax, 0x10(%r14)
movq %rbx, %rdi
callq 0x33e9a
movq %r15, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21d0
nop
|
_ZN12LefDefParser15lefiMaxStackVia19setMaxStackViaRangeEPKcS2_:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov dword ptr [rdi+4], 1
mov rdi, [rdi+8]; this
test rdi, rdi
jz short loc_DD38
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_DD38:
mov rdi, [r14+10h]; this
test rdi, rdi
jz short loc_DD46
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_DD46:
mov rdi, r15
call _strlen
lea rdi, [rax+1]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
mov [r14+8], rax
mov rdi, r15; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r12
mov rsi, rax; char *
call _strcpy
mov rdi, rbx
call _strlen
lea rdi, [rax+1]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov [r14+10h], rax
mov rdi, rbx; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r15
mov rsi, rax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _strcpy
|
long long LefDefParser::lefiMaxStackVia::setMaxStackViaRange(
LefDefParser::lefiMaxStackVia *this,
char *a2,
LefDefParser *a3)
{
LefDefParser *v5; // rdi
LefDefParser *v6; // rdi
long long v7; // rax
long long v8; // r12
const char *v9; // rsi
long long v10; // rax
long long v11; // r15
long long v12; // rax
*((_DWORD *)this + 1) = 1;
v5 = (LefDefParser *)*((_QWORD *)this + 1);
if ( v5 )
LefDefParser::lefFree(v5, a2);
v6 = (LefDefParser *)*((_QWORD *)this + 2);
if ( v6 )
LefDefParser::lefFree(v6, a2);
v7 = strlen(a2);
v8 = LefDefParser::lefMalloc((LefDefParser *)(v7 + 1), (unsigned long long)a2);
*((_QWORD *)this + 1) = v8;
v9 = (const char *)LefDefParser::CASE((LefDefParser *)a2, a2);
strcpy(v8, v9);
v10 = strlen(a3);
v11 = LefDefParser::lefMalloc((LefDefParser *)(v10 + 1), (unsigned long long)v9);
*((_QWORD *)this + 2) = v11;
v12 = LefDefParser::CASE(a3, v9);
return strcpy(v11, v12);
}
|
setMaxStackViaRange:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV dword ptr [RDI + 0x4],0x1
MOV RDI,qword ptr [RDI + 0x8]
TEST RDI,RDI
JZ 0x0010dd38
CALL 0x001322d0
LAB_0010dd38:
MOV RDI,qword ptr [R14 + 0x10]
TEST RDI,RDI
JZ 0x0010dd46
CALL 0x001322d0
LAB_0010dd46:
MOV RDI,R15
CALL 0x001020e0
LEA RDI,[RAX + 0x1]
CALL 0x00130c15
MOV R12,RAX
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R15
CALL 0x00133e9a
MOV RDI,R12
MOV RSI,RAX
CALL 0x001021d0
MOV RDI,RBX
CALL 0x001020e0
LEA RDI,[RAX + 0x1]
CALL 0x00130c15
MOV R15,RAX
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,RBX
CALL 0x00133e9a
MOV RDI,R15
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001021d0
|
/* LefDefParser::lefiMaxStackVia::setMaxStackViaRange(char const*, char const*) */
void __thiscall
LefDefParser::lefiMaxStackVia::setMaxStackViaRange
(lefiMaxStackVia *this,char *param_1,char *param_2)
{
size_t sVar1;
char *pcVar2;
char *pcVar3;
*(int4 *)(this + 4) = 1;
pcVar2 = param_1;
if (*(void **)(this + 8) != (void *)0x0) {
lefFree(*(void **)(this + 8));
}
if (*(void **)(this + 0x10) != (void *)0x0) {
lefFree(*(void **)(this + 0x10));
}
sVar1 = strlen(param_1);
pcVar2 = (char *)lefMalloc((LefDefParser *)(sVar1 + 1),(ulong)pcVar2);
*(char **)(this + 8) = pcVar2;
pcVar3 = (char *)CASE(param_1);
strcpy(pcVar2,pcVar3);
sVar1 = strlen(param_2);
pcVar2 = (char *)lefMalloc((LefDefParser *)(sVar1 + 1),(ulong)pcVar3);
*(char **)(this + 0x10) = pcVar2;
pcVar3 = (char *)CASE(param_2);
strcpy(pcVar2,pcVar3);
return;
}
|
|
61,214
|
ma_apply_undo_row_insert
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool _ma_apply_undo_row_insert(MARIA_HA *info, LSN undo_lsn,
const uchar *header)
{
pgcache_page_no_t page;
uint rownr;
uchar *buff;
my_bool res;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
ha_checksum checksum;
LSN lsn;
DBUG_ENTER("_ma_apply_undo_row_insert");
page= page_korr(header);
header+= PAGE_STORE_SIZE;
rownr= dirpos_korr(header);
header+= DIRPOS_STORE_SIZE;
DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u",
(ulong) ma_recordpos(page, rownr),
(ulong) page, rownr));
buff= pagecache_read(share->pagecache,
&info->dfile, page, 0,
0, share->page_type,
PAGECACHE_LOCK_WRITE,
&page_link.link);
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= buff != 0;
push_dynamic(&info->pinned_pages, (void*) &page_link);
if (!buff)
goto err;
if (read_row_extent_info(info, buff, rownr))
goto err;
_ma_bitmap_flushable(info, 1);
if (delete_head_or_tail(info, page, rownr, 1, 1) ||
delete_tails(info, info->cur_row.tail_positions))
goto err;
if (info->cur_row.extents_count && free_full_pages(info, &info->cur_row))
goto err;
checksum= 0;
if (share->calc_checksum)
checksum= (ha_checksum) 0 - ha_checksum_korr(header);
info->last_auto_increment= ~ (ulonglong) 0;
if (_ma_write_clr(info, undo_lsn, LOGREC_UNDO_ROW_INSERT,
share->calc_checksum != 0, checksum, &lsn, (void*) 0))
goto err;
res= 0;
end:
/* The following is true only if _ma_bitmap_flushable() was called earlier */
if (info->non_flushable_state)
_ma_bitmap_flushable(info, -1);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
err:
DBUG_ASSERT(!maria_assert_if_crashed_table);
res= 1;
_ma_mark_file_crashed(share);
/*
Don't write a new LSN on the used pages. Not important as the file is
marked as crashed and need to be repaired before it can be used.
*/
lsn= LSN_IMPOSSIBLE;
goto end;
}
|
O0
|
c
|
ma_apply_undo_row_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x57f30
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x59703
movq -0x58(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x470, %rsi # imm = 0x470
movq -0x20(%rbp), %rdx
movq -0x58(%rbp), %rax
movl 0x7d4(%rax), %r9d
leaq -0x50(%rbp), %rax
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x99430
movq %rax, -0x30(%rbp)
movl $0x6, -0x48(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x40(%rbp)
movq -0x8(%rbp), %rdi
addq $0x2e8, %rdi # imm = 0x2E8
leaq -0x50(%rbp), %rsi
callq 0xdf950
cmpq $0x0, -0x30(%rbp)
jne 0x5977d
jmp 0x598bc
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x598e0
cmpb $0x0, %al
je 0x59796
jmp 0x598bc
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x619a0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x539d0
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x597e1
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rsi
callq 0x549d0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x597e6
jmp 0x598bc
movq -0x8(%rbp), %rax
cmpl $0x0, 0x12c(%rax)
je 0x59814
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x80, %rsi
callq 0x54a60
movsbl %al, %eax
cmpl $0x0, %eax
je 0x59814
jmp 0x598bc
movl $0x0, -0x5c(%rbp)
movq -0x58(%rbp), %rax
cmpq $0x0, 0x6a8(%rax)
je 0x59834
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x5c(%rbp)
movq -0x8(%rbp), %rax
movq $-0x1, 0x3e8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x58(%rbp), %rax
cmpq $0x0, 0x6a8(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl -0x5c(%rbp), %r8d
movl $0x12, %edx
leaq -0x68(%rbp), %r9
xorl %ecx, %ecx
movsbl %al, %ecx
movq $0x0, (%rsp)
callq 0x40a20
cmpb $0x0, %al
je 0x59884
jmp 0x598bc
movb $0x0, -0x31(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x644(%rax)
je 0x598a3
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x619a0
movq -0x8(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x53fe0
movb -0x31(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
jmp 0x598be
jmp 0x598c0
movb $0x1, -0x31(%rbp)
movq -0x58(%rbp), %rdi
callq 0x45d10
movq $0x0, -0x68(%rbp)
jmp 0x59888
nopw (%rax,%rax)
|
_ma_apply_undo_row_insert:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_58], rax
mov rdi, [rbp+var_18]
call uint5korr_0
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 5
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short $+2
loc_59703:
mov rax, [rbp+var_58]
mov rdi, [rax+600h]
mov rsi, [rbp+var_8]
add rsi, 470h
mov rdx, [rbp+var_20]
mov rax, [rbp+var_58]
mov r9d, [rax+7D4h]
lea rax, [rbp+var_50]
xor ecx, ecx
xor r8d, r8d
mov dword ptr [rsp+80h+var_80], 4
mov [rsp+80h+var_78], rax
call pagecache_read
mov [rbp+var_30], rax
mov [rbp+var_48], 6
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_40], al
mov rdi, [rbp+var_8]
add rdi, 2E8h
lea rsi, [rbp+var_50]
call insert_dynamic
cmp [rbp+var_30], 0
jnz short loc_5977D
jmp loc_598BC
loc_5977D:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_24]
call read_row_extent_info
cmp al, 0
jz short loc_59796
jmp loc_598BC
loc_59796:
mov rdi, [rbp+var_8]
mov esi, 1
call _ma_bitmap_flushable
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov r8d, 1
mov ecx, r8d
call delete_head_or_tail
movsx eax, al
cmp eax, 0
jnz short loc_597E1
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
mov rsi, [rax+0A8h]
call delete_tails
movsx eax, al
cmp eax, 0
jz short loc_597E6
loc_597E1:
jmp loc_598BC
loc_597E6:
mov rax, [rbp+var_8]
cmp dword ptr [rax+12Ch], 0
jz short loc_59814
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
add rsi, 80h
call free_full_pages
movsx eax, al
cmp eax, 0
jz short loc_59814
jmp loc_598BC
loc_59814:
mov [rbp+var_5C], 0
mov rax, [rbp+var_58]
cmp qword ptr [rax+6A8h], 0
jz short loc_59834
mov rcx, [rbp+var_18]
xor eax, eax
sub eax, [rcx]
mov [rbp+var_5C], eax
loc_59834:
mov rax, [rbp+var_8]
mov qword ptr [rax+3E8h], 0FFFFFFFFFFFFFFFFh
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_58]
cmp qword ptr [rax+6A8h], 0
setnz al
and al, 1
movzx eax, al
mov r8d, [rbp+var_5C]
mov edx, 12h
lea r9, [rbp+var_68]
xor ecx, ecx
movsx ecx, al
mov [rsp+80h+var_80], 0
call _ma_write_clr
cmp al, 0
jz short loc_59884
jmp short loc_598BC
loc_59884:
mov [rbp+var_31], 0
loc_59888:
mov rax, [rbp+var_8]
cmp dword ptr [rax+644h], 0
jz short loc_598A3
mov rdi, [rbp+var_8]
mov esi, 0FFFFFFFFh
call _ma_bitmap_flushable
loc_598A3:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_68]
call _ma_unpin_all_pages_and_finalize_row_0
mov al, [rbp+var_31]
add rsp, 80h
pop rbp
retn
loc_598BC:
jmp short $+2
loc_598BE:
jmp short $+2
loc_598C0:
mov [rbp+var_31], 1
mov rdi, [rbp+var_58]
call _ma_mark_file_crashed
mov [rbp+var_68], 0
jmp short loc_59888
|
char ma_apply_undo_row_insert(_QWORD *a1, long long a2, unsigned int *a3)
{
long long v4; // [rsp+18h] [rbp-68h] BYREF
int v5; // [rsp+24h] [rbp-5Ch]
long long v6; // [rsp+28h] [rbp-58h]
_BYTE v7[8]; // [rsp+30h] [rbp-50h] BYREF
int v8; // [rsp+38h] [rbp-48h]
bool v9; // [rsp+40h] [rbp-40h]
char v10; // [rsp+4Fh] [rbp-31h]
long long v11; // [rsp+50h] [rbp-30h]
unsigned int v12; // [rsp+5Ch] [rbp-24h]
unsigned long long v13; // [rsp+60h] [rbp-20h]
unsigned int *v14; // [rsp+68h] [rbp-18h]
long long v15; // [rsp+70h] [rbp-10h]
_QWORD *v16; // [rsp+78h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v6 = *a1;
v13 = uint5korr_0(a3);
v14 = (unsigned int *)((char *)v14 + 5);
v12 = *(unsigned __int8 *)v14;
v14 = (unsigned int *)((char *)v14 + 1);
v11 = pagecache_read(*(_QWORD *)(v6 + 1536), (int)a1 + 1136, v13, 0, 0, *(_DWORD *)(v6 + 2004), 4, (long long)v7);
v8 = 6;
v9 = v11 != 0;
insert_dynamic(v16 + 93, v7);
if ( !v11 )
goto LABEL_15;
if ( (unsigned __int8)read_row_extent_info(v16, v11, v12) )
goto LABEL_15;
ma_bitmap_flushable(v16, 1LL);
if ( delete_head_or_tail(v16, v13, v12, 1, 1)
|| delete_tails(v16, (unsigned long long *)v16[21])
|| *((_DWORD *)v16 + 75) && free_full_pages((long long)v16, (long long)(v16 + 16)) )
{
goto LABEL_15;
}
v5 = 0;
if ( *(_QWORD *)(v6 + 1704) )
v5 = -*v14;
v16[125] = -1LL;
if ( ma_write_clr(v16, v15, 18, *(_QWORD *)(v6 + 1704) != 0LL, v5, (long long)&v4, 0LL) )
{
LABEL_15:
v10 = 1;
ma_mark_file_crashed(v6);
v4 = 0LL;
}
else
{
v10 = 0;
}
if ( *((_DWORD *)v16 + 401) )
ma_bitmap_flushable(v16, 0xFFFFFFFFLL);
ma_unpin_all_pages_and_finalize_row_0((long long)v16, v4);
return v10;
}
|
_ma_apply_undo_row_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00157f30
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x5
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00159703
LAB_00159703:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x470
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x58]
MOV R9D,dword ptr [RAX + 0x7d4]
LEA RAX,[RBP + -0x50]
XOR ECX,ECX
XOR R8D,R8D
MOV dword ptr [RSP],0x4
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00199430
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x48],0x6
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x40],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x2e8
LEA RSI,[RBP + -0x50]
CALL 0x001df950
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0015977d
JMP 0x001598bc
LAB_0015977d:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x24]
CALL 0x001598e0
CMP AL,0x0
JZ 0x00159796
JMP 0x001598bc
LAB_00159796:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x001619a0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV R8D,0x1
MOV ECX,R8D
CALL 0x001539d0
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x001597e1
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0xa8]
CALL 0x001549d0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001597e6
LAB_001597e1:
JMP 0x001598bc
LAB_001597e6:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x12c],0x0
JZ 0x00159814
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x80
CALL 0x00154a60
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00159814
JMP 0x001598bc
LAB_00159814:
MOV dword ptr [RBP + -0x5c],0x0
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX + 0x6a8],0x0
JZ 0x00159834
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
SUB EAX,dword ptr [RCX]
MOV dword ptr [RBP + -0x5c],EAX
LAB_00159834:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x3e8],-0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX + 0x6a8],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV R8D,dword ptr [RBP + -0x5c]
MOV EDX,0x12
LEA R9,[RBP + -0x68]
XOR ECX,ECX
MOVSX ECX,AL
MOV qword ptr [RSP],0x0
CALL 0x00140a20
CMP AL,0x0
JZ 0x00159884
JMP 0x001598bc
LAB_00159884:
MOV byte ptr [RBP + -0x31],0x0
LAB_00159888:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x644],0x0
JZ 0x001598a3
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0xffffffff
CALL 0x001619a0
LAB_001598a3:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x68]
CALL 0x00153fe0
MOV AL,byte ptr [RBP + -0x31]
ADD RSP,0x80
POP RBP
RET
LAB_001598bc:
JMP 0x001598be
LAB_001598be:
JMP 0x001598c0
LAB_001598c0:
MOV byte ptr [RBP + -0x31],0x1
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00145d10
MOV qword ptr [RBP + -0x68],0x0
JMP 0x00159888
|
int1 _ma_apply_undo_row_insert(long *param_1,int8 param_2,long param_3)
{
char cVar1;
int8 in_stack_ffffffffffffff78;
int4 uVar2;
int8 local_70;
int local_64;
long local_60;
int1 local_58 [8];
int4 local_50;
int1 local_48;
int1 local_39;
long local_38;
uint local_2c;
int8 local_28;
int *local_20;
int8 local_18;
long *local_10;
uVar2 = (int4)((ulong)in_stack_ffffffffffffff78 >> 0x20);
local_60 = *param_1;
local_20 = (int *)param_3;
local_18 = param_2;
local_10 = param_1;
local_28 = uint5korr(param_3);
local_2c = (uint)*(byte *)((long)local_20 + 5);
local_20 = (int *)((long)local_20 + 6);
local_38 = pagecache_read(*(int8 *)(local_60 + 0x600),local_10 + 0x8e,local_28,0,0,
*(int4 *)(local_60 + 0x7d4),CONCAT44(uVar2,4),local_58);
local_50 = 6;
local_48 = local_38 != 0;
insert_dynamic(local_10 + 0x5d,local_58);
if ((local_38 != 0) && (cVar1 = read_row_extent_info(local_10,local_38,local_2c), cVar1 == '\0'))
{
_ma_bitmap_flushable(local_10,1);
cVar1 = delete_head_or_tail(local_10,local_28,local_2c,1);
if (((cVar1 == '\0') && (cVar1 = delete_tails(local_10,local_10[0x15]), cVar1 == '\0')) &&
((*(int *)((long)local_10 + 300) == 0 ||
(cVar1 = free_full_pages(local_10,local_10 + 0x10), cVar1 == '\0')))) {
local_64 = 0;
if (*(long *)(local_60 + 0x6a8) != 0) {
local_64 = -*local_20;
}
local_10[0x7d] = -1;
cVar1 = _ma_write_clr(local_10,local_18,0x12,*(long *)(local_60 + 0x6a8) != 0,local_64,
&local_70,0);
if (cVar1 == '\0') {
local_39 = 0;
goto LAB_00159888;
}
}
}
local_39 = 1;
_ma_mark_file_crashed(local_60);
local_70 = 0;
LAB_00159888:
if (*(int *)((long)local_10 + 0x644) != 0) {
_ma_bitmap_flushable(local_10,0xffffffff);
}
_ma_unpin_all_pages_and_finalize_row(local_10,local_70);
return local_39;
}
|
|
61,215
|
testing::internal::edit_distance::(anonymous namespace)::Hunk::PushLine(char, char const*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void PushLine(char edit, const char* line) {
switch (edit) {
case ' ':
++common_;
FlushEdits();
hunk_.push_back(std::make_pair(' ', line));
break;
case '-':
++removes_;
hunk_removes_.push_back(std::make_pair('-', line));
break;
case '+':
++adds_;
hunk_adds_.push_back(std::make_pair('+', line));
break;
}
}
|
O0
|
cpp
|
testing::internal::edit_distance::(anonymous namespace)::Hunk::PushLine(char, char const*):
subq $0x88, %rsp
movb %sil, %al
movq %rdi, 0x80(%rsp)
movb %al, 0x7f(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movsbl 0x7f(%rsp), %eax
movl %eax, 0x28(%rsp)
subl $0x20, %eax
je 0xc1f05
jmp 0xc1ee8
movl 0x28(%rsp), %eax
subl $0x2b, %eax
je 0xc1fa2
jmp 0xc1ef7
movl 0x28(%rsp), %eax
subl $0x2d, %eax
je 0xc1f5a
jmp 0xc1fe8
movq 0x20(%rsp), %rdi
movq 0x20(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x20(%rdi)
callq 0xddf20
movq 0x20(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x18(%rsp)
movb $0x20, 0x5f(%rsp)
leaq 0x5f(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xf4450
movq 0x18(%rsp), %rdi
movb %al, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
leaq 0x60(%rsp), %rsi
callq 0xf4410
jmp 0xc1fe8
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
addq $0x58, %rax
movq %rax, 0x10(%rsp)
movb $0x2d, 0x47(%rsp)
leaq 0x47(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xf4450
movq 0x10(%rsp), %rdi
movb %al, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
leaq 0x48(%rsp), %rsi
callq 0xf4410
jmp 0xc1fe8
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x40, %rax
movq %rax, 0x8(%rsp)
movb $0x2b, 0x2f(%rsp)
leaq 0x2f(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xf4450
movq 0x8(%rsp), %rdi
movb %al, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
leaq 0x30(%rsp), %rsi
callq 0xf4410
addq $0x88, %rsp
retq
|
_ZN7testing8internal13edit_distance12_GLOBAL__N_14Hunk8PushLineEcPKc:
sub rsp, 88h
mov al, sil
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_9], al
mov [rsp+88h+var_18], rdx
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_68], rax
movsx eax, [rsp+88h+var_9]
mov [rsp+88h+var_60], eax
sub eax, 20h ; ' '
jz short loc_C1F05
jmp short $+2
loc_C1EE8:
mov eax, [rsp+88h+var_60]
sub eax, 2Bh ; '+'
jz loc_C1FA2
jmp short $+2
loc_C1EF7:
mov eax, [rsp+88h+var_60]
sub eax, 2Dh ; '-'
jz short loc_C1F5A
jmp loc_C1FE8
loc_C1F05:
mov rdi, [rsp+88h+var_68]; this
mov rax, [rdi+20h]
add rax, 1
mov [rdi+20h], rax
call _ZN7testing8internal13edit_distance12_GLOBAL__N_14Hunk10FlushEditsEv; testing::internal::edit_distance::`anonymous namespace'::Hunk::FlushEdits(void)
mov rax, [rsp+88h+var_68]
add rax, 28h ; '('
mov [rsp+88h+var_70], rax
mov [rsp+88h+var_29], 20h ; ' '
lea rdi, [rsp+88h+var_29]
lea rsi, [rsp+88h+var_18]
call _ZSt9make_pairIcRPKcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_; std::make_pair<char,char const*&>(char&&,char const*&&&)
mov rdi, [rsp+88h+var_70]
mov [rsp+88h+var_28], al
mov [rsp+88h+var_20], rdx
lea rsi, [rsp+88h+var_28]
call _ZNSt7__cxx114listISt4pairIcPKcESaIS4_EE9push_backEOS4_; std::list<std::pair<char,char const*>>::push_back(std::pair<char,char const*>&&)
jmp loc_C1FE8
loc_C1F5A:
mov rax, [rsp+88h+var_68]
mov rcx, [rax+18h]
add rcx, 1
mov [rax+18h], rcx
add rax, 58h ; 'X'
mov [rsp+88h+var_78], rax
mov [rsp+88h+var_41], 2Dh ; '-'
lea rdi, [rsp+88h+var_41]
lea rsi, [rsp+88h+var_18]
call _ZSt9make_pairIcRPKcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_; std::make_pair<char,char const*&>(char&&,char const*&&&)
mov rdi, [rsp+88h+var_78]
mov [rsp+88h+var_40], al
mov [rsp+88h+var_38], rdx
lea rsi, [rsp+88h+var_40]
call _ZNSt7__cxx114listISt4pairIcPKcESaIS4_EE9push_backEOS4_; std::list<std::pair<char,char const*>>::push_back(std::pair<char,char const*>&&)
jmp short loc_C1FE8
loc_C1FA2:
mov rax, [rsp+88h+var_68]
mov rcx, [rax+10h]
add rcx, 1
mov [rax+10h], rcx
add rax, 40h ; '@'
mov [rsp+88h+var_80], rax
mov [rsp+88h+var_59], 2Bh ; '+'
lea rdi, [rsp+88h+var_59]
lea rsi, [rsp+88h+var_18]
call _ZSt9make_pairIcRPKcESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_; std::make_pair<char,char const*&>(char&&,char const*&&&)
mov rdi, [rsp+88h+var_80]
mov [rsp+88h+var_58], al
mov [rsp+88h+var_50], rdx
lea rsi, [rsp+88h+var_58]
call _ZNSt7__cxx114listISt4pairIcPKcESaIS4_EE9push_backEOS4_; std::list<std::pair<char,char const*>>::push_back(std::pair<char,char const*>&&)
loc_C1FE8:
add rsp, 88h
retn
|
long long testing::internal::edit_distance::`anonymous namespace'::Hunk::PushLine(
testing::internal::edit_distance::_anonymous_namespace_::Hunk *this,
char a2,
const char *a3)
{
long long result; // rax
long long v4; // rdx
long long v5; // rdx
long long v6; // rdx
char v7; // [rsp+2Fh] [rbp-59h] BYREF
_BYTE v8[8]; // [rsp+30h] [rbp-58h] BYREF
long long v9; // [rsp+38h] [rbp-50h]
char v10; // [rsp+47h] [rbp-41h] BYREF
_BYTE v11[8]; // [rsp+48h] [rbp-40h] BYREF
long long v12; // [rsp+50h] [rbp-38h]
char v13; // [rsp+5Fh] [rbp-29h] BYREF
_BYTE v14[8]; // [rsp+60h] [rbp-28h] BYREF
long long v15; // [rsp+68h] [rbp-20h]
const char *v16; // [rsp+70h] [rbp-18h] BYREF
char v17; // [rsp+7Fh] [rbp-9h]
testing::internal::edit_distance::_anonymous_namespace_::Hunk *v18; // [rsp+80h] [rbp-8h]
v18 = this;
v17 = a2;
v16 = a3;
if ( a2 == 32 )
{
++*((_QWORD *)this + 4);
testing::internal::edit_distance::`anonymous namespace'::Hunk::FlushEdits(this);
v13 = 32;
v14[0] = std::make_pair<char,char const*&>(&v13, &v16);
v15 = v4;
return std::list<std::pair<char,char const*>>::push_back((char *)this + 40, v14);
}
else if ( a2 == 43 )
{
++*((_QWORD *)this + 2);
v7 = 43;
v8[0] = std::make_pair<char,char const*&>(&v7, &v16);
v9 = v6;
return std::list<std::pair<char,char const*>>::push_back((char *)this + 64, v8);
}
else
{
result = (unsigned int)(a2 - 45);
if ( a2 == 45 )
{
++*((_QWORD *)this + 3);
v10 = 45;
v11[0] = std::make_pair<char,char const*&>(&v10, &v16);
v12 = v5;
return std::list<std::pair<char,char const*>>::push_back((char *)this + 88, v11);
}
}
return result;
}
|
PushLine:
SUB RSP,0x88
MOV AL,SIL
MOV qword ptr [RSP + 0x80],RDI
MOV byte ptr [RSP + 0x7f],AL
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x20],RAX
MOVSX EAX,byte ptr [RSP + 0x7f]
MOV dword ptr [RSP + 0x28],EAX
SUB EAX,0x20
JZ 0x001c1f05
JMP 0x001c1ee8
LAB_001c1ee8:
MOV EAX,dword ptr [RSP + 0x28]
SUB EAX,0x2b
JZ 0x001c1fa2
JMP 0x001c1ef7
LAB_001c1ef7:
MOV EAX,dword ptr [RSP + 0x28]
SUB EAX,0x2d
JZ 0x001c1f5a
JMP 0x001c1fe8
LAB_001c1f05:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RDI + 0x20]
ADD RAX,0x1
MOV qword ptr [RDI + 0x20],RAX
CALL 0x001ddf20
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x28
MOV qword ptr [RSP + 0x18],RAX
MOV byte ptr [RSP + 0x5f],0x20
LEA RDI,[RSP + 0x5f]
LEA RSI,[RSP + 0x70]
CALL 0x001f4450
MOV RDI,qword ptr [RSP + 0x18]
MOV byte ptr [RSP + 0x60],AL
MOV qword ptr [RSP + 0x68],RDX
LEA RSI,[RSP + 0x60]
CALL 0x001f4410
JMP 0x001c1fe8
LAB_001c1f5a:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,0x1
MOV qword ptr [RAX + 0x18],RCX
ADD RAX,0x58
MOV qword ptr [RSP + 0x10],RAX
MOV byte ptr [RSP + 0x47],0x2d
LEA RDI,[RSP + 0x47]
LEA RSI,[RSP + 0x70]
CALL 0x001f4450
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x48],AL
MOV qword ptr [RSP + 0x50],RDX
LEA RSI,[RSP + 0x48]
CALL 0x001f4410
JMP 0x001c1fe8
LAB_001c1fa2:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
ADD RAX,0x40
MOV qword ptr [RSP + 0x8],RAX
MOV byte ptr [RSP + 0x2f],0x2b
LEA RDI,[RSP + 0x2f]
LEA RSI,[RSP + 0x70]
CALL 0x001f4450
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x30],AL
MOV qword ptr [RSP + 0x38],RDX
LEA RSI,[RSP + 0x30]
CALL 0x001f4410
LAB_001c1fe8:
ADD RSP,0x88
RET
|
/* testing::internal::edit_distance::(anonymous namespace)::Hunk::PushLine(char, char const*) */
void __thiscall
testing::internal::edit_distance::(anonymous_namespace)::Hunk::PushLine
(Hunk *this,char param_1,char *param_2)
{
int8 extraout_RDX;
int8 extraout_RDX_00;
int8 extraout_RDX_01;
char local_59;
pair local_58 [8];
int8 local_50;
char local_41;
pair local_40 [8];
int8 local_38;
char local_29;
pair local_28 [8];
int8 local_20;
char *local_18;
char local_9;
Hunk *local_8;
local_18 = param_2;
local_9 = param_1;
local_8 = this;
if (param_1 == ' ') {
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
FlushEdits(this);
local_29 = ' ';
local_28[0] = (pair)std::make_pair<char,char_const*&>(&local_29,&local_18);
local_20 = extraout_RDX;
std::__cxx11::list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>>::
push_back((list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>> *)
(this + 0x28),local_28);
}
else if (param_1 == '+') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 1;
local_59 = '+';
local_58[0] = (pair)std::make_pair<char,char_const*&>(&local_59,&local_18);
local_50 = extraout_RDX_01;
std::__cxx11::list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>>::
push_back((list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>> *)
(this + 0x40),local_58);
}
else if (param_1 == '-') {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
local_41 = '-';
local_40[0] = (pair)std::make_pair<char,char_const*&>(&local_41,&local_18);
local_38 = extraout_RDX_00;
std::__cxx11::list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>>::
push_back((list<std::pair<char,char_const*>,std::allocator<std::pair<char,char_const*>>> *)
(this + 0x58),local_40);
}
return;
}
|
|
61,216
|
my_var_sp_row_field::my_var_sp_row_field(Sp_rcontext_handler const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, unsigned int, unsigned int, sp_head*)
|
eloqsql/sql/sql_class.h
|
my_var_sp_row_field(const Sp_rcontext_handler *rcontext_handler,
const LEX_CSTRING *varname, const LEX_CSTRING *fieldname,
uint var_idx, uint field_idx, sp_head *s)
:my_var_sp(rcontext_handler, varname, var_idx,
&type_handler_double/*Not really used*/, s),
m_field_offset(field_idx)
{ }
|
O0
|
c
|
my_var_sp_row_field::my_var_sp_row_field(Sp_rcontext_handler const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, unsigned int, unsigned int, sp_head*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq 0x10(%rbp), %r9
leaq 0x10452ee(%rip), %r8 # 0x15ee220
callq 0x5a8e80
movq -0x30(%rbp), %rax
leaq 0xcddd16(%rip), %rcx # 0x1286c58
addq $0x10, %rcx
movq %rcx, (%rax)
movl -0x28(%rbp), %ecx
movl %ecx, 0x40(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN19my_var_sp_row_fieldC2EPK19Sp_rcontext_handlerPK25st_mysql_const_lex_stringS5_jjP7sp_head:
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
mov rdi, [rbp+var_8]
mov [rbp+var_30], rdi
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r9, [rbp+arg_0]
lea r8, type_handler_double
call _ZN9my_var_spC2EPK19Sp_rcontext_handlerPK25st_mysql_const_lex_stringjPK12Type_handlerP7sp_head; my_var_sp::my_var_sp(Sp_rcontext_handler const*,st_mysql_const_lex_string const*,uint,Type_handler const*,sp_head *)
mov rax, [rbp+var_30]
lea rcx, _ZTV19my_var_sp_row_field; `vtable for'my_var_sp_row_field
add rcx, 10h
mov [rax], rcx
mov ecx, [rbp+var_28]
mov [rax+40h], ecx
add rsp, 30h
pop rbp
retn
|
long long my_var_sp_row_field::my_var_sp_row_field(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6,
long long a7)
{
long long result; // rax
my_var_sp::my_var_sp(a1, a2, a3, a5, (long long)&type_handler_double, a7);
result = a1;
*(_QWORD *)a1 = &`vtable for'my_var_sp_row_field + 2;
*(_DWORD *)(a1 + 64) = a6;
return result;
}
|
init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV RSI,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RBP + -0xc]
MOV R8D,dword ptr [RBP + -0x10]
MOV R9D,dword ptr [RBP + -0x14]
MOV EDX,0x10
XOR EAX,EAX
MOV ECX,EAX
MOV qword ptr [RSP],0x0
CALL 0x00cf7b00
ADD RSP,0x20
POP RBP
RET
|
/* Dynamic_array<st_mysql_socket>::init(unsigned int, unsigned int, unsigned int) */
void __thiscall
Dynamic_array<st_mysql_socket>::init
(Dynamic_array<st_mysql_socket> *this,uint param_1,uint param_2,uint param_3)
{
init_dynamic_array2(param_1,this,0x10,0,param_2,param_3,0);
return;
}
|
|
61,217
|
Item_field::update_null_value()
|
eloqsql/sql/item.cc
|
void Item_field::update_null_value()
{
/*
need to set no_errors to prevent warnings about type conversion
popping up.
*/
THD *thd= field->table->in_use;
int no_errors;
no_errors= thd->no_errors;
thd->no_errors= 1;
type_handler()->Item_update_null_value(this);
thd->no_errors= no_errors;
}
|
O0
|
cpp
|
Item_field::update_null_value():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq 0xf8(%rdi), %rax
movq 0x18(%rax), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb 0x3fb4(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x3fb4(%rax)
movq (%rdi), %rax
callq *0xa8(%rax)
movq -0x20(%rbp), %rsi
movq %rax, %rdi
movq (%rdi), %rax
callq *0x300(%rax)
cmpl $0x0, -0x14(%rbp)
setne %cl
movq -0x10(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x3fb4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN10Item_field17update_null_valueEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_20], rdi
mov rax, [rdi+0F8h]
mov rax, [rax+18h]
mov rax, [rax+48h]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov al, [rax+3FB4h]
and al, 1
movzx eax, al
mov [rbp+var_14], eax
mov rax, [rbp+var_10]
mov byte ptr [rax+3FB4h], 1
mov rax, [rdi]
call qword ptr [rax+0A8h]
mov rsi, [rbp+var_20]
mov rdi, rax
mov rax, [rdi]
call qword ptr [rax+300h]
cmp [rbp+var_14], 0
setnz cl
mov rax, [rbp+var_10]
and cl, 1
mov [rax+3FB4h], cl
add rsp, 20h
pop rbp
retn
|
long long Item_field::update_null_value(Item_field *this)
{
long long v1; // rax
long long result; // rax
int v3; // [rsp+Ch] [rbp-14h]
long long v4; // [rsp+10h] [rbp-10h]
v4 = *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 31) + 24LL) + 72LL);
v3 = *(_BYTE *)(v4 + 16308) & 1;
*(_BYTE *)(v4 + 16308) = 1;
v1 = (*(long long ( **)(Item_field *))(*(_QWORD *)this + 168LL))(this);
(*(void ( **)(long long, Item_field *))(*(_QWORD *)v1 + 768LL))(v1, this);
result = v4;
*(_BYTE *)(v4 + 16308) = v3 != 0;
return result;
}
|
xa_recover_callback_verbose:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x150
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x138],RDI
MOV qword ptr [RBP + -0x140],RSI
MOV RDI,qword ptr [RBP + -0x138]
ADD RDI,0x10
LEA RSI,[RBP + -0x130]
MOV qword ptr [RBP + -0x150],RSI
CALL 0x00c42f10
MOV RDX,qword ptr [RBP + -0x150]
MOV dword ptr [RBP + -0x144],EAX
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RBP + -0x140]
MOV ECX,dword ptr [RBP + -0x144]
LEA R8,[0x1dc1510]
CALL 0x00c43240
MOV byte ptr [RBP + -0x145],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00c42c58
MOV AL,byte ptr [RBP + -0x145]
ADD RSP,0x150
POP RBP
RET
LAB_00c42c58:
CALL 0x00858480
|
/* xa_recover_callback_verbose(XID_cache_element*, Protocol*) */
int8 xa_recover_callback_verbose(XID_cache_element *param_1,Protocol *param_2)
{
int1 uVar1;
uint uVar2;
long in_FS_OFFSET;
char local_138 [296];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = get_sql_xid((xid_t *)(param_1 + 0x10),local_138);
uVar1 = xa_recover_callback(param_1,param_2,local_138,uVar2,
(charset_info_st *)my_charset_utf8mb3_general_ci);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar1);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,218
|
minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
ExpressionTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, location, pre, post), expr(std::move(e)) {}
|
O2
|
cpp
|
minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x61b9e
leaq 0x8d38f(%rip), %rax # 0xfeaf8
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN5minja23ExpressionTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 1
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, _ZTVN5minja23ExpressionTemplateTokenE; `vtable for'minja::ExpressionTemplateToken
add rax, 10h
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
|
long long * minja::ExpressionTemplateToken::ExpressionTemplateToken(
long long a1,
long long a2,
int a3,
int a4,
__int128 *a5)
{
long long *result; // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 1, a2, a3, a4);
result = &`vtable for'minja::ExpressionTemplateToken + 2;
*(_QWORD *)a1 = &`vtable for'minja::ExpressionTemplateToken + 2;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
|
ExpressionTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0x1
POP RSI
CALL 0x00161b9e
LEA RAX,[0x1feaf8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&,
minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::ExpressionTemplateToken::ExpressionTemplateToken
(ExpressionTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,1,param_1,param_3,param_4);
*(int ***)this = &PTR__ExpressionTemplateToken_001feb08;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
|
|
61,219
|
dump_all_databases
|
eloqsql/client/mysqldump.c
|
static int dump_all_databases()
{
MYSQL_ROW row;
MYSQL_RES *tableres;
int result=0;
if (mysql_query_with_error_report(mysql, &tableres, "SHOW DATABASES"))
return 1;
while ((row= mysql_fetch_row(tableres)))
{
if (mysql_get_server_version(mysql) >= FIRST_INFORMATION_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, row[0], INFORMATION_SCHEMA_DB_NAME))
continue;
if (mysql_get_server_version(mysql) >= FIRST_PERFORMANCE_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME))
continue;
if (mysql_get_server_version(mysql) >= FIRST_SYS_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, row[0], SYS_SCHEMA_DB_NAME))
continue;
if (include_database(row[0]))
if (dump_all_tables_in_db(row[0]))
result=1;
}
mysql_free_result(tableres);
if (seen_views)
{
if (mysql_query(mysql, "SHOW DATABASES") ||
!(tableres= mysql_store_result(mysql)))
{
fprintf(stderr, "%s: Error: Couldn't execute 'SHOW DATABASES': %s\n",
my_progname_short, mysql_error(mysql));
return 1;
}
while ((row= mysql_fetch_row(tableres)))
{
if (mysql_get_server_version(mysql) >= FIRST_INFORMATION_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, row[0], INFORMATION_SCHEMA_DB_NAME))
continue;
if (mysql_get_server_version(mysql) >= FIRST_PERFORMANCE_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME))
continue;
if (mysql_get_server_version(mysql) >= FIRST_SYS_SCHEMA_VERSION &&
!my_strcasecmp(&my_charset_latin1, row[0], SYS_SCHEMA_DB_NAME))
continue;
if (include_database(row[0]))
if (dump_all_views_in_db(row[0]))
result=1;
}
mysql_free_result(tableres);
}
return result;
}
|
O0
|
c
|
dump_all_databases:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x1c(%rbp)
movq 0x3c2c82(%rip), %rdi # 0x4014c8
leaq -0x18(%rbp), %rsi
leaq 0x9d9fa(%rip), %rdx # 0xdc24b
callq 0x39350
cmpl $0x0, %eax
je 0x3e867
movl $0x1, -0x4(%rbp)
jmp 0x3eb3a
jmp 0x3e869
movq -0x18(%rbp), %rdi
callq 0x51800
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x3e981
movq 0x3c2c41(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0xc353, %rax # imm = 0xC353
jb 0x3e8c4
leaq 0x2b1c65(%rip), %rax # 0x2f0500
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
leaq 0x2b1c4c(%rip), %rdi # 0x2f0500
leaq 0x9d99f(%rip), %rdx # 0xdc25a
callq *%rax
cmpl $0x0, %eax
jne 0x3e8c4
jmp 0x3e869
movq 0x3c2bfd(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0xc547, %rax # imm = 0xC547
jb 0x3e90b
leaq 0x2b1c21(%rip), %rax # 0x2f0500
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
leaq 0x2b1c08(%rip), %rdi # 0x2f0500
leaq 0x9d96e(%rip), %rdx # 0xdc26d
callq *%rax
cmpl $0x0, %eax
jne 0x3e90b
jmp 0x3e869
movq 0x3c2bb6(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0x188f8, %rax # imm = 0x188F8
jb 0x3e952
leaq 0x2b1bda(%rip), %rax # 0x2f0500
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
leaq 0x2b1bc1(%rip), %rdi # 0x2f0500
leaq 0xa4e2d(%rip), %rdx # 0xe3773
callq *%rax
cmpl $0x0, %eax
jne 0x3e952
jmp 0x3e869
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3eb50
cmpb $0x0, %al
je 0x3e97c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3eba0
cmpl $0x0, %eax
je 0x3e97a
movl $0x1, -0x1c(%rbp)
jmp 0x3e97c
jmp 0x3e869
movq -0x18(%rbp), %rdi
callq 0x48d00
cmpb $0x0, 0x3c2b2f(%rip) # 0x4014c0
je 0x3eb34
movq 0x3c2b2a(%rip), %rdi # 0x4014c8
leaq 0x9d8a6(%rip), %rsi # 0xdc24b
callq 0x4fe70
cmpl $0x0, %eax
jne 0x3e9c5
movq 0x3c2b12(%rip), %rdi # 0x4014c8
callq 0x514c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3ea12
movq 0x206614(%rip), %rax # 0x244fe0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x3ce1fe(%rip), %rax # 0x40cbd8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq 0x3c2ae0(%rip), %rdi # 0x4014c8
callq 0x537f0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq %rax, %rcx
leaq 0x9d881(%rip), %rsi # 0xdc280
movb $0x0, %al
callq 0x381d0
movl $0x1, -0x4(%rbp)
jmp 0x3eb3a
jmp 0x3ea14
movq -0x18(%rbp), %rdi
callq 0x51800
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x3eb2b
movq 0x3c2a96(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0xc353, %rax # imm = 0xC353
jb 0x3ea6f
leaq 0x2b1aba(%rip), %rax # 0x2f0500
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
leaq 0x2b1aa1(%rip), %rdi # 0x2f0500
leaq 0x9d7f4(%rip), %rdx # 0xdc25a
callq *%rax
cmpl $0x0, %eax
jne 0x3ea6f
jmp 0x3ea14
movq 0x3c2a52(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0xc547, %rax # imm = 0xC547
jb 0x3eab6
leaq 0x2b1a76(%rip), %rax # 0x2f0500
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
leaq 0x2b1a5d(%rip), %rdi # 0x2f0500
leaq 0x9d7c3(%rip), %rdx # 0xdc26d
callq *%rax
cmpl $0x0, %eax
jne 0x3eab6
jmp 0x3ea14
movq 0x3c2a0b(%rip), %rdi # 0x4014c8
callq 0x523b0
cmpq $0x188f8, %rax # imm = 0x188F8
jb 0x3eafd
leaq 0x2b1a2f(%rip), %rax # 0x2f0500
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
leaq 0x2b1a16(%rip), %rdi # 0x2f0500
leaq 0xa4c82(%rip), %rdx # 0xe3773
callq *%rax
cmpl $0x0, %eax
jne 0x3eafd
jmp 0x3ea14
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3eb50
cmpb $0x0, %al
je 0x3eb26
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3f290
cmpb $0x0, %al
je 0x3eb24
movl $0x1, -0x1c(%rbp)
jmp 0x3eb26
jmp 0x3ea14
movq -0x18(%rbp), %rdi
callq 0x48d00
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
dump_all_databases:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_1C], 0
mov rdi, cs:mysql
lea rsi, [rbp+var_18]
lea rdx, aShowDatabases; "SHOW DATABASES"
call mysql_query_with_error_report
cmp eax, 0
jz short loc_3E867
mov [rbp+var_4], 1
jmp loc_3EB3A
loc_3E867:
jmp short $+2
loc_3E869:
mov rdi, [rbp+var_18]
call mysql_fetch_row
mov [rbp+var_10], rax
cmp rax, 0
jz loc_3E981
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 0C353h
jb short loc_3E8C4
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rsi, [rcx]
lea rdi, my_charset_latin1
lea rdx, aInformationSch; "information_schema"
call rax
cmp eax, 0
jnz short loc_3E8C4
jmp short loc_3E869
loc_3E8C4:
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 0C547h
jb short loc_3E90B
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rsi, [rcx]
lea rdi, my_charset_latin1
lea rdx, aPerformanceSch; "performance_schema"
call rax
cmp eax, 0
jnz short loc_3E90B
jmp loc_3E869
loc_3E90B:
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 188F8h
jb short loc_3E952
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rsi, [rcx]
lea rdi, my_charset_latin1
lea rdx, aMysys+2; "sys"
call rax
cmp eax, 0
jnz short loc_3E952
jmp loc_3E869
loc_3E952:
mov rax, [rbp+var_10]
mov rdi, [rax]
call include_database
cmp al, 0
jz short loc_3E97C
mov rax, [rbp+var_10]
mov rdi, [rax]
call dump_all_tables_in_db
cmp eax, 0
jz short loc_3E97A
mov [rbp+var_1C], 1
loc_3E97A:
jmp short $+2
loc_3E97C:
jmp loc_3E869
loc_3E981:
mov rdi, [rbp+var_18]
call mysql_free_result
cmp cs:seen_views, 0
jz loc_3EB34
mov rdi, cs:mysql
lea rsi, aShowDatabases; "SHOW DATABASES"
call mysql_query
cmp eax, 0
jnz short loc_3E9C5
mov rdi, cs:mysql
call mysql_store_result
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3EA12
loc_3E9C5:
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_30], rax
lea rax, my_progname_short
mov rax, [rax]
mov [rbp+var_28], rax
mov rdi, cs:mysql
call mysql_error
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_28]
mov rcx, rax
lea rsi, aSErrorCouldnTE; "%s: Error: Couldn't execute 'SHOW DATAB"...
mov al, 0
call _fprintf
mov [rbp+var_4], 1
jmp loc_3EB3A
loc_3EA12:
jmp short $+2
loc_3EA14:
mov rdi, [rbp+var_18]
call mysql_fetch_row
mov [rbp+var_10], rax
cmp rax, 0
jz loc_3EB2B
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 0C353h
jb short loc_3EA6F
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rsi, [rcx]
lea rdi, my_charset_latin1
lea rdx, aInformationSch; "information_schema"
call rax
cmp eax, 0
jnz short loc_3EA6F
jmp short loc_3EA14
loc_3EA6F:
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 0C547h
jb short loc_3EAB6
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rsi, [rcx]
lea rdi, my_charset_latin1
lea rdx, aPerformanceSch; "performance_schema"
call rax
cmp eax, 0
jnz short loc_3EAB6
jmp loc_3EA14
loc_3EAB6:
mov rdi, cs:mysql
call mysql_get_server_version
cmp rax, 188F8h
jb short loc_3EAFD
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov rsi, [rcx]
lea rdi, my_charset_latin1
lea rdx, aMysys+2; "sys"
call rax
cmp eax, 0
jnz short loc_3EAFD
jmp loc_3EA14
loc_3EAFD:
mov rax, [rbp+var_10]
mov rdi, [rax]
call include_database
cmp al, 0
jz short loc_3EB26
mov rax, [rbp+var_10]
mov rdi, [rax]
call dump_all_views_in_db
cmp al, 0
jz short loc_3EB24
mov [rbp+var_1C], 1
loc_3EB24:
jmp short $+2
loc_3EB26:
jmp loc_3EA14
loc_3EB2B:
mov rdi, [rbp+var_18]
call mysql_free_result
loc_3EB34:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_3EB3A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long dump_all_databases(double a1)
{
const char *v1; // rax
long long v3; // [rsp+0h] [rbp-30h]
const char *v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+14h] [rbp-1Ch]
long long v6; // [rsp+18h] [rbp-18h] BYREF
_QWORD *row; // [rsp+20h] [rbp-10h]
v5 = 0;
if ( !(unsigned int)mysql_query_with_error_report(mysql, &v6, (long long)"SHOW DATABASES") )
{
while ( 1 )
{
row = (_QWORD *)mysql_fetch_row(v6);
if ( !row )
break;
if ( ((unsigned long long)mysql_get_server_version(mysql, a1) < 0xC353
|| (*(unsigned int ( **)(void *, _QWORD, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*row,
"information_schema"))
&& ((unsigned long long)mysql_get_server_version(mysql, a1) < 0xC547
|| (*(unsigned int ( **)(void *, _QWORD, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*row,
"performance_schema"))
&& ((unsigned long long)mysql_get_server_version(mysql, a1) < 0x188F8
|| (*(unsigned int ( **)(void *, _QWORD, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*row,
"sys"))
&& (unsigned __int8)include_database(*row)
&& (unsigned int)dump_all_tables_in_db(*row) )
{
v5 = 1;
}
}
mysql_free_result(v6);
if ( seen_views )
{
if ( (unsigned int)mysql_query(mysql, "SHOW DATABASES") || (v6 = mysql_store_result(mysql)) == 0 )
{
v3 = stderr;
v4 = (const char *)my_progname_short;
v1 = (const char *)mysql_error(mysql);
fprintf(v3, "%s: Error: Couldn't execute 'SHOW DATABASES': %s\n", v4, v1);
return 1;
}
while ( 1 )
{
row = (_QWORD *)mysql_fetch_row(v6);
if ( !row )
break;
if ( ((unsigned long long)mysql_get_server_version(mysql, a1) < 0xC353
|| (*(unsigned int ( **)(void *, _QWORD, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*row,
"information_schema"))
&& ((unsigned long long)mysql_get_server_version(mysql, a1) < 0xC547
|| (*(unsigned int ( **)(void *, _QWORD, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*row,
"performance_schema"))
&& ((unsigned long long)mysql_get_server_version(mysql, a1) < 0x188F8
|| (*(unsigned int ( **)(void *, _QWORD, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*row,
"sys"))
&& (unsigned __int8)include_database(*row)
&& (unsigned __int8)dump_all_views_in_db(*row) )
{
v5 = 1;
}
}
mysql_free_result(v6);
}
return v5;
}
return 1;
}
|
dump_all_databases:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [0x005014c8]
LEA RSI,[RBP + -0x18]
LEA RDX,[0x1dc24b]
CALL 0x00139350
CMP EAX,0x0
JZ 0x0013e867
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013eb3a
LAB_0013e867:
JMP 0x0013e869
LAB_0013e869:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00151800
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0013e981
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0xc353
JC 0x0013e8c4
LEA RAX,[0x3f0500]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX]
LEA RDI,[0x3f0500]
LEA RDX,[0x1dc25a]
CALL RAX
CMP EAX,0x0
JNZ 0x0013e8c4
JMP 0x0013e869
LAB_0013e8c4:
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0xc547
JC 0x0013e90b
LEA RAX,[0x3f0500]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX]
LEA RDI,[0x3f0500]
LEA RDX,[0x1dc26d]
CALL RAX
CMP EAX,0x0
JNZ 0x0013e90b
JMP 0x0013e869
LAB_0013e90b:
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0x188f8
JC 0x0013e952
LEA RAX,[0x3f0500]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX]
LEA RDI,[0x3f0500]
LEA RDX,[0x1e3773]
CALL RAX
CMP EAX,0x0
JNZ 0x0013e952
JMP 0x0013e869
LAB_0013e952:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0013eb50
CMP AL,0x0
JZ 0x0013e97c
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0013eba0
CMP EAX,0x0
JZ 0x0013e97a
MOV dword ptr [RBP + -0x1c],0x1
LAB_0013e97a:
JMP 0x0013e97c
LAB_0013e97c:
JMP 0x0013e869
LAB_0013e981:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00148d00
CMP byte ptr [0x005014c0],0x0
JZ 0x0013eb34
MOV RDI,qword ptr [0x005014c8]
LEA RSI,[0x1dc24b]
CALL 0x0014fe70
CMP EAX,0x0
JNZ 0x0013e9c5
MOV RDI,qword ptr [0x005014c8]
CALL 0x001514c0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013ea12
LAB_0013e9c5:
MOV RAX,qword ptr [0x00344fe0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x50cbd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [0x005014c8]
CALL 0x001537f0
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,RAX
LEA RSI,[0x1dc280]
MOV AL,0x0
CALL 0x001381d0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013eb3a
LAB_0013ea12:
JMP 0x0013ea14
LAB_0013ea14:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00151800
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0013eb2b
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0xc353
JC 0x0013ea6f
LEA RAX,[0x3f0500]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX]
LEA RDI,[0x3f0500]
LEA RDX,[0x1dc25a]
CALL RAX
CMP EAX,0x0
JNZ 0x0013ea6f
JMP 0x0013ea14
LAB_0013ea6f:
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0xc547
JC 0x0013eab6
LEA RAX,[0x3f0500]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX]
LEA RDI,[0x3f0500]
LEA RDX,[0x1dc26d]
CALL RAX
CMP EAX,0x0
JNZ 0x0013eab6
JMP 0x0013ea14
LAB_0013eab6:
MOV RDI,qword ptr [0x005014c8]
CALL 0x001523b0
CMP RAX,0x188f8
JC 0x0013eafd
LEA RAX,[0x3f0500]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX]
LEA RDI,[0x3f0500]
LEA RDX,[0x1e3773]
CALL RAX
CMP EAX,0x0
JNZ 0x0013eafd
JMP 0x0013ea14
LAB_0013eafd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0013eb50
CMP AL,0x0
JZ 0x0013eb26
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0013f290
CMP AL,0x0
JZ 0x0013eb24
MOV dword ptr [RBP + -0x1c],0x1
LAB_0013eb24:
JMP 0x0013eb26
LAB_0013eb26:
JMP 0x0013ea14
LAB_0013eb2b:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00148d00
LAB_0013eb34:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013eb3a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 dump_all_databases(void)
{
FILE *__stream;
int8 uVar1;
char cVar2;
int iVar3;
ulong uVar4;
int8 uVar5;
int4 local_24;
long local_20;
int8 *local_18;
int4 local_c;
local_24 = 0;
iVar3 = mysql_query_with_error_report(mysql,&local_20,"SHOW DATABASES");
if (iVar3 == 0) {
while (local_18 = (int8 *)mysql_fetch_row(local_20), local_18 != (int8 *)0x0) {
uVar4 = mysql_get_server_version(mysql);
if ((((uVar4 < 0xc353) ||
(iVar3 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003f05c0 + 0x40))
(&my_charset_latin1,*local_18,"information_schema"), iVar3 != 0)) &&
((uVar4 = mysql_get_server_version(mysql), uVar4 < 0xc547 ||
(iVar3 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003f05c0 + 0x40))
(&my_charset_latin1,*local_18,"performance_schema"), iVar3 != 0)))) &&
((((uVar4 = mysql_get_server_version(mysql), uVar4 < 0x188f8 ||
(iVar3 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003f05c0 + 0x40))
(&my_charset_latin1,*local_18,&DAT_001e3773), iVar3 != 0)) &&
(cVar2 = include_database(*local_18), cVar2 != '\0')) &&
(iVar3 = dump_all_tables_in_db(*local_18), iVar3 != 0)))) {
local_24 = 1;
}
}
mysql_free_result(local_20);
if (seen_views != '\0') {
iVar3 = mysql_query(mysql,"SHOW DATABASES");
if ((iVar3 != 0) || (local_20 = mysql_store_result(mysql), local_20 == 0)) {
uVar1 = my_progname_short;
__stream = *(FILE **)PTR_stderr_00344fe0;
uVar5 = mysql_error(mysql);
fprintf(__stream,"%s: Error: Couldn\'t execute \'SHOW DATABASES\': %s\n",uVar1,uVar5);
return 1;
}
while (local_18 = (int8 *)mysql_fetch_row(local_20), local_18 != (int8 *)0x0) {
uVar4 = mysql_get_server_version(mysql);
if ((((uVar4 < 0xc353) ||
(iVar3 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003f05c0 + 0x40))
(&my_charset_latin1,*local_18,"information_schema"), iVar3 != 0)) &&
((uVar4 = mysql_get_server_version(mysql), uVar4 < 0xc547 ||
(iVar3 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003f05c0 + 0x40))
(&my_charset_latin1,*local_18,"performance_schema"), iVar3 != 0))))
&& ((((uVar4 = mysql_get_server_version(mysql), uVar4 < 0x188f8 ||
(iVar3 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003f05c0 + 0x40))
(&my_charset_latin1,*local_18,&DAT_001e3773), iVar3 != 0)) &&
(cVar2 = include_database(*local_18), cVar2 != '\0')) &&
(cVar2 = dump_all_views_in_db(*local_18), cVar2 != '\0')))) {
local_24 = 1;
}
}
mysql_free_result(local_20);
}
local_c = local_24;
}
else {
local_c = 1;
}
return local_c;
}
|
|
61,220
|
my_strnxfrm_unicode_full_bin_internal
|
eloqsql/strings/ctype-utf8.c
|
size_t
my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs,
uchar *dst, uchar *de, uint *nweights,
const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
uchar *dst0= dst;
DBUG_ASSERT(src || !se);
DBUG_ASSERT(cs->state & MY_CS_BINSORT);
for (; dst < de && *nweights; (*nweights)--)
{
int res;
if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0)
break;
src+= res;
*dst++= (uchar) (wc >> 16);
if (dst < de)
{
*dst++= (uchar) ((wc >> 8) & 0xFF);
if (dst < de)
*dst++= (uchar) (wc & 0xFF);
}
}
return dst - dst0;
}
|
O0
|
c
|
my_strnxfrm_unicode_full_bin_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xe3c92
jmp 0xe3c94
jmp 0xe3c96
jmp 0xe3c98
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0xe3cb4
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0xe3cc0
jmp 0xe3d80
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jg 0xe3cee
jmp 0xe3d80
movl -0x44(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xe3d6e
movq -0x38(%rbp), %rax
shrq $0x8, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xe3d6c
movq -0x38(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xe3d6e
jmp 0xe3d70
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0xe3c98
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strnxfrm_unicode_full_bin_internal:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
jmp short $+2
loc_E3C92:
jmp short $+2
loc_E3C94:
jmp short $+2
loc_E3C96:
jmp short $+2
loc_E3C98:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_45], al
jnb short loc_E3CB4
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
setnz al
mov [rbp+var_45], al
loc_E3CB4:
mov al, [rbp+var_45]
test al, 1
jnz short loc_E3CC0
jmp loc_E3D80
loc_E3CC0:
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_38]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jg short loc_E3CEE
jmp loc_E3D80
loc_E3CEE:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_38]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_E3D6E
mov rax, [rbp+var_38]
shr rax, 8
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_E3D6C
mov rax, [rbp+var_38]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_E3D6C:
jmp short $+2
loc_E3D6E:
jmp short $+2
loc_E3D70:
mov rax, [rbp+var_20]
mov ecx, [rax]
add ecx, 0FFFFFFFFh
mov [rax], ecx
jmp loc_E3C98
loc_E3D80:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
sub rax, rcx
add rsp, 50h
pop rbp
retn
|
_BYTE * my_strnxfrm_unicode_full_bin_internal(
long long a1,
_BYTE *a2,
unsigned long long a3,
_DWORD *a4,
long long a5,
long long a6)
{
_BYTE *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rax
bool v10; // [rsp+Bh] [rbp-45h]
int v11; // [rsp+Ch] [rbp-44h]
_BYTE v12[8]; // [rsp+18h] [rbp-38h] BYREF
long long v13; // [rsp+20h] [rbp-30h]
long long v14; // [rsp+28h] [rbp-28h]
_DWORD *v15; // [rsp+30h] [rbp-20h]
unsigned long long v16; // [rsp+38h] [rbp-18h]
_BYTE *v17; // [rsp+40h] [rbp-10h]
long long v18; // [rsp+48h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
while ( 1 )
{
v10 = 0;
if ( (unsigned long long)v17 < v16 )
v10 = *v15 != 0;
if ( !v10 )
break;
v11 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(v18 + 184) + 40LL))(
v18,
v12,
v14,
v13);
if ( v11 <= 0 )
break;
v14 += v11;
v6 = v17++;
*v6 = v12[2];
if ( (unsigned long long)v17 < v16 )
{
v7 = v17++;
*v7 = v12[1];
if ( (unsigned long long)v17 < v16 )
{
v8 = v17++;
*v8 = v12[0];
}
}
--*v15;
}
return (_BYTE *)(v17 - a2);
}
|
my_strnxfrm_unicode_full_bin_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001e3c92
LAB_001e3c92:
JMP 0x001e3c94
LAB_001e3c94:
JMP 0x001e3c96
LAB_001e3c96:
JMP 0x001e3c98
LAB_001e3c98:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x45],AL
JNC 0x001e3cb4
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
SETNZ AL
MOV byte ptr [RBP + -0x45],AL
LAB_001e3cb4:
MOV AL,byte ptr [RBP + -0x45]
TEST AL,0x1
JNZ 0x001e3cc0
JMP 0x001e3d80
LAB_001e3cc0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JG 0x001e3cee
JMP 0x001e3d80
LAB_001e3cee:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001e3d6e
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001e3d6c
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_001e3d6c:
JMP 0x001e3d6e
LAB_001e3d6e:
JMP 0x001e3d70
LAB_001e3d70:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
ADD ECX,-0x1
MOV dword ptr [RAX],ECX
JMP 0x001e3c98
LAB_001e3d80:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
ADD RSP,0x50
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin_internal
(long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5,
int8 param_6)
{
int iVar1;
int1 *puVar2;
int1 *puVar3;
bool bVar4;
int1 local_40 [8];
int8 local_38;
long local_30;
int *local_28;
int1 *local_20;
int1 *local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar4 = false;
if (local_18 < local_20) {
bVar4 = *local_28 != 0;
}
if ((!bVar4) ||
(iVar1 = (**(code **)(*(long *)(local_10 + 0xb8) + 0x28))
(local_10,local_40,local_30,local_38), iVar1 < 1)) break;
local_30 = local_30 + iVar1;
puVar2 = local_18 + 1;
*local_18 = local_40[2];
if (puVar2 < local_20) {
puVar3 = local_18 + 2;
*puVar2 = local_40[1];
puVar2 = puVar3;
if (puVar3 < local_20) {
*puVar3 = local_40[0];
puVar2 = local_18 + 3;
}
}
local_18 = puVar2;
*local_28 = *local_28 + -1;
}
return (long)local_18 - (long)param_2;
}
|
|
61,221
|
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, char const*, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
FMT_CONSTEXPR auto write(OutputIt out, const Char* s,
const format_specs<Char>& specs, locale_ref)
-> OutputIt {
if (specs.type == presentation_type::pointer)
return write_ptr<Char>(out, bit_cast<uintptr_t>(s), &specs);
if (!s) throw_format_error("string pointer is null");
return write(out, basic_string_view<Char>(s), specs, {});
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, char const*, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref):
subq $0x78, %rsp
movq %rdi, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpb $0x11, 0x8(%rax)
jne 0xc5b63
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xc5c00
movq %rax, %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rdi
callq 0xb94b0
movq %rax, 0x58(%rsp)
jmp 0xc5bf6
cmpq $0x0, 0x40(%rsp)
jne 0xc5b77
leaq 0x317dc3(%rip), %rdi # 0x3dd935
callq 0x9f520
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
leaq 0x18(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, (%rax)
movq 0x68(%rsp), %rdi
callq 0x8e730
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rcx
leaq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq $0x0, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %r8
callq 0xc5c30
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
addq $0x78, %rsp
retq
|
_ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_PKT_RKNS0_12format_specsIS5_EENS1_10locale_refE:
sub rsp, 78h
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_30], rcx
mov [rsp+78h+var_38], rsi
mov [rsp+78h+var_40], rdx
mov rax, [rsp+78h+var_40]
cmp byte ptr [rax+8], 11h
jnz short loc_C5B63
mov rax, [rsp+78h+var_28]
mov [rsp+78h+var_48], rax
lea rdi, [rsp+78h+var_38]
call _ZN3fmt3v106detail8bit_castImPKcTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES6_RKS7_
mov rsi, rax; char *
mov rdx, [rsp+78h+var_40]
mov rdi, [rsp+78h+var_48]
call _ZN3fmt3v106detail9write_ptrIcNS0_8appenderEmEET0_S4_T1_PKNS0_12format_specsIT_EE; fmt::v10::detail::write_ptr<char,fmt::v10::appender,ulong>(fmt::v10::appender,ulong,fmt::v10::format_specs<char> const*)
mov [rsp+78h+var_20], rax
jmp loc_C5BF6
loc_C5B63:
cmp [rsp+78h+var_38], 0
jnz short loc_C5B77
lea rdi, aStringPointerI; "string pointer is null"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
loc_C5B77:
mov rax, [rsp+78h+var_28]
mov [rsp+78h+var_50], rax
mov rax, [rsp+78h+var_38]
lea rcx, [rsp+78h+var_60]
mov [rsp+78h+var_8], rcx
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_70], rax
mov rcx, [rsp+78h+var_10]
mov [rax], rcx
mov rdi, [rsp+78h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+78h+var_70]
mov [rax+8], rcx
mov rcx, [rsp+78h+var_40]
lea rax, [rsp+78h+var_68]
mov [rsp+78h+var_18], rax
mov rax, [rsp+78h+var_18]
mov qword ptr [rax], 0
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_58]
mov r8, [rsp+78h+var_68]
call _ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewINS0_13type_identityIT_E4typeEEERKNS0_12format_specsIS7_EENS1_10locale_refE; fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<fmt::v10::type_identity<char>::type>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)
mov [rsp+78h+var_20], rax
loc_C5BF6:
mov rax, [rsp+78h+var_20]
add rsp, 78h
retn
|
long long fmt::v10::detail::write<char,fmt::v10::appender>(long long a1, const char *a2, long long a3, long long a4)
{
long long v4; // rax
long long v6; // [rsp+10h] [rbp-68h] BYREF
long long v7; // [rsp+18h] [rbp-60h] BYREF
long long v8; // [rsp+20h] [rbp-58h]
long long v9; // [rsp+28h] [rbp-50h]
long long v10; // [rsp+30h] [rbp-48h]
long long v11; // [rsp+38h] [rbp-40h]
_QWORD v12[2]; // [rsp+40h] [rbp-38h] BYREF
long long v13; // [rsp+50h] [rbp-28h]
long long *v15; // [rsp+60h] [rbp-18h]
long long v16; // [rsp+68h] [rbp-10h]
long long *v17; // [rsp+70h] [rbp-8h]
v13 = a1;
v12[1] = a4;
v12[0] = a2;
v11 = a3;
if ( *(_BYTE *)(a3 + 8) == 17 )
{
v10 = v13;
v4 = ZN3fmt3v106detail8bit_castImPKcTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES6_RKS7_(v12);
return fmt::v10::detail::write_ptr<char,fmt::v10::appender,unsigned long>(v10, v4, v11);
}
else
{
if ( !v12[0] )
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"string pointer is null", a2);
v9 = v13;
v17 = &v7;
v16 = v12[0];
v7 = v12[0];
v8 = strlen(v12[0]);
v15 = &v6;
v6 = 0LL;
return fmt::v10::detail::write<char,fmt::v10::appender>(v9, v7, v8, v11, 0LL);
}
}
|
write<char,fmt::v10::appender>:
SUB RSP,0x78
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x38]
CMP byte ptr [RAX + 0x8],0x11
JNZ 0x001c5b63
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x40]
CALL 0x001c5c00
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001b94b0
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001c5bf6
LAB_001c5b63:
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x001c5b77
LEA RDI,[0x4dd935]
CALL 0x0019f520
LAB_001c5b77:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x40]
LEA RCX,[RSP + 0x18]
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x68]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x0018e730
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX],0x0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV R8,qword ptr [RSP + 0x10]
CALL 0x001c5c30
MOV qword ptr [RSP + 0x58],RAX
LAB_001c5bf6:
MOV RAX,qword ptr [RSP + 0x58]
ADD RSP,0x78
RET
|
/* fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, char
const*, fmt::v10::format_specs<char> const&, fmt::v10::detail::locale_ref) */
int8
fmt::v10::detail::write<char,fmt::v10::appender>
(int8 param_1,char *param_2,long param_3,int8 param_4)
{
int8 uVar1;
size_t sVar2;
int1 local_68 [8];
char *local_60 [2];
int8 local_50;
int8 local_48;
long local_40;
char *local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int1 *local_18;
char *local_10;
char **local_8;
local_40 = param_3;
local_38 = param_2;
local_30 = param_4;
local_28 = param_1;
if (*(char *)(param_3 + 8) == '\x11') {
local_48 = param_1;
uVar1 = _ZN3fmt3v106detail8bit_castImPKcTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES6_RKS7_
(&local_38);
local_20 = write_ptr<char,fmt::v10::appender,unsigned_long>(local_48,uVar1,local_40);
}
else {
if (param_2 == (char *)0x0) {
/* WARNING: Subroutine does not return */
throw_format_error("string pointer is null");
}
local_8 = local_60;
local_60[0] = param_2;
local_50 = param_1;
local_10 = param_2;
sVar2 = strlen(param_2);
local_18 = local_68;
local_20 = write<char,fmt::v10::appender>(local_50,local_60[0],sVar2,local_40,0);
}
return local_20;
}
|
|
61,222
|
trnman_init_tmp_trn_for_logging_trid
|
eloqsql/storage/maria/trnman.c
|
void trnman_init_tmp_trn_for_logging_trid(TRN *trn)
{
*trn= dummy_transaction_object;
/* Avoid logging short_id */
trn->short_id= 1;
/* Trid gets logged in translog_write_record */
trn->first_undo_lsn= 0;
/* Get next free trid */
trn->trid= trnman_get_min_safe_trid();
}
|
O3
|
c
|
trnman_init_tmp_trn_for_logging_trid:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3b5f87(%rip), %rsi # 0x3fcfe0
movl $0xb0, %edx
callq 0x29080
movw $0x1, 0xac(%rbx)
movq $0x0, 0xa0(%rbx)
callq 0x47563
movq %rax, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
trnman_init_tmp_trn_for_logging_trid:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rsi, dummy_transaction_object
mov edx, 0B0h
call _memcpy
mov word ptr [rbx+0ACh], 1
mov qword ptr [rbx+0A0h], 0
call trnman_get_min_safe_trid
mov [rbx+78h], rax
add rsp, 8
pop rbx
pop rbp
retn
|
long long trnman_init_tmp_trn_for_logging_trid(long long a1)
{
long long result; // rax
memcpy(a1, dummy_transaction_object, 176LL);
*(_WORD *)(a1 + 172) = 1;
*(_QWORD *)(a1 + 160) = 0LL;
result = trnman_get_min_safe_trid(a1);
*(_QWORD *)(a1 + 120) = result;
return result;
}
|
trnman_init_tmp_trn_for_logging_trid:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RSI,[0x4fcfe0]
MOV EDX,0xb0
CALL 0x00129080
MOV word ptr [RBX + 0xac],0x1
MOV qword ptr [RBX + 0xa0],0x0
CALL 0x00147563
MOV qword ptr [RBX + 0x78],RAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void trnman_init_tmp_trn_for_logging_trid(void *param_1)
{
int8 uVar1;
memcpy(param_1,dummy_transaction_object,0xb0);
*(int2 *)((long)param_1 + 0xac) = 1;
*(int8 *)((long)param_1 + 0xa0) = 0;
uVar1 = trnman_get_min_safe_trid();
*(int8 *)((long)param_1 + 0x78) = uVar1;
return;
}
|
|
61,223
|
GenImageText
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Image GenImageText(int width, int height, const char *text)
{
Image image = { 0 };
int textLength = (int)strlen(text);
int imageViewSize = width*height;
image.width = width;
image.height = height;
image.format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE;
image.data = RL_CALLOC(imageViewSize, 1);
image.mipmaps = 1;
memcpy(image.data, text, (textLength > imageViewSize)? imageViewSize : textLength);
return image;
}
|
O2
|
c
|
GenImageText:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movq %rcx, %rdi
callq 0x9210
movq %rax, %r12
movl %ebp, %eax
imull %r15d, %eax
movl %r15d, 0x8(%rbx)
movl %ebp, 0xc(%rbx)
pushq $0x1
popq %rbp
movl %ebp, 0x14(%rbx)
movslq %eax, %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x9320
movq %rax, (%rbx)
movl %ebp, 0x10(%rbx)
cmpl %r12d, %r15d
cmovll %r15d, %r12d
movslq %r12d, %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x9400
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
GenImageText:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rcx
mov ebp, edx
mov r15d, esi
mov rbx, rdi
mov rdi, rcx
call _strlen
mov r12, rax
mov eax, ebp
imul eax, r15d
mov [rbx+8], r15d
mov [rbx+0Ch], ebp
push 1
pop rbp
mov [rbx+14h], ebp
movsxd r15, eax
push 1
pop rsi
mov rdi, r15
call _calloc
mov [rbx], rax
mov [rbx+10h], ebp
cmp r15d, r12d
cmovl r12d, r15d
movsxd rdx, r12d
mov rdi, rax
mov rsi, r14
call _memcpy
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long GenImageText(long long a1, int a2, int a3, long long a4)
{
int v6; // r12d
long long v7; // rax
v6 = strlen(a4);
*(_DWORD *)(a1 + 8) = a2;
*(_DWORD *)(a1 + 12) = a3;
*(_DWORD *)(a1 + 20) = 1;
v7 = calloc(a2 * a3, 1LL);
*(_QWORD *)a1 = v7;
*(_DWORD *)(a1 + 16) = 1;
if ( a2 * a3 < v6 )
v6 = a2 * a3;
memcpy(v7, a4, v6);
return a1;
}
|
GenImageText:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RCX
MOV EBP,EDX
MOV R15D,ESI
MOV RBX,RDI
MOV RDI,RCX
CALL 0x00109210
MOV R12,RAX
MOV EAX,EBP
IMUL EAX,R15D
MOV dword ptr [RBX + 0x8],R15D
MOV dword ptr [RBX + 0xc],EBP
PUSH 0x1
POP RBP
MOV dword ptr [RBX + 0x14],EBP
MOVSXD R15,EAX
PUSH 0x1
POP RSI
MOV RDI,R15
CALL 0x00109320
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x10],EBP
CMP R15D,R12D
CMOVL R12D,R15D
MOVSXD RDX,R12D
MOV RDI,RAX
MOV RSI,R14
CALL 0x00109400
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 * GenImageText(int8 *param_1,int param_2,int param_3,char *param_4)
{
int iVar1;
size_t sVar2;
void *__dest;
int iVar3;
sVar2 = strlen(param_4);
iVar1 = param_3 * param_2;
*(int *)(param_1 + 1) = param_2;
*(int *)((long)param_1 + 0xc) = param_3;
*(int4 *)((long)param_1 + 0x14) = 1;
__dest = calloc((long)iVar1,1);
*param_1 = __dest;
*(int4 *)(param_1 + 2) = 1;
iVar3 = (int)sVar2;
if (iVar1 < (int)sVar2) {
iVar3 = iVar1;
}
memcpy(__dest,param_4,(long)iVar3);
return param_1;
}
|
|
61,224
|
exported_names_cmp
|
bluesky950520[P]quickjs/quickjs.c
|
static int exported_names_cmp(const void *p1, const void *p2, void *opaque)
{
JSContext *ctx = opaque;
const ExportedNameEntry *me1 = p1;
const ExportedNameEntry *me2 = p2;
JSValue str1, str2;
int ret;
/* XXX: should avoid allocation memory in atom comparison */
str1 = JS_AtomToString(ctx, me1->export_name);
str2 = JS_AtomToString(ctx, me2->export_name);
if (JS_IsException(str1) || JS_IsException(str2)) {
/* XXX: raise an error ? */
ret = 0;
} else {
ret = js_string_compare(JS_VALUE_GET_STRING(str1),
JS_VALUE_GET_STRING(str2));
}
JS_FreeValue(ctx, str1);
JS_FreeValue(ctx, str2);
return ret;
}
|
O0
|
c
|
exported_names_cmp:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rax
movl (%rax), %esi
callq 0x27d40
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rax
movl (%rax), %esi
callq 0x27d40
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
jne 0x726b5
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x726bf
movl $0x0, 0x24(%rsp)
jmp 0x726d2
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x70840
movl %eax, 0x24(%rsp)
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x229d0
movq 0x58(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x229d0
movl 0x24(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
|
exported_names_cmp:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov [rsp+78h+var_18], rdx
mov rax, [rsp+78h+var_18]
mov [rsp+78h+var_20], rax
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_28], rax
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_28]
mov esi, [rax]
call JS_AtomToString
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], rdx
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_40], rax
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_38], rax
mov rdi, [rsp+78h+var_20]
mov rax, [rsp+78h+var_30]
mov esi, [rax]
call JS_AtomToString
mov [rsp+78h+var_78], rax
mov [rsp+78h+var_70], rdx
mov rax, [rsp+78h+var_78]
mov [rsp+78h+var_50], rax
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_48], rax
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_38]
call JS_IsException_1
cmp eax, 0
jnz short loc_726B5
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_726BF
loc_726B5:
mov [rsp+78h+var_54], 0
jmp short loc_726D2
loc_726BF:
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_50]
call js_string_compare
mov [rsp+78h+var_54], eax
loc_726D2:
mov rdi, [rsp+78h+var_20]
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
call JS_FreeValue
mov rdi, [rsp+78h+var_20]
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_48]
call JS_FreeValue
mov eax, [rsp+78h+var_54]
add rsp, 78h
retn
|
long long exported_names_cmp(unsigned int *a1, unsigned int *a2, long long a3)
{
long long v3; // rdx
long long v4; // rdx
long long v6; // [rsp+0h] [rbp-78h]
long long v7; // [rsp+10h] [rbp-68h]
unsigned int v8; // [rsp+24h] [rbp-54h]
long long v9; // [rsp+30h] [rbp-48h]
long long v10; // [rsp+40h] [rbp-38h]
v7 = JS_AtomToString(a3, *a1);
v10 = v3;
v6 = JS_AtomToString(a3, *a2);
v9 = v4;
if ( JS_IsException_1(v7, v10) || JS_IsException_1(v6, v9) )
v8 = 0;
else
v8 = js_string_compare(v7, v6);
JS_FreeValue(a3, v7, v10);
JS_FreeValue(a3, v6, v9);
return v8;
}
|
exported_names_cmp:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
MOV ESI,dword ptr [RAX]
CALL 0x00127d40
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x48]
MOV ESI,dword ptr [RAX]
CALL 0x00127d40
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00122a00
CMP EAX,0x0
JNZ 0x001726b5
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001726bf
LAB_001726b5:
MOV dword ptr [RSP + 0x24],0x0
JMP 0x001726d2
LAB_001726bf:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00170840
MOV dword ptr [RSP + 0x24],EAX
LAB_001726d2:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x001229d0
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x78
RET
|
int4 exported_names_cmp(int4 *param_1,int4 *param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int4 local_54;
auVar4 = JS_AtomToString(param_3,*param_1);
uVar2 = auVar4._0_8_;
auVar5 = JS_AtomToString(param_3,*param_2);
uVar3 = auVar5._0_8_;
iVar1 = JS_IsException(uVar2,auVar4._8_8_);
if (iVar1 == 0) {
iVar1 = JS_IsException(uVar3,auVar5._8_8_);
if (iVar1 == 0) {
local_54 = js_string_compare(uVar2,uVar3);
goto LAB_001726d2;
}
}
local_54 = 0;
LAB_001726d2:
JS_FreeValue(param_3,uVar2,auVar4._8_8_);
JS_FreeValue(param_3,uVar3,auVar5._8_8_);
return local_54;
}
|
|
61,225
|
exported_names_cmp
|
bluesky950520[P]quickjs/quickjs.c
|
static int exported_names_cmp(const void *p1, const void *p2, void *opaque)
{
JSContext *ctx = opaque;
const ExportedNameEntry *me1 = p1;
const ExportedNameEntry *me2 = p2;
JSValue str1, str2;
int ret;
/* XXX: should avoid allocation memory in atom comparison */
str1 = JS_AtomToString(ctx, me1->export_name);
str2 = JS_AtomToString(ctx, me2->export_name);
if (JS_IsException(str1) || JS_IsException(str2)) {
/* XXX: raise an error ? */
ret = 0;
} else {
ret = js_string_compare(JS_VALUE_GET_STRING(str1),
JS_VALUE_GET_STRING(str2));
}
JS_FreeValue(ctx, str1);
JS_FreeValue(ctx, str2);
return ret;
}
|
O1
|
c
|
exported_names_cmp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movl (%rdi), %esi
movq %rdx, %rdi
movl $0x1, %edx
callq 0x1fb46
movq %rax, %r14
movq %rdx, %r15
movq %rax, 0x10(%rsp)
movl (%r12), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1fb46
movq %rax, %r12
movq %rdx, %r13
movq %rax, 0x8(%rsp)
cmpl $0x6, %r15d
sete %al
cmpl $0x6, %r13d
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x42cc5
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x422cb
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1ccb2
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
exported_names_cmp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r12, rsi
mov esi, [rdi]
mov rdi, rdx
mov edx, 1
call __JS_AtomToValue
mov r14, rax
mov r15, rdx
mov [rsp+48h+var_38], rax
mov esi, [r12]
mov rdi, rbx
mov edx, 1
call __JS_AtomToValue
mov r12, rax
mov r13, rdx
mov [rsp+48h+var_40], rax
cmp r15d, 6
setz al
cmp r13d, 6
setz cl
xor ebp, ebp
or cl, al
jnz short loc_42CC5
mov rdi, [rsp+48h+var_38]
mov rsi, [rsp+48h+var_40]
call js_string_compare
mov ebp, eax
loc_42CC5:
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r13
call JS_FreeValueRT
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long exported_names_cmp(int *a1, int *a2, long long a3)
{
_DWORD *v4; // r14
long long v5; // rdx
long long v6; // r15
_DWORD *v7; // r12
long long v8; // rdx
long long v9; // r13
unsigned int v10; // ebp
v4 = (_DWORD *)_JS_AtomToValue(a3, *a1, 1);
v6 = v5;
v7 = (_DWORD *)_JS_AtomToValue(a3, *a2, 1);
v9 = v8;
v10 = 0;
if ( (_DWORD)v6 != 6 && (_DWORD)v8 != 6 )
v10 = js_string_compare((long long)v4, (long long)v7);
JS_FreeValueRT(*(_QWORD *)(a3 + 24), v4, v6);
JS_FreeValueRT(*(_QWORD *)(a3 + 24), v7, v9);
return v10;
}
|
exported_names_cmp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R12,RSI
MOV ESI,dword ptr [RDI]
MOV RDI,RDX
MOV EDX,0x1
CALL 0x0011fb46
MOV R14,RAX
MOV R15,RDX
MOV qword ptr [RSP + 0x10],RAX
MOV ESI,dword ptr [R12]
MOV RDI,RBX
MOV EDX,0x1
CALL 0x0011fb46
MOV R12,RAX
MOV R13,RDX
MOV qword ptr [RSP + 0x8],RAX
CMP R15D,0x6
SETZ AL
CMP R13D,0x6
SETZ CL
XOR EBP,EBP
OR CL,AL
JNZ 0x00142cc5
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001422cb
MOV EBP,EAX
LAB_00142cc5:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011ccb2
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 exported_names_cmp(int4 *param_1,int4 *param_2,long param_3)
{
int4 uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
auVar2 = __JS_AtomToValue(param_3,*param_1,1);
auVar3 = __JS_AtomToValue(param_3,*param_2,1);
uVar1 = 0;
if (auVar3._8_4_ != 6 && auVar2._8_4_ != 6) {
uVar1 = js_string_compare(auVar2._0_8_,auVar3._0_8_);
}
JS_FreeValueRT(*(int8 *)(param_3 + 0x18),auVar2._0_8_,auVar2._8_8_);
JS_FreeValueRT(*(int8 *)(param_3 + 0x18),auVar3._0_8_,auVar3._8_8_);
return uVar1;
}
|
|
61,226
|
hash_string
|
tsotchke[P]eshkol/src/core/utils/string_table.c
|
static uint32_t hash_string(const char* string, size_t length) {
uint32_t hash = 2166136261u; // FNV offset basis
for (size_t i = 0; i < length; i++) {
hash ^= (uint8_t)string[i];
hash *= 16777619u; // FNV prime
}
return hash;
}
|
O0
|
c
|
hash_string:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x811c9dc5, -0x14(%rbp) # imm = 0x811C9DC5
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x43ff
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
xorl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
imull $0x1000193, -0x14(%rbp), %eax # imm = 0x1000193
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x43cb
movl -0x14(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
hash_string:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 811C9DC5h
mov [rbp+var_20], 0
loc_43CB:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
jnb short loc_43FF
mov rax, [rbp+var_8]
mov rcx, [rbp+var_20]
movzx eax, byte ptr [rax+rcx]
xor eax, [rbp+var_14]
mov [rbp+var_14], eax
imul eax, [rbp+var_14], 1000193h
mov [rbp+var_14], eax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_43CB
loc_43FF:
mov eax, [rbp+var_14]
pop rbp
retn
|
long long hash_string(long long a1, unsigned long long a2)
{
unsigned long long i; // [rsp+0h] [rbp-20h]
unsigned int v4; // [rsp+Ch] [rbp-14h]
v4 = -2128831035;
for ( i = 0LL; i < a2; ++i )
v4 = 16777619 * (v4 ^ *(unsigned __int8 *)(a1 + i));
return v4;
}
|
hash_string:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x811c9dc5
MOV qword ptr [RBP + -0x20],0x0
LAB_001043cb:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x001043ff
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
XOR EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
IMUL EAX,dword ptr [RBP + -0x14],0x1000193
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001043cb
LAB_001043ff:
MOV EAX,dword ptr [RBP + -0x14]
POP RBP
RET
|
uint hash_string(long param_1,ulong param_2)
{
int8 local_28;
int4 local_1c;
local_1c = 0x811c9dc5;
for (local_28 = 0; local_28 < param_2; local_28 = local_28 + 1) {
local_1c = (*(byte *)(param_1 + local_28) ^ local_1c) * 0x1000193;
}
return local_1c;
}
|
|
61,227
|
JS_FreeCString
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_FreeCString(JSContext *ctx, const char *ptr)
{
JSString *p;
if (!ptr)
return;
/* purposely removing constness */
p = container_of(ptr, JSString, u);
JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, p));
}
|
O2
|
c
|
JS_FreeCString:
testq %rsi, %rsi
je 0x1b068
addq $-0x18, %rsi
pushq $-0x7
popq %rdx
jmp 0x1801e
retq
|
JS_FreeCString:
test rsi, rsi
jz short locret_1B068
add rsi, 0FFFFFFFFFFFFFFE8h
push 0FFFFFFFFFFFFFFF9h
pop rdx
jmp JS_FreeValue
locret_1B068:
retn
|
long long JS_FreeCString(long long a1, long long a2)
{
long long result; // rax
if ( a2 )
return JS_FreeValue(a1, a2 - 24, -7LL);
return result;
}
|
JS_FreeCString:
TEST RSI,RSI
JZ 0x0011b068
ADD RSI,-0x18
PUSH -0x7
POP RDX
JMP 0x0011801e
LAB_0011b068:
RET
|
void JS_FreeCString(int8 param_1,long param_2)
{
if (param_2 != 0) {
JS_FreeValue(param_1,param_2 + -0x18,0xfffffffffffffff9);
return;
}
return;
}
|
|
61,228
|
translog_buffer_init
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_buffer_init(struct st_translog_buffer *buffer, int num)
{
DBUG_ENTER("translog_buffer_init");
buffer->pre_force_close_horizon=
buffer->prev_last_lsn= buffer->last_lsn=
LSN_IMPOSSIBLE;
DBUG_PRINT("info", ("last_lsn and prev_last_lsn set to 0 buffer: %p",
buffer));
buffer->buffer_no= (uint8) num;
/* This Buffer File */
buffer->file= NULL;
buffer->overlay= 0;
/* cache for current log */
memset(buffer->buffer, TRANSLOG_FILLER, TRANSLOG_WRITE_BUFFER);
/* Buffer size */
buffer->size= 0;
buffer->skipped_data= 0;
/* cond of thread which is waiting for buffer filling */
if (mysql_cond_init(key_TRANSLOG_BUFFER_waiting_filling_buffer,
&buffer->waiting_filling_buffer, 0))
DBUG_RETURN(1);
/* Number of records which are in copy progress */
buffer->copy_to_buffer_in_progress= 0;
/* list of waiting buffer ready threads */
buffer->waiting_flush= 0;
/*
Buffers locked by the following mutex. As far as buffers create logical
circle (after last buffer goes first) it trigger false alarm of deadlock
detect system, so we remove check of deadlock for this buffers. Indeed
all mutex locks concentrated around current buffer except flushing
thread (but it is only one thread). One thread can't take more then
2 buffer locks at once. So deadlock is impossible here.
To prevent false alarm of dead lock detection we switch dead lock
detection for one buffer in the middle of the buffers chain. Excluding
only one of eight buffers from deadlock detection hardly can hide other
possible problems which include this mutexes.
*/
if (mysql_mutex_init(key_TRANSLOG_BUFFER_mutex,
&buffer->mutex, MY_MUTEX_INIT_FAST) ||
mysql_cond_init(key_TRANSLOG_BUFFER_prev_sent_to_disk_cond,
&buffer->prev_sent_to_disk_cond, 0))
DBUG_RETURN(1);
mysql_mutex_setflags(&buffer->mutex, MYF_NO_DEADLOCK_DETECTION);
buffer->is_closing_buffer= 0;
buffer->prev_sent_to_disk= LSN_IMPOSSIBLE;
buffer->prev_buffer_offset= LSN_IMPOSSIBLE;
buffer->ver= 0;
DBUG_RETURN(0);
}
|
O3
|
c
|
translog_buffer_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, 0x100028(%rdi)
movzbl %sil, %eax
xorps %xmm0, %xmm0
movups %xmm0, 0x100000(%rdi)
movl %eax, 0x10008c(%rdi)
movq %r14, 0x100038(%rdi)
movb $0x0, 0x100088(%rdi)
movl $0x100000, %edx # imm = 0x100000
movl $0xff, %esi
callq 0x292c0
movq %r14, 0x100030(%rbx)
leaq 0x3b2f37(%rip), %rax # 0x3fd0ec
movl (%rax), %edi
leaq 0x100040(%rbx), %r14
leaq 0x33be4b(%rip), %r12 # 0x386010
movq (%r12), %rax
movq %r14, %rsi
callq *0x60(%rax)
movq %rax, 0x100070(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x29380
movb $0x1, %r14b
testl %eax, %eax
jne 0x4a28e
movl $0x0, 0x100078(%rbx)
movq $0x0, 0x100080(%rbx)
leaq 0x3b2e95(%rip), %rax # 0x3fd09c
movl (%rax), %edi
leaq 0x100090(%rbx), %r15
movq (%r12), %rax
movq %r15, %rsi
callq *0x40(%rax)
movq %rax, 0x1000d0(%rbx)
movq %r15, 0x1000c8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1000b8(%rbx)
leaq 0xbbe7f7(%rip), %rsi # 0xc08a30
movq %r15, %rdi
callq 0x29340
testl %eax, %eax
jne 0x4a28e
leaq 0x3b2ea4(%rip), %rax # 0x3fd0f0
movl (%rax), %edi
leaq 0x1000e8(%rbx), %r15
movq (%r12), %rax
movq %r15, %rsi
callq *0x60(%rax)
movq %rax, 0x100118(%rbx)
movq %r15, %rdi
xorl %esi, %esi
callq 0x29380
testl %eax, %eax
jne 0x4a28e
movw $0x0, 0x1000d8(%rbx)
xorl %r14d, %r14d
movq %r14, 0x1000e0(%rbx)
movq %r14, 0x100020(%rbx)
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
translog_buffer_init:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
xor r14d, r14d
mov ds:qword_100028[rdi], r14
movzx eax, sil
xorps xmm0, xmm0
movups ds:xmmword_100000[rdi], xmm0
mov ds:dword_10008C[rdi], eax
mov ds:qword_100038[rdi], r14
mov ds:byte_100088[rdi], 0
mov edx, offset xmmword_100000
mov esi, 0FFh
call _memset
mov ds:qword_100030[rbx], r14
lea rax, key_TRANSLOG_BUFFER_waiting_filling_buffer
mov edi, [rax]
lea r14, unk_100040[rbx]
lea r12, PSI_server
mov rax, [r12]
mov rsi, r14
call qword ptr [rax+60h]
mov ds:qword_100070[rbx], rax
mov rdi, r14
xor esi, esi
call _pthread_cond_init
mov r14b, 1
test eax, eax
jnz loc_4A28E
mov ds:dword_100078[rbx], 0
mov ds:qword_100080[rbx], 0
lea rax, key_TRANSLOG_BUFFER_mutex
mov edi, [rax]
lea r15, unk_100090[rbx]
mov rax, [r12]
mov rsi, r15
call qword ptr [rax+40h]
mov ds:qword_1000D0[rbx], rax
mov ds:qword_1000C8[rbx], r15
xorps xmm0, xmm0
movups ds:xmmword_1000B8[rbx], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r15
call _pthread_mutex_init
test eax, eax
jnz short loc_4A28E
lea rax, key_TRANSLOG_BUFFER_prev_sent_to_disk_cond
mov edi, [rax]
lea r15, unk_1000E8[rbx]
mov rax, [r12]
mov rsi, r15
call qword ptr [rax+60h]
mov ds:qword_100118[rbx], rax
mov rdi, r15
xor esi, esi
call _pthread_cond_init
test eax, eax
jnz short loc_4A28E
mov word ptr ds:byte_1000D8[rbx], 0
xor r14d, r14d
mov ds:qword_1000E0[rbx], r14
mov ds:qword_100020[rbx], r14
loc_4A28E:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long translog_buffer_init(long long a1, unsigned __int8 a2)
{
char *v2; // r14
*(long long *)((char *)&qword_100028 + a1) = 0LL;
*(__int128 *)((char *)&xmmword_100000 + a1) = 0LL;
*(int *)((char *)&dword_10008C + a1) = a2;
*(long long *)((char *)&qword_100038 + a1) = 0LL;
byte_100088[a1] = 0;
memset(a1, 255LL, &xmmword_100000);
*(long long *)((char *)&qword_100030 + a1) = 0LL;
v2 = (char *)&unk_100040 + a1;
*(long long *)((char *)&qword_100070 + a1) = ((long long ( *)(_QWORD, char *))PSI_server[12])(
key_TRANSLOG_BUFFER_waiting_filling_buffer,
(char *)&unk_100040 + a1);
LOBYTE(v2) = 1;
if ( !(unsigned int)pthread_cond_init((char *)&unk_100040 + a1, 0LL) )
{
*(int *)((char *)&dword_100078 + a1) = 0;
*(long long *)((char *)&qword_100080 + a1) = 0LL;
*(long long *)((char *)&qword_1000D0 + a1) = ((long long ( *)(_QWORD, char *))PSI_server[8])(
key_TRANSLOG_BUFFER_mutex,
(char *)&unk_100090 + a1);
*(long long *)((char *)&qword_1000C8 + a1) = (long long)&unk_100090 + a1;
*(__int128 *)((char *)&xmmword_1000B8 + a1) = 0LL;
if ( !(unsigned int)pthread_mutex_init((char *)&unk_100090 + a1, &my_fast_mutexattr) )
{
*(long long *)((char *)&qword_100118 + a1) = ((long long ( *)(_QWORD, char *))PSI_server[12])(
key_TRANSLOG_BUFFER_prev_sent_to_disk_cond,
(char *)&unk_1000E8 + a1);
if ( !(unsigned int)pthread_cond_init((char *)&unk_1000E8 + a1, 0LL) )
{
*(_WORD *)&byte_1000D8[a1] = 0;
LODWORD(v2) = 0;
*(long long *)((char *)&qword_1000E0 + a1) = 0LL;
*(long long *)((char *)&qword_100020 + a1) = 0LL;
}
}
}
return (unsigned int)v2;
}
|
translog_buffer_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
XOR R14D,R14D
MOV qword ptr [RDI + 0x100028],R14
MOVZX EAX,SIL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x100000],XMM0
MOV dword ptr [RDI + 0x10008c],EAX
MOV qword ptr [RDI + 0x100038],R14
MOV byte ptr [RDI + 0x100088],0x0
MOV EDX,0x100000
MOV ESI,0xff
CALL 0x001292c0
MOV qword ptr [RBX + 0x100030],R14
LEA RAX,[0x4fd0ec]
MOV EDI,dword ptr [RAX]
LEA R14,[RBX + 0x100040]
LEA R12,[0x486010]
MOV RAX,qword ptr [R12]
MOV RSI,R14
CALL qword ptr [RAX + 0x60]
MOV qword ptr [RBX + 0x100070],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00129380
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0014a28e
MOV dword ptr [RBX + 0x100078],0x0
MOV qword ptr [RBX + 0x100080],0x0
LEA RAX,[0x4fd09c]
MOV EDI,dword ptr [RAX]
LEA R15,[RBX + 0x100090]
MOV RAX,qword ptr [R12]
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV qword ptr [RBX + 0x1000d0],RAX
MOV qword ptr [RBX + 0x1000c8],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x1000b8],XMM0
LEA RSI,[0xd08a30]
MOV RDI,R15
CALL 0x00129340
TEST EAX,EAX
JNZ 0x0014a28e
LEA RAX,[0x4fd0f0]
MOV EDI,dword ptr [RAX]
LEA R15,[RBX + 0x1000e8]
MOV RAX,qword ptr [R12]
MOV RSI,R15
CALL qword ptr [RAX + 0x60]
MOV qword ptr [RBX + 0x100118],RAX
MOV RDI,R15
XOR ESI,ESI
CALL 0x00129380
TEST EAX,EAX
JNZ 0x0014a28e
MOV word ptr [RBX + 0x1000d8],0x0
XOR R14D,R14D
MOV qword ptr [RBX + 0x1000e0],R14
MOV qword ptr [RBX + 0x100020],R14
LAB_0014a28e:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong translog_buffer_init(void *param_1,byte param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
int8 uVar2;
ulong uVar3;
*(int8 *)((long)param_1 + 0x100028) = 0;
*(int8 *)((long)param_1 + 0x100000) = 0;
*(int8 *)((long)param_1 + 0x100008) = 0;
*(uint *)((long)param_1 + 0x10008c) = (uint)param_2;
*(int8 *)((long)param_1 + 0x100038) = 0;
*(int1 *)((long)param_1 + 0x100088) = 0;
memset(param_1,0xff,0x100000);
*(int8 *)((long)param_1 + 0x100030) = 0;
uVar2 = (**(code **)(PSI_server + 0x60))(key_TRANSLOG_BUFFER_waiting_filling_buffer);
*(int8 *)((long)param_1 + 0x100070) = uVar2;
iVar1 = pthread_cond_init((pthread_cond_t *)((long)param_1 + 0x100040),(pthread_condattr_t *)0x0);
uVar3 = CONCAT71((int7)((ulong)((long)param_1 + 0x100040) >> 8),1);
if (iVar1 == 0) {
*(int4 *)((long)param_1 + 0x100078) = 0;
*(int8 *)((long)param_1 + 0x100080) = 0;
__mutex = (pthread_mutex_t *)((long)param_1 + 0x100090);
uVar2 = (**(code **)(PSI_server + 0x40))(key_TRANSLOG_BUFFER_mutex,__mutex);
*(int8 *)((long)param_1 + 0x1000d0) = uVar2;
*(pthread_mutex_t **)((long)param_1 + 0x1000c8) = __mutex;
*(int8 *)((long)param_1 + 0x1000b8) = 0;
*(int8 *)((long)param_1 + 0x1000c0) = 0;
iVar1 = pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr);
if (iVar1 == 0) {
uVar2 = (**(code **)(PSI_server + 0x60))(key_TRANSLOG_BUFFER_prev_sent_to_disk_cond);
*(int8 *)((long)param_1 + 0x100118) = uVar2;
iVar1 = pthread_cond_init((pthread_cond_t *)((long)param_1 + 0x1000e8),
(pthread_condattr_t *)0x0);
if (iVar1 == 0) {
*(int2 *)((long)param_1 + 0x1000d8) = 0;
uVar3 = 0;
*(int8 *)((long)param_1 + 0x1000e0) = 0;
*(int8 *)((long)param_1 + 0x100020) = 0;
}
}
}
return uVar3 & 0xffffffff;
}
|
|
61,229
|
my_xml_error_lineno
|
eloqsql/strings/xml.c
|
uint my_xml_error_lineno(MY_XML_PARSER *p)
{
uint res=0;
const char *s;
for (s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
res++;
}
return res;
}
|
O3
|
c
|
my_xml_error_lineno:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0xd7f48
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
cmpb $0xa, (%rcx)
sete %sil
addl %esi, %eax
incq %rcx
cmpq %rdx, %rcx
jne 0xd7f34
popq %rbp
retq
nopl (%rax)
|
my_xml_error_lineno:
mov rcx, [rdi+128h]
mov rdx, [rdi+130h]
xor eax, eax
cmp rcx, rdx
jnb short locret_D7F48
push rbp
mov rbp, rsp
xor eax, eax
loc_D7F34:
xor esi, esi
cmp byte ptr [rcx], 0Ah
setz sil
add eax, esi
inc rcx
cmp rcx, rdx
jnz short loc_D7F34
pop rbp
locret_D7F48:
retn
|
long long my_xml_error_lineno(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rdx
long long result; // rax
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
result = 0LL;
if ( v1 < v2 )
{
LODWORD(result) = 0;
do
result = (*v1++ == 10) + (unsigned int)result;
while ( v1 != v2 );
}
return result;
}
|
my_xml_error_lineno:
MOV RCX,qword ptr [RDI + 0x128]
MOV RDX,qword ptr [RDI + 0x130]
XOR EAX,EAX
CMP RCX,RDX
JNC 0x001d7f48
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001d7f34:
XOR ESI,ESI
CMP byte ptr [RCX],0xa
SETZ SIL
ADD EAX,ESI
INC RCX
CMP RCX,RDX
JNZ 0x001d7f34
POP RBP
LAB_001d7f48:
RET
|
int my_xml_error_lineno(long param_1)
{
int iVar1;
char *pcVar2;
pcVar2 = *(char **)(param_1 + 0x128);
iVar1 = 0;
if (pcVar2 < *(char **)(param_1 + 0x130)) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uint)(*pcVar2 == '\n');
pcVar2 = pcVar2 + 1;
} while (pcVar2 != *(char **)(param_1 + 0x130));
}
return iVar1;
}
|
|
61,230
|
aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimeManipulatorExecutor()
|
aimrt_mujoco_sim/_deps/aimrt-src/src/plugins/time_manipulator_plugin/../time_manipulator_plugin/time_manipulator_executor.h
|
TimeManipulatorExecutor() = default;
|
O3
|
c
|
aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimeManipulatorExecutor():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x1ef2b5(%rip), %rax # 0x296e58
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %r15
movq %r15, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %r13
movq %r13, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
movq $0x5f5e100, 0x48(%rdi) # imm = 0x5F5E100
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x50(%rdi)
addq $0x58, %rdi
leaq 0x10(%rsp), %rsi
movq $0x64, (%rsi)
movq $0x168, 0x8(%rsi) # imm = 0x168
leaq 0xf(%rsp), %rcx
movl $0x2, %edx
callq 0x80800
leaq 0x80(%rbx), %rax
movq %rax, 0x70(%rbx)
xorl %eax, %eax
movq %rax, 0x78(%rbx)
movb %al, 0x80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0x99(%rbx)
movl $0x0, 0xb0(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movq %rax, 0xd8(%rbx)
movb $0x1, %cl
movb %cl, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x100(%rbx)
movups %xmm0, 0x110(%rbx)
movq %rax, 0x120(%rbx)
movb %cl, 0x128(%rbx)
movl $0x1, 0x12c(%rbx)
movq %rax, 0x130(%rbx)
movb %al, 0x138(%rbx)
leaq 0x1d0(%rbx), %rcx
movups %xmm0, 0x140(%rbx)
movups %xmm0, 0x150(%rbx)
movups %xmm0, 0x160(%rbx)
movups %xmm0, 0x170(%rbx)
movups %xmm0, 0x180(%rbx)
movups %xmm0, 0x190(%rbx)
movq %rcx, 0x1a0(%rbx)
movq $0x1, 0x1a8(%rbx)
movups %xmm0, 0x1b0(%rbx)
movl $0x3f800000, 0x1c0(%rbx) # imm = 0x3F800000
movups %xmm0, 0x1c8(%rbx)
movq %rax, 0x1d8(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
movq 0x28(%rbx), %rdi
cmpq %r13, %rdi
je 0xa7d1b
movq (%r13), %rsi
incq %rsi
callq 0x82190
movq %r14, %rdi
movq %r15, %rsi
callq 0x846c9
movq %r12, %rdi
callq 0x83b70
nop
|
_ZN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutorC2Ev:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rdi
lea rax, _ZTVN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutorE; `vtable for'aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor
add rax, 10h
mov [rdi], rax
lea r14, [rdi+8]
lea r15, [rdi+18h]
mov [rdi+8], r15
xor eax, eax
mov [rdi+10h], rax
mov [rdi+18h], al
lea r13, [rdi+38h]
mov [rdi+28h], r13
mov [rdi+30h], rax
mov [rdi+38h], al
mov qword ptr [rdi+48h], 5F5E100h
mov rax, 3FF0000000000000h
mov [rdi+50h], rax
add rdi, 58h ; 'X'
lea rsi, [rsp+48h+var_38]
mov qword ptr [rsi], 64h ; 'd'
mov qword ptr [rsi+8], 168h
lea rcx, [rsp+48h+var_39]
mov edx, 2
call __ZNSt6vectorImSaImEEC2ESt16initializer_listImERKS0_; std::vector<ulong>::vector(std::initializer_list<ulong>,std::allocator<ulong> const&)
lea rax, [rbx+80h]
mov [rbx+70h], rax
xor eax, eax
mov [rbx+78h], rax
mov [rbx+80h], al
xorps xmm0, xmm0
movups xmmword ptr [rbx+90h], xmm0
movups xmmword ptr [rbx+99h], xmm0
mov dword ptr [rbx+0B0h], 0
movups xmmword ptr [rbx+0B8h], xmm0
movups xmmword ptr [rbx+0C8h], xmm0
mov [rbx+0D8h], rax
mov cl, 1
mov [rbx+0E0h], cl
movups xmmword ptr [rbx+0F0h], xmm0
movups xmmword ptr [rbx+100h], xmm0
movups xmmword ptr [rbx+110h], xmm0
mov [rbx+120h], rax
mov [rbx+128h], cl
mov dword ptr [rbx+12Ch], 1
mov [rbx+130h], rax
mov [rbx+138h], al
lea rcx, [rbx+1D0h]
movups xmmword ptr [rbx+140h], xmm0
movups xmmword ptr [rbx+150h], xmm0
movups xmmword ptr [rbx+160h], xmm0
movups xmmword ptr [rbx+170h], xmm0
movups xmmword ptr [rbx+180h], xmm0
movups xmmword ptr [rbx+190h], xmm0
mov [rbx+1A0h], rcx
mov qword ptr [rbx+1A8h], 1
movups xmmword ptr [rbx+1B0h], xmm0
mov dword ptr [rbx+1C0h], 3F800000h
movups xmmword ptr [rbx+1C8h], xmm0
mov [rbx+1D8h], rax
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r12, rax
mov rdi, [rbx+28h]; void *
cmp rdi, r13
jz short loc_A7D1B
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A7D1B:
mov rdi, r14
mov rsi, r15
call _ZN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutorC2Ev_cold_1; aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimeManipulatorExecutor(void) [clone]
mov rdi, r12
call __Unwind_Resume
|
long long aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimeManipulatorExecutor(
aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor *this)
{
long long result; // rax
char v2; // [rsp+Fh] [rbp-39h] BYREF
_QWORD v3[7]; // [rsp+10h] [rbp-38h] BYREF
*(_QWORD *)this = &`vtable for'aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor + 2;
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
*((_QWORD *)this + 5) = (char *)this + 56;
*((_QWORD *)this + 6) = 0LL;
*((_BYTE *)this + 56) = 0;
*((_QWORD *)this + 9) = 100000000LL;
*((_QWORD *)this + 10) = 0x3FF0000000000000LL;
v3[0] = 100LL;
v3[1] = 360LL;
std::vector<unsigned long>::vector((char *)this + 88, v3, 2LL, &v2);
*((_QWORD *)this + 14) = (char *)this + 128;
result = 0LL;
*((_QWORD *)this + 15) = 0LL;
*((_BYTE *)this + 128) = 0;
*((_OWORD *)this + 9) = 0LL;
*(_OWORD *)((char *)this + 153) = 0LL;
*((_DWORD *)this + 44) = 0;
*(_OWORD *)((char *)this + 184) = 0LL;
*(_OWORD *)((char *)this + 200) = 0LL;
*((_QWORD *)this + 27) = 0LL;
*((_BYTE *)this + 224) = 1;
*((_OWORD *)this + 15) = 0LL;
*((_OWORD *)this + 16) = 0LL;
*((_OWORD *)this + 17) = 0LL;
*((_QWORD *)this + 36) = 0LL;
*((_BYTE *)this + 296) = 1;
*((_DWORD *)this + 75) = 1;
*((_QWORD *)this + 38) = 0LL;
*((_BYTE *)this + 312) = 0;
*((_OWORD *)this + 20) = 0LL;
*((_OWORD *)this + 21) = 0LL;
*((_OWORD *)this + 22) = 0LL;
*((_OWORD *)this + 23) = 0LL;
*((_OWORD *)this + 24) = 0LL;
*((_OWORD *)this + 25) = 0LL;
*((_QWORD *)this + 52) = (char *)this + 464;
*((_QWORD *)this + 53) = 1LL;
*((_OWORD *)this + 27) = 0LL;
*((_DWORD *)this + 112) = 1065353216;
*(_OWORD *)((char *)this + 456) = 0LL;
*((_QWORD *)this + 59) = 0LL;
return result;
}
|
TimeManipulatorExecutor:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
LEA RAX,[0x396e58]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
LEA R14,[RDI + 0x8]
LEA R15,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],R15
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOV byte ptr [RDI + 0x18],AL
LEA R13,[RDI + 0x38]
MOV qword ptr [RDI + 0x28],R13
MOV qword ptr [RDI + 0x30],RAX
MOV byte ptr [RDI + 0x38],AL
MOV qword ptr [RDI + 0x48],0x5f5e100
MOV RAX,0x3ff0000000000000
MOV qword ptr [RDI + 0x50],RAX
ADD RDI,0x58
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],0x64
MOV qword ptr [RSI + 0x8],0x168
LAB_001a7bfc:
LEA RCX,[RSP + 0xf]
MOV EDX,0x2
CALL 0x00180800
LAB_001a7c0b:
LEA RAX,[RBX + 0x80]
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x78],RAX
MOV byte ptr [RBX + 0x80],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x90],XMM0
MOVUPS xmmword ptr [RBX + 0x99],XMM0
MOV dword ptr [RBX + 0xb0],0x0
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
MOV qword ptr [RBX + 0xd8],RAX
MOV CL,0x1
MOV byte ptr [RBX + 0xe0],CL
MOVUPS xmmword ptr [RBX + 0xf0],XMM0
MOVUPS xmmword ptr [RBX + 0x100],XMM0
MOVUPS xmmword ptr [RBX + 0x110],XMM0
MOV qword ptr [RBX + 0x120],RAX
MOV byte ptr [RBX + 0x128],CL
MOV dword ptr [RBX + 0x12c],0x1
MOV qword ptr [RBX + 0x130],RAX
MOV byte ptr [RBX + 0x138],AL
LEA RCX,[RBX + 0x1d0]
MOVUPS xmmword ptr [RBX + 0x140],XMM0
MOVUPS xmmword ptr [RBX + 0x150],XMM0
MOVUPS xmmword ptr [RBX + 0x160],XMM0
MOVUPS xmmword ptr [RBX + 0x170],XMM0
MOVUPS xmmword ptr [RBX + 0x180],XMM0
MOVUPS xmmword ptr [RBX + 0x190],XMM0
MOV qword ptr [RBX + 0x1a0],RCX
MOV qword ptr [RBX + 0x1a8],0x1
MOVUPS xmmword ptr [RBX + 0x1b0],XMM0
MOV dword ptr [RBX + 0x1c0],0x3f800000
MOVUPS xmmword ptr [RBX + 0x1c8],XMM0
MOV qword ptr [RBX + 0x1d8],RAX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimeManipulatorExecutor() */
void __thiscall
aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimeManipulatorExecutor
(TimeManipulatorExecutor *this)
{
int1 local_39;
int8 local_38;
int8 local_30;
*(int ***)this = &PTR__TimeManipulatorExecutor_00396e68;
*(TimeManipulatorExecutor **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (TimeManipulatorExecutor)0x0;
*(TimeManipulatorExecutor **)(this + 0x28) = this + 0x38;
*(int8 *)(this + 0x30) = 0;
this[0x38] = (TimeManipulatorExecutor)0x0;
*(int8 *)(this + 0x48) = 100000000;
*(int8 *)(this + 0x50) = 0x3ff0000000000000;
local_38 = 100;
local_30 = 0x168;
/* try { // try from 001a7bfc to 001a7c0a has its CatchHandler @ 001a7d03 */
std::vector<unsigned_long,std::allocator<unsigned_long>>::vector
((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x58),&local_38,2,
&local_39);
*(TimeManipulatorExecutor **)(this + 0x70) = this + 0x80;
*(int8 *)(this + 0x78) = 0;
this[0x80] = (TimeManipulatorExecutor)0x0;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0x99) = 0;
*(int8 *)(this + 0xa1) = 0;
*(int4 *)(this + 0xb0) = 0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
*(int8 *)(this + 0xd8) = 0;
this[0xe0] = (TimeManipulatorExecutor)0x1;
*(int8 *)(this + 0xf0) = 0;
*(int8 *)(this + 0xf8) = 0;
*(int8 *)(this + 0x100) = 0;
*(int8 *)(this + 0x108) = 0;
*(int8 *)(this + 0x110) = 0;
*(int8 *)(this + 0x118) = 0;
*(int8 *)(this + 0x120) = 0;
this[0x128] = (TimeManipulatorExecutor)0x1;
*(int4 *)(this + 300) = 1;
*(int8 *)(this + 0x130) = 0;
this[0x138] = (TimeManipulatorExecutor)0x0;
*(int8 *)(this + 0x140) = 0;
*(int8 *)(this + 0x148) = 0;
*(int8 *)(this + 0x150) = 0;
*(int8 *)(this + 0x158) = 0;
*(int8 *)(this + 0x160) = 0;
*(int8 *)(this + 0x168) = 0;
*(int8 *)(this + 0x170) = 0;
*(int8 *)(this + 0x178) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
*(int8 *)(this + 400) = 0;
*(int8 *)(this + 0x198) = 0;
*(TimeManipulatorExecutor **)(this + 0x1a0) = this + 0x1d0;
*(int8 *)(this + 0x1a8) = 1;
*(int8 *)(this + 0x1b0) = 0;
*(int8 *)(this + 0x1b8) = 0;
*(int4 *)(this + 0x1c0) = 0x3f800000;
*(int8 *)(this + 0x1c8) = 0;
*(int8 *)(this + 0x1d0) = 0;
*(int8 *)(this + 0x1d8) = 0;
return;
}
|
|
61,231
|
lf_pinbox_get_pins
|
eloqsql/mysys/lf_alloc-pin.c
|
LF_PINS *lf_pinbox_get_pins(LF_PINBOX *pinbox)
{
uint32 pins, next, top_ver;
LF_PINS *el;
/*
We have an array of max. 64k elements.
The highest index currently allocated is pinbox->pins_in_array.
Freed elements are in a lifo stack, pinstack_top_ver.
pinstack_top_ver is 32 bits; 16 low bits are the index in the
array, to the first element of the list. 16 high bits are a version
(every time the 16 low bits are updated, the 16 high bits are
incremented). Versioning prevents the ABA problem.
*/
top_ver= pinbox->pinstack_top_ver;
do
{
if (!(pins= top_ver % LF_PINBOX_MAX_PINS))
{
/* the stack of free elements is empty */
pins= my_atomic_add32((int32 volatile*) &pinbox->pins_in_array, 1)+1;
if (unlikely(pins >= LF_PINBOX_MAX_PINS))
return 0;
/*
note that the first allocated element has index 1 (pins==1).
index 0 is reserved to mean "NULL pointer"
*/
el= (LF_PINS *)lf_dynarray_lvalue(&pinbox->pinarray, pins);
if (unlikely(!el))
return 0;
break;
}
el= (LF_PINS *)lf_dynarray_value(&pinbox->pinarray, pins);
next= el->link;
} while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver,
(int32*) &top_ver,
top_ver-pins+next+LF_PINBOX_MAX_PINS));
/*
set el->link to the index of el in the dynarray (el->link has two usages:
- if element is allocated, it's its own index
- if element is free, it's its next element in the free stack
*/
el->link= pins;
el->purgatory_count= 0;
el->pinbox= pinbox;
return el;
}
|
O0
|
c
|
lf_pinbox_get_pins:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0xffff, %eax # imm = 0xFFFF
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x5b779
movq -0x10(%rbp), %rcx
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
lock
xaddl %eax, 0x40(%rcx)
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x10000, -0x14(%rbp) # imm = 0x10000
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5b738
movq $0x0, -0x8(%rbp)
jmp 0x5b80e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5c2b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5b777
movq $0x0, -0x8(%rbp)
jmp 0x5b80e
jmp 0x5b7e5
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5c5c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movl -0x1c(%rbp), %esi
movl -0x14(%rbp), %eax
subl %eax, %esi
movl -0x18(%rbp), %eax
movl %eax, %edx
movl %esi, %eax
leal 0x10000(%rax,%rdx), %eax
movl %eax, -0x34(%rbp)
movl -0x1c(%rbp), %eax
movl -0x34(%rbp), %edx
lock
cmpxchgl %edx, 0x3c(%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x3d(%rbp)
movl %ecx, -0x3c(%rbp)
testb $0x1, %al
jne 0x5b7d0
movl -0x3c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movb -0x3d(%rbp), %al
andb $0x1, %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5b6d6
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
lf_pinbox_get_pins:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+3Ch]
mov [rbp+var_1C], eax
loc_5B6D6:
mov eax, [rbp+var_1C]
and eax, 0FFFFh
mov [rbp+var_14], eax
cmp eax, 0
jnz loc_5B779
mov rcx, [rbp+var_10]
mov [rbp+var_2C], 1
mov eax, [rbp+var_2C]
lock xadd [rcx+40h], eax
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_14], eax
cmp [rbp+var_14], 10000h
setnb al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5B738
mov [rbp+var_8], 0
jmp loc_5B80E
loc_5B738:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call lf_dynarray_lvalue
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5B777
mov [rbp+var_8], 0
jmp loc_5B80E
loc_5B777:
jmp short loc_5B7E5
loc_5B779:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call lf_dynarray_value
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov eax, [rax+34h]
mov [rbp+var_18], eax
mov rcx, [rbp+var_10]
mov esi, [rbp+var_1C]
mov eax, [rbp+var_14]
sub esi, eax
mov eax, [rbp+var_18]
mov edx, eax
mov eax, esi
lea eax, [rax+rdx+10000h]
mov [rbp+var_34], eax
mov eax, [rbp+var_1C]
mov edx, [rbp+var_34]
lock cmpxchg [rcx+3Ch], edx
mov ecx, eax
setz al
mov [rbp+var_3D], al
mov [rbp+var_3C], ecx
test al, 1
jnz short loc_5B7D0
mov eax, [rbp+var_3C]
mov [rbp+var_1C], eax
loc_5B7D0:
mov al, [rbp+var_3D]
and al, 1
mov [rbp+var_35], al
mov al, [rbp+var_35]
xor al, 0FFh
test al, 1
jnz loc_5B6D6
loc_5B7E5:
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov [rax+34h], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+30h], 0
mov rcx, [rbp+var_10]
mov rax, [rbp+var_28]
mov [rax+20h], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_5B80E:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long lf_pinbox_get_pins(long long a1)
{
signed __int32 v1; // eax
signed __int32 v2; // ett
bool v4; // [rsp+3h] [rbp-3Dh]
long long v5; // [rsp+18h] [rbp-28h]
signed __int32 v6; // [rsp+24h] [rbp-1Ch]
unsigned __int32 v7; // [rsp+2Ch] [rbp-14h]
v6 = *(_DWORD *)(a1 + 60);
while ( 1 )
{
v7 = (unsigned __int16)v6;
if ( !(_WORD)v6 )
break;
v5 = lf_dynarray_value(a1, (unsigned __int16)v6);
v2 = v6;
v1 = _InterlockedCompareExchange(
(volatile signed __int32 *)(a1 + 60),
v6 - (unsigned __int16)v6 + *(_DWORD *)(v5 + 52) + 0x10000,
v6);
v4 = v2 == v1;
if ( v2 != v1 )
v6 = v1;
if ( v4 )
goto LABEL_11;
}
v7 = _InterlockedIncrement((volatile signed __int32 *)(a1 + 64));
if ( v7 >= 0x10000 )
return 0LL;
v5 = lf_dynarray_lvalue(a1, v7);
if ( !v5 )
return 0LL;
LABEL_11:
*(_DWORD *)(v5 + 52) = v7;
*(_DWORD *)(v5 + 48) = 0;
*(_QWORD *)(v5 + 32) = a1;
return v5;
}
|
lf_pinbox_get_pins:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x3c]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0015b6d6:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0xffff
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JNZ 0x0015b779
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x2c],0x1
MOV EAX,dword ptr [RBP + -0x2c]
XADD.LOCK dword ptr [RCX + 0x40],EAX
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x10000
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015b738
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015b80e
LAB_0015b738:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0015c2b0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015b777
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015b80e
LAB_0015b777:
JMP 0x0015b7e5
LAB_0015b779:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0015c5c0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x34]
MOV dword ptr [RBP + -0x18],EAX
MOV RCX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EAX,dword ptr [RBP + -0x14]
SUB ESI,EAX
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
MOV EAX,ESI
LEA EAX,[RAX + RDX*0x1 + 0x10000]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RBP + -0x34]
CMPXCHG.LOCK dword ptr [RCX + 0x3c],EDX
MOV ECX,EAX
SETZ AL
MOV byte ptr [RBP + -0x3d],AL
MOV dword ptr [RBP + -0x3c],ECX
TEST AL,0x1
JNZ 0x0015b7d0
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0015b7d0:
MOV AL,byte ptr [RBP + -0x3d]
AND AL,0x1
MOV byte ptr [RBP + -0x35],AL
MOV AL,byte ptr [RBP + -0x35]
XOR AL,0xff
TEST AL,0x1
JNZ 0x0015b6d6
LAB_0015b7e5:
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x34],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x30],0x0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015b80e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long lf_pinbox_get_pins(long param_1)
{
int *piVar1;
int iVar2;
uint uVar3;
bool bVar4;
long local_30;
uint local_24;
uint local_1c;
local_24 = *(uint *)(param_1 + 0x3c);
do {
local_1c = local_24 & 0xffff;
if (local_1c == 0) {
LOCK();
piVar1 = (int *)(param_1 + 0x40);
iVar2 = *piVar1;
*piVar1 = *piVar1 + 1;
UNLOCK();
local_1c = iVar2 + 1;
if (0xffff < local_1c) {
return 0;
}
local_30 = lf_dynarray_lvalue(param_1,local_1c);
if (local_30 == 0) {
return 0;
}
break;
}
local_30 = lf_dynarray_value(param_1,local_1c);
LOCK();
uVar3 = *(uint *)(param_1 + 0x3c);
bVar4 = local_24 == uVar3;
if (bVar4) {
*(uint *)(param_1 + 0x3c) = (local_24 - local_1c) + 0x10000 + *(int *)(local_30 + 0x34);
uVar3 = local_24;
}
UNLOCK();
local_24 = uVar3;
} while (!bVar4);
*(uint *)(local_30 + 0x34) = local_1c;
*(int4 *)(local_30 + 0x30) = 0;
*(long *)(local_30 + 0x20) = param_1;
return local_30;
}
|
|
61,232
|
set_date_fields
|
bluesky950520[P]quickjs/quickjs.c
|
static double set_date_fields(double fields[minimum_length(7)], int is_local) {
double y, m, dt, ym, mn, day, h, s, milli, time, tv;
int yi, mi, i;
int64_t days;
volatile double temp; /* enforce evaluation order */
/* emulate 21.4.1.15 MakeDay ( year, month, date ) */
y = fields[0];
m = fields[1];
dt = fields[2];
ym = y + floor(m / 12);
mn = fmod(m, 12);
if (mn < 0)
mn += 12;
if (ym < -271821 || ym > 275760)
return NAN;
yi = ym;
mi = mn;
days = days_from_year(yi);
for(i = 0; i < mi; i++) {
days += month_days[i];
if (i == 1)
days += days_in_year(yi) - 365;
}
day = days + dt - 1;
/* emulate 21.4.1.14 MakeTime ( hour, min, sec, ms ) */
h = fields[3];
m = fields[4];
s = fields[5];
milli = fields[6];
/* Use a volatile intermediary variable to ensure order of evaluation
* as specified in ECMA. This fixes a test262 error on
* test262/test/built-ins/Date/UTC/fp-evaluation-order.js.
* Without the volatile qualifier, the compile can generate code
* that performs the computation in a different order or with instructions
* that produce a different result such as FMA (float multiply and add).
*/
time = h * 3600000;
time += (temp = m * 60000);
time += (temp = s * 1000);
time += milli;
/* emulate 21.4.1.16 MakeDate ( day, time ) */
tv = (temp = day * 86400000) + time; /* prevent generation of FMA */
if (!isfinite(tv))
return NAN;
/* adjust for local time and clip */
if (is_local) {
int64_t ti = tv < INT64_MIN ? INT64_MIN : tv >= 0x1p63 ? INT64_MAX : (int64_t)tv;
tv += getTimezoneOffset(ti) * 60000;
}
return time_clip(tv);
}
|
O1
|
c
|
set_date_fields:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movq %rdi, %r14
movsd 0x8(%rdi), %xmm1
movsd %xmm1, 0x30(%rsp)
movsd 0x10(%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
movapd %xmm1, %xmm0
divsd 0x4792e(%rip), %xmm0 # 0x9e920
callq 0xe860
addsd (%r14), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x47910(%rip), %xmm1 # 0x9e920
callq 0xe3e0
movsd 0x28(%rsp), %xmm5
movsd 0x47905(%rip), %xmm1 # 0x9e928
ucomisd %xmm5, %xmm1
movsd 0x478b9(%rip), %xmm4 # 0x9e8e8
ja 0x57357
ucomisd 0x478f3(%rip), %xmm5 # 0x9e930
ja 0x57357
movsd 0x478d5(%rip), %xmm1 # 0x9e920
addsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm0, %xmm3
orpd %xmm1, %xmm3
cvttsd2si %xmm5, %eax
cvttsd2si %xmm3, %edi
movslq %eax, %r8
imulq $0x16d, %r8, %rax # imm = 0x16D
leaq -0x7b1(%r8), %r10
sarq $0x2, %r10
addq %rax, %r10
leaq -0x76d(%r8), %rsi
movabsq $-0x5c28f5c28f5c28f5, %r9 # imm = 0xA3D70A3D70A3D70B
movq %rsi, %rax
imulq %r9
leaq (%rdx,%r8), %rax
addq $-0x76d, %rax # imm = 0xF893
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x6, %rax
addq %rcx, %rax
imulq $0x64, %rax, %rax
subq %rax, %rsi
sarq $0x3f, %rsi
andq $-0x64, %rsi
addq %rax, %rsi
movabsq $0x5c28f5c28f5c28f5, %rcx # imm = 0x5C28F5C28F5C28F5
movq %rsi, %rax
imulq %rcx
movq %rdx, %rcx
subq %rsi, %rcx
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x6, %rcx
addq %rax, %rcx
addq %r10, %rcx
leaq -0x641(%r8), %rsi
movq %rsi, %rax
imulq %r9
leaq (%rdx,%r8), %rax
addq $-0x641, %rax # imm = 0xF9BF
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x8, %rax
addq %rdx, %rax
imulq $0x190, %rax, %rax # imm = 0x190
subq %rax, %rsi
sarq $0x3f, %rsi
andq $-0x190, %rsi # imm = 0xFE70
addq %rax, %rsi
movq %rsi, %rax
imulq %r9
addq %rsi, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x8, %rdx
addq %rax, %rdx
addq %rdx, %rcx
addq $-0xaf8ca, %rcx # imm = 0xFFF50736
testl %edi, %edi
jle 0x571f2
xorl %eax, %eax
testb $0x3, %r8b
sete %al
movabsq $-0x70a3d70a3d70a3d7, %rdx # imm = 0x8F5C28F5C28F5C29
imulq %r8, %rdx
movabsq $0x51eb851eb851eb8, %rsi # imm = 0x51EB851EB851EB8
addq %rdx, %rsi
rorq $0x2, %rsi
movabsq $0x28f5c28f5c28f5d, %r8 # imm = 0x28F5C28F5C28F5D
cmpq %r8, %rsi
sbbl $0x0, %eax
movabsq $0x51eb851eb851eb0, %rsi # imm = 0x51EB851EB851EB0
addq %rdx, %rsi
rorq $0x4, %rsi
movabsq $0xa3d70a3d70a3d7, %rdx # imm = 0xA3D70A3D70A3D7
cmpq %rdx, %rsi
adcl $0x16d, %eax # imm = 0x16D
addq $-0x16d, %rax # imm = 0xFE93
movl %edi, %edx
shlq $0x2, %rdx
xorl %esi, %esi
leaq 0x4740a(%rip), %rdi # 0x9e5d0
movapd 0x10(%rsp), %xmm0
movslq (%rsi,%rdi), %r9
cmpq $0x4, %rsi
movl $0x0, %r8d
cmoveq %rax, %r8
addq %rcx, %r8
addq %r9, %r8
addq $0x4, %rsi
movq %r8, %rcx
cmpq %rsi, %rdx
jne 0x571cc
jmp 0x571fb
movq %rcx, %r8
movapd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r8, %xmm1
addsd %xmm1, %xmm0
addsd 0x47679(%rip), %xmm0 # 0x9e888
movsd 0x18(%r14), %xmm3
mulsd 0x4771b(%rip), %xmm3 # 0x9e938
movupd 0x20(%r14), %xmm1
mulpd 0x47565(%rip), %xmm1 # 0x9e790
addsd %xmm1, %xmm3
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2 # xmm2 = xmm2[1],xmm1[1]
addsd %xmm3, %xmm2
addsd 0x30(%r14), %xmm2
movlpd %xmm1, 0x8(%rsp)
movhpd %xmm1, 0x8(%rsp)
mulsd 0x476eb(%rip), %xmm0 # 0x9e940
movsd %xmm0, 0x8(%rsp)
addsd %xmm2, %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x57357
testl %ebx, %ebx
je 0x57330
cvttsd2si %xmm0, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
ucomisd 0x43d5c(%rip), %xmm0 # 0x9b008
movabsq $0x20c49ba5e353f7, %rax # imm = 0x20C49BA5E353F7
cmovbq %rdx, %rax
movsd 0x475f6(%rip), %xmm1 # 0x9e8b8
ucomisd %xmm0, %xmm1
movabsq $-0x20c49ba5e353f7, %rcx # imm = 0xFFDF3B645A1CAC09
cmovbeq %rax, %rcx
leaq 0x38(%rsp), %rdi
movq %rcx, (%rdi)
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
movaps %xmm0, 0x10(%rsp)
callq 0xe0e0
movsd 0x475f2(%rip), %xmm4 # 0x9e8e8
movapd 0x10(%rsp), %xmm0
movq 0x28(%rbx), %rcx
movabsq $0x7777777777777777, %rdx # imm = 0x7777777777777777
movq %rcx, %rax
imulq %rdx
subq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrl $0x5, %edx
addl %eax, %edx
imull $0xea60, %edx, %eax # imm = 0xEA60
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
movapd 0x47438(%rip), %xmm2 # 0x9e770
andpd %xmm0, %xmm2
movsd 0x4759c(%rip), %xmm1 # 0x9e8e0
ucomisd %xmm2, %xmm1
jb 0x57357
callq 0xe140
xorpd %xmm4, %xmm4
addsd %xmm0, %xmm4
movapd %xmm4, %xmm0
addq $0x78, %rsp
popq %rbx
popq %r14
retq
|
set_date_fields:
push r14
push rbx
sub rsp, 78h
mov ebx, esi
mov r14, rdi
movsd xmm1, qword ptr [rdi+8]
movsd [rsp+88h+var_58], xmm1
movsd xmm0, qword ptr [rdi+10h]
movaps [rsp+88h+var_78], xmm0
movapd xmm0, xmm1
divsd xmm0, cs:qword_9E920
call _floor
addsd xmm0, qword ptr [r14]
movsd [rsp+88h+var_60], xmm0
movsd xmm0, [rsp+88h+var_58]
movsd xmm1, cs:qword_9E920
call _fmod
movsd xmm5, [rsp+88h+var_60]
movsd xmm1, cs:qword_9E928
ucomisd xmm1, xmm5
movsd xmm4, cs:qword_9E8E8
ja loc_57357
ucomisd xmm5, cs:qword_9E930
ja loc_57357
movsd xmm1, cs:qword_9E920
addsd xmm1, xmm0
xorpd xmm2, xmm2
movapd xmm3, xmm0
cmpltsd xmm3, xmm2
andpd xmm1, xmm3
andnpd xmm3, xmm0
orpd xmm3, xmm1
cvttsd2si eax, xmm5
cvttsd2si edi, xmm3
movsxd r8, eax
imul rax, r8, 16Dh
lea r10, [r8-7B1h]
sar r10, 2
add r10, rax
lea rsi, [r8-76Dh]
mov r9, 0A3D70A3D70A3D70Bh
mov rax, rsi
imul r9
lea rax, [rdx+r8]
add rax, 0FFFFFFFFFFFFF893h
mov rcx, rax
shr rcx, 3Fh
sar rax, 6
add rax, rcx
imul rax, 64h ; 'd'
sub rsi, rax
sar rsi, 3Fh
and rsi, 0FFFFFFFFFFFFFF9Ch
add rsi, rax
mov rcx, 5C28F5C28F5C28F5h
mov rax, rsi
imul rcx
mov rcx, rdx
sub rcx, rsi
mov rax, rcx
shr rax, 3Fh
sar rcx, 6
add rcx, rax
add rcx, r10
lea rsi, [r8-641h]
mov rax, rsi
imul r9
lea rax, [rdx+r8]
add rax, 0FFFFFFFFFFFFF9BFh
mov rdx, rax
shr rdx, 3Fh
sar rax, 8
add rax, rdx
imul rax, 190h
sub rsi, rax
sar rsi, 3Fh
and rsi, 0FFFFFFFFFFFFFE70h
add rsi, rax
mov rax, rsi
imul r9
add rdx, rsi
mov rax, rdx
shr rax, 3Fh
sar rdx, 8
add rdx, rax
add rcx, rdx
add rcx, 0FFFFFFFFFFF50736h
test edi, edi
jle loc_571F2
xor eax, eax
test r8b, 3
setz al
mov rdx, 8F5C28F5C28F5C29h
imul rdx, r8
mov rsi, 51EB851EB851EB8h
add rsi, rdx
ror rsi, 2
mov r8, 28F5C28F5C28F5Dh
cmp rsi, r8
sbb eax, 0
mov rsi, 51EB851EB851EB0h
add rsi, rdx
ror rsi, 4
mov rdx, 0A3D70A3D70A3D7h
cmp rsi, rdx
adc eax, 16Dh
add rax, 0FFFFFFFFFFFFFE93h
mov edx, edi
shl rdx, 2
xor esi, esi
lea rdi, month_days
movapd xmm0, [rsp+88h+var_78]
loc_571CC:
movsxd r9, dword ptr [rsi+rdi]
cmp rsi, 4
mov r8d, 0
cmovz r8, rax
add r8, rcx
add r8, r9
add rsi, 4
mov rcx, r8
cmp rdx, rsi
jnz short loc_571CC
jmp short loc_571FB
loc_571F2:
mov r8, rcx
movapd xmm0, [rsp+88h+var_78]
loc_571FB:
xorps xmm1, xmm1
cvtsi2sd xmm1, r8
addsd xmm0, xmm1
addsd xmm0, cs:qword_9E888
movsd xmm3, qword ptr [r14+18h]
mulsd xmm3, cs:qword_9E938
movupd xmm1, xmmword ptr [r14+20h]
mulpd xmm1, cs:xmmword_9E790
addsd xmm3, xmm1
movapd xmm2, xmm1
unpckhpd xmm2, xmm1
addsd xmm2, xmm3
addsd xmm2, qword ptr [r14+30h]
movlpd [rsp+88h+var_80], xmm1
movhpd [rsp+88h+var_80], xmm1
mulsd xmm0, cs:qword_9E940
movsd [rsp+88h+var_80], xmm0
addsd xmm0, xmm2
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg loc_57357
test ebx, ebx
jz loc_57330
cvttsd2si rax, xmm0
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
ucomisd xmm0, cs:qword_9B008
mov rax, 20C49BA5E353F7h
cmovb rax, rdx
movsd xmm1, cs:qword_9E8B8
ucomisd xmm1, xmm0
mov rcx, 0FFDF3B645A1CAC09h
cmovbe rcx, rax
lea rdi, [rsp+88h+var_50]
mov [rdi], rcx
lea rbx, [rsp+88h+var_48]
mov rsi, rbx
movaps [rsp+88h+var_78], xmm0
call _localtime_r
movsd xmm4, cs:qword_9E8E8
movapd xmm0, [rsp+88h+var_78]
mov rcx, [rbx+28h]
mov rdx, 7777777777777777h
mov rax, rcx
imul rdx
sub rdx, rcx
mov rax, rdx
shr rax, 3Fh
shr edx, 5
add edx, eax
imul eax, edx, 0EA60h
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
addsd xmm0, xmm1
loc_57330:
movapd xmm2, cs:xmmword_9E770
andpd xmm2, xmm0
movsd xmm1, cs:qword_9E8E0
ucomisd xmm1, xmm2
jb short loc_57357
call _trunc
xorpd xmm4, xmm4
addsd xmm4, xmm0
loc_57357:
movapd xmm0, xmm4
add rsp, 78h
pop rbx
pop r14
retn
|
__int128 __usercall set_date_fields@<xmm0>(__m128d *a1@<rdi>, int a2@<esi>)
{
__m128d v4; // xmm0
__int128 v5; // xmm4
double v6; // xmm3_8
unsigned long long v7; // rdi
long long v8; // r8
unsigned long long v9; // rax
signed long long v10; // rax
unsigned long long v11; // rcx
unsigned long long v12; // rax
signed long long v13; // rsi
long long v14; // rdx
long long v15; // rcx
long long v16; // rax
double v17; // xmm0_8
long long v18; // r8
long long v19; // r8
__m128d v20; // xmm1
double v21; // xmm0_8
unsigned long long v22; // rax
unsigned long long v23; // rcx
double v24; // xmm0_8
double v26; // [rsp+10h] [rbp-78h]
double v27; // [rsp+28h] [rbp-60h]
double v28; // [rsp+30h] [rbp-58h]
unsigned long long v29; // [rsp+38h] [rbp-50h] BYREF
char v30; // [rsp+40h] [rbp-48h] BYREF
long long v31; // [rsp+68h] [rbp-20h]
v28 = a1->m128d_f64[1];
v26 = a1[1].m128d_f64[0];
v27 = floor(v28 / 12.0) + a1->m128d_f64[0];
v4 = (__m128d)*(unsigned long long *)&v28;
v4.m128d_f64[0] = fmod(v28, 12.0);
v5 = 0x7FF8000000000000uLL;
if ( v27 >= -271821.0 && v27 <= 275760.0 )
{
v6 = _mm_cmplt_sd(v4, (__m128d)0LL).m128d_f64[0];
v7 = (unsigned int)(int)COERCE_DOUBLE(~*(_QWORD *)&v6 & *(_QWORD *)&v4.m128d_f64[0] | COERCE_UNSIGNED_INT64(v4.m128d_f64[0] + 12.0) & *(_QWORD *)&v6);
v8 = (int)v27;
v9 = 100
* (((unsigned long long)(((unsigned __int128)((long long)0xA3D70A3D70A3D70BLL * (__int128)(v8 - 1901)) >> 64)
+ v8
- 1901) >> 63)
+ ((long long)(((unsigned __int128)((long long)0xA3D70A3D70A3D70BLL * (__int128)(v8 - 1901)) >> 64) + v8 - 1901) >> 6));
v10 = v9 + (((long long)(v8 - 1901 - v9) >> 63) & 0xFFFFFFFFFFFFFF9CLL);
v11 = 365 * v8
+ ((v8 - 1969) >> 2)
+ ((unsigned long long)(((unsigned __int128)(0x5C28F5C28F5C28F5LL * (__int128)v10) >> 64) - v10) >> 63)
+ ((long long)(((unsigned __int128)(0x5C28F5C28F5C28F5LL * (__int128)v10) >> 64) - v10) >> 6);
v12 = 400
* (((unsigned long long)(((unsigned __int128)((long long)0xA3D70A3D70A3D70BLL * (__int128)(v8 - 1601)) >> 64)
+ v8
- 1601) >> 63)
+ ((long long)(((unsigned __int128)((long long)0xA3D70A3D70A3D70BLL * (__int128)(v8 - 1601)) >> 64) + v8 - 1601) >> 8));
v13 = v12 + (((long long)(v8 - 1601 - v12) >> 63) & 0xFFFFFFFFFFFFFE70LL);
v14 = v13 / 400;
v15 = v13 / 400 + v11 - 719050;
if ( (int)v7 <= 0 )
{
LODWORD(v19) = v15;
v17 = v26;
}
else
{
v16 = (__ROR8__(0x8F5C28F5C28F5C29LL * v8 + 0x51EB851EB851EB0LL, 4) < 0xA3D70A3D70A3D7uLL)
+ ((v8 & 3) == 0)
- (unsigned int)(__ROR8__(0x8F5C28F5C28F5C29LL * v8 + 0x51EB851EB851EB8LL, 2) < 0x28F5C28F5C28F5DuLL)
+ 365
- 365LL;
v14 = 4LL * (unsigned int)v7;
v13 = 0LL;
v7 = (unsigned long long)&month_days;
v17 = v26;
do
{
v18 = 0LL;
if ( v13 == 4 )
v18 = v16;
v19 = *(int *)((char *)&month_days + v13) + v15 + v18;
v13 += 4LL;
v15 = v19;
}
while ( v14 != v13 );
}
v20 = _mm_mul_pd(a1[2], (__m128d)xmmword_9E790);
v21 = (v17 + (double)(int)v19 + -1.0) * 86400000.0
+ _mm_unpackhi_pd(v20, v20).m128d_f64[0]
+ a1[1].m128d_f64[1] * 3600000.0
+ v20.m128d_f64[0]
+ a1[3].m128d_f64[0];
if ( COERCE__INT64(fabs(v21)) <= 0x7FEFFFFFFFFFFFFFLL )
{
if ( a2 )
{
v22 = 0x20C49BA5E353F7LL;
if ( v21 < 9.223372036854776e18 )
v22 = ((unsigned long long)((0x20C49BA5E353F7CFLL * (unsigned __int128)(unsigned int)(int)v21) >> 64) >> 63)
+ (unsigned int)(int)v21 / 1000LL;
v23 = 0xFFDF3B645A1CAC09LL;
if ( v21 >= -9.223372036854776e18 )
v23 = v22;
v7 = (unsigned long long)&v29;
v29 = v23;
v13 = (signed long long)&v30;
localtime_r(&v29, &v30);
v5 = 0x7FF8000000000000uLL;
v14 = ((unsigned long long)(((unsigned __int128)(0x7777777777777777LL * (__int128)v31) >> 64) - v31) >> 63)
+ (((unsigned int)((unsigned __int128)(0x7777777777777777LL * (__int128)v31) >> 64) - (unsigned int)v31) >> 5);
v21 = v21 + (double)(60000 * (int)v14);
}
if ( fabs(v21) <= 8.64e15 )
{
v24 = trunc(v7, v13, v14);
v5 = 0LL;
*(double *)&v5 = v24 + 0.0;
}
}
}
return v5;
}
| |||
61,233
|
set_date_fields
|
bluesky950520[P]quickjs/quickjs.c
|
static double set_date_fields(double fields[minimum_length(7)], int is_local) {
double y, m, dt, ym, mn, day, h, s, milli, time, tv;
int yi, mi, i;
int64_t days;
volatile double temp; /* enforce evaluation order */
/* emulate 21.4.1.15 MakeDay ( year, month, date ) */
y = fields[0];
m = fields[1];
dt = fields[2];
ym = y + floor(m / 12);
mn = fmod(m, 12);
if (mn < 0)
mn += 12;
if (ym < -271821 || ym > 275760)
return NAN;
yi = ym;
mi = mn;
days = days_from_year(yi);
for(i = 0; i < mi; i++) {
days += month_days[i];
if (i == 1)
days += days_in_year(yi) - 365;
}
day = days + dt - 1;
/* emulate 21.4.1.14 MakeTime ( hour, min, sec, ms ) */
h = fields[3];
m = fields[4];
s = fields[5];
milli = fields[6];
/* Use a volatile intermediary variable to ensure order of evaluation
* as specified in ECMA. This fixes a test262 error on
* test262/test/built-ins/Date/UTC/fp-evaluation-order.js.
* Without the volatile qualifier, the compile can generate code
* that performs the computation in a different order or with instructions
* that produce a different result such as FMA (float multiply and add).
*/
time = h * 3600000;
time += (temp = m * 60000);
time += (temp = s * 1000);
time += milli;
/* emulate 21.4.1.16 MakeDate ( day, time ) */
tv = (temp = day * 86400000) + time; /* prevent generation of FMA */
if (!isfinite(tv))
return NAN;
/* adjust for local time and clip */
if (is_local) {
int64_t ti = tv < INT64_MIN ? INT64_MIN : tv >= 0x1p63 ? INT64_MAX : (int64_t)tv;
tv += getTimezoneOffset(ti) * 60000;
}
return time_clip(tv);
}
|
O2
|
c
|
set_date_fields:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movsd 0x8(%rdi), %xmm1
movsd %xmm1, (%rsp)
movsd 0x10(%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
movapd %xmm1, %xmm0
divsd 0x3b077(%rip), %xmm0 # 0x85870
callq 0xe880
addsd (%r14), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
movsd 0x3b05a(%rip), %xmm1 # 0x85870
callq 0xe3f0
movsd 0x20(%rsp), %xmm4
movsd 0x3b04f(%rip), %xmm1 # 0x85878
ucomisd %xmm4, %xmm1
movsd 0x3af9b(%rip), %xmm1 # 0x857d0
ja 0x4a9f0
ucomisd 0x3b03d(%rip), %xmm4 # 0x85880
ja 0x4a9f0
movl %ebx, (%rsp)
movsd 0x3b01c(%rip), %xmm1 # 0x85870
addsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm0, %xmm3
cvttsd2si %xmm4, %eax
orpd %xmm1, %xmm3
cvttsd2si %xmm3, %r13d
movslq %eax, %r15
movq %r15, %rdi
callq 0x4a6e8
movq %rax, %r12
xorl %ebp, %ebp
testl %r13d, %r13d
cmovlel %ebp, %r13d
shlq $0x2, %r13
leaq 0x3acd4(%rip), %rbx # 0x85570
cmpq %rbp, %r13
je 0x4a8c7
movslq (%rbp,%rbx), %rax
addq %rax, %r12
cmpq $0x4, %rbp
jne 0x4a8c1
movq %r15, %rdi
callq 0x4a6b0
addq %rax, %r12
addq $-0x16d, %r12 # imm = 0xFE93
addq $0x4, %rbp
jmp 0x4a89c
cvtsi2sd %r12, %xmm0
movapd 0x10(%rsp), %xmm3
addsd %xmm0, %xmm3
addsd 0x3af72(%rip), %xmm3 # 0x85850
movsd 0x18(%r14), %xmm0
mulsd 0x3af9c(%rip), %xmm0 # 0x85888
movupd 0x20(%r14), %xmm1
mulpd 0x3ae36(%rip), %xmm1 # 0x85730
addsd %xmm1, %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2 # xmm2 = xmm2[1],xmm1[1]
addsd %xmm0, %xmm2
addsd 0x30(%r14), %xmm2
movlpd %xmm1, 0x8(%rsp)
movhpd %xmm1, 0x8(%rsp)
mulsd 0x3af6c(%rip), %xmm3 # 0x85890
movsd %xmm3, 0x8(%rsp)
addsd %xmm2, %xmm3
movq %xmm3, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jle 0x4a954
movsd 0x3ae81(%rip), %xmm1 # 0x857d0
jmp 0x4a9f0
movapd %xmm3, %xmm0
cmpl $0x0, (%rsp)
je 0x4a9c1
movapd %xmm0, %xmm1
movapd %xmm0, 0x10(%rsp)
ucomisd 0x37698(%rip), %xmm0 # 0x82008
cvttsd2si %xmm0, %rax
movabsq $0x7fffffffffffffff, %rdi # imm = 0x7FFFFFFFFFFFFFFF
cmovaeq %rdi, %rax
incq %rdi
movsd 0x3ae5a(%rip), %xmm0 # 0x857e8
ucomisd %xmm1, %xmm0
cmovbeq %rax, %rdi
callq 0x4a679
imull $0xea60, %eax, %eax # imm = 0xEA60
cvtsi2sd %eax, %xmm0
movapd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd 0x3ad49(%rip), %xmm2 # 0x85700
movapd %xmm1, %xmm0
andpd %xmm1, %xmm2
jmp 0x4a9cd
movapd 0x3ad37(%rip), %xmm2 # 0x85700
andpd %xmm0, %xmm2
movsd 0x3ae3b(%rip), %xmm1 # 0x85810
ucomisd %xmm2, %xmm1
movsd 0x3adef(%rip), %xmm1 # 0x857d0
jb 0x4a9f0
callq 0xe150
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
set_date_fields:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov r14, rdi
movsd xmm1, qword ptr [rdi+8]
movsd [rsp+58h+var_58], xmm1
movsd xmm0, qword ptr [rdi+10h]
movaps [rsp+58h+var_48], xmm0
movapd xmm0, xmm1
divsd xmm0, cs:qword_85870
call _floor
addsd xmm0, qword ptr [r14]
movsd [rsp+58h+var_38], xmm0
movsd xmm0, [rsp+58h+var_58]
movsd xmm1, cs:qword_85870
call _fmod
movsd xmm4, [rsp+58h+var_38]
movsd xmm1, cs:qword_85878
ucomisd xmm1, xmm4
movsd xmm1, cs:qword_857D0
ja loc_4A9F0
ucomisd xmm4, cs:qword_85880
ja loc_4A9F0
mov dword ptr [rsp+58h+var_58], ebx
movsd xmm1, cs:qword_85870
addsd xmm1, xmm0
xorpd xmm2, xmm2
movapd xmm3, xmm0
cmpltsd xmm3, xmm2
andpd xmm1, xmm3
andnpd xmm3, xmm0
cvttsd2si eax, xmm4
orpd xmm3, xmm1
cvttsd2si r13d, xmm3
movsxd r15, eax
mov rdi, r15
call days_from_year
mov r12, rax
xor ebp, ebp
test r13d, r13d
cmovle r13d, ebp
shl r13, 2
lea rbx, month_days
loc_4A89C:
cmp r13, rbp
jz short loc_4A8C7
movsxd rax, dword ptr [rbp+rbx+0]
add r12, rax
cmp rbp, 4
jnz short loc_4A8C1
mov rdi, r15
call days_in_year
add r12, rax
add r12, 0FFFFFFFFFFFFFE93h
loc_4A8C1:
add rbp, 4
jmp short loc_4A89C
loc_4A8C7:
cvtsi2sd xmm0, r12
movapd xmm3, [rsp+58h+var_48]
addsd xmm3, xmm0
addsd xmm3, cs:qword_85850
movsd xmm0, qword ptr [r14+18h]
mulsd xmm0, cs:qword_85888
movupd xmm1, xmmword ptr [r14+20h]
mulpd xmm1, cs:xmmword_85730
addsd xmm0, xmm1
movapd xmm2, xmm1
unpckhpd xmm2, xmm1
addsd xmm2, xmm0
addsd xmm2, qword ptr [r14+30h]
movlpd [rsp+58h+var_50], xmm1
movhpd [rsp+58h+var_50], xmm1
mulsd xmm3, cs:qword_85890
movsd [rsp+58h+var_50], xmm3
addsd xmm3, xmm2
movq rax, xmm3
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jle short loc_4A954
movsd xmm1, cs:qword_857D0
jmp loc_4A9F0
loc_4A954:
movapd xmm0, xmm3
cmp dword ptr [rsp+58h+var_58], 0
jz short loc_4A9C1
movapd xmm1, xmm0
movapd [rsp+58h+var_48], xmm0
ucomisd xmm0, cs:qword_82008
cvttsd2si rax, xmm0
mov rdi, 7FFFFFFFFFFFFFFFh
cmovnb rax, rdi
inc rdi
movsd xmm0, cs:qword_857E8
ucomisd xmm0, xmm1
cmovbe rdi, rax
call getTimezoneOffset
imul eax, 0EA60h
cvtsi2sd xmm0, eax
movapd xmm1, [rsp+58h+var_48]
addsd xmm1, xmm0
movapd xmm2, cs:xmmword_85700
movapd xmm0, xmm1
andpd xmm2, xmm1
jmp short loc_4A9CD
loc_4A9C1:
movapd xmm2, cs:xmmword_85700
andpd xmm2, xmm0
loc_4A9CD:
movsd xmm1, cs:qword_85810
ucomisd xmm1, xmm2
movsd xmm1, cs:qword_857D0
jb short loc_4A9F0
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
loc_4A9F0:
movapd xmm0, xmm1
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
__int128 __usercall set_date_fields@<xmm0>(__m128d *a1@<rdi>, int a2@<esi>)
{
__m128d v2; // xmm0
__int128 v3; // xmm1
double v4; // xmm3_8
long long v5; // r13
long long v6; // r12
long long v7; // rbp
long long v8; // r13
__m128d v9; // xmm1
double v10; // xmm3_8
double v11; // xmm0_8
long long v12; // rax
long long v13; // rdi
double v14; // xmm2_8
double v16; // [rsp+0h] [rbp-58h]
double v17; // [rsp+10h] [rbp-48h]
double v18; // [rsp+20h] [rbp-38h]
v16 = a1->m128d_f64[1];
v17 = a1[1].m128d_f64[0];
v18 = floor(v16 / 12.0) + a1->m128d_f64[0];
v2 = (__m128d)*(unsigned long long *)&v16;
v2.m128d_f64[0] = fmod(v16, 12.0);
v3 = 0x7FF8000000000000uLL;
if ( v18 >= -271821.0 && v18 <= 275760.0 )
{
v4 = _mm_cmplt_sd(v2, (__m128d)0LL).m128d_f64[0];
v5 = (unsigned int)(int)COERCE_DOUBLE(~*(_QWORD *)&v4 & *(_QWORD *)&v2.m128d_f64[0] | COERCE_UNSIGNED_INT64(v2.m128d_f64[0] + 12.0) & *(_QWORD *)&v4);
v6 = days_from_year((int)v18);
v7 = 0LL;
if ( (int)v5 <= 0 )
v5 = 0LL;
v8 = 4 * v5;
while ( v8 != v7 )
{
v6 += *(int *)((char *)&month_days + v7);
if ( v7 == 4 )
v6 = days_in_year((int)v18) + v6 - 365;
v7 += 4LL;
}
v9 = _mm_mul_pd(a1[2], (__m128d)xmmword_85730);
v10 = (v17 + (double)(int)v6 + -1.0) * 86400000.0
+ _mm_unpackhi_pd(v9, v9).m128d_f64[0]
+ a1[1].m128d_f64[1] * 3600000.0
+ v9.m128d_f64[0]
+ a1[3].m128d_f64[0];
if ( COERCE__INT64(fabs(v10)) <= 0x7FEFFFFFFFFFFFFFLL )
{
v11 = v10;
if ( a2 )
{
v12 = (unsigned int)(int)v10;
if ( v10 >= 9.223372036854776e18 )
v12 = 0x7FFFFFFFFFFFFFFFLL;
v13 = 0x8000000000000000LL;
if ( v10 >= -9.223372036854776e18 )
v13 = v12;
v11 = v10 + (double)(int)(60000 * getTimezoneOffset(v13));
v14 = fabs(v11);
}
else
{
v14 = fabs(v10);
}
v3 = 0x7FF8000000000000uLL;
if ( v14 <= 8.64e15 )
{
v3 = 0LL;
*(double *)&v3 = trunc(v11) + 0.0;
}
}
else
{
return 0x7FF8000000000000uLL;
}
}
return v3;
}
|
set_date_fields:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV R14,RDI
MOVSD XMM1,qword ptr [RDI + 0x8]
MOVSD qword ptr [RSP],XMM1
MOVSD XMM0,qword ptr [RDI + 0x10]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPD XMM0,XMM1
DIVSD XMM0,qword ptr [0x00185870]
CALL 0x0010e880
ADDSD XMM0,qword ptr [R14]
MOVSD qword ptr [RSP + 0x20],XMM0
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [0x00185870]
CALL 0x0010e3f0
MOVSD XMM4,qword ptr [RSP + 0x20]
MOVSD XMM1,qword ptr [0x00185878]
UCOMISD XMM1,XMM4
MOVSD XMM1,qword ptr [0x001857d0]
JA 0x0014a9f0
UCOMISD XMM4,qword ptr [0x00185880]
JA 0x0014a9f0
MOV dword ptr [RSP],EBX
MOVSD XMM1,qword ptr [0x00185870]
ADDSD XMM1,XMM0
XORPD XMM2,XMM2
MOVAPD XMM3,XMM0
CMPLTSD XMM3,XMM2
ANDPD XMM1,XMM3
ANDNPD XMM3,XMM0
CVTTSD2SI EAX,XMM4
ORPD XMM3,XMM1
CVTTSD2SI R13D,XMM3
MOVSXD R15,EAX
MOV RDI,R15
CALL 0x0014a6e8
MOV R12,RAX
XOR EBP,EBP
TEST R13D,R13D
CMOVLE R13D,EBP
SHL R13,0x2
LEA RBX,[0x185570]
LAB_0014a89c:
CMP R13,RBP
JZ 0x0014a8c7
MOVSXD RAX,dword ptr [RBP + RBX*0x1]
ADD R12,RAX
CMP RBP,0x4
JNZ 0x0014a8c1
MOV RDI,R15
CALL 0x0014a6b0
ADD R12,RAX
ADD R12,-0x16d
LAB_0014a8c1:
ADD RBP,0x4
JMP 0x0014a89c
LAB_0014a8c7:
CVTSI2SD XMM0,R12
MOVAPD XMM3,xmmword ptr [RSP + 0x10]
ADDSD XMM3,XMM0
ADDSD XMM3,qword ptr [0x00185850]
MOVSD XMM0,qword ptr [R14 + 0x18]
MULSD XMM0,qword ptr [0x00185888]
MOVUPD XMM1,xmmword ptr [R14 + 0x20]
MULPD XMM1,xmmword ptr [0x00185730]
ADDSD XMM0,XMM1
MOVAPD XMM2,XMM1
UNPCKHPD XMM2,XMM1
ADDSD XMM2,XMM0
ADDSD XMM2,qword ptr [R14 + 0x30]
MOVLPD qword ptr [RSP + 0x8],XMM1
MOVHPD qword ptr [RSP + 0x8],XMM1
MULSD XMM3,qword ptr [0x00185890]
MOVSD qword ptr [RSP + 0x8],XMM3
ADDSD XMM3,XMM2
MOVQ RAX,XMM3
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JLE 0x0014a954
MOVSD XMM1,qword ptr [0x001857d0]
JMP 0x0014a9f0
LAB_0014a954:
MOVAPD XMM0,XMM3
CMP dword ptr [RSP],0x0
JZ 0x0014a9c1
MOVAPD XMM1,XMM0
MOVAPD xmmword ptr [RSP + 0x10],XMM0
UCOMISD XMM0,qword ptr [0x00182008]
CVTTSD2SI RAX,XMM0
MOV RDI,0x7fffffffffffffff
CMOVNC RAX,RDI
INC RDI
MOVSD XMM0,qword ptr [0x001857e8]
UCOMISD XMM0,XMM1
CMOVBE RDI,RAX
CALL 0x0014a679
IMUL EAX,EAX,0xea60
CVTSI2SD XMM0,EAX
MOVAPD XMM1,xmmword ptr [RSP + 0x10]
ADDSD XMM1,XMM0
MOVAPD XMM2,xmmword ptr [0x00185700]
MOVAPD XMM0,XMM1
ANDPD XMM2,XMM1
JMP 0x0014a9cd
LAB_0014a9c1:
MOVAPD XMM2,xmmword ptr [0x00185700]
ANDPD XMM2,XMM0
LAB_0014a9cd:
MOVSD XMM1,qword ptr [0x00185810]
UCOMISD XMM1,XMM2
MOVSD XMM1,qword ptr [0x001857d0]
JC 0x0014a9f0
CALL 0x0010e150
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
LAB_0014a9f0:
MOVAPD XMM0,XMM1
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double set_date_fields(double *param_1,int param_2)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
uint uVar5;
ulong uVar6;
double dVar7;
double dVar8;
double dVar9;
double dVar10;
dVar9 = param_1[1];
dVar10 = param_1[2];
dVar7 = floor(dVar9 / DAT_00185870);
dVar7 = dVar7 + *param_1;
dVar8 = fmod(dVar9,DAT_00185870);
dVar9 = DAT_001857d0;
if ((DAT_00185878 <= dVar7) && (dVar7 <= _DAT_00185880)) {
uVar5 = (uint)(double)(~-(ulong)(dVar8 < 0.0) & (ulong)dVar8 |
(ulong)(DAT_00185870 + dVar8) & -(ulong)(dVar8 < 0.0));
lVar2 = days_from_year((long)(int)dVar7);
uVar4 = 0;
uVar6 = (ulong)uVar5;
if ((int)uVar5 < 1) {
uVar6 = uVar4;
}
for (; uVar6 * 4 != uVar4; uVar4 = uVar4 + 4) {
lVar2 = lVar2 + *(int *)((long)&month_days + uVar4);
if (uVar4 == 4) {
lVar3 = days_in_year((long)(int)dVar7);
lVar2 = lVar2 + lVar3 + -0x16d;
}
}
dVar10 = (dVar10 + (double)lVar2 + _DAT_00185850) * _DAT_00185890 +
param_1[5] * _UNK_00185738 + param_1[3] * _DAT_00185888 + param_1[4] * _DAT_00185730 +
param_1[6];
dVar9 = DAT_001857d0;
if ((long)ABS(dVar10) < 0x7ff0000000000000) {
if (param_2 == 0) {
dVar7 = (double)(_DAT_00185700 & (ulong)dVar10);
}
else {
lVar2 = (long)dVar10;
if (DAT_00182008 <= dVar10) {
lVar2 = 0x7fffffffffffffff;
}
lVar3 = -0x8000000000000000;
if (DAT_001857e8 <= dVar10) {
lVar3 = lVar2;
}
iVar1 = getTimezoneOffset(lVar3);
dVar10 = dVar10 + (double)(iVar1 * 60000);
dVar7 = (double)(_DAT_00185700 & (ulong)dVar10);
}
dVar9 = DAT_001857d0;
if (dVar7 <= DAT_00185810) {
dVar9 = trunc(dVar10);
dVar9 = dVar9 + 0.0;
}
}
}
return dVar9;
}
|
|
61,234
|
get_one_option
|
eloqsql/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
|
static my_bool
get_one_option(const struct my_option *opt,
const char *argument __attribute__((unused)),
const char *filename __attribute__((unused)))
{
switch (opt->id) {
case '?':
usage();
exit(0);
#ifndef DBUG_OFF
case '#':
DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
break;
#endif
}
return 0;
}
|
O3
|
c
|
get_one_option:
cmpl $0x3f, 0x8(%rdi)
je 0x334e0
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
callq 0x334f0
xorl %edi, %edi
callq 0x2a5b0
|
get_one_option:
cmp dword ptr [rdi+8], 3Fh ; '?'
jz short loc_334E0
xor eax, eax
retn
loc_334E0:
push rbp
mov rbp, rsp
call usage
xor edi, edi
call _exit
|
long long get_one_option(long long a1)
{
if ( *(_DWORD *)(a1 + 8) == 63 )
{
usage(a1);
exit(0LL);
}
return 0LL;
}
|
get_one_option:
CMP dword ptr [RDI + 0x8],0x3f
JZ 0x001334e0
XOR EAX,EAX
RET
LAB_001334e0:
PUSH RBP
MOV RBP,RSP
CALL 0x001334f0
XOR EDI,EDI
CALL 0x0012a5b0
|
int8 get_one_option(long param_1)
{
if (*(int *)(param_1 + 8) != 0x3f) {
return 0;
}
usage();
/* WARNING: Subroutine does not return */
exit(0);
}
|
|
61,235
|
camellia_ctx_alloc
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher_wrap.c
|
static void *camellia_ctx_alloc(void)
{
mbedtls_camellia_context *ctx;
ctx = mbedtls_calloc(1, sizeof(mbedtls_camellia_context));
if (ctx == NULL) {
return NULL;
}
mbedtls_camellia_init(ctx);
return ctx;
}
|
O3
|
c
|
camellia_ctx_alloc:
pushq %rbx
movl $0x1, %edi
movl $0x114, %esi # imm = 0x114
callq 0xf2f0
movq %rax, %rbx
testq %rax, %rax
je 0x9b2ad
movq %rbx, %rdi
callq 0x9ddcc
movq %rbx, %rax
popq %rbx
retq
|
camellia_ctx_alloc:
push rbx
mov edi, 1
mov esi, 114h
call _calloc
mov rbx, rax
test rax, rax
jz short loc_9B2AD
mov rdi, rbx
call mbedtls_camellia_init
loc_9B2AD:
mov rax, rbx
pop rbx
retn
|
long long camellia_ctx_alloc()
{
long long v0; // rax
long long v1; // rbx
v0 = calloc(1LL, 276LL);
v1 = v0;
if ( v0 )
mbedtls_camellia_init(v0);
return v1;
}
|
camellia_ctx_alloc:
PUSH RBX
MOV EDI,0x1
MOV ESI,0x114
CALL 0x0010f2f0
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0019b2ad
MOV RDI,RBX
CALL 0x0019ddcc
LAB_0019b2ad:
MOV RAX,RBX
POP RBX
RET
|
void * camellia_ctx_alloc(void)
{
void *pvVar1;
pvVar1 = calloc(1,0x114);
if (pvVar1 != (void *)0x0) {
mbedtls_camellia_init(pvVar1);
}
return pvVar1;
}
|
|
61,236
|
ftxui::MenuOption::Horizontal()
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/component_options.cpp
|
MenuOption MenuOption::Horizontal() {
MenuOption option;
option.direction = Direction::Right;
option.entries_option.transform = [](const EntryState& state) {
Element e = text(state.label);
if (state.focused) {
e |= inverted;
}
if (state.active) {
e |= bold;
}
if (!state.focused && !state.active) {
e |= dim;
}
return e;
};
option.elements_infix = [] { return text(" "); };
return option;
}
|
O0
|
cpp
|
ftxui::MenuOption::Horizontal():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
callq 0x7a7d0
movq -0x18(%rbp), %rdi
movl $0x3, 0x128(%rdi)
addq $0x80, %rdi
addq $0x28, %rdi
leaq -0xa(%rbp), %rsi
callq 0x74f20
movq -0x18(%rbp), %rdi
addq $0x150, %rdi # imm = 0x150
leaq -0xb(%rbp), %rsi
callq 0x74f70
movb $0x1, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
jne 0x74f09
movq -0x18(%rbp), %rdi
callq 0x7a910
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5ftxui10MenuOption10HorizontalEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov rax, rdi
mov [rbp+var_20], rax
mov [rbp+var_8], rdi
mov [rbp+var_9], 0
call _ZN5ftxui10MenuOptionC2Ev; ftxui::MenuOption::MenuOption(void)
mov rdi, [rbp+var_18]
mov dword ptr [rdi+128h], 3
add rdi, 80h
add rdi, 28h ; '('
lea rsi, [rbp+var_A]
call _ZNSt8functionIFSt10shared_ptrIN5ftxui4NodeEERKNS1_10EntryStateEEEaSIZNS1_10MenuOption10HorizontalEvE3$_0EENSt9enable_ifIXsrNS8_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES8_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS6_EEEE5valueERS8_E4typeEOSE_
mov rdi, [rbp+var_18]
add rdi, 150h
lea rsi, [rbp+var_B]
call _ZNSt8functionIFSt10shared_ptrIN5ftxui4NodeEEvEEaSIZNS1_10MenuOption10HorizontalEvE3$_1EENSt9enable_ifIXsrNS5_9_CallableIT_NS9_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISB_E4typeEE4typeES5_EE5valueESt5decayISB_EE4type4typeESt15__invoke_resultIRSM_JEEEE5valueERS5_E4typeEOSB_
mov [rbp+var_9], 1
test [rbp+var_9], 1
jnz short loc_74F09
mov rdi, [rbp+var_18]; this
call _ZN5ftxui10MenuOptionD2Ev; ftxui::MenuOption::~MenuOption()
loc_74F09:
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
ftxui::MenuOption * ftxui::MenuOption::Horizontal(ftxui::MenuOption *this)
{
char v2; // [rsp+15h] [rbp-Bh] BYREF
_BYTE v3[2]; // [rsp+16h] [rbp-Ah] BYREF
ftxui::MenuOption *v4; // [rsp+18h] [rbp-8h]
v4 = this;
v3[1] = 0;
ftxui::MenuOption::MenuOption(this);
*((_DWORD *)this + 74) = 3;
std::function<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&)>::operator=<ftxui::MenuOption::Horizontal(void)::$_0>(
(char *)this + 168,
v3);
std::function<std::shared_ptr<ftxui::Node> ()(void)>::operator=<ftxui::MenuOption::Horizontal(void)::$_1>(
(char *)this + 336,
&v2);
return this;
}
|
Horizontal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],0x0
CALL 0x0017a7d0
MOV RDI,qword ptr [RBP + -0x18]
MOV dword ptr [RDI + 0x128],0x3
ADD RDI,0x80
ADD RDI,0x28
LEA RSI,[RBP + -0xa]
CALL 0x00174f20
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x150
LEA RSI,[RBP + -0xb]
CALL 0x00174f70
MOV byte ptr [RBP + -0x9],0x1
TEST byte ptr [RBP + -0x9],0x1
JNZ 0x00174f09
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0017a910
LAB_00174f09:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00174f00) */
/* ftxui::MenuOption::Horizontal() */
MenuOption * __thiscall ftxui::MenuOption::Horizontal(MenuOption *this)
{
__1 local_13;
__0 local_12;
int1 local_11;
MenuOption *local_10;
local_11 = 0;
local_10 = this;
MenuOption(this);
*(int4 *)(this + 0x128) = 3;
std::function<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&)>::operator=
((function<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&)> *)(this + 0xa8),
&local_12);
std::function<std::shared_ptr<ftxui::Node>()>::operator=
((function<std::shared_ptr<ftxui::Node>()> *)(this + 0x150),&local_13);
return this;
}
|
|
61,237
|
mysql_stmt_next_result
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
{
int rc= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_EXECUTED)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!mysql_stmt_more_results(stmt))
return(-1);
if (stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE)
madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA);
stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE;
if (mysql_next_result(stmt->mysql))
{
stmt->state= MYSQL_STMT_FETCH_DONE;
SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate,
stmt->mysql->net.last_error);
return(1);
}
if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT)
stmt->mysql->status= MYSQL_STATUS_STMT_RESULT;
if (stmt->mysql->field_count)
rc= madb_alloc_stmt_fields(stmt);
else
{
stmt->upsert_status.affected_rows= stmt->mysql->affected_rows;
stmt->upsert_status.last_insert_id= stmt->mysql->insert_id;
stmt->upsert_status.server_status= stmt->mysql->server_status;
stmt->upsert_status.warning_count= stmt->mysql->warning_count;
}
stmt->field_count= stmt->mysql->field_count;
stmt->result.rows= 0;
return(rc);
}
|
O0
|
c
|
mysql_stmt_next_result:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x347df
jmp 0x34770
movq -0x10(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x35c00(%rip), %rax # 0x6a390
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x35be6(%rip), %rax # 0x6a3a0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x34ada
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jae 0x348d7
jmp 0x347ef
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x35b79(%rip), %rax # 0x6a390
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x35b57(%rip), %rax # 0x6a3a0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
jmp 0x34868
movq -0x10(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x35b08(%rip), %rax # 0x6a390
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x35aee(%rip), %rax # 0x6a3a0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x34ada
movq -0x10(%rbp), %rdi
callq 0x34110
cmpb $0x0, %al
jne 0x348f0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x34ada
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jbe 0x34912
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jae 0x34912
movq -0x10(%rbp), %rdi
movl $0xb, %esi
callq 0x31bd0
movq -0x10(%rbp), %rax
movl $0x3, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x251a0
cmpl $0x0, %eax
je 0x34a0a
movq -0x10(%rbp), %rax
movl $0x6, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x349bb
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x28(%rbp)
jmp 0x349e1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x359c7(%rip), %rax # 0x6a3a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x34ada
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x1, 0x488(%rax)
jne 0x34a2d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x8, 0x488(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x0, 0x37c(%rax)
je 0x34a4c
movq -0x10(%rbp), %rdi
callq 0x34af0
movl %eax, -0x14(%rbp)
jmp 0x34ab0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x338(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf8(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x340(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x100(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x380(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf4(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x388(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x37c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_stmt_next_result:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jnz short loc_347DF
jmp short $+2
loc_34770:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_34ADA
loc_347DF:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jnb loc_348D7
jmp short $+2
loc_347EF:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7DEh
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_34868:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_34ADA
loc_348D7:
mov rdi, [rbp+var_10]
call mysql_stmt_more_results
cmp al, 0
jnz short loc_348F0
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_34ADA
loc_348F0:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jbe short loc_34912
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnb short loc_34912
mov rdi, [rbp+var_10]
mov esi, 0Bh
call madb_reset_stmt
loc_34912:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 3
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call mysql_next_result
cmp eax, 0
jz loc_34A0A
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 6
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_10]
mov [rax+108h], ecx
mov rdi, [rbp+var_10]
add rdi, 30Dh
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_10]
add rax, 10Ch
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_349BB
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_28], rax
jmp short loc_349E1
loc_349BB:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
loc_349E1:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_34ADA
loc_34A0A:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+488h], 1
jnz short loc_34A2D
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 8
loc_34A2D:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+37Ch], 0
jz short loc_34A4C
mov rdi, [rbp+var_10]
call madb_alloc_stmt_fields
mov [rbp+var_14], eax
jmp short loc_34AB0
loc_34A4C:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+338h]
mov rax, [rbp+var_10]
mov [rax+0F8h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+340h]
mov rax, [rbp+var_10]
mov [rax+100h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+380h]
mov rax, [rbp+var_10]
mov [rax+0F4h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+388h]
mov rax, [rbp+var_10]
mov [rax+0F0h], ecx
loc_34AB0:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+37Ch]
mov rax, [rbp+var_10]
mov [rax+60h], ecx
mov rax, [rbp+var_10]
mov qword ptr [rax+0C8h], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_34ADA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mysql_stmt_next_result(long long a1)
{
char *v1; // rax
unsigned int v3; // [rsp+1Ch] [rbp-14h]
v3 = 0;
if ( *(_QWORD *)(a1 + 56) )
{
if ( *(_DWORD *)(a1 + 80) >= 2u )
{
if ( mysql_stmt_more_results(a1) )
{
if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(a1 + 80) < 6u )
madb_reset_stmt(a1, 11);
*(_DWORD *)(a1 + 80) = 3;
if ( (unsigned int)mysql_next_result(*(_QWORD *)(a1 + 56)) )
{
*(_DWORD *)(a1 + 80) = 6;
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v1 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v1 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v1, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) == 1 )
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 8;
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL) )
{
v3 = madb_alloc_stmt_fields(a1);
}
else
{
*(_QWORD *)(a1 + 248) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 824LL);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 832LL);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL);
}
*(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL);
*(_QWORD *)(a1 + 200) = 0LL;
return v3;
}
}
else
{
return (unsigned int)-1;
}
}
else
{
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 2014;
strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
else
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[13], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
|
mysql_stmt_next_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x001347df
JMP 0x00134770
LAB_00134770:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x16a390]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x16a3a0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134ada
LAB_001347df:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JNC 0x001348d7
JMP 0x001347ef
LAB_001347ef:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7de
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x16a390]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x16a3a0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x00134868
LAB_00134868:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x16a390]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x16a3a0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134ada
LAB_001348d7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00134110
CMP AL,0x0
JNZ 0x001348f0
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00134ada
LAB_001348f0:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JBE 0x00134912
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNC 0x00134912
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xb
CALL 0x00131bd0
LAB_00134912:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x3
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001251a0
CMP EAX,0x0
JZ 0x00134a0a
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x001349bb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001349e1
LAB_001349bb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x16a3a0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001349e1:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134ada
LAB_00134a0a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x488],0x1
JNZ 0x00134a2d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x8
LAB_00134a2d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x37c],0x0
JZ 0x00134a4c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00134af0
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00134ab0
LAB_00134a4c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x338]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xf8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x340]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x100],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x380]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x388]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf0],ECX
LAB_00134ab0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x37c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_00134ada:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_next_result(long param_1)
{
char cVar1;
int iVar2;
char *local_30;
int4 local_1c;
int4 local_c;
local_1c = 0;
if (*(long *)(param_1 + 0x38) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_0016a408,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else if (*(uint *)(param_1 + 0x50) < 2) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0016a410,0x1ff);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_0016a410,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else {
cVar1 = mysql_stmt_more_results(param_1);
if (cVar1 == '\0') {
local_c = 0xffffffff;
}
else {
if ((2 < *(uint *)(param_1 + 0x50)) && (*(uint *)(param_1 + 0x50) < 6)) {
madb_reset_stmt(param_1,0xb);
}
*(int4 *)(param_1 + 0x50) = 3;
iVar2 = mysql_next_result(*(int8 *)(param_1 + 0x38));
if (iVar2 == 0) {
if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 1) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 8;
}
if (*(int *)(*(long *)(param_1 + 0x38) + 0x37c) == 0) {
*(int8 *)(param_1 + 0xf8) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x388);
}
else {
local_1c = madb_alloc_stmt_fields(param_1);
}
*(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c);
*(int8 *)(param_1 + 200) = 0;
local_c = local_1c;
}
else {
*(int4 *)(param_1 + 0x50) = 6;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_30 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_30 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_30,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
}
}
return local_c;
}
|
|
61,238
|
make_empty_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
make_empty_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
cmpl $0x3, -0x14(%rbp)
je 0x7a0f6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl 0xc18(%rcx), %ecx
addl $0xc, %ecx
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movsbl -0x15(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x9(%rax)
cmpb $0x0, -0x15(%rbp)
je 0x7a16e
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
subl $0x4, %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0x7a157
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x0, (%rax)
jmp 0x7a16e
jmp 0x7a170
jmp 0x7a172
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
make_empty_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
cmp [rbp+var_14], 3
jz short loc_7A0F6
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
add rdi, rax
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov ecx, [rcx+0C18h]
add ecx, 0Ch
sub eax, ecx
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
loc_7A0F6:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
movsx eax, [rbp+var_15]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+8], cl
mov rax, [rbp+var_10]
mov byte ptr [rax+9], 0FFh
cmp [rbp+var_15], 0
jz short loc_7A16E
mov ecx, [rbp+var_1C]
sub ecx, 4
sub ecx, 4
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov cx, ax
mov rax, [rbp+var_28]
mov [rax], cx
jmp short $+2
loc_7A157:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov word ptr [rax], 0
jmp short $+2
loc_7A16E:
jmp short $+2
loc_7A170:
jmp short $+2
loc_7A172:
add rsp, 30h
pop rbp
retn
|
_WORD * make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
_WORD *result; // rax
_WORD *v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+14h] [rbp-1Ch]
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
memset(
&a2[*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12],
0LL,
(unsigned int)(v6 - (*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12)));
a2[7] = a3;
a2[8] = a4;
result = a2;
a2[9] = -1;
if ( a4 )
{
v5 = &a2[v6 - 8];
*v5 = *(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12;
result = v5 + 1;
v5[1] = 0;
}
return result;
}
|
make_empty_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
CMP dword ptr [RBP + -0x14],0x3
JZ 0x0017a0f6
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0xc
SUB EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
LAB_0017a0f6:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOVSX EAX,byte ptr [RBP + -0x15]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x9],0xff
CMP byte ptr [RBP + -0x15],0x0
JZ 0x0017a16e
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x4
SUB ECX,0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX],CX
JMP 0x0017a157
LAB_0017a157:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],0x0
JMP 0x0017a16e
LAB_0017a16e:
JMP 0x0017a170
LAB_0017a170:
JMP 0x0017a172
LAB_0017a172:
ADD RSP,0x30
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
short *psVar2;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
memset((void *)((long)param_2 + (ulong)(*(int *)(*param_1 + 0xc18) + 0xc)),0,
(ulong)(uint)(iVar1 - (*(int *)(*param_1 + 0xc18) + 0xc)));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
psVar2 = (short *)((long)param_2 + (ulong)(iVar1 - 8));
*psVar2 = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
psVar2[1] = 0;
}
return;
}
|
|
61,239
|
remove_reader
|
eloqsql/mysys/mf_keycache.c
|
static void remove_reader(BLOCK_LINK *block)
{
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
DBUG_ASSERT(block->hash_link->requests);
if (! --block->hash_link->requests && block->condvar)
keycache_pthread_cond_signal(block->condvar);
}
|
O0
|
c
|
remove_reader:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0xe54be
jmp 0xe54c0
jmp 0xe54c2
jmp 0xe54c4
jmp 0xe54c6
jmp 0xe54c8
jmp 0xe54ca
jmp 0xe54cc
jmp 0xe54ce
jmp 0xe54d0
jmp 0xe54d2
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movl 0x28(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x28(%rcx)
cmpl $0x0, %eax
jne 0xe5500
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xe5500
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0xe68d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
remove_reader_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_E54BE:
jmp short $+2
loc_E54C0:
jmp short $+2
loc_E54C2:
jmp short $+2
loc_E54C4:
jmp short $+2
loc_E54C6:
jmp short $+2
loc_E54C8:
jmp short $+2
loc_E54CA:
jmp short $+2
loc_E54CC:
jmp short $+2
loc_E54CE:
jmp short $+2
loc_E54D0:
jmp short $+2
loc_E54D2:
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
mov eax, [rcx+28h]
add eax, 0FFFFFFFFh
mov [rcx+28h], eax
cmp eax, 0
jnz short loc_E5500
mov rax, [rbp+var_8]
cmp qword ptr [rax+68h], 0
jz short loc_E5500
mov rax, [rbp+var_8]
mov rdi, [rax+68h]
call inline_mysql_cond_signal_2
loc_E5500:
add rsp, 10h
pop rbp
retn
|
long long remove_reader_0(long long a1)
{
long long v1; // rcx
long long result; // rax
v1 = *(_QWORD *)(a1 + 32);
result = (unsigned int)(*(_DWORD *)(v1 + 40) - 1);
*(_DWORD *)(v1 + 40) = result;
if ( !(_DWORD)result )
{
result = a1;
if ( *(_QWORD *)(a1 + 104) )
return inline_mysql_cond_signal_2(*(_QWORD *)(a1 + 104));
}
return result;
}
|
remove_reader:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x001e54be
LAB_001e54be:
JMP 0x001e54c0
LAB_001e54c0:
JMP 0x001e54c2
LAB_001e54c2:
JMP 0x001e54c4
LAB_001e54c4:
JMP 0x001e54c6
LAB_001e54c6:
JMP 0x001e54c8
LAB_001e54c8:
JMP 0x001e54ca
LAB_001e54ca:
JMP 0x001e54cc
LAB_001e54cc:
JMP 0x001e54ce
LAB_001e54ce:
JMP 0x001e54d0
LAB_001e54d0:
JMP 0x001e54d2
LAB_001e54d2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RCX + 0x28]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x28],EAX
CMP EAX,0x0
JNZ 0x001e5500
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x68],0x0
JZ 0x001e5500
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x001e68d0
LAB_001e5500:
ADD RSP,0x10
POP RBP
RET
|
void remove_reader(long param_1)
{
int iVar1;
iVar1 = *(int *)(*(long *)(param_1 + 0x20) + 0x28) + -1;
*(int *)(*(long *)(param_1 + 0x20) + 0x28) = iVar1;
if ((iVar1 == 0) && (*(long *)(param_1 + 0x68) != 0)) {
inline_mysql_cond_signal(*(int8 *)(param_1 + 0x68));
}
return;
}
|
|
61,240
|
plutovg_parse_number
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-utils.h
|
static inline bool plutovg_parse_number(const char** begin, const char* end, float* number)
{
const char* it = *begin;
float integer = 0;
float fraction = 0;
float exponent = 0;
int sign = 1;
int expsign = 1;
if(it < end && *it == '+') {
++it;
} else if(it < end && *it == '-') {
++it;
sign = -1;
}
if(it >= end || (*it != '.' && !PLUTOVG_IS_NUM(*it)))
return false;
if(PLUTOVG_IS_NUM(*it)) {
do {
integer = 10.f * integer + (*it++ - '0');
} while(it < end && PLUTOVG_IS_NUM(*it));
}
if(it < end && *it == '.') {
++it;
if(it >= end || !PLUTOVG_IS_NUM(*it))
return false;
float divisor = 1.f;
do {
fraction = 10.f * fraction + (*it++ - '0');
divisor *= 10.f;
} while(it < end && PLUTOVG_IS_NUM(*it));
fraction /= divisor;
}
if(it < end && (*it == 'e' || *it == 'E')) {
++it;
if(it < end && *it == '+') {
++it;
} else if(it < end && *it == '-') {
++it;
expsign = -1;
}
if(it >= end || !PLUTOVG_IS_NUM(*it))
return false;
do {
exponent = 10 * exponent + (*it++ - '0');
} while(it < end && PLUTOVG_IS_NUM(*it));
}
*begin = it;
*number = sign * (integer + fraction);
if(exponent)
*number *= powf(10.f, expsign * exponent);
return *number >= -FLT_MAX && *number <= FLT_MAX;
}
|
O0
|
c
|
plutovg_parse_number:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movl $0x1, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xc909
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0xc909
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xc934
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xc932
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xc932
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
jmp 0xc934
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xc962
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0xc96b
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0xc962
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0xc96b
movb $0x0, -0x1(%rbp)
jmp 0xccab
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0xc9fb
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0xc9fb
jmp 0xc989
movss -0x2c(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
subl $0x30, %eax
cvtsi2ss %eax, %xmm1
movss 0x2e66d(%rip), %xmm2 # 0x3b01c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0xc9f2
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x42(%rbp)
jl 0xc9ec
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xc989
jmp 0xc9fb
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xcaf6
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xcaf6
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xca47
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0xca47
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0xca50
movb $0x0, -0x1(%rbp)
jmp 0xccab
movss 0x2e5cc(%rip), %xmm0 # 0x3b024
movss %xmm0, -0x40(%rbp)
movss -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
subl $0x30, %eax
cvtsi2ss %eax, %xmm1
movss 0x2e599(%rip), %xmm2 # 0x3b01c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movss 0x2e584(%rip), %xmm0 # 0x3b01c
mulss -0x40(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x43(%rbp)
jae 0xcad8
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x44(%rbp)
jl 0xcad2
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x44(%rbp)
movb -0x44(%rbp), %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
testb $0x1, %al
jne 0xca5d
movss -0x40(%rbp), %xmm1
movss -0x30(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xcc1a
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
je 0xcb20
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
jne 0xcc1a
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xcb50
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0xcb50
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xcb7b
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xcb79
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xcb79
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
jmp 0xcb7b
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xcb9d
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0xcb9d
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0xcba6
movb $0x0, -0x1(%rbp)
jmp 0xccab
jmp 0xcba8
movss -0x34(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %eax
subl $0x30, %eax
cvtsi2ss %eax, %xmm1
movss 0x2e44e(%rip), %xmm2 # 0x3b01c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0xcc11
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x46(%rbp)
jl 0xcc0b
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x46(%rbp)
movb -0x46(%rbp), %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0xcba8
jmp 0xcc1a
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cvtsi2ssl -0x38(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x30(%rbp), %xmm1
mulss %xmm1, %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, (%rax)
movss -0x34(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xcc51
jp 0xcc51
jmp 0xcc74
cvtsi2ssl -0x3c(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
movss 0x2e3b9(%rip), %xmm0 # 0x3b01c
callq 0x3220
movq -0x20(%rbp), %rax
mulss (%rax), %xmm0
movss %xmm0, (%rax)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
xorl %eax, %eax
movss 0x2eb8a(%rip), %xmm1 # 0x3b810
ucomiss %xmm1, %xmm0
movb %al, -0x47(%rbp)
jb 0xcca3
movq -0x20(%rbp), %rax
movss 0x2eb7a(%rip), %xmm0 # 0x3b814
ucomiss (%rax), %xmm0
setae %al
movb %al, -0x47(%rbp)
movb -0x47(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
plutovg_parse_number:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
xorps xmm0, xmm0
movss [rbp+var_2C], xmm0
xorps xmm0, xmm0
movss [rbp+var_30], xmm0
xorps xmm0, xmm0
movss [rbp+var_34], xmm0
mov [rbp+var_38], 1
mov [rbp+var_3C], 1
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_C909
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_C909
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_C934
loc_C909:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_C932
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_C932
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_38], 0FFFFFFFFh
loc_C932:
jmp short $+2
loc_C934:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_C962
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jz short loc_C96B
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_C962
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_C96B
loc_C962:
mov [rbp+var_1], 0
jmp loc_CCAB
loc_C96B:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl loc_C9FB
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jg short loc_C9FB
jmp short $+2
loc_C989:
movss xmm0, [rbp+var_2C]
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
cvtsi2ss xmm1, eax
movss xmm2, cs:dword_3B01C
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_2C], xmm0
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_41], al
jnb short loc_C9F2
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 30h ; '0'
mov [rbp+var_42], al
jl short loc_C9EC
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
setle al
mov [rbp+var_42], al
loc_C9EC:
mov al, [rbp+var_42]
mov [rbp+var_41], al
loc_C9F2:
mov al, [rbp+var_41]
test al, 1
jnz short loc_C989
jmp short $+2
loc_C9FB:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb loc_CAF6
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_CAF6
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_CA47
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_CA47
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_CA50
loc_CA47:
mov [rbp+var_1], 0
jmp loc_CCAB
loc_CA50:
movss xmm0, cs:dword_3B024
movss [rbp+var_40], xmm0
loc_CA5D:
movss xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
cvtsi2ss xmm1, eax
movss xmm2, cs:dword_3B01C
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_30], xmm0
movss xmm0, cs:dword_3B01C
mulss xmm0, [rbp+var_40]
movss [rbp+var_40], xmm0
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_43], al
jnb short loc_CAD8
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 30h ; '0'
mov [rbp+var_44], al
jl short loc_CAD2
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
setle al
mov [rbp+var_44], al
loc_CAD2:
mov al, [rbp+var_44]
mov [rbp+var_43], al
loc_CAD8:
mov al, [rbp+var_43]
test al, 1
jnz loc_CA5D
movss xmm1, [rbp+var_40]
movss xmm0, [rbp+var_30]
divss xmm0, xmm1
movss [rbp+var_30], xmm0
loc_CAF6:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb loc_CC1A
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 65h ; 'e'
jz short loc_CB20
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 45h ; 'E'
jnz loc_CC1A
loc_CB20:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_CB50
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_CB50
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_CB7B
loc_CB50:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_CB79
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_CB79
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_3C], 0FFFFFFFFh
loc_CB79:
jmp short $+2
loc_CB7B:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_CB9D
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_CB9D
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_CBA6
loc_CB9D:
mov [rbp+var_1], 0
jmp loc_CCAB
loc_CBA6:
jmp short $+2
loc_CBA8:
movss xmm0, [rbp+var_34]
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
cvtsi2ss xmm1, eax
movss xmm2, cs:dword_3B01C
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_34], xmm0
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_45], al
jnb short loc_CC11
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 30h ; '0'
mov [rbp+var_46], al
jl short loc_CC0B
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
setle al
mov [rbp+var_46], al
loc_CC0B:
mov al, [rbp+var_46]
mov [rbp+var_45], al
loc_CC11:
mov al, [rbp+var_45]
test al, 1
jnz short loc_CBA8
jmp short $+2
loc_CC1A:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
cvtsi2ss xmm0, [rbp+var_38]
movss xmm1, [rbp+var_2C]
addss xmm1, [rbp+var_30]
mulss xmm0, xmm1
mov rax, [rbp+var_20]
movss dword ptr [rax], xmm0
movss xmm0, [rbp+var_34]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jnz short loc_CC51
jp short loc_CC51
jmp short loc_CC74
loc_CC51:
cvtsi2ss xmm1, [rbp+var_3C]
mulss xmm1, [rbp+var_34]
movss xmm0, cs:dword_3B01C
call _powf
mov rax, [rbp+var_20]
mulss xmm0, dword ptr [rax]
movss dword ptr [rax], xmm0
loc_CC74:
mov rax, [rbp+var_20]
movss xmm0, dword ptr [rax]
xor eax, eax
movss xmm1, cs:dword_3B810
ucomiss xmm0, xmm1
mov [rbp+var_47], al
jb short loc_CCA3
mov rax, [rbp+var_20]
movss xmm0, cs:dword_3B814
ucomiss xmm0, dword ptr [rax]
setnb al
mov [rbp+var_47], al
loc_CCA3:
mov al, [rbp+var_47]
and al, 1
mov [rbp+var_1], al
loc_CCAB:
mov al, [rbp+var_1]
and al, 1
add rsp, 50h
pop rbp
retn
|
bool plutovg_parse_number(char **a1, unsigned long long a2, float *a3)
{
char *v3; // rax
char *v4; // rax
char *v5; // rax
bool v7; // [rsp+9h] [rbp-47h]
bool v8; // [rsp+Ah] [rbp-46h]
bool v9; // [rsp+Bh] [rbp-45h]
bool v10; // [rsp+Ch] [rbp-44h]
bool v11; // [rsp+Dh] [rbp-43h]
bool v12; // [rsp+Eh] [rbp-42h]
bool v13; // [rsp+Fh] [rbp-41h]
float v14; // [rsp+10h] [rbp-40h]
int v15; // [rsp+14h] [rbp-3Ch]
int v16; // [rsp+18h] [rbp-38h]
float v17; // [rsp+1Ch] [rbp-34h]
float v18; // [rsp+20h] [rbp-30h]
float v19; // [rsp+24h] [rbp-2Ch]
char *v20; // [rsp+28h] [rbp-28h]
v20 = *a1;
v19 = 0.0;
v18 = 0.0;
v17 = 0.0;
v16 = 1;
v15 = 1;
if ( (unsigned long long)*a1 < a2 && *v20 == 43 )
{
++v20;
}
else if ( (unsigned long long)v20 < a2 && *v20 == 45 )
{
++v20;
v16 = -1;
}
if ( (unsigned long long)v20 >= a2 || *v20 != 46 && (*v20 < 48 || *v20 > 57) )
return 0;
if ( *v20 >= 48 && *v20 <= 57 )
{
do
{
v3 = v20++;
v19 = (float)(v19 * 10.0) + (float)(*v3 - 48);
v13 = 0;
if ( (unsigned long long)v20 < a2 )
{
v12 = 0;
if ( *v20 >= 48 )
v12 = *v20 <= 57;
v13 = v12;
}
}
while ( v13 );
}
if ( (unsigned long long)v20 < a2 && *v20 == 46 )
{
if ( (unsigned long long)++v20 >= a2 || *v20 < 48 || *v20 > 57 )
return 0;
v14 = 1.0;
do
{
v4 = v20++;
v18 = (float)(v18 * 10.0) + (float)(*v4 - 48);
v14 = 10.0 * v14;
v11 = 0;
if ( (unsigned long long)v20 < a2 )
{
v10 = 0;
if ( *v20 >= 48 )
v10 = *v20 <= 57;
v11 = v10;
}
}
while ( v11 );
v18 = v18 / v14;
}
if ( (unsigned long long)v20 < a2 && (*v20 == 101 || *v20 == 69) )
{
if ( (unsigned long long)++v20 < a2 && *v20 == 43 )
{
++v20;
}
else if ( (unsigned long long)v20 < a2 && *v20 == 45 )
{
++v20;
v15 = -1;
}
if ( (unsigned long long)v20 >= a2 || *v20 < 48 || *v20 > 57 )
return 0;
do
{
v5 = v20++;
v17 = (float)(v17 * 10.0) + (float)(*v5 - 48);
v9 = 0;
if ( (unsigned long long)v20 < a2 )
{
v8 = 0;
if ( *v20 >= 48 )
v8 = *v20 <= 57;
v9 = v8;
}
}
while ( v9 );
}
*a1 = v20;
*a3 = (float)v16 * (float)(v19 + v18);
if ( v17 != 0.0 )
*a3 = powf(10.0, (float)v15 * v17) * *a3;
v7 = 0;
if ( *a3 >= -3.4028235e38 )
return *a3 <= 3.4028235e38;
return v7;
}
|
plutovg_parse_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x2c],XMM0
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x30],XMM0
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x34],XMM0
MOV dword ptr [RBP + -0x38],0x1
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010c909
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x0010c909
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0010c934
LAB_0010c909:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010c932
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x0010c932
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x38],0xffffffff
LAB_0010c932:
JMP 0x0010c934
LAB_0010c934:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010c962
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JZ 0x0010c96b
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x0010c962
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x0010c96b
LAB_0010c962:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010ccab
LAB_0010c96b:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x0010c9fb
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JG 0x0010c9fb
JMP 0x0010c989
LAB_0010c989:
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
CVTSI2SS XMM1,EAX
MOVSS XMM2,dword ptr [0x0013b01c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x2c],XMM0
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x41],AL
JNC 0x0010c9f2
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x30
MOV byte ptr [RBP + -0x42],AL
JL 0x0010c9ec
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
SETLE AL
MOV byte ptr [RBP + -0x42],AL
LAB_0010c9ec:
MOV AL,byte ptr [RBP + -0x42]
MOV byte ptr [RBP + -0x41],AL
LAB_0010c9f2:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0010c989
JMP 0x0010c9fb
LAB_0010c9fb:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010caf6
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x0010caf6
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010ca47
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x0010ca47
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x0010ca50
LAB_0010ca47:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010ccab
LAB_0010ca50:
MOVSS XMM0,dword ptr [0x0013b024]
MOVSS dword ptr [RBP + -0x40],XMM0
LAB_0010ca5d:
MOVSS XMM0,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
CVTSI2SS XMM1,EAX
MOVSS XMM2,dword ptr [0x0013b01c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x30],XMM0
MOVSS XMM0,dword ptr [0x0013b01c]
MULSS XMM0,dword ptr [RBP + -0x40]
MOVSS dword ptr [RBP + -0x40],XMM0
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x43],AL
JNC 0x0010cad8
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x30
MOV byte ptr [RBP + -0x44],AL
JL 0x0010cad2
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
SETLE AL
MOV byte ptr [RBP + -0x44],AL
LAB_0010cad2:
MOV AL,byte ptr [RBP + -0x44]
MOV byte ptr [RBP + -0x43],AL
LAB_0010cad8:
MOV AL,byte ptr [RBP + -0x43]
TEST AL,0x1
JNZ 0x0010ca5d
MOVSS XMM1,dword ptr [RBP + -0x40]
MOVSS XMM0,dword ptr [RBP + -0x30]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x30],XMM0
LAB_0010caf6:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010cc1a
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x65
JZ 0x0010cb20
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x45
JNZ 0x0010cc1a
LAB_0010cb20:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010cb50
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x0010cb50
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0010cb7b
LAB_0010cb50:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010cb79
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x0010cb79
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x3c],0xffffffff
LAB_0010cb79:
JMP 0x0010cb7b
LAB_0010cb7b:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0010cb9d
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x0010cb9d
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x0010cba6
LAB_0010cb9d:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0010ccab
LAB_0010cba6:
JMP 0x0010cba8
LAB_0010cba8:
MOVSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
CVTSI2SS XMM1,EAX
MOVSS XMM2,dword ptr [0x0013b01c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x34],XMM0
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x45],AL
JNC 0x0010cc11
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x30
MOV byte ptr [RBP + -0x46],AL
JL 0x0010cc0b
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
SETLE AL
MOV byte ptr [RBP + -0x46],AL
LAB_0010cc0b:
MOV AL,byte ptr [RBP + -0x46]
MOV byte ptr [RBP + -0x45],AL
LAB_0010cc11:
MOV AL,byte ptr [RBP + -0x45]
TEST AL,0x1
JNZ 0x0010cba8
JMP 0x0010cc1a
LAB_0010cc1a:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
CVTSI2SS XMM0,dword ptr [RBP + -0x38]
MOVSS XMM1,dword ptr [RBP + -0x2c]
ADDSS XMM1,dword ptr [RBP + -0x30]
MULSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x20]
MOVSS dword ptr [RAX],XMM0
MOVSS XMM0,dword ptr [RBP + -0x34]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JNZ 0x0010cc51
JP 0x0010cc51
JMP 0x0010cc74
LAB_0010cc51:
CVTSI2SS XMM1,dword ptr [RBP + -0x3c]
MULSS XMM1,dword ptr [RBP + -0x34]
MOVSS XMM0,dword ptr [0x0013b01c]
CALL 0x00103220
MOV RAX,qword ptr [RBP + -0x20]
MULSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RAX],XMM0
LAB_0010cc74:
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RAX]
XOR EAX,EAX
MOVSS XMM1,dword ptr [0x0013b810]
UCOMISS XMM0,XMM1
MOV byte ptr [RBP + -0x47],AL
JC 0x0010cca3
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [0x0013b814]
UCOMISS XMM0,dword ptr [RAX]
SETNC AL
MOV byte ptr [RBP + -0x47],AL
LAB_0010cca3:
MOV AL,byte ptr [RBP + -0x47]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0010ccab:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
int8 plutovg_parse_number(int8 *param_1,char *param_2,float *param_3)
{
bool bVar1;
int7 uVar2;
char *pcVar3;
float fVar4;
bool local_4f;
float local_48;
int local_44;
int local_40;
float local_3c;
float local_38;
float local_34;
char *local_30;
bool local_9;
local_30 = (char *)*param_1;
local_34 = 0.0;
local_38 = 0.0;
local_3c = 0.0;
local_40 = 1;
local_44 = 1;
if ((local_30 < param_2) && (*local_30 == '+')) {
local_30 = local_30 + 1;
}
else if ((local_30 < param_2) && (*local_30 == '-')) {
local_30 = local_30 + 1;
local_40 = -1;
}
pcVar3 = local_30;
if ((local_30 < param_2) &&
((*local_30 == '.' ||
((pcVar3 = (char *)(ulong)(uint)(int)*local_30, 0x2f < *local_30 &&
(pcVar3 = (char *)(ulong)(uint)(int)*local_30, *local_30 < 0x3a)))))) {
if (('/' < *local_30) && (*local_30 < ':')) {
do {
pcVar3 = local_30 + 1;
local_34 = local_34 * DAT_0013b01c + (float)(*local_30 + -0x30);
bVar1 = false;
if ((pcVar3 < param_2) && (bVar1 = false, '/' < *pcVar3)) {
bVar1 = *pcVar3 < ':';
}
local_30 = pcVar3;
} while (bVar1);
}
if ((local_30 < param_2) && (*local_30 == '.')) {
local_30 = local_30 + 1;
pcVar3 = local_30;
if ((param_2 <= local_30) ||
((pcVar3 = (char *)(ulong)(uint)(int)*local_30, *local_30 < 0x30 ||
(pcVar3 = (char *)(ulong)(uint)(int)*local_30, 0x39 < *local_30)))) {
local_9 = false;
goto LAB_0010ccab;
}
local_48 = DAT_0013b024;
do {
pcVar3 = local_30 + 1;
local_38 = local_38 * DAT_0013b01c + (float)(*local_30 + -0x30);
local_48 = DAT_0013b01c * local_48;
bVar1 = false;
if ((pcVar3 < param_2) && (bVar1 = false, '/' < *pcVar3)) {
bVar1 = *pcVar3 < ':';
}
local_30 = pcVar3;
} while (bVar1);
local_38 = local_38 / local_48;
}
if ((local_30 < param_2) && ((*local_30 == 'e' || (*local_30 == 'E')))) {
pcVar3 = local_30 + 1;
if ((pcVar3 < param_2) && (*pcVar3 == '+')) {
pcVar3 = local_30 + 2;
}
else if ((pcVar3 < param_2) && (*pcVar3 == '-')) {
local_44 = -1;
pcVar3 = local_30 + 2;
}
local_30 = pcVar3;
pcVar3 = local_30;
if (((param_2 <= local_30) || (pcVar3 = (char *)(ulong)(uint)(int)*local_30, *local_30 < 0x30)
) || (pcVar3 = (char *)(ulong)(uint)(int)*local_30, 0x39 < *local_30)) {
local_9 = false;
goto LAB_0010ccab;
}
do {
pcVar3 = local_30 + 1;
local_3c = local_3c * DAT_0013b01c + (float)(*local_30 + -0x30);
bVar1 = false;
if ((pcVar3 < param_2) && (bVar1 = false, '/' < *pcVar3)) {
bVar1 = *pcVar3 < ':';
}
local_30 = pcVar3;
} while (bVar1);
}
*param_1 = local_30;
*param_3 = (float)local_40 * (local_34 + local_38);
if ((local_3c != 0.0) || (NAN(local_3c))) {
fVar4 = powf(DAT_0013b01c,(float)local_44 * local_3c);
*param_3 = fVar4 * *param_3;
}
uVar2 = 0;
local_4f = false;
if (DAT_0013b810 <= *param_3) {
local_4f = *param_3 <= DAT_0013b814;
uVar2 = (int7)((ulong)param_3 >> 8);
}
pcVar3 = (char *)CONCAT71(uVar2,local_4f);
local_9 = local_4f;
}
else {
local_9 = false;
}
LAB_0010ccab:
return CONCAT71((int7)((ulong)pcVar3 >> 8),local_9);
}
|
|
61,241
|
_gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>> base64::decode<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>, base64::alphabet, base64::decoding_behavior)
|
monkey531[P]llama/common/./base64.hpp
|
static Output_iterator decode(Input_iterator in_begin, Input_iterator in_end, Output_iterator out,
alphabet alphabet = alphabet::auto_,
decoding_behavior behavior = decoding_behavior::moderate)
{
//constexpr auto pad = '=';
std::uint8_t last = 0;
auto bits = 0;
while (in_begin != in_end) {
auto c = *in_begin;
++in_begin;
if (c == '=') {
break;
}
auto part = _base64_value(alphabet, c);
// enough bits for one byte
if (bits + 6 >= 8) {
*out = (last << (8 - bits)) | (part >> (bits - 2));
++out;
bits -= 2;
} else {
bits += 6;
}
last = part;
}
// check padding
if (behavior != decoding_behavior::loose) {
while (in_begin != in_end) {
auto c = *in_begin;
++in_begin;
if (c != '=') {
throw base64_error("invalid base64 character.");
}
}
}
return out;
}
|
O2
|
cpp
|
_gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>> base64::decode<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>, base64::alphabet, base64::decoding_behavior):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, (%rsp)
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsp), %r12
movl %ecx, (%r12)
xorl %r13d, %r13d
xorl %eax, %eax
movl %eax, %ebp
cmpq %r14, %r15
je 0x2b9cd
movb (%r15), %al
cmpb $0x3d, %al
je 0x2b9ca
movsbl %al, %esi
movq %r12, %rdi
callq 0x2bb98
cmpl $0x2, %r13d
jge 0x2b9a6
incq %r15
addl $0x6, %r13d
jmp 0x2b97e
movzbl %bpl, %edx
movb $0x8, %cl
subb %r13b, %cl
shll %cl, %edx
movzbl %al, %esi
addl $-0x2, %r13d
movl %r13d, %ecx
shrl %cl, %esi
orl %edx, %esi
movb %sil, (%rbx)
incq %rbx
incq %r15
jmp 0x2b97e
incq %r15
cmpl $0x1, (%rsp)
jne 0x2b9e5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %r14, %r15
je 0x2b9d3
cmpb $0x3d, (%r15)
leaq 0x1(%r15), %r15
je 0x2b9e5
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %rbx
leaq 0x99b23(%rip), %rsi # 0xc5529
movq %rax, %rdi
callq 0x2bc74
leaq 0xf330b(%rip), %rsi # 0x11ed20
movq 0xf554c(%rip), %rdx # 0x120f68
movq %rbx, %rdi
callq 0x275b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x268f0
movq %r14, %rdi
callq 0x27660
nop
|
_ZN6base646decodeIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS2_IPhSt6vectorIhSaIhEEEEEET0_T_SH_SG_NS_8alphabetENS_17decoding_behaviorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], r8d
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea r12, [rsp+38h+var_34]
mov [r12], ecx
xor r13d, r13d
xor eax, eax
loc_2B97E:
mov ebp, eax
cmp r15, r14
jz short loc_2B9CD
mov al, [r15]
cmp al, 3Dh ; '='
jz short loc_2B9CA
movsx esi, al
mov rdi, r12
call _ZN6base6413_base64_valueERNS_8alphabetEc; base64::_base64_value(base64::alphabet &,char)
cmp r13d, 2
jge short loc_2B9A6
inc r15
add r13d, 6
jmp short loc_2B97E
loc_2B9A6:
movzx edx, bpl
mov cl, 8
sub cl, r13b
shl edx, cl
movzx esi, al
add r13d, 0FFFFFFFEh
mov ecx, r13d
shr esi, cl
or esi, edx
mov [rbx], sil
inc rbx
inc r15
jmp short loc_2B97E
loc_2B9CA:
inc r15
loc_2B9CD:
cmp [rsp+38h+var_38], 1
jnz short loc_2B9E5
loc_2B9D3:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2B9E5:
cmp r15, r14
jz short loc_2B9D3
cmp byte ptr [r15], 3Dh ; '='
lea r15, [r15+1]
jz short loc_2B9E5
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aInvalidBase64C; "invalid base64 character."
mov rdi, rax
call _ZN12base64_errorCI2St13runtime_errorEPKc
lea rsi, _ZTI12base64_error; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
|
_BYTE * base64::decode<__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<unsigned char *,std::vector<unsigned char>>>(
_BYTE *a1,
_BYTE *a2,
_BYTE *a3,
int a4,
int a5)
{
int v7; // r13d
unsigned __int8 v8; // al
unsigned __int8 v9; // bp
int v10; // edx
void *exception; // rbx
_DWORD v15[13]; // [rsp+4h] [rbp-34h] BYREF
v15[0] = a4;
v7 = 0;
v8 = 0;
while ( 1 )
{
v9 = v8;
if ( a1 == a2 )
break;
if ( *a1 == 61 )
{
++a1;
break;
}
v8 = base64::_base64_value(v15, (unsigned int)(char)*a1);
if ( v7 >= 2 )
{
v10 = v9 << (8 - v7);
v7 -= 2;
*a3++ = v10 | (v8 >> v7);
++a1;
}
else
{
++a1;
v7 += 6;
}
}
if ( a5 != 1 )
{
while ( a1 != a2 )
{
if ( *a1++ != 61 )
{
exception = __cxa_allocate_exception(0x10uLL);
ZN12base64_errorCI2St13runtime_errorEPKc(exception, "invalid base64 character.");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'base64_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
}
return a3;
}
|
decode<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,__gnu_cxx::__normal_iterator<unsigned_char*,std::vector<unsigned_char,std::allocator<unsigned_char>>>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV dword ptr [RSP],R8D
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSP + 0x4]
MOV dword ptr [R12],ECX
XOR R13D,R13D
XOR EAX,EAX
LAB_0012b97e:
MOV EBP,EAX
CMP R15,R14
JZ 0x0012b9cd
MOV AL,byte ptr [R15]
CMP AL,0x3d
JZ 0x0012b9ca
MOVSX ESI,AL
MOV RDI,R12
CALL 0x0012bb98
CMP R13D,0x2
JGE 0x0012b9a6
INC R15
ADD R13D,0x6
JMP 0x0012b97e
LAB_0012b9a6:
MOVZX EDX,BPL
MOV CL,0x8
SUB CL,R13B
SHL EDX,CL
MOVZX ESI,AL
ADD R13D,-0x2
MOV ECX,R13D
SHR ESI,CL
OR ESI,EDX
MOV byte ptr [RBX],SIL
INC RBX
INC R15
JMP 0x0012b97e
LAB_0012b9ca:
INC R15
LAB_0012b9cd:
CMP dword ptr [RSP],0x1
JNZ 0x0012b9e5
LAB_0012b9d3:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012b9e5:
CMP R15,R14
JZ 0x0012b9d3
CMP byte ptr [R15],0x3d
LEA R15,[R15 + 0x1]
JZ 0x0012b9e5
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_0012b9ff:
LEA RSI,[0x1c5529]
MOV RDI,RAX
CALL 0x0012bc74
LAB_0012ba0e:
LEA RSI,[0x21ed20]
MOV RDX,qword ptr [0x00220f68]
MOV RDI,RBX
CALL 0x001275b0
|
/* __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned
char> > > base64::decode<__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned
char> > > >(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, __gnu_cxx::__normal_iterator<unsigned
char*, std::vector<unsigned char, std::allocator<unsigned char> > >, base64::alphabet,
base64::decoding_behavior) */
byte * base64::
decode<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,__gnu_cxx::__normal_iterator<unsigned_char*,std::vector<unsigned_char,std::allocator<unsigned_char>>>>
(char *param_1,char *param_2,byte *param_3,int8 param_4,int param_5)
{
uint uVar1;
uint uVar2;
base64_error *this;
char cVar3;
int iVar4;
alphabet local_34 [4];
iVar4 = 0;
uVar1 = 0;
do {
if (param_1 == param_2) {
LAB_0012b9cd:
if (param_5 != 1) {
while (param_1 != param_2) {
cVar3 = *param_1;
param_1 = param_1 + 1;
if (cVar3 != '=') {
this = (base64_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0012b9ff to 0012ba0d has its CatchHandler @ 0012ba24 */
base64_error::runtime_error(this,"invalid base64 character.");
/* WARNING: Subroutine does not return */
__cxa_throw(this,&base64_error::typeinfo,PTR__runtime_error_00220f68);
}
}
}
return param_3;
}
if (*param_1 == '=') {
param_1 = param_1 + 1;
goto LAB_0012b9cd;
}
uVar2 = _base64_value(local_34,*param_1);
if (iVar4 < 2) {
param_1 = param_1 + 1;
iVar4 = iVar4 + 6;
uVar1 = uVar2;
}
else {
cVar3 = (char)iVar4;
iVar4 = iVar4 + -2;
*param_3 = (byte)((uVar2 & 0xff) >> ((byte)iVar4 & 0x1f)) |
(byte)((uVar1 & 0xff) << (8U - cVar3 & 0x1f));
param_3 = param_3 + 1;
param_1 = param_1 + 1;
uVar1 = uVar2;
}
} while( true );
}
|
|
61,242
|
my_utf16le_uni
|
eloqsql/strings/ctype-ucs2.c
|
static int
my_utf16le_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
my_wc_t lo;
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if ((*pwc= uint2korr(s)) < MY_UTF16_SURROGATE_HIGH_FIRST ||
(*pwc > MY_UTF16_SURROGATE_LOW_LAST))
return 2; /* [0000-D7FF,E000-FFFF] */
if (*pwc >= MY_UTF16_SURROGATE_LOW_FIRST)
return MY_CS_ILSEQ; /* [DC00-DFFF] Low surrogate part without high part */
if (s + 4 > e)
return MY_CS_TOOSMALL4;
s+= 2;
if ((lo= uint2korr(s)) < MY_UTF16_SURROGATE_LOW_FIRST ||
lo > MY_UTF16_SURROGATE_LOW_LAST)
return MY_CS_ILSEQ; /* Expected low surrogate part, got something else */
*pwc= 0x10000 + (((*pwc & 0x3FF) << 10) | (lo & 0x3FF));
return 4;
}
|
O3
|
c
|
my_utf16le_uni:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xc68e9
movzwl (%rdx), %edi
movq %rdi, (%rsi)
leal 0x2000(%rdi), %eax
movzwl %ax, %r9d
movl $0x2, %eax
cmpl $0xf800, %r9d # imm = 0xF800
jb 0xc68e9
xorl %eax, %eax
cmpl $0xdbff, %edi # imm = 0xDBFF
ja 0xc68e9
addq $0x4, %rdx
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rdx
ja 0xc68e9
movzwl (%r8), %ecx
leal 0x2000(%rcx), %eax
movzwl %ax, %edx
movl $0x0, %eax
cmpl $0xfc00, %edx # imm = 0xFC00
jb 0xc68e9
shll $0xa, %edi
andl $0xffc00, %edi # imm = 0xFFC00
andl $0x3ff, %ecx # imm = 0x3FF
leaq (%rdi,%rcx), %rax
addq $0x10000, %rax # imm = 0x10000
movq %rax, (%rsi)
movl $0x4, %eax
popq %rbp
retq
|
my_utf16le_uni:
push rbp
mov rbp, rsp
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_C68E9
movzx edi, word ptr [rdx]
mov [rsi], rdi
lea eax, [rdi+2000h]
movzx r9d, ax
mov eax, 2
cmp r9d, 0F800h
jb short loc_C68E9
xor eax, eax
cmp edi, 0DBFFh
ja short loc_C68E9
add rdx, 4
mov eax, 0FFFFFF98h
cmp rdx, rcx
ja short loc_C68E9
movzx ecx, word ptr [r8]
lea eax, [rcx+2000h]
movzx edx, ax
mov eax, 0
cmp edx, 0FC00h
jb short loc_C68E9
shl edi, 0Ah
and edi, 0FFC00h
and ecx, 3FFh
lea rax, [rdi+rcx]
add rax, 10000h
mov [rsi], rax
mov eax, 4
loc_C68E9:
pop rbp
retn
|
long long my_utf16le_uni(long long a1, _QWORD *a2, unsigned __int16 *a3, unsigned long long a4)
{
_WORD *v4; // r8
long long result; // rax
long long v6; // rdi
v4 = a3 + 1;
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
v6 = *a3;
*a2 = v6;
result = 2LL;
if ( (unsigned __int16)(v6 + 0x2000) >= 0xF800u )
{
result = 0LL;
if ( (unsigned int)v6 <= 0xDBFF )
{
result = 4294967192LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int16)(*v4 + 0x2000) >= 0xFC00u )
{
*a2 = (((_DWORD)v6 << 10) & 0xFFC00) + (unsigned long long)(*v4 & 0x3FF) + 0x10000;
return 4LL;
}
}
}
}
}
return result;
}
|
my_utf16le_uni:
PUSH RBP
MOV RBP,RSP
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001c68e9
MOVZX EDI,word ptr [RDX]
MOV qword ptr [RSI],RDI
LEA EAX,[RDI + 0x2000]
MOVZX R9D,AX
MOV EAX,0x2
CMP R9D,0xf800
JC 0x001c68e9
XOR EAX,EAX
CMP EDI,0xdbff
JA 0x001c68e9
ADD RDX,0x4
MOV EAX,0xffffff98
CMP RDX,RCX
JA 0x001c68e9
MOVZX ECX,word ptr [R8]
LEA EAX,[RCX + 0x2000]
MOVZX EDX,AX
MOV EAX,0x0
CMP EDX,0xfc00
JC 0x001c68e9
SHL EDI,0xa
AND EDI,0xffc00
AND ECX,0x3ff
LEA RAX,[RDI + RCX*0x1]
ADD RAX,0x10000
MOV qword ptr [RSI],RAX
MOV EAX,0x4
LAB_001c68e9:
POP RBP
RET
|
int8 my_utf16le_uni(int8 param_1,ulong *param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
ushort uVar2;
int8 uVar3;
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
uVar1 = *param_3;
*param_2 = (ulong)uVar1;
uVar3 = 2;
if (((0xf7ff < (ushort)(uVar1 + 0x2000)) && (uVar3 = 0, uVar1 < 0xdc00)) &&
(uVar3 = 0xffffff98, param_3 + 2 <= param_4)) {
uVar2 = param_3[1];
uVar3 = 0;
if (0xfbff < (ushort)(uVar2 + 0x2000)) {
*param_2 = (ulong)((uVar1 & 0x3ff) << 10) + (ulong)(uVar2 & 0x3ff) + 0x10000;
uVar3 = 4;
}
}
}
return uVar3;
}
|
|
61,243
|
string_buffer_widen
|
bluesky950520[P]quickjs/quickjs.c
|
static no_inline int string_buffer_widen(StringBuffer *s, int size)
{
JSString *str;
size_t slack;
int i;
if (s->error_status)
return -1;
str = js_realloc2(s->ctx, s->str, sizeof(JSString) + (size << 1), &slack);
if (!str)
return string_buffer_set_error(s);
size += slack >> 1;
for(i = s->len; i-- > 0;) {
str->u.str16[i] = str->u.str8[i];
}
s->is_wide_char = 1;
s->size = size;
s->str = str;
return 0;
}
|
O2
|
c
|
string_buffer_widen:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $-0x1
popq %rbp
cmpl $0x0, 0x1c(%rdi)
jne 0x39ffd
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
leal (%r14,%r14), %eax
movslq %eax, %rdx
addq $0x18, %rdx
leaq 0x8(%rsp), %rcx
callq 0x172b1
testq %rax, %rax
je 0x39ff5
movq 0x8(%rsp), %rcx
shrq %rcx
movl 0x10(%rbx), %edx
testl %edx, %edx
jle 0x39fe0
movzbl 0x17(%rax,%rdx), %esi
movw %si, 0x16(%rax,%rdx,2)
decq %rdx
jmp 0x39fcd
addl %r14d, %ecx
movl $0x1, 0x18(%rbx)
movl %ecx, 0x14(%rbx)
movq %rax, 0x8(%rbx)
xorl %ebp, %ebp
jmp 0x39ffd
movq %rbx, %rdi
callq 0x39f6d
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
string_buffer_widen:
push rbp
push r14
push rbx
sub rsp, 10h
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp dword ptr [rdi+1Ch], 0
jnz short loc_39FFD
mov r14d, esi
mov rbx, rdi
mov rdi, [rdi]
mov rsi, [rbx+8]
lea eax, [r14+r14]
movsxd rdx, eax
add rdx, 18h
lea rcx, [rsp+28h+var_20]
call js_realloc2
test rax, rax
jz short loc_39FF5
mov rcx, [rsp+28h+var_20]
shr rcx, 1
mov edx, [rbx+10h]
loc_39FCD:
test edx, edx
jle short loc_39FE0
movzx esi, byte ptr [rax+rdx+17h]
mov [rax+rdx*2+16h], si
dec rdx
jmp short loc_39FCD
loc_39FE0:
add ecx, r14d
mov dword ptr [rbx+18h], 1
mov [rbx+14h], ecx
mov [rbx+8], rax
xor ebp, ebp
jmp short loc_39FFD
loc_39FF5:
mov rdi, rbx
call string_buffer_set_error
loc_39FFD:
mov eax, ebp
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
|
long long string_buffer_widen(long long a1, int a2)
{
unsigned int v2; // ebp
long long v3; // rax
unsigned long long v4; // rcx
long long i; // rdx
unsigned long long v7[4]; // [rsp+8h] [rbp-20h] BYREF
v2 = -1;
if ( !*(_DWORD *)(a1 + 28) )
{
v3 = js_realloc2(*(_QWORD *)a1, *(_QWORD *)(a1 + 8), 2 * a2 + 24LL, v7);
if ( v3 )
{
v4 = v7[0] >> 1;
for ( i = *(unsigned int *)(a1 + 16); (int)i > 0; --i )
*(_WORD *)(v3 + 2 * i + 22) = *(unsigned __int8 *)(v3 + i + 23);
*(_DWORD *)(a1 + 24) = 1;
*(_DWORD *)(a1 + 20) = a2 + v4;
*(_QWORD *)(a1 + 8) = v3;
return 0;
}
else
{
string_buffer_set_error(a1);
}
}
return v2;
}
|
string_buffer_widen:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
PUSH -0x1
POP RBP
CMP dword ptr [RDI + 0x1c],0x0
JNZ 0x00139ffd
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RBX + 0x8]
LEA EAX,[R14 + R14*0x1]
MOVSXD RDX,EAX
ADD RDX,0x18
LEA RCX,[RSP + 0x8]
CALL 0x001172b1
TEST RAX,RAX
JZ 0x00139ff5
MOV RCX,qword ptr [RSP + 0x8]
SHR RCX,0x1
MOV EDX,dword ptr [RBX + 0x10]
LAB_00139fcd:
TEST EDX,EDX
JLE 0x00139fe0
MOVZX ESI,byte ptr [RAX + RDX*0x1 + 0x17]
MOV word ptr [RAX + RDX*0x2 + 0x16],SI
DEC RDX
JMP 0x00139fcd
LAB_00139fe0:
ADD ECX,R14D
MOV dword ptr [RBX + 0x18],0x1
MOV dword ptr [RBX + 0x14],ECX
MOV qword ptr [RBX + 0x8],RAX
XOR EBP,EBP
JMP 0x00139ffd
LAB_00139ff5:
MOV RDI,RBX
CALL 0x00139f6d
LAB_00139ffd:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
int4 string_buffer_widen(int8 *param_1,int param_2)
{
long lVar1;
ulong uVar2;
int4 uVar3;
ulong local_20;
uVar3 = 0xffffffff;
if (*(int *)((long)param_1 + 0x1c) == 0) {
lVar1 = js_realloc2(*param_1,param_1[1],(long)(param_2 * 2) + 0x18,&local_20);
if (lVar1 == 0) {
string_buffer_set_error(param_1);
}
else {
for (uVar2 = (ulong)*(uint *)(param_1 + 2); 0 < (int)uVar2; uVar2 = uVar2 - 1) {
*(ushort *)(lVar1 + 0x16 + uVar2 * 2) = (ushort)*(byte *)(lVar1 + 0x17 + uVar2);
}
*(int4 *)(param_1 + 3) = 1;
*(int *)((long)param_1 + 0x14) = (int)(local_20 >> 1) + param_2;
param_1[1] = lVar1;
uVar3 = 0;
}
}
return uVar3;
}
|
|
61,244
|
my_copy_fix_mb
|
eloqsql/strings/ctype-mb.c
|
size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
}
|
O3
|
c
|
my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x10(%rbp), %rbx
cmpq %rdx, %r8
movq %r8, -0x58(%rbp)
cmovbq %r8, %rdx
addq %rcx, %rdx
movq 0xb8(%rdi), %rax
movq %rdi, -0x40(%rbp)
movq %rcx, %rsi
movq %r9, -0x30(%rbp)
movq %r9, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq %rax, %r14
movq (%rbx), %rbx
subq %r15, %rbx
je 0x495b9
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x335b0
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x496a8
leaq (%rbx,%r13), %rax
movq %rbx, -0x50(%rbp)
addq %r15, %rbx
movq -0x30(%rbp), %rcx
cmpq %r14, %rcx
movq %rax, -0x48(%rbp)
je 0x4968e
addq %r12, %r13
movq %r13, -0x38(%rbp)
addq -0x58(%rbp), %r15
subq %rcx, %r14
movq %rax, %r13
movq %r15, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
testl %eax, %eax
jle 0x49634
movl %eax, %r15d
leaq (%r15,%r13), %r12
cmpq -0x38(%rbp), %r12
ja 0x49693
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x33240
movq %r12, %r13
jmp 0x4967c
setne %al
cmpq %r15, %rbx
setae %cl
testb %al, %cl
jne 0x49693
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x49650
movq %rbx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movl $0x3f, %esi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0x49693
movl %eax, %eax
addq %rax, %r13
movl $0x1, %r15d
movq %r13, %r12
addq %r15, %rbx
incq %r14
movq -0x30(%rbp), %r15
jne 0x495f9
jmp 0x49696
movq %rax, %r12
jmp 0x49696
movq %r13, %r12
movq 0x10(%rbp), %rax
movq %rbx, (%rax)
movq -0x50(%rbp), %rbx
subq -0x48(%rbp), %rbx
addq %r12, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_copy_fix_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, [rbp+arg_0]
cmp r8, rdx
mov [rbp+var_58], r8
cmovb rdx, r8
add rdx, rcx
mov rax, [rdi+0B8h]
mov [rbp+var_40], rdi
mov rsi, rcx
mov [rbp+var_30], r9
mov rcx, r9
mov r8, rbx
call qword ptr [rax+0C8h]
mov r14, rax
mov rbx, [rbx]
sub rbx, r15
jz short loc_495B9
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memmove
loc_495B9:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jz loc_496A8
lea rax, [rbx+r13]
mov [rbp+var_50], rbx
add rbx, r15
mov rcx, [rbp+var_30]
cmp rcx, r14
mov [rbp+var_48], rax
jz loc_4968E
add r13, r12
mov [rbp+var_38], r13
add r15, [rbp+var_58]
sub r14, rcx
mov r13, rax
mov [rbp+var_30], r15
loc_495F9:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r15
call qword ptr [rax+0C0h]
test eax, eax
jle short loc_49634
mov r15d, eax
lea r12, [r15+r13]
cmp r12, [rbp+var_38]
ja short loc_49693
mov rdi, r13
mov rsi, rbx
mov rdx, r15
call _memcpy
mov r13, r12
jmp short loc_4967C
loc_49634:
setnz al
cmp rbx, r15
setnb cl
test cl, al
jnz short loc_49693
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_49650
mov [rax+8], rbx
loc_49650:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov esi, 3Fh ; '?'
mov rdx, r13
mov rcx, [rbp+var_38]
call qword ptr [rax+30h]
test eax, eax
jle short loc_49693
mov eax, eax
add r13, rax
mov r15d, 1
mov r12, r13
loc_4967C:
add rbx, r15
inc r14
mov r15, [rbp+var_30]
jnz loc_495F9
jmp short loc_49696
loc_4968E:
mov r12, rax
jmp short loc_49696
loc_49693:
mov r12, r13
loc_49696:
mov rax, [rbp+arg_0]
mov [rax], rbx
mov rbx, [rbp+var_50]
sub rbx, [rbp+var_48]
add rbx, r12
loc_496A8:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
unsigned long long v8; // r12
long long v9; // r14
long long v10; // rbx
unsigned long long v11; // rax
unsigned long long v12; // rbx
unsigned long long v13; // r15
long long v14; // r14
long long v15; // r13
unsigned int v16; // eax
long long v17; // r15
unsigned long long v18; // r12
int v19; // eax
long long v22; // [rsp+10h] [rbp-50h]
unsigned long long v23; // [rsp+18h] [rbp-48h]
unsigned long long v24; // [rsp+28h] [rbp-38h]
unsigned long long v26; // [rsp+30h] [rbp-30h]
v8 = a3;
if ( a5 < a3 )
a3 = a5;
v9 = (*(long long ( **)(long long, long long, unsigned long long, long long, unsigned long long *))(*(_QWORD *)(a1 + 184)
+ 200LL))(
a1,
a4,
a4 + a3,
a6,
a7);
v10 = *a7 - a4;
if ( v10 )
memmove(a2, a4, v10);
if ( !a7[1] )
return v10;
v11 = v10 + a2;
v22 = v10;
v12 = a4 + v10;
v23 = v11;
if ( a6 == v9 )
{
v18 = v11;
goto LABEL_20;
}
v24 = v8 + a2;
v13 = a5 + a4;
v14 = v9 - a6;
v15 = v11;
v26 = v13;
while ( 1 )
{
v16 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v12,
v13);
if ( (int)v16 <= 0 )
break;
v17 = v16;
v18 = v16 + v15;
if ( v18 > v24 )
goto LABEL_19;
memcpy(v15, v12, v16);
v15 = v18;
LABEL_16:
v12 += v17;
++v14;
v13 = v26;
if ( !v14 )
goto LABEL_20;
}
if ( v16 == 0 || v12 < v13 )
{
if ( !a7[1] )
a7[1] = v12;
v19 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
v15,
v24);
if ( v19 > 0 )
{
v15 += (unsigned int)v19;
v17 = 1LL;
v18 = v15;
goto LABEL_16;
}
}
LABEL_19:
v18 = v15;
LABEL_20:
*a7 = v12;
return v18 + v22 - v23;
}
|
my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,qword ptr [RBP + 0x10]
CMP R8,RDX
MOV qword ptr [RBP + -0x58],R8
CMOVC RDX,R8
ADD RDX,RCX
MOV RAX,qword ptr [RDI + 0xb8]
MOV qword ptr [RBP + -0x40],RDI
MOV RSI,RCX
MOV qword ptr [RBP + -0x30],R9
MOV RCX,R9
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R14,RAX
MOV RBX,qword ptr [RBX]
SUB RBX,R15
JZ 0x001495b9
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x001335b0
LAB_001495b9:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001496a8
LEA RAX,[RBX + R13*0x1]
MOV qword ptr [RBP + -0x50],RBX
ADD RBX,R15
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,R14
MOV qword ptr [RBP + -0x48],RAX
JZ 0x0014968e
ADD R13,R12
MOV qword ptr [RBP + -0x38],R13
ADD R15,qword ptr [RBP + -0x58]
SUB R14,RCX
MOV R13,RAX
MOV qword ptr [RBP + -0x30],R15
LAB_001495f9:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
TEST EAX,EAX
JLE 0x00149634
MOV R15D,EAX
LEA R12,[R15 + R13*0x1]
CMP R12,qword ptr [RBP + -0x38]
JA 0x00149693
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
CALL 0x00133240
MOV R13,R12
JMP 0x0014967c
LAB_00149634:
SETNZ AL
CMP RBX,R15
SETNC CL
TEST CL,AL
JNZ 0x00149693
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00149650
MOV qword ptr [RAX + 0x8],RBX
LAB_00149650:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,0x3f
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x00149693
MOV EAX,EAX
ADD R13,RAX
MOV R15D,0x1
MOV R12,R13
LAB_0014967c:
ADD RBX,R15
INC R14
MOV R15,qword ptr [RBP + -0x30]
JNZ 0x001495f9
JMP 0x00149696
LAB_0014968e:
MOV R12,RAX
JMP 0x00149696
LAB_00149693:
MOV R12,R13
LAB_00149696:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RBX
MOV RBX,qword ptr [RBP + -0x50]
SUB RBX,qword ptr [RBP + -0x48]
ADD RBX,R12
LAB_001496a8:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
size_t my_copy_fix_mb(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
void *pvVar1;
uint uVar2;
long lVar3;
size_t __n;
void *__src;
void *__dest;
ulong uVar4;
uVar4 = param_3;
if (param_5 < param_3) {
uVar4 = param_5;
}
lVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 200))
(param_1,param_4,uVar4 + (long)param_4,param_6,param_7);
__n = *param_7 - (long)param_4;
if (__n != 0) {
memmove(param_2,param_4,__n);
}
if (param_7[1] != 0) {
pvVar1 = (void *)(__n + (long)param_2);
__src = (void *)(__n + (long)param_4);
__dest = pvVar1;
if (param_6 != lVar3) {
lVar3 = lVar3 - param_6;
do {
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,__src,(void *)((long)param_4 + param_5));
if ((int)uVar2 < 1) {
if ((void *)((long)param_4 + param_5) <= __src && uVar2 != 0) break;
if (param_7[1] == 0) {
param_7[1] = (long)__src;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,__dest,(void *)((long)param_2 + param_3));
if ((int)uVar2 < 1) break;
__dest = (void *)((long)__dest + (ulong)uVar2);
uVar4 = 1;
}
else {
uVar4 = (ulong)uVar2;
if ((void *)((long)param_2 + param_3) < (void *)(uVar4 + (long)__dest)) break;
memcpy(__dest,__src,uVar4);
__dest = (void *)(uVar4 + (long)__dest);
}
__src = (void *)((long)__src + uVar4);
lVar3 = lVar3 + 1;
} while (lVar3 != 0);
}
*param_7 = (long)__src;
__n = (__n - (long)pvVar1) + (long)__dest;
}
return __n;
}
|
|
61,245
|
unpack_filename
|
eloqsql/mysys/mf_pack.c
|
size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
}
|
O0
|
c
|
unpack_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0x2e510
movq %rax, -0x228(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x40590
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rdi
addq -0x228(%rbp), %rdi
callq 0x25160
movq %rax, %rcx
movq -0x240(%rbp), %rax
addq %rcx, %rax
cmpq $0x200, %rax # imm = 0x200
jae 0x40944
leaq -0x210(%rbp), %rdi
addq -0x230(%rbp), %rdi
movq -0x220(%rbp), %rsi
addq -0x228(%rbp), %rsi
callq 0x25320
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x40840
movq %rax, -0x228(%rbp)
jmp 0x4095e
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0x40840
movq %rax, -0x228(%rbp)
jmp 0x40960
movq -0x228(%rbp), %rax
movq %rax, -0x248(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x40990
movq -0x248(%rbp), %rax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
callq 0x25380
nopw %cs:(%rax,%rax)
nop
|
unpack_filename:
push rbp
mov rbp, rsp
sub rsp, 250h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
lea rdx, [rbp+var_238]
call dirname_part
mov [rbp+var_228], rax
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call unpack_dirname
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
mov rdi, [rbp+var_220]
add rdi, [rbp+var_228]
call _strlen
mov rcx, rax
mov rax, [rbp+var_240]
add rax, rcx
cmp rax, 200h
jnb short loc_40944
lea rdi, [rbp+var_210]
add rdi, [rbp+var_230]
mov rsi, [rbp+var_220]
add rsi, [rbp+var_228]
call _stpcpy
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call system_filename
mov [rbp+var_228], rax
jmp short loc_4095E
loc_40944:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
call system_filename
mov [rbp+var_228], rax
loc_4095E:
jmp short $+2
loc_40960:
mov rax, [rbp+var_228]
mov [rbp+var_248], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_40990
mov rax, [rbp+var_248]
add rsp, 250h
pop rbp
retn
loc_40990:
call ___stack_chk_fail
|
long long unpack_filename(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-240h]
long long v4; // [rsp+18h] [rbp-238h] BYREF
long long v5; // [rsp+20h] [rbp-230h]
long long v6; // [rsp+28h] [rbp-228h]
_BYTE *v7; // [rsp+30h] [rbp-220h]
long long v8; // [rsp+38h] [rbp-218h]
_BYTE v9[520]; // [rsp+40h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+248h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
v6 = dirname_part((long long)v9, a2, &v4);
v5 = unpack_dirname((long long)v9, v9);
v3 = v5;
if ( (unsigned long long)(strlen(&v7[v6]) + v3) >= 0x200 )
return system_filename(v8, (long long)v7);
stpcpy(&v9[v5], &v7[v6]);
return system_filename(v8, (long long)v9);
}
|
unpack_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
LEA RDX,[RBP + -0x238]
CALL 0x0012e510
MOV qword ptr [RBP + -0x228],RAX
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x00140590
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
MOV RDI,qword ptr [RBP + -0x220]
ADD RDI,qword ptr [RBP + -0x228]
CALL 0x00125160
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x240]
ADD RAX,RCX
CMP RAX,0x200
JNC 0x00140944
LEA RDI,[RBP + -0x210]
ADD RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x220]
ADD RSI,qword ptr [RBP + -0x228]
CALL 0x00125320
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x00140840
MOV qword ptr [RBP + -0x228],RAX
JMP 0x0014095e
LAB_00140944:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
CALL 0x00140840
MOV qword ptr [RBP + -0x228],RAX
LAB_0014095e:
JMP 0x00140960
LAB_00140960:
MOV RAX,qword ptr [RBP + -0x228]
MOV qword ptr [RBP + -0x248],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00140990
MOV RAX,qword ptr [RBP + -0x248]
ADD RSP,0x250
POP RBP
RET
LAB_00140990:
CALL 0x00125380
|
int8 unpack_filename(int8 param_1,long param_2)
{
long lVar1;
size_t sVar2;
long in_FS_OFFSET;
int1 local_240 [8];
long local_238;
long local_230;
long local_228;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
local_230 = dirname_part(local_218,param_2,local_240);
lVar1 = unpack_dirname(local_218,local_218);
local_238 = lVar1;
sVar2 = strlen((char *)(local_228 + local_230));
if (lVar1 + sVar2 < 0x200) {
stpcpy(local_218 + local_238,(char *)(local_228 + local_230));
local_230 = system_filename(local_220,local_218);
}
else {
local_230 = system_filename(local_220,local_228);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_230;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,246
|
unpack_filename
|
eloqsql/mysys/mf_pack.c
|
size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
}
|
O3
|
c
|
unpack_filename:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %r12
leaq -0x238(%rbp), %rdx
movq %r12, %rdi
callq 0x2a67d
movq %rax, %r15
movq %r12, %rdi
movq %r12, %rsi
callq 0x352ce
movq %rax, %r12
addq %r14, %r15
movq %r15, %rdi
callq 0x24170
addq %r12, %rax
cmpq $0x1ff, %rax # imm = 0x1FF
ja 0x354f0
leaq (%r12,%rbp), %rdi
addq $-0x230, %rdi # imm = 0xFDD0
movq %r15, %rsi
callq 0x24300
leaq -0x230(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
jmp 0x354fb
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %r14, %rsi
callq 0x631d4
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x35522
subq %rbx, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
nop
|
unpack_filename:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea r12, [rbp+var_230]
lea rdx, [rbp+var_238]
mov rdi, r12
call dirname_part
mov r15, rax
mov rdi, r12
mov rsi, r12
call unpack_dirname
mov r12, rax
add r15, r14
mov rdi, r15
call _strlen
add rax, r12
cmp rax, 1FFh
ja short loc_354F0
lea rdi, [r12+rbp]
add rdi, 0FFFFFFFFFFFFFDD0h
mov rsi, r15
call _strcpy
lea rsi, [rbp+var_230]
mov edx, 1FFh
mov rdi, rbx
jmp short loc_354FB
loc_354F0:
mov edx, 1FFh
mov rdi, rbx
mov rsi, r14
loc_354FB:
call strmake
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_35522
sub rax, rbx
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_35522:
call ___stack_chk_fail
|
long long unpack_filename(long long a1, _BYTE *a2)
{
long long v2; // r15
long long v3; // r12
_BYTE *v4; // r15
long long v6; // [rsp+8h] [rbp-238h] BYREF
_BYTE v7[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v8; // [rsp+218h] [rbp-28h]
v8 = __readfsqword(0x28u);
v2 = dirname_part((long long)v7, a2, &v6);
v3 = unpack_dirname((long long)v7, v7);
v4 = &a2[v2];
if ( (unsigned long long)(v3 + strlen(v4)) <= 0x1FF )
{
strcpy(&v7[v3], v4);
a2 = v7;
}
return strmake(a1, a2, 511LL) - a1;
}
|
unpack_filename:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA R12,[RBP + -0x230]
LEA RDX,[RBP + -0x238]
MOV RDI,R12
CALL 0x0012a67d
MOV R15,RAX
MOV RDI,R12
MOV RSI,R12
CALL 0x001352ce
MOV R12,RAX
ADD R15,R14
MOV RDI,R15
CALL 0x00124170
ADD RAX,R12
CMP RAX,0x1ff
JA 0x001354f0
LEA RDI,[R12 + RBP*0x1]
ADD RDI,-0x230
MOV RSI,R15
CALL 0x00124300
LEA RSI,[RBP + -0x230]
MOV EDX,0x1ff
MOV RDI,RBX
JMP 0x001354fb
LAB_001354f0:
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,R14
LAB_001354fb:
CALL 0x001631d4
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00135522
SUB RAX,RBX
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00135522:
CALL 0x001243e0
|
long unpack_filename(long param_1,char *param_2)
{
long lVar1;
long lVar2;
size_t sVar3;
long in_FS_OFFSET;
int1 local_240 [8];
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = dirname_part(local_238,param_2,local_240);
lVar2 = unpack_dirname(local_238,local_238);
sVar3 = strlen(param_2 + lVar1);
if (sVar3 + lVar2 < 0x200) {
strcpy(local_238 + lVar2,param_2 + lVar1);
param_2 = local_238;
}
lVar1 = strmake(param_1,param_2,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar1 - param_1;
}
|
|
61,247
|
my_interval_timer
|
eloqsql/mysys/my_getsystime.c
|
ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
}
|
O0
|
c
|
my_interval_timer:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
leaq -0x10(%rbp), %rsi
callq 0x24270
imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00
addq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_interval_timer:
push rbp
mov rbp, rsp
sub rsp, 10h
mov edi, 1
lea rsi, [rbp+var_10]
call _clock_gettime
imul rax, [rbp+var_10], 3B9ACA00h
add rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long my_interval_timer()
{
_QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
|
my_interval_timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDI,0x1
LEA RSI,[RBP + -0x10]
CALL 0x00124270
IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00
ADD RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18.tv_sec * 1000000000 + local_18.tv_nsec;
}
|
|
61,248
|
Cache::getTag(unsigned int)
|
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
|
uint32_t Cache::getTag(uint32_t addr) {
uint32_t offsetBits = log2i(policy.blockSize);
uint32_t idBits = log2i(policy.blockNum / policy.associativity);
uint32_t mask = (1 << (32 - offsetBits - idBits)) - 1;
return (addr >> (offsetBits + idBits)) & mask;
}
|
O1
|
cpp
|
Cache::getTag(unsigned int):
movl 0x3c(%rdi), %eax
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x3905
xorl %ecx, %ecx
cmpl $0x1, %eax
je 0x3905
cmpl $0x2, %eax
jb 0x3905
xorl %ecx, %ecx
movl %eax, %edx
shrl %edx
incl %ecx
cmpl $0x3, %eax
movl %edx, %eax
ja 0x38fa
movl 0x40(%rdi), %eax
xorl %edx, %edx
divl 0x44(%rdi)
testl %eax, %eax
je 0x392f
xorl %r8d, %r8d
cmpl $0x1, %eax
je 0x392f
cmpl $0x2, %eax
jb 0x392f
xorl %r8d, %r8d
movl %eax, %edx
shrl %edx
incl %r8d
cmpl $0x3, %eax
movl %edx, %eax
ja 0x3923
addl %ecx, %r8d
movl %r8d, %ecx
negb %cl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
shll %cl, %eax
movl %r8d, %ecx
shrl %cl, %esi
notl %eax
andl %eax, %esi
movl %esi, %eax
retq
|
_ZN5Cache6getTagEj:
mov eax, [rdi+3Ch]
mov r8d, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
test eax, eax
jz short loc_3905
xor ecx, ecx
cmp eax, 1
jz short loc_3905
cmp eax, 2
jb short loc_3905
xor ecx, ecx
mov edx, eax
loc_38FA:
shr edx, 1
inc ecx
cmp eax, 3
mov eax, edx
ja short loc_38FA
loc_3905:
mov eax, [rdi+40h]
xor edx, edx
div dword ptr [rdi+44h]
test eax, eax
jz short loc_392F
xor r8d, r8d
cmp eax, 1
jz short loc_392F
cmp eax, 2
jb short loc_392F
xor r8d, r8d
mov edx, eax
loc_3923:
shr edx, 1
inc r8d
cmp eax, 3
mov eax, edx
ja short loc_3923
loc_392F:
add r8d, ecx
mov ecx, r8d
neg cl
mov eax, 0FFFFFFFFh
shl eax, cl
mov ecx, r8d
shr esi, cl
not eax
and esi, eax
mov eax, esi
retn
|
long long Cache::getTag(Cache *this, unsigned int a2)
{
unsigned int v2; // eax
char v3; // r8
char v4; // cl
unsigned int v5; // edx
bool v6; // cc
unsigned int v7; // eax
unsigned int v8; // edx
v2 = *((_DWORD *)this + 15);
v3 = -1;
v4 = -1;
if ( v2 )
{
v4 = 0;
if ( v2 != 1 )
{
v4 = 0;
v5 = *((_DWORD *)this + 15);
do
{
v5 >>= 1;
++v4;
v6 = v2 <= 3;
v2 = v5;
}
while ( !v6 );
}
}
v7 = *((_DWORD *)this + 16) / *((_DWORD *)this + 17);
if ( v7 )
{
v3 = 0;
if ( v7 != 1 )
{
v3 = 0;
v8 = *((_DWORD *)this + 16) / *((_DWORD *)this + 17);
do
{
v8 >>= 1;
++v3;
v6 = v7 <= 3;
v7 = v8;
}
while ( !v6 );
}
}
return ~(-1 << -(char)(v4 + v3)) & (a2 >> (v4 + v3));
}
|
getTag:
MOV EAX,dword ptr [RDI + 0x3c]
MOV R8D,0xffffffff
MOV ECX,0xffffffff
TEST EAX,EAX
JZ 0x00103905
XOR ECX,ECX
CMP EAX,0x1
JZ 0x00103905
CMP EAX,0x2
JC 0x00103905
XOR ECX,ECX
MOV EDX,EAX
LAB_001038fa:
SHR EDX,0x1
INC ECX
CMP EAX,0x3
MOV EAX,EDX
JA 0x001038fa
LAB_00103905:
MOV EAX,dword ptr [RDI + 0x40]
XOR EDX,EDX
DIV dword ptr [RDI + 0x44]
TEST EAX,EAX
JZ 0x0010392f
XOR R8D,R8D
CMP EAX,0x1
JZ 0x0010392f
CMP EAX,0x2
JC 0x0010392f
XOR R8D,R8D
MOV EDX,EAX
LAB_00103923:
SHR EDX,0x1
INC R8D
CMP EAX,0x3
MOV EAX,EDX
JA 0x00103923
LAB_0010392f:
ADD R8D,ECX
MOV ECX,R8D
NEG CL
MOV EAX,0xffffffff
SHL EAX,CL
MOV ECX,R8D
SHR ESI,CL
NOT EAX
AND ESI,EAX
MOV EAX,ESI
RET
|
/* Cache::getTag(unsigned int) */
uint __thiscall Cache::getTag(Cache *this,uint param_1)
{
bool bVar1;
uint uVar2;
char cVar3;
ulong uVar4;
char cVar5;
uVar2 = *(uint *)(this + 0x3c);
cVar3 = -1;
if (uVar2 != 0) {
cVar3 = '\0';
if ((uVar2 != 1) && (cVar3 = '\0', 1 < uVar2)) {
cVar3 = '\0';
do {
cVar3 = cVar3 + '\x01';
bVar1 = 3 < uVar2;
uVar2 = uVar2 >> 1;
} while (bVar1);
}
}
uVar2 = (uint)((ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44));
cVar5 = -1;
if (uVar2 != 0) {
cVar5 = '\0';
if ((uVar2 != 1) && (cVar5 = '\0', 1 < uVar2)) {
cVar5 = '\0';
uVar4 = (ulong)*(uint *)(this + 0x40) / (ulong)*(uint *)(this + 0x44);
do {
cVar5 = cVar5 + '\x01';
uVar2 = (uint)uVar4;
uVar4 = uVar4 >> 1;
} while (3 < uVar2);
}
}
return param_1 >> (cVar5 + cVar3 & 0x1fU) & ~(-1 << (-(cVar5 + cVar3) & 0x1fU));
}
|
|
61,249
|
testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::Matcher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-matchers.cc
|
Matcher<std::string>::Matcher(const std::string& s) { *this = Eq(s); }
|
O0
|
cpp
|
testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::Matcher(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1249c0
movq 0x8(%rsp), %rax
leaq 0xd6a56(%rip), %rcx # 0x1cf418
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x78(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1fe60
jmp 0xf89da
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x124910
jmp 0xf89eb
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x124a10
jmp 0xf89fc
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x124a50
jmp 0xf8a0d
leaq 0x60(%rsp), %rdi
callq 0x124a80
leaq 0x40(%rsp), %rdi
callq 0x1249b0
leaq 0x20(%rsp), %rdi
callq 0x1c160
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xf8a8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xf8a85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xf8a7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x124a80
leaq 0x40(%rsp), %rdi
callq 0x1249b0
leaq 0x20(%rsp), %rdi
callq 0x1c160
movq 0x8(%rsp), %rdi
callq 0x13b020
movq 0x18(%rsp), %rdi
callq 0x15dd0
nopw %cs:(%rax,%rax)
|
_ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERKS6_:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov rdi, [rsp+88h+var_8]
mov [rsp+88h+var_80], rdi
call _ZN7testing8internal11MatcherBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; testing::internal::MatcherBase<std::string>::MatcherBase(void)
mov rax, [rsp+88h+var_80]
lea rcx, _ZTVN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE; `vtable for'testing::Matcher<std::string>
add rcx, 10h
mov [rax], rcx
mov rsi, [rsp+88h+var_10]
lea rdi, [rsp+88h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_F89DA:
lea rdi, [rsp+88h+var_48]
lea rsi, [rsp+88h+var_68]
call _ZN7testing2EqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_8internal9EqMatcherIT_EES9_; testing::Eq<std::string>(std::string)
jmp short $+2
loc_F89EB:
lea rdi, [rsp+88h+var_28]
lea rsi, [rsp+88h+var_48]
call _ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2INS_8internal9EqMatcherIS6_EEvEEOT_; testing::Matcher<std::string>::Matcher<testing::internal::EqMatcher<std::string>,void>(testing::internal::EqMatcher<std::string> &&)
jmp short $+2
loc_F89FC:
mov rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_28]
call _ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSEOS7_; testing::Matcher<std::string>::operator=(testing::Matcher<std::string>&&)
jmp short $+2
loc_F8A0D:
lea rdi, [rsp+88h+var_28]
call _ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::Matcher<std::string>::~Matcher()
lea rdi, [rsp+88h+var_48]
call _ZN7testing8internal9EqMatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::EqMatcher<std::string>::~EqMatcher()
lea rdi, [rsp+88h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_F8A8F
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_F8A85
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_F8A7B
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_58]
call _ZN7testing7MatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::Matcher<std::string>::~Matcher()
loc_F8A7B:
lea rdi, [rsp+arg_38]
call _ZN7testing8internal9EqMatcherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::EqMatcher<std::string>::~EqMatcher()
loc_F8A85:
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F8A8F:
mov rdi, [rsp+arg_0]
call _ZN7testing8internal11MatcherBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string>::~MatcherBase()
mov rdi, [rsp+arg_10]
call __Unwind_Resume
|
void testing::Matcher<std::string>::Matcher(_QWORD *a1, long long a2)
{
_QWORD v2[4]; // [rsp+20h] [rbp-68h] BYREF
_BYTE v3[32]; // [rsp+40h] [rbp-48h] BYREF
_BYTE v4[24]; // [rsp+60h] [rbp-28h] BYREF
long long v5; // [rsp+78h] [rbp-10h]
_QWORD *v6; // [rsp+80h] [rbp-8h]
v6 = a1;
v5 = a2;
testing::internal::MatcherBase<std::string>::MatcherBase();
*a1 = &`vtable for'testing::Matcher<std::string> + 2;
std::string::basic_string(v2, v5);
testing::Eq<std::string>(v3, v2);
testing::Matcher<std::string>::Matcher<testing::internal::EqMatcher<std::string>,void>(v4, v3);
testing::Matcher<std::string>::operator=(a1, v4);
testing::Matcher<std::string>::~Matcher(v4);
testing::internal::EqMatcher<std::string>::~EqMatcher(v3);
std::string::~string(v2);
}
|
Matcher:
SUB RSP,0x88
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RDI,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x002249c0
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x2cf418]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV RSI,qword ptr [RSP + 0x78]
LAB_001f89ce:
LEA RDI,[RSP + 0x20]
CALL 0x0011fe60
JMP 0x001f89da
LAB_001f89da:
LEA RDI,[RSP + 0x40]
LEA RSI,[RSP + 0x20]
CALL 0x00224910
JMP 0x001f89eb
LAB_001f89eb:
LEA RDI,[RSP + 0x60]
LEA RSI,[RSP + 0x40]
CALL 0x00224a10
JMP 0x001f89fc
LAB_001f89fc:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x60]
CALL 0x00224a50
LAB_001f8a0b:
JMP 0x001f8a0d
LAB_001f8a0d:
LEA RDI,[RSP + 0x60]
CALL 0x00224a80
LEA RDI,[RSP + 0x40]
CALL 0x002249b0
LEA RDI,[RSP + 0x20]
CALL 0x0011c160
ADD RSP,0x88
RET
|
/* testing::Matcher<std::__cxx11::string >::Matcher(std::__cxx11::string const&) */
void __thiscall
testing::Matcher<std::__cxx11::string>::Matcher(Matcher<std::__cxx11::string> *this,string *param_1)
{
string local_68 [32];
testing local_48 [32];
Matcher<std::__cxx11::string> local_28 [24];
string *local_10;
Matcher<std::__cxx11::string> *local_8;
local_10 = param_1;
local_8 = this;
internal::MatcherBase<std::__cxx11::string>::MatcherBase
((MatcherBase<std::__cxx11::string> *)this);
*(int ***)this = &PTR__Matcher_002cf428;
/* try { // try from 001f89ce to 001f89d7 has its CatchHandler @ 001f8a33 */
std::__cxx11::string::string(local_68,local_10);
/* try { // try from 001f89da to 001f89e8 has its CatchHandler @ 001f8a43 */
Eq<std::__cxx11::string>(local_48,local_68);
/* try { // try from 001f89eb to 001f89f9 has its CatchHandler @ 001f8a53 */
Matcher<testing::internal::EqMatcher<std::__cxx11::string>,void>(local_28,local_48);
/* try { // try from 001f89fc to 001f8a0a has its CatchHandler @ 001f8a63 */
operator=(this,local_28);
~Matcher(local_28);
internal::EqMatcher<std::__cxx11::string>::~EqMatcher((EqMatcher<std::__cxx11::string> *)local_48)
;
std::__cxx11::string::~string(local_68);
return;
}
|
|
61,250
|
minja::Parser::parseMathPow()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
}
|
O1
|
cpp
|
minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x87e9a
cmpq $0x0, (%rbx)
je 0x87dec
leaq 0x30(%rsp), %rbp
leaq 0x20(%rsp), %r13
leaq 0xa6d04(%rip), %rax # 0x12e968
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq %rbp, 0x20(%rsp)
movq %r13, %rdi
leaq 0x6c039(%rip), %rsi # 0xf3cb5
leaq 0x6c034(%rip), %rdx # 0xf3cb7
callq 0x21d38
movq %rsp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x840b2
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x87cbb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87cd2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8b0
testq %r15, %r15
je 0x87da6
movq %r13, %rdi
movq %r14, %rsi
callq 0x87e9a
cmpq $0x0, 0x20(%rsp)
je 0x87db8
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x87d1c
movq 0xa8272(%rip), %rcx # 0x12ff80
cmpb $0x0, (%rcx)
je 0x87d18
incl 0x8(%rax)
jmp 0x87d1c
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x58, %edi
callq 0x1b890
movq %rax, %r15
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r15)
movq 0x40(%rsp), %rax
movq %rax, (%r15)
movq %r15, %r12
addq $0x10, %r12
movq %r12, %rdi
movq %rsp, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0x4, %r8d
callq 0x95e02
movq %r12, (%rbx)
movq 0x8(%rbx), %rdi
movq %r15, 0x8(%rbx)
testq %rdi, %rdi
je 0x87d7f
callq 0x6cd56
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x87d8e
callq 0x6cd56
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x87c6d
callq 0x6cd56
jmp 0x87c6d
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b440
movq %rax, %r15
leaq 0x6beec(%rip), %rsi # 0xf3cb8
movq %rax, %rdi
callq 0x1b320
movq 0xa820d(%rip), %rsi # 0x12ffe8
movq 0xa816e(%rip), %rdx # 0x12ff50
movq %r15, %rdi
callq 0x1bef0
jmp 0x87e1e
movl $0x10, %edi
callq 0x1b440
movq %rax, %r15
leaq 0x6be89(%rip), %rsi # 0xf3c89
movq %rax, %rdi
callq 0x1b320
movq 0xa81d9(%rip), %rsi # 0x12ffe8
movq 0xa813a(%rip), %rdx # 0x12ff50
movq %r15, %rdi
callq 0x1bef0
jmp 0x87e64
movq %rax, %r14
movq %r15, %rdi
callq 0x1b650
jmp 0x87e83
movq %rax, %r14
jmp 0x87e53
movq %rax, %r14
movq %r15, %rdi
callq 0x1b650
jmp 0x87e53
jmp 0x87e64
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x87e53
callq 0x6cd56
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x87e83
callq 0x6cd56
jmp 0x87e83
movq %rax, %r14
jmp 0x87e83
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87e83
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x87e91
callq 0x6cd56
movq %r14, %rdi
callq 0x1bf70
nop
|
_ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_87DEC
lea rbp, [rsp+78h+var_48]
lea r13, [rsp+78h+var_58]
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [rsp+78h+var_38], rax
loc_87C6D:
mov [rsp+78h+var_58], rbp
mov rdi, r13
lea rsi, asc_F3CB5; "**"
lea rdx, asc_F3CB5+2; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rsp
mov rsi, r14
mov rdx, r13
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+78h+var_78]; void *
mov r15, [rsp+78h+var_70]
lea rax, [rsp+78h+var_68]
cmp rdi, rax
jz short loc_87CBB
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87CBB:
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_87CD2
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87CD2:
test r15, r15
jz loc_87DA6
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+78h+var_58], 0
jz loc_87DB8
mov rax, [r14]
mov [rsp+78h+var_78], rax
mov rax, [r14+8]
mov [rsp+78h+var_70], rax
test rax, rax
jz short loc_87D1C
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_87D18
inc dword ptr [rax+8]
jmp short loc_87D1C
loc_87D18:
lock inc dword ptr [rax+8]
loc_87D1C:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_68], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, 100000001h
mov [r15+8], rax
mov rax, [rsp+78h+var_38]
mov [r15], rax
mov r12, r15
add r12, 10h
mov rdi, r12
mov rsi, rsp
mov rdx, rbx
mov rcx, r13
mov r8d, 4
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r12
mov rdi, [rbx+8]
mov [rbx+8], r15
test rdi, rdi
jz short loc_87D7F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87D7F:
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_87D8E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87D8E:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz loc_87C6D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_87C6D
loc_87DA6:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_87DB8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_87E1E
loc_87DEC:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_87E1E:
jmp short loc_87E64
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_87E83
mov r14, rax
jmp short loc_87E53
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_87E53
jmp short loc_87E64
mov r14, rax
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_87E53
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87E53:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_87E83
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_87E83
loc_87E64:
mov r14, rax
jmp short loc_87E83
mov r14, rax
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_87E83
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87E83:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_87E91
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87E91:
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2)
{
volatile signed __int32 *v3; // r15
volatile signed __int32 *v4; // rax
long long **v5; // r15
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-78h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-70h]
long long v12; // [rsp+10h] [rbp-68h] BYREF
void *v13; // [rsp+20h] [rbp-58h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-50h]
_QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF
long long *v16; // [rsp+40h] [rbp-38h]
minja::Parser::parseMathPlusMinus((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
while ( 1 )
{
v13 = v15;
std::string::_M_construct<char const*>(&v13, "**", (long long)"");
minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u);
v3 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
if ( !v3 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v13);
if ( !v13 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = *(void **)a2;
v4 = *(volatile signed __int32 **)(a2 + 8);
v11 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v5 = (long long **)operator new(0x58uLL);
v5[1] = (long long *)0x100000001LL;
*v5 = v16;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL);
*this = (volatile signed __int32 *)(v5 + 2);
v6 = this[1];
this[1] = (volatile signed __int32 *)v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
}
return (minja::Parser *)this;
}
|
parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
CALL 0x00187e9a
CMP qword ptr [RBX],0x0
JZ 0x00187dec
LEA RBP,[RSP + 0x30]
LEA R13,[RSP + 0x20]
LEA RAX,[0x22e968]
ADD RAX,0x10
MOV qword ptr [RSP + 0x40],RAX
LAB_00187c6d:
MOV qword ptr [RSP + 0x20],RBP
LAB_00187c72:
MOV RDI,R13
LEA RSI,[0x1f3cb5]
LEA RDX,[0x1f3cb7]
CALL 0x00121d38
LAB_00187c88:
MOV RDI,RSP
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x1
CALL 0x001840b2
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00187cbb
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b8b0
LAB_00187cbb:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,RBP
JZ 0x00187cd2
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8b0
LAB_00187cd2:
TEST R15,R15
JZ 0x00187da6
LAB_00187cdb:
MOV RDI,R13
MOV RSI,R14
CALL 0x00187e9a
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00187db8
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00187d1c
MOV RCX,qword ptr [0x0022ff80]
CMP byte ptr [RCX],0x0
JZ 0x00187d18
INC dword ptr [RAX + 0x8]
JMP 0x00187d1c
LAB_00187d18:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00187d1c:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_00187d29:
MOV EDI,0x58
CALL 0x0011b890
LAB_00187d33:
MOV R15,RAX
MOV RAX,0x100000001
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [R15],RAX
MOV R12,R15
ADD R12,0x10
MOV RDI,R12
MOV RSI,RSP
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0x4
CALL 0x00195e02
MOV qword ptr [RBX],R12
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],R15
TEST RDI,RDI
JZ 0x00187d7f
CALL 0x0016cd56
LAB_00187d7f:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00187d8e
CALL 0x0016cd56
LAB_00187d8e:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00187c6d
CALL 0x0016cd56
JMP 0x00187c6d
LAB_00187da6:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00187db8:
MOV EDI,0x10
CALL 0x0011b440
MOV R15,RAX
LAB_00187dc5:
LEA RSI,[0x1f3cb8]
MOV RDI,RAX
CALL 0x0011b320
LAB_00187dd4:
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,R15
CALL 0x0011bef0
LAB_00187dec:
MOV EDI,0x10
CALL 0x0011b440
MOV R15,RAX
LAB_00187df9:
LEA RSI,[0x1f3c89]
MOV RDI,RAX
CALL 0x0011b320
LAB_00187e08:
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,R15
CALL 0x0011bef0
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long local_68 [2];
long *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48 [2];
int **local_38;
parseMathPlusMinus();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00187df9 to 00187e07 has its CatchHandler @ 00187e20 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression");
/* try { // try from 00187e08 to 00187e1d has its CatchHandler @ 00187e1e */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
local_38 = &PTR___Sp_counted_ptr_inplace_0022e978;
while( true ) {
local_58 = local_48;
/* try { // try from 00187c72 to 00187c87 has its CatchHandler @ 00187e64 */
std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001f3cb5,&DAT_001f3cb7);
/* try { // try from 00187c88 to 00187c9a has its CatchHandler @ 00187e69 */
consumeToken(&local_78);
p_Var1 = local_70;
if (local_78 != local_68) {
operator_delete(local_78,local_68[0] + 1);
}
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 00187cdb to 00187ce5 has its CatchHandler @ 00187e3f */
parseMathPlusMinus();
if (local_58 == (long *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00187dc5 to 00187dd3 has its CatchHandler @ 00187e32 */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression");
/* try { // try from 00187dd4 to 00187de9 has its CatchHandler @ 00187e2d */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
local_78 = (long *)*in_RSI;
local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022ff80 == '\0') {
LOCK();
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
}
}
local_68[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 00187d29 to 00187d32 has its CatchHandler @ 00187e41 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = local_38;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78);
*in_RDI = (long)(puVar2 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar2;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
}
return;
}
|
|
61,251
|
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;
}
|
O0
|
c
|
my_hash_first:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0xe30fa
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe3133
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xe313f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq *%rax
movq -0x48(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xe31c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_first:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
jmp short $+2
loc_E30FA:
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+68h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
cmp [rbp+var_18], 0
jz short loc_E3133
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_E313F
loc_E3133:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_50], rax
loc_E313F:
mov rax, [rbp+var_40]
mov rsi, [rbp+var_30]
mov rdi, [rbp+var_38]
mov rdx, [rbp+var_50]
call rax
mov rdi, [rbp+var_48]
mov esi, eax
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
call my_hash_first_from_hash_value
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 50h
pop rbp
retn
|
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4)
{
unsigned int v4; // eax
long long ( *v6)(long long, long long, long long); // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
v6 = (long long ( *)(long long, long long, long long))a1[11];
v7 = a1[13];
if ( a3 )
v4 = v6(v7, a2, a3);
else
v4 = v6(v7, a2, a1[1]);
return my_hash_first_from_hash_value(a1, v4, a2, a3, a4);
}
|
my_hash_first:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x001e30fa
LAB_001e30fa:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001e3133
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001e313f
LAB_001e3133:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x50],RAX
LAB_001e313f:
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x50]
CALL RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
CALL 0x001e31c0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x50
POP RBP
RET
|
int8 my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4)
{
int4 uVar1;
int8 uVar2;
int8 local_58;
local_58 = param_3;
if (param_3 == 0) {
local_58 = *(long *)(param_1 + 8);
}
uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,local_58);
uVar2 = my_hash_first_from_hash_value(param_1,uVar1,param_2,param_3,param_4);
return uVar2;
}
|
|
61,252
|
google::protobuf::internal::ExtensionSet::IsInitialized() const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
|
bool ExtensionSet::IsInitialized() const {
// Extensions are never required. However, we need to check that all
// embedded messages are initialized.
if (PROTOBUF_PREDICT_FALSE(is_large())) {
for (const auto& kv : *map_.large) {
if (!kv.second.IsInitialized()) return false;
}
return true;
}
for (const KeyValue* it = flat_begin(); it != flat_end(); ++it) {
if (!it->second.IsInitialized()) return false;
}
return true;
}
|
O3
|
cpp
|
google::protobuf::internal::ExtensionSet::IsInitialized() const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpw $0x0, 0xa(%rdi)
js 0x978c9
je 0x978fb
movq 0x10(%r14), %r15
leaq 0x8(%r15), %rdi
callq 0x97906
movl %eax, %ebx
testb %al, %al
je 0x978fd
addq $0x20, %r15
movzwl 0xa(%r14), %eax
shll $0x5, %eax
addq 0x10(%r14), %rax
cmpq %rax, %r15
jne 0x978a3
jmp 0x978fd
movq 0x10(%r14), %r15
movq 0x18(%r15), %r14
addq $0x8, %r15
cmpq %r15, %r14
je 0x978fb
leaq 0x28(%r14), %rdi
callq 0x97906
movl %eax, %ebx
testb %al, %al
je 0x978fd
movq %r14, %rdi
callq 0xf270
movq %rax, %r14
cmpq %r15, %rax
jne 0x978da
jmp 0x978fd
movb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZNK6google8protobuf8internal12ExtensionSet13IsInitializedEv:
push r15
push r14
push rbx
mov r14, rdi
cmp word ptr [rdi+0Ah], 0
js short loc_978C9
jz short loc_978FB
mov r15, [r14+10h]
loc_978A3:
lea rdi, [r15+8]; this
call _ZNK6google8protobuf8internal12ExtensionSet9Extension13IsInitializedEv; google::protobuf::internal::ExtensionSet::Extension::IsInitialized(void)
mov ebx, eax
test al, al
jz short loc_978FD
add r15, 20h ; ' '
movzx eax, word ptr [r14+0Ah]
shl eax, 5
add rax, [r14+10h]
cmp r15, rax
jnz short loc_978A3
jmp short loc_978FD
loc_978C9:
mov r15, [r14+10h]
mov r14, [r15+18h]
add r15, 8
cmp r14, r15
jz short loc_978FB
loc_978DA:
lea rdi, [r14+28h]; this
call _ZNK6google8protobuf8internal12ExtensionSet9Extension13IsInitializedEv; google::protobuf::internal::ExtensionSet::Extension::IsInitialized(void)
mov ebx, eax
test al, al
jz short loc_978FD
mov rdi, r14
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov r14, rax
cmp rax, r15
jnz short loc_978DA
jmp short loc_978FD
loc_978FB:
mov bl, 1
loc_978FD:
mov eax, ebx
pop rbx
pop r14
pop r15
retn
|
long long google::protobuf::internal::ExtensionSet::IsInitialized(
google::protobuf::internal::ExtensionSet *this)
{
unsigned int IsInitialized; // ebx
long long v2; // r15
long long v3; // r15
long long v4; // r14
long long v5; // r15
if ( *((__int16 *)this + 5) >= 0 )
{
if ( *((_WORD *)this + 5) )
{
v2 = *((_QWORD *)this + 2);
do
{
IsInitialized = google::protobuf::internal::ExtensionSet::Extension::IsInitialized((google::protobuf::internal::ExtensionSet::Extension *)(v2 + 8));
if ( !(_BYTE)IsInitialized )
break;
v2 += 32LL;
}
while ( v2 != *((_QWORD *)this + 2) + 32 * (unsigned int)*((unsigned __int16 *)this + 5) );
return IsInitialized;
}
LABEL_11:
LOBYTE(IsInitialized) = 1;
return IsInitialized;
}
v3 = *((_QWORD *)this + 2);
v4 = *(_QWORD *)(v3 + 24);
v5 = v3 + 8;
if ( v4 == v5 )
goto LABEL_11;
do
{
IsInitialized = google::protobuf::internal::ExtensionSet::Extension::IsInitialized((google::protobuf::internal::ExtensionSet::Extension *)(v4 + 40));
if ( !(_BYTE)IsInitialized )
break;
v4 = std::_Rb_tree_increment(v4);
}
while ( v4 != v5 );
return IsInitialized;
}
|
IsInitialized:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
CMP word ptr [RDI + 0xa],0x0
JS 0x001978c9
JZ 0x001978fb
MOV R15,qword ptr [R14 + 0x10]
LAB_001978a3:
LEA RDI,[R15 + 0x8]
CALL 0x00197906
MOV EBX,EAX
TEST AL,AL
JZ 0x001978fd
ADD R15,0x20
MOVZX EAX,word ptr [R14 + 0xa]
SHL EAX,0x5
ADD RAX,qword ptr [R14 + 0x10]
CMP R15,RAX
JNZ 0x001978a3
JMP 0x001978fd
LAB_001978c9:
MOV R15,qword ptr [R14 + 0x10]
MOV R14,qword ptr [R15 + 0x18]
ADD R15,0x8
CMP R14,R15
JZ 0x001978fb
LAB_001978da:
LEA RDI,[R14 + 0x28]
CALL 0x00197906
MOV EBX,EAX
TEST AL,AL
JZ 0x001978fd
MOV RDI,R14
CALL 0x0010f270
MOV R14,RAX
CMP RAX,R15
JNZ 0x001978da
JMP 0x001978fd
LAB_001978fb:
MOV BL,0x1
LAB_001978fd:
MOV EAX,EBX
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::internal::ExtensionSet::IsInitialized() const */
ulong __thiscall google::protobuf::internal::ExtensionSet::IsInitialized(ExtensionSet *this)
{
uint uVar1;
_Rb_tree_node_base *p_Var2;
int8 unaff_RBX;
ulong uVar3;
long lVar4;
_Rb_tree_node_base *p_Var5;
if (*(short *)(this + 10) < 0) {
p_Var2 = *(_Rb_tree_node_base **)(*(long *)(this + 0x10) + 0x18);
p_Var5 = (_Rb_tree_node_base *)(*(long *)(this + 0x10) + 8);
if (p_Var2 != p_Var5) {
do {
uVar1 = Extension::IsInitialized((Extension *)(p_Var2 + 0x28));
uVar3 = (ulong)uVar1;
if ((char)uVar1 == '\0') break;
p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2);
} while (p_Var2 != p_Var5);
goto LAB_001978fd;
}
}
else if (*(short *)(this + 10) != 0) {
lVar4 = *(long *)(this + 0x10);
do {
uVar1 = Extension::IsInitialized((Extension *)(lVar4 + 8));
uVar3 = (ulong)uVar1;
if ((char)uVar1 == '\0') break;
lVar4 = lVar4 + 0x20;
} while (lVar4 != (ulong)*(ushort *)(this + 10) * 0x20 + *(long *)(this + 0x10));
goto LAB_001978fd;
}
uVar3 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
LAB_001978fd:
return uVar3 & 0xffffffff;
}
|
|
61,253
|
minja::Parser::unexpected(minja::TemplateToken const&) const
|
monkey531[P]llama/common/minja.hpp
|
std::runtime_error unexpected(const TemplateToken & token) const {
return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
}
|
O1
|
cpp
|
minja::Parser::unexpected(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x9fd88
leaq 0x5974f(%rip), %rcx # 0xf8f61
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ba10
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9f84c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x9f854
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x7d1d0
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x9f89f
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9f8be
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x9f8b9
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9f8cf
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x1b270
jmp 0x9f8dd
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ba10
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9f901
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9f907
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be70
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f94c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f967
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b910
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9f97e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f999
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f9ce
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x9f9ce
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f9ee
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x9f9ee
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9fa0a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x9fa0a
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9fa25
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rdi
callq 0x1bff0
nop
|
_ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnexpected_0; "Unexpected "
mov r8d, 0Bh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_9F84C
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_9F854
loc_9F84C:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_9F854:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r12
jz short loc_9F89F
mov rsi, [rsp+0A8h+var_70]
loc_9F89F:
cmp rax, rsi
jbe short loc_9F8BE
lea rdi, [rsp+0A8h+var_50]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_9F8B9
mov rsi, [rsp+0A8h+var_50]
loc_9F8B9:
cmp rax, rsi
jbe short loc_9F8CF
loc_9F8BE:
mov rsi, qword ptr [rsp+0A8h+var_60]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_9F8DD
loc_9F8CF:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_9F8DD:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_9F901
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_9F907
loc_9F901:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_9F907:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9F94C
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9F94C:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9F967
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9F967:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_9F97E
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9F97E:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9F999
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9F999:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9F9CE
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9F9CE
mov rbx, rax
loc_9F9CE:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9F9EE
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9F9EE
mov rbx, rax
loc_9F9EE:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_9FA0A
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9FA0A
mov rbx, rax
loc_9FA0A:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9FA25
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9FA25:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::unexpected(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
long long v4; // rax
__int128 *v5; // rcx
unsigned long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rsi
void **v9; // rax
__int128 *v10; // rcx
void *v12[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v13; // [rsp+18h] [rbp-90h] BYREF
void *v14; // [rsp+28h] [rbp-80h] BYREF
int v15[2]; // [rsp+30h] [rbp-78h]
__int128 v16; // [rsp+38h] [rbp-70h] BYREF
int v17[2]; // [rsp+48h] [rbp-60h] BYREF
long long v18; // [rsp+50h] [rbp-58h]
_QWORD v19[2]; // [rsp+58h] [rbp-50h] BYREF
void *v20[2]; // [rsp+68h] [rbp-40h] BYREF
long long v21; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v20, *(unsigned int *)(a3 + 8));
v4 = std::string::replace(v20, 0LL, 0LL, "Unexpected ", 11LL);
v14 = &v16;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v16 = *v5;
}
else
{
v14 = *(void **)v4;
*(_QWORD *)&v16 = *(_QWORD *)v5;
}
*(_QWORD *)v15 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
minja::error_location_suffix((long long)v17, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
v6 = v18 + *(_QWORD *)v15;
v7 = 15LL;
if ( v14 != &v16 )
v7 = v16;
if ( v6 <= v7 )
goto LABEL_10;
v8 = 15LL;
if ( *(_QWORD **)v17 != v19 )
v8 = v19[0];
if ( v6 <= v8 )
v9 = (void **)std::string::replace(v17, 0LL, 0LL, v14, *(_QWORD *)v15);
else
LABEL_10:
v9 = (void **)std::string::_M_append(&v14, *(_QWORD *)v17, v18);
v12[0] = &v13;
v10 = (__int128 *)(v9 + 2);
if ( *v9 == v9 + 2 )
{
v13 = *v10;
}
else
{
v12[0] = *v9;
*(_QWORD *)&v13 = *(_QWORD *)v10;
}
v12[1] = v9[1];
*v9 = v10;
v9[1] = 0LL;
*(_BYTE *)v10 = 0;
std::runtime_error::runtime_error(this, v12);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
if ( *(_QWORD **)v17 != v19 )
operator delete(*(void **)v17, v19[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
return this;
}
|
unexpected:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x0019fd88
LAB_0019f80b:
LEA RCX,[0x1f8f61]
MOV R8D,0xb
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011ba10
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0019f84c
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0019f854
LAB_0019f84c:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0019f854:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0019f873:
LEA RDI,[RSP + 0x48]
CALL 0x0017d1d0
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R12
JZ 0x0019f89f
MOV RSI,qword ptr [RSP + 0x38]
LAB_0019f89f:
CMP RAX,RSI
JBE 0x0019f8be
LEA RDI,[RSP + 0x58]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0019f8b9
MOV RSI,qword ptr [RSP + 0x58]
LAB_0019f8b9:
CMP RAX,RSI
JBE 0x0019f8cf
LAB_0019f8be:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0019f8c3:
LEA RDI,[RSP + 0x28]
CALL 0x0011b270
JMP 0x0019f8dd
LAB_0019f8cf:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011ba10
LAB_0019f8dd:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0019f901
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0019f907
LAB_0019f901:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0019f907:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0019f924:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011be70
LAB_0019f931:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019f94c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_0019f94c:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019f967
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b910
LAB_0019f967:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0019f97e
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b910
LAB_0019f97e:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019f999
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b910
LAB_0019f999:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unexpected(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unexpected(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 0019f80b to 0019f823 has its CatchHandler @ 0019fa07 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1f8f61);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0019f873 to 0019f87c has its CatchHandler @ 0019f9eb */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_0019f8dd;
}
}
/* try { // try from 0019f8c3 to 0019f8dc has its CatchHandler @ 0019f9cb */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_0019f8dd:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 0019f924 to 0019f930 has its CatchHandler @ 0019f9ab */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
|
|
61,254
|
js_array_flatten
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_flatten(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int map)
{
JSValue obj, arr;
JSValue mapperFunction, thisArg;
int64_t sourceLen;
int depthNum;
arr = JS_UNDEFINED;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &sourceLen, obj))
goto exception;
depthNum = 1;
mapperFunction = JS_UNDEFINED;
thisArg = JS_UNDEFINED;
if (map) {
mapperFunction = argv[0];
if (argc > 1) {
thisArg = argv[1];
}
if (check_function(ctx, mapperFunction))
goto exception;
} else {
if (argc > 0 && !JS_IsUndefined(argv[0])) {
if (JS_ToInt32Sat(ctx, &depthNum, argv[0]) < 0)
goto exception;
}
}
arr = JS_ArraySpeciesCreate(ctx, obj, js_int32(0));
if (JS_IsException(arr))
goto exception;
if (JS_FlattenIntoArray(ctx, arr, obj, sourceLen, 0, depthNum,
mapperFunction, thisArg) < 0)
goto exception;
JS_FreeValue(ctx, obj);
return arr;
exception:
JS_FreeValue(ctx, obj);
JS_FreeValue(ctx, arr);
return JS_EXCEPTION;
}
|
O3
|
c
|
js_array_flatten:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r13d
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r14
callq 0x2b520
movq %rax, %r15
movq %rdx, %rcx
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %rcx, (%rsp)
callq 0x27327
testl %eax, %eax
je 0x7e52a
movl $0x3, %r13d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%rsp), %rbp
movq 0x18(%r14), %rdi
cmpl $-0x9, %ebp
jb 0x7e4eb
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x7e4eb
movq %r15, %rsi
movq %rbp, %rdx
callq 0x259d8
movq 0x18(%r14), %rdi
movl $0x6, %ebp
cmpl $-0x9, %r13d
jb 0x7e513
shlq $0x20, %r12
movl %ebx, %esi
orq %r12, %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x7e513
movq %r13, %rdx
callq 0x259d8
xorl %ebx, %ebx
movq %rbx, %rax
movq %rbp, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0x1c(%rsp)
testl %r13d, %r13d
je 0x7e55c
movq (%r12), %rax
movq 0x8(%r12), %rbx
movl $0x3, %r13d
cmpl $0x2, %ebp
jl 0x7e597
movq 0x10(%r12), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%r12), %rcx
jmp 0x7e5a5
testl %ebp, %ebp
jle 0x7e5e4
movq 0x8(%r12), %rcx
cmpl $0x3, %ecx
movq (%rsp), %rbp
jne 0x7e606
movl $0x3, %eax
movq %rax, 0x20(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
movq $0x0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x7e65c
movq $0x0, 0x10(%rsp)
movl $0x3, %ecx
movq %rcx, 0x8(%rsp)
movq (%rsp), %rbp
movq %r14, %rdi
movq %rax, %r12
movq %rax, %rsi
movq %rbx, %rdx
callq 0x46f6f
testl %eax, %eax
je 0x7e5cd
xorl %ebx, %ebx
xorl %r12d, %r12d
jmp 0x7e4c5
movq %rbx, 0x20(%rsp)
movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000
andq %r12, %rsi
movq %r12, %rcx
jmp 0x7e65c
movl $0x3, %eax
movq %rax, 0x20(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
movq $0x0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq (%rsp), %rbp
jmp 0x7e65c
movq (%r12), %rdx
cmpl $-0x9, %ecx
jb 0x7e611
incl (%rdx)
leaq 0x1c(%rsp), %rsi
movq %r14, %rdi
callq 0x2bda9
movl $0x3, %ecx
movq %rcx, 0x20(%rsp)
xorl %esi, %esi
movl $0x0, %ecx
movl $0x0, %edx
movq %rdx, 0x10(%rsp)
movl $0x3, %edx
movq %rdx, 0x8(%rsp)
movl $0x3, %r13d
movl $0x0, %ebx
movl $0x0, %r12d
testl %eax, %eax
js 0x7e4c5
movq %rsi, 0x28(%rsp)
movq %rcx, %r13
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7e70c
movq %rax, %rbx
movq %rbp, %r8
movq %rdx, %rbp
movq %rax, %r12
shrq $0x20, %r12
cmpl $0x6, %ebp
jne 0x7e697
movq %rbp, %r13
movq %r8, %rbp
jmp 0x7e4c5
movq 0x30(%rsp), %r9
movl 0x1c(%rsp), %eax
movl %r13d, %r10d
orq 0x28(%rsp), %r10
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
pushq 0x8(%rsp)
pushq 0x18(%rsp)
pushq 0x30(%rsp)
pushq %r10
pushq %rax
pushq $0x0
callq 0x7edae
addq $0x30, %rsp
testq %rax, %rax
js 0x7e704
cmpl $-0x9, (%rsp)
jb 0x7e515
movq 0x18(%r14), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x7e515
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x259d8
jmp 0x7e515
movq %rbp, %r13
jmp 0x7e4c1
|
js_array_flatten:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13d, r9d
mov r12, r8
mov ebp, ecx
mov r14, rdi
call JS_ToObject
mov r15, rax
mov rcx, rdx
lea rsi, [rsp+68h+var_38]
mov rdi, r14
mov rdx, rax
mov [rsp+68h+var_68], rcx
call js_get_length64
test eax, eax
jz short loc_7E52A
mov r13d, 3
xor ebx, ebx
xor r12d, r12d
loc_7E4C1:
mov rbp, [rsp+68h+var_68]
loc_7E4C5:
mov rdi, [r14+18h]
cmp ebp, 0FFFFFFF7h
jb short loc_7E4EB
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_7E4EB
mov rsi, r15
mov rdx, rbp
call js_free_value_rt
mov rdi, [r14+18h]
loc_7E4EB:
mov ebp, 6
cmp r13d, 0FFFFFFF7h
jb short loc_7E513
shl r12, 20h
mov esi, ebx
or rsi, r12
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_7E513
mov rdx, r13
call js_free_value_rt
loc_7E513:
xor ebx, ebx
loc_7E515:
mov rax, rbx
mov rdx, rbp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7E52A:
mov [rsp+68h+var_4C], 1
test r13d, r13d
jz short loc_7E55C
mov rax, [r12]
mov rbx, [r12+8]
mov r13d, 3
cmp ebp, 2
jl short loc_7E597
mov rcx, [r12+10h]
mov [rsp+68h+var_58], rcx
mov rcx, [r12+18h]
jmp short loc_7E5A5
loc_7E55C:
test ebp, ebp
jle loc_7E5E4
mov rcx, [r12+8]
cmp ecx, 3
mov rbp, [rsp+68h+var_68]
jnz loc_7E606
mov eax, 3
mov [rsp+68h+var_48], rax
xor esi, esi
xor ecx, ecx
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_60], rax
jmp loc_7E65C
loc_7E597:
mov [rsp+68h+var_58], 0
mov ecx, 3
loc_7E5A5:
mov [rsp+68h+var_60], rcx
mov rbp, [rsp+68h+var_68]
mov rdi, r14
mov r12, rax
mov rsi, rax
mov rdx, rbx
call check_function
test eax, eax
jz short loc_7E5CD
xor ebx, ebx
xor r12d, r12d
jmp loc_7E4C5
loc_7E5CD:
mov [rsp+68h+var_48], rbx
mov rsi, 0FFFFFFFF00000000h
and rsi, r12
mov rcx, r12
jmp short loc_7E65C
loc_7E5E4:
mov eax, 3
mov [rsp+68h+var_48], rax
xor esi, esi
xor ecx, ecx
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_60], rax
mov rbp, [rsp+68h+var_68]
jmp short loc_7E65C
loc_7E606:
mov rdx, [r12]
cmp ecx, 0FFFFFFF7h
jb short loc_7E611
inc dword ptr [rdx]
loc_7E611:
lea rsi, [rsp+68h+var_4C]
mov rdi, r14
call JS_ToInt32SatFree
mov ecx, 3
mov [rsp+68h+var_48], rcx
xor esi, esi
mov ecx, 0
mov edx, 0
mov [rsp+68h+var_58], rdx
mov edx, 3
mov [rsp+68h+var_60], rdx
mov r13d, 3
mov ebx, 0
mov r12d, 0
test eax, eax
js loc_7E4C5
loc_7E65C:
mov [rsp+68h+var_40], rsi
mov r13, rcx
mov rdi, r14
mov rsi, r15
mov rdx, rbp
xor ecx, ecx
xor r8d, r8d
call JS_ArraySpeciesCreate
mov rbx, rax
mov r8, rbp
mov rbp, rdx
mov r12, rax
shr r12, 20h
cmp ebp, 6
jnz short loc_7E697
mov r13, rbp
mov rbp, r8
jmp loc_7E4C5
loc_7E697:
mov r9, [rsp+68h+var_38]
mov eax, [rsp+68h+var_4C]
mov r10d, r13d
or r10, [rsp+68h+var_40]
mov rdi, r14
mov rsi, rbx
mov rdx, rbp
mov rcx, r15
push [rsp+68h+var_60]
push [rsp+70h+var_58]
push [rsp+78h+var_48]
push r10
push rax
push 0
call JS_FlattenIntoArray
add rsp, 30h
test rax, rax
js short loc_7E704
cmp dword ptr [rsp+68h+var_68], 0FFFFFFF7h
jb loc_7E515
mov rdi, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg loc_7E515
mov rsi, r15
mov rdx, [rsp+68h+var_68]
call js_free_value_rt
jmp loc_7E515
loc_7E704:
mov r13, rbp
jmp loc_7E4C1
|
unsigned long long js_array_flatten(
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 v14; // r13d
int v16; // ebp
_QWORD *v18; // r15
long long v19; // rdx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // r13
unsigned long long v25; // rbx
unsigned long long v26; // r12
long long v27; // rbp
long long v28; // rdi
int v29; // eax
long long v30; // rcx
_QWORD *v31; // rsi
int v32; // eax
long long v33; // rcx
long long v35; // rax
long long v36; // rbx
long long v37; // rcx
long long v38; // rcx
unsigned long long v39; // rsi
unsigned int v40; // ecx
long long v41; // r12
_DWORD *v42; // rdx
int v43; // eax
unsigned int v44; // r13d
long long v45; // rdx
long long v46; // rbp
long long v47; // rdi
int v48; // eax
long long v49; // rcx
long long v50; // [rsp+0h] [rbp-68h]
long long v51; // [rsp+8h] [rbp-60h]
long long v52; // [rsp+10h] [rbp-58h]
int v53; // [rsp+1Ch] [rbp-4Ch] BYREF
long long v54; // [rsp+20h] [rbp-48h]
unsigned long long v55; // [rsp+28h] [rbp-40h]
_QWORD v56[7]; // [rsp+30h] [rbp-38h] BYREF
v14 = a6;
v16 = a4;
v18 = (_QWORD *)JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v50 = v19;
if ( (unsigned int)js_get_length64(a1, v56, (int)v18, v19) )
{
v24 = 3LL;
LODWORD(v25) = 0;
v26 = 0LL;
LABEL_3:
v27 = v50;
goto LABEL_4;
}
v53 = 1;
if ( v14 )
{
v35 = *a5;
v36 = a5[1];
v24 = 3LL;
if ( v16 < 2 )
{
v52 = 0LL;
v37 = 3LL;
}
else
{
v52 = a5[2];
v37 = a5[3];
}
v51 = v37;
v27 = v50;
v41 = *a5;
if ( (unsigned int)check_function(a1, v35, v36, v37, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14) )
{
LODWORD(v25) = 0;
v26 = 0LL;
goto LABEL_4;
}
v54 = v36;
v39 = v41 & 0xFFFFFFFF00000000LL;
v40 = v41;
}
else if ( v16 <= 0 )
{
v54 = 3LL;
v39 = 0LL;
v40 = 0;
v52 = 0LL;
v51 = 3LL;
v27 = v50;
}
else
{
v38 = a5[1];
v27 = v50;
if ( (_DWORD)v38 == 3 )
{
v54 = 3LL;
v39 = 0LL;
v40 = 0;
v52 = 0LL;
v51 = 3LL;
}
else
{
v42 = (_DWORD *)*a5;
if ( (unsigned int)v38 >= 0xFFFFFFF7 )
++*v42;
v43 = JS_ToInt32SatFree(a1, &v53, (long long)v42, v38);
v54 = 3LL;
v39 = 0LL;
v40 = 0;
v52 = 0LL;
v51 = 3LL;
v24 = 3LL;
LODWORD(v25) = 0;
v26 = 0LL;
if ( v43 < 0 )
goto LABEL_4;
}
}
v55 = v39;
v44 = v40;
v25 = JS_ArraySpeciesCreate(a1, v18, v27, 0LL, 0LL);
v20 = v27;
v46 = v45;
v26 = HIDWORD(v25);
if ( (_DWORD)v45 == 6 )
{
v24 = v45;
v27 = v20;
LABEL_4:
v28 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
{
v29 = *(_DWORD *)v18;
v30 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v30;
if ( v29 <= 1 )
{
js_free_value_rt(v28, v18, v27, v30, v20, v21);
v28 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
{
v31 = (_QWORD *)((v26 << 32) | (unsigned int)v25);
v32 = *(_DWORD *)v31;
v33 = (unsigned int)(*(_DWORD *)v31 - 1);
*(_DWORD *)v31 = v33;
if ( v32 <= 1 )
js_free_value_rt(v28, v31, v24, v33, v20, v21);
}
return 0LL;
}
if ( JS_FlattenIntoArray(a1, v25, v45, (_DWORD)v18, v20, v56[0], 0LL, v53, v55 | v44, v54, v52, v51) < 0 )
{
v24 = v46;
goto LABEL_3;
}
if ( (unsigned int)v50 >= 0xFFFFFFF7 )
{
v47 = *(_QWORD *)(a1 + 24);
v48 = *(_DWORD *)v18;
v49 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v49;
if ( v48 <= 1 )
js_free_value_rt(v47, v18, v50, v49, v20, v21);
}
return v25;
}
|
js_array_flatten:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13D,R9D
MOV R12,R8
MOV EBP,ECX
MOV R14,RDI
CALL 0x0012b520
MOV R15,RAX
MOV RCX,RDX
LEA RSI,[RSP + 0x30]
MOV RDI,R14
MOV RDX,RAX
MOV qword ptr [RSP],RCX
CALL 0x00127327
TEST EAX,EAX
JZ 0x0017e52a
MOV R13D,0x3
XOR EBX,EBX
XOR R12D,R12D
LAB_0017e4c1:
MOV RBP,qword ptr [RSP]
LAB_0017e4c5:
MOV RDI,qword ptr [R14 + 0x18]
CMP EBP,-0x9
JC 0x0017e4eb
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0017e4eb
MOV RSI,R15
MOV RDX,RBP
CALL 0x001259d8
MOV RDI,qword ptr [R14 + 0x18]
LAB_0017e4eb:
MOV EBP,0x6
CMP R13D,-0x9
JC 0x0017e513
SHL R12,0x20
MOV ESI,EBX
OR RSI,R12
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0017e513
MOV RDX,R13
CALL 0x001259d8
LAB_0017e513:
XOR EBX,EBX
LAB_0017e515:
MOV RAX,RBX
MOV RDX,RBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017e52a:
MOV dword ptr [RSP + 0x1c],0x1
TEST R13D,R13D
JZ 0x0017e55c
MOV RAX,qword ptr [R12]
MOV RBX,qword ptr [R12 + 0x8]
MOV R13D,0x3
CMP EBP,0x2
JL 0x0017e597
MOV RCX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RCX,qword ptr [R12 + 0x18]
JMP 0x0017e5a5
LAB_0017e55c:
TEST EBP,EBP
JLE 0x0017e5e4
MOV RCX,qword ptr [R12 + 0x8]
CMP ECX,0x3
MOV RBP,qword ptr [RSP]
JNZ 0x0017e606
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
XOR ESI,ESI
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0017e65c
LAB_0017e597:
MOV qword ptr [RSP + 0x10],0x0
MOV ECX,0x3
LAB_0017e5a5:
MOV qword ptr [RSP + 0x8],RCX
MOV RBP,qword ptr [RSP]
MOV RDI,R14
MOV R12,RAX
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00146f6f
TEST EAX,EAX
JZ 0x0017e5cd
XOR EBX,EBX
XOR R12D,R12D
JMP 0x0017e4c5
LAB_0017e5cd:
MOV qword ptr [RSP + 0x20],RBX
MOV RSI,-0x100000000
AND RSI,R12
MOV RCX,R12
JMP 0x0017e65c
LAB_0017e5e4:
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
XOR ESI,ESI
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV RBP,qword ptr [RSP]
JMP 0x0017e65c
LAB_0017e606:
MOV RDX,qword ptr [R12]
CMP ECX,-0x9
JC 0x0017e611
INC dword ptr [RDX]
LAB_0017e611:
LEA RSI,[RSP + 0x1c]
MOV RDI,R14
CALL 0x0012bda9
MOV ECX,0x3
MOV qword ptr [RSP + 0x20],RCX
XOR ESI,ESI
MOV ECX,0x0
MOV EDX,0x0
MOV qword ptr [RSP + 0x10],RDX
MOV EDX,0x3
MOV qword ptr [RSP + 0x8],RDX
MOV R13D,0x3
MOV EBX,0x0
MOV R12D,0x0
TEST EAX,EAX
JS 0x0017e4c5
LAB_0017e65c:
MOV qword ptr [RSP + 0x28],RSI
MOV R13,RCX
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBP
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0017e70c
MOV RBX,RAX
MOV R8,RBP
MOV RBP,RDX
MOV R12,RAX
SHR R12,0x20
CMP EBP,0x6
JNZ 0x0017e697
MOV R13,RBP
MOV RBP,R8
JMP 0x0017e4c5
LAB_0017e697:
MOV R9,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x1c]
MOV R10D,R13D
OR R10,qword ptr [RSP + 0x28]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,RBP
MOV RCX,R15
PUSH qword ptr [RSP + 0x8]
PUSH qword ptr [RSP + 0x18]
PUSH qword ptr [RSP + 0x30]
PUSH R10
PUSH RAX
PUSH 0x0
CALL 0x0017edae
ADD RSP,0x30
TEST RAX,RAX
JS 0x0017e704
CMP dword ptr [RSP],-0x9
JC 0x0017e515
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0017e515
MOV RSI,R15
MOV RDX,qword ptr [RSP]
CALL 0x001259d8
JMP 0x0017e515
LAB_0017e704:
MOV R13,RBP
JMP 0x0017e4c1
|
int1 [16]
js_array_flatten(long param_1,int8 param_2,int8 param_3,int param_4,ulong *param_5,
int param_6)
{
int iVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
int *piVar5;
ulong uVar6;
int8 uVar7;
ulong uVar8;
int1 auVar9 [16];
uint local_68;
ulong local_60;
ulong local_58;
ulong local_48;
int8 local_38;
auVar9 = JS_ToObject();
uVar4 = auVar9._8_8_;
piVar5 = auVar9._0_8_;
iVar1 = js_get_length64(param_1,&local_38,piVar5);
local_68 = auVar9._8_4_;
if (iVar1 == 0) {
if (param_6 == 0) {
if (param_4 < 1) {
local_48 = 3;
uVar6 = 0;
uVar3 = 0;
local_58 = 0;
local_60 = 3;
}
else if ((uint)param_5[1] == 3) {
local_48 = 3;
uVar6 = 0;
uVar3 = 0;
local_58 = 0;
local_60 = 3;
}
else {
if (0xfffffff6 < (uint)param_5[1]) {
*(int *)*param_5 = *(int *)*param_5 + 1;
}
iVar1 = JS_ToInt32SatFree(param_1);
local_48 = 3;
uVar6 = 0;
uVar3 = 0;
local_58 = 0;
local_60 = 3;
auVar9 = ZEXT816(3) << 0x40;
uVar8 = 0;
if (iVar1 < 0) goto LAB_0017e4c5;
}
}
else {
uVar3 = *param_5;
local_48 = param_5[1];
if (param_4 < 2) {
local_58 = 0;
local_60 = 3;
}
else {
local_58 = param_5[2];
local_60 = param_5[3];
}
iVar1 = check_function(param_1,uVar3,local_48);
if (iVar1 != 0) {
auVar9 = ZEXT816(3) << 0x40;
uVar8 = 0;
goto LAB_0017e4c5;
}
uVar6 = uVar3 & 0xffffffff00000000;
}
auVar9 = JS_ArraySpeciesCreate(param_1,piVar5,uVar4,0,0);
uVar8 = auVar9._0_8_ >> 0x20;
if ((auVar9._8_4_ != 6) &&
(lVar2 = JS_FlattenIntoArray(param_1,auVar9._0_8_,auVar9._8_8_,piVar5,uVar4,local_38,0,1,
uVar3 & 0xffffffff | uVar6,local_48,local_58,local_60),
-1 < lVar2)) {
if (local_68 < 0xfffffff7) {
return auVar9;
}
uVar7 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar5;
*piVar5 = iVar1 + -1;
if (1 < iVar1) {
return auVar9;
}
js_free_value_rt(uVar7,piVar5,uVar4);
return auVar9;
}
}
else {
auVar9 = ZEXT816(3) << 0x40;
uVar8 = 0;
}
LAB_0017e4c5:
uVar7 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < local_68) && (iVar1 = *piVar5, *piVar5 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7,piVar5,uVar4);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if (0xfffffff6 < auVar9._8_4_) {
piVar5 = (int *)(auVar9._0_8_ & 0xffffffff | uVar8 << 0x20);
iVar1 = *piVar5;
*piVar5 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar7,piVar5,auVar9._8_8_);
}
}
return ZEXT816(6) << 0x40;
}
|
|
61,255
|
my_hash_first_from_hash_value
|
eloqsql/mysys/hash.c
|
uchar* my_hash_first_from_hash_value(const HASH *hash,
my_hash_value_type hash_value,
const uchar *key,
size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
DBUG_ENTER("my_hash_first_from_hash_value");
if (hash->records)
{
uint flag= 1;
uint idx= my_hash_mask(hash_value,
hash->blength, hash->records);
do
{
pos= dynamic_element(&hash->array,idx,HASH_LINK*);
if (!hashcmp(hash,pos,key,length))
{
DBUG_PRINT("exit",("found key at %d",idx));
*current_record= idx;
DBUG_RETURN (pos->data);
}
if (flag)
{
flag=0; /* Reset flag */
if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx)
break; /* Wrong link */
}
}
while ((idx=pos->next) != NO_RECORD);
}
*current_record= NO_RECORD;
DBUG_RETURN(0);
}
|
O0
|
c
|
my_hash_first_from_hash_value:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3415c
movl $0x1, -0x3c(%rbp)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x34180
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x341d0
cmpl $0x0, %eax
jne 0x34117
jmp 0x340fe
jmp 0x34100
movl -0x40(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3416e
cmpl $0x0, -0x3c(%rbp)
je 0x34146
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x34270
cmpl -0x40(%rbp), %eax
je 0x34144
jmp 0x3415a
jmp 0x34146
jmp 0x34148
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
cmpl $-0x1, %eax
jne 0x340cc
jmp 0x3415c
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_hash_first_from_hash_value:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz loc_3415C
mov [rbp+var_3C], 1
mov edi, [rbp+var_14]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov [rbp+var_40], eax
loc_340CC:
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov ecx, [rbp+var_40]
shl rcx, 4
add rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call hashcmp
cmp eax, 0
jnz short loc_34117
jmp short $+2
loc_340FE:
jmp short $+2
loc_34100:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_3416E
loc_34117:
cmp [rbp+var_3C], 0
jz short loc_34146
mov [rbp+var_3C], 0
mov rdi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_rec_mask
cmp eax, [rbp+var_40]
jz short loc_34144
jmp short loc_3415A
loc_34144:
jmp short $+2
loc_34146:
jmp short $+2
loc_34148:
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_40], eax
cmp eax, 0FFFFFFFFh
jnz loc_340CC
loc_3415A:
jmp short $+2
loc_3415C:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
mov [rbp+var_8], 0
loc_3416E:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long my_hash_first_from_hash_value(_QWORD *a1, unsigned int a2, long long a3, long long a4, unsigned int *a5)
{
unsigned int v6; // [rsp+0h] [rbp-40h]
int v7; // [rsp+4h] [rbp-3Ch]
long long v8; // [rsp+8h] [rbp-38h]
if ( a1[3] )
{
v7 = 1;
v6 = my_hash_mask(a2, a1[2], a1[3]);
while ( 1 )
{
v8 = 16LL * v6 + a1[5];
if ( !(unsigned int)hashcmp(a1, v8, a3, a4) )
break;
if ( !v7 || (v7 = 0, (unsigned int)my_hash_rec_mask(v8, a1[2], a1[3]) == v6) )
{
v6 = *(_DWORD *)v8;
if ( *(_DWORD *)v8 != -1 )
continue;
}
goto LABEL_8;
}
*a5 = v6;
return *(_QWORD *)(v8 + 8);
}
else
{
LABEL_8:
*a5 = -1;
return 0LL;
}
}
|
my_hash_first_from_hash_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013415c
MOV dword ptr [RBP + -0x3c],0x1
MOV EDI,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00134180
MOV dword ptr [RBP + -0x40],EAX
LAB_001340cc:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV ECX,dword ptr [RBP + -0x40]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x001341d0
CMP EAX,0x0
JNZ 0x00134117
JMP 0x001340fe
LAB_001340fe:
JMP 0x00134100
LAB_00134100:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013416e
LAB_00134117:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00134146
MOV dword ptr [RBP + -0x3c],0x0
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00134270
CMP EAX,dword ptr [RBP + -0x40]
JZ 0x00134144
JMP 0x0013415a
LAB_00134144:
JMP 0x00134146
LAB_00134146:
JMP 0x00134148
LAB_00134148:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CMP EAX,-0x1
JNZ 0x001340cc
LAB_0013415a:
JMP 0x0013415c
LAB_0013415c:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
MOV qword ptr [RBP + -0x8],0x0
LAB_0013416e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8
my_hash_first_from_hash_value
(long param_1,int4 param_2,int8 param_3,int8 param_4,uint *param_5)
{
bool bVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint local_48;
if (*(long *)(param_1 + 0x18) != 0) {
bVar1 = true;
local_48 = my_hash_mask(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18))
;
do {
puVar4 = (uint *)(*(long *)(param_1 + 0x28) + (ulong)local_48 * 0x10);
iVar2 = hashcmp(param_1,puVar4,param_3,param_4);
if (iVar2 == 0) {
*param_5 = local_48;
return *(int8 *)(puVar4 + 2);
}
if (bVar1) {
bVar1 = false;
uVar3 = my_hash_rec_mask(puVar4,*(int8 *)(param_1 + 0x10),
*(int8 *)(param_1 + 0x18));
if (uVar3 != local_48) break;
}
local_48 = *puVar4;
} while (local_48 != 0xffffffff);
}
*param_5 = 0xffffffff;
return 0;
}
|
|
61,256
|
mysql_cset_escape_quotes
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr,
const char * escapestr, size_t escapestr_len )
{
const char *newstr_s = newstr;
const char *newstr_e = newstr + 2 * escapestr_len;
const char *end = escapestr + escapestr_len;
my_bool escape_overflow = FALSE;
for (;escapestr < end; escapestr++) {
unsigned int len = 0;
/* check unicode characters */
if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) {
/* check possible overflow */
if ((newstr + len) > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy mb char without escaping it */
while (len--) {
*newstr++ = *escapestr++;
}
escapestr--;
continue;
}
if (*escapestr == '\'') {
if (newstr + 2 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = '\'';
*newstr++ = '\'';
} else {
if (newstr + 1 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = *escapestr;
}
}
*newstr = '\0';
if (escape_overflow) {
return((size_t)~0);
}
return((size_t)(newstr - newstr_s));
}
|
O0
|
c
|
mysql_cset_escape_quotes:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x0, -0x41(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x5ea3c
movl $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x34(%rax)
jbe 0x5e9b8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x48(%rbp)
cmpl $0x0, %eax
je 0x5e9b8
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
addq %rcx, %rax
cmpq -0x38(%rbp), %rax
jbe 0x5e974
movb $0x1, -0x41(%rbp)
jmp 0x5ea3c
jmp 0x5e976
movl -0x48(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x48(%rbp)
cmpl $0x0, %eax
je 0x5e9aa
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x5e976
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5ea2b
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x5e9fe
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x38(%rbp), %rax
jbe 0x5e9d8
movb $0x1, -0x41(%rbp)
jmp 0x5ea3c
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
jmp 0x5ea29
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x38(%rbp), %rax
jbe 0x5ea12
movb $0x1, -0x41(%rbp)
jmp 0x5ea3c
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x5ea2b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5e922
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
cmpb $0x0, -0x41(%rbp)
je 0x5ea53
movq $-0x1, -0x8(%rbp)
jmp 0x5ea62
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
mysql_cset_escape_quotes:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
shl rcx, 1
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
mov [rbp+var_41], 0
loc_5E922:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_5EA3C
mov [rbp+var_48], 0
mov rax, [rbp+var_10]
cmp dword ptr [rax+34h], 1
jbe short loc_5E9B8
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_40]
call rax
mov [rbp+var_48], eax
cmp eax, 0
jz short loc_5E9B8
mov rax, [rbp+var_18]
mov ecx, [rbp+var_48]
add rax, rcx
cmp rax, [rbp+var_38]
jbe short loc_5E974
mov [rbp+var_41], 1
jmp loc_5EA3C
loc_5E974:
jmp short $+2
loc_5E976:
mov eax, [rbp+var_48]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_48], ecx
cmp eax, 0
jz short loc_5E9AA
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 1
mov [rbp+var_18], rdx
mov [rax], cl
jmp short loc_5E976
loc_5E9AA:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_5EA2B
loc_5E9B8:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_5E9FE
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_38]
jbe short loc_5E9D8
mov [rbp+var_41], 1
jmp short loc_5EA3C
loc_5E9D8:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_5EA29
loc_5E9FE:
mov rax, [rbp+var_18]
add rax, 1
cmp rax, [rbp+var_38]
jbe short loc_5EA12
mov [rbp+var_41], 1
jmp short loc_5EA3C
loc_5EA12:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 1
mov [rbp+var_18], rdx
mov [rax], cl
loc_5EA29:
jmp short $+2
loc_5EA2B:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_5E922
loc_5EA3C:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
cmp [rbp+var_41], 0
jz short loc_5EA53
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_5EA62
loc_5EA53:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
loc_5EA62:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
long long mysql_cset_escape_quotes(long long a1, char *a2, char *a3, long long a4)
{
char *v5; // rax
char v6; // cl
char *v7; // rax
_BYTE *v8; // rax
char *v9; // rax
int v11; // [rsp+8h] [rbp-48h]
char v12; // [rsp+Fh] [rbp-41h]
unsigned long long v13; // [rsp+10h] [rbp-40h]
unsigned long long v14; // [rsp+18h] [rbp-38h]
char *v15; // [rsp+30h] [rbp-20h]
char *v16; // [rsp+38h] [rbp-18h]
v16 = a2;
v15 = a3;
v14 = (unsigned long long)&a2[2 * a4];
v13 = (unsigned long long)&a3[a4];
v12 = 0;
while ( (unsigned long long)v15 < v13 )
{
if ( *(_DWORD *)(a1 + 52) > 1u
&& (v11 = (*(long long ( **)(char *, unsigned long long))(a1 + 64))(v15, v13)) != 0 )
{
if ( (unsigned long long)&v16[v11] > v14 )
{
v12 = 1;
break;
}
while ( v11-- )
{
v5 = v15++;
v6 = *v5;
v7 = v16++;
*v7 = v6;
}
--v15;
}
else if ( *v15 == 39 )
{
if ( (unsigned long long)(v16 + 2) > v14 )
{
v12 = 1;
break;
}
*v16 = 39;
v8 = v16 + 1;
v16 += 2;
*v8 = 39;
}
else
{
if ( (unsigned long long)(v16 + 1) > v14 )
{
v12 = 1;
break;
}
v9 = v16++;
*v9 = *v15;
}
++v15;
}
*v16 = 0;
if ( v12 )
return -1LL;
else
return v16 - a2;
}
|
mysql_cset_escape_quotes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV byte ptr [RBP + -0x41],0x0
LAB_0015e922:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0015ea3c
MOV dword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x34],0x1
JBE 0x0015e9b8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x48],EAX
CMP EAX,0x0
JZ 0x0015e9b8
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x48]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x0015e974
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0015ea3c
LAB_0015e974:
JMP 0x0015e976
LAB_0015e976:
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x48],ECX
CMP EAX,0x0
JZ 0x0015e9aa
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RAX],CL
JMP 0x0015e976
LAB_0015e9aa:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015ea2b
LAB_0015e9b8:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x0015e9fe
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x0015e9d8
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0015ea3c
LAB_0015e9d8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV byte ptr [RAX],0x27
JMP 0x0015ea29
LAB_0015e9fe:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x0015ea12
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0015ea3c
LAB_0015ea12:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RAX],CL
LAB_0015ea29:
JMP 0x0015ea2b
LAB_0015ea2b:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015e922
LAB_0015ea3c:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
CMP byte ptr [RBP + -0x41],0x0
JZ 0x0015ea53
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0015ea62
LAB_0015ea53:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0015ea62:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4)
{
bool bVar1;
char *pcVar2;
uint local_50;
char *local_28;
char *local_20;
long local_10;
pcVar2 = param_2 + param_4 * 2;
bVar1 = false;
local_28 = param_3;
local_20 = param_2;
do {
if (param_3 + param_4 <= local_28) {
LAB_0015ea3c:
*local_20 = '\0';
if (bVar1) {
local_10 = -1;
}
else {
local_10 = (long)local_20 - (long)param_2;
}
return local_10;
}
if ((*(uint *)(param_1 + 0x34) < 2) ||
(local_50 = (**(code **)(param_1 + 0x40))(local_28,param_3 + param_4), local_50 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_20 + 2) {
bVar1 = true;
goto LAB_0015ea3c;
}
*local_20 = '\'';
local_20[1] = '\'';
local_20 = local_20 + 2;
}
else {
if (pcVar2 < local_20 + 1) {
bVar1 = true;
goto LAB_0015ea3c;
}
*local_20 = *local_28;
local_20 = local_20 + 1;
}
}
else {
if (pcVar2 < local_20 + local_50) {
bVar1 = true;
goto LAB_0015ea3c;
}
while (local_50 != 0) {
*local_20 = *local_28;
local_50 = local_50 - 1;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
|
|
61,257
|
translog_mark_file_finished
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_mark_file_finished(uint32 file)
{
int i;
struct st_file_counter *UNINIT_VAR(fc_ptr);
DBUG_ENTER("translog_mark_file_finished");
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0);
for (i= 0;
i < (int) log_descriptor.unfinished_files.elements;
i++)
{
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
i, struct st_file_counter *);
if (fc_ptr->file == file)
{
break;
}
}
DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements);
if (! --fc_ptr->counter)
delete_dynamic_element(&log_descriptor.unfinished_files, i);
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_mark_file_finished:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpq $0x0, 0xbaf6a6(%rip) # 0xbff608
jne 0x4ffc6
leaq 0xbaf65d(%rip), %rdi # 0xbff5c8
callq 0x29220
movl 0xbaf6a2(%rip), %esi # 0xbff618
movq 0xbaf693(%rip), %rax # 0xbff610
leal -0x1(%rsi), %edx
xorl %ecx, %ecx
cmpl %ebx, (%rax,%rcx,8)
je 0x4ff94
incq %rcx
cmpq %rcx, %rsi
jne 0x4ff82
movq %rdx, %rcx
jmp 0x4ff96
movl %ecx, %esi
decl 0x4(%rax,%rcx,8)
jne 0x4ffa8
leaq 0xbaf66d(%rip), %rdi # 0xbff610
callq 0x91d2d
movq 0xbaf659(%rip), %rdi # 0xbff608
testq %rdi, %rdi
jne 0x4ffcd
leaq 0xbaf60d(%rip), %rdi # 0xbff5c8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x291e0
callq 0x2cece
jmp 0x4ff70
leaq 0x33603c(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4ffb4
|
translog_mark_file_finished:
push rbp
mov rbp, rsp
push rbx
push rax
mov ebx, edi
cmp cs:qword_BFF608, 0
jnz short loc_4FFC6
lea rdi, unk_BFF5C8
call _pthread_mutex_lock
loc_4FF70:
mov esi, cs:dword_BFF618
mov rax, cs:qword_BFF610
lea edx, [rsi-1]
xor ecx, ecx
loc_4FF82:
cmp [rax+rcx*8], ebx
jz short loc_4FF94
inc rcx
cmp rsi, rcx
jnz short loc_4FF82
mov rcx, rdx
jmp short loc_4FF96
loc_4FF94:
mov esi, ecx
loc_4FF96:
dec dword ptr [rax+rcx*8+4]
jnz short loc_4FFA8
lea rdi, qword_BFF610
call delete_dynamic_element
loc_4FFA8:
mov rdi, cs:qword_BFF608
test rdi, rdi
jnz short loc_4FFCD
loc_4FFB4:
lea rdi, unk_BFF5C8
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_unlock
loc_4FFC6:
call translog_mark_file_finished_cold_1
jmp short loc_4FF70
loc_4FFCD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4FFB4
|
long long translog_mark_file_finished(long long a1)
{
long long v1; // rsi
long long v2; // rdx
long long v3; // rcx
if ( qword_BFF608 )
translog_mark_file_finished_cold_1(a1);
else
pthread_mutex_lock(&unk_BFF5C8);
v1 = (unsigned int)dword_BFF618;
v2 = (unsigned int)(dword_BFF618 - 1);
v3 = 0LL;
while ( *(_DWORD *)(qword_BFF610 + 8 * v3) != (_DWORD)a1 )
{
if ( dword_BFF618 == ++v3 )
{
v3 = (unsigned int)(dword_BFF618 - 1);
goto LABEL_8;
}
}
v1 = (unsigned int)v3;
LABEL_8:
if ( (*(_DWORD *)(qword_BFF610 + 8 * v3 + 4))-- == 1 )
delete_dynamic_element(&qword_BFF610, v1, v2);
if ( qword_BFF608 )
((void ( *)(long long, long long, long long))PSI_server[44])(qword_BFF608, v1, v2);
return pthread_mutex_unlock(&unk_BFF5C8);
}
|
translog_mark_file_finished:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EBX,EDI
CMP qword ptr [0x00cff608],0x0
JNZ 0x0014ffc6
LEA RDI,[0xcff5c8]
CALL 0x00129220
LAB_0014ff70:
MOV ESI,dword ptr [0x00cff618]
MOV RAX,qword ptr [0x00cff610]
LEA EDX,[RSI + -0x1]
XOR ECX,ECX
LAB_0014ff82:
CMP dword ptr [RAX + RCX*0x8],EBX
JZ 0x0014ff94
INC RCX
CMP RSI,RCX
JNZ 0x0014ff82
MOV RCX,RDX
JMP 0x0014ff96
LAB_0014ff94:
MOV ESI,ECX
LAB_0014ff96:
DEC dword ptr [RAX + RCX*0x8 + 0x4]
JNZ 0x0014ffa8
LEA RDI,[0xcff610]
CALL 0x00191d2d
LAB_0014ffa8:
MOV RDI,qword ptr [0x00cff608]
TEST RDI,RDI
JNZ 0x0014ffcd
LAB_0014ffb4:
LEA RDI,[0xcff5c8]
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001291e0
LAB_0014ffc6:
CALL 0x0012cece
JMP 0x0014ff70
LAB_0014ffcd:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014ffb4
|
void translog_mark_file_finished(int param_1)
{
int *piVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
if (DAT_00cff608 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff5c8);
}
else {
translog_mark_file_finished_cold_1();
}
uVar4 = (ulong)DAT_00cff618;
uVar3 = (ulong)(DAT_00cff618 - 1);
uVar2 = 0;
do {
if (*(int *)(DAT_00cff610 + uVar2 * 8) == param_1) {
uVar4 = uVar2 & 0xffffffff;
uVar3 = uVar2;
break;
}
uVar2 = uVar2 + 1;
} while (uVar4 != uVar2);
piVar1 = (int *)(DAT_00cff610 + 4 + uVar3 * 8);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
delete_dynamic_element(&DAT_00cff610,uVar4);
}
if (DAT_00cff608 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff5c8);
return;
}
|
|
61,258
|
my_string_repertoire_8bit
|
eloqsql/strings/ctype.c
|
uint
my_string_repertoire_8bit(CHARSET_INFO *cs, const char *str, size_t length)
{
const char *strend;
if ((cs->state & MY_CS_NONASCII) && length > 0)
return MY_REPERTOIRE_UNICODE30;
for (strend= str + length; str < strend; str++)
{
if (((uchar) *str) > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
return MY_REPERTOIRE_ASCII;
}
|
O0
|
c
|
my_string_repertoire_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0xd09c1
cmpq $0x0, -0x20(%rbp)
jbe 0xd09c1
movl $0x3, -0x4(%rbp)
jmp 0xd0a03
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xd09fc
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0xd09ec
movl $0x3, -0x4(%rbp)
jmp 0xd0a03
jmp 0xd09ee
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd09cd
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_string_repertoire_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
and eax, 2000h
cmp eax, 0
jz short loc_D09C1
cmp [rbp+var_20], 0
jbe short loc_D09C1
mov [rbp+var_4], 3
jmp short loc_D0A03
loc_D09C1:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_D09CD:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_D09FC
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle short loc_D09EC
mov [rbp+var_4], 3
jmp short loc_D0A03
loc_D09EC:
jmp short $+2
loc_D09EE:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_D09CD
loc_D09FC:
mov [rbp+var_4], 1
loc_D0A03:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_string_repertoire_8bit(long long a1, unsigned __int8 *a2, long long a3)
{
unsigned __int8 *v4; // [rsp+10h] [rbp-18h]
v4 = a2;
if ( (*(_DWORD *)(a1 + 12) & 0x2000) != 0 && a3 )
{
return 3;
}
else
{
while ( v4 < &a2[a3] )
{
if ( *v4 > 0x7Fu )
return 3;
++v4;
}
return 1;
}
}
|
my_string_repertoire_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x001d09c1
CMP qword ptr [RBP + -0x20],0x0
JBE 0x001d09c1
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001d0a03
LAB_001d09c1:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_001d09cd:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001d09fc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
JLE 0x001d09ec
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001d0a03
LAB_001d09ec:
JMP 0x001d09ee
LAB_001d09ee:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001d09cd
LAB_001d09fc:
MOV dword ptr [RBP + -0x4],0x1
LAB_001d0a03:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_string_repertoire_8bit(long param_1,byte *param_2,long param_3)
{
byte *local_20;
int4 local_c;
if (((*(uint *)(param_1 + 0xc) & 0x2000) == 0) || (param_3 == 0)) {
for (local_20 = param_2; local_20 < param_2 + param_3; local_20 = local_20 + 1) {
if (0x7f < *local_20) {
return 3;
}
}
local_c = 1;
}
else {
local_c = 3;
}
return local_c;
}
|
|
61,259
|
ma_set_connect_attrs
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static my_bool
ma_set_connect_attrs(MYSQL *mysql, const char *host)
{
char buffer[255];
int rc= 0;
rc= mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_client_name") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_client_version") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_os") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_server_host") +
#ifdef _WIN32
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_thread") +
#endif
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_pid") +
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "_platform");
rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_name", "libmariadb")
+ mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_version", MARIADB_PACKAGE_VERSION)
+ mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_os", MARIADB_SYSTEM_TYPE);
if (host && *host)
rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_server_host", host);
#ifdef _WIN32
snprintf(buffer, 255, "%lu", (ulong) GetCurrentThreadId());
rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_thread", buffer);
snprintf(buffer, 255, "%lu", (ulong) GetCurrentProcessId());
#else
snprintf(buffer, 255, "%lu", (ulong) getpid());
#endif
rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_pid", buffer);
rc+= mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "_platform", MARIADB_MACHINE_TYPE);
return(test(rc>0));
}
|
O0
|
c
|
ma_set_connect_attrs:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp # imm = 0x150
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movl $0x0, -0x124(%rbp)
movq -0x118(%rbp), %rdi
movl $0x22, %esi
leaq 0x314a0(%rip), %rdx # 0x56053
callq 0x29860
movl %eax, -0x140(%rbp)
movq -0x118(%rbp), %rdi
movl $0x22, %esi
leaq 0x3148f(%rip), %rdx # 0x56060
callq 0x29860
movl %eax, %ecx
movl -0x140(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x13c(%rbp)
movq -0x118(%rbp), %rdi
movl $0x22, %esi
leaq 0x31477(%rip), %rdx # 0x56070
callq 0x29860
movl %eax, %ecx
movl -0x13c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x138(%rbp)
movq -0x118(%rbp), %rdi
movl $0x22, %esi
leaq 0x31453(%rip), %rdx # 0x56074
callq 0x29860
movl %eax, %ecx
movl -0x138(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x134(%rbp)
movq -0x118(%rbp), %rdi
movl $0x22, %esi
leaq 0x31438(%rip), %rdx # 0x56081
callq 0x29860
movl %eax, %ecx
movl -0x134(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x130(%rbp)
movq -0x118(%rbp), %rdi
movl $0x22, %esi
leaq 0x31415(%rip), %rdx # 0x56086
callq 0x29860
movl %eax, %ecx
movl -0x130(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x124(%rbp)
movq -0x118(%rbp), %rdi
movl $0x21, %esi
leaq 0x313ba(%rip), %rdx # 0x56053
leaq 0x313f0(%rip), %rcx # 0x56090
movb $0x0, %al
callq 0x1f5d0
movl %eax, -0x12c(%rbp)
movq -0x118(%rbp), %rdi
movl $0x21, %esi
leaq 0x313a0(%rip), %rdx # 0x56060
leaq 0x3130e(%rip), %rcx # 0x55fd5
movb $0x0, %al
callq 0x1f5d0
movl %eax, %ecx
movl -0x12c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x128(%rbp)
movq -0x118(%rbp), %rdi
movl $0x21, %esi
leaq 0x3137f(%rip), %rdx # 0x56070
leaq 0x313a3(%rip), %rcx # 0x5609b
movb $0x0, %al
callq 0x1f5d0
movl %eax, %ecx
movl -0x128(%rbp), %eax
addl %ecx, %eax
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
cmpq $0x0, -0x120(%rbp)
je 0x24d5b
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x24d5b
movq -0x118(%rbp), %rdi
movq -0x120(%rbp), %rcx
movl $0x21, %esi
leaq 0x3132c(%rip), %rdx # 0x56074
movb $0x0, %al
callq 0x1f5d0
addl -0x124(%rbp), %eax
movl %eax, -0x124(%rbp)
callq 0x13650
movslq %eax, %rcx
leaq 0x31337(%rip), %rdx # 0x560a1
xorl %eax, %eax
movb %al, -0x142(%rbp)
leaq -0x110(%rbp), %rdi
movq %rdi, -0x150(%rbp)
movl $0xff, %esi
callq 0x136d0
movq -0x150(%rbp), %rcx
movb -0x142(%rbp), %al
movq -0x118(%rbp), %rdi
leaq 0x312dc(%rip), %rdx # 0x56081
movl $0x21, %esi
movl %esi, -0x148(%rbp)
callq 0x1f5d0
movl -0x148(%rbp), %esi
movl %eax, %edx
movb -0x142(%rbp), %al
movl -0x124(%rbp), %ecx
addl %edx, %ecx
movl %ecx, -0x124(%rbp)
movq -0x118(%rbp), %rdi
leaq 0x312a7(%rip), %rdx # 0x56086
leaq 0x312bf(%rip), %rcx # 0x560a5
callq 0x1f5d0
movl %eax, %ecx
movl -0x124(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x124(%rbp)
movl -0x124(%rbp), %eax
testl %eax, %eax
setg %al
movb %al, -0x141(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x24e2d
movb -0x141(%rbp), %al
addq $0x150, %rsp # imm = 0x150
popq %rbp
retq
callq 0x134b0
nopw %cs:(%rax,%rax)
|
ma_set_connect_attrs:
push rbp
mov rbp, rsp
sub rsp, 150h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_124], 0
mov rdi, [rbp+var_118]
mov esi, 22h ; '"'
lea rdx, aClientName; "_client_name"
call mysql_options
mov [rbp+var_140], eax
mov rdi, [rbp+var_118]
mov esi, 22h ; '"'
lea rdx, aClientVersion; "_client_version"
call mysql_options
mov ecx, eax
mov eax, [rbp+var_140]
add eax, ecx
mov [rbp+var_13C], eax
mov rdi, [rbp+var_118]
mov esi, 22h ; '"'
lea rdx, aOs; "_os"
call mysql_options
mov ecx, eax
mov eax, [rbp+var_13C]
add eax, ecx
mov [rbp+var_138], eax
mov rdi, [rbp+var_118]
mov esi, 22h ; '"'
lea rdx, aServerHost; "_server_host"
call mysql_options
mov ecx, eax
mov eax, [rbp+var_138]
add eax, ecx
mov [rbp+var_134], eax
mov rdi, [rbp+var_118]
mov esi, 22h ; '"'
lea rdx, aPid; "_pid"
call mysql_options
mov ecx, eax
mov eax, [rbp+var_134]
add eax, ecx
mov [rbp+var_130], eax
mov rdi, [rbp+var_118]
mov esi, 22h ; '"'
lea rdx, aPlatform; "_platform"
call mysql_options
mov ecx, eax
mov eax, [rbp+var_130]
add eax, ecx
mov [rbp+var_124], eax
mov rdi, [rbp+var_118]
mov esi, 21h ; '!'
lea rdx, aClientName; "_client_name"
lea rcx, aLibmariadb; "libmariadb"
mov al, 0
call mysql_optionsv
mov [rbp+var_12C], eax
mov rdi, [rbp+var_118]
mov esi, 21h ; '!'
lea rdx, aClientVersion; "_client_version"
lea rcx, a332; "3.3.2"
mov al, 0
call mysql_optionsv
mov ecx, eax
mov eax, [rbp+var_12C]
add eax, ecx
mov [rbp+var_128], eax
mov rdi, [rbp+var_118]
mov esi, 21h ; '!'
lea rdx, aOs; "_os"
lea rcx, aLinux; "Linux"
mov al, 0
call mysql_optionsv
mov ecx, eax
mov eax, [rbp+var_128]
add eax, ecx
add eax, [rbp+var_124]
mov [rbp+var_124], eax
cmp [rbp+var_120], 0
jz short loc_24D5B
mov rax, [rbp+var_120]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_24D5B
mov rdi, [rbp+var_118]
mov rcx, [rbp+var_120]
mov esi, 21h ; '!'
lea rdx, aServerHost; "_server_host"
mov al, 0
call mysql_optionsv
add eax, [rbp+var_124]
mov [rbp+var_124], eax
loc_24D5B:
call _getpid
movsxd rcx, eax
lea rdx, aLu; "%lu"
xor eax, eax
mov [rbp+var_142], al
lea rdi, [rbp+var_110]
mov [rbp+var_150], rdi
mov esi, 0FFh
call _snprintf
mov rcx, [rbp+var_150]
mov al, [rbp+var_142]
mov rdi, [rbp+var_118]
lea rdx, aPid; "_pid"
mov esi, 21h ; '!'
mov [rbp+var_148], esi
call mysql_optionsv
mov esi, [rbp+var_148]
mov edx, eax
mov al, [rbp+var_142]
mov ecx, [rbp+var_124]
add ecx, edx
mov [rbp+var_124], ecx
mov rdi, [rbp+var_118]
lea rdx, aPlatform; "_platform"
lea rcx, aX8664; "x86_64"
call mysql_optionsv
mov ecx, eax
mov eax, [rbp+var_124]
add eax, ecx
mov [rbp+var_124], eax
mov eax, [rbp+var_124]
test eax, eax
setnle al
mov [rbp+var_141], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_24E2D
mov al, [rbp+var_141]
add rsp, 150h
pop rbp
retn
loc_24E2D:
call ___stack_chk_fail
|
bool ma_set_connect_attrs(long long a1, _BYTE *a2)
{
int v2; // eax
int v4; // [rsp+10h] [rbp-140h]
int v5; // [rsp+14h] [rbp-13Ch]
int v6; // [rsp+18h] [rbp-138h]
int v7; // [rsp+1Ch] [rbp-134h]
int v8; // [rsp+20h] [rbp-130h]
int v9; // [rsp+24h] [rbp-12Ch]
int v10; // [rsp+28h] [rbp-128h]
int v11; // [rsp+2Ch] [rbp-124h]
int v12; // [rsp+2Ch] [rbp-124h]
int v13; // [rsp+2Ch] [rbp-124h]
_BYTE v14[264]; // [rsp+40h] [rbp-110h] BYREF
unsigned long long v15; // [rsp+148h] [rbp-8h]
v15 = __readfsqword(0x28u);
v4 = mysql_options(a1, 34LL, "_client_name");
v5 = mysql_options(a1, 34LL, "_client_version") + v4;
v6 = mysql_options(a1, 34LL, "_os") + v5;
v7 = mysql_options(a1, 34LL, "_server_host") + v6;
v8 = mysql_options(a1, 34LL, "_pid") + v7;
v11 = mysql_options(a1, 34LL, "_platform") + v8;
v9 = mysql_optionsv(a1, 33, "_client_name", "libmariadb");
v10 = mysql_optionsv(a1, 33, "_client_version", "3.3.2") + v9;
v12 = v11 + mysql_optionsv(a1, 33, "_os", "Linux") + v10;
if ( a2 && *a2 )
v12 += mysql_optionsv(a1, 33, "_server_host", a2);
v2 = getpid();
snprintf(v14, 255LL, "%lu", v2);
v13 = mysql_optionsv(a1, 33, "_pid", v14) + v12;
return (int)(mysql_optionsv(a1, 33, "_platform", "x86_64") + v13) > 0;
}
|
ma_set_connect_attrs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x150
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 dword ptr [RBP + -0x124],0x0
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x22
LEA RDX,[0x156053]
CALL 0x00129860
MOV dword ptr [RBP + -0x140],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x22
LEA RDX,[0x156060]
CALL 0x00129860
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x140]
ADD EAX,ECX
MOV dword ptr [RBP + -0x13c],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x22
LEA RDX,[0x156070]
CALL 0x00129860
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x13c]
ADD EAX,ECX
MOV dword ptr [RBP + -0x138],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x22
LEA RDX,[0x156074]
CALL 0x00129860
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x138]
ADD EAX,ECX
MOV dword ptr [RBP + -0x134],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x22
LEA RDX,[0x156081]
CALL 0x00129860
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x134]
ADD EAX,ECX
MOV dword ptr [RBP + -0x130],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x22
LEA RDX,[0x156086]
CALL 0x00129860
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x130]
ADD EAX,ECX
MOV dword ptr [RBP + -0x124],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x21
LEA RDX,[0x156053]
LEA RCX,[0x156090]
MOV AL,0x0
CALL 0x0011f5d0
MOV dword ptr [RBP + -0x12c],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x21
LEA RDX,[0x156060]
LEA RCX,[0x155fd5]
MOV AL,0x0
CALL 0x0011f5d0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x12c]
ADD EAX,ECX
MOV dword ptr [RBP + -0x128],EAX
MOV RDI,qword ptr [RBP + -0x118]
MOV ESI,0x21
LEA RDX,[0x156070]
LEA RCX,[0x15609b]
MOV AL,0x0
CALL 0x0011f5d0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x128]
ADD EAX,ECX
ADD EAX,dword ptr [RBP + -0x124]
MOV dword ptr [RBP + -0x124],EAX
CMP qword ptr [RBP + -0x120],0x0
JZ 0x00124d5b
MOV RAX,qword ptr [RBP + -0x120]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00124d5b
MOV RDI,qword ptr [RBP + -0x118]
MOV RCX,qword ptr [RBP + -0x120]
MOV ESI,0x21
LEA RDX,[0x156074]
MOV AL,0x0
CALL 0x0011f5d0
ADD EAX,dword ptr [RBP + -0x124]
MOV dword ptr [RBP + -0x124],EAX
LAB_00124d5b:
CALL 0x00113650
MOVSXD RCX,EAX
LEA RDX,[0x1560a1]
XOR EAX,EAX
MOV byte ptr [RBP + -0x142],AL
LEA RDI,[RBP + -0x110]
MOV qword ptr [RBP + -0x150],RDI
MOV ESI,0xff
CALL 0x001136d0
MOV RCX,qword ptr [RBP + -0x150]
MOV AL,byte ptr [RBP + -0x142]
MOV RDI,qword ptr [RBP + -0x118]
LEA RDX,[0x156081]
MOV ESI,0x21
MOV dword ptr [RBP + -0x148],ESI
CALL 0x0011f5d0
MOV ESI,dword ptr [RBP + -0x148]
MOV EDX,EAX
MOV AL,byte ptr [RBP + -0x142]
MOV ECX,dword ptr [RBP + -0x124]
ADD ECX,EDX
MOV dword ptr [RBP + -0x124],ECX
MOV RDI,qword ptr [RBP + -0x118]
LEA RDX,[0x156086]
LEA RCX,[0x1560a5]
CALL 0x0011f5d0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x124]
ADD EAX,ECX
MOV dword ptr [RBP + -0x124],EAX
MOV EAX,dword ptr [RBP + -0x124]
TEST EAX,EAX
SETG AL
MOV byte ptr [RBP + -0x141],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00124e2d
MOV AL,byte ptr [RBP + -0x141]
ADD RSP,0x150
POP RBP
RET
LAB_00124e2d:
CALL 0x001134b0
|
int8 ma_set_connect_attrs(int8 param_1,char *param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
__pid_t _Var10;
long in_FS_OFFSET;
int local_12c;
char local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = mysql_options(param_1,0x22,"_client_name");
iVar2 = mysql_options(param_1,0x22,"_client_version");
iVar3 = mysql_options(param_1,0x22,&DAT_00156070);
iVar4 = mysql_options(param_1,0x22,"_server_host");
iVar5 = mysql_options(param_1,0x22,&DAT_00156081);
iVar6 = mysql_options(param_1,0x22,"_platform");
iVar7 = mysql_optionsv(param_1,0x21,"_client_name","libmariadb");
iVar8 = mysql_optionsv(param_1,0x21,"_client_version","3.3.2");
iVar9 = mysql_optionsv(param_1,0x21,&DAT_00156070,"Linux");
local_12c = iVar7 + iVar8 + iVar9 + iVar1 + iVar2 + iVar3 + iVar4 + iVar5 + iVar6;
if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
iVar1 = mysql_optionsv(param_1,0x21,"_server_host",param_2);
local_12c = iVar1 + local_12c;
}
_Var10 = getpid();
snprintf(local_118,0xff,"%lu",(long)_Var10);
iVar1 = mysql_optionsv(param_1,0x21,&DAT_00156081,local_118);
iVar2 = mysql_optionsv(param_1,0x21,"_platform","x86_64");
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),0 < local_12c + iVar1 + iVar2
);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,260
|
evmone::instr::core::extcodecopy(evmone::StackTop, long, evmone::ExecutionState&)
|
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp
|
inline Result extcodecopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
const auto addr = intx::be::trunc<evmc::address>(stack.pop());
const auto& mem_index = stack.pop();
const auto& input_index = stack.pop();
const auto& size = stack.pop();
if (!check_memory(gas_left, state.memory, mem_index, size))
return {EVMC_OUT_OF_GAS, gas_left};
const auto s = static_cast<size_t>(size);
if (const auto cost = copy_cost(s); (gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
if (state.rev >= EVMC_BERLIN && state.host.access_account(addr) == EVMC_ACCESS_COLD)
{
if ((gas_left -= instr::additional_cold_account_access_cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
}
if (s > 0)
{
const auto src =
(max_buffer_size < input_index) ? max_buffer_size : static_cast<size_t>(input_index);
const auto dst = static_cast<size_t>(mem_index);
const auto num_bytes_copied = state.host.copy_code(addr, src, &state.memory[dst], s);
if (const auto num_bytes_to_clear = s - num_bytes_copied; num_bytes_to_clear > 0)
std::memset(&state.memory[dst + num_bytes_copied], 0, num_bytes_to_clear);
}
return {EVMC_SUCCESS, gas_left};
}
|
O2
|
cpp
|
evmone::instr::core::extcodecopy(evmone::StackTop, long, evmone::ExecutionState&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %r13
leaq 0x8(%rsp), %rbp
movq %rsi, (%rbp)
leaq -0x20(%rdi), %r12
leaq 0x14(%rsp), %rdi
movq %r13, %rsi
callq 0x3a597
leaq -0x60(%r13), %r15
leaq 0x8(%r14), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x3a338
testb %al, %al
je 0x3aada
movq (%r15), %r15
leaq 0x1f(%r15), %rax
shrq $0x5, %rax
imulq $-0x3, %rax, %rdx
addq 0x8(%rsp), %rdx
movq %rdx, 0x8(%rsp)
pushq $0x3
popq %rbp
js 0x3aae2
cmpl $0x8, 0x40(%r14)
jl 0x3aa7a
leaq 0x28(%r14), %rdi
leaq 0x14(%rsp), %rsi
callq 0x2e6a8
testl %eax, %eax
jne 0x3aa7a
movq 0x8(%rsp), %rax
leaq -0x9c4(%rax), %rdx
movq %rdx, 0x8(%rsp)
cmpq $0x9c4, %rax # imm = 0x9C4
jl 0x3aae2
testq %r15, %r15
je 0x3aad6
addq $-0x40, %r13
leaq 0x3af56(%rip), %rdi # 0x759e0
movq %r13, %rsi
callq 0x3aaf3
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
testb %al, %al
jne 0x3aa9f
movq (%r13), %rdx
movq (%r12), %r12
movq 0x8(%r14), %rcx
addq %r12, %rcx
addq $0x28, %r14
leaq 0x14(%rsp), %rsi
movq %r14, %rdi
movq %r15, %r8
callq 0x2e5da
subq %rax, %r15
je 0x3aad6
addq (%rbx), %r12
addq %rax, %r12
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x22120
xorl %ebp, %ebp
jmp 0x3aadd
pushq $0x3
popq %rbp
movq 0x8(%rsp), %rdx
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN6evmone5instr4core11extcodecopyENS_8StackTopElRNS_14ExecutionStateE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov r13, rdi
lea rbp, [rsp+58h+var_50]
mov [rbp+0], rsi
lea r12, [rdi-20h]
lea rdi, [rsp+58h+var_44]
mov rsi, r13
call _ZN4intx2be5truncIN4evmc7addressELj256EEET_RKNS_4uintIXT0_EEE; intx::be::trunc<evmc::address,256u>(intx::uint<256u> const&)
lea r15, [r13-60h]
lea rbx, [r14+8]
mov rdi, rbp
mov rsi, rbx
mov rdx, r12
mov rcx, r15
call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&)
test al, al
jz loc_3AADA
mov r15, [r15]
lea rax, [r15+1Fh]
shr rax, 5
imul rdx, rax, -3
add rdx, [rsp+58h+var_50]
mov [rsp+58h+var_50], rdx
push 3
pop rbp
js loc_3AAE2
cmp dword ptr [r14+40h], 8
jl short loc_3AA7A
lea rdi, [r14+28h]
lea rsi, [rsp+58h+var_44]
call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&)
test eax, eax
jnz short loc_3AA7A
mov rax, [rsp+58h+var_50]
lea rdx, [rax-9C4h]
mov [rsp+58h+var_50], rdx
cmp rax, 9C4h
jl short loc_3AAE2
loc_3AA7A:
test r15, r15
jz short loc_3AAD6
add r13, 0FFFFFFFFFFFFFFC0h
lea rdi, _ZN6evmoneL15max_buffer_sizeE; evmone::max_buffer_size
mov rsi, r13
call _ZN4intxltILj256EjvEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,uint,void>(uint const&,intx::uint<256u> const&)
mov edx, 0FFFFFFFFh
test al, al
jnz short loc_3AA9F
mov rdx, [r13+0]
loc_3AA9F:
mov r12, [r12]
mov rcx, [r14+8]
add rcx, r12
add r14, 28h ; '('
lea rsi, [rsp+58h+var_44]
mov rdi, r14
mov r8, r15
call _ZNK4evmc11HostContext9copy_codeERKNS_7addressEmPhm; evmc::HostContext::copy_code(evmc::address const&,ulong,uchar *,ulong)
sub r15, rax
jz short loc_3AAD6
add r12, [rbx]
add r12, rax
mov rdi, r12
xor esi, esi
mov rdx, r15
call _memset
loc_3AAD6:
xor ebp, ebp
jmp short loc_3AADD
loc_3AADA:
push 3
pop rbp
loc_3AADD:
mov rdx, [rsp+58h+var_50]
loc_3AAE2:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long evmone::instr::core::extcodecopy(long long a1, long long a2, long long a3)
{
long long v4; // r15
unsigned long long v5; // rax
bool v6; // sf
unsigned int v7; // ebp
long long v8; // rax
long long v9; // r12
long long v10; // rax
long long v11; // r15
long long v13; // [rsp+8h] [rbp-50h] BYREF
char v14[68]; // [rsp+14h] [rbp-44h] BYREF
v13 = a2;
intx::be::trunc<evmc::address,256u>((long long)v14);
if ( evmone::check_memory((long long)&v13, a3 + 8, a1 - 32, (_QWORD *)(a1 - 96)) )
{
v4 = *(_QWORD *)(a1 - 96);
v5 = (unsigned long long)(v4 + 31) >> 5;
v6 = (long long)(v13 - 3 * v5) < 0;
v13 -= 3 * v5;
v7 = 3;
if ( !v6 )
{
if ( *(int *)(a3 + 64) < 8
|| (unsigned int)evmc::HostContext::access_account(a3 + 40)
|| (v8 = v13, v13 -= 2500LL, v8 >= 2500) )
{
if ( v4 )
{
intx::operator<<256u,unsigned int,void>(&evmone::max_buffer_size, a1 - 64);
v9 = *(_QWORD *)(a1 - 32);
v10 = evmc::HostContext::copy_code(a3 + 40);
v11 = v4 - v10;
if ( v11 )
memset(v10 + *(_QWORD *)(a3 + 8) + v9, 0LL, v11);
}
return 0;
}
}
}
else
{
return 3;
}
return v7;
}
|
extcodecopy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV R13,RDI
LEA RBP,[RSP + 0x8]
MOV qword ptr [RBP],RSI
LEA R12,[RDI + -0x20]
LEA RDI,[RSP + 0x14]
MOV RSI,R13
CALL 0x0013a597
LEA R15,[R13 + -0x60]
LEA RBX,[R14 + 0x8]
MOV RDI,RBP
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R15
CALL 0x0013a338
TEST AL,AL
JZ 0x0013aada
MOV R15,qword ptr [R15]
LEA RAX,[R15 + 0x1f]
SHR RAX,0x5
IMUL RDX,RAX,-0x3
ADD RDX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x8],RDX
PUSH 0x3
POP RBP
JS 0x0013aae2
CMP dword ptr [R14 + 0x40],0x8
JL 0x0013aa7a
LEA RDI,[R14 + 0x28]
LEA RSI,[RSP + 0x14]
CALL 0x0012e6a8
TEST EAX,EAX
JNZ 0x0013aa7a
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RAX + -0x9c4]
MOV qword ptr [RSP + 0x8],RDX
CMP RAX,0x9c4
JL 0x0013aae2
LAB_0013aa7a:
TEST R15,R15
JZ 0x0013aad6
ADD R13,-0x40
LEA RDI,[0x1759e0]
MOV RSI,R13
CALL 0x0013aaf3
MOV EDX,0xffffffff
TEST AL,AL
JNZ 0x0013aa9f
MOV RDX,qword ptr [R13]
LAB_0013aa9f:
MOV R12,qword ptr [R12]
MOV RCX,qword ptr [R14 + 0x8]
ADD RCX,R12
ADD R14,0x28
LEA RSI,[RSP + 0x14]
MOV RDI,R14
MOV R8,R15
CALL 0x0012e5da
SUB R15,RAX
JZ 0x0013aad6
ADD R12,qword ptr [RBX]
ADD R12,RAX
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R15
CALL 0x00122120
LAB_0013aad6:
XOR EBP,EBP
JMP 0x0013aadd
LAB_0013aada:
PUSH 0x3
POP RBP
LAB_0013aadd:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0013aae2:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* evmone::instr::core::extcodecopy(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::extcodecopy(uint *param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
char cVar3;
bool bVar4;
int iVar5;
long lVar6;
uchar *puVar7;
int8 uVar8;
int1 auVar9 [16];
long local_50;
be local_44 [20];
local_50 = param_2;
intx::be::trunc<evmc::address,256u>(local_44,param_1);
cVar3 = check_memory(&local_50,(Memory *)(param_3 + 8),param_1 + -0x20,param_1 + -0x60);
if (cVar3 == '\0') {
uVar8 = 3;
}
else {
lVar2 = *(long *)(param_1 + -0x60);
local_50 = (lVar2 + 0x1fU >> 5) * -3 + local_50;
uVar8 = 3;
if ((-1 < local_50) &&
(((*(int *)(param_3 + 0x40) < 8 ||
(iVar5 = evmc::HostContext::access_account((address *)(param_3 + 0x28)), iVar5 != 0)) ||
(lVar1 = local_50 + -0x9c4, bVar4 = 0x9c3 < local_50, local_50 = lVar1, bVar4)))) {
if (lVar2 != 0) {
bVar4 = intx::operator<(&max_buffer_size,param_1 + -0x40);
puVar7 = (uchar *)0xffffffff;
if (!bVar4) {
puVar7 = *(uchar **)(param_1 + -0x40);
}
lVar1 = *(long *)(param_1 + -0x20);
lVar6 = evmc::HostContext::copy_code
((address *)(param_3 + 0x28),(ulong)local_44,puVar7,
*(long *)(param_3 + 8) + lVar1);
if (lVar2 - lVar6 != 0) {
memset((void *)(lVar1 + *(long *)(param_3 + 8) + lVar6),0,lVar2 - lVar6);
}
}
uVar8 = 0;
}
}
auVar9._8_8_ = local_50;
auVar9._0_8_ = uVar8;
return auVar9;
}
|
|
61,261
|
translog_read_next_record_header
|
eloqsql/storage/maria/ma_loghandler.c
|
int translog_read_next_record_header(TRANSLOG_SCANNER_DATA *scanner,
TRANSLOG_HEADER_BUFFER *buff)
{
translog_size_t res;
DBUG_ENTER("translog_read_next_record_header");
buff->groups_no= 0; /* to be sure that we will free it right */
DBUG_PRINT("enter", ("scanner: %p", scanner));
DBUG_PRINT("info", ("Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " "
"Lst: " LSN_FMT " Offset: %u(%x) fixed: %d",
LSN_IN_PARTS(scanner->page_addr),
LSN_IN_PARTS(scanner->horizon),
LSN_IN_PARTS(scanner->last_file_page),
(uint) scanner->page_offset,
(uint) scanner->page_offset, scanner->fixed_horizon));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
do
{
if (translog_get_next_chunk(scanner))
DBUG_RETURN(RECHEADER_READ_ERROR);
if (scanner->page == END_OF_LOG)
{
DBUG_PRINT("info", ("End of file from the scanner"));
/* Last record was read */
buff->lsn= LSN_IMPOSSIBLE;
DBUG_RETURN(RECHEADER_READ_EOF);
}
DBUG_PRINT("info", ("Page: " LSN_FMT " offset: %lu byte: %x",
LSN_IN_PARTS(scanner->page_addr),
(ulong) scanner->page_offset,
(uint) scanner->page[scanner->page_offset]));
} while (!translog_is_LSN_chunk(scanner->page[scanner->page_offset]) &&
scanner->page[scanner->page_offset] != TRANSLOG_FILLER);
if (scanner->page[scanner->page_offset] == TRANSLOG_FILLER)
{
DBUG_PRINT("info", ("End of file"));
/* Last record was read */
buff->lsn= LSN_IMPOSSIBLE;
/* Return 'end of log' marker */
res= RECHEADER_READ_EOF;
}
else
res= translog_read_record_header_scan(scanner, buff, 0);
DBUG_RETURN(res);
}
|
O3
|
c
|
translog_read_next_record_header:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, 0x418(%rsi)
leaq 0xbb67d7(%rip), %r15 # 0xbfe080
movq %r14, %rdi
callq 0x45fba
testb %al, %al
jne 0x4794f
movq 0x2018(%r14), %rax
cmpq %r15, %rax
je 0x47941
movl 0x2028(%r14), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
andl $-0x40, %ecx
cmpl $0x40, %ecx
je 0x478f6
testl %ecx, %ecx
sete %cl
movl %eax, %edx
notl %edx
testb $0x3f, %dl
setne %dl
testb %dl, %cl
jne 0x478f6
cmpl $0xff, %eax
jne 0x478a9
jmp 0x47941
cmpl $0xff, %eax
je 0x47941
movl $0x0, 0x418(%rbx)
movq 0x2000(%r14), %rax
movq %rax, (%rbx)
movl 0x2028(%r14), %ecx
addq %rax, %rcx
movq %rcx, (%rbx)
movq 0x2018(%r14), %rdi
movzwl 0x2028(%r14), %esi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x472f8
movq $0x0, (%rbx)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jmp 0x47954
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
translog_read_next_record_header:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov dword ptr [rsi+418h], 0
lea r15, end_of_log
loc_478A9:
mov rdi, r14
call translog_get_next_chunk
test al, al
jnz loc_4794F
mov rax, [r14+2018h]
cmp rax, r15
jz short loc_47941
mov ecx, [r14+2028h]
movzx eax, byte ptr [rax+rcx]
mov ecx, eax
and ecx, 0FFFFFFC0h
cmp ecx, 40h ; '@'
jz short loc_478F6
test ecx, ecx
setz cl
mov edx, eax
not edx
test dl, 3Fh
setnz dl
test cl, dl
jnz short loc_478F6
cmp eax, 0FFh
jnz short loc_478A9
jmp short loc_47941
loc_478F6:
cmp eax, 0FFh
jz short loc_47941
mov dword ptr [rbx+418h], 0
mov rax, [r14+2000h]
mov [rbx], rax
mov ecx, [r14+2028h]
add rcx, rax
mov [rbx], rcx
mov rdi, [r14+2018h]
movzx esi, word ptr [r14+2028h]
mov rdx, rbx
xor ecx, ecx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp translog_read_record_header_from_buffer
loc_47941:
mov qword ptr [rbx], 0
mov eax, 0FFFFFFFEh
jmp short loc_47954
loc_4794F:
mov eax, 0FFFFFFFFh
loc_47954:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long translog_read_next_record_header(long long a1, long long a2)
{
unsigned __int8 *v2; // rax
int v3; // eax
long long v4; // rax
*(_DWORD *)(a2 + 1048) = 0;
while ( !translog_get_next_chunk(a1) )
{
v2 = *(unsigned __int8 **)(a1 + 8216);
if ( v2 == (unsigned __int8 *)&end_of_log )
goto LABEL_10;
v3 = v2[*(unsigned int *)(a1 + 8232)];
if ( (v3 & 0xFFFFFFC0) == 0x40 || (~(_BYTE)v3 & 0x3F) != 0 && (v3 & 0xFFFFFFC0) == 0 )
{
if ( v3 != 255 )
{
*(_DWORD *)(a2 + 1048) = 0;
v4 = *(_QWORD *)(a1 + 0x2000);
*(_QWORD *)a2 = v4;
*(_QWORD *)a2 = v4 + *(unsigned int *)(a1 + 8232);
return translog_read_record_header_from_buffer(
*(_QWORD *)(a1 + 8216),
*(unsigned __int16 *)(a1 + 8232),
a2,
0LL);
}
LABEL_10:
*(_QWORD *)a2 = 0LL;
return 4294967294LL;
}
if ( v3 == 255 )
goto LABEL_10;
}
return 0xFFFFFFFFLL;
}
|
translog_read_next_record_header:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV dword ptr [RSI + 0x418],0x0
LEA R15,[0xcfe080]
LAB_001478a9:
MOV RDI,R14
CALL 0x00145fba
TEST AL,AL
JNZ 0x0014794f
MOV RAX,qword ptr [R14 + 0x2018]
CMP RAX,R15
JZ 0x00147941
MOV ECX,dword ptr [R14 + 0x2028]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV ECX,EAX
AND ECX,0xffffffc0
CMP ECX,0x40
JZ 0x001478f6
TEST ECX,ECX
SETZ CL
MOV EDX,EAX
NOT EDX
TEST DL,0x3f
SETNZ DL
TEST CL,DL
JNZ 0x001478f6
CMP EAX,0xff
JNZ 0x001478a9
JMP 0x00147941
LAB_001478f6:
CMP EAX,0xff
JZ 0x00147941
MOV dword ptr [RBX + 0x418],0x0
MOV RAX,qword ptr [R14 + 0x2000]
MOV qword ptr [RBX],RAX
MOV ECX,dword ptr [R14 + 0x2028]
ADD RCX,RAX
MOV qword ptr [RBX],RCX
MOV RDI,qword ptr [R14 + 0x2018]
MOVZX ESI,word ptr [R14 + 0x2028]
MOV RDX,RBX
XOR ECX,ECX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001472f8
LAB_00147941:
MOV qword ptr [RBX],0x0
MOV EAX,0xfffffffe
JMP 0x00147954
LAB_0014794f:
MOV EAX,0xffffffff
LAB_00147954:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 translog_read_next_record_header(long param_1,long *param_2)
{
byte bVar1;
long lVar2;
char cVar3;
int8 uVar4;
*(int4 *)(param_2 + 0x83) = 0;
while( true ) {
cVar3 = translog_get_next_chunk(param_1);
if (cVar3 != '\0') {
return 0xffffffff;
}
if (*(int1 **)(param_1 + 0x2018) == &end_of_log) goto LAB_00147941;
bVar1 = (*(int1 **)(param_1 + 0x2018))[*(uint *)(param_1 + 0x2028)];
if (((bVar1 & 0xc0) == 0x40) || ((bVar1 & 0xc0) == 0 && (~bVar1 & 0x3f) != 0)) break;
if (bVar1 == 0xff) {
LAB_00147941:
*param_2 = 0;
return 0xfffffffe;
}
}
if (bVar1 != 0xff) {
*(int4 *)(param_2 + 0x83) = 0;
lVar2 = *(long *)(param_1 + 0x2000);
*param_2 = lVar2;
*param_2 = (ulong)*(uint *)(param_1 + 0x2028) + lVar2;
uVar4 = translog_read_record_header_from_buffer
(*(int8 *)(param_1 + 0x2018),*(int2 *)(param_1 + 0x2028),param_2,0
);
return uVar4;
}
goto LAB_00147941;
}
|
|
61,262
|
my_time_init
|
eloqsql/mysys/my_getsystime.c
|
void my_time_init()
{
#ifdef _WIN32
compile_time_assert(sizeof(LARGE_INTEGER) ==
sizeof(query_performance_frequency));
QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency);
DBUG_ASSERT(query_performance_frequency);
#endif
}
|
O3
|
c
|
my_time_init:
pushq %rbp
movq %rsp, %rbp
popq %rbp
retq
|
my_time_init:
push rbp
mov rbp, rsp
pop rbp
retn
|
void my_time_init()
{
;
}
|
my_time_init:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
void my_time_init(void)
{
return;
}
|
|
61,263
|
mark_blocks_free
|
eloqsql/mysys/my_alloc.c
|
static inline void mark_blocks_free(MEM_ROOT* root)
{
reg1 USED_MEM *next;
reg2 USED_MEM **last;
/* iterate through (partially) free blocks, mark them free */
last= &root->free;
for (next= root->free; next; next= *(last= &next->next))
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Combine the free and the used list */
*last= next=root->used;
/* now go through the used blocks and mark them free */
for (; next; next= next->next)
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Now everything is set; Indicate that nothing is used anymore */
root->used= 0;
root->first_block_usage= 0;
root->block_num= 4;
}
|
O0
|
c
|
mark_blocks_free:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4310f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x430f8
jmp 0x430fa
jmp 0x430fc
jmp 0x430fe
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x430db
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x43152
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x4313f
jmp 0x43141
jmp 0x43143
jmp 0x43145
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x43122
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mark_blocks_free:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
loc_430DB:
cmp [rbp+var_10], 0
jz short loc_4310F
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_430F8:
jmp short $+2
loc_430FA:
jmp short $+2
loc_430FC:
jmp short $+2
loc_430FE:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_430DB
loc_4310F:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
mov [rbp+var_10], rcx
mov rax, [rbp+var_18]
mov [rax], rcx
loc_43122:
cmp [rbp+var_10], 0
jz short loc_43152
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_4313F:
jmp short $+2
loc_43141:
jmp short $+2
loc_43143:
jmp short $+2
loc_43145:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_43122
loc_43152:
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
pop rbp
retn
|
long long mark_blocks_free(long long a1)
{
long long result; // rax
_QWORD *v2; // [rsp+0h] [rbp-18h]
_QWORD *i; // [rsp+8h] [rbp-10h]
_QWORD *v4; // [rsp+8h] [rbp-10h]
v2 = (_QWORD *)a1;
for ( i = *(_QWORD **)a1; i; i = (_QWORD *)*i )
{
i[1] = i[2] - 24LL;
v2 = i;
}
v4 = *(_QWORD **)(a1 + 8);
*v2 = v4;
while ( v4 )
{
v4[1] = v4[2] - 24LL;
v4 = (_QWORD *)*v4;
}
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 44) = 0;
result = a1;
*(_DWORD *)(a1 + 40) = 4;
return result;
}
|
mark_blocks_free:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
LAB_001430db:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0014310f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001430f8
LAB_001430f8:
JMP 0x001430fa
LAB_001430fa:
JMP 0x001430fc
LAB_001430fc:
JMP 0x001430fe
LAB_001430fe:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001430db
LAB_0014310f:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_00143122:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00143152
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0014313f
LAB_0014313f:
JMP 0x00143141
LAB_00143141:
JMP 0x00143143
LAB_00143143:
JMP 0x00143145
LAB_00143145:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00143122
LAB_00143152:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
POP RBP
RET
|
void mark_blocks_free(int8 *param_1)
{
int8 *local_20;
int8 *local_18;
local_20 = param_1;
for (local_18 = (int8 *)*param_1; local_18 != (int8 *)0x0;
local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
local_20 = local_18;
}
local_18 = (int8 *)param_1[1];
*local_20 = local_18;
for (; local_18 != (int8 *)0x0; local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
}
param_1[1] = 0;
*(int4 *)((long)param_1 + 0x2c) = 0;
*(int4 *)(param_1 + 5) = 4;
return;
}
|
|
61,264
|
r3d_primitive_draw
|
r3d/src/details/r3d_primitives.c
|
void r3d_primitive_draw(r3d_primitive_t* primitive)
{
bool vaoEnabled = rlEnableVertexArray(primitive->vao);
if (!vaoEnabled) {
rlEnableVertexBuffer(primitive->vbo);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION, 3, RL_FLOAT, 0, 0, 0);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD, 2, RL_FLOAT, 0, 0, 0);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL, 3, RL_FLOAT, 0, 0, 0);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL);
rlEnableVertexBufferElement(primitive->ebo);
}
rlDrawVertexArrayElements(0, 36, 0);
if (vaoEnabled) {
rlDisableVertexArray();
}
else {
rlDisableVertexBuffer();
rlDisableVertexBufferElement();
}
}
|
O3
|
c
|
r3d_primitive_draw:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x1e385
testb %al, %al
je 0xd0bc9
xorl %edi, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0x1e3ea
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e3a5
movl 0x4(%rbx), %edi
callq 0x1e2b1
xorl %edi, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1e47f
xorl %edi, %edi
callq 0x1e3bd
movl $0x1, %edi
movl $0x2, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1e47f
movl $0x1, %edi
callq 0x1e3bd
movl $0x2, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1e47f
movl $0x2, %edi
callq 0x1e3bd
movl 0x8(%rbx), %edi
callq 0x1e2db
xorl %edi, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0x1e3ea
callq 0x1e2c6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e2f0
nop
|
r3d_primitive_draw:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov edi, [rdi]
call rlEnableVertexArray
test al, al
jz short loc_D0BC9
xor edi, edi
mov esi, 24h ; '$'
xor edx, edx
call rlDrawVertexArrayElements
add rsp, 8
pop rbx
pop rbp
jmp rlDisableVertexArray
loc_D0BC9:
mov edi, [rbx+4]
call rlEnableVertexBuffer
xor edi, edi
mov esi, 3
mov edx, 1406h
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call rlSetVertexAttribute
xor edi, edi
call rlEnableVertexAttribute
mov edi, 1
mov esi, 2
mov edx, 1406h
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call rlSetVertexAttribute
mov edi, 1
call rlEnableVertexAttribute
mov edi, 2
mov esi, 3
mov edx, 1406h
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call rlSetVertexAttribute
mov edi, 2
call rlEnableVertexAttribute
mov edi, [rbx+8]
call rlEnableVertexBufferElement
xor edi, edi
mov esi, 24h ; '$'
xor edx, edx
call rlDrawVertexArrayElements
call rlDisableVertexBuffer
add rsp, 8
pop rbx
pop rbp
jmp rlDisableVertexBufferElement
|
long long r3d_primitive_draw(unsigned int *a1)
{
if ( (unsigned __int8)rlEnableVertexArray(*a1) )
{
rlDrawVertexArrayElements(0, 36LL, 0LL);
return rlDisableVertexArray(0LL);
}
else
{
rlEnableVertexBuffer(a1[1]);
rlSetVertexAttribute(0LL, 3LL, 5126LL, 0LL, 0LL, 0);
rlEnableVertexAttribute(0LL);
rlSetVertexAttribute(1LL, 2LL, 5126LL, 0LL, 0LL, 0);
rlEnableVertexAttribute(1LL);
rlSetVertexAttribute(2LL, 3LL, 5126LL, 0LL, 0LL, 0);
rlEnableVertexAttribute(2LL);
rlEnableVertexBufferElement(a1[2]);
rlDrawVertexArrayElements(0, 36LL, 0LL);
rlDisableVertexBuffer(0LL);
return rlDisableVertexBufferElement();
}
}
|
r3d_primitive_draw:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDI,dword ptr [RDI]
CALL 0x0011e385
TEST AL,AL
JZ 0x001d0bc9
XOR EDI,EDI
MOV ESI,0x24
XOR EDX,EDX
CALL 0x0011e3ea
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0011e3a5
LAB_001d0bc9:
MOV EDI,dword ptr [RBX + 0x4]
CALL 0x0011e2b1
XOR EDI,EDI
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011e47f
XOR EDI,EDI
CALL 0x0011e3bd
MOV EDI,0x1
MOV ESI,0x2
MOV EDX,0x1406
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011e47f
MOV EDI,0x1
CALL 0x0011e3bd
MOV EDI,0x2
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011e47f
MOV EDI,0x2
CALL 0x0011e3bd
MOV EDI,dword ptr [RBX + 0x8]
CALL 0x0011e2db
XOR EDI,EDI
MOV ESI,0x24
XOR EDX,EDX
CALL 0x0011e3ea
CALL 0x0011e2c6
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0011e2f0
|
void r3d_primitive_draw(int4 *param_1)
{
char cVar1;
cVar1 = rlEnableVertexArray(*param_1);
if (cVar1 != '\0') {
rlDrawVertexArrayElements(0,0x24,0);
rlDisableVertexArray();
return;
}
rlEnableVertexBuffer(param_1[1]);
rlSetVertexAttribute(0,3,0x1406,0,0,0);
rlEnableVertexAttribute(0);
rlSetVertexAttribute(1,2,0x1406,0,0,0);
rlEnableVertexAttribute(1);
rlSetVertexAttribute(2,3,0x1406,0,0,0);
rlEnableVertexAttribute(2);
rlEnableVertexBufferElement(param_1[2]);
rlDrawVertexArrayElements(0,0x24,0);
rlDisableVertexBuffer();
rlDisableVertexBufferElement();
return;
}
|
|
61,265
|
host_get_block_hash
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
|
static evmc_bytes32 host_get_block_hash(void* context, int64_t number) {
evmone_context_t* ctx = (evmone_context_t*) context;
EVM_LOG("get_block_hash for block number: %zu", (size_t) number);
evmc_bytes32 result = {0};
// TODO: Implement block hash retrieval logic
debug_print_bytes32("get_block_hash result", &result);
return result;
}
|
O2
|
c
|
host_get_block_hash:
movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
retq
|
host_get_block_hash:
mov rax, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
retn
|
_OWORD * host_get_block_hash(_OWORD *a1)
{
_OWORD *result; // rax
result = a1;
a1[1] = 0LL;
*a1 = 0LL;
return result;
}
|
host_get_block_hash:
MOV RAX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
RET
|
int8 * host_get_block_hash(int8 *param_1)
{
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
return param_1;
}
|
|
61,266
|
host_get_block_hash
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
|
static evmc_bytes32 host_get_block_hash(void* context, int64_t number) {
evmone_context_t* ctx = (evmone_context_t*) context;
EVM_LOG("get_block_hash for block number: %zu", (size_t) number);
evmc_bytes32 result = {0};
// TODO: Implement block hash retrieval logic
debug_print_bytes32("get_block_hash result", &result);
return result;
}
|
O3
|
c
|
host_get_block_hash:
movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
retq
|
host_get_block_hash:
mov rax, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
retn
|
_OWORD * host_get_block_hash(_OWORD *a1)
{
_OWORD *result; // rax
result = a1;
a1[1] = 0LL;
*a1 = 0LL;
return result;
}
|
host_get_block_hash:
MOV RAX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
RET
|
int8 * host_get_block_hash(int8 *param_1)
{
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
return param_1;
}
|
|
61,267
|
ma_send
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
static ssize_t ma_send(my_socket socket, const uchar *buffer, size_t length, int flags)
{
ssize_t r;
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
struct sigaction act, oldact;
act.sa_handler= SIG_IGN;
sigaction(SIGPIPE, &act, &oldact);
#endif
do {
r = send(socket, (const char *)buffer, IF_WIN((int)length,length), flags);
}
while (r == -1 && IS_SOCKET_EINTR(socket_errno));
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
sigaction(SIGPIPE, &oldact, NULL);
#endif
return r;
}
|
O3
|
c
|
ma_send:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x4040, %ecx # imm = 0x4040
callq 0x39370
movq %rax, %r12
cmpq $-0x1, %rax
jne 0xa0371
callq 0x39a20
cmpl $0x4, (%rax)
je 0xa034b
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ma_send:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r15d, edi
loc_A034B:
mov edi, r15d
mov rsi, r14
mov rdx, rbx
mov ecx, 4040h
call _send
mov r12, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_A0371
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_A034B
loc_A0371:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ma_send(unsigned int a1, long long a2, long long a3)
{
long long v4; // r12
do
v4 = send(a1, a2, a3, 16448LL);
while ( v4 == -1 && *(_DWORD *)__errno_location(a1) == 4 );
return v4;
}
|
ma_send:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15D,EDI
LAB_001a034b:
MOV EDI,R15D
MOV RSI,R14
MOV RDX,RBX
MOV ECX,0x4040
CALL 0x00139370
MOV R12,RAX
CMP RAX,-0x1
JNZ 0x001a0371
CALL 0x00139a20
CMP dword ptr [RAX],0x4
JZ 0x001a034b
LAB_001a0371:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ssize_t ma_send(int param_1,void *param_2,size_t param_3)
{
ssize_t sVar1;
int *piVar2;
do {
sVar1 = send(param_1,param_2,param_3,0x4040);
if (sVar1 != -1) {
return sVar1;
}
piVar2 = __errno_location();
} while (*piVar2 == 4);
return -1;
}
|
|
61,268
|
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 (&) [7], 0>(char const (&) [7]) const
|
monkey531[P]llama/common/json.hpp
|
constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
}
|
O1
|
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 (&) [7], 0>(char const (&) [7]) const:
cmpb $0x1, (%rdi)
jne 0xc94da
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r12
movq (%r12), %r15
movq 0x8(%r12), %rax
cmpq %rax, %r15
je 0xc94e0
movq %rsi, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1b230
testl %eax, %eax
je 0xc94dd
addq $0x30, %r15
movq 0x8(%r12), %rax
cmpq %rax, %r15
jne 0xc94bb
jmp 0xc94e0
xorl %eax, %eax
retq
movq %r15, %rax
movq 0x8(%rbx), %rcx
cmpq 0x8(%rcx), %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_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_C94DA
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov r12, [rdi+8]
mov r15, [r12]
mov rax, [r12+8]
cmp r15, rax
jz short loc_C94E0
mov r14, rsi
loc_C94BB:
mov rdi, r15
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_C94DD
add r15, 30h ; '0'
mov rax, [r12+8]
cmp r15, rax
jnz short loc_C94BB
jmp short loc_C94E0
loc_C94DA:
xor eax, eax
retn
loc_C94DD:
mov rax, r15
loc_C94E0:
mov rcx, [rbx+8]
cmp rax, [rcx+8]
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_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // r15
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
v4 = v3;
}
return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x001c94da
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV R15,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP R15,RAX
JZ 0x001c94e0
MOV R14,RSI
LAB_001c94bb:
MOV RDI,R15
MOV RSI,R14
CALL 0x0011b230
TEST EAX,EAX
JZ 0x001c94dd
ADD R15,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP R15,RAX
JNZ 0x001c94bb
JMP 0x001c94e0
LAB_001c94da:
XOR EAX,EAX
RET
LAB_001c94dd:
MOV RAX,R15
LAB_001c94e0:
MOV RCX,qword ptr [RBX + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
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_IhSaIhEEvE8containsIRA9_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[1];
pcVar4 = (char *)*plVar1;
if ((char *)*plVar1 != pcVar3) {
do {
pcVar3 = pcVar4;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar4 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar4 != pcVar3);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != *(char **)(*(long *)(param_1 + 8) + 8));
}
|
|
61,269
|
lf_pinbox_get_pins
|
eloqsql/mysys/lf_alloc-pin.c
|
LF_PINS *lf_pinbox_get_pins(LF_PINBOX *pinbox)
{
uint32 pins, next, top_ver;
LF_PINS *el;
/*
We have an array of max. 64k elements.
The highest index currently allocated is pinbox->pins_in_array.
Freed elements are in a lifo stack, pinstack_top_ver.
pinstack_top_ver is 32 bits; 16 low bits are the index in the
array, to the first element of the list. 16 high bits are a version
(every time the 16 low bits are updated, the 16 high bits are
incremented). Versioning prevents the ABA problem.
*/
top_ver= pinbox->pinstack_top_ver;
do
{
if (!(pins= top_ver % LF_PINBOX_MAX_PINS))
{
/* the stack of free elements is empty */
pins= my_atomic_add32((int32 volatile*) &pinbox->pins_in_array, 1)+1;
if (unlikely(pins >= LF_PINBOX_MAX_PINS))
return 0;
/*
note that the first allocated element has index 1 (pins==1).
index 0 is reserved to mean "NULL pointer"
*/
el= (LF_PINS *)lf_dynarray_lvalue(&pinbox->pinarray, pins);
if (unlikely(!el))
return 0;
break;
}
el= (LF_PINS *)lf_dynarray_value(&pinbox->pinarray, pins);
next= el->link;
} while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver,
(int32*) &top_ver,
top_ver-pins+next+LF_PINBOX_MAX_PINS));
/*
set el->link to the index of el in the dynarray (el->link has two usages:
- if element is allocated, it's its own index
- if element is free, it's its next element in the free stack
*/
el->link= pins;
el->purgatory_count= 0;
el->pinbox= pinbox;
return el;
}
|
O3
|
c
|
lf_pinbox_get_pins:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x3c(%rdi), %r15d
movl %r15d, %r14d
andl $0xffff, %r14d # imm = 0xFFFF
je 0x30613
movq %rbx, %rdi
movl %r14d, %esi
callq 0xad3d0
movq %rax, %rcx
movl 0x34(%rax), %eax
movl %r15d, %edx
andl $0xffff0000, %edx # imm = 0xFFFF0000
addl %eax, %edx
addl $0x10000, %edx # imm = 0x10000
movl %r15d, %eax
lock
cmpxchgl %edx, 0x3c(%rbx)
movl %eax, %r15d
jne 0x305d6
jmp 0x3063c
pushq $0x1
popq %r14
lock
xaddl %r14d, 0x40(%rbx)
incl %r14d
cmpl $0xffff, %r14d # imm = 0xFFFF
ja 0x30656
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3065a
testq %rax, %rax
je 0x30656
movq %rax, %rcx
movl %r14d, 0x34(%rcx)
andl $0x0, 0x30(%rcx)
movq %rbx, 0x20(%rcx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
jmp 0x30648
|
lf_pinbox_get_pins:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r15d, [rdi+3Ch]
loc_305D6:
mov r14d, r15d
and r14d, 0FFFFh
jz short loc_30613
mov rdi, rbx
mov esi, r14d
call lf_dynarray_value
mov rcx, rax
mov eax, [rax+34h]
mov edx, r15d
and edx, 0FFFF0000h
add edx, eax
add edx, 10000h
mov eax, r15d
lock cmpxchg [rbx+3Ch], edx
mov r15d, eax
jnz short loc_305D6
jmp short loc_3063C
loc_30613:
push 1
pop r14
lock xadd [rbx+40h], r14d
inc r14d
cmp r14d, 0FFFFh
ja short loc_30656
mov rdi, rbx
mov esi, r14d
call lf_dynarray_lvalue
test rax, rax
jz short loc_30656
mov rcx, rax
loc_3063C:
mov [rcx+34h], r14d
and dword ptr [rcx+30h], 0
mov [rcx+20h], rbx
loc_30648:
mov rax, rcx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_30656:
xor ecx, ecx
jmp short loc_30648
|
long long lf_pinbox_get_pins(long long a1)
{
signed __int32 v1; // r15d
unsigned __int32 v2; // r14d
long long v3; // rcx
bool v4; // zf
signed __int32 v5; // eax
long long v6; // rax
v1 = *(_DWORD *)(a1 + 60);
while ( 1 )
{
v2 = (unsigned __int16)v1;
if ( !(_WORD)v1 )
break;
v3 = lf_dynarray_value(a1, (unsigned __int16)v1);
v5 = _InterlockedCompareExchange(
(volatile signed __int32 *)(a1 + 60),
*(_DWORD *)(v3 + 52) + (v1 & 0xFFFF0000) + 0x10000,
v1);
v4 = v1 == v5;
v1 = v5;
if ( v4 )
goto LABEL_8;
}
v2 = _InterlockedIncrement((volatile signed __int32 *)(a1 + 64));
if ( v2 <= 0xFFFF )
{
v6 = lf_dynarray_lvalue(a1, v2);
if ( v6 )
{
v3 = v6;
LABEL_8:
*(_DWORD *)(v3 + 52) = v2;
*(_DWORD *)(v3 + 48) = 0;
*(_QWORD *)(v3 + 32) = a1;
return v3;
}
}
return 0LL;
}
|
lf_pinbox_get_pins:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R15D,dword ptr [RDI + 0x3c]
LAB_001305d6:
MOV R14D,R15D
AND R14D,0xffff
JZ 0x00130613
MOV RDI,RBX
MOV ESI,R14D
CALL 0x001ad3d0
MOV RCX,RAX
MOV EAX,dword ptr [RAX + 0x34]
MOV EDX,R15D
AND EDX,0xffff0000
ADD EDX,EAX
ADD EDX,0x10000
MOV EAX,R15D
CMPXCHG.LOCK dword ptr [RBX + 0x3c],EDX
MOV R15D,EAX
JNZ 0x001305d6
JMP 0x0013063c
LAB_00130613:
PUSH 0x1
POP R14
XADD.LOCK dword ptr [RBX + 0x40],R14D
INC R14D
CMP R14D,0xffff
JA 0x00130656
MOV RDI,RBX
MOV ESI,R14D
CALL 0x0013065a
TEST RAX,RAX
JZ 0x00130656
MOV RCX,RAX
LAB_0013063c:
MOV dword ptr [RCX + 0x34],R14D
AND dword ptr [RCX + 0x30],0x0
MOV qword ptr [RCX + 0x20],RBX
LAB_00130648:
MOV RAX,RCX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00130656:
XOR ECX,ECX
JMP 0x00130648
|
long lf_pinbox_get_pins(long param_1)
{
int *piVar1;
uint uVar2;
int iVar3;
long lVar4;
uint uVar5;
uint uVar6;
bool bVar7;
uVar6 = *(uint *)(param_1 + 0x3c);
do {
uVar5 = uVar6 & 0xffff;
if (uVar5 == 0) {
LOCK();
piVar1 = (int *)(param_1 + 0x40);
iVar3 = *piVar1;
*piVar1 = *piVar1 + 1;
UNLOCK();
uVar5 = iVar3 + 1;
if ((0xffff < uVar5) || (lVar4 = lf_dynarray_lvalue(param_1,uVar5), lVar4 == 0)) {
return 0;
}
break;
}
lVar4 = lf_dynarray_value(param_1,uVar5);
LOCK();
uVar2 = *(uint *)(param_1 + 0x3c);
bVar7 = uVar6 == uVar2;
if (bVar7) {
*(uint *)(param_1 + 0x3c) = (uVar6 & 0xffff0000) + *(int *)(lVar4 + 0x34) + 0x10000;
uVar2 = uVar6;
}
uVar6 = uVar2;
UNLOCK();
} while (!bVar7);
*(uint *)(lVar4 + 0x34) = uVar5;
*(int4 *)(lVar4 + 0x30) = 0;
*(long *)(lVar4 + 0x20) = param_1;
return lVar4;
}
|
|
61,270
|
minja::ElifTemplateToken::~ElifTemplateToken()
|
monkey531[P]llama/common/./minja.hpp
|
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
|
O3
|
cpp
|
minja::ElifTemplateToken::~ElifTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x955e9(%rip), %rax # 0xeeb88
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x595b0
callq 0x2f80e
leaq 0x94c11(%rip), %rax # 0xee1c8
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x595c8
callq 0x2f80e
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x186a0
|
_ZN5minja17ElifTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, off_EEB88
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_595B0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_595B0:
lea rax, off_EE1C8
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_595C8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_595C8:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = off_EEB88;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = off_EE1C8;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
|
~ElifTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1eeb88]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x001595b0
CALL 0x0012f80e
LAB_001595b0:
LEA RAX,[0x1ee1c8]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001595c8
CALL 0x0012f80e
LAB_001595c8:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x001186a0
|
/* minja::ElifTemplateToken::~ElifTemplateToken() */
void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this)
{
*(int ***)this = &PTR__ElifTemplateToken_001eeb88;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001ee1c8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
|
|
61,271
|
find_typeset
|
eloqsql/mysys/typelib.c
|
my_ulonglong find_typeset(const char *x, TYPELIB *lib, int *err)
{
my_ulonglong result;
int find;
const char *i;
DBUG_ENTER("find_set");
DBUG_PRINT("enter",("x: '%s' lib: %p", x, lib));
if (!lib->count)
{
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
result= 0;
*err= 0;
while (*x)
{
(*err)++;
i= x;
while (*x && *x != ',')
x++;
if (x[0] && x[1]) /* skip separator if found */
x++;
if ((find= find_type(i, lib, FIND_TYPE_COMMA_TERM) - 1) < 0)
DBUG_RETURN(0);
result|= (1ULL << find);
}
*err= 0;
DBUG_RETURN(result);
}
|
O3
|
c
|
find_typeset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, (%rsi)
je 0x62a83
movq %rdi, %r13
movl $0x0, (%rdx)
cmpb $0x0, (%rdi)
je 0x62a88
movq %rsi, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rdx, -0x30(%rbp)
incl %r12d
movl %r12d, (%rdx)
leaq 0x1(%r13), %rax
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0x62a42
cmpl $0x2c, %ecx
je 0x62a35
incq %rax
jmp 0x62a23
leaq -0x1(%rax), %rbx
cmpb $0x0, (%rax)
cmovneq %rax, %rbx
jmp 0x62a48
decq %rax
movq %rax, %rbx
movq %r13, -0x38(%rbp)
movq %r13, %rdi
callq 0x28150
addq %rax, %r13
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
movl $0x8, %edx
movq %r13, %rcx
callq 0x62841
testl %eax, %eax
jle 0x62a83
decb %al
btsq %rax, %r15
cmpb $0x0, (%rbx)
movq %rbx, %r13
movq -0x30(%rbp), %rdx
jne 0x62a19
jmp 0x62a8b
xorl %r15d, %r15d
jmp 0x62a91
xorl %r15d, %r15d
movl $0x0, (%rdx)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
find_typeset:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp dword ptr [rsi], 0
jz loc_62A83
mov r13, rdi
mov dword ptr [rdx], 0
cmp byte ptr [rdi], 0
jz short loc_62A88
mov r14, rsi
xor r12d, r12d
xor r15d, r15d
mov [rbp+var_30], rdx
loc_62A19:
inc r12d
mov [rdx], r12d
lea rax, [r13+1]
loc_62A23:
movzx ecx, byte ptr [rax-1]
test ecx, ecx
jz short loc_62A42
cmp ecx, 2Ch ; ','
jz short loc_62A35
inc rax
jmp short loc_62A23
loc_62A35:
lea rbx, [rax-1]
cmp byte ptr [rax], 0
cmovnz rbx, rax
jmp short loc_62A48
loc_62A42:
dec rax
mov rbx, rax
loc_62A48:
mov [rbp+var_38], r13
mov rdi, r13
call _strlen
add r13, rax
lea rdi, [rbp+var_38]
mov rsi, r14
mov edx, 8
mov rcx, r13
call find_type_eol
test eax, eax
jle short loc_62A83
dec al
bts r15, rax
cmp byte ptr [rbx], 0
mov r13, rbx
mov rdx, [rbp+var_30]
jnz short loc_62A19
jmp short loc_62A8B
loc_62A83:
xor r15d, r15d
jmp short loc_62A91
loc_62A88:
xor r15d, r15d
loc_62A8B:
mov dword ptr [rdx], 0
loc_62A91:
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long find_typeset(_BYTE *a1, _DWORD *a2, _DWORD *a3)
{
_BYTE *v3; // r13
int v4; // r12d
long long v5; // r15
_BYTE *i; // rax
_BYTE *v7; // rbx
long long v8; // rax
int type_eol; // eax
_BYTE *v11; // [rsp+8h] [rbp-38h] BYREF
_DWORD *v12; // [rsp+10h] [rbp-30h]
if ( !*a2 )
return 0LL;
v3 = a1;
*a3 = 0;
if ( *a1 )
{
v4 = 0;
v5 = 0LL;
v12 = a3;
while ( 1 )
{
*a3 = ++v4;
for ( i = v3 + 1; ; ++i )
{
if ( !*(i - 1) )
{
v7 = i - 1;
goto LABEL_12;
}
if ( *(i - 1) == 44 )
break;
}
v7 = i - 1;
if ( *i )
v7 = i;
LABEL_12:
v11 = v3;
v8 = strlen(v3);
type_eol = find_type_eol(&v11, (long long)a2, 8, &v3[v8]);
if ( type_eol <= 0 )
return 0LL;
v5 |= 1LL << ((unsigned __int8)type_eol - 1);
v3 = v7;
a3 = v12;
if ( !*v7 )
goto LABEL_17;
}
}
v5 = 0LL;
LABEL_17:
*a3 = 0;
return v5;
}
|
find_typeset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP dword ptr [RSI],0x0
JZ 0x00162a83
MOV R13,RDI
MOV dword ptr [RDX],0x0
CMP byte ptr [RDI],0x0
JZ 0x00162a88
MOV R14,RSI
XOR R12D,R12D
XOR R15D,R15D
MOV qword ptr [RBP + -0x30],RDX
LAB_00162a19:
INC R12D
MOV dword ptr [RDX],R12D
LEA RAX,[R13 + 0x1]
LAB_00162a23:
MOVZX ECX,byte ptr [RAX + -0x1]
TEST ECX,ECX
JZ 0x00162a42
CMP ECX,0x2c
JZ 0x00162a35
INC RAX
JMP 0x00162a23
LAB_00162a35:
LEA RBX,[RAX + -0x1]
CMP byte ptr [RAX],0x0
CMOVNZ RBX,RAX
JMP 0x00162a48
LAB_00162a42:
DEC RAX
MOV RBX,RAX
LAB_00162a48:
MOV qword ptr [RBP + -0x38],R13
MOV RDI,R13
CALL 0x00128150
ADD R13,RAX
LEA RDI,[RBP + -0x38]
MOV RSI,R14
MOV EDX,0x8
MOV RCX,R13
CALL 0x00162841
TEST EAX,EAX
JLE 0x00162a83
DEC AL
BTS R15,RAX
CMP byte ptr [RBX],0x0
MOV R13,RBX
MOV RDX,qword ptr [RBP + -0x30]
JNZ 0x00162a19
JMP 0x00162a8b
LAB_00162a83:
XOR R15D,R15D
JMP 0x00162a91
LAB_00162a88:
XOR R15D,R15D
LAB_00162a8b:
MOV dword ptr [RDX],0x0
LAB_00162a91:
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong find_typeset(char *param_1,int *param_2,int *param_3)
{
int iVar1;
char *pcVar2;
size_t sVar3;
char *pcVar4;
int iVar5;
ulong uVar6;
char *local_40;
int *local_38;
if (*param_2 == 0) {
LAB_00162a83:
uVar6 = 0;
}
else {
*param_3 = 0;
if (*param_1 == '\0') {
uVar6 = 0;
}
else {
iVar5 = 0;
uVar6 = 0;
local_38 = param_3;
do {
iVar5 = iVar5 + 1;
*local_38 = iVar5;
pcVar2 = param_1;
do {
pcVar4 = pcVar2;
pcVar2 = pcVar4 + 1;
if (*pcVar4 == '\0') goto LAB_00162a48;
} while (*pcVar4 != ',');
if (*pcVar2 != '\0') {
pcVar4 = pcVar2;
}
LAB_00162a48:
local_40 = param_1;
sVar3 = strlen(param_1);
iVar1 = find_type_eol(&local_40,param_2,8,param_1 + sVar3);
if (iVar1 < 1) goto LAB_00162a83;
uVar6 = uVar6 | 1L << ((ulong)(byte)((char)iVar1 - 1) & 0x3f);
param_3 = local_38;
param_1 = pcVar4;
} while (*pcVar4 != '\0');
}
*param_3 = 0;
}
return uVar6;
}
|
|
61,272
|
testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(unsigned int const&)
|
yoga-mod/tests/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
|
static Bits SignAndMagnitudeToBiased(const Bits& sam) {
if (kSignBitMask & sam) {
// sam represents a negative number.
return ~sam + 1;
} else {
// sam represents a positive number.
return kSignBitMask | sam;
}
}
|
O0
|
c
|
testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(unsigned int const&):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x9ba59
movq -0x10(%rbp), %rax
movl (%rax), %eax
xorl $-0x1, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9ba67
movq -0x10(%rbp), %rax
movl (%rax), %eax
orl $0x80000000, %eax # imm = 0x80000000
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
_ZN7testing8internal13FloatingPointIfE24SignAndMagnitudeToBiasedERKj:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_9BA59
mov rax, [rbp+var_10]
mov eax, [rax]
xor eax, 0FFFFFFFFh
add eax, 1
mov [rbp+var_4], eax
jmp short loc_9BA67
loc_9BA59:
mov rax, [rbp+var_10]
mov eax, [rax]
or eax, 80000000h
mov [rbp+var_4], eax
loc_9BA67:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(int *a1)
{
if ( *a1 >= 0 )
return *a1 | 0x80000000;
else
return (unsigned int)-*a1;
}
|
SignAndMagnitudeToBiased:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0019ba59
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
XOR EAX,0xffffffff
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0019ba67
LAB_0019ba59:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
OR EAX,0x80000000
MOV dword ptr [RBP + -0x4],EAX
LAB_0019ba67:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
/* testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(unsigned int const&) */
uint testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(uint *param_1)
{
int4 local_c;
if ((*param_1 & 0x80000000) == 0) {
local_c = *param_1 | 0x80000000;
}
else {
local_c = (*param_1 ^ 0xffffffff) + 1;
}
return local_c;
}
|
|
61,273
|
string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&)
|
llama.cpp/common/common.cpp
|
std::string string_from(const struct llama_context * ctx, const std::vector<llama_token> & tokens) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (const auto & token : tokens) {
if (!first) {
buf << ", ";
} else {
first = false;
}
auto detokenized = common_token_to_piece(ctx, token);
detokenized.erase(
std::remove_if(
detokenized.begin(),
detokenized.end(),
[](const unsigned char c) { return !std::isprint(c); }),
detokenized.end());
buf << "'" << detokenized << "'"
<< ":" << std::to_string(token);
}
buf << " ]";
return buf.str();
}
|
O3
|
cpp
|
string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
movq %rdx, %rbx
movq %rsi, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1d3f0
leaq 0x70(%rsp), %r14
leaq 0x27001(%rip), %rsi # 0xd8e04
movl $0x2, %edx
movq %r14, %rdi
callq 0x1ddc0
movq (%rbx), %r13
movq 0x8(%rbx), %rax
movq %rax, 0x50(%rsp)
cmpq %rax, %r13
je 0xb20dd
movb $0x1, %al
testb $0x1, %al
jne 0xb1e3f
movl $0x2, %edx
movq %r14, %rdi
leaq 0x276cc(%rip), %rsi # 0xd9506
callq 0x1ddc0
movl (%r13), %ebx
movq 0x58(%rsp), %rdi
callq 0x1db00
movq %rax, %rdi
callq 0x1deb0
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movl %ebx, %edx
movl $0x1, %ecx
callq 0xb4ec3
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %rax
leaq (%r15,%rax), %rbx
movq %rax, %r14
sarq $0x2, %r14
movq %r15, %rbp
testq %r14, %r14
jle 0xb1ee7
andq $-0x4, %rax
movq %rax, %rbp
addq %r15, %rbp
incq %r14
leaq 0x3(%r15), %r12
movzbl -0x3(%r12), %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f3c
movzbl -0x2(%r12), %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f42
movzbl -0x1(%r12), %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f48
movzbl (%r12), %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f4b
decq %r14
addq $0x4, %r12
cmpq $0x1, %r14
jg 0xb1e97
movq %rbx, %rax
subq %rbp, %rax
cmpq $0x1, %rax
je 0xb1f28
cmpq $0x2, %rax
leaq 0x70(%rsp), %r14
je 0xb1f18
cmpq $0x3, %rax
jne 0xb20d5
movzbl (%rbp), %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f37
incq %rbp
movzbl (%rbp), %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f37
incq %rbp
movzbl (%rbp), %edi
callq 0x1d870
testl %eax, %eax
cmovneq %rbx, %rbp
movq %rbp, %r12
jmp 0xb1f4b
addq $-0x3, %r12
jmp 0xb1f4b
addq $-0x2, %r12
jmp 0xb1f4b
decq %r12
cmpq %rbx, %r12
sete %al
leaq 0x1(%r12), %r14
cmpq %rbx, %r14
sete %cl
orb %al, %cl
jne 0xb1f84
movb (%r14), %bpl
movzbl %bpl, %edi
callq 0x1d870
testl %eax, %eax
je 0xb1f77
movb %bpl, (%r12)
incq %r12
incq %r14
cmpq %rbx, %r14
jne 0xb1f60
movq 0x8(%rsp), %r15
leaq 0x70(%rsp), %r14
movq %r12, %rax
subq %r15, %rax
movq %rax, 0x10(%rsp)
movb $0x0, (%r12)
movl $0x1, %edx
movq %r14, %rdi
leaq 0x18e04(%rip), %rsi # 0xcadac
callq 0x1ddc0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x1ddc0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x18ddb(%rip), %rsi # 0xcadac
callq 0x1ddc0
movl $0x1, %edx
movq %r12, %rdi
leaq 0x22abc(%rip), %rsi # 0xd4aa1
callq 0x1ddc0
movl (%r13), %ebp
movl %ebp, %ebx
negl %ebx
cmovsl %ebp, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0xb2046
movl $0x4, %r15d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0xb203d
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0xb2043
cmpl $0x2710, %eax # imm = 0x2710
jb 0xb2046
movl %eax, %ecx
movl $0xd1b71759, %edx # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0xb2008
addl $-0x3, %r15d
jmp 0xb2046
addl $-0x2, %r15d
jmp 0xb2046
decl %r15d
shrl $0x1f, %ebp
leal (%r15,%rbp), %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x1d820
addq 0x28(%rsp), %rbp
movq %rbp, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x26e80
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x1ddc0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xb20a6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1d160
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xb20c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d160
addq $0x4, %r13
xorl %eax, %eax
cmpq 0x50(%rsp), %r13
jne 0xb1e27
jmp 0xb20dd
movq %rbx, %r12
jmp 0xb1f89
leaq 0x26d23(%rip), %rsi # 0xd8e07
movl $0x2, %edx
movq %r14, %rdi
callq 0x1ddc0
movq 0x48(%rsp), %rbx
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d530
movq 0x58e96(%rip), %rsi # 0x10afa0
leaq 0x60(%rsp), %rdi
callq 0x1da70
leaq 0xe0(%rsp), %rdi
callq 0x1d9f0
movq %rbx, %rax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb2165
jmp 0xb2165
jmp 0xb2165
movq %rax, %rdi
callq 0x232f3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xb216d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1d160
jmp 0xb216d
movq %rax, %rbx
jmp 0xb2189
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xb2189
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d160
movq 0x58e10(%rip), %rsi # 0x10afa0
leaq 0x60(%rsp), %rdi
callq 0x1da70
leaq 0xe0(%rsp), %rdi
callq 0x1d9f0
movq %rbx, %rdi
callq 0x1d8e0
|
_Z11string_fromB5cxx11PK13llama_contextRKSt6vectorIiSaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1E8h
mov rbx, rdx
mov [rsp+218h+var_1C0], rsi
mov [rsp+218h+var_1D0], rdi
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r14, [rsp+218h+var_1A8]
lea rsi, asc_D8E04; "[ "
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r13, [rbx]
mov rax, [rbx+8]
mov [rsp+218h+var_1C8], rax
cmp r13, rax
jz loc_B20DD
mov al, 1
loc_B1E27:
test al, 1
jnz short loc_B1E3F
mov edx, 2
mov rdi, r14
lea rsi, aZuD+6; ", "
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_B1E3F:
mov ebx, [r13+0]
mov rdi, [rsp+218h+var_1C0]
call _llama_get_model
mov rdi, rax
call _llama_model_get_vocab
lea rdi, [rsp+218h+var_210]
mov rsi, rax
mov edx, ebx
mov ecx, 1
call _Z21common_token_to_pieceB5cxx11PK11llama_vocabib; common_token_to_piece(llama_vocab const*,int,bool)
mov r15, [rsp+218h+var_210]
mov rax, [rsp+218h+var_208]
lea rbx, [r15+rax]
mov r14, rax
sar r14, 2
mov rbp, r15
test r14, r14
jle short loc_B1EE7
and rax, 0FFFFFFFFFFFFFFFCh
mov rbp, rax
add rbp, r15
inc r14
lea r12, [r15+3]
loc_B1E97:
movzx edi, byte ptr [r12-3]
call _isprint
test eax, eax
jz loc_B1F3C
movzx edi, byte ptr [r12-2]
call _isprint
test eax, eax
jz loc_B1F42
movzx edi, byte ptr [r12-1]
call _isprint
test eax, eax
jz short loc_B1F48
movzx edi, byte ptr [r12]
call _isprint
test eax, eax
jz short loc_B1F4B
dec r14
add r12, 4
cmp r14, 1
jg short loc_B1E97
loc_B1EE7:
mov rax, rbx
sub rax, rbp
cmp rax, 1
jz short loc_B1F28
cmp rax, 2
lea r14, [rsp+218h+var_1A8]
jz short loc_B1F18
cmp rax, 3
jnz loc_B20D5
movzx edi, byte ptr [rbp+0]
call _isprint
test eax, eax
jz short loc_B1F37
inc rbp
loc_B1F18:
movzx edi, byte ptr [rbp+0]
call _isprint
test eax, eax
jz short loc_B1F37
inc rbp
loc_B1F28:
movzx edi, byte ptr [rbp+0]
call _isprint
test eax, eax
cmovnz rbp, rbx
loc_B1F37:
mov r12, rbp
jmp short loc_B1F4B
loc_B1F3C:
add r12, 0FFFFFFFFFFFFFFFDh
jmp short loc_B1F4B
loc_B1F42:
add r12, 0FFFFFFFFFFFFFFFEh
jmp short loc_B1F4B
loc_B1F48:
dec r12
loc_B1F4B:
cmp r12, rbx
setz al
lea r14, [r12+1]
cmp r14, rbx
setz cl
or cl, al
jnz short loc_B1F84
loc_B1F60:
mov bpl, [r14]
movzx edi, bpl
call _isprint
test eax, eax
jz short loc_B1F77
mov [r12], bpl
inc r12
loc_B1F77:
inc r14
cmp r14, rbx
jnz short loc_B1F60
mov r15, [rsp+218h+var_210]
loc_B1F84:
lea r14, [rsp+218h+var_1A8]
loc_B1F89:
mov rax, r12
sub rax, r15
mov [rsp+218h+var_208], rax
mov byte ptr [r12], 0
mov edx, 1
mov rdi, r14
lea rsi, aLastRead+0Dh; "'"
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, [rsp+218h+var_210]
mov rdx, [rsp+218h+var_208]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
mov edx, 1
mov rdi, rax
lea rsi, aLastRead+0Dh; "'"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, r12
lea rsi, aArgumentNeedle_0+11h; ":"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov ebp, [r13+0]
mov ebx, ebp
neg ebx
cmovs ebx, ebp
mov r15d, 1
cmp ebx, 0Ah
jb short loc_B2046
mov r15d, 4
mov eax, ebx
loc_B2008:
cmp eax, 63h ; 'c'
jbe short loc_B203D
cmp eax, 3E7h
jbe short loc_B2043
cmp eax, 2710h
jb short loc_B2046
mov ecx, eax
mov edx, 0D1B71759h
imul rcx, rdx
shr rcx, 2Dh
add r15d, 4
cmp eax, 1869Fh
mov eax, ecx
ja short loc_B2008
add r15d, 0FFFFFFFDh
jmp short loc_B2046
loc_B203D:
add r15d, 0FFFFFFFEh
jmp short loc_B2046
loc_B2043:
dec r15d
loc_B2046:
shr ebp, 1Fh
lea esi, [r15+rbp]
lea rax, [rsp+218h+var_1E0]
mov [rsp+218h+var_1F0], rax
lea rdi, [rsp+218h+var_1F0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add rbp, [rsp+218h+var_1F0]
mov rdi, rbp
mov esi, r15d
mov edx, ebx
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rsp+218h+var_1F0]
mov rdx, [rsp+218h+var_1E8]
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 rdi, [rsp+218h+var_1F0]; void *
lea rax, [rsp+218h+var_1E0]
cmp rdi, rax
jz short loc_B20A6
mov rsi, [rsp+218h+var_1E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B20A6:
mov rdi, [rsp+218h+var_210]; void *
lea rax, [rsp+218h+var_200]
cmp rdi, rax
jz short loc_B20C2
mov rsi, [rsp+218h+var_200]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B20C2:
add r13, 4
xor eax, eax
cmp r13, [rsp+218h+var_1C8]
jnz loc_B1E27
jmp short loc_B20DD
loc_B20D5:
mov r12, rbx
jmp loc_B1F89
loc_B20DD:
lea rsi, asc_D8E07; " ]"
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+218h+var_1D0]
lea rsi, [rsp+218h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+218h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_B2165
jmp short loc_B2165
jmp short loc_B2165
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+218h+var_1F0]; void *
lea rax, [rsp+218h+var_1E0]
cmp rdi, rax
jz short loc_B216D
mov rsi, [rsp+218h+var_1E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B216D
loc_B2165:
mov rbx, rax
jmp short loc_B2189
mov rbx, rax
loc_B216D:
mov rdi, [rsp+218h+var_210]; void *
lea rax, [rsp+218h+var_200]
cmp rdi, rax
jz short loc_B2189
mov rsi, [rsp+218h+var_200]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B2189:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+218h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long string_from[abi:cxx11](long long a1, long long a2, unsigned int **a3)
{
unsigned int *v4; // r13
char v5; // al
unsigned int v6; // ebx
long long model; // rax
long long vocab; // rsi
_BYTE *v9; // r15
char *v10; // rbx
char *v11; // rbp
long long v12; // r14
char *v13; // r12
signed long long v14; // rax
char *v15; // r14
char v16; // bp
long long v17; // r12
unsigned int v18; // ebx
int v19; // r15d
unsigned int v20; // eax
bool v21; // cc
unsigned int v22; // ebp
long long v23; // rbx
void *v25; // [rsp+8h] [rbp-210h] BYREF
long long v26; // [rsp+10h] [rbp-208h]
long long v27; // [rsp+18h] [rbp-200h] BYREF
void *v28[2]; // [rsp+28h] [rbp-1F0h] BYREF
_QWORD v29[2]; // [rsp+38h] [rbp-1E0h] BYREF
long long v30; // [rsp+48h] [rbp-1D0h]
unsigned int *v31; // [rsp+50h] [rbp-1C8h]
long long v32; // [rsp+58h] [rbp-1C0h]
_BYTE v33[16]; // [rsp+60h] [rbp-1B8h] BYREF
char v34[8]; // [rsp+70h] [rbp-1A8h] BYREF
char v35[104]; // [rsp+78h] [rbp-1A0h] BYREF
char v36[312]; // [rsp+E0h] [rbp-138h] BYREF
v32 = a2;
v30 = a1;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v33);
std::__ostream_insert<char,std::char_traits<char>>(v34, "[ ", 2LL);
v4 = *a3;
v31 = a3[1];
if ( v4 != v31 )
{
v5 = 1;
while ( 1 )
{
if ( (v5 & 1) == 0 )
std::__ostream_insert<char,std::char_traits<char>>(v34, ", ", 2LL);
v6 = *v4;
model = llama_get_model(v32);
vocab = llama_model_get_vocab(model);
common_token_to_piece[abi:cxx11](&v25, vocab, v6, 1LL);
v9 = v25;
v10 = (char *)v25 + v26;
v11 = (char *)v25;
if ( v26 >> 2 > 0 )
break;
LABEL_12:
v14 = v10 - v11;
if ( v10 - v11 == 1 )
goto LABEL_19;
if ( v14 == 2 )
goto LABEL_17;
if ( v14 == 3 )
{
if ( (unsigned int)isprint((unsigned __int8)*v11) )
{
++v11;
LABEL_17:
if ( (unsigned int)isprint((unsigned __int8)*v11) )
{
++v11;
LABEL_19:
if ( (unsigned int)isprint((unsigned __int8)*v11) )
v11 = v10;
}
}
v13 = v11;
LABEL_25:
v15 = v13 + 1;
if ( v13 != v10 && v13 + 1 != v10 )
{
do
{
v16 = *v15;
if ( (unsigned int)isprint((unsigned __int8)*v15) )
*v13++ = v16;
++v15;
}
while ( v15 != v10 );
v9 = v25;
}
goto LABEL_30;
}
v13 = v10;
LABEL_30:
v26 = v13 - v9;
*v13 = 0;
std::__ostream_insert<char,std::char_traits<char>>(v34, "'", 1LL);
v17 = std::__ostream_insert<char,std::char_traits<char>>(v34, v25, v26);
std::__ostream_insert<char,std::char_traits<char>>(v17, "'", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v17, ":", 1LL);
v18 = -*v4;
if ( (int)*v4 > 0 )
v18 = *v4;
v19 = 1;
if ( v18 >= 0xA )
{
v19 = 4;
v20 = v18;
while ( 1 )
{
if ( v20 <= 0x63 )
{
v19 -= 2;
goto LABEL_41;
}
if ( v20 <= 0x3E7 )
break;
if ( v20 < 0x2710 )
goto LABEL_41;
v19 += 4;
v21 = v20 <= 0x1869F;
v20 /= 0x2710u;
if ( v21 )
{
v19 -= 3;
goto LABEL_41;
}
}
--v19;
}
LABEL_41:
v22 = *v4 >> 31;
v28[0] = v29;
std::string::_M_construct(v28, v19 + v22, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v28[0] + v22, v19, v18);
std::__ostream_insert<char,std::char_traits<char>>(v17, v28[0], v28[1]);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
++v4;
v5 = 0;
if ( v4 == v31 )
goto LABEL_48;
}
v11 = (char *)v25 + (v26 & 0xFFFFFFFFFFFFFFFCLL);
v12 = (v26 >> 2) + 1;
v13 = (char *)v25 + 3;
while ( 1 )
{
if ( !(unsigned int)isprint((unsigned __int8)*(v13 - 3)) )
{
v13 -= 3;
goto LABEL_25;
}
if ( !(unsigned int)isprint((unsigned __int8)*(v13 - 2)) )
{
v13 -= 2;
goto LABEL_25;
}
if ( !(unsigned int)isprint((unsigned __int8)*(v13 - 1)) )
break;
if ( !(unsigned int)isprint((unsigned __int8)*v13) )
goto LABEL_25;
--v12;
v13 += 4;
if ( v12 <= 1 )
goto LABEL_12;
}
--v13;
goto LABEL_25;
}
LABEL_48:
std::__ostream_insert<char,std::char_traits<char>>(v34, " ]", 2LL);
v23 = v30;
std::stringbuf::str(v30, v35);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v33,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v36);
return v23;
}
|
string_from[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1e8
MOV RBX,RDX
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x48],RDI
LEA RDI,[RSP + 0x60]
CALL 0x0011d3f0
LEA R14,[RSP + 0x70]
LAB_001b1dfc:
LEA RSI,[0x1d8e04]
MOV EDX,0x2
MOV RDI,R14
CALL 0x0011ddc0
MOV R13,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x50],RAX
CMP R13,RAX
JZ 0x001b20dd
MOV AL,0x1
LAB_001b1e27:
TEST AL,0x1
JNZ 0x001b1e3f
LAB_001b1e2b:
MOV EDX,0x2
MOV RDI,R14
LEA RSI,[0x1d9506]
CALL 0x0011ddc0
LAB_001b1e3f:
MOV EBX,dword ptr [R13]
LAB_001b1e43:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0011db00
MOV RDI,RAX
CALL 0x0011deb0
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
MOV EDX,EBX
MOV ECX,0x1
CALL 0x001b4ec3
MOV R15,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
LEA RBX,[R15 + RAX*0x1]
MOV R14,RAX
SAR R14,0x2
MOV RBP,R15
TEST R14,R14
JLE 0x001b1ee7
AND RAX,-0x4
MOV RBP,RAX
ADD RBP,R15
INC R14
LEA R12,[R15 + 0x3]
LAB_001b1e97:
MOVZX EDI,byte ptr [R12 + -0x3]
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f3c
MOVZX EDI,byte ptr [R12 + -0x2]
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f42
MOVZX EDI,byte ptr [R12 + -0x1]
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f48
MOVZX EDI,byte ptr [R12]
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f4b
DEC R14
ADD R12,0x4
CMP R14,0x1
JG 0x001b1e97
LAB_001b1ee7:
MOV RAX,RBX
SUB RAX,RBP
CMP RAX,0x1
JZ 0x001b1f28
CMP RAX,0x2
LEA R14,[RSP + 0x70]
JZ 0x001b1f18
CMP RAX,0x3
JNZ 0x001b20d5
MOVZX EDI,byte ptr [RBP]
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f37
INC RBP
LAB_001b1f18:
MOVZX EDI,byte ptr [RBP]
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f37
INC RBP
LAB_001b1f28:
MOVZX EDI,byte ptr [RBP]
CALL 0x0011d870
TEST EAX,EAX
CMOVNZ RBP,RBX
LAB_001b1f37:
MOV R12,RBP
JMP 0x001b1f4b
LAB_001b1f3c:
ADD R12,-0x3
JMP 0x001b1f4b
LAB_001b1f42:
ADD R12,-0x2
JMP 0x001b1f4b
LAB_001b1f48:
DEC R12
LAB_001b1f4b:
CMP R12,RBX
SETZ AL
LEA R14,[R12 + 0x1]
CMP R14,RBX
SETZ CL
OR CL,AL
JNZ 0x001b1f84
LAB_001b1f60:
MOV BPL,byte ptr [R14]
MOVZX EDI,BPL
CALL 0x0011d870
TEST EAX,EAX
JZ 0x001b1f77
MOV byte ptr [R12],BPL
INC R12
LAB_001b1f77:
INC R14
CMP R14,RBX
JNZ 0x001b1f60
MOV R15,qword ptr [RSP + 0x8]
LAB_001b1f84:
LEA R14,[RSP + 0x70]
LAB_001b1f89:
MOV RAX,R12
SUB RAX,R15
MOV qword ptr [RSP + 0x10],RAX
MOV byte ptr [R12],0x0
LAB_001b1f99:
MOV EDX,0x1
MOV RDI,R14
LEA RSI,[0x1cadac]
CALL 0x0011ddc0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0011ddc0
MOV R12,RAX
MOV EDX,0x1
MOV RDI,RAX
LEA RSI,[0x1cadac]
CALL 0x0011ddc0
MOV EDX,0x1
MOV RDI,R12
LEA RSI,[0x1d4aa1]
CALL 0x0011ddc0
MOV EBP,dword ptr [R13]
MOV EBX,EBP
NEG EBX
CMOVS EBX,EBP
MOV R15D,0x1
CMP EBX,0xa
JC 0x001b2046
MOV R15D,0x4
MOV EAX,EBX
LAB_001b2008:
CMP EAX,0x63
JBE 0x001b203d
CMP EAX,0x3e7
JBE 0x001b2043
CMP EAX,0x2710
JC 0x001b2046
MOV ECX,EAX
MOV EDX,0xd1b71759
IMUL RCX,RDX
SHR RCX,0x2d
ADD R15D,0x4
CMP EAX,0x1869f
MOV EAX,ECX
JA 0x001b2008
ADD R15D,-0x3
JMP 0x001b2046
LAB_001b203d:
ADD R15D,-0x2
JMP 0x001b2046
LAB_001b2043:
DEC R15D
LAB_001b2046:
SHR EBP,0x1f
LEA ESI,[R15 + RBP*0x1]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LAB_001b2057:
LEA RDI,[RSP + 0x28]
MOV EDX,0x2d
CALL 0x0011d820
ADD RBP,qword ptr [RSP + 0x28]
MOV RDI,RBP
MOV ESI,R15D
MOV EDX,EBX
CALL 0x00126e80
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_001b2082:
MOV RDI,R12
CALL 0x0011ddc0
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x001b20a6
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011d160
LAB_001b20a6:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001b20c2
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011d160
LAB_001b20c2:
ADD R13,0x4
XOR EAX,EAX
CMP R13,qword ptr [RSP + 0x50]
JNZ 0x001b1e27
JMP 0x001b20dd
LAB_001b20d5:
MOV R12,RBX
JMP 0x001b1f89
LAB_001b20dd:
LEA RSI,[0x1d8e07]
MOV EDX,0x2
MOV RDI,R14
CALL 0x0011ddc0
MOV RBX,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x78]
MOV RDI,RBX
CALL 0x0011d530
LAB_001b2103:
MOV RSI,qword ptr [0x0020afa0]
LEA RDI,[RSP + 0x60]
CALL 0x0011da70
LEA RDI,[RSP + 0xe0]
CALL 0x0011d9f0
MOV RAX,RBX
ADD RSP,0x1e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int> > const&) */
llama_context * string_from_abi_cxx11_(llama_context *param_1,vector *param_2)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
uint uVar4;
llama_context *plVar5;
uint uVar6;
bool bVar7;
int iVar8;
uint uVar9;
int8 uVar10;
ostream *poVar11;
ulong uVar12;
int8 *in_RDX;
byte *pbVar13;
byte *pbVar14;
uint *puVar15;
long lVar16;
uint uVar17;
byte *pbVar18;
byte *local_210;
ulong local_208;
long local_200 [2];
long *local_1f0;
long local_1e8;
long local_1e0 [2];
llama_context *local_1d0;
uint *local_1c8;
vector *local_1c0;
stringstream local_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
local_1d0 = param_1;
local_1c0 = param_2;
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 001b1dfc to 001b1e0f has its CatchHandler @ 001b2136 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2);
puVar15 = (uint *)*in_RDX;
local_1c8 = (uint *)in_RDX[1];
if (puVar15 != local_1c8) {
bVar7 = true;
do {
if (!bVar7) {
/* try { // try from 001b1e2b to 001b1e3e has its CatchHandler @ 001b213a */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2);
}
uVar3 = *puVar15;
/* try { // try from 001b1e43 to 001b1e68 has its CatchHandler @ 001b2165 */
uVar10 = llama_get_model(local_1c0);
iVar8 = llama_model_get_vocab(uVar10);
common_token_to_piece_abi_cxx11_((llama_vocab *)&local_210,iVar8,SUB41(uVar3,0));
pbVar18 = local_210;
pbVar1 = local_210 + local_208;
pbVar13 = local_210;
if (0 < (long)local_208 >> 2) {
pbVar13 = local_210 + (local_208 & 0xfffffffffffffffc);
lVar16 = ((long)local_208 >> 2) + 1;
pbVar14 = local_210 + 3;
do {
iVar8 = isprint((uint)pbVar14[-3]);
if (iVar8 == 0) {
pbVar14 = pbVar14 + -3;
goto LAB_001b1f4b;
}
iVar8 = isprint((uint)pbVar14[-2]);
if (iVar8 == 0) {
pbVar14 = pbVar14 + -2;
goto LAB_001b1f4b;
}
iVar8 = isprint((uint)pbVar14[-1]);
if (iVar8 == 0) {
pbVar14 = pbVar14 + -1;
goto LAB_001b1f4b;
}
iVar8 = isprint((uint)*pbVar14);
if (iVar8 == 0) goto LAB_001b1f4b;
lVar16 = lVar16 + -1;
pbVar14 = pbVar14 + 4;
} while (1 < lVar16);
}
lVar16 = (long)pbVar1 - (long)pbVar13;
if (lVar16 == 1) {
LAB_001b1f28:
iVar8 = isprint((uint)*pbVar13);
pbVar14 = pbVar13;
if (iVar8 != 0) {
pbVar14 = pbVar1;
}
LAB_001b1f4b:
pbVar13 = pbVar14 + 1;
if (pbVar13 != pbVar1 && pbVar14 != pbVar1) {
do {
bVar2 = *pbVar13;
iVar8 = isprint((uint)bVar2);
if (iVar8 != 0) {
*pbVar14 = bVar2;
pbVar14 = pbVar14 + 1;
}
pbVar13 = pbVar13 + 1;
pbVar18 = local_210;
} while (pbVar13 != pbVar1);
}
}
else {
if (lVar16 == 2) {
LAB_001b1f18:
iVar8 = isprint((uint)*pbVar13);
pbVar14 = pbVar13;
if (iVar8 != 0) {
pbVar13 = pbVar13 + 1;
goto LAB_001b1f28;
}
goto LAB_001b1f4b;
}
pbVar14 = pbVar1;
if (lVar16 == 3) {
iVar8 = isprint((uint)*pbVar13);
pbVar14 = pbVar13;
if (iVar8 != 0) {
pbVar13 = pbVar13 + 1;
goto LAB_001b1f18;
}
goto LAB_001b1f4b;
}
}
local_208 = (long)pbVar14 - (long)pbVar18;
*pbVar14 = 0;
/* try { // try from 001b1f99 to 001b1fe9 has its CatchHandler @ 001b216a */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"\'",1);
poVar11 = std::__ostream_insert<char,std::char_traits<char>>
(local_1a8,(char *)local_210,local_208);
std::__ostream_insert<char,std::char_traits<char>>(poVar11,"\'",1);
std::__ostream_insert<char,std::char_traits<char>>(poVar11,":",1);
uVar3 = *puVar15;
uVar4 = -uVar3;
if (0 < (int)uVar3) {
uVar4 = uVar3;
}
uVar17 = 1;
if (9 < uVar4) {
uVar12 = (ulong)uVar4;
uVar6 = 4;
do {
uVar17 = uVar6;
uVar9 = (uint)uVar12;
if (uVar9 < 100) {
uVar17 = uVar17 - 2;
goto LAB_001b2046;
}
if (uVar9 < 1000) {
uVar17 = uVar17 - 1;
goto LAB_001b2046;
}
if (uVar9 < 10000) goto LAB_001b2046;
uVar12 = uVar12 / 10000;
uVar6 = uVar17 + 4;
} while (99999 < uVar9);
uVar17 = uVar17 + 1;
}
LAB_001b2046:
local_1f0 = local_1e0;
/* try { // try from 001b2057 to 001b2065 has its CatchHandler @ 001b213c */
std::__cxx11::string::_M_construct
((ulong)&local_1f0,(char)uVar17 - (char)((int)uVar3 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((long)local_1f0 + (ulong)(uVar3 >> 0x1f)),uVar17,uVar4);
/* try { // try from 001b2082 to 001b2089 has its CatchHandler @ 001b2144 */
std::__ostream_insert<char,std::char_traits<char>>(poVar11,(char *)local_1f0,local_1e8);
if (local_1f0 != local_1e0) {
operator_delete(local_1f0,local_1e0[0] + 1);
}
if (local_210 != (byte *)local_200) {
operator_delete(local_210,local_200[0] + 1);
}
puVar15 = puVar15 + 1;
bVar7 = false;
} while (puVar15 != local_1c8);
}
/* try { // try from 001b20dd to 001b2102 has its CatchHandler @ 001b2138 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2);
plVar5 = local_1d0;
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
std::ios_base::~ios_base(local_138);
return plVar5;
}
|
|
61,274
|
cpu_get_num_physical_cores()
|
monkey531[P]llama/common/common.cpp
|
std::string string_from(bool value) {
return value ? "true" : "false";
}
|
O2
|
cpp
|
cpu_get_num_physical_cores():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
leaq 0x58(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %esi, %esi
leaq 0x60(%rsp), %r14
leaq 0x80(%rsp), %r12
leaq 0x8(%rsp), %rbp
leaq 0xa0(%rsp), %rbx
pushq $0x8
popq %r15
xorl %r13d, %r13d
incl %r13d
je 0x5493b
movq %r14, %rdi
callq 0x59ee2
movq %r12, %rdi
leaq 0x5f7c2(%rip), %rsi # 0xb404c
movq %r14, %rdx
callq 0x59ebe
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x5f7c9(%rip), %rdx # 0xb4068
callq 0x39e60
movq %rbx, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x23ec0
movq %rbp, %rdi
callq 0x242a8
movq %r12, %rdi
callq 0x242a8
movq %r14, %rdi
callq 0x242a8
leaq 0x118(%rsp), %rdi
callq 0x231d0
testb %al, %al
je 0x5492e
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x23140
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x54916
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x8a558
movq %rbp, %rdi
callq 0x242a8
movq %rbx, %rdi
callq 0x23210
movl %r13d, %esi
jmp 0x5486f
leaq 0xa0(%rsp), %rdi
callq 0x23210
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
jne 0x5495c
callq 0x23c40
cmpl $0x5, %eax
setae %cl
movl %eax, %edx
shrl %cl, %edx
testl %eax, %eax
pushq $0x4
popq %rbx
cmovnel %edx, %ebx
leaq 0x28(%rsp), %rdi
callq 0x5dd7a
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x549c9
movq %rax, %rbx
jmp 0x54996
movq %rax, %rbx
jmp 0x549a3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x242a8
leaq 0x80(%rsp), %rdi
callq 0x242a8
leaq 0x60(%rsp), %rdi
callq 0x242a8
jmp 0x549c9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x242a8
leaq 0xa0(%rsp), %rdi
callq 0x23210
leaq 0x28(%rsp), %rdi
callq 0x5dd7a
movq %rbx, %rdi
callq 0x24030
|
_Z26cpu_get_num_physical_coresv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
lea rax, [rsp+2D8h+var_280]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
xor esi, esi; unsigned int
lea r14, [rsp+2D8h+var_278]
lea r12, [rsp+2D8h+var_258]
lea rbp, [rsp+2D8h+var_2D0]
lea rbx, [rsp+2D8h+var_238]
push 8
pop r15
xor r13d, r13d
loc_5486F:
inc r13d
jz loc_5493B
mov rdi, r14; this
call _ZNSt7__cxx119to_stringEj; std::to_string(uint)
mov rdi, r12
lea rsi, aSysDevicesSyst; "/sys/devices/system/cpu/cpu"
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rdi, rbp
mov rsi, r12
lea rdx, aTopologyThread; "/topology/thread_siblings"
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rdi, rbx
mov rsi, rbp
mov edx, r15d
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2D8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_5492E
lea rax, [rsp+2D8h+var_2C0]
mov [rsp+2D8h+var_2D0], rax
and [rsp+2D8h+var_2C8], 0
mov [rsp+2D8h+var_2C0], 0
mov rdi, rbx
mov rsi, rbp
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_54916
lea rdi, [rsp+2D8h+var_2B0]
mov rsi, rbp
call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::insert(std::string const&)
loc_54916:
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov esi, r13d
jmp loc_5486F
loc_5492E:
lea rdi, [rsp+2D8h+var_238]; this
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_5493B:
mov rbx, [rsp+2D8h+var_298]
test rbx, rbx
jnz short loc_5495C
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
cmp eax, 5
setnb cl
mov edx, eax
shr edx, cl
test eax, eax
push 4
pop rbx
cmovnz ebx, edx
loc_5495C:
lea rdi, [rsp+2D8h+var_2B0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable()
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_549C9
mov rbx, rax
jmp short loc_54996
mov rbx, rax
jmp short loc_549A3
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_54996:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_549A3:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_549C9
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_98]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_549C9:
lea rdi, [rsp+arg_20]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
|
long long cpu_get_num_physical_cores(std::thread *a1)
{
unsigned long long v1; // rsi
unsigned int i; // r13d
_QWORD *v3; // rax
unsigned int v4; // ebx
unsigned int v5; // eax
_QWORD v7[2]; // [rsp+8h] [rbp-2D0h] BYREF
char v8; // [rsp+18h] [rbp-2C0h] BYREF
_QWORD v9[2]; // [rsp+28h] [rbp-2B0h] BYREF
__int128 v10; // [rsp+38h] [rbp-2A0h]
int v11; // [rsp+48h] [rbp-290h]
__int128 v12; // [rsp+50h] [rbp-288h] BYREF
_BYTE v13[32]; // [rsp+60h] [rbp-278h] BYREF
_BYTE v14[32]; // [rsp+80h] [rbp-258h] BYREF
_BYTE v15[120]; // [rsp+A0h] [rbp-238h] BYREF
_BYTE v16[448]; // [rsp+118h] [rbp-1C0h] BYREF
v9[0] = (char *)&v12 + 8;
v9[1] = 1LL;
v10 = 0LL;
v11 = 1065353216;
v12 = 0LL;
v1 = 0LL;
for ( i = 0; ++i; v1 = i )
{
std::to_string((std::__cxx11 *)v13, v1);
std::operator+<char>(v14, "/sys/devices/system/cpu/cpu", v13);
std::operator+<char>((long long)v7, (long long)v14, (long long)"/topology/thread_siblings");
v1 = (unsigned long long)v7;
std::ifstream::basic_ifstream(v15, v7, 8LL);
std::string::~string(v7);
std::string::~string(v14);
std::string::~string(v13);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v16) )
{
a1 = (std::thread *)v15;
std::ifstream::~ifstream(v15);
break;
}
v7[0] = &v8;
v7[1] = 0LL;
v8 = 0;
v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v15, v7);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) == 0 )
std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::insert(
v9,
v7);
std::string::~string(v7);
a1 = (std::thread *)v15;
std::ifstream::~ifstream(v15);
}
v4 = DWORD2(v10);
if ( !*((_QWORD *)&v10 + 1) )
{
v5 = std::thread::hardware_concurrency(a1);
v4 = 4;
if ( v5 )
v4 = v5 >> (v5 >= 5);
}
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable(
v9,
v1);
return v4;
}
|
cpu_get_num_physical_cores:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
LEA RAX,[RSP + 0x58]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
XOR ESI,ESI
LEA R14,[RSP + 0x60]
LEA R12,[RSP + 0x80]
LEA RBP,[RSP + 0x8]
LEA RBX,[RSP + 0xa0]
PUSH 0x8
POP R15
XOR R13D,R13D
LAB_0015486f:
INC R13D
JZ 0x0015493b
LAB_00154878:
MOV RDI,R14
CALL 0x00159ee2
LAB_00154880:
MOV RDI,R12
LEA RSI,[0x1b404c]
MOV RDX,R14
CALL 0x00159ebe
LAB_00154892:
MOV RDI,RBP
MOV RSI,R12
LEA RDX,[0x1b4068]
CALL 0x00139e60
LAB_001548a4:
MOV RDI,RBX
MOV RSI,RBP
MOV EDX,R15D
CALL 0x00123ec0
MOV RDI,RBP
CALL 0x001242a8
MOV RDI,R12
CALL 0x001242a8
MOV RDI,R14
CALL 0x001242a8
LEA RDI,[RSP + 0x118]
CALL 0x001231d0
TEST AL,AL
JZ 0x0015492e
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
AND qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
LAB_001548f0:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00123140
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00154916
LEA RDI,[RSP + 0x28]
MOV RSI,RBP
CALL 0x0018a558
LAB_00154916:
MOV RDI,RBP
CALL 0x001242a8
MOV RDI,RBX
CALL 0x00123210
MOV ESI,R13D
JMP 0x0015486f
LAB_0015492e:
LEA RDI,[RSP + 0xa0]
CALL 0x00123210
LAB_0015493b:
MOV RBX,qword ptr [RSP + 0x40]
TEST RBX,RBX
JNZ 0x0015495c
CALL 0x00123c40
CMP EAX,0x5
SETNC CL
MOV EDX,EAX
SHR EDX,CL
TEST EAX,EAX
PUSH 0x4
POP RBX
CMOVNZ EBX,EDX
LAB_0015495c:
LEA RDI,[RSP + 0x28]
CALL 0x0015dd7a
MOV EAX,EBX
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_physical_cores() */
ulong cpu_get_num_physical_cores(void)
{
char cVar1;
uint uVar2;
istream *piVar3;
ulong uVar4;
int1 *local_2d0;
int8 local_2c8;
int1 local_2c0 [16];
int8 *local_2b0;
int8 local_2a8;
int8 local_2a0;
ulong uStack_298;
int4 local_290;
int8 local_288;
int8 uStack_280;
__cxx11 local_278 [32];
string local_258 [32];
istream local_238 [520];
local_2b0 = &uStack_280;
local_2a8 = 1;
local_2a0 = 0;
uStack_298 = 0;
local_290 = 0x3f800000;
local_288 = 0;
uStack_280 = 0;
uVar2 = 0;
do {
if (uVar2 + 1 == 0) {
LAB_0015493b:
uVar4 = uStack_298;
if (uStack_298 == 0) {
uVar2 = std::thread::hardware_concurrency();
uVar4 = 4;
if (uVar2 != 0) {
uVar4 = (ulong)(uVar2 >> (4 < uVar2));
}
}
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
*)&local_2b0);
return uVar4 & 0xffffffff;
}
/* try { // try from 00154878 to 0015487f has its CatchHandler @ 0015497a */
std::__cxx11::to_string(local_278,uVar2);
/* try { // try from 00154880 to 00154891 has its CatchHandler @ 00154984 */
std::operator+((char *)local_258,(string *)"/sys/devices/system/cpu/cpu");
/* try { // try from 00154892 to 001548a3 has its CatchHandler @ 0015497f */
std::operator+((string *)&local_2d0,(char *)local_258);
/* try { // try from 001548a4 to 001548b1 has its CatchHandler @ 00154989 */
std::ifstream::ifstream((ifstream *)local_238,(string *)&local_2d0,8);
std::__cxx11::string::~string((string *)&local_2d0);
std::__cxx11::string::~string(local_258);
std::__cxx11::string::~string((string *)local_278);
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 == '\0') {
std::ifstream::~ifstream((ifstream *)local_238);
goto LAB_0015493b;
}
local_2d0 = local_2c0;
local_2c8 = 0;
local_2c0[0] = 0;
/* try { // try from 001548f0 to 00154915 has its CatchHandler @ 001549af */
piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>>
(local_238,(string *)&local_2d0);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) {
std::__detail::
_Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
::insert((string *)&local_2b0);
}
std::__cxx11::string::~string((string *)&local_2d0);
std::ifstream::~ifstream((ifstream *)local_238);
uVar2 = uVar2 + 1;
} while( true );
}
|
|
61,275
|
madb_reset_stmt
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static my_bool madb_reset_stmt(MYSQL_STMT *stmt, unsigned int flags)
{
MYSQL *mysql= stmt->mysql;
my_bool ret= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
/* clear error */
if (flags & MADB_RESET_ERROR)
{
CLEAR_CLIENT_ERROR(stmt->mysql);
CLEAR_CLIENT_STMT_ERROR(stmt);
}
if (stmt->stmt_id)
{
/* free buffered resultset, previously allocated
* by mysql_stmt_store_result
*/
if (flags & MADB_RESET_STORED &&
stmt->result_cursor)
{
ma_free_root(&stmt->result.alloc, MYF(MY_KEEP_PREALLOC));
stmt->result.data= NULL;
stmt->result.rows= 0;
stmt->result_cursor= NULL;
stmt->mysql->status= MYSQL_STATUS_READY;
stmt->state= MYSQL_STMT_FETCH_DONE;
}
/* if there is a pending result set, we will flush it */
if (flags & MADB_RESET_BUFFER)
{
if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler(stmt);
stmt->state = MYSQL_STMT_USER_FETCHING;
}
if (stmt->mysql->status!= MYSQL_STATUS_READY && stmt->field_count)
{
mysql->methods->db_stmt_flush_unbuffered(stmt);
mysql->status= MYSQL_STATUS_READY;
}
}
if (flags & MADB_RESET_SERVER)
{
/* reset statement on server side */
if (stmt->mysql && stmt->mysql->status == MYSQL_STATUS_READY &&
stmt->mysql->net.pvio)
{
unsigned char cmd_buf[STMT_ID_LENGTH];
int4store(cmd_buf, stmt->stmt_id);
if ((ret= stmt->mysql->methods->db_command(mysql,COM_STMT_RESET, (char *)cmd_buf,
sizeof(cmd_buf), 0, stmt)))
{
UPDATE_STMT_ERROR(stmt);
return(ret);
}
}
}
if (flags & MADB_RESET_LONGDATA)
{
if (stmt->params)
{
ulonglong i;
for (i=0; i < stmt->param_count; i++)
if (stmt->params[i].long_data_used)
stmt->params[i].long_data_used= 0;
}
}
}
return(ret);
}
|
O3
|
c
|
madb_reset_stmt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq 0x38(%rdi), %r15
testq %r15, %r15
je 0x24491
movl %esi, %r14d
testb $0x1, %r14b
je 0x24397
movl $0x0, 0x90(%r15)
movq 0x38(%rbx), %rax
movw $0x30, 0x29b(%rax)
movl $0x30303030, 0x297(%rax) # imm = 0x30303030
movq 0x38(%rbx), %rax
movb $0x0, 0x97(%rax)
movq 0x38(%rbx), %rax
movq 0x2a0(%rax), %rax
testq %rax, %rax
je 0x24373
movl $0x0, 0x4(%rax)
movl $0x0, 0x108(%rbx)
movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030
movw $0x30, 0x311(%rbx)
movb $0x0, 0x10c(%rbx)
cmpq $0x0, 0x40(%rbx)
je 0x2448c
testb $0x10, %r14b
je 0x243ef
cmpq $0x0, 0xe0(%rbx)
je 0x243ef
leaq 0x90(%rbx), %rdi
movl $0x1, %esi
callq 0x21823
xorl %eax, %eax
movq %rax, 0x80(%rbx)
movq %rax, 0xc8(%rbx)
movq %rax, 0xe0(%rbx)
movq 0x38(%rbx), %rax
movl $0x0, 0x488(%rax)
movl $0x6, 0x50(%rbx)
testb $0x8, %r14b
je 0x24436
cmpl $0x3, 0x50(%rbx)
jne 0x2440b
movq %rbx, %rdi
callq *0x358(%rbx)
movl $0x5, 0x50(%rbx)
movq 0x38(%rbx), %rax
cmpl $0x0, 0x488(%rax)
je 0x24436
cmpl $0x0, 0x60(%rbx)
je 0x24436
movq 0x4d0(%r15), %rax
movq %rbx, %rdi
callq *0x78(%rax)
movl $0x0, 0x488(%r15)
testb $0x4, %r14b
je 0x24452
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x24452
cmpl $0x0, 0x488(%rax)
je 0x24507
testb $0x2, %r14b
je 0x2448c
cmpq $0x0, 0x70(%rbx)
je 0x2448c
movl 0x64(%rbx), %eax
testl %eax, %eax
je 0x2448c
movl $0x66, %ecx
xorl %edx, %edx
movq 0x70(%rbx), %rsi
cmpb $0x0, (%rsi,%rcx)
je 0x2447e
movb $0x0, (%rsi,%rcx)
movl 0x64(%rbx), %eax
incq %rdx
movl %eax, %esi
addq $0x70, %rcx
cmpq %rsi, %rdx
jb 0x2446d
xorl %r15d, %r15d
jmp 0x244e6
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x2a8e7(%rip), %rax # 0x4ed90
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2a8d2(%rip), %rax # 0x4eda0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movb $0x1, %r15b
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x2459b
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, (%rax)
je 0x24452
movl 0x40(%rbx), %ecx
leaq -0x24(%rbp), %rdx
movl %ecx, (%rdx)
movq 0x4d0(%rax), %rax
movl $0x4, %ecx
movq %r15, %rdi
movl $0x1a, %esi
xorl %r8d, %r8d
movq %rbx, %r9
callq *0x10(%rax)
movl %eax, %r15d
testb %r15b, %r15b
je 0x24452
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
jmp 0x244e6
callq 0x13500
|
madb_reset_stmt:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov r15, [rdi+38h]
test r15, r15
jz loc_24491
mov r14d, esi
test r14b, 1
jz short loc_24397
mov dword ptr [r15+90h], 0
mov rax, [rbx+38h]
mov word ptr [rax+29Bh], 30h ; '0'
mov dword ptr [rax+297h], 30303030h
mov rax, [rbx+38h]
mov byte ptr [rax+97h], 0
mov rax, [rbx+38h]
mov rax, [rax+2A0h]
test rax, rax
jz short loc_24373
mov dword ptr [rax+4], 0
loc_24373:
mov dword ptr [rbx+108h], 0
mov dword ptr [rbx+30Dh], 30303030h
mov word ptr [rbx+311h], 30h ; '0'
mov byte ptr [rbx+10Ch], 0
loc_24397:
cmp qword ptr [rbx+40h], 0
jz loc_2448C
test r14b, 10h
jz short loc_243EF
cmp qword ptr [rbx+0E0h], 0
jz short loc_243EF
lea rdi, [rbx+90h]
mov esi, 1
call ma_free_root
xor eax, eax
mov [rbx+80h], rax
mov [rbx+0C8h], rax
mov [rbx+0E0h], rax
mov rax, [rbx+38h]
mov dword ptr [rax+488h], 0
mov dword ptr [rbx+50h], 6
loc_243EF:
test r14b, 8
jz short loc_24436
cmp dword ptr [rbx+50h], 3
jnz short loc_2440B
mov rdi, rbx
call qword ptr [rbx+358h]
mov dword ptr [rbx+50h], 5
loc_2440B:
mov rax, [rbx+38h]
cmp dword ptr [rax+488h], 0
jz short loc_24436
cmp dword ptr [rbx+60h], 0
jz short loc_24436
mov rax, [r15+4D0h]
mov rdi, rbx
call qword ptr [rax+78h]
mov dword ptr [r15+488h], 0
loc_24436:
test r14b, 4
jz short loc_24452
mov rax, [rbx+38h]
test rax, rax
jz short loc_24452
cmp dword ptr [rax+488h], 0
jz loc_24507
loc_24452:
test r14b, 2
jz short loc_2448C
cmp qword ptr [rbx+70h], 0
jz short loc_2448C
mov eax, [rbx+64h]
test eax, eax
jz short loc_2448C
mov ecx, 66h ; 'f'
xor edx, edx
loc_2446D:
mov rsi, [rbx+70h]
cmp byte ptr [rsi+rcx], 0
jz short loc_2447E
mov byte ptr [rsi+rcx], 0
mov eax, [rbx+64h]
loc_2447E:
inc rdx
mov esi, eax
add rcx, 70h ; 'p'
cmp rdx, rsi
jb short loc_2446D
loc_2448C:
xor r15d, r15d
jmp short loc_244E6
loc_24491:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r15b, 1
loc_244E6:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz loc_2459B
mov eax, r15d
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_24507:
cmp qword ptr [rax], 0
jz loc_24452
mov ecx, [rbx+40h]
lea rdx, [rbp+var_24]
mov [rdx], ecx
mov rax, [rax+4D0h]
mov ecx, 4
mov rdi, r15
mov esi, 1Ah
xor r8d, r8d
mov r9, rbx
call qword ptr [rax+10h]
mov r15d, eax
test r15b, r15b
jz loc_24452
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
jmp loc_244E6
loc_2459B:
call ___stack_chk_fail
|
long long madb_reset_stmt(long long a1, char a2)
{
long long v2; // r15
long long v3; // rax
long long v4; // rax
unsigned int v5; // eax
long long v6; // rcx
unsigned long long i; // rdx
long long v8; // rsi
unsigned int v9; // r15d
long long v11; // rsi
int v12; // [rsp+Ch] [rbp-24h] BYREF
unsigned long long v13; // [rsp+10h] [rbp-20h]
v13 = __readfsqword(0x28u);
v2 = *(_QWORD *)(a1 + 56);
if ( v2 )
{
if ( (a2 & 1) != 0 )
{
*(_DWORD *)(v2 + 144) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL);
if ( v3 )
*(_DWORD *)(v3 + 4) = 0;
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
}
if ( *(_QWORD *)(a1 + 64) )
{
if ( (a2 & 0x10) != 0 && *(_QWORD *)(a1 + 224) )
{
ma_free_root(a1 + 144, 1);
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 200) = 0LL;
*(_QWORD *)(a1 + 224) = 0LL;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0;
*(_DWORD *)(a1 + 80) = 6;
}
if ( (a2 & 8) != 0 )
{
if ( *(_DWORD *)(a1 + 80) == 3 )
{
(*(void ( **)(long long))(a1 + 856))(a1);
*(_DWORD *)(a1 + 80) = 5;
}
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) && *(_DWORD *)(a1 + 96) )
{
(*(void ( **)(long long))(*(_QWORD *)(v2 + 1232) + 120LL))(a1);
*(_DWORD *)(v2 + 1160) = 0;
}
}
if ( (a2 & 4) != 0 )
{
v4 = *(_QWORD *)(a1 + 56);
if ( v4 )
{
if ( !*(_DWORD *)(v4 + 1160) )
{
if ( *(_QWORD *)v4 )
{
v12 = *(_DWORD *)(a1 + 64);
v9 = (*(long long ( **)(long long, long long, int *, long long, _QWORD, long long))(*(_QWORD *)(v4 + 1232)
+ 16LL))(
v2,
26LL,
&v12,
4LL,
0LL,
a1);
if ( (_BYTE)v9 )
{
v11 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v11 + 144);
strncpy(a1 + 781, v11 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v9;
}
}
}
}
}
if ( (a2 & 2) != 0 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v5 = *(_DWORD *)(a1 + 100);
if ( v5 )
{
v6 = 102LL;
for ( i = 0LL; i < v5; ++i )
{
v8 = *(_QWORD *)(a1 + 112);
if ( *(_BYTE *)(v8 + v6) )
{
*(_BYTE *)(v8 + v6) = 0;
v5 = *(_DWORD *)(a1 + 100);
}
v6 += 112LL;
}
}
}
}
}
return 0;
}
else
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[13], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
|
madb_reset_stmt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV R15,qword ptr [RDI + 0x38]
TEST R15,R15
JZ 0x00124491
MOV R14D,ESI
TEST R14B,0x1
JZ 0x00124397
MOV dword ptr [R15 + 0x90],0x0
MOV RAX,qword ptr [RBX + 0x38]
MOV word ptr [RAX + 0x29b],0x30
MOV dword ptr [RAX + 0x297],0x30303030
MOV RAX,qword ptr [RBX + 0x38]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
TEST RAX,RAX
JZ 0x00124373
MOV dword ptr [RAX + 0x4],0x0
LAB_00124373:
MOV dword ptr [RBX + 0x108],0x0
MOV dword ptr [RBX + 0x30d],0x30303030
MOV word ptr [RBX + 0x311],0x30
MOV byte ptr [RBX + 0x10c],0x0
LAB_00124397:
CMP qword ptr [RBX + 0x40],0x0
JZ 0x0012448c
TEST R14B,0x10
JZ 0x001243ef
CMP qword ptr [RBX + 0xe0],0x0
JZ 0x001243ef
LEA RDI,[RBX + 0x90]
MOV ESI,0x1
CALL 0x00121823
XOR EAX,EAX
MOV qword ptr [RBX + 0x80],RAX
MOV qword ptr [RBX + 0xc8],RAX
MOV qword ptr [RBX + 0xe0],RAX
MOV RAX,qword ptr [RBX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
MOV dword ptr [RBX + 0x50],0x6
LAB_001243ef:
TEST R14B,0x8
JZ 0x00124436
CMP dword ptr [RBX + 0x50],0x3
JNZ 0x0012440b
MOV RDI,RBX
CALL qword ptr [RBX + 0x358]
MOV dword ptr [RBX + 0x50],0x5
LAB_0012440b:
MOV RAX,qword ptr [RBX + 0x38]
CMP dword ptr [RAX + 0x488],0x0
JZ 0x00124436
CMP dword ptr [RBX + 0x60],0x0
JZ 0x00124436
MOV RAX,qword ptr [R15 + 0x4d0]
MOV RDI,RBX
CALL qword ptr [RAX + 0x78]
MOV dword ptr [R15 + 0x488],0x0
LAB_00124436:
TEST R14B,0x4
JZ 0x00124452
MOV RAX,qword ptr [RBX + 0x38]
TEST RAX,RAX
JZ 0x00124452
CMP dword ptr [RAX + 0x488],0x0
JZ 0x00124507
LAB_00124452:
TEST R14B,0x2
JZ 0x0012448c
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0012448c
MOV EAX,dword ptr [RBX + 0x64]
TEST EAX,EAX
JZ 0x0012448c
MOV ECX,0x66
XOR EDX,EDX
LAB_0012446d:
MOV RSI,qword ptr [RBX + 0x70]
CMP byte ptr [RSI + RCX*0x1],0x0
JZ 0x0012447e
MOV byte ptr [RSI + RCX*0x1],0x0
MOV EAX,dword ptr [RBX + 0x64]
LAB_0012447e:
INC RDX
MOV ESI,EAX
ADD RCX,0x70
CMP RDX,RSI
JC 0x0012446d
LAB_0012448c:
XOR R15D,R15D
JMP 0x001244e6
LAB_00124491:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14ed90]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14eda0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R15B,0x1
LAB_001244e6:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0012459b
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00124507:
CMP qword ptr [RAX],0x0
JZ 0x00124452
MOV ECX,dword ptr [RBX + 0x40]
LEA RDX,[RBP + -0x24]
MOV dword ptr [RDX],ECX
MOV RAX,qword ptr [RAX + 0x4d0]
MOV ECX,0x4
MOV RDI,R15
MOV ESI,0x1a
XOR R8D,R8D
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
MOV R15D,EAX
TEST R15B,R15B
JZ 0x00124452
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
JMP 0x001244e6
LAB_0012459b:
CALL 0x00113500
|
int4 madb_reset_stmt(long param_1,uint param_2)
{
long lVar1;
long *plVar2;
uint uVar3;
int4 uVar4;
long lVar5;
ulong uVar6;
long in_FS_OFFSET;
int4 local_2c;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = *(long *)(param_1 + 0x38);
if (lVar5 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_0014ee08,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar4 = 1;
}
else {
if ((param_2 & 1) != 0) {
*(int4 *)(lVar5 + 0x90) = 0;
lVar1 = *(long *)(param_1 + 0x38);
*(int2 *)(lVar1 + 0x29b) = 0x30;
*(int4 *)(lVar1 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
lVar1 = *(long *)(*(long *)(param_1 + 0x38) + 0x2a0);
if (lVar1 != 0) {
*(int4 *)(lVar1 + 4) = 0;
}
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
}
if (*(long *)(param_1 + 0x40) != 0) {
if (((param_2 & 0x10) != 0) && (*(long *)(param_1 + 0xe0) != 0)) {
ma_free_root(param_1 + 0x90,1);
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 200) = 0;
*(int8 *)(param_1 + 0xe0) = 0;
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0;
*(int4 *)(param_1 + 0x50) = 6;
}
if ((param_2 & 8) != 0) {
if (*(int *)(param_1 + 0x50) == 3) {
(**(code **)(param_1 + 0x358))(param_1);
*(int4 *)(param_1 + 0x50) = 5;
}
if ((*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0) && (*(int *)(param_1 + 0x60) != 0)) {
(**(code **)(*(long *)(lVar5 + 0x4d0) + 0x78))(param_1);
*(int4 *)(lVar5 + 0x488) = 0;
}
}
if (((((param_2 & 4) != 0) && (plVar2 = *(long **)(param_1 + 0x38), plVar2 != (long *)0x0)) &&
((int)plVar2[0x91] == 0)) && (*plVar2 != 0)) {
local_2c = *(int4 *)(param_1 + 0x40);
uVar4 = (**(code **)(plVar2[0x9a] + 0x10))(lVar5,0x1a,&local_2c,4,0,param_1);
if ((char)uVar4 != '\0') {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200);
*(int1 *)(param_1 + 0x30b) = 0;
goto LAB_001244e6;
}
}
if (((param_2 & 2) != 0) && (*(long *)(param_1 + 0x70) != 0)) {
uVar3 = *(uint *)(param_1 + 100);
if (uVar3 != 0) {
lVar5 = 0x66;
uVar6 = 0;
do {
if (*(char *)(*(long *)(param_1 + 0x70) + lVar5) != '\0') {
*(int1 *)(*(long *)(param_1 + 0x70) + lVar5) = 0;
uVar3 = *(uint *)(param_1 + 100);
}
uVar6 = uVar6 + 1;
lVar5 = lVar5 + 0x70;
} while (uVar6 < uVar3);
}
}
}
uVar4 = 0;
}
LAB_001244e6:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,276
|
js_trigger_gc
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_trigger_gc(JSRuntime *rt, size_t size)
{
BOOL force_gc;
#ifdef FORCE_GC_AT_MALLOC
force_gc = TRUE;
#else
force_gc = ((rt->malloc_state.malloc_size + size) >
rt->malloc_gc_threshold);
#endif
if (force_gc) {
#ifdef DUMP_GC
if (check_dump_flag(rt, DUMP_GC)) {
printf("GC: size=%" PRIu64 "\n",
(uint64_t)rt->malloc_state.malloc_size);
}
#endif
JS_RunGC(rt);
rt->malloc_gc_threshold = rt->malloc_state.malloc_size +
(rt->malloc_state.malloc_size >> 1);
}
}
|
O0
|
c
|
js_trigger_gc:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rax
addq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq 0xd0(%rcx), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x64029
movq 0x10(%rsp), %rdi
callq 0x2a060
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rax
shrq %rax
addq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xd0(%rax)
addq $0x18, %rsp
retq
nop
|
js_trigger_gc:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov rax, [rax+30h]
add rax, [rsp+18h+var_10]
mov rcx, [rsp+18h+var_8]
cmp rax, [rcx+0D0h]
setnbe al
and al, 1
movzx eax, al
mov [rsp+18h+var_14], eax
cmp [rsp+18h+var_14], 0
jz short loc_64029
mov rdi, [rsp+18h+var_8]
call JS_RunGC
mov rax, [rsp+18h+var_8]
mov rcx, [rax+30h]
mov rax, [rsp+18h+var_8]
mov rax, [rax+30h]
shr rax, 1
add rcx, rax
mov rax, [rsp+18h+var_8]
mov [rax+0D0h], rcx
loc_64029:
add rsp, 18h
retn
|
_BOOL8 js_trigger_gc(long long a1, long long a2)
{
_BOOL8 result; // rax
result = (unsigned long long)(a2 + *(_QWORD *)(a1 + 48)) > *(_QWORD *)(a1 + 208);
if ( (unsigned long long)(a2 + *(_QWORD *)(a1 + 48)) > *(_QWORD *)(a1 + 208) )
{
JS_RunGC(a1);
result = a1;
*(_QWORD *)(a1 + 208) = (*(_QWORD *)(a1 + 48) >> 1) + *(_QWORD *)(a1 + 48);
}
return result;
}
|
js_trigger_gc:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x30]
ADD RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RCX + 0xd0]
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x0
JZ 0x00164029
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0012a060
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x30]
SHR RAX,0x1
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0xd0],RCX
LAB_00164029:
ADD RSP,0x18
RET
|
void js_trigger_gc(long param_1,long param_2)
{
if (*(ulong *)(param_1 + 0xd0) < (ulong)(*(long *)(param_1 + 0x30) + param_2)) {
JS_RunGC(param_1);
*(ulong *)(param_1 + 0xd0) = *(long *)(param_1 + 0x30) + (*(ulong *)(param_1 + 0x30) >> 1);
}
return;
}
|
|
61,277
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp
|
void
TopologyRefiner::selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
internal::FeatureMask const & featureMask,
ConstIndexArray facesToRefine) {
//
// Inspect each face and the properties tagged at all of its corners:
//
Vtr::internal::Level const& level = selector.getRefinement().parent();
int numFacesToRefine = facesToRefine.size() ? facesToRefine.size() : level.getNumFaces();
int numFVarChannels = featureMask.selectFVarFeatures ? level.getNumFVarChannels() : 0;
for (int fIndex = 0; fIndex < numFacesToRefine; ++fIndex) {
Vtr::Index face = facesToRefine.size() ? facesToRefine[fIndex] : (Index) fIndex;
if (HasHoles() && level.isFaceHole(face)) continue;
//
// Test if the face has any of the specified features present. If not, and FVar
// channels are to be considered, look for features in the FVar channels:
//
bool selectFace = doesFaceHaveFeatures(level, face, featureMask, _regFaceSize);
if (!selectFace && featureMask.selectFVarFeatures) {
for (int channel = 0; !selectFace && (channel < numFVarChannels); ++channel) {
// Only test the face for this channel if the topology does not match:
if (!level.doesFaceFVarTopologyMatch(face, channel)) {
selectFace = doesFaceHaveDistinctFaceVaryingFeatures(
level, face, featureMask, channel);
}
}
}
if (selectFace) {
selector.selectFace(face);
}
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rcx, -0x10(%rbp)
movl %r8d, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0xcbec0
movq %rax, %rdi
callq 0xc52b0
movq %rax, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xcc250
cmpl $0x0, %eax
je 0x17fe75
leaq -0x10(%rbp), %rdi
callq 0xcc250
movl %eax, -0x54(%rbp)
jmp 0x17fe81
movq -0x30(%rbp), %rdi
callq 0xc3430
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
shrw $0xb, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x17feac
movq -0x30(%rbp), %rdi
callq 0xd1020
movl %eax, -0x58(%rbp)
jmp 0x17feb3
xorl %eax, %eax
movl %eax, -0x58(%rbp)
jmp 0x17feb3
movl -0x58(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x17ffe7
leaq -0x10(%rbp), %rdi
callq 0xcc250
cmpl $0x0, %eax
je 0x17feed
movl -0x3c(%rbp), %esi
leaq -0x10(%rbp), %rdi
callq 0xcabf0
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x17fef3
movl -0x3c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x50(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, -0x40(%rbp)
callq 0xd25c0
testb $0x1, %al
jne 0x17ff08
jmp 0x17ff1f
movq -0x30(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0xc3150
testb $0x1, %al
jne 0x17ff1a
jmp 0x17ff1f
jmp 0x17ffd9
movq -0x50(%rbp), %rax
movq -0x30(%rbp), %rdi
movl -0x40(%rbp), %esi
movq -0x28(%rbp), %rdx
movw 0x8(%rax), %ax
shrw $0x3, %ax
andw $0x7, %ax
movzwl %ax, %ecx
callq 0x180120
andb $0x1, %al
movb %al, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x17ffc5
movq -0x28(%rbp), %rax
movw (%rax), %ax
shrw $0xb, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x17ffc5
movl $0x0, -0x48(%rbp)
xorl %eax, %eax
testb $0x1, -0x41(%rbp)
movb %al, -0x5d(%rbp)
jne 0x17ff82
movl -0x48(%rbp), %eax
cmpl -0x38(%rbp), %eax
setl %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x17ff8b
jmp 0x17ffc3
movq -0x30(%rbp), %rdi
movl -0x40(%rbp), %esi
movl -0x48(%rbp), %edx
callq 0xca3a0
testb $0x1, %al
jne 0x17ffb6
movq -0x30(%rbp), %rdi
movl -0x40(%rbp), %esi
movq -0x28(%rbp), %rdx
movl -0x48(%rbp), %ecx
callq 0x180450
andb $0x1, %al
movb %al, -0x41(%rbp)
jmp 0x17ffb8
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x17ff6b
jmp 0x17ffc5
testb $0x1, -0x41(%rbp)
je 0x17ffd7
movq -0x20(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0xc39e0
jmp 0x17ffd9
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x17fec0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner31selectFeatureAdaptiveComponentsERNS0_3Vtr8internal14SparseSelectorERKNS1_8internal11FeatureMaskENS3_10ConstArrayIiEE:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rcx
mov [rbp+var_8], r8d
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov qword ptr [rbp+var_28], rdx
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector13getRefinementEv; OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::getRefinement(void)
mov rdi, rax; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement6parentEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::parent(void)
mov [rbp+var_30], rax
lea rdi, [rbp+var_10]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
cmp eax, 0
jz short loc_17FE75
lea rdi, [rbp+var_10]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov [rbp+var_54], eax
jmp short loc_17FE81
loc_17FE75:
mov rdi, [rbp+var_30]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(void)
mov [rbp+var_54], eax
loc_17FE81:
mov eax, [rbp+var_54]
mov [rbp+var_34], eax
mov rax, qword ptr [rbp+var_28]
mov ax, [rax]
shr ax, 0Bh
and ax, 1
movzx eax, ax
cmp eax, 0
jz short loc_17FEAC
mov rdi, [rbp+var_30]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level18getNumFVarChannelsEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarChannels(void)
mov [rbp+var_58], eax
jmp short loc_17FEB3
loc_17FEAC:
xor eax, eax
mov [rbp+var_58], eax
jmp short $+2
loc_17FEB3:
mov eax, [rbp+var_58]
mov [rbp+var_38], eax
mov dword ptr [rbp+var_40+4], 0
loc_17FEC0:
mov eax, dword ptr [rbp+var_40+4]
cmp eax, [rbp+var_34]
jge loc_17FFE7
lea rdi, [rbp+var_10]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
cmp eax, 0
jz short loc_17FEED
mov esi, dword ptr [rbp+var_40+4]
lea rdi, [rbp+var_10]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov eax, [rax]
mov [rbp+var_5C], eax
jmp short loc_17FEF3
loc_17FEED:
mov eax, dword ptr [rbp+var_40+4]
mov [rbp+var_5C], eax
loc_17FEF3:
mov rdi, [rbp+var_50]; this
mov eax, [rbp+var_5C]
mov dword ptr [rbp+var_40], eax
call __ZNK10OpenSubdiv6v3_6_03Far15TopologyRefiner8HasHolesEv; OpenSubdiv::v3_6_0::Far::TopologyRefiner::HasHoles(void)
test al, 1
jnz short loc_17FF08
jmp short loc_17FF1F
loc_17FF08:
mov rdi, [rbp+var_30]; this
mov esi, dword ptr [rbp+var_40]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level10isFaceHoleEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::isFaceHole(int)
test al, 1
jnz short loc_17FF1A
jmp short loc_17FF1F
loc_17FF1A:
jmp loc_17FFD9
loc_17FF1F:
mov rax, [rbp+var_50]
mov rdi, [rbp+var_30]; this
mov esi, dword ptr [rbp+var_40]; OpenSubdiv::v3_6_0::Vtr::internal::Level *
mov rdx, qword ptr [rbp+var_28]; int
mov ax, [rax+8]
shr ax, 3
and ax, 7
movzx ecx, ax; OpenSubdiv::v3_6_0::Far::internal::FeatureMask *
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_120doesFaceHaveFeaturesERKNS0_3Vtr8internal5LevelEiRKNS1_8internal11FeatureMaskEi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level const&,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&,int)
and al, 1
mov byte ptr [rbp+var_48+7], al
test byte ptr [rbp+var_48+7], 1
jnz short loc_17FFC5
mov rax, qword ptr [rbp+var_28]
mov ax, [rax]
shr ax, 0Bh
and ax, 1
movzx eax, ax
cmp eax, 0
jz short loc_17FFC5
mov dword ptr [rbp+var_48], 0
loc_17FF6B:
xor eax, eax
test byte ptr [rbp+var_48+7], 1
mov [rbp+var_5D], al
jnz short loc_17FF82
mov eax, dword ptr [rbp+var_48]
cmp eax, [rbp+var_38]
setl al
mov [rbp+var_5D], al
loc_17FF82:
mov al, [rbp+var_5D]
test al, 1
jnz short loc_17FF8B
jmp short loc_17FFC3
loc_17FF8B:
mov rdi, [rbp+var_30]; this
mov esi, dword ptr [rbp+var_40]; int
mov edx, dword ptr [rbp+var_48]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, 1
jnz short loc_17FFB6
mov rdi, [rbp+var_30]; this
mov esi, dword ptr [rbp+var_40]; OpenSubdiv::v3_6_0::Vtr::internal::Level *
mov rdx, qword ptr [rbp+var_28]; int
mov ecx, dword ptr [rbp+var_48]; OpenSubdiv::v3_6_0::Far::internal::FeatureMask *
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_139doesFaceHaveDistinctFaceVaryingFeaturesERKNS0_3Vtr8internal5LevelEiRKNS1_8internal11FeatureMaskEi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesFaceHaveDistinctFaceVaryingFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level const&,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&,int)
and al, 1
mov byte ptr [rbp+var_48+7], al
loc_17FFB6:
jmp short $+2
loc_17FFB8:
mov eax, dword ptr [rbp+var_48]
add eax, 1
mov dword ptr [rbp+var_48], eax
jmp short loc_17FF6B
loc_17FFC3:
jmp short $+2
loc_17FFC5:
test byte ptr [rbp+var_48+7], 1
jz short loc_17FFD7
mov rdi, [rbp+var_20]; this
mov esi, dword ptr [rbp+var_40]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectFaceEi; OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(int)
loc_17FFD7:
jmp short $+2
loc_17FFD9:
mov eax, dword ptr [rbp+var_40+4]
add eax, 1
mov dword ptr [rbp+var_40+4], eax
jmp loc_17FEC0
loc_17FFE7:
add rsp, 60h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(
OpenSubdiv::v3_6_0::Far::TopologyRefiner *a1,
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *a2,
_WORD *a3,
long long a4,
int a5)
{
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *Refinement; // rax
long long result; // rax
int v7; // r8d
int v8; // r8d
bool v9; // [rsp+3h] [rbp-5Dh]
unsigned int v10; // [rsp+4h] [rbp-5Ch]
int NumFVarChannels; // [rsp+8h] [rbp-58h]
signed int NumFaces; // [rsp+Ch] [rbp-54h]
int j; // [rsp+18h] [rbp-48h]
char v14; // [rsp+1Fh] [rbp-41h]
unsigned int i; // [rsp+24h] [rbp-3Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v16; // [rsp+30h] [rbp-30h]
long long v18; // [rsp+50h] [rbp-10h] BYREF
int v19; // [rsp+58h] [rbp-8h]
v18 = a4;
v19 = a5;
Refinement = (OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::getRefinement(a2);
v16 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)OpenSubdiv::v3_6_0::Vtr::internal::Refinement::parent(Refinement);
if ( (unsigned int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v18) )
NumFaces = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v18);
else
NumFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(v16);
if ( ((*a3 >> 11) & 1) != 0 )
NumFVarChannels = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarChannels(v16);
else
NumFVarChannels = 0;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= NumFaces )
break;
if ( (unsigned int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v18) )
v10 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v18, i);
else
v10 = i;
if ( (OpenSubdiv::v3_6_0::Far::TopologyRefiner::HasHoles(a1) & 1) == 0
|| (OpenSubdiv::v3_6_0::Vtr::internal::Level::isFaceHole(v16, v10) & 1) == 0 )
{
v14 = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesFaceHaveFeatures(
v16,
(const OpenSubdiv::v3_6_0::Vtr::internal::Level *)v10,
(int)a3,
(const OpenSubdiv::v3_6_0::Far::internal::FeatureMask *)((*((_WORD *)a1 + 4) >> 3) & 7),
v7) & 1;
if ( !v14 && ((*a3 >> 11) & 1) != 0 )
{
for ( j = 0; ; ++j )
{
v9 = 0;
if ( (v14 & 1) == 0 )
v9 = j < NumFVarChannels;
if ( !v9 )
break;
if ( (OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(v16, v10, j) & 1) == 0 )
v14 = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesFaceHaveDistinctFaceVaryingFeatures(
v16,
(const OpenSubdiv::v3_6_0::Vtr::internal::Level *)v10,
(int)a3,
(const OpenSubdiv::v3_6_0::Far::internal::FeatureMask *)(unsigned int)j,
v8) & 1;
}
}
if ( (v14 & 1) != 0 )
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(a2, v10);
}
}
return result;
}
| |||
61,278
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp
|
void
TopologyRefiner::selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
internal::FeatureMask const & featureMask,
ConstIndexArray facesToRefine) {
//
// Inspect each face and the properties tagged at all of its corners:
//
Vtr::internal::Level const& level = selector.getRefinement().parent();
int numFacesToRefine = facesToRefine.size() ? facesToRefine.size() : level.getNumFaces();
int numFVarChannels = featureMask.selectFVarFeatures ? level.getNumFVarChannels() : 0;
for (int fIndex = 0; fIndex < numFacesToRefine; ++fIndex) {
Vtr::Index face = facesToRefine.size() ? facesToRefine[fIndex] : (Index) fIndex;
if (HasHoles() && level.isFaceHole(face)) continue;
//
// Test if the face has any of the specified features present. If not, and FVar
// channels are to be considered, look for features in the FVar channels:
//
bool selectFace = doesFaceHaveFeatures(level, face, featureMask, _regFaceSize);
if (!selectFace && featureMask.selectFVarFeatures) {
for (int channel = 0; !selectFace && (channel < numFVarChannels); ++channel) {
// Only test the face for this channel if the topology does not match:
if (!level.doesFaceFVarTopologyMatch(face, channel)) {
selectFace = doesFaceHaveDistinctFaceVaryingFeatures(
level, face, featureMask, channel);
}
}
}
if (selectFace) {
selector.selectFace(face);
}
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, 0x28(%rsp)
movq %rdi, 0x38(%rsp)
movq %rsi, 0x20(%rsp)
movq (%rsi), %rax
movq 0x8(%rax), %rbp
movl %r8d, %eax
movl %r8d, 0x1c(%rsp)
testl %r8d, %r8d
jne 0x8440c
movl (%rbp), %eax
xorl %r15d, %r15d
movq %rdx, (%rsp)
testb $0x8, 0x1(%rdx)
je 0x8442b
movq 0x1d0(%rbp), %r15
subq 0x1c8(%rbp), %r15
shrq $0x3, %r15
testl %eax, %eax
jle 0x846f9
movl %eax, %eax
movq %rax, 0x30(%rsp)
xorl %ebx, %ebx
cmpl $0x0, 0x1c(%rsp)
je 0x8444d
movq 0x28(%rsp), %rax
movl (%rax,%rbx,4), %eax
jmp 0x8444f
movl %ebx, %eax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movzwl 0x8(%rax), %eax
testb $0x2, %al
je 0x84474
movslq 0x8(%rsp), %rcx
movq 0x60(%rbp), %rdx
testb $0x1, (%rdx,%rcx)
jne 0x84526
movq %rbx, 0x40(%rsp)
shrl $0x3, %eax
andl $0x7, %eax
movq 0x8(%rsp), %rcx
leal (%rcx,%rcx), %r12d
movq 0x18(%rbp), %rcx
movslq %r12d, %rdx
movq %rdx, 0x50(%rsp)
movl (%rcx,%rdx,4), %ebx
movb $0x1, %r13b
cmpl %eax, %ebx
jne 0x84507
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
leaq 0x14(%rsp), %r14
movq %r14, %rdx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x38530
movq %r14, %rdi
movl %ebx, %esi
callq 0x38580
movb $0x1, %r13b
btl $0xc, %eax
jb 0x84507
btl $0xb, %eax
jb 0x84504
testb $0x1, %al
je 0x844df
movq (%rsp), %rcx
testb $0x4, 0x1(%rcx)
jne 0x84507
testb $0x2, %al
je 0x844f0
movq (%rsp), %rcx
testb $0x1, (%rcx)
jne 0x8467b
movl %eax, %ecx
andl $0x780, %ecx # imm = 0x780
cmpl $0x80, %ecx
jne 0x84639
xorl %r13d, %r13d
testb %r13b, %r13b
je 0x84539
testb $0x1, %r13b
movq 0x40(%rsp), %rbx
je 0x84526
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x38210
incq %rbx
cmpq 0x30(%rsp), %rbx
jne 0x8443c
jmp 0x846f9
movq (%rsp), %rax
testb $0x8, 0x1(%rax)
je 0x8450c
testl %r15d, %r15d
jle 0x8450c
orl $0x1, %r12d
movslq %r12d, %rax
movq %rax, 0x48(%rsp)
xorl %ebx, %ebx
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
callq 0x39800
testb %al, %al
jne 0x8461f
movq %r15, %r14
movq 0x18(%rbp), %rax
movq 0x48(%rsp), %rcx
movslq (%rax,%rcx,4), %r13
shlq $0x2, %r13
addq 0x30(%rbp), %r13
movq 0x50(%rsp), %rcx
movl (%rax,%rcx,4), %r12d
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
callq 0x39800
testb %al, %al
jne 0x84708
testl %r12d, %r12d
jle 0x845ca
xorl %r15d, %r15d
movl (%r13,%r15,4), %esi
movq %rbp, %rdi
movl %ebx, %edx
callq 0x38850
movw %ax, 0x14(%rsp,%r15,2)
incq %r15
cmpq %r15, %r12
jne 0x845ad
leaq 0x14(%rsp), %rdi
movl %r12d, %esi
callq 0x38580
btl $0xb, %eax
jb 0x84619
testb $0x1, %al
movq %r14, %r15
je 0x845f1
movb $0x1, %r13b
movq (%rsp), %rcx
testb $0x4, 0x1(%rcx)
jne 0x8461f
testb $0x2, %al
je 0x84601
movb $0x1, %r13b
movq (%rsp), %rcx
testb $0x1, (%rcx)
jne 0x8461f
movl %eax, %edi
leaq 0x14(%rsp), %rsi
movl %r12d, %edx
movq (%rsp), %rcx
callq 0x847b2
movl %eax, %r13d
jmp 0x8461f
xorl %r13d, %r13d
movq %r14, %r15
testb $0x1, %r13b
jne 0x8450c
incl %ebx
cmpl %r15d, %ebx
jl 0x84556
jmp 0x8450c
testb $0x60, %al
je 0x846c7
movq (%rsp), %rax
movl (%rax), %eax
notl %eax
testb $0xc, %al
je 0x84507
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a440
movq (%rsp), %rcx
movzwl (%rcx), %r13d
testb %al, %al
je 0x846ec
andl $0x4, %r13d
shrl $0x2, %r13d
jmp 0x84507
movl %eax, %ecx
andl $0x780, %ecx # imm = 0x780
cmpl $0x80, %ecx
je 0x84507
testl %ebx, %ebx
jle 0x844f0
cmpl $0x1, 0xc(%rbp)
jg 0x844f0
xorl %ecx, %ecx
movzwl 0x14(%rsp,%rcx,2), %edx
andl $0x782, %edx # imm = 0x782
cmpl $0x82, %edx
je 0x84507
incq %rcx
cmpq %rcx, %rbx
jne 0x846a3
jmp 0x844f0
testl $0x2010, %eax # imm = 0x2010
je 0x84504
movl %eax, %edi
leaq 0x14(%rsp), %rsi
movl %ebx, %edx
movq (%rsp), %rcx
callq 0x847b2
movl %eax, %r13d
jmp 0x84507
andl $0x8, %r13d
shrl $0x3, %r13d
jmp 0x84507
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38de3(%rip), %rdi # 0xbd4f2
leaq 0x38bf2(%rip), %rsi # 0xbd308
leaq 0x38e09(%rip), %rcx # 0xbd526
movl $0x2d0, %edx # imm = 0x2D0
callq 0x39560
nop
|
_ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner31selectFeatureAdaptiveComponentsERNS0_3Vtr8internal14SparseSelectorERKNS1_8internal11FeatureMaskENS3_10ConstArrayIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_60], rcx
mov [rsp+88h+var_50], rdi
mov [rsp+88h+var_68], rsi
mov rax, [rsi]
mov rbp, [rax+8]
mov eax, r8d
mov [rsp+88h+var_6C], r8d
test r8d, r8d
jnz short loc_8440C
mov eax, [rbp+0]
loc_8440C:
xor r15d, r15d
mov [rsp+88h+var_88], rdx
test byte ptr [rdx+1], 8
jz short loc_8442B
mov r15, [rbp+1D0h]
sub r15, [rbp+1C8h]
shr r15, 3
loc_8442B:
test eax, eax
jle loc_846F9
mov eax, eax
mov [rsp+88h+var_58], rax
xor ebx, ebx
loc_8443C:
cmp [rsp+88h+var_6C], 0
jz short loc_8444D
mov rax, [rsp+88h+var_60]
mov eax, [rax+rbx*4]
jmp short loc_8444F
loc_8444D:
mov eax, ebx
loc_8444F:
mov qword ptr [rsp+88h+var_80], rax
mov rax, [rsp+88h+var_50]
movzx eax, word ptr [rax+8]
test al, 2
jz short loc_84474
movsxd rcx, [rsp+88h+var_80]
mov rdx, [rbp+60h]
test byte ptr [rdx+rcx], 1
jnz loc_84526
loc_84474:
mov [rsp+88h+var_48], rbx
shr eax, 3
and eax, 7
mov rcx, qword ptr [rsp+88h+var_80]
lea r12d, [rcx+rcx]
mov rcx, [rbp+18h]
movsxd rdx, r12d
mov [rsp+88h+var_38], rdx
mov ebx, [rcx+rdx*4]
mov r13b, 1
cmp ebx, eax
jnz short loc_84507
mov rdi, rbp
mov rsi, qword ptr [rsp+88h+var_80]
lea r14, [rsp+88h+var_74]
mov rdx, r14
mov ecx, 0FFFFFFFFh
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *,int)
mov rdi, r14
mov esi, ebx
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int)
mov r13b, 1
bt eax, 0Ch
jb short loc_84507
bt eax, 0Bh
jb short loc_84504
test al, 1
jz short loc_844DF
mov rcx, [rsp+88h+var_88]
test byte ptr [rcx+1], 4
jnz short loc_84507
loc_844DF:
test al, 2
jz short loc_844F0
mov rcx, [rsp+88h+var_88]
test byte ptr [rcx], 1
jnz loc_8467B
loc_844F0:
mov ecx, eax
and ecx, 780h
cmp ecx, 80h
jnz loc_84639
loc_84504:
xor r13d, r13d
loc_84507:
test r13b, r13b
jz short loc_84539
loc_8450C:
test r13b, 1
mov rbx, [rsp+88h+var_48]
jz short loc_84526
mov rdi, [rsp+88h+var_68]; this
mov rsi, qword ptr [rsp+88h+var_80]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectFaceEi; OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(int)
loc_84526:
inc rbx
cmp rbx, [rsp+88h+var_58]
jnz loc_8443C
jmp loc_846F9
loc_84539:
mov rax, [rsp+88h+var_88]
test byte ptr [rax+1], 8
jz short loc_8450C
test r15d, r15d
jle short loc_8450C
or r12d, 1
movsxd rax, r12d
mov [rsp+88h+var_40], rax
xor ebx, ebx
loc_84556:
mov rdi, rbp; this
mov rsi, qword ptr [rsp+88h+var_80]; int
mov edx, ebx; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, al
jnz loc_8461F
mov r14, r15
mov rax, [rbp+18h]
mov rcx, [rsp+88h+var_40]
movsxd r13, dword ptr [rax+rcx*4]
shl r13, 2
add r13, [rbp+30h]
mov rcx, [rsp+88h+var_38]
mov r12d, [rax+rcx*4]
mov rdi, rbp; this
mov rsi, qword ptr [rsp+88h+var_80]; int
mov edx, ebx; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, al
jnz loc_84708
test r12d, r12d
jle short loc_845CA
xor r15d, r15d
loc_845AD:
mov esi, [r13+r15*4+0]; int
mov rdi, rbp; this
mov edx, ebx; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level26getVertexCompositeFVarVTagEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexCompositeFVarVTag(int,int)
mov [rsp+r15*2+88h+var_74], ax
inc r15
cmp r12, r15
jnz short loc_845AD
loc_845CA:
lea rdi, [rsp+88h+var_74]
mov esi, r12d
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int)
bt eax, 0Bh
jb short loc_84619
test al, 1
mov r15, r14
jz short loc_845F1
mov r13b, 1
mov rcx, [rsp+88h+var_88]
test byte ptr [rcx+1], 4
jnz short loc_8461F
loc_845F1:
test al, 2
jz short loc_84601
mov r13b, 1
mov rcx, [rsp+88h+var_88]
test byte ptr [rcx], 1
jnz short loc_8461F
loc_84601:
mov edi, eax
lea rsi, [rsp+88h+var_74]
mov edx, r12d
mov rcx, [rsp+88h+var_88]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_128doesInfSharpFaceHaveFeaturesENS0_3Vtr8internal5Level4VTagEPS6_iRKNS1_8internal11FeatureMaskE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&)
mov r13d, eax
jmp short loc_8461F
loc_84619:
xor r13d, r13d
mov r15, r14
loc_8461F:
test r13b, 1
jnz loc_8450C
inc ebx
cmp ebx, r15d
jl loc_84556
jmp loc_8450C
loc_84639:
test al, 60h
jz loc_846C7
mov rax, [rsp+88h+var_88]
mov eax, [rax]
not eax
test al, 0Ch
jz loc_84507
mov rdi, rbp; this
mov rsi, qword ptr [rsp+88h+var_80]; int
xor edx, edx; float *
xor ecx, ecx; int *
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level19isSingleCreasePatchEiPfPi; OpenSubdiv::v3_6_0::Vtr::internal::Level::isSingleCreasePatch(int,float *,int *)
mov rcx, [rsp+88h+var_88]
movzx r13d, word ptr [rcx]
test al, al
jz short loc_846EC
and r13d, 4
shr r13d, 2
jmp loc_84507
loc_8467B:
mov ecx, eax
and ecx, 780h
cmp ecx, 80h
jz loc_84507
test ebx, ebx
jle loc_844F0
cmp dword ptr [rbp+0Ch], 1
jg loc_844F0
xor ecx, ecx
loc_846A3:
movzx edx, [rsp+rcx*2+88h+var_74]
and edx, 782h
cmp edx, 82h
jz loc_84507
inc rcx
cmp rbx, rcx
jnz short loc_846A3
jmp loc_844F0
loc_846C7:
test eax, 2010h
jz loc_84504
mov edi, eax
lea rsi, [rsp+88h+var_74]
mov edx, ebx
mov rcx, [rsp+88h+var_88]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_128doesInfSharpFaceHaveFeaturesENS0_3Vtr8internal5Level4VTagEPS6_iRKNS1_8internal11FeatureMaskE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&)
mov r13d, eax
jmp loc_84507
loc_846EC:
and r13d, 8
shr r13d, 3
jmp loc_84507
loc_846F9:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_84708:
lea rdi, aLevelDoesfacef; "!level.doesFaceFVarTopologyMatch(face, "...
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolOpensubdiv_1; "bool OpenSubdiv::v3_6_0::Far::(anonymou"...
mov edx, 2D0h
call ___assert_fail
|
__int16 OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(
long long a1,
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *a2,
_BYTE *a3,
long long a4,
unsigned int a5)
{
long long v5; // rbp
unsigned int v6; // eax
long long v7; // r15
long long v8; // rbx
int v9; // eax
long long v10; // rcx
long long v11; // rbx
int v12; // r13d
int v13; // ebx
long long v14; // r14
long long v15; // rax
long long v16; // r13
long long v17; // r12
long long i; // r15
__int16 v19; // r13
long long v20; // rcx
int v23; // [rsp+8h] [rbp-80h]
__int16 v24[4]; // [rsp+14h] [rbp-74h] BYREF
unsigned int v25; // [rsp+1Ch] [rbp-6Ch]
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *v26; // [rsp+20h] [rbp-68h]
long long v27; // [rsp+28h] [rbp-60h]
long long v28; // [rsp+30h] [rbp-58h]
long long v29; // [rsp+38h] [rbp-50h]
long long v30; // [rsp+40h] [rbp-48h]
long long v31; // [rsp+48h] [rbp-40h]
long long v32; // [rsp+50h] [rbp-38h]
v27 = a4;
v29 = a1;
v26 = a2;
v5 = *(_QWORD *)(*(_QWORD *)a2 + 8LL);
v6 = a5;
v25 = a5;
if ( !a5 )
v6 = *(_DWORD *)v5;
v7 = 0LL;
if ( (a3[1] & 8) != 0 )
v7 = (*(_QWORD *)(v5 + 464) - *(_QWORD *)(v5 + 456)) >> 3;
if ( (int)v6 > 0 )
{
v28 = v6;
v8 = 0LL;
while ( 1 )
{
v9 = v25 ? *(_DWORD *)(v27 + 4 * v8) : v8;
v23 = v9;
v6 = *(unsigned __int16 *)(v29 + 8);
if ( (v6 & 2) == 0 || (*(_BYTE *)(*(_QWORD *)(v5 + 96) + v23) & 1) == 0 )
break;
LABEL_24:
if ( ++v8 == v28 )
return v6;
}
v30 = v8;
v6 = (v6 >> 3) & 7;
v10 = *(_QWORD *)(v5 + 24);
v32 = 2 * v23;
v11 = *(unsigned int *)(v10 + 4 * v32);
LOBYTE(v12) = 1;
if ( (_DWORD)v11 == v6 )
{
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags((_QWORD *)v5, v23, (long long)v24, -1);
LOWORD(v6) = OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v24, v11);
LOBYTE(v12) = 1;
if ( (v6 & 0x1000) == 0 )
{
if ( (v6 & 0x800) != 0 )
goto LABEL_20;
if ( (v6 & 1) != 0 && (a3[1] & 4) != 0 )
goto LABEL_21;
if ( (v6 & 2) != 0 && (*a3 & 1) != 0 )
{
if ( (v6 & 0x780) == 0x80 )
goto LABEL_21;
if ( (int)v11 > 0 && *(int *)(v5 + 12) <= 1 )
{
v20 = 0LL;
while ( (v24[v20] & 0x782) != 0x82 )
{
if ( v11 == ++v20 )
goto LABEL_19;
}
goto LABEL_21;
}
}
LABEL_19:
if ( (v6 & 0x780) == 0x80 )
goto LABEL_20;
if ( (v6 & 0x60) != 0 )
{
v6 = ~*(_DWORD *)a3;
if ( (~*a3 & 0xC) != 0 )
{
LOWORD(v6) = OpenSubdiv::v3_6_0::Vtr::internal::Level::isSingleCreasePatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v23,
0LL,
0LL);
v19 = *(_WORD *)a3;
if ( (_BYTE)v6 )
v12 = (unsigned __int8)(v19 & 4) >> 2;
else
v12 = (unsigned __int8)(v19 & 8) >> 3;
}
goto LABEL_21;
}
if ( (v6 & 0x2010) == 0 )
{
LABEL_20:
LOBYTE(v12) = 0;
goto LABEL_21;
}
LOWORD(v6) = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(
v6,
v24,
(unsigned int)v11,
a3);
LOBYTE(v12) = v6;
}
}
LABEL_21:
if ( !(_BYTE)v12 )
{
LOWORD(v6) = (_WORD)a3;
if ( (a3[1] & 8) != 0 && (int)v7 > 0 )
{
v31 = (2 * v23) | 1;
v13 = 0;
do
{
LOWORD(v6) = OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v23,
v13);
if ( !(_BYTE)v6 )
{
v14 = v7;
v15 = *(_QWORD *)(v5 + 24);
v16 = *(_QWORD *)(v5 + 48) + 4LL * *(int *)(v15 + 4 * v31);
v17 = *(unsigned int *)(v15 + 4 * v32);
if ( (unsigned __int8)OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v23,
v13) )
__assert_fail(
"!level.doesFaceFVarTopologyMatch(face, fvarChannel)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp",
720LL,
"bool OpenSubdiv::v3_6_0::Far::(anonymous namespace)::doesFaceHaveDistinctFaceVaryingFeatures(const Vtr::"
"internal::Level &, Index, const internal::FeatureMask &, int)");
if ( (int)v17 > 0 )
{
for ( i = 0LL; i != v17; ++i )
v24[i] = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexCompositeFVarVTag(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
*(_DWORD *)(v16 + 4 * i),
v13);
}
LOWORD(v6) = OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v24, v17);
if ( (v6 & 0x800) != 0 )
{
LOBYTE(v12) = 0;
v7 = v14;
}
else
{
v7 = v14;
if ( (v6 & 1) == 0 || (LOBYTE(v12) = 1, (a3[1] & 4) == 0) )
{
if ( (v6 & 2) == 0 || (LOBYTE(v12) = 1, (*a3 & 1) == 0) )
{
LOWORD(v6) = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(
v6,
v24,
(unsigned int)v17,
a3);
LOBYTE(v12) = v6;
}
}
}
}
if ( (v12 & 1) != 0 )
break;
++v13;
}
while ( v13 < (int)v7 );
}
}
v8 = v30;
if ( (v12 & 1) != 0 )
LOWORD(v6) = OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(v26, v23);
goto LABEL_24;
}
return v6;
}
|
selectFeatureAdaptiveComponents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSI]
MOV RBP,qword ptr [RAX + 0x8]
MOV EAX,R8D
MOV dword ptr [RSP + 0x1c],R8D
TEST R8D,R8D
JNZ 0x0018440c
MOV EAX,dword ptr [RBP]
LAB_0018440c:
XOR R15D,R15D
MOV qword ptr [RSP],RDX
TEST byte ptr [RDX + 0x1],0x8
JZ 0x0018442b
MOV R15,qword ptr [RBP + 0x1d0]
SUB R15,qword ptr [RBP + 0x1c8]
SHR R15,0x3
LAB_0018442b:
TEST EAX,EAX
JLE 0x001846f9
MOV EAX,EAX
MOV qword ptr [RSP + 0x30],RAX
XOR EBX,EBX
LAB_0018443c:
CMP dword ptr [RSP + 0x1c],0x0
JZ 0x0018444d
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + RBX*0x4]
JMP 0x0018444f
LAB_0018444d:
MOV EAX,EBX
LAB_0018444f:
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOVZX EAX,word ptr [RAX + 0x8]
TEST AL,0x2
JZ 0x00184474
MOVSXD RCX,dword ptr [RSP + 0x8]
MOV RDX,qword ptr [RBP + 0x60]
TEST byte ptr [RDX + RCX*0x1],0x1
JNZ 0x00184526
LAB_00184474:
MOV qword ptr [RSP + 0x40],RBX
SHR EAX,0x3
AND EAX,0x7
MOV RCX,qword ptr [RSP + 0x8]
LEA R12D,[RCX + RCX*0x1]
MOV RCX,qword ptr [RBP + 0x18]
MOVSXD RDX,R12D
MOV qword ptr [RSP + 0x50],RDX
MOV EBX,dword ptr [RCX + RDX*0x4]
MOV R13B,0x1
CMP EBX,EAX
JNZ 0x00184507
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x14]
MOV RDX,R14
MOV ECX,0xffffffff
CALL 0x00138530
MOV RDI,R14
MOV ESI,EBX
CALL 0x00138580
MOV R13B,0x1
BT EAX,0xc
JC 0x00184507
BT EAX,0xb
JC 0x00184504
TEST AL,0x1
JZ 0x001844df
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX + 0x1],0x4
JNZ 0x00184507
LAB_001844df:
TEST AL,0x2
JZ 0x001844f0
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX],0x1
JNZ 0x0018467b
LAB_001844f0:
MOV ECX,EAX
AND ECX,0x780
CMP ECX,0x80
JNZ 0x00184639
LAB_00184504:
XOR R13D,R13D
LAB_00184507:
TEST R13B,R13B
JZ 0x00184539
LAB_0018450c:
TEST R13B,0x1
MOV RBX,qword ptr [RSP + 0x40]
JZ 0x00184526
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00138210
LAB_00184526:
INC RBX
CMP RBX,qword ptr [RSP + 0x30]
JNZ 0x0018443c
JMP 0x001846f9
LAB_00184539:
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x1],0x8
JZ 0x0018450c
TEST R15D,R15D
JLE 0x0018450c
OR R12D,0x1
MOVSXD RAX,R12D
MOV qword ptr [RSP + 0x48],RAX
XOR EBX,EBX
LAB_00184556:
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,EBX
CALL 0x00139800
TEST AL,AL
JNZ 0x0018461f
MOV R14,R15
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RSP + 0x48]
MOVSXD R13,dword ptr [RAX + RCX*0x4]
SHL R13,0x2
ADD R13,qword ptr [RBP + 0x30]
MOV RCX,qword ptr [RSP + 0x50]
MOV R12D,dword ptr [RAX + RCX*0x4]
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,EBX
CALL 0x00139800
TEST AL,AL
JNZ 0x00184708
TEST R12D,R12D
JLE 0x001845ca
XOR R15D,R15D
LAB_001845ad:
MOV ESI,dword ptr [R13 + R15*0x4]
MOV RDI,RBP
MOV EDX,EBX
CALL 0x00138850
MOV word ptr [RSP + R15*0x2 + 0x14],AX
INC R15
CMP R12,R15
JNZ 0x001845ad
LAB_001845ca:
LEA RDI,[RSP + 0x14]
MOV ESI,R12D
CALL 0x00138580
BT EAX,0xb
JC 0x00184619
TEST AL,0x1
MOV R15,R14
JZ 0x001845f1
MOV R13B,0x1
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX + 0x1],0x4
JNZ 0x0018461f
LAB_001845f1:
TEST AL,0x2
JZ 0x00184601
MOV R13B,0x1
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX],0x1
JNZ 0x0018461f
LAB_00184601:
MOV EDI,EAX
LEA RSI,[RSP + 0x14]
MOV EDX,R12D
MOV RCX,qword ptr [RSP]
CALL 0x001847b2
MOV R13D,EAX
JMP 0x0018461f
LAB_00184619:
XOR R13D,R13D
MOV R15,R14
LAB_0018461f:
TEST R13B,0x1
JNZ 0x0018450c
INC EBX
CMP EBX,R15D
JL 0x00184556
JMP 0x0018450c
LAB_00184639:
TEST AL,0x60
JZ 0x001846c7
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX]
NOT EAX
TEST AL,0xc
JZ 0x00184507
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x8]
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0013a440
MOV RCX,qword ptr [RSP]
MOVZX R13D,word ptr [RCX]
TEST AL,AL
JZ 0x001846ec
AND R13D,0x4
SHR R13D,0x2
JMP 0x00184507
LAB_0018467b:
MOV ECX,EAX
AND ECX,0x780
CMP ECX,0x80
JZ 0x00184507
TEST EBX,EBX
JLE 0x001844f0
CMP dword ptr [RBP + 0xc],0x1
JG 0x001844f0
XOR ECX,ECX
LAB_001846a3:
MOVZX EDX,word ptr [RSP + RCX*0x2 + 0x14]
AND EDX,0x782
CMP EDX,0x82
JZ 0x00184507
INC RCX
CMP RBX,RCX
JNZ 0x001846a3
JMP 0x001844f0
LAB_001846c7:
TEST EAX,0x2010
JZ 0x00184504
MOV EDI,EAX
LEA RSI,[RSP + 0x14]
MOV EDX,EBX
MOV RCX,qword ptr [RSP]
CALL 0x001847b2
MOV R13D,EAX
JMP 0x00184507
LAB_001846ec:
AND R13D,0x8
SHR R13D,0x3
JMP 0x00184507
LAB_001846f9:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00184708:
LEA RDI,[0x1bd4f2]
LEA RSI,[0x1bd308]
LEA RCX,[0x1bd526]
MOV EDX,0x2d0
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&,
OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
*/
void OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents
(long param_1,SparseSelector *param_2,uint *param_3,long param_4,uint param_5)
{
int iVar1;
Level *this;
long lVar2;
char cVar3;
int2 uVar4;
uint uVar5;
int iVar6;
uint uVar7;
uint uVar8;
int iVar9;
ulong uVar10;
int iVar11;
VTag local_74 [8];
uint local_6c;
SparseSelector *local_68;
long local_60;
ulong local_58;
long local_50;
ulong local_48;
long local_40;
long local_38;
this = *(Level **)(*(long *)param_2 + 8);
uVar5 = param_5;
if (param_5 == 0) {
uVar5 = *(uint *)this;
}
iVar11 = 0;
if ((*param_3 & 0x800) != 0) {
iVar11 = (int)((ulong)(*(long *)(this + 0x1d0) - *(long *)(this + 0x1c8)) >> 3);
}
if (0 < (int)uVar5) {
local_58 = (ulong)uVar5;
uVar10 = 0;
local_6c = param_5;
local_68 = param_2;
local_60 = param_4;
local_50 = param_1;
do {
if (local_6c == 0) {
iVar6 = (int)uVar10;
}
else {
iVar6 = *(int *)(local_60 + uVar10 * 4);
}
if (((*(ushort *)(local_50 + 8) & 2) == 0) ||
((*(byte *)(*(long *)(this + 0x60) + (long)iVar6) & 1) == 0)) {
local_38 = (long)(iVar6 * 2);
uVar5 = *(uint *)(*(long *)(this + 0x18) + local_38 * 4);
uVar8 = 1;
local_48 = uVar10;
if (uVar5 == (*(ushort *)(local_50 + 8) >> 3 & 7)) {
Vtr::internal::Level::getFaceVTags(this,iVar6,local_74,-1);
uVar7 = Vtr::internal::Level::VTag::BitwiseOr(local_74,uVar5);
uVar8 = 1;
if ((uVar7 >> 0xc & 1) == 0) {
if ((uVar7 >> 0xb & 1) == 0) {
if (((uVar7 & 1) == 0) || ((*param_3 & 0x400) == 0)) {
if (((uVar7 & 2) != 0) && ((*param_3 & 1) != 0)) {
if ((uVar7 & 0x780) == 0x80) goto LAB_00184507;
if ((0 < (int)uVar5) && (*(int *)(this + 0xc) < 2)) {
uVar10 = 0;
do {
if ((*(ushort *)(local_74 + uVar10 * 2) & 0x782) == 0x82) goto LAB_00184507;
uVar10 = uVar10 + 1;
} while (uVar5 != uVar10);
}
}
if ((uVar7 & 0x780) == 0x80) goto LAB_00184504;
if ((uVar7 & 0x60) == 0) {
if ((uVar7 & 0x2010) == 0) goto LAB_00184504;
uVar8 = (anonymous_namespace)::doesInfSharpFaceHaveFeatures
(uVar7,local_74,uVar5,param_3);
}
else if ((~*param_3 & 0xc) != 0) {
cVar3 = Vtr::internal::Level::isSingleCreasePatch
(this,iVar6,(float *)0x0,(int *)0x0);
if (cVar3 == '\0') {
uVar8 = ((ushort)*param_3 & 8) >> 3;
}
else {
uVar8 = ((ushort)*param_3 & 4) >> 2;
}
}
}
}
else {
LAB_00184504:
uVar8 = 0;
}
}
}
LAB_00184507:
if ((((char)uVar8 == '\0') && ((*param_3 & 0x800) != 0)) && (0 < iVar11)) {
local_40 = (long)(int)(iVar6 * 2 | 1);
iVar9 = 0;
do {
cVar3 = Vtr::internal::Level::doesFaceFVarTopologyMatch(this,iVar6,iVar9);
if (cVar3 == '\0') {
iVar1 = *(int *)(*(long *)(this + 0x18) + local_40 * 4);
lVar2 = *(long *)(this + 0x30);
uVar5 = *(uint *)(*(long *)(this + 0x18) + local_38 * 4);
cVar3 = Vtr::internal::Level::doesFaceFVarTopologyMatch(this,iVar6,iVar9);
if (cVar3 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("!level.doesFaceFVarTopologyMatch(face, fvarChannel)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp"
,0x2d0,
"bool OpenSubdiv::v3_6_0::Far::(anonymous namespace)::doesFaceHaveDistinctFaceVaryingFeatures(const Vtr::internal::Level &, Index, const internal::FeatureMask &, int)"
);
}
if (0 < (int)uVar5) {
uVar10 = 0;
do {
uVar4 = Vtr::internal::Level::getVertexCompositeFVarVTag
(this,*(int *)((long)iVar1 * 4 + lVar2 + uVar10 * 4),iVar9);
*(int2 *)(local_74 + uVar10 * 2) = uVar4;
uVar10 = uVar10 + 1;
} while (uVar5 != uVar10);
}
uVar7 = Vtr::internal::Level::VTag::BitwiseOr(local_74,uVar5);
if ((uVar7 >> 0xb & 1) == 0) {
if ((((uVar7 & 1) == 0) || (uVar8 = 1, (*param_3 & 0x400) == 0)) &&
(((uVar7 & 2) == 0 || (uVar8 = 1, (*param_3 & 1) == 0)))) {
uVar8 = (anonymous_namespace)::doesInfSharpFaceHaveFeatures
(uVar7,local_74,uVar5,param_3);
}
}
else {
uVar8 = 0;
}
}
} while (((uVar8 & 1) == 0) && (iVar9 = iVar9 + 1, iVar9 < iVar11));
}
uVar10 = local_48;
if ((uVar8 & 1) != 0) {
Vtr::internal::SparseSelector::selectFace(local_68,iVar6);
}
}
uVar10 = uVar10 + 1;
} while (uVar10 != local_58);
}
return;
}
|
|
61,279
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp
|
void
TopologyRefiner::selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
internal::FeatureMask const & featureMask,
ConstIndexArray facesToRefine) {
//
// Inspect each face and the properties tagged at all of its corners:
//
Vtr::internal::Level const& level = selector.getRefinement().parent();
int numFacesToRefine = facesToRefine.size() ? facesToRefine.size() : level.getNumFaces();
int numFVarChannels = featureMask.selectFVarFeatures ? level.getNumFVarChannels() : 0;
for (int fIndex = 0; fIndex < numFacesToRefine; ++fIndex) {
Vtr::Index face = facesToRefine.size() ? facesToRefine[fIndex] : (Index) fIndex;
if (HasHoles() && level.isFaceHole(face)) continue;
//
// Test if the face has any of the specified features present. If not, and FVar
// channels are to be considered, look for features in the FVar channels:
//
bool selectFace = doesFaceHaveFeatures(level, face, featureMask, _regFaceSize);
if (!selectFace && featureMask.selectFVarFeatures) {
for (int channel = 0; !selectFace && (channel < numFVarChannels); ++channel) {
// Only test the face for this channel if the topology does not match:
if (!level.doesFaceFVarTopologyMatch(face, channel)) {
selectFace = doesFaceHaveDistinctFaceVaryingFeatures(
level, face, featureMask, channel);
}
}
}
if (selectFace) {
selector.selectFace(face);
}
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x20(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq (%rsi), %rax
movq 0x8(%rax), %rbp
movl %r8d, %eax
movl %r8d, 0x14(%rsp)
testl %r8d, %r8d
jne 0x93bca
movl (%rbp), %eax
movq %rdx, (%rsp)
testb $0x8, 0x1(%rdx)
movl $0x0, %ebx
je 0x93beb
movq 0x1d0(%rbp), %rbx
subq 0x1c8(%rbp), %rbx
shrq $0x3, %rbx
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movq %rax, 0x38(%rsp)
xorl %ecx, %ecx
movq %rbx, 0x18(%rsp)
cmpq 0x38(%rsp), %rcx
je 0x93e98
cmpl $0x0, 0x14(%rsp)
movq %rcx, 0x40(%rsp)
je 0x93c23
movq 0x20(%rsp), %rax
movl (%rax,%rcx,4), %r12d
jmp 0x93c26
movl %ecx, %r12d
movq 0x30(%rsp), %rax
movzwl 0x8(%rax), %r13d
testb $0x2, %r13b
je 0x93c47
movslq %r12d, %rax
movq 0x60(%rbp), %rcx
testb $0x1, (%rcx,%rax)
jne 0x93e8b
shrl $0x3, %r13d
andl $0x7, %r13d
movq %rbp, %rdi
movl %r12d, %esi
callq 0x52db0
cmpl %r13d, %edx
jne 0x93e7e
movq %rbp, %rdi
movl %r12d, %esi
leaq 0xc(%rsp), %r14
movq %r14, %rdx
pushq $-0x1
popq %rcx
callq 0x4f9a0
movq %r14, %rdi
movl %r13d, %esi
callq 0x4fa30
btl $0xc, %eax
jb 0x93e7e
btl $0xb, %eax
jb 0x93cca
testb $0x1, %al
je 0x93ca6
movq (%rsp), %rcx
testb $0x4, 0x1(%rcx)
jne 0x93e7e
testb $0x2, %al
je 0x93cb7
movq (%rsp), %rcx
testb $0x1, (%rcx)
jne 0x93e13
movl %eax, %ecx
andl $0x780, %ecx # imm = 0x780
cmpw $0x80, %cx
jne 0x93dda
movq (%rsp), %rax
testb $0x8, 0x1(%rax)
je 0x93e8b
xorl %eax, %eax
xorl %r13d, %r13d
movl %r12d, 0x8(%rsp)
testb $0x1, %al
jne 0x93dcd
cmpl %ebx, %r13d
jge 0x93dcd
movq %rbp, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x51760
testb %al, %al
je 0x93d0c
xorl %eax, %eax
jmp 0x93dc5
movq %rbp, %rdi
movl %r12d, %esi
callq 0x52db0
movq %rax, %rbx
movl %edx, %r15d
movq %rbp, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x51760
testb %al, %al
jne 0x93ea7
testl %r15d, %r15d
movl %r15d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x93d64
movl (%rbx,%r12,4), %esi
movq %rbp, %rdi
movl %r13d, %edx
callq 0x4fd60
movw %ax, 0xc(%rsp,%r12,2)
incq %r12
jmp 0x93d45
leaq 0xc(%rsp), %rdi
movl %r15d, %esi
callq 0x4fa30
movl %eax, %edi
btl $0xb, %edi
jb 0x93db9
testb $0x1, %dil
movq 0x18(%rsp), %rbx
movl 0x8(%rsp), %r12d
je 0x93d95
movb $0x1, %al
movq (%rsp), %rcx
testb $0x4, 0x1(%rcx)
jne 0x93dc5
testb $0x2, %dil
je 0x93da6
movb $0x1, %al
movq (%rsp), %rcx
testb $0x1, (%rcx)
jne 0x93dc5
leaq 0xc(%rsp), %rsi
movl %r15d, %edx
movq (%rsp), %rcx
callq 0x93f64
jmp 0x93dc5
xorl %eax, %eax
movq 0x18(%rsp), %rbx
movl 0x8(%rsp), %r12d
incl %r13d
jmp 0x93ce2
testb $0x1, %al
jne 0x93e7e
jmp 0x93e8b
testb $0x60, %al
je 0x93e4e
movq (%rsp), %rax
movl (%rax), %eax
notl %eax
testb $0xc, %al
je 0x93e7e
movq %rbp, %rdi
movl %r12d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x52ab0
movq (%rsp), %rcx
movzwl (%rcx), %ecx
testb %al, %al
je 0x93e75
testb $0x4, %cl
je 0x93cca
jmp 0x93e7e
movl %eax, %ecx
andl $0x780, %ecx # imm = 0x780
cmpw $0x80, %cx
je 0x93e7e
cmpl $0x1, 0xc(%rbp)
jg 0x93cb7
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0x93cb7
movzwl 0xc(%rsp,%rcx,2), %edx
andl $0x782, %edx # imm = 0x782
incq %rcx
cmpw $0x82, %dx
jne 0x93e2e
jmp 0x93e7e
testw $0x2010, %ax # imm = 0x2010
je 0x93cca
movl %eax, %edi
leaq 0xc(%rsp), %rsi
movl %r13d, %edx
movq (%rsp), %rcx
callq 0x93f64
testb %al, %al
je 0x93cca
jmp 0x93e7e
testb $0x8, %cl
je 0x93cca
movq 0x28(%rsp), %rdi
movl %r12d, %esi
callq 0x4f3a0
movq 0x40(%rsp), %rcx
incq %rcx
jmp 0x93c01
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33ec4(%rip), %rdi # 0xc7d72
leaq 0x33cd3(%rip), %rsi # 0xc7b88
leaq 0x33eea(%rip), %rcx # 0xc7da6
movl $0x2d0, %edx # imm = 0x2D0
callq 0x512a0
|
_ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner31selectFeatureAdaptiveComponentsERNS0_3Vtr8internal14SparseSelectorERKNS1_8internal11FeatureMaskENS3_10ConstArrayIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_58], rcx
mov [rsp+78h+var_48], rdi
mov [rsp+78h+var_50], rsi
mov rax, [rsi]
mov rbp, [rax+8]
mov eax, r8d
mov [rsp+78h+var_64], r8d
test r8d, r8d
jnz short loc_93BCA
mov eax, [rbp+0]
loc_93BCA:
mov [rsp+78h+var_78], rdx
test byte ptr [rdx+1], 8
mov ebx, 0
jz short loc_93BEB
mov rbx, [rbp+1D0h]
sub rbx, [rbp+1C8h]
shr rbx, 3
loc_93BEB:
test eax, eax
mov ecx, 0
cmovle eax, ecx
mov [rsp+78h+var_40], rax
xor ecx, ecx
mov [rsp+78h+var_60], rbx
loc_93C01:
cmp rcx, [rsp+78h+var_40]
jz loc_93E98
cmp [rsp+78h+var_64], 0
mov [rsp+78h+var_38], rcx
jz short loc_93C23
mov rax, [rsp+78h+var_58]
mov r12d, [rax+rcx*4]
jmp short loc_93C26
loc_93C23:
mov r12d, ecx
loc_93C26:
mov rax, [rsp+78h+var_48]
movzx r13d, word ptr [rax+8]
test r13b, 2
jz short loc_93C47
movsxd rax, r12d
mov rcx, [rbp+60h]
test byte ptr [rcx+rax], 1
jnz loc_93E8B
loc_93C47:
shr r13d, 3
and r13d, 7
mov rdi, rbp; this
mov esi, r12d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
cmp edx, r13d
jnz loc_93E7E
mov rdi, rbp
mov esi, r12d
lea r14, [rsp+78h+var_6C]
mov rdx, r14
push 0FFFFFFFFFFFFFFFFh
pop rcx
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *,int)
mov rdi, r14
mov esi, r13d
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int)
bt eax, 0Ch
jb loc_93E7E
bt eax, 0Bh
jb short loc_93CCA
test al, 1
jz short loc_93CA6
mov rcx, [rsp+78h+var_78]
test byte ptr [rcx+1], 4
jnz loc_93E7E
loc_93CA6:
test al, 2
jz short loc_93CB7
mov rcx, [rsp+78h+var_78]
test byte ptr [rcx], 1
jnz loc_93E13
loc_93CB7:
mov ecx, eax
and ecx, 780h
cmp cx, 80h
jnz loc_93DDA
loc_93CCA:
mov rax, [rsp+78h+var_78]
test byte ptr [rax+1], 8
jz loc_93E8B
xor eax, eax
xor r13d, r13d
mov [rsp+78h+var_70], r12d
loc_93CE2:
test al, 1
jnz loc_93DCD
cmp r13d, ebx
jge loc_93DCD
mov rdi, rbp; this
mov esi, r12d; int
mov edx, r13d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, al
jz short loc_93D0C
xor eax, eax
jmp loc_93DC5
loc_93D0C:
mov rdi, rbp; this
mov esi, r12d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov rbx, rax
mov r15d, edx
mov rdi, rbp; this
mov esi, r12d; int
mov edx, r13d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, al
jnz loc_93EA7
test r15d, r15d
mov r14d, r15d
mov eax, 0
cmovle r14d, eax
xor r12d, r12d
loc_93D45:
cmp r14, r12
jz short loc_93D64
mov esi, [rbx+r12*4]; int
mov rdi, rbp; this
mov edx, r13d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level26getVertexCompositeFVarVTagEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexCompositeFVarVTag(int,int)
mov [rsp+r12*2+78h+var_6C], ax
inc r12
jmp short loc_93D45
loc_93D64:
lea rdi, [rsp+78h+var_6C]
mov esi, r15d
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int)
mov edi, eax
bt edi, 0Bh
jb short loc_93DB9
test dil, 1
mov rbx, [rsp+78h+var_60]
mov r12d, [rsp+78h+var_70]
jz short loc_93D95
mov al, 1
mov rcx, [rsp+78h+var_78]
test byte ptr [rcx+1], 4
jnz short loc_93DC5
loc_93D95:
test dil, 2
jz short loc_93DA6
mov al, 1
mov rcx, [rsp+78h+var_78]
test byte ptr [rcx], 1
jnz short loc_93DC5
loc_93DA6:
lea rsi, [rsp+78h+var_6C]
mov edx, r15d
mov rcx, [rsp+78h+var_78]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_128doesInfSharpFaceHaveFeaturesENS0_3Vtr8internal5Level4VTagEPS6_iRKNS1_8internal11FeatureMaskE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&)
jmp short loc_93DC5
loc_93DB9:
xor eax, eax
mov rbx, [rsp+78h+var_60]
mov r12d, [rsp+78h+var_70]
loc_93DC5:
inc r13d
jmp loc_93CE2
loc_93DCD:
test al, 1
jnz loc_93E7E
jmp loc_93E8B
loc_93DDA:
test al, 60h
jz short loc_93E4E
mov rax, [rsp+78h+var_78]
mov eax, [rax]
not eax
test al, 0Ch
jz loc_93E7E
mov rdi, rbp; this
mov esi, r12d; int
xor edx, edx; float *
xor ecx, ecx; int *
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level19isSingleCreasePatchEiPfPi; OpenSubdiv::v3_6_0::Vtr::internal::Level::isSingleCreasePatch(int,float *,int *)
mov rcx, [rsp+78h+var_78]
movzx ecx, word ptr [rcx]
test al, al
jz short loc_93E75
test cl, 4
jz loc_93CCA
jmp short loc_93E7E
loc_93E13:
mov ecx, eax
and ecx, 780h
cmp cx, 80h
jz short loc_93E7E
cmp dword ptr [rbp+0Ch], 1
jg loc_93CB7
xor ecx, ecx
loc_93E2E:
cmp r13, rcx
jz loc_93CB7
movzx edx, [rsp+rcx*2+78h+var_6C]
and edx, 782h
inc rcx
cmp dx, 82h
jnz short loc_93E2E
jmp short loc_93E7E
loc_93E4E:
test ax, 2010h
jz loc_93CCA
mov edi, eax
lea rsi, [rsp+78h+var_6C]
mov edx, r13d
mov rcx, [rsp+78h+var_78]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_128doesInfSharpFaceHaveFeaturesENS0_3Vtr8internal5Level4VTagEPS6_iRKNS1_8internal11FeatureMaskE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&)
test al, al
jz loc_93CCA
jmp short loc_93E7E
loc_93E75:
test cl, 8
jz loc_93CCA
loc_93E7E:
mov rdi, [rsp+78h+var_50]; this
mov esi, r12d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectFaceEi; OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(int)
loc_93E8B:
mov rcx, [rsp+78h+var_38]
inc rcx
jmp loc_93C01
loc_93E98:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93EA7:
lea rdi, aLevelDoesfacef; "!level.doesFaceFVarTopologyMatch(face, "...
lea rsi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolOpensubdiv_1; "bool OpenSubdiv::v3_6_0::Far::(anonymou"...
mov edx, 2D0h
call ___assert_fail
|
char OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(
long long a1,
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *a2,
_BYTE *a3,
long long a4,
unsigned int a5)
{
unsigned int *v5; // rbp
long long v6; // rax
long long v7; // rbx
long long v8; // rcx
int v9; // r12d
unsigned int v10; // r13d
unsigned int v11; // r13d
int v12; // edx
unsigned int v13; // eax
int v14; // r13d
long long FaceVertices; // rbx
int v16; // edx
int v17; // r15d
long long v18; // r14
long long i; // r12
unsigned int v20; // eax
long long v21; // rdi
char isSingleCreasePatch; // al
__int16 v23; // cx
long long v24; // rcx
__int16 v25; // dx
int v28; // [rsp+8h] [rbp-70h]
__int16 v29[4]; // [rsp+Ch] [rbp-6Ch] BYREF
unsigned int v30; // [rsp+14h] [rbp-64h]
long long v31; // [rsp+18h] [rbp-60h]
long long v32; // [rsp+20h] [rbp-58h]
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *v33; // [rsp+28h] [rbp-50h]
long long v34; // [rsp+30h] [rbp-48h]
long long v35; // [rsp+38h] [rbp-40h]
long long v36; // [rsp+40h] [rbp-38h]
v32 = a4;
v34 = a1;
v33 = a2;
v5 = *(unsigned int **)(*(_QWORD *)a2 + 8LL);
v6 = a5;
v30 = a5;
if ( !a5 )
v6 = *v5;
v7 = 0LL;
if ( (a3[1] & 8) != 0 )
v7 = (*((_QWORD *)v5 + 58) - *((_QWORD *)v5 + 57)) >> 3;
if ( (int)v6 <= 0 )
v6 = 0LL;
v35 = v6;
v8 = 0LL;
v31 = v7;
while ( v8 != v35 )
{
v36 = v8;
if ( v30 )
v9 = *(_DWORD *)(v32 + 4 * v8);
else
v9 = v8;
v10 = *(unsigned __int16 *)(v34 + 8);
if ( (v10 & 2) == 0 || (LOBYTE(v6) = v9, (*(_BYTE *)(*((_QWORD *)v5 + 12) + v9) & 1) == 0) )
{
v11 = (v10 >> 3) & 7;
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices((OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5, v9);
if ( v12 != v11 )
goto LABEL_59;
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
(long long)v29,
-1);
LOWORD(v13) = OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v29, v11);
if ( (v13 & 0x1000) != 0 )
goto LABEL_59;
if ( (v13 & 0x800) == 0 )
{
if ( (v13 & 1) != 0 && (a3[1] & 4) != 0 )
goto LABEL_59;
if ( (v13 & 2) != 0 && (*a3 & 1) != 0 )
{
if ( (v13 & 0x780) == 0x80 )
goto LABEL_59;
if ( (int)v5[3] <= 1 )
{
v24 = 0LL;
while ( v11 != v24 )
{
v25 = v29[v24++] & 0x782;
if ( v25 == 130 )
goto LABEL_59;
}
}
}
if ( (v13 & 0x780) != 0x80 )
{
if ( (v13 & 0x60) != 0 )
{
if ( (~*a3 & 0xC) == 0 )
goto LABEL_59;
isSingleCreasePatch = OpenSubdiv::v3_6_0::Vtr::internal::Level::isSingleCreasePatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
0LL,
0LL);
v23 = *(_WORD *)a3;
if ( isSingleCreasePatch )
{
if ( (v23 & 4) != 0 )
goto LABEL_59;
}
else if ( (v23 & 8) != 0 )
{
goto LABEL_59;
}
}
else if ( (v13 & 0x2010) != 0
&& (unsigned __int8)OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(
v13,
v29,
v11,
a3) )
{
goto LABEL_59;
}
}
}
LOBYTE(v6) = (_BYTE)a3;
if ( (a3[1] & 8) != 0 )
{
LOBYTE(v6) = 0;
v14 = 0;
v28 = v9;
while ( (v6 & 1) == 0 && v14 < (int)v7 )
{
if ( (unsigned __int8)OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
v14) )
{
LOBYTE(v6) = 0;
}
else
{
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9);
v17 = v16;
if ( (unsigned __int8)OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
v14) )
__assert_fail(
"!level.doesFaceFVarTopologyMatch(face, fvarChannel)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp",
720LL,
"bool OpenSubdiv::v3_6_0::Far::(anonymous namespace)::doesFaceHaveDistinctFaceVaryingFeatures(const Vtr::"
"internal::Level &, Index, const internal::FeatureMask &, int)");
v18 = (unsigned int)v17;
if ( v17 <= 0 )
v18 = 0LL;
for ( i = 0LL; v18 != i; ++i )
v29[i] = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexCompositeFVarVTag(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
*(_DWORD *)(FaceVertices + 4 * i),
v14);
LOWORD(v20) = OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v29, v17);
v21 = v20;
if ( (v20 & 0x800) != 0 )
{
LOBYTE(v6) = 0;
LODWORD(v7) = v31;
v9 = v28;
}
else
{
LODWORD(v7) = v31;
v9 = v28;
if ( (v20 & 1) == 0 || (LOBYTE(v6) = 1, (a3[1] & 4) == 0) )
{
if ( (v21 & 2) == 0 || (LOBYTE(v6) = 1, (*a3 & 1) == 0) )
LOBYTE(v6) = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(
v21,
v29,
(unsigned int)v17,
a3);
}
}
}
++v14;
}
if ( (v6 & 1) != 0 )
LABEL_59:
LOBYTE(v6) = OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(v33, v9);
}
}
v8 = v36 + 1;
}
return v6;
}
|
selectFeatureAdaptiveComponents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr [RSI]
MOV RBP,qword ptr [RAX + 0x8]
MOV EAX,R8D
MOV dword ptr [RSP + 0x14],R8D
TEST R8D,R8D
JNZ 0x00193bca
MOV EAX,dword ptr [RBP]
LAB_00193bca:
MOV qword ptr [RSP],RDX
TEST byte ptr [RDX + 0x1],0x8
MOV EBX,0x0
JZ 0x00193beb
MOV RBX,qword ptr [RBP + 0x1d0]
SUB RBX,qword ptr [RBP + 0x1c8]
SHR RBX,0x3
LAB_00193beb:
TEST EAX,EAX
MOV ECX,0x0
CMOVLE EAX,ECX
MOV qword ptr [RSP + 0x38],RAX
XOR ECX,ECX
MOV qword ptr [RSP + 0x18],RBX
LAB_00193c01:
CMP RCX,qword ptr [RSP + 0x38]
JZ 0x00193e98
CMP dword ptr [RSP + 0x14],0x0
MOV qword ptr [RSP + 0x40],RCX
JZ 0x00193c23
MOV RAX,qword ptr [RSP + 0x20]
MOV R12D,dword ptr [RAX + RCX*0x4]
JMP 0x00193c26
LAB_00193c23:
MOV R12D,ECX
LAB_00193c26:
MOV RAX,qword ptr [RSP + 0x30]
MOVZX R13D,word ptr [RAX + 0x8]
TEST R13B,0x2
JZ 0x00193c47
MOVSXD RAX,R12D
MOV RCX,qword ptr [RBP + 0x60]
TEST byte ptr [RCX + RAX*0x1],0x1
JNZ 0x00193e8b
LAB_00193c47:
SHR R13D,0x3
AND R13D,0x7
MOV RDI,RBP
MOV ESI,R12D
CALL 0x00152db0
CMP EDX,R13D
JNZ 0x00193e7e
MOV RDI,RBP
MOV ESI,R12D
LEA R14,[RSP + 0xc]
MOV RDX,R14
PUSH -0x1
POP RCX
CALL 0x0014f9a0
MOV RDI,R14
MOV ESI,R13D
CALL 0x0014fa30
BT EAX,0xc
JC 0x00193e7e
BT EAX,0xb
JC 0x00193cca
TEST AL,0x1
JZ 0x00193ca6
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX + 0x1],0x4
JNZ 0x00193e7e
LAB_00193ca6:
TEST AL,0x2
JZ 0x00193cb7
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX],0x1
JNZ 0x00193e13
LAB_00193cb7:
MOV ECX,EAX
AND ECX,0x780
CMP CX,0x80
JNZ 0x00193dda
LAB_00193cca:
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x1],0x8
JZ 0x00193e8b
XOR EAX,EAX
XOR R13D,R13D
MOV dword ptr [RSP + 0x8],R12D
LAB_00193ce2:
TEST AL,0x1
JNZ 0x00193dcd
CMP R13D,EBX
JGE 0x00193dcd
MOV RDI,RBP
MOV ESI,R12D
MOV EDX,R13D
CALL 0x00151760
TEST AL,AL
JZ 0x00193d0c
XOR EAX,EAX
JMP 0x00193dc5
LAB_00193d0c:
MOV RDI,RBP
MOV ESI,R12D
CALL 0x00152db0
MOV RBX,RAX
MOV R15D,EDX
MOV RDI,RBP
MOV ESI,R12D
MOV EDX,R13D
CALL 0x00151760
TEST AL,AL
JNZ 0x00193ea7
TEST R15D,R15D
MOV R14D,R15D
MOV EAX,0x0
CMOVLE R14D,EAX
XOR R12D,R12D
LAB_00193d45:
CMP R14,R12
JZ 0x00193d64
MOV ESI,dword ptr [RBX + R12*0x4]
MOV RDI,RBP
MOV EDX,R13D
CALL 0x0014fd60
MOV word ptr [RSP + R12*0x2 + 0xc],AX
INC R12
JMP 0x00193d45
LAB_00193d64:
LEA RDI,[RSP + 0xc]
MOV ESI,R15D
CALL 0x0014fa30
MOV EDI,EAX
BT EDI,0xb
JC 0x00193db9
TEST DIL,0x1
MOV RBX,qword ptr [RSP + 0x18]
MOV R12D,dword ptr [RSP + 0x8]
JZ 0x00193d95
MOV AL,0x1
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX + 0x1],0x4
JNZ 0x00193dc5
LAB_00193d95:
TEST DIL,0x2
JZ 0x00193da6
MOV AL,0x1
MOV RCX,qword ptr [RSP]
TEST byte ptr [RCX],0x1
JNZ 0x00193dc5
LAB_00193da6:
LEA RSI,[RSP + 0xc]
MOV EDX,R15D
MOV RCX,qword ptr [RSP]
CALL 0x00193f64
JMP 0x00193dc5
LAB_00193db9:
XOR EAX,EAX
MOV RBX,qword ptr [RSP + 0x18]
MOV R12D,dword ptr [RSP + 0x8]
LAB_00193dc5:
INC R13D
JMP 0x00193ce2
LAB_00193dcd:
TEST AL,0x1
JNZ 0x00193e7e
JMP 0x00193e8b
LAB_00193dda:
TEST AL,0x60
JZ 0x00193e4e
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX]
NOT EAX
TEST AL,0xc
JZ 0x00193e7e
MOV RDI,RBP
MOV ESI,R12D
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00152ab0
MOV RCX,qword ptr [RSP]
MOVZX ECX,word ptr [RCX]
TEST AL,AL
JZ 0x00193e75
TEST CL,0x4
JZ 0x00193cca
JMP 0x00193e7e
LAB_00193e13:
MOV ECX,EAX
AND ECX,0x780
CMP CX,0x80
JZ 0x00193e7e
CMP dword ptr [RBP + 0xc],0x1
JG 0x00193cb7
XOR ECX,ECX
LAB_00193e2e:
CMP R13,RCX
JZ 0x00193cb7
MOVZX EDX,word ptr [RSP + RCX*0x2 + 0xc]
AND EDX,0x782
INC RCX
CMP DX,0x82
JNZ 0x00193e2e
JMP 0x00193e7e
LAB_00193e4e:
TEST AX,0x2010
JZ 0x00193cca
MOV EDI,EAX
LEA RSI,[RSP + 0xc]
MOV EDX,R13D
MOV RCX,qword ptr [RSP]
CALL 0x00193f64
TEST AL,AL
JZ 0x00193cca
JMP 0x00193e7e
LAB_00193e75:
TEST CL,0x8
JZ 0x00193cca
LAB_00193e7e:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,R12D
CALL 0x0014f3a0
LAB_00193e8b:
MOV RCX,qword ptr [RSP + 0x40]
INC RCX
JMP 0x00193c01
LAB_00193e98:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193ea7:
LEA RDI,[0x1c7d72]
LEA RSI,[0x1c7b88]
LEA RCX,[0x1c7da6]
MOV EDX,0x2d0
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&,
OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
*/
void OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents
(long param_1,SparseSelector *param_2,uint *param_3,long param_4,uint param_5)
{
long lVar1;
Level *this;
ushort uVar2;
char cVar3;
int2 uVar4;
uint uVar5;
int iVar6;
uint extraout_EDX;
ulong uVar7;
ulong uVar8;
uint uVar9;
int iVar10;
int1 auVar11 [12];
VTag local_6c [8];
uint local_64;
ulong local_60;
long local_58;
SparseSelector *local_50;
long local_48;
ulong local_40;
ulong local_38;
this = *(Level **)(*(long *)param_2 + 8);
uVar9 = param_5;
if (param_5 == 0) {
uVar9 = *(uint *)this;
}
uVar7 = 0;
if ((*param_3 & 0x800) != 0) {
uVar7 = (ulong)(*(long *)(this + 0x1d0) - *(long *)(this + 0x1c8)) >> 3;
}
local_40 = (ulong)uVar9;
if ((int)uVar9 < 1) {
local_40 = 0;
}
local_38 = 0;
local_64 = param_5;
local_60 = uVar7;
local_58 = param_4;
local_50 = param_2;
local_48 = param_1;
do {
if (local_38 == local_40) {
return;
}
if (local_64 == 0) {
iVar6 = (int)local_38;
}
else {
iVar6 = *(int *)(local_58 + local_38 * 4);
}
if (((*(ushort *)(local_48 + 8) & 2) != 0) &&
((*(byte *)(*(long *)(this + 0x60) + (long)iVar6) & 1) != 0)) goto LAB_00193e8b;
uVar9 = *(ushort *)(local_48 + 8) >> 3 & 7;
Vtr::internal::Level::getFaceVertices(this,iVar6);
if (extraout_EDX == uVar9) {
Vtr::internal::Level::getFaceVTags(this,iVar6,local_6c,-1);
uVar5 = Vtr::internal::Level::VTag::BitwiseOr(local_6c,uVar9);
if ((uVar5 >> 0xc & 1) != 0) goto LAB_00193e7e;
if ((uVar5 >> 0xb & 1) != 0) goto LAB_00193cca;
if (((uVar5 & 1) != 0) && ((*param_3 & 0x400) != 0)) goto LAB_00193e7e;
if (((uVar5 & 2) != 0) && ((*param_3 & 1) != 0)) {
if (((ushort)uVar5 & 0x780) != 0x80) {
if (1 < *(int *)(this + 0xc)) goto LAB_00193cb7;
uVar8 = 0;
do {
if (uVar9 == uVar8) goto LAB_00193cb7;
lVar1 = uVar8 * 2;
uVar8 = uVar8 + 1;
} while ((*(ushort *)(local_6c + lVar1) & 0x782) != 0x82);
}
goto LAB_00193e7e;
}
LAB_00193cb7:
if (((ushort)uVar5 & 0x780) != 0x80) {
if ((uVar5 & 0x60) == 0) {
if (((uVar5 & 0x2010) == 0) ||
(cVar3 = (anonymous_namespace)::doesInfSharpFaceHaveFeatures
(uVar5,local_6c,uVar9,param_3), cVar3 == '\0')) goto LAB_00193cca;
}
else if ((~*param_3 & 0xc) != 0) {
cVar3 = Vtr::internal::Level::isSingleCreasePatch(this,iVar6,(float *)0x0,(int *)0x0);
if (cVar3 == '\0') {
uVar2 = (ushort)*param_3 & 8;
}
else {
uVar2 = (ushort)*param_3 & 4;
}
if (uVar2 == 0) goto LAB_00193cca;
}
goto LAB_00193e7e;
}
LAB_00193cca:
if ((*param_3 & 0x800) != 0) {
uVar8 = 0;
for (iVar10 = 0; ((uVar8 & 1) == 0 && (iVar10 < (int)uVar7)); iVar10 = iVar10 + 1) {
cVar3 = Vtr::internal::Level::doesFaceFVarTopologyMatch(this,iVar6,iVar10);
if (cVar3 == '\0') {
auVar11 = Vtr::internal::Level::getFaceVertices(this,iVar6);
uVar9 = auVar11._8_4_;
uVar7 = (ulong)uVar9;
cVar3 = Vtr::internal::Level::doesFaceFVarTopologyMatch(this,iVar6,iVar10);
if (cVar3 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("!level.doesFaceFVarTopologyMatch(face, fvarChannel)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp"
,0x2d0,
"bool OpenSubdiv::v3_6_0::Far::(anonymous namespace)::doesFaceHaveDistinctFaceVaryingFeatures(const Vtr::internal::Level &, Index, const internal::FeatureMask &, int)"
);
}
if ((int)uVar9 < 1) {
uVar7 = 0;
}
for (uVar8 = 0; uVar7 != uVar8; uVar8 = uVar8 + 1) {
uVar4 = Vtr::internal::Level::getVertexCompositeFVarVTag
(this,*(int *)(auVar11._0_8_ + uVar8 * 4),iVar10);
*(int2 *)(local_6c + uVar8 * 2) = uVar4;
}
uVar5 = Vtr::internal::Level::VTag::BitwiseOr(local_6c,uVar9);
uVar7 = local_60;
if ((uVar5 >> 0xb & 1) == 0) {
if ((((uVar5 & 1) == 0) || (uVar8 = 1, (*param_3 & 0x400) == 0)) &&
(((uVar5 & 2) == 0 || (uVar8 = 1, (*param_3 & 1) == 0)))) {
uVar8 = (anonymous_namespace)::doesInfSharpFaceHaveFeatures
(uVar5,local_6c,uVar9,param_3);
}
}
else {
uVar8 = 0;
}
}
else {
uVar8 = 0;
}
}
if ((uVar8 & 1) != 0) goto LAB_00193e7e;
}
}
else {
LAB_00193e7e:
Vtr::internal::SparseSelector::selectFace(local_50,iVar6);
}
LAB_00193e8b:
local_38 = local_38 + 1;
} while( true );
}
|
|
61,280
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp
|
void
TopologyRefiner::selectFeatureAdaptiveComponents(Vtr::internal::SparseSelector& selector,
internal::FeatureMask const & featureMask,
ConstIndexArray facesToRefine) {
//
// Inspect each face and the properties tagged at all of its corners:
//
Vtr::internal::Level const& level = selector.getRefinement().parent();
int numFacesToRefine = facesToRefine.size() ? facesToRefine.size() : level.getNumFaces();
int numFVarChannels = featureMask.selectFVarFeatures ? level.getNumFVarChannels() : 0;
for (int fIndex = 0; fIndex < numFacesToRefine; ++fIndex) {
Vtr::Index face = facesToRefine.size() ? facesToRefine[fIndex] : (Index) fIndex;
if (HasHoles() && level.isFaceHole(face)) continue;
//
// Test if the face has any of the specified features present. If not, and FVar
// channels are to be considered, look for features in the FVar channels:
//
bool selectFace = doesFaceHaveFeatures(level, face, featureMask, _regFaceSize);
if (!selectFace && featureMask.selectFVarFeatures) {
for (int channel = 0; !selectFace && (channel < numFVarChannels); ++channel) {
// Only test the face for this channel if the topology does not match:
if (!level.doesFaceFVarTopologyMatch(face, channel)) {
selectFace = doesFaceHaveDistinctFaceVaryingFeatures(
level, face, featureMask, channel);
}
}
}
if (selectFace) {
selector.selectFace(face);
}
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&, OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x38(%rsp)
movq %rdi, 0x58(%rsp)
movq %rsi, 0x40(%rsp)
movq (%rsi), %rax
movq 0x8(%rax), %rbp
movl %r8d, %eax
movl %r8d, 0x24(%rsp)
testl %r8d, %r8d
jne 0x86c54
movl (%rbp), %eax
xorl %r13d, %r13d
movq %rdx, 0x10(%rsp)
testb $0x8, 0x1(%rdx)
je 0x86c74
movq 0x1d0(%rbp), %r13
subq 0x1c8(%rbp), %r13
shrq $0x3, %r13
testl %eax, %eax
jle 0x86f64
movl %eax, %eax
movq %rax, 0x50(%rsp)
xorl %r14d, %r14d
leaq 0x30(%rsp), %r15
movq %r13, 0x28(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x86ca2
movq 0x38(%rsp), %rax
movl (%rax,%r14,4), %esi
jmp 0x86ca5
movl %r14d, %esi
movq 0x58(%rsp), %rax
movzwl 0x8(%rax), %r12d
testb $0x2, %r12b
je 0x86cc6
movslq %esi, %rax
movq 0x60(%rbp), %rcx
testb $0x1, (%rcx,%rax)
jne 0x86ee3
shrl $0x3, %r12d
andl $0x7, %r12d
leal (%rsi,%rsi), %ebx
movq 0x18(%rbp), %rax
movslq %ebx, %rcx
movq %rcx, 0x60(%rsp)
cmpl %r12d, (%rax,%rcx,4)
jne 0x86ed9
movq %rbp, %rdi
movq %rsi, 0x8(%rsp)
movq %r15, %rdx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x38530
movq %r15, %rdi
movl %r12d, %esi
callq 0x38580
btl $0xc, %eax
jb 0x86ed4
btl $0xb, %eax
jb 0x86d50
testb $0x1, %al
je 0x86d2a
movq 0x10(%rsp), %rcx
testb $0x4, 0x1(%rcx)
jne 0x86ed4
testb $0x2, %al
je 0x86d3c
movq 0x10(%rsp), %rcx
testb $0x1, (%rcx)
jne 0x86ec4
movl %eax, %ecx
andl $0x780, %ecx # imm = 0x780
cmpl $0x80, %ecx
jne 0x86e81
movq 0x10(%rsp), %rax
movzwl (%rax), %r12d
movq 0x8(%rsp), %rsi
btl $0xb, %r12d
jae 0x86ee3
testl %r13d, %r13d
jle 0x86ee3
orl $0x1, %ebx
movslq %ebx, %rax
movq %rax, 0x48(%rsp)
xorl %r12d, %r12d
movq %r14, 0x18(%rsp)
movq %rbp, %rdi
movq %rsi, %rbx
movl %r12d, %edx
callq 0x397e0
testb %al, %al
je 0x86da7
incl %r12d
cmpl %r13d, %r12d
movq %rbx, %rsi
jl 0x86d85
jmp 0x86ee3
movq 0x18(%rbp), %rax
movq 0x48(%rsp), %rcx
movslq (%rax,%rcx,4), %r13
shlq $0x2, %r13
addq 0x30(%rbp), %r13
movq 0x60(%rsp), %rcx
movl (%rax,%rcx,4), %r14d
movq %rbp, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x397e0
testb %al, %al
jne 0x86f73
testl %r14d, %r14d
jle 0x86dfe
xorl %ebx, %ebx
movl (%r13,%rbx,4), %esi
movq %rbp, %rdi
movl %r12d, %edx
callq 0x38850
movw %ax, 0x30(%rsp,%rbx,2)
incq %rbx
cmpq %rbx, %r14
jne 0x86de1
movq %r15, %rdi
movl %r14d, %esi
callq 0x38580
btl $0xb, %eax
jb 0x86e5a
testb $0x1, %al
sete %dl
movq 0x10(%rsp), %rcx
movzwl (%rcx), %ecx
btl $0xa, %ecx
setae %sil
orb %dl, %sil
cmpb $0x1, %sil
movq 0x28(%rsp), %r13
jne 0x86ebd
testb $0x2, %al
sete %dl
testb $0x1, %cl
sete %sil
orb %dl, %sil
cmpb $0x1, %sil
jne 0x86ebd
movl %eax, %edi
movq %r15, %rsi
movl %r14d, %edx
callq 0x8701c
jmp 0x86e61
xorl %eax, %eax
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %r14
movq 0x8(%rsp), %rsi
testb %al, %al
jne 0x86e7b
incl %r12d
cmpl %r13d, %r12d
jl 0x86d85
testb %al, %al
jne 0x86ed9
jmp 0x86ee3
testb $0x60, %al
je 0x86ef3
movq 0x10(%rsp), %rax
movl (%rax), %eax
notl %eax
testb $0xc, %al
je 0x86ed4
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a420
movq 0x10(%rsp), %rcx
movzwl (%rcx), %r12d
testb %al, %al
je 0x86f50
testb $0x4, %r12b
jmp 0x86f54
movq 0x18(%rsp), %r14
jmp 0x86ed4
movl %eax, %ecx
andl $0x780, %ecx # imm = 0x780
cmpl $0x80, %ecx
jne 0x86f1a
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x38210
incq %r14
cmpq 0x50(%rsp), %r14
jne 0x86c90
jmp 0x86f64
testl $0x2010, %eax # imm = 0x2010
je 0x86d50
movq 0x10(%rsp), %rcx
movzwl (%rcx), %ecx
movl %eax, %edi
movq %r15, %rsi
movl %r12d, %edx
movl %ecx, %r12d
callq 0x8701c
testb %al, %al
jmp 0x86f54
testw %r12w, %r12w
je 0x86d3c
cmpl $0x1, 0xc(%rbp)
jg 0x86d3c
xorl %ecx, %ecx
movzwl 0x30(%rsp,%rcx,2), %edx
andl $0x782, %edx # imm = 0x782
cmpl $0x82, %edx
je 0x86ed4
incq %rcx
cmpq %rcx, %r12
jne 0x86f30
jmp 0x86d3c
testb $0x8, %r12b
movq 0x8(%rsp), %rsi
je 0x86d5e
jmp 0x86ed9
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39d58(%rip), %rdi # 0xc0cd2
leaq 0x39b67(%rip), %rsi # 0xc0ae8
leaq 0x39d7e(%rip), %rcx # 0xc0d06
movl $0x2d0, %edx # imm = 0x2D0
callq 0x39540
|
_ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner31selectFeatureAdaptiveComponentsERNS0_3Vtr8internal14SparseSelectorERKNS1_8internal11FeatureMaskENS3_10ConstArrayIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_60], rcx
mov [rsp+98h+var_40], rdi
mov [rsp+98h+var_58], rsi
mov rax, [rsi]
mov rbp, [rax+8]
mov eax, r8d
mov [rsp+98h+var_74], r8d
test r8d, r8d
jnz short loc_86C54
mov eax, [rbp+0]
loc_86C54:
xor r13d, r13d
mov [rsp+98h+var_88], rdx
test byte ptr [rdx+1], 8
jz short loc_86C74
mov r13, [rbp+1D0h]
sub r13, [rbp+1C8h]
shr r13, 3
loc_86C74:
test eax, eax
jle loc_86F64
mov eax, eax
mov [rsp+98h+var_48], rax
xor r14d, r14d
lea r15, [rsp+98h+var_68]
mov [rsp+98h+var_70], r13
loc_86C90:
cmp [rsp+98h+var_74], 0
jz short loc_86CA2
mov rax, [rsp+98h+var_60]
mov esi, [rax+r14*4]
jmp short loc_86CA5
loc_86CA2:
mov esi, r14d
loc_86CA5:
mov rax, [rsp+98h+var_40]
movzx r12d, word ptr [rax+8]
test r12b, 2
jz short loc_86CC6
movsxd rax, esi
mov rcx, [rbp+60h]
test byte ptr [rcx+rax], 1
jnz loc_86EE3
loc_86CC6:
shr r12d, 3
and r12d, 7
lea ebx, [rsi+rsi]
mov rax, [rbp+18h]
movsxd rcx, ebx
mov [rsp+98h+var_38], rcx
cmp [rax+rcx*4], r12d
jnz loc_86ED9
mov rdi, rbp
mov qword ptr [rsp+98h+var_90], rsi
mov rdx, r15
mov ecx, 0FFFFFFFFh
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *,int)
mov rdi, r15
mov esi, r12d
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int)
bt eax, 0Ch
jb loc_86ED4
bt eax, 0Bh
jb short loc_86D50
test al, 1
jz short loc_86D2A
mov rcx, [rsp+98h+var_88]
test byte ptr [rcx+1], 4
jnz loc_86ED4
loc_86D2A:
test al, 2
jz short loc_86D3C
mov rcx, [rsp+98h+var_88]
test byte ptr [rcx], 1
jnz loc_86EC4
loc_86D3C:
mov ecx, eax
and ecx, 780h
cmp ecx, 80h
jnz loc_86E81
loc_86D50:
mov rax, [rsp+98h+var_88]
movzx r12d, word ptr [rax]
mov rsi, qword ptr [rsp+98h+var_90]; int
loc_86D5E:
bt r12d, 0Bh
jnb loc_86EE3
test r13d, r13d
jle loc_86EE3
or ebx, 1
movsxd rax, ebx
mov [rsp+98h+var_50], rax
xor r12d, r12d
mov [rsp+98h+var_80], r14
loc_86D85:
mov rdi, rbp; this
mov rbx, rsi
mov edx, r12d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, al
jz short loc_86DA7
inc r12d
cmp r12d, r13d
mov rsi, rbx
jl short loc_86D85
jmp loc_86EE3
loc_86DA7:
mov rax, [rbp+18h]
mov rcx, [rsp+98h+var_50]
movsxd r13, dword ptr [rax+rcx*4]
shl r13, 2
add r13, [rbp+30h]
mov rcx, [rsp+98h+var_38]
mov r14d, [rax+rcx*4]
mov rdi, rbp; this
mov esi, ebx; int
mov edx, r12d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesFaceFVarTopologyMatchEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(int,int)
test al, al
jnz loc_86F73
test r14d, r14d
jle short loc_86DFE
xor ebx, ebx
loc_86DE1:
mov esi, [r13+rbx*4+0]; int
mov rdi, rbp; this
mov edx, r12d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level26getVertexCompositeFVarVTagEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexCompositeFVarVTag(int,int)
mov [rsp+rbx*2+98h+var_68], ax
inc rbx
cmp r14, rbx
jnz short loc_86DE1
loc_86DFE:
mov rdi, r15
mov esi, r14d
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int)
bt eax, 0Bh
jb short loc_86E5A
test al, 1
setz dl
mov rcx, [rsp+98h+var_88]
movzx ecx, word ptr [rcx]
bt ecx, 0Ah
setnb sil
or sil, dl
cmp sil, 1
mov r13, [rsp+98h+var_70]
jnz loc_86EBD
test al, 2
setz dl
test cl, 1
setz sil
or sil, dl
cmp sil, 1
jnz short loc_86EBD
mov edi, eax
mov rsi, r15
mov edx, r14d
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_128doesInfSharpFaceHaveFeaturesENS0_3Vtr8internal5Level4VTagEPS6_iRKNS1_8internal11FeatureMaskE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&)
jmp short loc_86E61
loc_86E5A:
xor eax, eax
mov r13, [rsp+98h+var_70]
loc_86E61:
mov r14, [rsp+98h+var_80]
mov rsi, qword ptr [rsp+98h+var_90]
test al, al
jnz short loc_86E7B
inc r12d
cmp r12d, r13d
jl loc_86D85
loc_86E7B:
test al, al
jnz short loc_86ED9
jmp short loc_86EE3
loc_86E81:
test al, 60h
jz short loc_86EF3
mov rax, [rsp+98h+var_88]
mov eax, [rax]
not eax
test al, 0Ch
jz short loc_86ED4
mov rdi, rbp; this
mov rsi, qword ptr [rsp+98h+var_90]; int
xor edx, edx; float *
xor ecx, ecx; int *
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level19isSingleCreasePatchEiPfPi; OpenSubdiv::v3_6_0::Vtr::internal::Level::isSingleCreasePatch(int,float *,int *)
mov rcx, [rsp+98h+var_88]
movzx r12d, word ptr [rcx]
test al, al
jz loc_86F50
test r12b, 4
jmp loc_86F54
loc_86EBD:
mov r14, [rsp+98h+var_80]
jmp short loc_86ED4
loc_86EC4:
mov ecx, eax
and ecx, 780h
cmp ecx, 80h
jnz short loc_86F1A
loc_86ED4:
mov rsi, qword ptr [rsp+98h+var_90]; int
loc_86ED9:
mov rdi, [rsp+98h+var_58]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectFaceEi; OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(int)
loc_86EE3:
inc r14
cmp r14, [rsp+98h+var_48]
jnz loc_86C90
jmp short loc_86F64
loc_86EF3:
test eax, 2010h
jz loc_86D50
mov rcx, [rsp+98h+var_88]
movzx ecx, word ptr [rcx]
mov edi, eax
mov rsi, r15
mov edx, r12d
mov r12d, ecx
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_128doesInfSharpFaceHaveFeaturesENS0_3Vtr8internal5Level4VTagEPS6_iRKNS1_8internal11FeatureMaskE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*,int,OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&)
test al, al
jmp short loc_86F54
loc_86F1A:
test r12w, r12w
jz loc_86D3C
cmp dword ptr [rbp+0Ch], 1
jg loc_86D3C
xor ecx, ecx
loc_86F30:
movzx edx, [rsp+rcx*2+98h+var_68]
and edx, 782h
cmp edx, 82h
jz short loc_86ED4
inc rcx
cmp r12, rcx
jnz short loc_86F30
jmp loc_86D3C
loc_86F50:
test r12b, 8
loc_86F54:
mov rsi, qword ptr [rsp+98h+var_90]
jz loc_86D5E
jmp loc_86ED9
loc_86F64:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_86F73:
lea rdi, aLevelDoesfacef; "!level.doesFaceFVarTopologyMatch(face, "...
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolOpensubdiv_1; "bool OpenSubdiv::v3_6_0::Far::(anonymou"...
mov edx, 2D0h
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(
long long a1,
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *a2,
_BYTE *a3,
long long a4,
unsigned int a5)
{
unsigned int *v5; // rbp
long long result; // rax
long long v7; // r13
long long v8; // r14
int v9; // esi
unsigned int v10; // r12d
long long v11; // r12
long long v12; // rax
unsigned int v13; // eax
__int16 v14; // r12
int v15; // r12d
long long v16; // rax
long long v17; // r13
long long v18; // r14
long long i; // rbx
unsigned int v20; // eax
bool v21; // zf
long long v22; // rdx
long long v23; // rcx
int v24; // [rsp+8h] [rbp-90h]
long long v26; // [rsp+18h] [rbp-80h]
int v28; // [rsp+28h] [rbp-70h]
__int16 v29[4]; // [rsp+30h] [rbp-68h] BYREF
long long v30; // [rsp+38h] [rbp-60h]
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *v31; // [rsp+40h] [rbp-58h]
long long v32; // [rsp+48h] [rbp-50h]
long long v33; // [rsp+50h] [rbp-48h]
long long v34; // [rsp+58h] [rbp-40h]
long long v35; // [rsp+60h] [rbp-38h]
v30 = a4;
v34 = a1;
v31 = a2;
v5 = *(unsigned int **)(*(_QWORD *)a2 + 8LL);
result = a5;
if ( !a5 )
result = *v5;
LODWORD(v7) = 0;
if ( (a3[1] & 8) != 0 )
v7 = (*((_QWORD *)v5 + 58) - *((_QWORD *)v5 + 57)) >> 3;
if ( (int)result > 0 )
{
v33 = (unsigned int)result;
v8 = 0LL;
v28 = v7;
while ( 1 )
{
if ( a5 )
v9 = *(_DWORD *)(v30 + 4 * v8);
else
v9 = v8;
v10 = *(unsigned __int16 *)(v34 + 8);
if ( (v10 & 2) != 0 )
{
result = v9;
if ( (*(_BYTE *)(*((_QWORD *)v5 + 12) + v9) & 1) != 0 )
goto LABEL_48;
}
v11 = (v10 >> 3) & 7;
v12 = *((_QWORD *)v5 + 3);
v35 = 2 * v9;
if ( *(_DWORD *)(v12 + 4 * v35) == (_DWORD)v11 )
break;
LABEL_47:
result = OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectFace(v31, v9);
LABEL_48:
if ( ++v8 == v33 )
return result;
}
v24 = v9;
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(v5, v9, (long long)v29, -1);
LOWORD(v13) = OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v29, v11);
if ( (v13 & 0x1000) == 0 )
{
if ( (v13 & 0x800) != 0 )
goto LABEL_20;
if ( (v13 & 1) == 0 || (a3[1] & 4) == 0 )
{
if ( (v13 & 2) == 0 || (*a3 & 1) == 0 )
goto LABEL_19;
if ( (v13 & 0x780) != 0x80 )
{
if ( !(_WORD)v11 || (int)v5[3] > 1 )
{
LABEL_19:
if ( (v13 & 0x780) == 0x80 )
goto LABEL_20;
if ( (v13 & 0x60) == 0 )
{
if ( (v13 & 0x2010) == 0 )
{
LABEL_20:
result = (long long)a3;
v14 = *(_WORD *)a3;
LABEL_21:
if ( (v14 & 0x800) != 0 && (int)v7 > 0 )
{
v32 = (2 * v9) | 1;
v15 = 0;
v26 = v8;
do
{
while ( 1 )
{
result = OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
v15);
if ( !(_BYTE)result )
break;
if ( ++v15 >= (int)v7 )
goto LABEL_48;
}
v16 = *((_QWORD *)v5 + 3);
v17 = *((_QWORD *)v5 + 6) + 4LL * *(int *)(v16 + 4 * v32);
v18 = *(unsigned int *)(v16 + 4 * v35);
if ( (unsigned __int8)OpenSubdiv::v3_6_0::Vtr::internal::Level::doesFaceFVarTopologyMatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
v15) )
__assert_fail(
"!level.doesFaceFVarTopologyMatch(face, fvarChannel)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp",
720LL,
"bool OpenSubdiv::v3_6_0::Far::(anonymous namespace)::doesFaceHaveDistinctFaceVaryingFeatures(con"
"st Vtr::internal::Level &, Index, const internal::FeatureMask &, int)");
if ( (int)v18 > 0 )
{
for ( i = 0LL; i != v18; ++i )
v29[i] = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexCompositeFVarVTag(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
*(_DWORD *)(v17 + 4 * i),
v15);
}
LOWORD(v20) = OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v29, v18);
if ( (v20 & 0x800) != 0 )
{
result = 0LL;
LODWORD(v7) = v28;
}
else
{
LODWORD(v7) = v28;
if ( (v20 & 1) != 0 && (*(_WORD *)a3 & 0x400) != 0 || (v20 & 2) != 0 && (*(_WORD *)a3 & 1) != 0 )
{
v8 = v26;
goto LABEL_46;
}
result = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(
v20,
v29,
(unsigned int)v18);
}
v8 = v26;
v9 = v24;
if ( (_BYTE)result )
break;
++v15;
}
while ( v15 < (int)v7 );
if ( (_BYTE)result )
goto LABEL_47;
}
goto LABEL_48;
}
v22 = (unsigned int)v11;
v14 = *(_WORD *)a3;
result = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::doesInfSharpFaceHaveFeatures(v13, v29, v22);
v21 = (_BYTE)result == 0;
goto LABEL_59;
}
if ( (~*a3 & 0xC) != 0 )
{
result = OpenSubdiv::v3_6_0::Vtr::internal::Level::isSingleCreasePatch(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v5,
v9,
0LL,
0LL);
v14 = *(_WORD *)a3;
if ( (_BYTE)result )
v21 = (v14 & 4) == 0;
else
v21 = (v14 & 8) == 0;
LABEL_59:
if ( v21 )
goto LABEL_21;
goto LABEL_47;
}
goto LABEL_46;
}
v23 = 0LL;
while ( (v29[v23] & 0x782) != 0x82 )
{
if ( v11 == ++v23 )
goto LABEL_19;
}
}
}
}
LABEL_46:
v9 = v24;
goto LABEL_47;
}
return result;
}
|
selectFeatureAdaptiveComponents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV RAX,qword ptr [RSI]
MOV RBP,qword ptr [RAX + 0x8]
MOV EAX,R8D
MOV dword ptr [RSP + 0x24],R8D
TEST R8D,R8D
JNZ 0x00186c54
MOV EAX,dword ptr [RBP]
LAB_00186c54:
XOR R13D,R13D
MOV qword ptr [RSP + 0x10],RDX
TEST byte ptr [RDX + 0x1],0x8
JZ 0x00186c74
MOV R13,qword ptr [RBP + 0x1d0]
SUB R13,qword ptr [RBP + 0x1c8]
SHR R13,0x3
LAB_00186c74:
TEST EAX,EAX
JLE 0x00186f64
MOV EAX,EAX
MOV qword ptr [RSP + 0x50],RAX
XOR R14D,R14D
LEA R15,[RSP + 0x30]
MOV qword ptr [RSP + 0x28],R13
LAB_00186c90:
CMP dword ptr [RSP + 0x24],0x0
JZ 0x00186ca2
MOV RAX,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RAX + R14*0x4]
JMP 0x00186ca5
LAB_00186ca2:
MOV ESI,R14D
LAB_00186ca5:
MOV RAX,qword ptr [RSP + 0x58]
MOVZX R12D,word ptr [RAX + 0x8]
TEST R12B,0x2
JZ 0x00186cc6
MOVSXD RAX,ESI
MOV RCX,qword ptr [RBP + 0x60]
TEST byte ptr [RCX + RAX*0x1],0x1
JNZ 0x00186ee3
LAB_00186cc6:
SHR R12D,0x3
AND R12D,0x7
LEA EBX,[RSI + RSI*0x1]
MOV RAX,qword ptr [RBP + 0x18]
MOVSXD RCX,EBX
MOV qword ptr [RSP + 0x60],RCX
CMP dword ptr [RAX + RCX*0x4],R12D
JNZ 0x00186ed9
MOV RDI,RBP
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,R15
MOV ECX,0xffffffff
CALL 0x00138530
MOV RDI,R15
MOV ESI,R12D
CALL 0x00138580
BT EAX,0xc
JC 0x00186ed4
BT EAX,0xb
JC 0x00186d50
TEST AL,0x1
JZ 0x00186d2a
MOV RCX,qword ptr [RSP + 0x10]
TEST byte ptr [RCX + 0x1],0x4
JNZ 0x00186ed4
LAB_00186d2a:
TEST AL,0x2
JZ 0x00186d3c
MOV RCX,qword ptr [RSP + 0x10]
TEST byte ptr [RCX],0x1
JNZ 0x00186ec4
LAB_00186d3c:
MOV ECX,EAX
AND ECX,0x780
CMP ECX,0x80
JNZ 0x00186e81
LAB_00186d50:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX R12D,word ptr [RAX]
MOV RSI,qword ptr [RSP + 0x8]
LAB_00186d5e:
BT R12D,0xb
JNC 0x00186ee3
TEST R13D,R13D
JLE 0x00186ee3
OR EBX,0x1
MOVSXD RAX,EBX
MOV qword ptr [RSP + 0x48],RAX
XOR R12D,R12D
MOV qword ptr [RSP + 0x18],R14
LAB_00186d85:
MOV RDI,RBP
MOV RBX,RSI
MOV EDX,R12D
CALL 0x001397e0
TEST AL,AL
JZ 0x00186da7
INC R12D
CMP R12D,R13D
MOV RSI,RBX
JL 0x00186d85
JMP 0x00186ee3
LAB_00186da7:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RSP + 0x48]
MOVSXD R13,dword ptr [RAX + RCX*0x4]
SHL R13,0x2
ADD R13,qword ptr [RBP + 0x30]
MOV RCX,qword ptr [RSP + 0x60]
MOV R14D,dword ptr [RAX + RCX*0x4]
MOV RDI,RBP
MOV ESI,EBX
MOV EDX,R12D
CALL 0x001397e0
TEST AL,AL
JNZ 0x00186f73
TEST R14D,R14D
JLE 0x00186dfe
XOR EBX,EBX
LAB_00186de1:
MOV ESI,dword ptr [R13 + RBX*0x4]
MOV RDI,RBP
MOV EDX,R12D
CALL 0x00138850
MOV word ptr [RSP + RBX*0x2 + 0x30],AX
INC RBX
CMP R14,RBX
JNZ 0x00186de1
LAB_00186dfe:
MOV RDI,R15
MOV ESI,R14D
CALL 0x00138580
BT EAX,0xb
JC 0x00186e5a
TEST AL,0x1
SETZ DL
MOV RCX,qword ptr [RSP + 0x10]
MOVZX ECX,word ptr [RCX]
BT ECX,0xa
SETNC SIL
OR SIL,DL
CMP SIL,0x1
MOV R13,qword ptr [RSP + 0x28]
JNZ 0x00186ebd
TEST AL,0x2
SETZ DL
TEST CL,0x1
SETZ SIL
OR SIL,DL
CMP SIL,0x1
JNZ 0x00186ebd
MOV EDI,EAX
MOV RSI,R15
MOV EDX,R14D
CALL 0x0018701c
JMP 0x00186e61
LAB_00186e5a:
XOR EAX,EAX
MOV R13,qword ptr [RSP + 0x28]
LAB_00186e61:
MOV R14,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
TEST AL,AL
JNZ 0x00186e7b
INC R12D
CMP R12D,R13D
JL 0x00186d85
LAB_00186e7b:
TEST AL,AL
JNZ 0x00186ed9
JMP 0x00186ee3
LAB_00186e81:
TEST AL,0x60
JZ 0x00186ef3
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
NOT EAX
TEST AL,0xc
JZ 0x00186ed4
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x8]
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0013a420
MOV RCX,qword ptr [RSP + 0x10]
MOVZX R12D,word ptr [RCX]
TEST AL,AL
JZ 0x00186f50
TEST R12B,0x4
JMP 0x00186f54
LAB_00186ebd:
MOV R14,qword ptr [RSP + 0x18]
JMP 0x00186ed4
LAB_00186ec4:
MOV ECX,EAX
AND ECX,0x780
CMP ECX,0x80
JNZ 0x00186f1a
LAB_00186ed4:
MOV RSI,qword ptr [RSP + 0x8]
LAB_00186ed9:
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00138210
LAB_00186ee3:
INC R14
CMP R14,qword ptr [RSP + 0x50]
JNZ 0x00186c90
JMP 0x00186f64
LAB_00186ef3:
TEST EAX,0x2010
JZ 0x00186d50
MOV RCX,qword ptr [RSP + 0x10]
MOVZX ECX,word ptr [RCX]
MOV EDI,EAX
MOV RSI,R15
MOV EDX,R12D
MOV R12D,ECX
CALL 0x0018701c
TEST AL,AL
JMP 0x00186f54
LAB_00186f1a:
TEST R12W,R12W
JZ 0x00186d3c
CMP dword ptr [RBP + 0xc],0x1
JG 0x00186d3c
XOR ECX,ECX
LAB_00186f30:
MOVZX EDX,word ptr [RSP + RCX*0x2 + 0x30]
AND EDX,0x782
CMP EDX,0x82
JZ 0x00186ed4
INC RCX
CMP R12,RCX
JNZ 0x00186f30
JMP 0x00186d3c
LAB_00186f50:
TEST R12B,0x8
LAB_00186f54:
MOV RSI,qword ptr [RSP + 0x8]
JZ 0x00186d5e
JMP 0x00186ed9
LAB_00186f64:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00186f73:
LEA RDI,[0x1c0cd2]
LEA RSI,[0x1c0ae8]
LEA RCX,[0x1c0d06]
MOV EDX,0x2d0
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents(OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector&,
OpenSubdiv::v3_6_0::Far::internal::FeatureMask const&, OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
*/
void OpenSubdiv::v3_6_0::Far::TopologyRefiner::selectFeatureAdaptiveComponents
(long param_1,SparseSelector *param_2,uint *param_3,long param_4,uint param_5)
{
ushort uVar1;
int iVar2;
Level *this;
long lVar3;
char cVar4;
int2 uVar5;
uint uVar6;
ulong uVar7;
int iVar8;
uint uVar9;
uint uVar10;
int iVar11;
int iVar12;
ulong uVar13;
bool bVar14;
VTag local_68 [8];
long local_60;
SparseSelector *local_58;
long local_50;
ulong local_48;
long local_40;
long local_38;
this = *(Level **)(*(long *)param_2 + 8);
uVar9 = param_5;
if (param_5 == 0) {
uVar9 = *(uint *)this;
}
iVar12 = 0;
if ((*param_3 & 0x800) != 0) {
iVar12 = (int)((ulong)(*(long *)(this + 0x1d0) - *(long *)(this + 0x1c8)) >> 3);
}
if (0 < (int)uVar9) {
local_48 = (ulong)uVar9;
uVar13 = 0;
local_60 = param_4;
local_58 = param_2;
local_40 = param_1;
do {
if (param_5 == 0) {
iVar8 = (int)uVar13;
}
else {
iVar8 = *(int *)(local_60 + uVar13 * 4);
}
if (((*(ushort *)(local_40 + 8) & 2) != 0) &&
((*(byte *)(*(long *)(this + 0x60) + (long)iVar8) & 1) != 0)) goto LAB_00186ee3;
uVar9 = *(ushort *)(local_40 + 8) >> 3 & 7;
local_38 = (long)(iVar8 * 2);
if (*(uint *)(*(long *)(this + 0x18) + local_38 * 4) == uVar9) {
Vtr::internal::Level::getFaceVTags(this,iVar8,local_68,-1);
uVar6 = Vtr::internal::Level::VTag::BitwiseOr(local_68,uVar9);
if ((uVar6 >> 0xc & 1) != 0) goto LAB_00186ed9;
if ((uVar6 >> 0xb & 1) == 0) {
if (((uVar6 & 1) != 0) && ((*param_3 & 0x400) != 0)) goto LAB_00186ed9;
if (((uVar6 & 2) != 0) && ((*param_3 & 1) != 0)) {
if ((uVar6 & 0x780) == 0x80) goto LAB_00186ed9;
if (((short)uVar9 != 0) && (*(int *)(this + 0xc) < 2)) {
uVar7 = 0;
do {
if ((*(ushort *)(local_68 + uVar7 * 2) & 0x782) == 0x82) goto LAB_00186ed9;
uVar7 = uVar7 + 1;
} while (uVar9 != uVar7);
}
}
if ((uVar6 & 0x780) == 0x80) goto LAB_00186d50;
if ((uVar6 & 0x60) == 0) {
if ((uVar6 & 0x2010) == 0) goto LAB_00186d50;
uVar10 = (uint)(ushort)*param_3;
cVar4 = (anonymous_namespace)::doesInfSharpFaceHaveFeatures(uVar6,local_68,(ulong)uVar9)
;
bVar14 = cVar4 == '\0';
}
else {
if ((~*param_3 & 0xc) == 0) goto LAB_00186ed9;
cVar4 = Vtr::internal::Level::isSingleCreasePatch(this,iVar8,(float *)0x0,(int *)0x0);
uVar1 = (ushort)*param_3;
uVar10 = (uint)uVar1;
if (cVar4 == '\0') {
bVar14 = (uVar1 & 8) == 0;
}
else {
bVar14 = (uVar1 & 4) == 0;
uVar10 = (uint)uVar1;
}
}
if (!bVar14) goto LAB_00186ed9;
}
else {
LAB_00186d50:
uVar10 = (uint)(ushort)*param_3;
}
if (((uVar10 >> 0xb & 1) != 0) && (0 < iVar12)) {
local_50 = (long)(int)(iVar8 * 2 | 1);
iVar11 = 0;
do {
while (cVar4 = Vtr::internal::Level::doesFaceFVarTopologyMatch(this,iVar8,iVar11),
cVar4 != '\0') {
iVar11 = iVar11 + 1;
if (iVar12 <= iVar11) goto LAB_00186ee3;
}
iVar2 = *(int *)(*(long *)(this + 0x18) + local_50 * 4);
lVar3 = *(long *)(this + 0x30);
uVar9 = *(uint *)(*(long *)(this + 0x18) + local_38 * 4);
cVar4 = Vtr::internal::Level::doesFaceFVarTopologyMatch(this,iVar8,iVar11);
if (cVar4 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("!level.doesFaceFVarTopologyMatch(face, fvarChannel)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp"
,0x2d0,
"bool OpenSubdiv::v3_6_0::Far::(anonymous namespace)::doesFaceHaveDistinctFaceVaryingFeatures(const Vtr::internal::Level &, Index, const internal::FeatureMask &, int)"
);
}
if (0 < (int)uVar9) {
uVar7 = 0;
do {
uVar5 = Vtr::internal::Level::getVertexCompositeFVarVTag
(this,*(int *)((long)iVar2 * 4 + lVar3 + uVar7 * 4),iVar11);
*(int2 *)(local_68 + uVar7 * 2) = uVar5;
uVar7 = uVar7 + 1;
} while (uVar9 != uVar7);
}
uVar6 = Vtr::internal::Level::VTag::BitwiseOr(local_68,uVar9);
if ((uVar6 >> 0xb & 1) == 0) {
if ((((ushort)*param_3 >> 10 & 1) != 0 && (uVar6 & 1) != 0) ||
(((ushort)*param_3 & 1) != 0 && (uVar6 & 2) != 0)) goto LAB_00186ed9;
cVar4 = (anonymous_namespace)::doesInfSharpFaceHaveFeatures(uVar6,local_68,uVar9);
}
else {
cVar4 = '\0';
}
} while ((cVar4 == '\0') && (iVar11 = iVar11 + 1, iVar11 < iVar12));
if (cVar4 != '\0') goto LAB_00186ed9;
}
}
else {
LAB_00186ed9:
Vtr::internal::SparseSelector::selectFace(local_58,iVar8);
}
LAB_00186ee3:
uVar13 = uVar13 + 1;
} while (uVar13 != local_48);
}
return;
}
|
|
61,281
|
ggml_pool_1d
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_pool_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_op_pool op,
int k0,
int s0,
int p0) {
const int64_t ne[4] = {
ggml_calc_pool_output_size(a->ne[0], k0, s0, p0),
a->ne[1],
a->ne[2],
a->ne[3],
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
int32_t params[] = { op, k0, s0, p0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_POOL_1D;
result->src[0] = a;
return result;
}
|
O2
|
c
|
ggml_pool_1d:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
cvtsi2ss %r9d, %xmm0
cvtsi2ssq 0x10(%rsi), %xmm1
addss %xmm0, %xmm0
cvtsi2ss %ecx, %xmm2
addss %xmm1, %xmm0
cvtsi2ss %r8d, %xmm1
subss %xmm2, %xmm0
divss %xmm1, %xmm0
addss 0x29705(%rip), %xmm0 # 0x4e060
cvttss2si %xmm0, %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movups 0x18(%rsi), %xmm0
movups %xmm0, 0x8(%rcx)
movq 0x28(%rsi), %rax
movq %rax, 0x18(%rcx)
pushq $0x4
popq %rdx
xorl %esi, %esi
callq 0x1d260
movq %rax, %r13
movq %rsp, %rsi
movl %r12d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r14d, 0x8(%rsi)
movl %ebp, 0xc(%rsi)
pushq $0x10
popq %rdx
movq %rax, %rdi
callq 0x2221d
movl $0x33, 0x50(%r13)
movq %rbx, 0x98(%r13)
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ggml_pool_1d:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, r9d
mov r14d, r8d
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
cvtsi2ss xmm0, r9d
cvtsi2ss xmm1, qword ptr [rsi+10h]
addss xmm0, xmm0
cvtsi2ss xmm2, ecx
addss xmm0, xmm1
cvtsi2ss xmm1, r8d
subss xmm0, xmm2
divss xmm0, xmm1
addss xmm0, cs:dword_4E060
cvttss2si rax, xmm0
lea rcx, [rsp+68h+var_58]
mov [rcx], rax
movups xmm0, xmmword ptr [rsi+18h]
movups xmmword ptr [rcx+8], xmm0
mov rax, [rsi+28h]
mov [rcx+18h], rax
push 4
pop rdx
xor esi, esi
call _ggml_new_tensor
mov r13, rax
mov rsi, rsp
mov [rsi], r12d
mov [rsi+4], r15d
mov [rsi+8], r14d
mov [rsi+0Ch], ebp
push 10h
pop rdx
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r13+50h], 33h ; '3'
mov [r13+98h], rbx
mov rax, r13
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ggml_pool_1d(
long long a1,
long long a2,
int a3,
int a4,
int a5,
int a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
__m128 v18; // xmm0
long long v19; // r13
long long v20; // rcx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
_DWORD v26[4]; // [rsp+0h] [rbp-68h] BYREF
long long v27; // [rsp+10h] [rbp-58h] BYREF
__m128 v28; // [rsp+18h] [rbp-50h]
long long v29; // [rsp+28h] [rbp-40h]
a9.m128_f32[0] = (float)a4;
a8.m128_f32[0] = (float)a5;
v27 = (unsigned int)(int)(float)((float)((float)((float)((float)((float)a6 + (float)a6)
+ (float)(int)*(_QWORD *)(a2 + 16))
- (float)a4)
/ (float)a5)
+ 1.0);
v28 = *(__m128 *)(a2 + 24);
v18 = v28;
v29 = *(_QWORD *)(a2 + 40);
v19 = ggml_new_tensor(a1, 0LL, 4LL, (long long)&v27);
v26[0] = a3;
v26[1] = a4;
v26[2] = a5;
v26[3] = a6;
ggml_set_op_params(v19, (long long)v26, 16LL, v18, a8, a9, a10, v23, v24, a13, a14, v20, v21, v22);
*(_DWORD *)(v19 + 80) = 51;
*(_QWORD *)(v19 + 152) = a2;
return v19;
}
|
ggml_pool_1d:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,R9D
MOV R14D,R8D
MOV R15D,ECX
MOV R12D,EDX
MOV RBX,RSI
CVTSI2SS XMM0,R9D
CVTSI2SS XMM1,qword ptr [RSI + 0x10]
ADDSS XMM0,XMM0
CVTSI2SS XMM2,ECX
ADDSS XMM0,XMM1
CVTSI2SS XMM1,R8D
SUBSS XMM0,XMM2
DIVSS XMM0,XMM1
ADDSS XMM0,dword ptr [0x0014e060]
CVTTSS2SI RAX,XMM0
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
MOVUPS XMM0,xmmword ptr [RSI + 0x18]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
MOV RAX,qword ptr [RSI + 0x28]
MOV qword ptr [RCX + 0x18],RAX
PUSH 0x4
POP RDX
XOR ESI,ESI
CALL 0x0011d260
MOV R13,RAX
MOV RSI,RSP
MOV dword ptr [RSI],R12D
MOV dword ptr [RSI + 0x4],R15D
MOV dword ptr [RSI + 0x8],R14D
MOV dword ptr [RSI + 0xc],EBP
PUSH 0x10
POP RDX
MOV RDI,RAX
CALL 0x0012221d
MOV dword ptr [R13 + 0x50],0x33
MOV qword ptr [R13 + 0x98],RBX
MOV RAX,R13
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long ggml_pool_1d(int8 param_1,long param_2,int4 param_3,int param_4,int param_5,
int param_6)
{
long lVar1;
int4 local_68;
int local_64;
int local_60;
int local_5c;
long local_58;
int4 local_50;
int4 uStack_4c;
int4 uStack_48;
int4 uStack_44;
int8 local_40;
local_58 = (long)((((float)param_6 + (float)param_6 + (float)*(long *)(param_2 + 0x10)) -
(float)param_4) / (float)param_5 + DAT_0014e060);
local_50 = *(int4 *)(param_2 + 0x18);
uStack_4c = *(int4 *)(param_2 + 0x1c);
uStack_48 = *(int4 *)(param_2 + 0x20);
uStack_44 = *(int4 *)(param_2 + 0x24);
local_40 = *(int8 *)(param_2 + 0x28);
lVar1 = ggml_new_tensor(param_1,0,4);
local_68 = param_3;
local_64 = param_4;
local_60 = param_5;
local_5c = param_6;
ggml_set_op_params(lVar1,&local_68,0x10);
*(int4 *)(lVar1 + 0x50) = 0x33;
*(long *)(lVar1 + 0x98) = param_2;
return lVar1;
}
|
|
61,282
|
ggml_pool_1d
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_pool_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_op_pool op,
int k0,
int s0,
int p0) {
const int64_t ne[4] = {
ggml_calc_pool_output_size(a->ne[0], k0, s0, p0),
a->ne[1],
a->ne[2],
a->ne[3],
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
int32_t params[] = { op, k0, s0, p0 };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_POOL_1D;
result->src[0] = a;
return result;
}
|
O3
|
c
|
ggml_pool_1d:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %r14
cvtsi2ss %r9d, %xmm0
cvtsi2ssq 0x10(%rsi), %xmm1
addss %xmm0, %xmm0
cvtsi2ss %ecx, %xmm2
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %r8d, %xmm1
subss %xmm2, %xmm0
divss %xmm1, %xmm0
addss 0x2de4b(%rip), %xmm0 # 0x4c0f0
cvttss2si %xmm0, %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movups 0x18(%rsi), %xmm0
movups %xmm0, 0x8(%rcx)
movq 0x28(%rsi), %rax
movq %rax, 0x18(%rcx)
xorl %esi, %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
testq %rax, %rax
je 0x1e300
movl %r12d, 0x54(%rax)
movl %r15d, 0x58(%rax)
movl %ebp, 0x5c(%rax)
movl %ebx, 0x60(%rax)
movl $0x33, 0x50(%rax)
movq %r14, 0x98(%rax)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30462(%rip), %rdi # 0x4e769
leaq 0x2e357(%rip), %rdx # 0x4c665
leaq 0x30581(%rip), %rcx # 0x4e896
movl $0x70, %esi
xorl %eax, %eax
callq 0x17cd0
|
ggml_pool_1d:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov ebx, r9d
mov ebp, r8d
mov r15d, ecx
mov r12d, edx
mov r14, rsi
cvtsi2ss xmm0, r9d
cvtsi2ss xmm1, qword ptr [rsi+10h]
addss xmm0, xmm0
cvtsi2ss xmm2, ecx
addss xmm0, xmm1
xorps xmm1, xmm1
cvtsi2ss xmm1, r8d
subss xmm0, xmm2
divss xmm0, xmm1
addss xmm0, cs:dword_4C0F0
cvttss2si rax, xmm0
mov rcx, rsp
mov [rcx], rax
movups xmm0, xmmword ptr [rsi+18h]
movups xmmword ptr [rcx+8], xmm0
mov rax, [rsi+28h]
mov [rcx+18h], rax
xor esi, esi
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
test rax, rax
jz short loc_1E300
mov [rax+54h], r12d
mov [rax+58h], r15d
mov [rax+5Ch], ebp
mov [rax+60h], ebx
mov dword ptr [rax+50h], 33h ; '3'
mov [rax+98h], r14
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1E300:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
xor eax, eax
call _ggml_abort
|
long long ggml_pool_1d(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
long long result; // rax
int v11; // r8d
int v12; // r9d
long long v13; // [rsp+0h] [rbp-48h] BYREF
__int128 v14; // [rsp+8h] [rbp-40h]
long long v15; // [rsp+18h] [rbp-30h]
v13 = (unsigned int)(int)(float)((float)((float)((float)((float)((float)a6 + (float)a6)
+ (float)(int)*(_QWORD *)(a2 + 16))
- (float)a4)
/ (float)a5)
+ 1.0);
v14 = *(_OWORD *)(a2 + 24);
v15 = *(_QWORD *)(a2 + 40);
result = ggml_new_tensor_impl(a1, 0, 4u, &v13, 0LL, 0LL, *(double *)&v14);
if ( !result )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h",
112,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"tensor != NULL",
v11,
v12);
*(_DWORD *)(result + 84) = a3;
*(_DWORD *)(result + 88) = a4;
*(_DWORD *)(result + 92) = a5;
*(_DWORD *)(result + 96) = a6;
*(_DWORD *)(result + 80) = 51;
*(_QWORD *)(result + 152) = a2;
return result;
}
|
ggml_pool_1d:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV EBX,R9D
MOV EBP,R8D
MOV R15D,ECX
MOV R12D,EDX
MOV R14,RSI
CVTSI2SS XMM0,R9D
CVTSI2SS XMM1,qword ptr [RSI + 0x10]
ADDSS XMM0,XMM0
CVTSI2SS XMM2,ECX
ADDSS XMM0,XMM1
XORPS XMM1,XMM1
CVTSI2SS XMM1,R8D
SUBSS XMM0,XMM2
DIVSS XMM0,XMM1
ADDSS XMM0,dword ptr [0x0014c0f0]
CVTTSS2SI RAX,XMM0
MOV RCX,RSP
MOV qword ptr [RCX],RAX
MOVUPS XMM0,xmmword ptr [RSI + 0x18]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
MOV RAX,qword ptr [RSI + 0x28]
MOV qword ptr [RCX + 0x18],RAX
XOR ESI,ESI
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
TEST RAX,RAX
JZ 0x0011e300
MOV dword ptr [RAX + 0x54],R12D
MOV dword ptr [RAX + 0x58],R15D
MOV dword ptr [RAX + 0x5c],EBP
MOV dword ptr [RAX + 0x60],EBX
MOV dword ptr [RAX + 0x50],0x33
MOV qword ptr [RAX + 0x98],R14
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011e300:
LEA RDI,[0x14e769]
LEA RDX,[0x14c665]
LEA RCX,[0x14e896]
MOV ESI,0x70
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_pool_1d(int8 param_1,long param_2,int4 param_3,int param_4,int param_5,
int param_6)
{
long lVar1;
long local_48;
int4 local_40;
int4 uStack_3c;
int4 uStack_38;
int4 uStack_34;
int8 local_30;
local_48 = (long)((((float)param_6 + (float)param_6 + (float)*(long *)(param_2 + 0x10)) -
(float)param_4) / (float)param_5 + DAT_0014c0f0);
local_40 = *(int4 *)(param_2 + 0x18);
uStack_3c = *(int4 *)(param_2 + 0x1c);
uStack_38 = *(int4 *)(param_2 + 0x20);
uStack_34 = *(int4 *)(param_2 + 0x24);
local_30 = *(int8 *)(param_2 + 0x28);
lVar1 = ggml_new_tensor_impl(param_1,0,4,&local_48,0,0);
if (lVar1 != 0) {
*(int4 *)(lVar1 + 0x54) = param_3;
*(int *)(lVar1 + 0x58) = param_4;
*(int *)(lVar1 + 0x5c) = param_5;
*(int *)(lVar1 + 0x60) = param_6;
*(int4 *)(lVar1 + 0x50) = 0x33;
*(long *)(lVar1 + 0x98) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"
,0x70,"GGML_ASSERT(%s) failed","tensor != NULL");
}
|
|
61,283
|
google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&, google::protobuf::MapValueConstRef*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.cc
|
bool DynamicMapField::LookupMapValue(const MapKey& map_key,
MapValueConstRef* val) const {
const Map<MapKey, MapValueRef>& map = GetMap();
Map<MapKey, MapValueRef>::const_iterator iter = map.find(map_key);
if (iter == map.end()) {
return false;
}
// map_key is already in the map. Make sure (*map)[map_key] is not called.
// [] may reorder the map and iterators.
val->CopyFrom(iter->second);
return true;
}
|
O3
|
cpp
|
google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&, google::protobuf::MapValueConstRef*) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
callq *0x98(%rax)
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x7642c
movq (%r15), %rax
testq %rax, %rax
je 0x72f7e
movl 0x30(%rax), %ecx
movl %ecx, 0x8(%rbx)
movq 0x28(%rax), %rcx
movq %rcx, (%rbx)
testq %rax, %rax
setne %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZNK6google8protobuf8internal15DynamicMapField14LookupMapValueERKNS0_6MapKeyEPNS0_16MapValueConstRefE:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdx
mov r14, rsi
mov rax, [rdi]
call qword ptr [rax+98h]
mov r15, rsp
mov rdi, r15
mov rsi, rax
mov rdx, r14
xor ecx, ecx
call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap10FindHelperIS2_EESt4pairINS5_13iterator_baseIKNS0_7MapPairIS2_S3_EEEEmERKT_PSt17_Rb_tree_iteratorIS7_IKSt17reference_wrapperIKS2_EPvEE; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::FindHelper<google::protobuf::MapKey>(google::protobuf::MapKey const&,std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const,void *>> *)
mov rax, [r15]
test rax, rax
jz short loc_72F7E
mov ecx, [rax+30h]
mov [rbx+8], ecx
mov rcx, [rax+28h]
mov [rbx], rcx
loc_72F7E:
test rax, rax
setnz al
add rsp, 20h
pop rbx
pop r14
pop r15
retn
|
bool google::protobuf::internal::DynamicMapField::LookupMapValue(
google::protobuf::internal::DynamicMapField *this,
const google::protobuf::MapKey *a2,
google::protobuf::MapValueConstRef *a3)
{
long long v4; // rax
long long v5; // rax
_QWORD v7[7]; // [rsp+0h] [rbp-38h] BYREF
v4 = (*(long long ( **)(google::protobuf::internal::DynamicMapField *))(*(_QWORD *)this + 152LL))(this);
google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::FindHelper<google::protobuf::MapKey>(
v7,
v4,
a2,
0LL);
v5 = v7[0];
if ( v7[0] )
{
*((_DWORD *)a3 + 2) = *(_DWORD *)(v7[0] + 48LL);
*(_QWORD *)a3 = *(_QWORD *)(v5 + 40);
}
return v5 != 0;
}
|
LookupMapValue:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x98]
MOV R15,RSP
MOV RDI,R15
MOV RSI,RAX
MOV RDX,R14
XOR ECX,ECX
CALL 0x0017642c
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x00172f7e
MOV ECX,dword ptr [RAX + 0x30]
MOV dword ptr [RBX + 0x8],ECX
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBX],RCX
LAB_00172f7e:
TEST RAX,RAX
SETNZ AL
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&,
google::protobuf::MapValueConstRef*) const */
bool __thiscall
google::protobuf::internal::DynamicMapField::LookupMapValue
(DynamicMapField *this,MapKey *param_1,MapValueConstRef *param_2)
{
_Rb_tree_iterator *p_Var1;
long local_38 [4];
p_Var1 = (_Rb_tree_iterator *)(**(code **)(*(long *)this + 0x98))();
Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::
FindHelper<google::protobuf::MapKey>((MapKey *)local_38,p_Var1);
if (local_38[0] != 0) {
*(int4 *)(param_2 + 8) = *(int4 *)(local_38[0] + 0x30);
*(int8 *)param_2 = *(int8 *)(local_38[0] + 0x28);
}
return local_38[0] != 0;
}
|
|
61,284
|
w_search
|
eloqsql/storage/myisam/mi_write.c
|
static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uint comp_flag, uchar *key, uint key_length, my_off_t page,
uchar *father_buff, uchar *father_keypos,
my_off_t father_page, my_bool insert_last)
{
int error,flag;
uint nod_flag, search_key_length;
uchar *temp_buff,*keypos;
uchar keybuff[HA_MAX_KEY_BUFF];
my_bool was_last_key;
my_off_t next_page, dupp_key_pos;
DBUG_ENTER("w_search");
DBUG_PRINT("enter",("page: %ld", (long) page));
search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY;
if (!(temp_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
HA_MAX_KEY_BUFF*2)))
DBUG_RETURN(-1);
if (!_mi_fetch_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff,0))
goto err;
flag=(*keyinfo->bin_search)(info,keyinfo,temp_buff,key,search_key_length,
comp_flag, &keypos, keybuff, &was_last_key);
nod_flag=mi_test_if_nod(temp_buff);
if (flag == 0)
{
uint tmp_key_length;
/* get position to record with duplicated key */
tmp_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,keybuff);
if (tmp_key_length)
dupp_key_pos=_mi_dpos(info,0,keybuff+tmp_key_length);
else
dupp_key_pos= HA_OFFSET_ERROR;
if (keyinfo->flag & HA_FULLTEXT)
{
uint off;
int subkeys;
get_key_full_length_rdonly(off, keybuff);
subkeys=ft_sintXkorr(keybuff+off);
comp_flag=SEARCH_SAME;
if (subkeys >= 0)
{
/* normal word, one-level tree structure */
flag=(*keyinfo->bin_search)(info, keyinfo, temp_buff, key,
USE_WHOLE_KEY, comp_flag,
&keypos, keybuff, &was_last_key);
}
else
{
/* popular word. two-level tree. going down */
my_off_t root=dupp_key_pos;
keyinfo=&info->s->ft2_keyinfo;
get_key_full_length_rdonly(off, key);
key+=off;
keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */
error=_mi_ck_real_write_btree(info, keyinfo, key, 0,
&root, comp_flag);
_mi_dpointer(info, keypos+HA_FT_WLEN, root);
subkeys--; /* should there be underflow protection ? */
DBUG_ASSERT(subkeys < 0);
ft_intXstore(keypos, subkeys);
if (!error)
error=_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff);
my_afree((uchar*) temp_buff);
DBUG_RETURN(error);
}
}
else /* not HA_FULLTEXT, normal HA_NOSAME key */
{
info->dupp_key_pos= dupp_key_pos;
my_afree((uchar*) temp_buff);
my_errno=HA_ERR_FOUND_DUPP_KEY;
DBUG_RETURN(-1);
}
}
if (flag == MI_FOUND_WRONG_KEY)
DBUG_RETURN(-1);
if (!was_last_key)
insert_last=0;
next_page=_mi_kpos(nod_flag,keypos);
if (next_page == HA_OFFSET_ERROR ||
(error=w_search(info, keyinfo, comp_flag, key, key_length, next_page,
temp_buff, keypos, page, insert_last)) >0)
{
error=_mi_insert(info,keyinfo,key,temp_buff,keypos,keybuff,father_buff,
father_keypos,father_page, insert_last);
if (_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff))
goto err;
}
my_afree((uchar*) temp_buff);
DBUG_RETURN(error);
err:
my_afree((uchar*) temp_buff);
DBUG_PRINT("exit",("Error: %d",my_errno));
DBUG_RETURN (-1);
}
|
O3
|
c
|
w_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp # imm = 0x4F8
movq %r9, %rbx
movl %r8d, -0x504(%rbp)
movq %rcx, -0x510(%rbp)
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r15
addl $0x97f, %eax # imm = 0x97F
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
movq %r9, %rdx
movl $0x3, %ecx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x838a4
testq %rax, %rax
je 0x881d6
movq %rbx, -0x518(%rbp)
testb $0x1, %r12b
movl $0x970, %r8d # imm = 0x970
cmovnel -0x504(%rbp), %r8d
subq $0x8, %rsp
leaq -0x4f1(%rbp), %rbx
leaq -0x4f0(%rbp), %rax
leaq -0x500(%rbp), %r10
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq -0x510(%rbp), %rcx
movl %r12d, -0x508(%rbp)
movl %r12d, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq *0x40(%r13)
addq $0x20, %rsp
cmpb $0x0, (%r15)
movl $0x0, %r12d
jns 0x880a6
movq (%r14), %rcx
movl 0x17c(%rcx), %r12d
testl %eax, %eax
je 0x88181
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
je 0x881db
xorl %eax, %eax
cmpb $0x0, -0x4f1(%rbp)
movzbl 0x28(%rbp), %ebx
cmovel %eax, %ebx
movq -0x500(%rbp), %rsi
movl %r12d, %edi
callq 0x8421e
movsbl %bl, %r10d
cmpq $-0x1, %rax
movq %r14, %r12
movq -0x510(%rbp), %r14
je 0x88131
movq %r12, %rdi
movq %r13, %rsi
movl -0x508(%rbp), %edx
movq %r14, %rcx
movl -0x504(%rbp), %r8d
movq %rax, %r9
pushq %r10
pushq -0x518(%rbp)
pushq -0x500(%rbp)
pushq %r15
movq %r10, %rbx
callq 0x87fcc
movq %rbx, %r10
addq $0x20, %rsp
testl %eax, %eax
jle 0x8837c
movq -0x500(%rbp), %r8
leaq -0x4f0(%rbp), %r9
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
pushq %r10
pushq 0x20(%rbp)
pushq 0x18(%rbp)
pushq 0x10(%rbp)
callq 0x88497
addq $0x20, %rsp
movl %eax, %ebx
movq %r12, %rdi
movq %r13, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x83950
testl %eax, %eax
jne 0x881d6
jmp 0x881db
leaq -0x500(%rbp), %rdx
leaq -0x4f0(%rbp), %rcx
movq %r13, %rdi
movl %r12d, %esi
callq *0x48(%r13)
testl %eax, %eax
je 0x881b6
movl %eax, %eax
leaq (%rax,%rbp), %rdx
addq $-0x4f0, %rdx # imm = 0xFB10
movq %r14, %rdi
xorl %esi, %esi
callq 0x842fd
jmp 0x881bd
movq $-0x1, %rax
testb $-0x80, 0xa(%r13)
jne 0x881ff
movq %rax, 0x1a0(%r14)
callq 0xa16ee
movl $0x79, (%rax)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x88383
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl -0x4f0(%rbp), %ecx
cmpq $0xff, %rcx
je 0x88214
incq %rcx
jmp 0x88226
movzwl -0x4ef(%rbp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x3, %rcx
movzbl -0x4f0(%rbp,%rcx), %edx
shll $0x18, %edx
js 0x8827b
subq $0x8, %rsp
movl $0x4, -0x508(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq -0x510(%rbp), %rcx
movl $0x970, %r8d # imm = 0x970
movl $0x4, %r9d
pushq %rbx
leaq -0x4f0(%rbp), %rax
pushq %rax
leaq -0x500(%rbp), %rax
pushq %rax
callq *0x40(%r13)
addq $0x20, %rsp
jmp 0x880ae
movq %r12, %rdi
movzwl -0x4ee(%rbp,%rcx), %esi
rolw $0x8, %si
movzwl %si, %esi
movzbl -0x4ef(%rbp,%rcx), %ecx
shll $0x10, %ecx
orl %esi, %ecx
orl %edx, %ecx
movl %ecx, -0x504(%rbp)
movq %rax, -0x520(%rbp)
movq (%r14), %rax
leaq 0x1a8(%rax), %r12
movq -0x510(%rbp), %rdx
movzbl (%rdx), %ecx
cmpq $0xff, %rcx
je 0x882cb
incq %rcx
jmp 0x882da
movzwl 0x1(%rdx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x3, %rcx
addq %rcx, %rdx
movzwl 0x1ba(%rax), %eax
addl %eax, %edi
subq %rdi, -0x500(%rbp)
leaq -0x520(%rbp), %r13
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %r13, %r8
movl $0x4, %r9d
callq 0x87f4b
movl %eax, %ebx
movq -0x500(%rbp), %rsi
addq $0x4, %rsi
movq (%r13), %rdx
movq %r14, %rdi
callq 0x84fc3
movl -0x504(%rbp), %edx
decl %edx
movq -0x500(%rbp), %rax
movb %dl, 0x3(%rax)
movq -0x500(%rbp), %rax
movb %dh, 0x2(%rax)
movl %edx, %eax
shrl $0x10, %eax
movq -0x500(%rbp), %rcx
movb %al, 0x1(%rcx)
shrl $0x18, %edx
movq -0x500(%rbp), %rax
movb %dl, (%rax)
testl %ebx, %ebx
jne 0x881db
movq %r14, %rdi
movq %r12, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x83950
movl %eax, %ebx
jmp 0x881db
callq 0x29270
|
w_search_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 4F8h
mov rbx, r9
mov [rbp+var_504], r8d
mov [rbp+var_510], rcx
mov r12d, edx
mov r13, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
movzx eax, word ptr [rsi+0Eh]
mov r15, rsp
add eax, 97Fh
and eax, 0FFFFFFF0h
sub r15, rax
mov rsp, r15
mov rdx, r9
mov ecx, 3
mov r8, r15
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_881D6
mov [rbp+var_518], rbx
test r12b, 1
mov r8d, 970h
cmovnz r8d, [rbp+var_504]
sub rsp, 8
lea rbx, [rbp+var_4F1]
lea rax, [rbp+var_4F0]
lea r10, [rbp+var_500]
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov rcx, [rbp+var_510]
mov [rbp+var_508], r12d
mov r9d, r12d
push rbx
push rax
push r10
call qword ptr [r13+40h]
add rsp, 20h
cmp byte ptr [r15], 0
mov r12d, 0
jns short loc_880A6
mov rcx, [r14]
mov r12d, [rcx+17Ch]
loc_880A6:
test eax, eax
jz loc_88181
loc_880AE:
mov ebx, 0FFFFFFFFh
cmp eax, 7FFFFFFFh
jz loc_881DB
xor eax, eax
cmp [rbp+var_4F1], 0
movzx ebx, [rbp+arg_18]
cmovz ebx, eax
mov rsi, [rbp+var_500]
mov edi, r12d
call _mi_kpos
movsx r10d, bl
cmp rax, 0FFFFFFFFFFFFFFFFh
mov r12, r14
mov r14, [rbp+var_510]
jz short loc_88131
mov rdi, r12
mov rsi, r13
mov edx, [rbp+var_508]
mov rcx, r14
mov r8d, [rbp+var_504]
mov r9, rax
push r10
push [rbp+var_518]
push [rbp+var_500]
push r15
mov rbx, r10
call w_search_0
mov r10, rbx
add rsp, 20h
test eax, eax
jle loc_8837C
loc_88131:
mov r8, [rbp+var_500]
lea r9, [rbp+var_4F0]
mov rdi, r12
mov rsi, r13
mov rdx, r14
mov rcx, r15
push r10
push [rbp+arg_10]
push [rbp+arg_8]
push [rbp+arg_0]
call _mi_insert
add rsp, 20h
mov ebx, eax
mov rdi, r12
mov rsi, r13
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r15
call _mi_write_keypage
test eax, eax
jnz short loc_881D6
jmp short loc_881DB
loc_88181:
lea rdx, [rbp+var_500]
lea rcx, [rbp+var_4F0]
mov rdi, r13
mov esi, r12d
call qword ptr [r13+48h]
test eax, eax
jz short loc_881B6
mov eax, eax
lea rdx, [rax+rbp]
add rdx, 0FFFFFFFFFFFFFB10h
mov rdi, r14
xor esi, esi
call _mi_dpos
jmp short loc_881BD
loc_881B6:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_881BD:
test byte ptr [r13+0Ah], 80h
jnz short loc_881FF
mov [r14+1A0h], rax
call _my_thread_var
mov dword ptr [rax], 79h ; 'y'
loc_881D6:
mov ebx, 0FFFFFFFFh
loc_881DB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_88383
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_881FF:
movzx ecx, [rbp+var_4F0]
cmp rcx, 0FFh
jz short loc_88214
inc rcx
jmp short loc_88226
loc_88214:
movzx ecx, [rbp+var_4EF]
rol cx, 8
movzx ecx, cx
add rcx, 3
loc_88226:
movzx edx, [rbp+rcx+var_4F0]
shl edx, 18h
js short loc_8827B
sub rsp, 8
mov [rbp+var_508], 4
mov rdi, r14
mov rsi, r13
mov rdx, r15
mov rcx, [rbp+var_510]
mov r8d, 970h
mov r9d, 4
push rbx
lea rax, [rbp+var_4F0]
push rax
lea rax, [rbp+var_500]
push rax
call qword ptr [r13+40h]
add rsp, 20h
jmp loc_880AE
loc_8827B:
mov rdi, r12
movzx esi, [rbp+rcx+var_4EF+1]
rol si, 8
movzx esi, si
movzx ecx, byte ptr [rbp+rcx+var_4EF]
shl ecx, 10h
or ecx, esi
or ecx, edx
mov [rbp+var_504], ecx
mov [rbp+var_520], rax
mov rax, [r14]
lea r12, [rax+1A8h]
mov rdx, [rbp+var_510]
movzx ecx, byte ptr [rdx]
cmp rcx, 0FFh
jz short loc_882CB
inc rcx
jmp short loc_882DA
loc_882CB:
movzx ecx, word ptr [rdx+1]
rol cx, 8
movzx ecx, cx
add rcx, 3
loc_882DA:
add rdx, rcx
movzx eax, word ptr [rax+1BAh]
add edi, eax
sub [rbp+var_500], rdi
lea r13, [rbp+var_520]
mov rdi, r14
mov rsi, r12
xor ecx, ecx
mov r8, r13
mov r9d, 4
call _mi_ck_real_write_btree
mov ebx, eax
mov rsi, [rbp+var_500]
add rsi, 4
mov rdx, [r13+0]
mov rdi, r14
call _mi_dpointer
mov edx, [rbp+var_504]
dec edx
mov rax, [rbp+var_500]
mov [rax+3], dl
mov rax, [rbp+var_500]
mov [rax+2], dh
mov eax, edx
shr eax, 10h
mov rcx, [rbp+var_500]
mov [rcx+1], al
shr edx, 18h
mov rax, [rbp+var_500]
mov [rax], dl
test ebx, ebx
jnz loc_881DB
mov rdi, r14
mov rsi, r12
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r15
call _mi_write_keypage
loc_8837C:
mov ebx, eax
jmp loc_881DB
loc_88383:
call ___stack_chk_fail
|
// bad sp value at call has been detected, the output may be wrong!
long long w_search_0(
long long *a1,
long long a2,
unsigned int a3,
unsigned __int8 *a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long a9,
char a10)
{
char *v14; // r15
long long v15; // r8
int v16; // eax
unsigned int v17; // r12d
unsigned int v18; // ebx
unsigned long long v20; // rax
char v21; // r10
long long *v22; // r12
int v23; // r14d
int v24; // eax
long long *v25; // rdi
const char *v26; // rsi
unsigned int v27; // eax
unsigned long long v28; // rax
long long v30; // rcx
unsigned int v31; // edi
long long v32; // r12
long long v33; // rcx
long long v34; // rcx
unsigned int v35; // edx
unsigned long long v36; // [rsp+0h] [rbp-520h] BYREF
unsigned long long v37; // [rsp+8h] [rbp-518h]
unsigned __int8 *v38; // [rsp+10h] [rbp-510h]
int v39; // [rsp+18h] [rbp-508h]
unsigned int v40; // [rsp+1Ch] [rbp-504h]
_BYTE *v41; // [rsp+20h] [rbp-500h] BYREF
char v42; // [rsp+2Fh] [rbp-4F1h] BYREF
unsigned __int8 v43; // [rsp+30h] [rbp-4F0h] BYREF
_WORD v44[607]; // [rsp+31h] [rbp-4EFh]
unsigned long long v45; // [rsp+4F0h] [rbp-30h]
v40 = a5;
v38 = a4;
v45 = __readfsqword(0x28u);
v14 = (char *)&v36 - ((*(unsigned __int16 *)(a2 + 14) + 2431) & 0xFFFFFFF0);
if ( !mi_fetch_keypage(a1, a2, a6) )
return (unsigned int)-1;
v37 = a6;
v15 = 2416LL;
if ( (a3 & 1) != 0 )
v15 = v40;
v39 = a3;
v16 = (*(long long ( **)(long long *, long long, char *, unsigned __int8 *, long long, _QWORD, _BYTE **, unsigned __int8 *, char *))(a2 + 64))(
a1,
a2,
v14,
v38,
v15,
a3,
&v41,
&v43,
&v42);
v17 = 0;
if ( *v14 < 0 )
v17 = *(_DWORD *)(*a1 + 380);
if ( v16 )
{
LABEL_7:
v18 = -1;
if ( v16 != 0x7FFFFFFF )
{
if ( !v42 )
a10 = 0;
v20 = mi_kpos(v17, (long long)v41);
v21 = a10;
v22 = a1;
v23 = (int)v38;
if ( v20 == -1LL
|| (v24 = w_search_0((_DWORD)v22, a2, v39, (_DWORD)v38, v40, v20, (long long)v14, (long long)v41, v37, a10),
v21 = a10,
v24 > 0) )
{
v18 = mi_insert((_DWORD)v22, a2, v23, (_DWORD)v14, (_DWORD)v41, (unsigned int)&v43, a7, a8, a9, v21);
if ( !(unsigned int)mi_write_keypage(v22, a2, v37, 3u, v14) )
return v18;
return (unsigned int)-1;
}
return (unsigned int)v24;
}
return v18;
}
v25 = (long long *)a2;
v26 = (const char *)v17;
v27 = (*(long long ( **)(long long, _QWORD, _BYTE **, unsigned __int8 *))(a2 + 72))(a2, v17, &v41, &v43);
if ( v27 )
{
v25 = a1;
v26 = 0LL;
v28 = mi_dpos(a1, 0, (long long)(&v43 + v27));
}
else
{
v28 = -1LL;
}
if ( *(char *)(a2 + 10) >= 0 )
{
a1[52] = v28;
*(_DWORD *)my_thread_var(v25, v26) = 121;
return (unsigned int)-1;
}
if ( v43 == 255LL )
v30 = (unsigned __int16)__ROL2__(v44[0], 8) + 3LL;
else
v30 = v43 + 1LL;
if ( (*(&v43 + v30) & 0x80) == 0 )
{
v39 = 4;
v16 = (*(long long ( **)(long long *, long long, char *, unsigned __int8 *, long long, long long, _BYTE **, unsigned __int8 *, char *))(a2 + 64))(
a1,
a2,
v14,
v38,
2416LL,
4LL,
&v41,
&v43,
&v42);
goto LABEL_7;
}
v31 = v17;
v40 = (*(&v43 + v30) << 24) | (unsigned __int16)__ROL2__(*(_WORD *)((char *)v44 + v30 + 1), 8) | (*((unsigned __int8 *)v44 + v30) << 16);
v36 = v28;
v32 = *a1 + 424;
v33 = *v38;
if ( v33 == 255 )
v34 = (unsigned __int16)__ROL2__(*(_WORD *)(v38 + 1), 8) + 3LL;
else
v34 = v33 + 1;
v41 += -*(unsigned __int16 *)(*a1 + 442) - v31;
v18 = mi_ck_real_write_btree((long long)a1, v32, (long long)&v38[v34], 0, &v36, 4);
mi_dpointer(a1, (long long)(v41 + 4), v36);
v35 = v40 - 1;
v41[3] = v40 - 1;
v41[2] = BYTE1(v35);
v41[1] = BYTE2(v35);
*v41 = HIBYTE(v35);
if ( !v18 )
return (unsigned int)mi_write_keypage(a1, v32, v37, 3u, v14);
return v18;
}
|
w_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x4f8
MOV RBX,R9
MOV dword ptr [RBP + -0x504],R8D
MOV qword ptr [RBP + -0x510],RCX
MOV R12D,EDX
MOV R13,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,word ptr [RSI + 0xe]
MOV R15,RSP
ADD EAX,0x97f
AND EAX,0xfffffff0
SUB R15,RAX
MOV RSP,R15
MOV RDX,R9
MOV ECX,0x3
MOV R8,R15
XOR R9D,R9D
CALL 0x001838a4
TEST RAX,RAX
JZ 0x001881d6
MOV qword ptr [RBP + -0x518],RBX
TEST R12B,0x1
MOV R8D,0x970
CMOVNZ R8D,dword ptr [RBP + -0x504]
SUB RSP,0x8
LEA RBX,[RBP + -0x4f1]
LEA RAX,[RBP + -0x4f0]
LEA R10,[RBP + -0x500]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x510]
MOV dword ptr [RBP + -0x508],R12D
MOV R9D,R12D
PUSH RBX
PUSH RAX
PUSH R10
CALL qword ptr [R13 + 0x40]
ADD RSP,0x20
CMP byte ptr [R15],0x0
MOV R12D,0x0
JNS 0x001880a6
MOV RCX,qword ptr [R14]
MOV R12D,dword ptr [RCX + 0x17c]
LAB_001880a6:
TEST EAX,EAX
JZ 0x00188181
LAB_001880ae:
MOV EBX,0xffffffff
CMP EAX,0x7fffffff
JZ 0x001881db
XOR EAX,EAX
CMP byte ptr [RBP + -0x4f1],0x0
MOVZX EBX,byte ptr [RBP + 0x28]
CMOVZ EBX,EAX
MOV RSI,qword ptr [RBP + -0x500]
MOV EDI,R12D
CALL 0x0018421e
MOVSX R10D,BL
CMP RAX,-0x1
MOV R12,R14
MOV R14,qword ptr [RBP + -0x510]
JZ 0x00188131
MOV RDI,R12
MOV RSI,R13
MOV EDX,dword ptr [RBP + -0x508]
MOV RCX,R14
MOV R8D,dword ptr [RBP + -0x504]
MOV R9,RAX
PUSH R10
PUSH qword ptr [RBP + -0x518]
PUSH qword ptr [RBP + -0x500]
PUSH R15
MOV RBX,R10
CALL 0x00187fcc
MOV R10,RBX
ADD RSP,0x20
TEST EAX,EAX
JLE 0x0018837c
LAB_00188131:
MOV R8,qword ptr [RBP + -0x500]
LEA R9,[RBP + -0x4f0]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
PUSH R10
PUSH qword ptr [RBP + 0x20]
PUSH qword ptr [RBP + 0x18]
PUSH qword ptr [RBP + 0x10]
CALL 0x00188497
ADD RSP,0x20
MOV EBX,EAX
MOV RDI,R12
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R15
CALL 0x00183950
TEST EAX,EAX
JNZ 0x001881d6
JMP 0x001881db
LAB_00188181:
LEA RDX,[RBP + -0x500]
LEA RCX,[RBP + -0x4f0]
MOV RDI,R13
MOV ESI,R12D
CALL qword ptr [R13 + 0x48]
TEST EAX,EAX
JZ 0x001881b6
MOV EAX,EAX
LEA RDX,[RAX + RBP*0x1]
ADD RDX,-0x4f0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001842fd
JMP 0x001881bd
LAB_001881b6:
MOV RAX,-0x1
LAB_001881bd:
TEST byte ptr [R13 + 0xa],0x80
JNZ 0x001881ff
MOV qword ptr [R14 + 0x1a0],RAX
CALL 0x001a16ee
MOV dword ptr [RAX],0x79
LAB_001881d6:
MOV EBX,0xffffffff
LAB_001881db:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00188383
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001881ff:
MOVZX ECX,byte ptr [RBP + -0x4f0]
CMP RCX,0xff
JZ 0x00188214
INC RCX
JMP 0x00188226
LAB_00188214:
MOVZX ECX,word ptr [RBP + -0x4ef]
ROL CX,0x8
MOVZX ECX,CX
ADD RCX,0x3
LAB_00188226:
MOVZX EDX,byte ptr [RBP + RCX*0x1 + -0x4f0]
SHL EDX,0x18
JS 0x0018827b
SUB RSP,0x8
MOV dword ptr [RBP + -0x508],0x4
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x510]
MOV R8D,0x970
MOV R9D,0x4
PUSH RBX
LEA RAX,[RBP + -0x4f0]
PUSH RAX
LEA RAX,[RBP + -0x500]
PUSH RAX
CALL qword ptr [R13 + 0x40]
ADD RSP,0x20
JMP 0x001880ae
LAB_0018827b:
MOV RDI,R12
MOVZX ESI,word ptr [RBP + RCX*0x1 + -0x4ee]
ROL SI,0x8
MOVZX ESI,SI
MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x4ef]
SHL ECX,0x10
OR ECX,ESI
OR ECX,EDX
MOV dword ptr [RBP + -0x504],ECX
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr [R14]
LEA R12,[RAX + 0x1a8]
MOV RDX,qword ptr [RBP + -0x510]
MOVZX ECX,byte ptr [RDX]
CMP RCX,0xff
JZ 0x001882cb
INC RCX
JMP 0x001882da
LAB_001882cb:
MOVZX ECX,word ptr [RDX + 0x1]
ROL CX,0x8
MOVZX ECX,CX
ADD RCX,0x3
LAB_001882da:
ADD RDX,RCX
MOVZX EAX,word ptr [RAX + 0x1ba]
ADD EDI,EAX
SUB qword ptr [RBP + -0x500],RDI
LEA R13,[RBP + -0x520]
MOV RDI,R14
MOV RSI,R12
XOR ECX,ECX
MOV R8,R13
MOV R9D,0x4
CALL 0x00187f4b
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x500]
ADD RSI,0x4
MOV RDX,qword ptr [R13]
MOV RDI,R14
CALL 0x00184fc3
MOV EDX,dword ptr [RBP + -0x504]
DEC EDX
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX + 0x3],DL
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX + 0x2],DH
MOV EAX,EDX
SHR EAX,0x10
MOV RCX,qword ptr [RBP + -0x500]
MOV byte ptr [RCX + 0x1],AL
SHR EDX,0x18
MOV RAX,qword ptr [RBP + -0x500]
MOV byte ptr [RAX],DL
TEST EBX,EBX
JNZ 0x001881db
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R15
CALL 0x00183950
LAB_0018837c:
MOV EBX,EAX
JMP 0x001881db
LAB_00188383:
CALL 0x00129270
|
int w_search(long *param_1,long param_2,uint param_3,byte *param_4,int param_5,int8 param_6,
int8 param_7,int8 param_8,int8 param_9,char param_10)
{
code *pcVar1;
long lVar2;
int8 uVar3;
int iVar4;
int iVar5;
int iVar6;
uint uVar7;
long lVar8;
int4 *puVar9;
long lVar10;
long lVar11;
byte *pbVar12;
int1 *puVar13;
char *pcVar14;
long in_FS_OFFSET;
long alStack_550 [5];
long local_528;
int8 local_520;
byte *local_518;
uint local_510;
int local_50c;
int1 *local_508;
char local_4f9;
byte local_4f8;
int1 local_4f7 [1215];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0);
pcVar14 = (char *)((long)&local_528 + lVar2);
local_518 = param_4;
local_50c = param_5;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x18802f;
lVar8 = _mi_fetch_keypage(param_1,param_2,param_6,3,pcVar14,0);
pbVar12 = local_518;
if (lVar8 != 0) {
iVar6 = 0x970;
if ((param_3 & 1) != 0) {
iVar6 = local_50c;
}
local_520 = param_6;
local_510 = param_3;
*(char **)((long)alStack_550 + lVar2 + 0x18) = &local_4f9;
*(byte **)((long)alStack_550 + lVar2 + 0x10) = &local_4f8;
*(int1 ***)((long)alStack_550 + lVar2 + 8) = &local_508;
pcVar1 = *(code **)(param_2 + 0x40);
*(int8 *)((long)alStack_550 + lVar2) = 0x18808c;
iVar4 = (*pcVar1)(param_1,param_2,pcVar14,pbVar12,iVar6,param_3);
iVar6 = 0;
if (*pcVar14 < '\0') {
iVar6 = *(int *)(*param_1 + 0x17c);
}
if (iVar4 == 0) {
pcVar1 = *(code **)(param_2 + 0x48);
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x188199;
uVar7 = (*pcVar1)(param_2,iVar6,&local_508,&local_4f8);
if (uVar7 == 0) {
lVar8 = -1;
}
else {
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1881b4;
lVar8 = _mi_dpos(param_1,0,&local_4f8 + uVar7);
}
pbVar12 = local_518;
if ((*(byte *)(param_2 + 10) & 0x80) == 0) {
param_1[0x34] = lVar8;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1881d0;
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x79;
goto LAB_001881d6;
}
if ((ulong)local_4f8 == 0xff) {
lVar10 = (ulong)(ushort)(local_4f7._0_2_ << 8 | (ushort)local_4f7._0_2_ >> 8) + 3;
}
else {
lVar10 = (ulong)local_4f8 + 1;
}
if ((int)((uint)(&local_4f8)[lVar10] << 0x18) < 0) {
local_50c = CONCAT13((&local_4f8)[lVar10],
CONCAT12(local_4f7[lVar10],
*(ushort *)(local_4f7 + lVar10 + 1) << 8 |
*(ushort *)(local_4f7 + lVar10 + 1) >> 8));
lVar10 = *param_1 + 0x1a8;
if ((ulong)*local_518 == 0xff) {
lVar11 = (ulong)(ushort)(*(ushort *)(local_518 + 1) << 8 | *(ushort *)(local_518 + 1) >> 8
) + 3;
}
else {
lVar11 = (ulong)*local_518 + 1;
}
pbVar12 = local_518 + lVar11;
local_508 = local_508 + -(ulong)(iVar6 + (uint)*(ushort *)(*param_1 + 0x1ba));
local_528 = lVar8;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x18830a;
iVar5 = _mi_ck_real_write_btree(param_1,lVar10,pbVar12,0,&local_528,4);
lVar8 = local_528;
puVar13 = local_508 + 4;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x188323;
_mi_dpointer(param_1,puVar13,lVar8);
uVar3 = local_520;
iVar6 = local_50c + -1;
local_508[3] = (char)iVar6;
local_508[2] = (char)((uint)iVar6 >> 8);
local_508[1] = (char)((uint)iVar6 >> 0x10);
*local_508 = (char)((uint)iVar6 >> 0x18);
if (iVar5 == 0) {
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x18837c;
iVar5 = _mi_write_keypage(param_1,lVar10,uVar3,3,pcVar14);
}
goto LAB_001881db;
}
local_510 = 4;
*(char **)((long)alStack_550 + lVar2 + 0x18) = &local_4f9;
*(byte **)((long)alStack_550 + lVar2 + 0x10) = &local_4f8;
*(int1 ***)((long)alStack_550 + lVar2 + 8) = &local_508;
pcVar1 = *(code **)(param_2 + 0x40);
*(int8 *)((long)alStack_550 + lVar2) = 0x188272;
iVar4 = (*pcVar1)(param_1,param_2,pcVar14,pbVar12,0x970,4);
}
puVar13 = local_508;
iVar5 = -1;
if (iVar4 == 0x7fffffff) goto LAB_001881db;
if (local_4f9 == '\0') {
param_10 = '\0';
}
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x1880dd;
lVar8 = _mi_kpos(iVar6,puVar13);
iVar6 = local_50c;
uVar7 = local_510;
pbVar12 = local_518;
if (lVar8 != -1) {
*(ulong *)((long)alStack_550 + lVar2 + 0x20) = (ulong)(uint)(int)param_10;
*(int8 *)((long)alStack_550 + lVar2 + 0x18) = local_520;
*(int1 **)((long)alStack_550 + lVar2 + 0x10) = local_508;
*(char **)((long)alStack_550 + lVar2 + 8) = pcVar14;
*(int8 *)((long)alStack_550 + lVar2) = 0x188122;
iVar5 = w_search(param_1,param_2,uVar7,pbVar12,iVar6,lVar8);
if (iVar5 < 1) goto LAB_001881db;
}
puVar13 = local_508;
*(ulong *)((long)alStack_550 + lVar2 + 0x20) = (ulong)(uint)(int)param_10;
*(int8 *)((long)alStack_550 + lVar2 + 0x18) = param_9;
*(int8 *)((long)alStack_550 + lVar2 + 0x10) = param_8;
*(int8 *)((long)alStack_550 + lVar2 + 8) = param_7;
*(int8 *)((long)alStack_550 + lVar2) = 0x18815b;
iVar5 = _mi_insert(param_1,param_2,pbVar12,pcVar14,puVar13,&local_4f8);
uVar3 = local_520;
*(int8 *)((long)alStack_550 + lVar2 + 0x20) = 0x18817b;
iVar6 = _mi_write_keypage(param_1,param_2,uVar3,3,pcVar14);
if (iVar6 == 0) goto LAB_001881db;
}
LAB_001881d6:
iVar5 = -1;
LAB_001881db:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)alStack_550 + lVar2 + 0x20) = _mi_enlarge_root;
__stack_chk_fail();
}
return iVar5;
}
|
|
61,285
|
ps_fetch_from_1_to_8_bytes
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
void ps_fetch_from_1_to_8_bytes(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row, unsigned int byte_count)
{
my_bool is_unsigned= test(field->flags & UNSIGNED_FLAG);
r_param->buffer_length= byte_count;
switch (byte_count) {
case 1:
*(uchar *)r_param->buffer= **row;
*r_param->error= is_unsigned != r_param->is_unsigned && *(uchar *)r_param->buffer > INT_MAX8;
break;
case 2:
shortstore(r_param->buffer, ((ushort) sint2korr(*row)));
*r_param->error= is_unsigned != r_param->is_unsigned && *(ushort *)r_param->buffer > INT_MAX16;
break;
case 4:
{
longstore(r_param->buffer, ((uint32)sint4korr(*row)));
*r_param->error= is_unsigned != r_param->is_unsigned && *(uint32 *)r_param->buffer > INT_MAX32;
}
break;
case 8:
{
ulonglong val= (ulonglong)sint8korr(*row);
longlongstore(r_param->buffer, val);
*r_param->error= is_unsigned != r_param->is_unsigned && val > LONGLONG_MAX ;
}
break;
default:
r_param->buffer_length= 0;
break;
}
(*row)+= byte_count;
}
|
O3
|
c
|
ps_fetch_from_1_to_8_bytes:
pushq %rbp
movq %rsp, %rbp
movb 0x64(%rsi), %sil
movl %ecx, %eax
movq %rax, 0x40(%rdi)
decl %ecx
cmpl $0x7, %ecx
ja 0x26877
shrb $0x5, %sil
andb $0x1, %sil
leaq 0x169e4(%rip), %r8 # 0x3d180
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movq (%rdx), %rcx
movb (%rcx), %cl
movq 0x10(%rdi), %r8
movb %cl, (%r8)
cmpb 0x65(%rdi), %sil
je 0x2682a
movq 0x10(%rdi), %rcx
movb (%rcx), %cl
shrb $0x7, %cl
jmp 0x2688b
movq (%rdx), %rcx
movb (%rcx), %cl
movq 0x10(%rdi), %r8
movb %cl, (%r8)
movq (%rdx), %rcx
movb 0x1(%rcx), %cl
movq 0x10(%rdi), %r8
movb %cl, 0x1(%r8)
movq (%rdx), %rcx
movb 0x2(%rcx), %cl
movq 0x10(%rdi), %r8
movb %cl, 0x2(%r8)
movq (%rdx), %rcx
movb 0x3(%rcx), %cl
movq 0x10(%rdi), %r8
movb %cl, 0x3(%r8)
cmpb 0x65(%rdi), %sil
je 0x2682a
movq 0x10(%rdi), %rcx
movl (%rcx), %ecx
shrl $0x1f, %ecx
jmp 0x2688b
movq (%rdx), %rcx
movb (%rcx), %r8b
movb 0x1(%rcx), %cl
movq 0x10(%rdi), %r9
movb %r8b, (%r9)
movq 0x10(%rdi), %r8
movb %cl, 0x1(%r8)
cmpb 0x65(%rdi), %sil
jne 0x26881
xorl %ecx, %ecx
jmp 0x2688b
movq (%rdx), %rcx
movl (%rcx), %r8d
movzwl 0x4(%rcx), %r9d
shlq $0x20, %r9
orq %r8, %r9
movzbl 0x6(%rcx), %r8d
movzbl 0x7(%rcx), %ecx
shlq $0x38, %rcx
shlq $0x30, %r8
orq %r9, %r8
orq %rcx, %r8
movq 0x10(%rdi), %r9
movq %r8, (%r9)
cmpb 0x65(%rdi), %sil
setne %sil
testq %rcx, %rcx
sets %cl
andb %sil, %cl
movq 0x18(%rdi), %rsi
movb %cl, (%rsi)
jmp 0x26891
movq $0x0, 0x40(%rdi)
jmp 0x26891
movq 0x10(%rdi), %rcx
movzwl (%rcx), %ecx
shrl $0xf, %ecx
movq 0x18(%rdi), %rsi
movb %cl, (%rsi)
addq %rax, (%rdx)
popq %rbp
retq
|
ps_fetch_from_1_to_8_bytes:
push rbp
mov rbp, rsp
mov sil, [rsi+64h]
mov eax, ecx
mov [rdi+40h], rax
dec ecx; switch 8 cases
cmp ecx, 7
ja def_267A3; jumptable 00000000000267A3 default case, cases 3,5-7
shr sil, 5
and sil, 1
lea r8, jpt_267A3
movsxd rcx, ds:(jpt_267A3 - 3D180h)[r8+rcx*4]
add rcx, r8
jmp rcx; switch jump
loc_267A5:
mov rcx, [rdx]; jumptable 00000000000267A3 case 1
mov cl, [rcx]
mov r8, [rdi+10h]
mov [r8], cl
cmp sil, [rdi+65h]
jz short loc_2682A
mov rcx, [rdi+10h]
mov cl, [rcx]
shr cl, 7
jmp loc_2688B
loc_267C5:
mov rcx, [rdx]; jumptable 00000000000267A3 case 4
mov cl, [rcx]
mov r8, [rdi+10h]
mov [r8], cl
mov rcx, [rdx]
mov cl, [rcx+1]
mov r8, [rdi+10h]
mov [r8+1], cl
mov rcx, [rdx]
mov cl, [rcx+2]
mov r8, [rdi+10h]
mov [r8+2], cl
mov rcx, [rdx]
mov cl, [rcx+3]
mov r8, [rdi+10h]
mov [r8+3], cl
cmp sil, [rdi+65h]
jz short loc_2682A
mov rcx, [rdi+10h]
mov ecx, [rcx]
shr ecx, 1Fh
jmp short loc_2688B
loc_2680C:
mov rcx, [rdx]; jumptable 00000000000267A3 case 2
mov r8b, [rcx]
mov cl, [rcx+1]
mov r9, [rdi+10h]
mov [r9], r8b
mov r8, [rdi+10h]
mov [r8+1], cl
cmp sil, [rdi+65h]
jnz short loc_26881
loc_2682A:
xor ecx, ecx
jmp short loc_2688B
loc_2682E:
mov rcx, [rdx]; jumptable 00000000000267A3 case 8
mov r8d, [rcx]
movzx r9d, word ptr [rcx+4]
shl r9, 20h
or r9, r8
movzx r8d, byte ptr [rcx+6]
movzx ecx, byte ptr [rcx+7]
shl rcx, 38h
shl r8, 30h
or r8, r9
or r8, rcx
mov r9, [rdi+10h]
mov [r9], r8
cmp sil, [rdi+65h]
setnz sil
test rcx, rcx
sets cl
and cl, sil
mov rsi, [rdi+18h]
mov [rsi], cl
jmp short loc_26891
def_267A3:
mov qword ptr [rdi+40h], 0; jumptable 00000000000267A3 default case, cases 3,5-7
jmp short loc_26891
loc_26881:
mov rcx, [rdi+10h]
movzx ecx, word ptr [rcx]
shr ecx, 0Fh
loc_2688B:
mov rsi, [rdi+18h]
mov [rsi], cl
loc_26891:
add [rdx], rax
pop rbp
retn
|
long long ps_fetch_from_1_to_8_bytes(long long a1, long long a2, _BYTE **a3, unsigned int a4)
{
char v4; // si
long long result; // rax
char v6; // si
int v7; // ecx
char v8; // cl
signed long long v9; // rcx
v4 = *(_BYTE *)(a2 + 100);
result = a4;
*(_QWORD *)(a1 + 64) = a4;
v6 = (v4 & 0x20) != 0;
switch ( a4 )
{
case 1u:
**(_BYTE **)(a1 + 16) = **a3;
if ( v6 == *(_BYTE *)(a1 + 101) )
goto LABEL_7;
LOBYTE(v7) = **(_BYTE **)(a1 + 16) >> 7;
goto LABEL_11;
case 2u:
v8 = (*a3)[1];
**(_BYTE **)(a1 + 16) = **a3;
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = v8;
if ( v6 == *(_BYTE *)(a1 + 101) )
goto LABEL_7;
v7 = **(unsigned __int16 **)(a1 + 16) >> 15;
goto LABEL_11;
case 4u:
**(_BYTE **)(a1 + 16) = **a3;
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = (*a3)[1];
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 2LL) = (*a3)[2];
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 3LL) = (*a3)[3];
if ( v6 == *(_BYTE *)(a1 + 101) )
LABEL_7:
LOBYTE(v7) = 0;
else
v7 = **(_DWORD **)(a1 + 16) >> 31;
LABEL_11:
**(_BYTE **)(a1 + 24) = v7;
break;
case 8u:
v9 = (unsigned long long)(unsigned __int8)(*a3)[7] << 56;
**(_QWORD **)(a1 + 16) = v9 | *(unsigned int *)*a3 | ((unsigned long long)*((unsigned __int16 *)*a3 + 2) << 32) | ((unsigned long long)(unsigned __int8)(*a3)[6] << 48);
**(_BYTE **)(a1 + 24) = v6 != *(_BYTE *)(a1 + 101) && v9 < 0;
break;
default:
*(_QWORD *)(a1 + 64) = 0LL;
break;
}
*a3 += result;
return result;
}
|
ps_fetch_from_1_to_8_bytes:
PUSH RBP
MOV RBP,RSP
MOV SIL,byte ptr [RSI + 0x64]
MOV EAX,ECX
MOV qword ptr [RDI + 0x40],RAX
DEC ECX
CMP ECX,0x7
JA 0x00126877
SHR SIL,0x5
AND SIL,0x1
LEA R8,[0x13d180]
MOVSXD RCX,dword ptr [R8 + RCX*0x4]
ADD RCX,R8
switchD:
JMP RCX
caseD_1:
MOV RCX,qword ptr [RDX]
MOV CL,byte ptr [RCX]
MOV R8,qword ptr [RDI + 0x10]
MOV byte ptr [R8],CL
CMP SIL,byte ptr [RDI + 0x65]
JZ 0x0012682a
MOV RCX,qword ptr [RDI + 0x10]
MOV CL,byte ptr [RCX]
SHR CL,0x7
JMP 0x0012688b
caseD_4:
MOV RCX,qword ptr [RDX]
MOV CL,byte ptr [RCX]
MOV R8,qword ptr [RDI + 0x10]
MOV byte ptr [R8],CL
MOV RCX,qword ptr [RDX]
MOV CL,byte ptr [RCX + 0x1]
MOV R8,qword ptr [RDI + 0x10]
MOV byte ptr [R8 + 0x1],CL
MOV RCX,qword ptr [RDX]
MOV CL,byte ptr [RCX + 0x2]
MOV R8,qword ptr [RDI + 0x10]
MOV byte ptr [R8 + 0x2],CL
MOV RCX,qword ptr [RDX]
MOV CL,byte ptr [RCX + 0x3]
MOV R8,qword ptr [RDI + 0x10]
MOV byte ptr [R8 + 0x3],CL
CMP SIL,byte ptr [RDI + 0x65]
JZ 0x0012682a
MOV RCX,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [RCX]
SHR ECX,0x1f
JMP 0x0012688b
caseD_2:
MOV RCX,qword ptr [RDX]
MOV R8B,byte ptr [RCX]
MOV CL,byte ptr [RCX + 0x1]
MOV R9,qword ptr [RDI + 0x10]
MOV byte ptr [R9],R8B
MOV R8,qword ptr [RDI + 0x10]
MOV byte ptr [R8 + 0x1],CL
CMP SIL,byte ptr [RDI + 0x65]
JNZ 0x00126881
LAB_0012682a:
XOR ECX,ECX
JMP 0x0012688b
caseD_8:
MOV RCX,qword ptr [RDX]
MOV R8D,dword ptr [RCX]
MOVZX R9D,word ptr [RCX + 0x4]
SHL R9,0x20
OR R9,R8
MOVZX R8D,byte ptr [RCX + 0x6]
MOVZX ECX,byte ptr [RCX + 0x7]
SHL RCX,0x38
SHL R8,0x30
OR R8,R9
OR R8,RCX
MOV R9,qword ptr [RDI + 0x10]
MOV qword ptr [R9],R8
CMP SIL,byte ptr [RDI + 0x65]
SETNZ SIL
TEST RCX,RCX
SETS CL
AND CL,SIL
MOV RSI,qword ptr [RDI + 0x18]
MOV byte ptr [RSI],CL
JMP 0x00126891
caseD_3:
MOV qword ptr [RDI + 0x40],0x0
JMP 0x00126891
LAB_00126881:
MOV RCX,qword ptr [RDI + 0x10]
MOVZX ECX,word ptr [RCX]
SHR ECX,0xf
LAB_0012688b:
MOV RSI,qword ptr [RDI + 0x18]
MOV byte ptr [RSI],CL
LAB_00126891:
ADD qword ptr [RDX],RAX
POP RBP
RET
|
void ps_fetch_from_1_to_8_bytes(long param_1,long param_2,long *param_3,uint param_4)
{
int1 uVar1;
byte bVar2;
byte bVar3;
bVar3 = *(byte *)(param_2 + 100);
*(ulong *)(param_1 + 0x40) = (ulong)param_4;
if (param_4 - 1 < 8) {
bVar3 = bVar3 >> 5 & 1;
switch(param_4) {
case 1:
**(int1 **)(param_1 + 0x10) = *(int1 *)*param_3;
if (bVar3 == *(byte *)(param_1 + 0x65)) {
LAB_0012682a:
bVar3 = 0;
}
else {
bVar3 = **(byte **)(param_1 + 0x10) >> 7;
}
break;
case 2:
uVar1 = ((int1 *)*param_3)[1];
**(int1 **)(param_1 + 0x10) = *(int1 *)*param_3;
*(int1 *)(*(long *)(param_1 + 0x10) + 1) = uVar1;
if (bVar3 == *(byte *)(param_1 + 0x65)) goto LAB_0012682a;
bVar3 = (byte)((ushort)**(int2 **)(param_1 + 0x10) >> 0xf);
break;
default:
goto switchD_001267a3_caseD_3;
case 4:
**(int1 **)(param_1 + 0x10) = *(int1 *)*param_3;
*(int1 *)(*(long *)(param_1 + 0x10) + 1) = *(int1 *)(*param_3 + 1);
*(int1 *)(*(long *)(param_1 + 0x10) + 2) = *(int1 *)(*param_3 + 2);
*(int1 *)(*(long *)(param_1 + 0x10) + 3) = *(int1 *)(*param_3 + 3);
if (bVar3 == *(byte *)(param_1 + 0x65)) goto LAB_0012682a;
bVar3 = (byte)((uint)**(int4 **)(param_1 + 0x10) >> 0x1f);
break;
case 8:
bVar2 = *(byte *)(*param_3 + 7);
**(int8 **)(param_1 + 0x10) = *(int8 *)*param_3;
*(bool *)*(int8 *)(param_1 + 0x18) =
(long)((ulong)bVar2 << 0x38) < 0 && bVar3 != *(byte *)(param_1 + 0x65);
goto LAB_00126891;
}
**(byte **)(param_1 + 0x18) = bVar3;
}
else {
switchD_001267a3_caseD_3:
*(int8 *)(param_1 + 0x40) = 0;
}
LAB_00126891:
*param_3 = *param_3 + (ulong)param_4;
return;
}
|
|
61,286
|
ggml_gallocr_free
|
ngxson[P]ggml-easy/ggml/src/ggml-alloc.c
|
void ggml_gallocr_free(ggml_gallocr_t galloc) {
if (galloc == NULL) {
return;
}
for (int i = 0; i < galloc->n_buffers; i++) {
if (galloc->buffers != NULL) {
// skip if already freed
bool freed = false;
for (int j = 0; j < i; j++) {
if (galloc->buffers[j] == galloc->buffers[i]) {
freed = true;
break;
}
}
if (!freed) {
ggml_backend_buffer_free(galloc->buffers[i]);
}
}
if (galloc->buf_tallocs != NULL) {
// skip if already freed
bool freed = false;
for (int j = 0; j < i; j++) {
if (galloc->buf_tallocs[j] == galloc->buf_tallocs[i]) {
freed = true;
break;
}
}
if (!freed) {
ggml_dyn_tallocr_free(galloc->buf_tallocs[i]);
}
}
}
ggml_hash_set_free(&galloc->hash_set);
free(galloc->hash_values);
free(galloc->bufts);
free(galloc->buffers);
free(galloc->buf_tallocs);
free(galloc->node_allocs);
free(galloc->leaf_allocs);
free(galloc);
}
|
O2
|
c
|
ggml_gallocr_free:
testq %rdi, %rdi
je 0x29080
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x18(%rbx), %rax
cmpq %rax, %r14
jge 0x29033
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x29006
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x28ffd
movq (%rax,%rcx,8), %rdx
incq %rcx
cmpq (%rax,%r14,8), %rdx
jne 0x28fe9
jmp 0x29006
movq (%rax,%r14,8), %rdi
callq 0x1e830
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x2902e
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x29025
movq (%rax,%rcx,8), %rdx
incq %rcx
cmpq (%rax,%r14,8), %rdx
jne 0x29011
jmp 0x2902e
movq (%rax,%r14,8), %rdi
callq 0x1db70
incq %r14
jmp 0x28fd5
leaq 0x20(%rbx), %rdi
callq 0x1c240
movq 0x38(%rbx), %rdi
callq 0x1db70
movq (%rbx), %rdi
callq 0x1db70
movq 0x8(%rbx), %rdi
callq 0x1db70
movq 0x10(%rbx), %rdi
callq 0x1db70
movq 0x40(%rbx), %rdi
callq 0x1db70
movq 0x50(%rbx), %rdi
callq 0x1db70
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1db70
retq
|
ggml_gallocr_free:
test rdi, rdi
jz locret_29080
push r14
push rbx
push rax
mov rbx, rdi
xor r14d, r14d
loc_28FD5:
movsxd rax, dword ptr [rbx+18h]
cmp r14, rax
jge short loc_29033
mov rax, [rbx+8]
test rax, rax
jz short loc_29006
xor ecx, ecx
loc_28FE9:
cmp r14, rcx
jz short loc_28FFD
mov rdx, [rax+rcx*8]
inc rcx
cmp rdx, [rax+r14*8]
jnz short loc_28FE9
jmp short loc_29006
loc_28FFD:
mov rdi, [rax+r14*8]; void *
call _ggml_backend_buffer_free
loc_29006:
mov rax, [rbx+10h]
test rax, rax
jz short loc_2902E
xor ecx, ecx
loc_29011:
cmp r14, rcx
jz short loc_29025
mov rdx, [rax+rcx*8]
inc rcx
cmp rdx, [rax+r14*8]
jnz short loc_29011
jmp short loc_2902E
loc_29025:
mov rdi, [rax+r14*8]
call _free
loc_2902E:
inc r14
jmp short loc_28FD5
loc_29033:
lea rdi, [rbx+20h]
call _ggml_hash_set_free
mov rdi, [rbx+38h]
call _free
mov rdi, [rbx]
call _free
mov rdi, [rbx+8]
call _free
mov rdi, [rbx+10h]
call _free
mov rdi, [rbx+40h]
call _free
mov rdi, [rbx+50h]
call _free
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
jmp _free
locret_29080:
retn
|
long long ggml_gallocr_free(long long a1, long long a2)
{
long long result; // rax
long long i; // r14
long long v4; // rax
long long v5; // rcx
long long v6; // rdx
long long v7; // rax
long long v8; // rcx
long long v9; // rdx
if ( a1 )
{
for ( i = 0LL; i < *(int *)(a1 + 24); ++i )
{
v4 = *(_QWORD *)(a1 + 8);
if ( v4 )
{
v5 = 0LL;
while ( i != v5 )
{
v6 = *(_QWORD *)(v4 + 8 * v5++);
if ( v6 == *(_QWORD *)(v4 + 8 * i) )
goto LABEL_10;
}
ggml_backend_buffer_free(*(void **)(v4 + 8 * i));
}
LABEL_10:
v7 = *(_QWORD *)(a1 + 16);
if ( v7 )
{
v8 = 0LL;
while ( i != v8 )
{
v9 = *(_QWORD *)(v7 + 8 * v8++);
if ( v9 == *(_QWORD *)(v7 + 8 * i) )
goto LABEL_16;
}
free(*(_QWORD *)(v7 + 8 * i), a2);
}
LABEL_16:
;
}
ggml_hash_set_free(a1 + 32, a2);
free(*(_QWORD *)(a1 + 56), a2);
free(*(_QWORD *)a1, a2);
free(*(_QWORD *)(a1 + 8), a2);
free(*(_QWORD *)(a1 + 16), a2);
free(*(_QWORD *)(a1 + 64), a2);
free(*(_QWORD *)(a1 + 80), a2);
return free(a1, a2);
}
return result;
}
|
ggml_gallocr_free:
TEST RDI,RDI
JZ 0x00129080
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR R14D,R14D
LAB_00128fd5:
MOVSXD RAX,dword ptr [RBX + 0x18]
CMP R14,RAX
JGE 0x00129033
MOV RAX,qword ptr [RBX + 0x8]
TEST RAX,RAX
JZ 0x00129006
XOR ECX,ECX
LAB_00128fe9:
CMP R14,RCX
JZ 0x00128ffd
MOV RDX,qword ptr [RAX + RCX*0x8]
INC RCX
CMP RDX,qword ptr [RAX + R14*0x8]
JNZ 0x00128fe9
JMP 0x00129006
LAB_00128ffd:
MOV RDI,qword ptr [RAX + R14*0x8]
CALL 0x0011e830
LAB_00129006:
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x0012902e
XOR ECX,ECX
LAB_00129011:
CMP R14,RCX
JZ 0x00129025
MOV RDX,qword ptr [RAX + RCX*0x8]
INC RCX
CMP RDX,qword ptr [RAX + R14*0x8]
JNZ 0x00129011
JMP 0x0012902e
LAB_00129025:
MOV RDI,qword ptr [RAX + R14*0x8]
CALL 0x0011db70
LAB_0012902e:
INC R14
JMP 0x00128fd5
LAB_00129033:
LEA RDI,[RBX + 0x20]
CALL 0x0011c240
MOV RDI,qword ptr [RBX + 0x38]
CALL 0x0011db70
MOV RDI,qword ptr [RBX]
CALL 0x0011db70
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x0011db70
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x0011db70
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0011db70
MOV RDI,qword ptr [RBX + 0x50]
CALL 0x0011db70
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011db70
LAB_00129080:
RET
|
void ggml_gallocr_free(int8 *param_1)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_1 == (int8 *)0x0) {
return;
}
lVar4 = 0;
do {
if (*(int *)(param_1 + 3) <= lVar4) {
ggml_hash_set_free(param_1 + 4);
free((void *)param_1[7]);
free((void *)*param_1);
free((void *)param_1[1]);
free((void *)param_1[2]);
free((void *)param_1[8]);
free((void *)param_1[10]);
free(param_1);
return;
}
lVar2 = param_1[1];
if (lVar2 != 0) {
lVar3 = 0;
do {
if (lVar4 == lVar3) {
ggml_backend_buffer_free(*(int8 *)(lVar2 + lVar4 * 8));
break;
}
lVar1 = lVar3 * 8;
lVar3 = lVar3 + 1;
} while (*(long *)(lVar2 + lVar1) != *(long *)(lVar2 + lVar4 * 8));
}
lVar2 = param_1[2];
if (lVar2 != 0) {
lVar3 = 0;
do {
if (lVar4 == lVar3) {
free(*(void **)(lVar2 + lVar4 * 8));
break;
}
lVar1 = lVar3 * 8;
lVar3 = lVar3 + 1;
} while (*(long *)(lVar2 + lVar1) != *(long *)(lVar2 + lVar4 * 8));
}
lVar4 = lVar4 + 1;
} while( true );
}
|
|
61,287
|
rapidcsv::Document::Trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
|
std::string Trim(const std::string& pStr) const
{
if (mSeparatorParams.mTrim)
{
std::string str = pStr;
// ltrim
str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](int ch) { return !isspace(ch); }));
// rtrim
str.erase(std::find_if(str.rbegin(), str.rend(), [](int ch) { return !isspace(ch); }).base(), str.end());
return str;
}
else
{
return pStr;
}
}
|
O0
|
c
|
rapidcsv::Document::Trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x29(%rax)
je 0x301e2
movq -0xc8(%rbp), %rdi
movb $0x0, -0x19(%rbp)
movq -0x18(%rbp), %rsi
callq 0xd200
movq -0xc8(%rbp), %rdi
callq 0xd4f0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x30fb0
movq -0xc8(%rbp), %rdi
callq 0xd4f0
movq -0xc8(%rbp), %rdi
movq %rax, -0x48(%rbp)
callq 0xd2f0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x30ff0
movq %rax, -0xd0(%rbp)
jmp 0x3009d
movq -0xd0(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x30fb0
movq -0xc8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xd0d0
movq %rax, -0xd8(%rbp)
jmp 0x300d2
movq -0xc8(%rbp), %rsi
movq -0xd8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0xda80
movq -0xc8(%rbp), %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xd700
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x31030
jmp 0x3012d
leaq -0x88(%rbp), %rdi
callq 0x31090
movq %rax, -0xf0(%rbp)
jmp 0x30142
movq -0xf0(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x30fb0
movq -0xc8(%rbp), %rdi
callq 0xd2f0
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x30fb0
movq -0xc8(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0xd0d0
movq %rax, -0xf8(%rbp)
jmp 0x301a0
movq -0xf8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x301e0
jmp 0x301d4
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0xdbc8
jmp 0x30202
movq -0xc8(%rbp), %rdi
callq 0xdbc8
jmp 0x301f2
movq -0xc8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd200
movq -0xc0(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0xda90
nopl (%rax,%rax)
|
_ZNK8rapidcsv8Document4TrimERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 100h
mov [rbp+var_C8], rdi
mov rax, rdi
mov [rbp+var_C0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
test byte ptr [rax+29h], 1
jz loc_301E2
mov rdi, [rbp+var_C8]
mov [rbp+var_19], 0
mov rsi, [rbp+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
mov rdi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rbp+var_30], rax
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov rdi, [rbp+var_C8]
mov [rbp+var_48], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_50]
call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZNK8rapidcsv8Document4TrimERKS8_EUliE_ET_SF_SF_T0_; std::find_if<__gnu_cxx::__normal_iterator<char *,std::string>,rapidcsv::Document::Trim(std::string const&)::{lambda(int)#1}>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,rapidcsv::Document::Trim(std::string const&)::{lambda(int)#1})
mov [rbp+var_D0], rax
jmp short $+2
loc_3009D:
mov rax, [rbp+var_D0]
mov [rbp+var_40], rax
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rbp+var_C8]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>)
mov [rbp+var_D8], rax
jmp short $+2
loc_300D2:
mov rsi, [rbp+var_C8]
mov rax, [rbp+var_D8]
mov [rbp+var_70], rax
lea rdi, [rbp+var_90]
mov [rbp+var_E8], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6rbeginEv; std::string::rbegin(void)
mov rsi, [rbp+var_C8]
lea rdi, [rbp+var_98]
mov [rbp+var_E0], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4rendEv; std::string::rend(void)
mov rsi, [rbp+var_E8]
mov rdx, [rbp+var_E0]
lea rdi, [rbp+var_88]
call _ZSt7find_ifISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEZNK8rapidcsv8Document4TrimERKS9_EUliE0_ET_SH_SH_T0_; std::find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,rapidcsv::Document::Trim(std::string const&)::{lambda(int)#2}>(std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,rapidcsv::Document::Trim(std::string const&)::{lambda(int)#2})
jmp short $+2
loc_3012D:
lea rdi, [rbp+var_88]
call _ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEE4baseEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>::base(void)
mov [rbp+var_F0], rax
jmp short $+2
loc_30142:
mov rax, [rbp+var_F0]
mov [rbp+var_80], rax
lea rdi, [rbp+var_78]
lea rsi, [rbp+var_80]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rbp+var_B0], rax
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_B0]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rbp+var_C8]
mov rsi, [rbp+var_78]
mov rdx, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>)
mov [rbp+var_F8], rax
jmp short $+2
loc_301A0:
mov rax, [rbp+var_F8]
mov [rbp+var_B8], rax
mov [rbp+var_19], 1
test [rbp+var_19], 1
jnz short loc_301E0
jmp short loc_301D4
mov rdi, [rbp+var_C8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_30202
loc_301D4:
mov rdi, [rbp+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_301E0:
jmp short loc_301F2
loc_301E2:
mov rdi, [rbp+var_C8]
mov rsi, [rbp+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
loc_301F2:
mov rax, [rbp+var_C0]
add rsp, 100h
pop rbp
retn
loc_30202:
mov rdi, [rbp+var_60]
call __Unwind_Resume
|
long long rapidcsv::Document::Trim(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+50h] [rbp-B0h] BYREF
long long v5; // [rsp+58h] [rbp-A8h] BYREF
_BYTE v6[8]; // [rsp+68h] [rbp-98h] BYREF
_BYTE v7[8]; // [rsp+70h] [rbp-90h] BYREF
_BYTE v8[8]; // [rsp+78h] [rbp-88h] BYREF
long long v9; // [rsp+80h] [rbp-80h] BYREF
_QWORD v10[2]; // [rsp+88h] [rbp-78h] BYREF
long long v11; // [rsp+B0h] [rbp-50h]
long long v12; // [rsp+B8h] [rbp-48h]
long long v13; // [rsp+C0h] [rbp-40h] BYREF
long long v14; // [rsp+C8h] [rbp-38h] BYREF
long long v15; // [rsp+D0h] [rbp-30h] BYREF
long long v16; // [rsp+D8h] [rbp-28h] BYREF
char v17; // [rsp+E7h] [rbp-19h]
long long v18; // [rsp+E8h] [rbp-18h]
long long v19; // [rsp+F0h] [rbp-10h]
long long v20; // [rsp+F8h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
if ( (*(_BYTE *)(a2 + 41) & 1) != 0 )
{
v17 = 0;
std::string::basic_string(a1, v18);
v15 = std::string::begin(a1);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v16, &v15);
v12 = std::string::begin(a1);
v11 = std::string::end(a1);
v13 = std::find_if<__gnu_cxx::__normal_iterator<char *,std::string>,rapidcsv::Document::Trim(std::string const&)::{lambda(int)#1}>(
v12,
v11);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v14, &v13);
v10[1] = std::string::erase(a1, v16, v14);
std::string::rbegin(v7, a1);
std::string::rend(v6, a1);
std::find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,rapidcsv::Document::Trim(std::string const&)::{lambda(int)#2}>(
v8,
v7,
v6);
v9 = std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>::base(v8);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(v10, &v9);
v4 = std::string::end(a1);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v5, &v4);
std::string::erase(a1, v10[0], v5);
v17 = 1;
}
else
{
std::string::basic_string(a1, v18);
}
return a1;
}
|
Trim:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV qword ptr [RBP + -0xc8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xc0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
TEST byte ptr [RAX + 0x29],0x1
JZ 0x001301e2
MOV RDI,qword ptr [RBP + -0xc8]
MOV byte ptr [RBP + -0x19],0x0
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010d200
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x0010d4f0
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00130fb0
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x0010d4f0
MOV RDI,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0x48],RAX
CALL 0x0010d2f0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x50]
LAB_0013008f:
CALL 0x00130ff0
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0013009d
LAB_0013009d:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x00130fb0
MOV RDI,qword ptr [RBP + -0xc8]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x0010d0d0
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x001300d2
LAB_001300d2:
MOV RSI,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x90]
MOV qword ptr [RBP + -0xe8],RDI
CALL 0x0010da80
MOV RSI,qword ptr [RBP + -0xc8]
LEA RDI,[RBP + -0x98]
MOV qword ptr [RBP + -0xe0],RDI
CALL 0x0010d700
MOV RSI,qword ptr [RBP + -0xe8]
MOV RDX,qword ptr [RBP + -0xe0]
LEA RDI,[RBP + -0x88]
CALL 0x00131030
JMP 0x0013012d
LAB_0013012d:
LEA RDI,[RBP + -0x88]
CALL 0x00131090
MOV qword ptr [RBP + -0xf0],RAX
JMP 0x00130142
LAB_00130142:
MOV RAX,qword ptr [RBP + -0xf0]
MOV qword ptr [RBP + -0x80],RAX
LEA RDI,[RBP + -0x78]
LEA RSI,[RBP + -0x80]
CALL 0x00130fb0
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x0010d2f0
MOV qword ptr [RBP + -0xb0],RAX
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0xb0]
CALL 0x00130fb0
MOV RDI,qword ptr [RBP + -0xc8]
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0xa8]
CALL 0x0010d0d0
LAB_00130197:
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x001301a0
LAB_001301a0:
MOV RAX,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0xb8],RAX
MOV byte ptr [RBP + -0x19],0x1
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x001301e0
JMP 0x001301d4
LAB_001301d4:
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x0010dbc8
LAB_001301e0:
JMP 0x001301f2
LAB_001301e2:
MOV RDI,qword ptr [RBP + -0xc8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010d200
LAB_001301f2:
MOV RAX,qword ptr [RBP + -0xc0]
ADD RSP,0x100
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001301b8) */
/* rapidcsv::Document::Trim(std::__cxx11::string const&) const */
string * rapidcsv::Document::Trim(string *param_1)
{
string *in_RDX;
long in_RSI;
int8 local_b8;
int8 local_b0 [2];
int1 local_a0 [8];
int1 local_98 [8];
reverse_iterator<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>> local_90 [8];
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int1 local_21;
string *local_10;
local_10 = param_1;
if ((*(byte *)(in_RSI + 0x29) & 1) == 0) {
std::__cxx11::string::string(param_1,in_RDX);
}
else {
local_21 = 0;
std::__cxx11::string::string(param_1,in_RDX);
local_38 = std::__cxx11::string::begin();
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_30,
(__normal_iterator *)&local_38);
local_50 = std::__cxx11::string::begin();
local_58 = std::__cxx11::string::end();
/* try { // try from 0013008f to 00130196 has its CatchHandler @ 001301ba */
local_48 = std::
find_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,rapidcsv::Document::Trim(std::__cxx11::string_const&)const::_lambda(int)_1_>
(local_50,local_58);
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_40,
(__normal_iterator *)&local_48);
local_78 = std::__cxx11::string::erase(param_1,local_30,local_40);
std::__cxx11::string::rbegin();
std::__cxx11::string::rend();
std::
find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>>,rapidcsv::Document::Trim(std::__cxx11::string_const&)const::_lambda(int)_2_>
(local_90,local_98,local_a0);
local_88 = std::reverse_iterator<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>>::base
(local_90);
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_80,
(__normal_iterator *)&local_88);
local_b8 = std::__cxx11::string::end();
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)local_b0,
(__normal_iterator *)&local_b8);
std::__cxx11::string::erase(param_1,local_80,local_b0[0]);
}
return param_1;
}
|
|
61,288
|
rapidcsv::Document::Trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
|
std::string Trim(const std::string& pStr) const
{
if (mSeparatorParams.mTrim)
{
std::string str = pStr;
// ltrim
str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](int ch) { return !isspace(ch); }));
// rtrim
str.erase(std::find_if(str.rbegin(), str.rend(), [](int ch) { return !isspace(ch); }).base(), str.end());
return str;
}
else
{
return pStr;
}
}
|
O1
|
c
|
rapidcsv::Document::Trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb 0x29(%rsi), %bpl
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x11e4e
cmpb $0x1, %bpl
jne 0x1e09f
movq (%rbx), %r14
movq 0x8(%rbx), %rsi
addq %r14, %rsi
movq %r14, %rdi
callq 0x1e645
movq (%rbx), %rcx
movq %r14, %rsi
subq %rcx, %rsi
movq 0x8(%rbx), %rdx
addq %rcx, %rdx
cmpq %rax, %rdx
je 0x1e064
subq %r14, %rax
movq %rbx, %rdi
movq %rax, %rdx
callq 0xb4c0
jmp 0x1e06c
movq %rsi, 0x8(%rbx)
movb $0x0, (%rcx,%rsi)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
addq %rax, %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq %rsp, %rdi
callq 0x1e71f
movq (%rsp), %rax
movq %rax, %rcx
subq (%rbx), %rcx
movq %rcx, 0x8(%rbx)
movb $0x0, (%rax)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1e0af
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1e0c5
movq (%r15), %rsi
incq %rsi
callq 0xb400
movq %r14, %rdi
callq 0xb780
nop
|
_ZNK8rapidcsv8Document4TrimERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov bpl, [rsi+29h]
lea r15, [rdi+10h]
mov [rdi], r15
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
cmp bpl, 1
jnz short loc_1E09F
mov r14, [rbx]
mov rsi, [rbx+8]
add rsi, r14
mov rdi, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops10_Iter_predIZNK8rapidcsv8Document4TrimERKS8_EUliE_EEET_SI_SI_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::string const&)::{lambda(int)#1}>>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::string const&)::{lambda(int)#1}>,std::random_access_iterator_tag)
mov rcx, [rbx]
mov rsi, r14
sub rsi, rcx
mov rdx, [rbx+8]
add rdx, rcx
cmp rdx, rax
jz short loc_1E064
sub rax, r14
mov rdi, rbx
mov rdx, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEmm; std::string::_M_erase(ulong,ulong)
jmp short loc_1E06C
loc_1E064:
mov [rbx+8], rsi
mov byte ptr [rcx+rsi], 0
loc_1E06C:
mov rax, [rbx]
mov rcx, [rbx+8]
add rcx, rax
lea rsi, [rsp+38h+var_28]
mov [rsi], rcx
lea rdx, [rsp+38h+var_30]
mov [rdx], rax
mov rdi, rsp
call _ZSt9__find_ifISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEENS1_5__ops10_Iter_predIZNK8rapidcsv8Document4TrimERKS9_EUliE0_EEET_SK_SK_T0_St26random_access_iterator_tag; std::__find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::string const&)::{lambda(int)#2}>>(std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::string const&)::{lambda(int)#2}>,std::random_access_iterator_tag)
mov rax, [rsp+38h+var_38]
mov rcx, rax
sub rcx, [rbx]
mov [rbx+8], rcx
mov byte ptr [rax], 0
loc_1E09F:
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_1E0AF:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_1E0C5
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1E0C5:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * rapidcsv::Document::Trim(_QWORD *a1, long long a2, long long a3)
{
char v3; // bp
long long v4; // r14
long long v5; // rax
long long v6; // rcx
long long v7; // rsi
long long v8; // rax
_BYTE *v9; // rax
_QWORD v11[7]; // [rsp+0h] [rbp-38h] BYREF
v3 = *(_BYTE *)(a2 + 41);
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
if ( v3 == 1 )
{
v4 = *a1;
v5 = std::__find_if<__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::string const&)::{lambda(int)#1}>>(
*a1,
*a1 + a1[1]);
v6 = *a1;
v7 = v4 - *a1;
if ( *a1 + a1[1] == v5 )
{
a1[1] = v7;
*(_BYTE *)(v6 + v7) = 0;
}
else
{
std::string::_M_erase(a1, v7, v5 - v4);
}
v8 = *a1;
v11[2] = *a1 + a1[1];
v11[1] = v8;
std::__find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<char *,std::string>>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::string const&)::{lambda(int)#2}>>(v11);
v9 = (_BYTE *)v11[0];
a1[1] = v11[0] - *a1;
*v9 = 0;
}
return a1;
}
|
Trim:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV BPL,byte ptr [RSI + 0x29]
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
CALL 0x00111e4e
CMP BPL,0x1
JNZ 0x0011e09f
MOV R14,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,R14
LAB_0011e037:
MOV RDI,R14
CALL 0x0011e645
MOV RCX,qword ptr [RBX]
MOV RSI,R14
SUB RSI,RCX
MOV RDX,qword ptr [RBX + 0x8]
ADD RDX,RCX
CMP RDX,RAX
JZ 0x0011e064
SUB RAX,R14
MOV RDI,RBX
MOV RDX,RAX
CALL 0x0010b4c0
JMP 0x0011e06c
LAB_0011e064:
MOV qword ptr [RBX + 0x8],RSI
MOV byte ptr [RCX + RSI*0x1],0x0
LAB_0011e06c:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
ADD RCX,RAX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RCX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0011e086:
MOV RDI,RSP
CALL 0x0011e71f
LAB_0011e08e:
MOV RAX,qword ptr [RSP]
MOV RCX,RAX
SUB RCX,qword ptr [RBX]
MOV qword ptr [RBX + 0x8],RCX
MOV byte ptr [RAX],0x0
LAB_0011e09f:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* rapidcsv::Document::Trim(std::__cxx11::string const&) const */
string * rapidcsv::Document::Trim(string *param_1)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
long *in_RDX;
long in_RSI;
ulong uVar5;
int1 *local_38;
long local_30;
long local_28;
cVar1 = *(char *)(in_RSI + 0x29);
*(string **)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<char*>(param_1,*in_RDX,in_RDX[1] + *in_RDX);
if (cVar1 == '\x01') {
lVar2 = *(long *)param_1;
/* try { // try from 0011e037 to 0011e061 has its CatchHandler @ 0011e0af */
lVar4 = std::
__find_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::__cxx11::string_const&)const::_lambda(int)_1_>>
(lVar2,*(long *)(param_1 + 8) + lVar2);
lVar3 = *(long *)param_1;
uVar5 = lVar2 - lVar3;
if (*(long *)(param_1 + 8) + lVar3 == lVar4) {
*(ulong *)(param_1 + 8) = uVar5;
*(int1 *)(lVar3 + uVar5) = 0;
}
else {
std::__cxx11::string::_M_erase((ulong)param_1,uVar5);
}
local_30 = *(long *)param_1;
local_28 = *(long *)(param_1 + 8) + local_30;
/* try { // try from 0011e086 to 0011e08d has its CatchHandler @ 0011e0ad */
std::
__find_if<std::reverse_iterator<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>>,__gnu_cxx::__ops::_Iter_pred<rapidcsv::Document::Trim(std::__cxx11::string_const&)const::_lambda(int)_2_>>
(&local_38);
*(long *)(param_1 + 8) = (long)local_38 - *(long *)param_1;
*local_38 = 0;
}
return param_1;
}
|
|
61,289
|
ggml_quantize_mat_q8_0_4x4(float const*, void*, long)
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
static void ggml_quantize_mat_q8_0_4x4(const float * GGML_RESTRICT x, void * GGML_RESTRICT vy, int64_t k) {
assert(QK8_0 == 32);
assert(k % QK8_0 == 0);
const int nb = k / QK8_0;
block_q8_0x4 * GGML_RESTRICT y = (block_q8_0x4 *) vy;
#if defined(__ARM_NEON)
float32x4_t srcv[4][8];
float id[4];
for (int i = 0; i < nb; i++) {
float32x4_t asrcv[8];
float32x4_t amaxv[8];
for (int row_iter = 0; row_iter < 4; row_iter++) {
for (int j = 0; j < 8; j++) srcv[row_iter][j] = vld1q_f32(x + row_iter * k + i * 32 + 4 * j);
for (int j = 0; j < 8; j++) asrcv[j] = vabsq_f32(srcv[row_iter][j]);
for (int j = 0; j < 4; j++) amaxv[2 * j] = vmaxq_f32(asrcv[2 * j], asrcv[2 * j + 1]);
for (int j = 0; j < 2; j++) amaxv[4 * j] = vmaxq_f32(amaxv[4 * j], amaxv[4 * j + 2]);
for (int j = 0; j < 1; j++) amaxv[8 * j] = vmaxq_f32(amaxv[8 * j], amaxv[8 * j + 4]);
const float amax = vmaxvq_f32(amaxv[0]);
const float d = amax / ((1 << 7) - 1);
id[row_iter] = d ? 1.0f / d : 0.0f;
y[i].d[row_iter] = GGML_FP32_TO_FP16(d);
}
for (int j = 0; j < 8; j++) {
float32x4_t v = vmulq_n_f32(srcv[0][j], id[0]);
int32x4_t vi = vcvtnq_s32_f32(v);
y[i].qs[16 * j + 0] = vgetq_lane_s32(vi, 0);
y[i].qs[16 * j + 1] = vgetq_lane_s32(vi, 1);
y[i].qs[16 * j + 2] = vgetq_lane_s32(vi, 2);
y[i].qs[16 * j + 3] = vgetq_lane_s32(vi, 3);
v = vmulq_n_f32(srcv[1][j], id[1]);
vi = vcvtnq_s32_f32(v);
y[i].qs[16 * j + 4] = vgetq_lane_s32(vi, 0);
y[i].qs[16 * j + 5] = vgetq_lane_s32(vi, 1);
y[i].qs[16 * j + 6] = vgetq_lane_s32(vi, 2);
y[i].qs[16 * j + 7] = vgetq_lane_s32(vi, 3);
v = vmulq_n_f32(srcv[2][j], id[2]);
vi = vcvtnq_s32_f32(v);
y[i].qs[16 * j + 8] = vgetq_lane_s32(vi, 0);
y[i].qs[16 * j + 9] = vgetq_lane_s32(vi, 1);
y[i].qs[16 * j + 10] = vgetq_lane_s32(vi, 2);
y[i].qs[16 * j + 11] = vgetq_lane_s32(vi, 3);
v = vmulq_n_f32(srcv[3][j], id[3]);
vi = vcvtnq_s32_f32(v);
y[i].qs[16 * j + 12] = vgetq_lane_s32(vi, 0);
y[i].qs[16 * j + 13] = vgetq_lane_s32(vi, 1);
y[i].qs[16 * j + 14] = vgetq_lane_s32(vi, 2);
y[i].qs[16 * j + 15] = vgetq_lane_s32(vi, 3);
}
}
#else
// scalar
const int blck_size_interleave = 4;
float srcv[4][QK8_0];
float id[4];
for (int i = 0; i < nb; i++) {
for (int row_iter = 0; row_iter < 4; row_iter++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK8_0; j++) {
srcv[row_iter][j] = x[row_iter * k + i * QK8_0 + j];
amax = MAX(amax, fabsf(srcv[row_iter][j]));
}
const float d = amax / ((1 << 7) - 1);
id[row_iter] = d ? 1.0f / d : 0.0f;
y[i].d[row_iter] = GGML_FP32_TO_FP16(d);
}
for (int j = 0; j < QK8_0 * 4; j++) {
int src_offset = (j / (4 * blck_size_interleave)) * blck_size_interleave;
int src_id = (j % (4 * blck_size_interleave)) / blck_size_interleave;
src_offset += (j % blck_size_interleave);
float x0 = srcv[src_id][src_offset] * id[src_id];
y[i].qs[j] = roundf(x0);
}
}
#endif
}
|
O0
|
cpp
|
ggml_quantize_mat_q8_0_4x4(float const*, void*, long):
subq $0x228, %rsp # imm = 0x228
movq %rdi, 0x220(%rsp)
movq %rsi, 0x218(%rsp)
movq %rdx, 0x210(%rsp)
movq 0x210(%rsp), %rax
movl $0x20, %ecx
cqto
idivq %rcx
movl %eax, 0x20c(%rsp)
movq 0x218(%rsp), %rax
movq %rax, 0x200(%rsp)
movl $0x4, 0x1fc(%rsp)
movl $0x0, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl 0x20c(%rsp), %eax
jge 0x1c358
movl $0x0, -0x28(%rsp)
cmpl $0x4, -0x28(%rsp)
jge 0x1c23e
vpxor %xmm0, %xmm0, %xmm0
vmovss %xmm0, -0x2c(%rsp)
movl $0x0, -0x30(%rsp)
cmpl $0x20, -0x30(%rsp)
jge 0x1c183
movq 0x220(%rsp), %rax
movslq -0x28(%rsp), %rcx
imulq 0x210(%rsp), %rcx
movl -0x24(%rsp), %edx
shll $0x5, %edx
movslq %edx, %rdx
addq %rdx, %rcx
movslq -0x30(%rsp), %rdx
addq %rdx, %rcx
vmovss (%rax,%rcx,4), %xmm0
movslq -0x28(%rsp), %rcx
leaq -0x10(%rsp), %rax
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0x30(%rsp), %rcx
vmovss %xmm0, (%rax,%rcx,4)
vmovss -0x2c(%rsp), %xmm0
movslq -0x28(%rsp), %rcx
leaq -0x10(%rsp), %rax
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0x30(%rsp), %rcx
vmovss (%rax,%rcx,4), %xmm1
vpbroadcastd 0x90197(%rip), %xmm2 # 0xac2b8
vpand %xmm2, %xmm1, %xmm1
vucomiss %xmm1, %xmm0
jbe 0x1c139
vmovss -0x2c(%rsp), %xmm0
vmovss %xmm0, -0x74(%rsp)
jmp 0x1c167
movslq -0x28(%rsp), %rcx
leaq -0x10(%rsp), %rax
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0x30(%rsp), %rcx
vmovss (%rax,%rcx,4), %xmm0
vpbroadcastd 0x9015b(%rip), %xmm1 # 0xac2b8
vpand %xmm1, %xmm0, %xmm0
vmovss %xmm0, -0x74(%rsp)
vmovss -0x74(%rsp), %xmm0
vmovss %xmm0, -0x2c(%rsp)
movl -0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rsp)
jmp 0x1c0a1
vmovss -0x2c(%rsp), %xmm0
vmovss 0x90123(%rip), %xmm1 # 0xac2b4
vdivss %xmm1, %xmm0, %xmm0
vmovss %xmm0, -0x34(%rsp)
vmovss -0x34(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomiss %xmm1, %xmm0
jne 0x1c1af
jp 0x1c1af
jmp 0x1c1c5
vmovss 0x8f711(%rip), %xmm0 # 0xab8c8
vdivss -0x34(%rsp), %xmm0, %xmm0
vmovss %xmm0, -0x78(%rsp)
jmp 0x1c1d1
vpxor %xmm0, %xmm0, %xmm0
vmovss %xmm0, -0x78(%rsp)
jmp 0x1c1d1
vmovss -0x78(%rsp), %xmm0
movslq -0x28(%rsp), %rax
vmovss %xmm0, -0x20(%rsp,%rax,4)
vmovss -0x34(%rsp), %xmm0
vmovaps %xmm0, -0x60(%rsp)
vmovaps -0x60(%rsp), %xmm0
vcvtps2ph $0x0, %xmm0, %xmm0
vmovdqa %xmm0, -0x50(%rsp)
movl -0x50(%rsp), %eax
movw %ax, -0x36(%rsp)
movw -0x36(%rsp), %dx
movq 0x200(%rsp), %rax
movslq -0x24(%rsp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movslq -0x28(%rsp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rsp)
jmp 0x1c084
movl $0x0, -0x64(%rsp)
cmpl $0x80, -0x64(%rsp)
jge 0x1c346
movl -0x64(%rsp), %eax
movl %eax, %ecx
addl $0xf, %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x4, %eax
shll $0x2, %eax
movl %eax, -0x68(%rsp)
movl -0x64(%rsp), %esi
movl %esi, %eax
addl $0xf, %eax
testl %esi, %esi
movl %esi, %ecx
cmovsl %eax, %ecx
andl $-0x10, %ecx
movl %esi, %eax
subl %ecx, %eax
negl %ecx
movl %ecx, %edx
movl %esi, %ecx
leal 0x3(%rcx,%rdx), %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x2, %eax
movl %eax, -0x6c(%rsp)
movl -0x64(%rsp), %ecx
movl %ecx, %edx
addl $0x3, %edx
testl %ecx, %ecx
movl %ecx, %eax
cmovsl %edx, %eax
andl $-0x4, %eax
subl %eax, %ecx
movl -0x68(%rsp), %eax
addl %ecx, %eax
movl %eax, -0x68(%rsp)
movslq -0x6c(%rsp), %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq -0x10(%rsp,%rcx), %rcx
movslq -0x68(%rsp), %rdx
vmovss (%rcx,%rdx,4), %xmm0
vmovss -0x20(%rsp,%rax,4), %xmm1
vmulss %xmm1, %xmm0, %xmm0
vmovss %xmm0, -0x70(%rsp)
vmovss -0x70(%rsp), %xmm0
vmovaps %xmm0, %xmm2
vpbroadcastd 0x8ffb6(%rip), %xmm3 # 0xac2ac
vpbroadcastd 0x8ffb1(%rip), %xmm1 # 0xac2b0
vpternlogd $0xf8, %xmm3, %xmm2, %xmm1
vaddss %xmm1, %xmm0, %xmm1
vroundss $0xb, %xmm1, %xmm0, %xmm0
vcvttss2si %xmm0, %eax
movb %al, %dl
movq 0x200(%rsp), %rax
movslq -0x24(%rsp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movslq -0x64(%rsp), %rcx
movb %dl, 0x8(%rax,%rcx)
movl -0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rsp)
jmp 0x1c246
jmp 0x1c348
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x1c06b
addq $0x228, %rsp # imm = 0x228
retq
|
_ZL26ggml_quantize_mat_q8_0_4x4PKfPvl:
sub rsp, 228h
mov [rsp+228h+var_8], rdi
mov [rsp+228h+var_10], rsi
mov [rsp+228h+var_18], rdx
mov rax, [rsp+228h+var_18]
mov ecx, 20h ; ' '
cqo
idiv rcx
mov [rsp+228h+var_1C], eax
mov rax, [rsp+228h+var_10]
mov [rsp+228h+var_28], rax
mov [rsp+228h+var_2C], 4
mov [rsp+228h+var_24C], 0
loc_1C06B:
mov eax, [rsp+228h+var_24C]
cmp eax, [rsp+228h+var_1C]
jge loc_1C358
mov [rsp+228h+var_250], 0
loc_1C084:
cmp [rsp+228h+var_250], 4
jge loc_1C23E
vpxor xmm0, xmm0, xmm0
vmovss [rsp+228h+var_254], xmm0
mov [rsp+228h+var_258], 0
loc_1C0A1:
cmp [rsp+228h+var_258], 20h ; ' '
jge loc_1C183
mov rax, [rsp+228h+var_8]
movsxd rcx, [rsp+228h+var_250]
imul rcx, [rsp+228h+var_18]
mov edx, [rsp+228h+var_24C]
shl edx, 5
movsxd rdx, edx
add rcx, rdx
movsxd rdx, [rsp+228h+var_258]
add rcx, rdx
vmovss xmm0, dword ptr [rax+rcx*4]
movsxd rcx, [rsp+228h+var_250]
lea rax, [rsp+228h+var_238]
shl rcx, 7
add rax, rcx
movsxd rcx, [rsp+228h+var_258]
vmovss dword ptr [rax+rcx*4], xmm0
vmovss xmm0, [rsp+228h+var_254]
movsxd rcx, [rsp+228h+var_250]
lea rax, [rsp+228h+var_238]
shl rcx, 7
add rax, rcx
movsxd rcx, [rsp+228h+var_258]
vmovss xmm1, dword ptr [rax+rcx*4]
vpbroadcastd xmm2, cs:dword_AC2B8
vpand xmm1, xmm1, xmm2
vucomiss xmm0, xmm1
jbe short loc_1C139
vmovss xmm0, [rsp+228h+var_254]
vmovss [rsp+228h+var_29C], xmm0
jmp short loc_1C167
loc_1C139:
movsxd rcx, [rsp+228h+var_250]
lea rax, [rsp+228h+var_238]
shl rcx, 7
add rax, rcx
movsxd rcx, [rsp+228h+var_258]
vmovss xmm0, dword ptr [rax+rcx*4]
vpbroadcastd xmm1, cs:dword_AC2B8
vpand xmm0, xmm0, xmm1
vmovss [rsp+228h+var_29C], xmm0
loc_1C167:
vmovss xmm0, [rsp+228h+var_29C]
vmovss [rsp+228h+var_254], xmm0
mov eax, [rsp+228h+var_258]
add eax, 1
mov [rsp+228h+var_258], eax
jmp loc_1C0A1
loc_1C183:
vmovss xmm0, [rsp+228h+var_254]
vmovss xmm1, cs:dword_AC2B4
vdivss xmm0, xmm0, xmm1
vmovss [rsp+228h+var_25C], xmm0
vmovss xmm0, [rsp+228h+var_25C]
vpxor xmm1, xmm1, xmm1
vucomiss xmm0, xmm1
jnz short loc_1C1AF
jp short loc_1C1AF
jmp short loc_1C1C5
loc_1C1AF:
vmovss xmm0, cs:dword_AB8C8
vdivss xmm0, xmm0, [rsp+228h+var_25C]
vmovss [rsp+228h+var_2A0], xmm0
jmp short loc_1C1D1
loc_1C1C5:
vpxor xmm0, xmm0, xmm0
vmovss [rsp+228h+var_2A0], xmm0
jmp short $+2
loc_1C1D1:
vmovss xmm0, [rsp+228h+var_2A0]
movsxd rax, [rsp+228h+var_250]
vmovss [rsp+rax*4+228h+var_248], xmm0
vmovss xmm0, [rsp+228h+var_25C]
vmovaps [rsp+228h+var_288], xmm0
vmovaps xmm0, [rsp+228h+var_288]
vcvtps2ph xmm0, xmm0, 0
vmovdqa [rsp+228h+var_278], xmm0
mov eax, dword ptr [rsp+228h+var_278]
mov [rsp+228h+var_25E], ax
mov dx, [rsp+228h+var_25E]
mov rax, [rsp+228h+var_28]
movsxd rcx, [rsp+228h+var_24C]
imul rcx, 88h
add rax, rcx
movsxd rcx, [rsp+228h+var_250]
mov [rax+rcx*2], dx
mov eax, [rsp+228h+var_250]
add eax, 1
mov [rsp+228h+var_250], eax
jmp loc_1C084
loc_1C23E:
mov [rsp+228h+var_28C], 0
loc_1C246:
cmp [rsp+228h+var_28C], 80h
jge loc_1C346
mov eax, [rsp+228h+var_28C]
mov ecx, eax
add ecx, 0Fh
test eax, eax
cmovs eax, ecx
sar eax, 4
shl eax, 2
mov [rsp+228h+var_290], eax
mov esi, [rsp+228h+var_28C]
mov eax, esi
add eax, 0Fh
test esi, esi
mov ecx, esi
cmovs ecx, eax
and ecx, 0FFFFFFF0h
mov eax, esi
sub eax, ecx
neg ecx
mov edx, ecx
mov ecx, esi
lea ecx, [rcx+rdx+3]
test eax, eax
cmovs eax, ecx
sar eax, 2
mov [rsp+228h+var_294], eax
mov ecx, [rsp+228h+var_28C]
mov edx, ecx
add edx, 3
test ecx, ecx
mov eax, ecx
cmovs eax, edx
and eax, 0FFFFFFFCh
sub ecx, eax
mov eax, [rsp+228h+var_290]
add eax, ecx
mov [rsp+228h+var_290], eax
movsxd rax, [rsp+228h+var_294]
mov rcx, rax
shl rcx, 7
lea rcx, [rsp+rcx+228h+var_238]
movsxd rdx, [rsp+228h+var_290]
vmovss xmm0, dword ptr [rcx+rdx*4]
vmovss xmm1, [rsp+rax*4+228h+var_248]
vmulss xmm0, xmm0, xmm1
vmovss [rsp+228h+var_298], xmm0
vmovss xmm0, [rsp+228h+var_298]
vmovaps xmm2, xmm0
vpbroadcastd xmm3, cs:dword_AC2AC
vpbroadcastd xmm1, cs:dword_AC2B0
vpternlogd xmm1, xmm2, xmm3, 0F8h
vaddss xmm1, xmm0, xmm1
vroundss xmm0, xmm0, xmm1, 0Bh
vcvttss2si eax, xmm0
mov dl, al
mov rax, [rsp+228h+var_28]
movsxd rcx, [rsp+228h+var_24C]
imul rcx, 88h
add rax, rcx
movsxd rcx, [rsp+228h+var_28C]
mov [rax+rcx+8], dl
mov eax, [rsp+228h+var_28C]
add eax, 1
mov [rsp+228h+var_28C], eax
jmp loc_1C246
loc_1C346:
jmp short $+2
loc_1C348:
mov eax, [rsp+228h+var_24C]
add eax, 1
mov [rsp+228h+var_24C], eax
jmp loc_1C06B
loc_1C358:
add rsp, 228h
retn
|
long long ggml_quantize_mat_q8_0_4x4(const float *a1, void *a2, long long a3, __m128 _XMM0)
{
long long result; // rax
bool v6; // zf
bool v7; // pf
long long v14; // rcx
bool v15; // cc
int v55; // [rsp+Ch] [rbp-294h]
int v56; // [rsp+10h] [rbp-290h]
int m; // [rsp+14h] [rbp-28Ch]
__int128 v59; // [rsp+28h] [rbp-278h] BYREF
__int16 v60; // [rsp+42h] [rbp-25Eh]
int k; // [rsp+48h] [rbp-258h]
int j; // [rsp+50h] [rbp-250h]
unsigned int i; // [rsp+54h] [rbp-24Ch]
_BYTE v67[524]; // [rsp+68h] [rbp-238h] BYREF
int v68; // [rsp+274h] [rbp-2Ch]
_WORD *v69; // [rsp+278h] [rbp-28h]
int v70; // [rsp+284h] [rbp-1Ch]
long long v71; // [rsp+288h] [rbp-18h]
void *v72; // [rsp+290h] [rbp-10h]
const float *v73; // [rsp+298h] [rbp-8h]
v73 = a1;
v72 = a2;
v71 = a3;
v70 = a3 / 32;
v69 = a2;
v68 = 4;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= v70 )
break;
for ( j = 0; j < 4; ++j )
{
__asm
{
vpxor xmm0, xmm0, xmm0
vmovss [rsp+228h+var_254], xmm0
}
for ( k = 0; ; ++k )
{
v6 = k == 32;
v7 = __SETP__(k, 32);
if ( k >= 32 )
break;
_RAX = v73;
_RCX = k + (int)(32 * i) + v71 * j;
__asm { vmovss xmm0, dword ptr [rax+rcx*4] }
_RAX = &v67[128 * (long long)j];
_RCX = k;
__asm
{
vmovss dword ptr [rax+rcx*4], xmm0
vmovss xmm0, [rsp+228h+var_254]
}
v14 = (long long)j << 7;
v15 = __CFADD__(v14, v67) || &v67[v14] == 0LL;
_RAX = &v67[v14];
_RCX = k;
__asm
{
vmovss xmm1, dword ptr [rax+rcx*4]
vpbroadcastd xmm2, cs:dword_AC2B8
vpand xmm1, xmm1, xmm2
vucomiss xmm0, xmm1
}
if ( v15 )
{
_RAX = &v67[128 * (long long)j];
_RCX = k;
__asm
{
vmovss xmm0, dword ptr [rax+rcx*4]
vpbroadcastd xmm1, cs:dword_AC2B8
vpand xmm0, xmm0, xmm1
vmovss [rsp+228h+var_29C], xmm0
}
}
else
{
__asm
{
vmovss xmm0, [rsp+228h+var_254]
vmovss [rsp+228h+var_29C], xmm0
}
}
__asm
{
vmovss xmm0, [rsp+228h+var_29C]
vmovss [rsp+228h+var_254], xmm0
}
}
__asm
{
vmovss xmm0, [rsp+228h+var_254]
vmovss xmm1, cs:dword_AC2B4
vdivss xmm0, xmm0, xmm1
vmovss [rsp+228h+var_25C], xmm0
vmovss xmm0, [rsp+228h+var_25C]
vpxor xmm1, xmm1, xmm1
vucomiss xmm0, xmm1
}
if ( !v6 || v7 )
{
__asm
{
vmovss xmm0, cs:dword_AB8C8
vdivss xmm0, xmm0, [rsp+228h+var_25C]
vmovss [rsp+228h+var_2A0], xmm0
}
}
else
{
__asm
{
vpxor xmm0, xmm0, xmm0
vmovss [rsp+228h+var_2A0], xmm0
}
}
__asm { vmovss xmm0, [rsp+228h+var_2A0] }
_RAX = j;
__asm
{
vmovss [rsp+rax*4+228h+var_248], xmm0
vmovss xmm0, [rsp+228h+var_25C]
vmovaps [rsp+228h+var_288], xmm0
vmovaps xmm0, [rsp+228h+var_288]
vcvtps2ph xmm0, xmm0, 0
vmovdqa [rsp+228h+var_278], xmm0
}
v60 = v59;
v69[68 * i + j] = v59;
}
for ( m = 0; m < 128; ++m )
{
v56 = 4 * (m / 16);
v55 = m % 16 / 4;
v56 += m % 4;
_RAX = v55;
_RCX = &v67[128 * (long long)v55];
_RDX = v56;
__asm
{
vmovss xmm0, dword ptr [rcx+rdx*4]
vmovss xmm1, [rsp+rax*4+228h+var_248]
vmulss xmm0, xmm0, xmm1
vmovss [rsp+228h+var_298], xmm0
vmovss xmm0, [rsp+228h+var_298]
vmovaps xmm2, xmm0
vpbroadcastd xmm3, cs:dword_AC2AC
vpbroadcastd xmm1, cs:dword_AC2B0
vpternlogd xmm1, xmm2, xmm3, 0F8h
vaddss xmm1, xmm0, xmm1
vroundss xmm0, xmm0, xmm1, 0Bh
vcvttss2si eax, xmm0
}
*((_BYTE *)&v69[68 * i + 4] + m) = _RAX;
}
}
return result;
}
|
ggml_quantize_mat_q8_0_4x4:
SUB RSP,0x228
MOV qword ptr [RSP + 0x220],RDI
MOV qword ptr [RSP + 0x218],RSI
MOV qword ptr [RSP + 0x210],RDX
MOV RAX,qword ptr [RSP + 0x210]
MOV ECX,0x20
CQO
IDIV RCX
MOV dword ptr [RSP + 0x20c],EAX
MOV RAX,qword ptr [RSP + 0x218]
MOV qword ptr [RSP + 0x200],RAX
MOV dword ptr [RSP + 0x1fc],0x4
MOV dword ptr [RSP + -0x24],0x0
LAB_0011c06b:
MOV EAX,dword ptr [RSP + -0x24]
CMP EAX,dword ptr [RSP + 0x20c]
JGE 0x0011c358
MOV dword ptr [RSP + -0x28],0x0
LAB_0011c084:
CMP dword ptr [RSP + -0x28],0x4
JGE 0x0011c23e
VPXOR XMM0,XMM0,XMM0
VMOVSS dword ptr [RSP + -0x2c],XMM0
MOV dword ptr [RSP + -0x30],0x0
LAB_0011c0a1:
CMP dword ptr [RSP + -0x30],0x20
JGE 0x0011c183
MOV RAX,qword ptr [RSP + 0x220]
MOVSXD RCX,dword ptr [RSP + -0x28]
IMUL RCX,qword ptr [RSP + 0x210]
MOV EDX,dword ptr [RSP + -0x24]
SHL EDX,0x5
MOVSXD RDX,EDX
ADD RCX,RDX
MOVSXD RDX,dword ptr [RSP + -0x30]
ADD RCX,RDX
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSXD RCX,dword ptr [RSP + -0x28]
LEA RAX,[RSP + -0x10]
SHL RCX,0x7
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + -0x30]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
VMOVSS XMM0,dword ptr [RSP + -0x2c]
MOVSXD RCX,dword ptr [RSP + -0x28]
LEA RAX,[RSP + -0x10]
SHL RCX,0x7
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + -0x30]
VMOVSS XMM1,dword ptr [RAX + RCX*0x4]
VPBROADCASTD XMM2,dword ptr [0x001ac2b8]
VPAND XMM1,XMM1,XMM2
VUCOMISS XMM0,XMM1
JBE 0x0011c139
VMOVSS XMM0,dword ptr [RSP + -0x2c]
VMOVSS dword ptr [RSP + -0x74],XMM0
JMP 0x0011c167
LAB_0011c139:
MOVSXD RCX,dword ptr [RSP + -0x28]
LEA RAX,[RSP + -0x10]
SHL RCX,0x7
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + -0x30]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
VPBROADCASTD XMM1,dword ptr [0x001ac2b8]
VPAND XMM0,XMM0,XMM1
VMOVSS dword ptr [RSP + -0x74],XMM0
LAB_0011c167:
VMOVSS XMM0,dword ptr [RSP + -0x74]
VMOVSS dword ptr [RSP + -0x2c],XMM0
MOV EAX,dword ptr [RSP + -0x30]
ADD EAX,0x1
MOV dword ptr [RSP + -0x30],EAX
JMP 0x0011c0a1
LAB_0011c183:
VMOVSS XMM0,dword ptr [RSP + -0x2c]
VMOVSS XMM1,dword ptr [0x001ac2b4]
VDIVSS XMM0,XMM0,XMM1
VMOVSS dword ptr [RSP + -0x34],XMM0
VMOVSS XMM0,dword ptr [RSP + -0x34]
VPXOR XMM1,XMM1,XMM1
VUCOMISS XMM0,XMM1
JNZ 0x0011c1af
JP 0x0011c1af
JMP 0x0011c1c5
LAB_0011c1af:
VMOVSS XMM0,dword ptr [0x001ab8c8]
VDIVSS XMM0,XMM0,dword ptr [RSP + -0x34]
VMOVSS dword ptr [RSP + -0x78],XMM0
JMP 0x0011c1d1
LAB_0011c1c5:
VPXOR XMM0,XMM0,XMM0
VMOVSS dword ptr [RSP + -0x78],XMM0
JMP 0x0011c1d1
LAB_0011c1d1:
VMOVSS XMM0,dword ptr [RSP + -0x78]
MOVSXD RAX,dword ptr [RSP + -0x28]
VMOVSS dword ptr [RSP + RAX*0x4 + -0x20],XMM0
VMOVSS XMM0,dword ptr [RSP + -0x34]
VMOVAPS xmmword ptr [RSP + -0x60],XMM0
VMOVAPS XMM0,xmmword ptr [RSP + -0x60]
VCVTPS2PH XMM0,XMM0,0x0
VMOVDQA xmmword ptr [RSP + -0x50],XMM0
MOV EAX,dword ptr [RSP + -0x50]
MOV word ptr [RSP + -0x36],AX
MOV DX,word ptr [RSP + -0x36]
MOV RAX,qword ptr [RSP + 0x200]
MOVSXD RCX,dword ptr [RSP + -0x24]
IMUL RCX,RCX,0x88
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + -0x28]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RSP + -0x28]
ADD EAX,0x1
MOV dword ptr [RSP + -0x28],EAX
JMP 0x0011c084
LAB_0011c23e:
MOV dword ptr [RSP + -0x64],0x0
LAB_0011c246:
CMP dword ptr [RSP + -0x64],0x80
JGE 0x0011c346
MOV EAX,dword ptr [RSP + -0x64]
MOV ECX,EAX
ADD ECX,0xf
TEST EAX,EAX
CMOVS EAX,ECX
SAR EAX,0x4
SHL EAX,0x2
MOV dword ptr [RSP + -0x68],EAX
MOV ESI,dword ptr [RSP + -0x64]
MOV EAX,ESI
ADD EAX,0xf
TEST ESI,ESI
MOV ECX,ESI
CMOVS ECX,EAX
AND ECX,0xfffffff0
MOV EAX,ESI
SUB EAX,ECX
NEG ECX
MOV EDX,ECX
MOV ECX,ESI
LEA ECX,[RCX + RDX*0x1 + 0x3]
TEST EAX,EAX
CMOVS EAX,ECX
SAR EAX,0x2
MOV dword ptr [RSP + -0x6c],EAX
MOV ECX,dword ptr [RSP + -0x64]
MOV EDX,ECX
ADD EDX,0x3
TEST ECX,ECX
MOV EAX,ECX
CMOVS EAX,EDX
AND EAX,0xfffffffc
SUB ECX,EAX
MOV EAX,dword ptr [RSP + -0x68]
ADD EAX,ECX
MOV dword ptr [RSP + -0x68],EAX
MOVSXD RAX,dword ptr [RSP + -0x6c]
MOV RCX,RAX
SHL RCX,0x7
LEA RCX,[RSP + RCX*0x1 + -0x10]
MOVSXD RDX,dword ptr [RSP + -0x68]
VMOVSS XMM0,dword ptr [RCX + RDX*0x4]
VMOVSS XMM1,dword ptr [RSP + RAX*0x4 + -0x20]
VMULSS XMM0,XMM0,XMM1
VMOVSS dword ptr [RSP + -0x70],XMM0
VMOVSS XMM0,dword ptr [RSP + -0x70]
VMOVAPS XMM2,XMM0
VPBROADCASTD XMM3,dword ptr [0x001ac2ac]
VPBROADCASTD XMM1,dword ptr [0x001ac2b0]
VPTERNLOGD XMM1,XMM2,XMM3,0xf8
VADDSS XMM1,XMM0,XMM1
VROUNDSS XMM0,XMM0,XMM1,0xb
VCVTTSS2SI EAX,XMM0
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x200]
MOVSXD RCX,dword ptr [RSP + -0x24]
IMUL RCX,RCX,0x88
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + -0x64]
MOV byte ptr [RAX + RCX*0x1 + 0x8],DL
MOV EAX,dword ptr [RSP + -0x64]
ADD EAX,0x1
MOV dword ptr [RSP + -0x64],EAX
JMP 0x0011c246
LAB_0011c346:
JMP 0x0011c348
LAB_0011c348:
MOV EAX,dword ptr [RSP + -0x24]
ADD EAX,0x1
MOV dword ptr [RSP + -0x24],EAX
JMP 0x0011c06b
LAB_0011c358:
ADD RSP,0x228
RET
|
/* ggml_quantize_mat_q8_0_4x4(float const*, void*, long) */
void ggml_quantize_mat_q8_0_4x4(float *param_1,void *param_2,long param_3)
{
float fVar1;
uint uVar2;
int iVar3;
uint uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
float local_2a0;
float local_29c;
uint local_28c;
int local_258;
float local_254;
int local_250;
int local_24c;
float afStack_248 [4];
float local_238 [131];
int4 local_2c;
void *local_28;
int local_1c;
long local_18;
void *local_10;
float *local_8;
local_8 = param_1;
local_10 = param_2;
local_18 = param_3;
local_1c = (int)(param_3 / 0x20);
local_28 = param_2;
local_2c = 4;
for (local_24c = 0; local_24c < local_1c; local_24c = local_24c + 1) {
for (local_250 = 0; local_250 < 4; local_250 = local_250 + 1) {
local_254 = 0.0;
for (local_258 = 0; local_258 < 0x20; local_258 = local_258 + 1) {
local_238[(long)local_250 * 0x20 + (long)local_258] =
param_1[local_250 * param_3 + (long)(local_24c << 5) + (long)local_258];
auVar5._4_4_ = DAT_001ac2b8;
auVar5._0_4_ = DAT_001ac2b8;
auVar5._8_4_ = DAT_001ac2b8;
auVar5._12_4_ = DAT_001ac2b8;
auVar5 = vpand_avx(ZEXT416((uint)local_238[(long)local_250 * 0x20 + (long)local_258]),auVar5
);
if (local_254 <= auVar5._0_4_) {
auVar6._4_4_ = DAT_001ac2b8;
auVar6._0_4_ = DAT_001ac2b8;
auVar6._8_4_ = DAT_001ac2b8;
auVar6._12_4_ = DAT_001ac2b8;
auVar5 = vpand_avx(ZEXT416((uint)local_238[(long)local_250 * 0x20 + (long)local_258]),
auVar6);
local_29c = auVar5._0_4_;
}
else {
local_29c = local_254;
}
local_254 = local_29c;
}
local_254 = local_254 / DAT_001ac2b4;
if ((local_254 != 0.0) || (NAN(local_254))) {
local_2a0 = DAT_001ab8c8 / local_254;
}
else {
local_2a0 = 0.0;
}
afStack_248[local_250] = local_2a0;
auVar5 = vcvtps2ph_f16c(ZEXT416((uint)local_254),0);
*(short *)((long)param_2 + (long)local_250 * 2 + (long)local_24c * 0x88) = auVar5._0_2_;
}
for (local_28c = 0; (int)local_28c < 0x80; local_28c = local_28c + 1) {
uVar2 = local_28c;
if ((int)local_28c < 0) {
uVar2 = local_28c + 0xf;
}
uVar4 = local_28c;
if ((int)local_28c < 0) {
uVar4 = local_28c + 0xf;
}
iVar3 = (int)local_28c % 0x10;
if ((int)local_28c % 0x10 < 0) {
iVar3 = (local_28c + 3) - (uVar4 & 0xfffffff0);
}
fVar1 = local_238[(long)(iVar3 >> 2) * 0x20 +
(long)(((int)uVar2 >> 4) * 4 + (int)local_28c % 4)] *
afStack_248[iVar3 >> 2];
auVar8._4_4_ = DAT_001ac2ac;
auVar8._0_4_ = DAT_001ac2ac;
auVar8._8_4_ = DAT_001ac2ac;
auVar8._12_4_ = DAT_001ac2ac;
auVar7._4_4_ = DAT_001ac2b0;
auVar7._0_4_ = DAT_001ac2b0;
auVar7._8_4_ = DAT_001ac2b0;
auVar7._12_4_ = DAT_001ac2b0;
auVar5 = vpternlogd_avx512vl(auVar7,ZEXT416((uint)fVar1),auVar8,0xf8);
auVar5 = vroundss_avx(ZEXT416((uint)fVar1),ZEXT416((uint)(fVar1 + auVar5._0_4_)),0xb);
*(char *)((long)param_2 + (long)(int)local_28c + (long)local_24c * 0x88 + 8) =
(char)(int)auVar5._0_4_;
}
}
return;
}
|
|
61,290
|
void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*, char const*)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)>(fmt::v10::basic_string_view<char>, fmt::v10::detail::find_escape(char const*, char const*)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>))
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR void for_each_codepoint(string_view s, F f) {
auto decode = [f](const char* buf_ptr, const char* ptr) {
auto cp = uint32_t();
auto error = 0;
auto end = utf8_decode(buf_ptr, &cp, &error);
bool result = f(error ? invalid_code_point : cp,
string_view(ptr, error ? 1 : to_unsigned(end - buf_ptr)));
return result ? (error ? buf_ptr + 1 : end) : nullptr;
};
auto p = s.data();
const size_t block_size = 4; // utf8_decode always reads blocks of 4 chars.
if (s.size() >= block_size) {
for (auto end = p + s.size() - block_size + 1; p < end;) {
p = decode(p, p);
if (!p) return;
}
}
if (auto num_chars_left = s.data() + s.size() - p) {
char buf[2 * block_size - 1] = {};
copy_str<char>(p, p + num_chars_left, buf);
const char* buf_ptr = buf;
do {
auto end = decode(buf_ptr, p);
if (!end) return;
p += end - buf_ptr;
buf_ptr = end;
} while (buf_ptr - buf < num_chars_left);
}
}
|
O0
|
c
|
void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*, char const*)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)>(fmt::v10::basic_string_view<char>, fmt::v10::detail::find_escape(char const*, char const*)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)):
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x24490
movq %rax, 0x40(%rsp)
movq $0x4, 0x38(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x244a0
cmpq $0x4, %rax
jb 0xada97
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x244a0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
addq $-0x4, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0xada95
movq 0x40(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0xadb70
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0xada93
jmp 0xadb60
jmp 0xada61
jmp 0xada97
leaq 0x58(%rsp), %rdi
callq 0x24490
movq %rax, (%rsp)
leaq 0x58(%rsp), %rdi
callq 0x244a0
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0xadb60
leaq 0x21(%rsp), %rdi
xorl %esi, %esi
movl $0x7, %edx
callq 0x14390
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq 0x28(%rsp), %rsi
leaq 0x21(%rsp), %rdx
callq 0x8c7b0
leaq 0x21(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0xadb70
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0xadb29
jmp 0xadb60
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rcx, %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
leaq 0x21(%rsp), %rcx
subq %rcx, %rax
cmpq 0x28(%rsp), %rax
jl 0xadb06
jmp 0xadb60
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_8], rsi
mov [rsp+68h+var_18], rdx
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_20], rax
lea rdi, [rsp+68h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void)
mov [rsp+68h+var_28], rax
mov [rsp+68h+var_30], 4
lea rdi, [rsp+68h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
cmp rax, 4
jb short loc_ADA97
mov rax, [rsp+68h+var_28]
mov [rsp+68h+var_60], rax
lea rdi, [rsp+68h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_60]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFCh
add rax, 1
mov [rsp+68h+var_38], rax
loc_ADA61:
mov rax, [rsp+68h+var_28]
cmp rax, [rsp+68h+var_38]
jnb short loc_ADA95
mov rsi, [rsp+68h+var_28]
mov rdx, [rsp+68h+var_28]
lea rdi, [rsp+68h+var_20]
call _ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)::{lambda(char const*,char const*)#1}::operator()(char const*,char const*)
mov [rsp+68h+var_28], rax
cmp [rsp+68h+var_28], 0
jnz short loc_ADA93
jmp loc_ADB60
loc_ADA93:
jmp short loc_ADA61
loc_ADA95:
jmp short $+2
loc_ADA97:
lea rdi, [rsp+68h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void)
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_68]
add rax, rcx
mov rcx, [rsp+68h+var_28]
sub rax, rcx
mov [rsp+68h+var_40], rax
cmp [rsp+68h+var_40], 0
jz loc_ADB60
lea rdi, [rsp+68h+var_47]
xor esi, esi
mov edx, 7
call _memset
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_28]
add rsi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_47]
call _ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_
lea rax, [rsp+68h+var_47]
mov [rsp+68h+var_50], rax
loc_ADB06:
mov rsi, [rsp+68h+var_50]
mov rdx, [rsp+68h+var_28]
lea rdi, [rsp+68h+var_20]
call _ZZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_ENKUlPKcS8_E_clES8_S8_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)::{lambda(char const*,char const*)#1}::operator()(char const*,char const*)
mov [rsp+68h+var_58], rax
cmp [rsp+68h+var_58], 0
jnz short loc_ADB29
jmp short loc_ADB60
loc_ADB29:
mov rax, [rsp+68h+var_58]
mov rcx, [rsp+68h+var_50]
sub rax, rcx
add rax, [rsp+68h+var_28]
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_58]
mov [rsp+68h+var_50], rax
mov rax, [rsp+68h+var_50]
lea rcx, [rsp+68h+var_47]
sub rax, rcx
cmp rax, [rsp+68h+var_40]
jl short loc_ADB06
jmp short $+2
loc_ADB60:
add rsp, 68h
retn
|
long long fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(
long long a1,
long long a2,
long long a3)
{
long long result; // rax
long long v4; // [rsp+0h] [rbp-68h]
long long v5; // [rsp+10h] [rbp-58h]
_BYTE *v6; // [rsp+18h] [rbp-50h]
_BYTE v7[7]; // [rsp+21h] [rbp-47h] BYREF
long long v8; // [rsp+28h] [rbp-40h]
unsigned long long v9; // [rsp+30h] [rbp-38h]
long long v10; // [rsp+38h] [rbp-30h]
unsigned long long v11; // [rsp+40h] [rbp-28h]
_QWORD v12[2]; // [rsp+48h] [rbp-20h] BYREF
_QWORD v13[2]; // [rsp+58h] [rbp-10h] BYREF
v13[0] = a1;
v13[1] = a2;
v12[1] = a3;
v12[0] = a3;
v11 = fmt::v10::basic_string_view<char>::data((long long)v13);
v10 = 4LL;
if ( (unsigned long long)fmt::v10::basic_string_view<char>::size((long long)v13) >= 4 )
{
v9 = fmt::v10::basic_string_view<char>::size((long long)v13) + v11 - 4 + 1;
while ( v11 < v9 )
{
result = fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)::{lambda(char const*,char const*)#1}::operator()(
v12,
v11,
v11);
v11 = result;
if ( !result )
return result;
}
}
v4 = fmt::v10::basic_string_view<char>::data((long long)v13);
result = fmt::v10::basic_string_view<char>::size((long long)v13) + v4 - v11;
v8 = result;
if ( result )
{
memset(v7, 0LL, sizeof(v7));
ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_(
v11,
v8 + v11,
(long long)v7);
v6 = v7;
do
{
result = fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)::{lambda(char const*,char const*)#1}::operator()(
v12,
v6,
v11);
v5 = result;
if ( !result )
break;
v11 += result - (_QWORD)v6;
v6 = (_BYTE *)result;
result -= (long long)v7;
}
while ( v5 - (long long)v7 < v8 );
}
return result;
}
|
for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x58]
CALL 0x00124490
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x38],0x4
LEA RDI,[RSP + 0x58]
CALL 0x001244a0
CMP RAX,0x4
JC 0x001ada97
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x58]
CALL 0x001244a0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,RCX
ADD RAX,-0x4
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
LAB_001ada61:
MOV RAX,qword ptr [RSP + 0x40]
CMP RAX,qword ptr [RSP + 0x30]
JNC 0x001ada95
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x48]
CALL 0x001adb70
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x001ada93
JMP 0x001adb60
LAB_001ada93:
JMP 0x001ada61
LAB_001ada95:
JMP 0x001ada97
LAB_001ada97:
LEA RDI,[RSP + 0x58]
CALL 0x00124490
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x58]
CALL 0x001244a0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x40]
SUB RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JZ 0x001adb60
LEA RDI,[RSP + 0x21]
XOR ESI,ESI
MOV EDX,0x7
CALL 0x00114390
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x40]
ADD RSI,qword ptr [RSP + 0x28]
LEA RDX,[RSP + 0x21]
CALL 0x0018c7b0
LEA RAX,[RSP + 0x21]
MOV qword ptr [RSP + 0x18],RAX
LAB_001adb06:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x48]
CALL 0x001adb70
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x001adb29
JMP 0x001adb60
LAB_001adb29:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
SUB RAX,RCX
ADD RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x21]
SUB RAX,RCX
CMP RAX,qword ptr [RSP + 0x28]
JL 0x001adb06
JMP 0x001adb60
LAB_001adb60:
ADD RSP,0x68
RET
|
/* void
fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,
fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points) */
void __thiscall
fmt::v10::detail::
for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>
(detail *this,int8 param_2,int8 param_3)
{
ulong uVar1;
long lVar2;
long lVar3;
char *pcVar4;
char *local_50;
char local_47 [7];
long local_40;
char *local_38;
int8 local_30;
char *local_28;
int8 local_20;
int8 local_18;
detail *local_10;
int8 local_8;
local_20 = param_3;
local_18 = param_3;
local_10 = this;
local_8 = param_2;
local_28 = (char *)basic_string_view<char>::data((basic_string_view<char> *)&local_10);
local_30 = 4;
uVar1 = basic_string_view<char>::size((basic_string_view<char> *)&local_10);
pcVar4 = local_28;
if (uVar1 < 4) {
LAB_001ada97:
lVar2 = basic_string_view<char>::data((basic_string_view<char> *)&local_10);
lVar3 = basic_string_view<char>::size((basic_string_view<char> *)&local_10);
local_40 = (lVar2 + lVar3) - (long)local_28;
if (local_40 != 0) {
memset(local_47,0,7);
_ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_
(local_28,local_28 + local_40,local_47);
local_50 = local_47;
do {
pcVar4 = (char *)for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)
::{lambda(char_const*,char_const*)#1}::operator()
((_lambda_char_const__char_const___1_ *)&local_20,local_50,
local_28);
if (pcVar4 == (char *)0x0) {
return;
}
local_28 = local_28 + ((long)pcVar4 - (long)local_50);
local_50 = pcVar4;
} while ((long)pcVar4 - (long)local_47 < local_40);
}
}
else {
lVar2 = basic_string_view<char>::size((basic_string_view<char> *)&local_10);
local_38 = pcVar4 + lVar2 + -3;
do {
if (local_38 <= local_28) goto LAB_001ada97;
local_28 = (char *)for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points)
::{lambda(char_const*,char_const*)#1}::operator()
((_lambda_char_const__char_const___1_ *)&local_20,local_28,
local_28);
} while (local_28 != (char *)0x0);
}
return;
}
|
|
61,291
|
minja::MacroTemplateToken::~MacroTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
MacroTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p)
: TemplateToken(Type::Macro, location, pre, post), name(std::move(n)), params(std::move(p)) {}
|
O3
|
cpp
|
minja::MacroTemplateToken::~MacroTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x925a9(%rip), %rax # 0x12fdd8
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x40, %rdi
callq 0x89532
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x9d84d
callq 0x725dc
leaq 0x91a94(%rip), %rax # 0x12f2e8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9d86a
popq %rbx
jmp 0x725dc
popq %rbx
retq
|
_ZN5minja18MacroTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken
add rax, 10h
mov [rdi], rax
add rdi, 40h ; '@'
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector()
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_9D84D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9D84D:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9D86A
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_9D86A:
pop rbx
retn
|
void minja::MacroTemplateToken::~MacroTemplateToken(minja::MacroTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::MacroTemplateToken + 2;
std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector((_QWORD *)this + 8);
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~MacroTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22fdd8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
ADD RDI,0x40
CALL 0x00189532
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JZ 0x0019d84d
CALL 0x001725dc
LAB_0019d84d:
LEA RAX,[0x22f2e8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0019d86a
POP RBX
JMP 0x001725dc
LAB_0019d86a:
POP RBX
RET
|
/* minja::MacroTemplateToken::~MacroTemplateToken() */
void __thiscall minja::MacroTemplateToken::~MacroTemplateToken(MacroTemplateToken *this)
{
*(int ***)this = &PTR__MacroTemplateToken_0022fde8;
std::
vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
::~vector((vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
*)(this + 0x40));
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0022f2f8;
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;
}
|
|
61,292
|
destroy_cond(PFS_cond*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void destroy_cond(PFS_cond *pfs)
{
assert(pfs != NULL);
PFS_cond_class *klass= pfs->m_class;
/* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME */
klass->m_cond_stat.aggregate(& pfs->m_cond_stat);
pfs->m_cond_stat.reset();
if (klass->is_singleton())
klass->m_singleton= NULL;
global_cond_container.deallocate(pfs);
}
|
O3
|
cpp
|
destroy_cond(PFS_cond*):
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rdx
leaq 0x20(%rdi), %rcx
testq %rdx, %rdx
je 0x2f7e6
addq %rdx, 0xa0(%rax)
movq 0x28(%rdi), %rdx
addq %rdx, 0xa8(%rax)
movq 0x30(%rdi), %rdx
cmpq %rdx, 0xb0(%rax)
ja 0x2f828
movq 0x38(%rdi), %rdx
cmpq %rdx, 0xb8(%rax)
jb 0x2f831
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq $-0x1, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
testb $0x1, 0x8(%rax)
je 0x2f80d
movq $0x0, 0xc0(%rax)
movq 0x8(%rdi), %rax
movl (%rdi), %ecx
andl $-0x4, %ecx
xchgl %ecx, (%rdi)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x360c95(%rip), %rax # 0x3904b8
movb %cl, 0x9(%rax)
popq %rbp
retq
movq %rdx, 0xb0(%rax)
jmp 0x2f7d9
movq %rdx, 0xb8(%rax)
jmp 0x2f7e6
|
_Z12destroy_condP8PFS_cond:
push rbp
mov rbp, rsp
mov rax, [rdi+18h]
mov rdx, [rdi+20h]
lea rcx, [rdi+20h]
test rdx, rdx
jz short loc_2F7E6
add [rax+0A0h], rdx
mov rdx, [rdi+28h]
add [rax+0A8h], rdx
mov rdx, [rdi+30h]
cmp [rax+0B0h], rdx
ja short loc_2F828
loc_2F7D9:
mov rdx, [rdi+38h]
cmp [rax+0B8h], rdx
jb short loc_2F831
loc_2F7E6:
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
mov qword ptr [rdi+30h], 0FFFFFFFFFFFFFFFFh
mov qword ptr [rdi+38h], 0
test byte ptr [rax+8], 1
jz short loc_2F80D
mov qword ptr [rax+0C0h], 0
loc_2F80D:
mov rax, [rdi+8]
mov ecx, [rdi]
and ecx, 0FFFFFFFCh
xchg ecx, [rdi]
xor ecx, ecx
mov [rax], cl
lea rax, global_cond_container
mov [rax+9], cl
pop rbp
retn
loc_2F828:
mov [rax+0B0h], rdx
jmp short loc_2F7D9
loc_2F831:
mov [rax+0B8h], rdx
jmp short loc_2F7E6
|
long long * destroy_cond(long long a1)
{
long long v1; // rax
long long v2; // rdx
unsigned long long v3; // rdx
unsigned long long v4; // rdx
_BYTE *v5; // rax
long long *result; // rax
v1 = *(_QWORD *)(a1 + 24);
v2 = *(_QWORD *)(a1 + 32);
if ( v2 )
{
*(_QWORD *)(v1 + 160) += v2;
*(_QWORD *)(v1 + 168) += *(_QWORD *)(a1 + 40);
v3 = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(v1 + 176) > v3 )
*(_QWORD *)(v1 + 176) = v3;
v4 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(v1 + 184) < v4 )
*(_QWORD *)(v1 + 184) = v4;
}
*(_OWORD *)(a1 + 32) = 0LL;
*(_QWORD *)(a1 + 48) = -1LL;
*(_QWORD *)(a1 + 56) = 0LL;
if ( (*(_BYTE *)(v1 + 8) & 1) != 0 )
*(_QWORD *)(v1 + 192) = 0LL;
v5 = *(_BYTE **)(a1 + 8);
_InterlockedExchange((volatile __int32 *)a1, *(_DWORD *)a1 & 0xFFFFFFFC);
*v5 = 0;
result = &global_cond_container;
*((_BYTE *)&global_cond_container + 9) = 0;
return result;
}
|
destroy_cond:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RDI + 0x20]
LEA RCX,[RDI + 0x20]
TEST RDX,RDX
JZ 0x0012f7e6
ADD qword ptr [RAX + 0xa0],RDX
MOV RDX,qword ptr [RDI + 0x28]
ADD qword ptr [RAX + 0xa8],RDX
MOV RDX,qword ptr [RDI + 0x30]
CMP qword ptr [RAX + 0xb0],RDX
JA 0x0012f828
LAB_0012f7d9:
MOV RDX,qword ptr [RDI + 0x38]
CMP qword ptr [RAX + 0xb8],RDX
JC 0x0012f831
LAB_0012f7e6:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
MOV qword ptr [RDI + 0x30],-0x1
MOV qword ptr [RDI + 0x38],0x0
TEST byte ptr [RAX + 0x8],0x1
JZ 0x0012f80d
MOV qword ptr [RAX + 0xc0],0x0
LAB_0012f80d:
MOV RAX,qword ptr [RDI + 0x8]
MOV ECX,dword ptr [RDI]
AND ECX,0xfffffffc
XCHG dword ptr [RDI],ECX
XOR ECX,ECX
MOV byte ptr [RAX],CL
LEA RAX,[0x4904b8]
MOV byte ptr [RAX + 0x9],CL
POP RBP
RET
LAB_0012f828:
MOV qword ptr [RAX + 0xb0],RDX
JMP 0x0012f7d9
LAB_0012f831:
MOV qword ptr [RAX + 0xb8],RDX
JMP 0x0012f7e6
|
/* destroy_cond(PFS_cond*) */
void destroy_cond(PFS_cond *param_1)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0x18);
if (*(long *)(param_1 + 0x20) != 0) {
*(long *)(lVar1 + 0xa0) = *(long *)(lVar1 + 0xa0) + *(long *)(param_1 + 0x20);
*(long *)(lVar1 + 0xa8) = *(long *)(lVar1 + 0xa8) + *(long *)(param_1 + 0x28);
if (*(ulong *)(param_1 + 0x30) < *(ulong *)(lVar1 + 0xb0)) {
*(ulong *)(lVar1 + 0xb0) = *(ulong *)(param_1 + 0x30);
}
if (*(ulong *)(lVar1 + 0xb8) < *(ulong *)(param_1 + 0x38)) {
*(ulong *)(lVar1 + 0xb8) = *(ulong *)(param_1 + 0x38);
}
}
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0xffffffffffffffff;
*(int8 *)(param_1 + 0x38) = 0;
if ((*(byte *)(lVar1 + 8) & 1) != 0) {
*(int8 *)(lVar1 + 0xc0) = 0;
}
LOCK();
*(uint *)param_1 = *(uint *)param_1 & 0xfffffffc;
UNLOCK();
**(int1 **)(param_1 + 8) = 0;
global_cond_container[9] = 0;
return;
}
|
|
61,293
|
ps_fetch_from_1_to_8_bytes
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
void ps_fetch_from_1_to_8_bytes(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row, unsigned int byte_count)
{
my_bool is_unsigned= test(field->flags & UNSIGNED_FLAG);
r_param->buffer_length= byte_count;
switch (byte_count) {
case 1:
*(uchar *)r_param->buffer= **row;
*r_param->error= is_unsigned != r_param->is_unsigned && *(uchar *)r_param->buffer > INT_MAX8;
break;
case 2:
shortstore(r_param->buffer, ((ushort) sint2korr(*row)));
*r_param->error= is_unsigned != r_param->is_unsigned && *(ushort *)r_param->buffer > INT_MAX16;
break;
case 4:
{
longstore(r_param->buffer, ((uint32)sint4korr(*row)));
*r_param->error= is_unsigned != r_param->is_unsigned && *(uint32 *)r_param->buffer > INT_MAX32;
}
break;
case 8:
{
ulonglong val= (ulonglong)sint8korr(*row);
longlongstore(r_param->buffer, val);
*r_param->error= is_unsigned != r_param->is_unsigned && val > LONGLONG_MAX ;
}
break;
default:
r_param->buffer_length= 0;
break;
}
(*row)+= byte_count;
}
|
O0
|
c
|
ps_fetch_from_1_to_8_bytes:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
andl $0x20, %eax
shrl $0x5, %eax
movb %al, -0x1d(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x1c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x7, %eax
ja 0x54d51
movq -0x38(%rbp), %rax
leaq 0x81371(%rip), %rcx # 0xd5d90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq (%rax), %rax
movb (%rax), %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, (%rax)
movsbl -0x1d(%rbp), %ecx
movq -0x8(%rbp), %rax
movsbl 0x65(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x39(%rbp)
je 0x54a64
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
jmp 0x54d5d
jmp 0x54a7f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cwtl
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
movswl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, 0x1(%rax)
movsbl -0x1d(%rbp), %ecx
movq -0x8(%rbp), %rax
movsbl 0x65(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x3a(%rbp)
je 0x54af0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movzwl (%rax), %eax
cmpl $0x7fff, %eax # imm = 0x7FFF
setg %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
jmp 0x54d5d
jmp 0x54b0b
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x3(%rcx), %ecx
movswl %cx, %ecx
shll $0x18, %ecx
addl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x3(%rcx), %ecx
movswl %cx, %ecx
shll $0x18, %ecx
addl %ecx, %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x3(%rcx), %ecx
movswl %cx, %ecx
shll $0x18, %ecx
addl %ecx, %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x3(%rcx), %ecx
movswl %cx, %ecx
shll $0x18, %ecx
addl %ecx, %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb %cl, 0x3(%rax)
movsbl -0x1d(%rbp), %ecx
movq -0x8(%rbp), %rax
movsbl 0x65(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x3b(%rbp)
je 0x54c66
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
setg %al
movb %al, -0x3b(%rbp)
movb -0x3b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
jmp 0x54d5d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x4(%rcx), %ecx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movzbl 0x5(%rdx), %edx
shll $0x8, %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movzbl 0x6(%rdx), %edx
shll $0x10, %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
movzbl 0x7(%rdx), %edx
shll $0x18, %edx
addl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movsbl -0x1d(%rbp), %ecx
movq -0x8(%rbp), %rax
movsbl 0x65(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x3c(%rbp)
je 0x54d3b
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x30(%rbp)
seta %al
movb %al, -0x3c(%rbp)
movb -0x3c(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
jmp 0x54d5d
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ps_fetch_from_1_to_8_bytes:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_10]
mov eax, [rax+64h]
and eax, 20h
shr eax, 5
mov [rbp+var_1D], al
mov eax, [rbp+var_1C]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+40h], rcx
mov eax, [rbp+var_1C]
dec eax; switch 8 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 7
ja def_54A26; jumptable 0000000000054A26 default case, cases 3,5-7
mov rax, [rbp+var_38]
lea rcx, jpt_54A26
movsxd rax, ds:(jpt_54A26 - 0D5D90h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_54A28:
mov rax, [rbp+var_18]; jumptable 0000000000054A26 case 1
mov rax, [rax]
mov cl, [rax]
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax], cl
movsx ecx, [rbp+var_1D]
mov rax, [rbp+var_8]
movsx edx, byte ptr [rax+65h]
xor eax, eax
cmp ecx, edx
mov [rbp+var_39], al
jz short loc_54A64
mov rax, [rbp+var_8]
mov rax, [rax+10h]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
setnle al
mov [rbp+var_39], al
loc_54A64:
mov al, [rbp+var_39]
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
jmp loc_54D5D
loc_54A7D:
jmp short $+2; jumptable 0000000000054A26 case 2
loc_54A7F:
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
cwde
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
movsx ecx, cx
shl ecx, 8
add eax, ecx
movzx eax, ax
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax], cl
mov eax, [rbp+var_24]
shr eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax+1], cl
movsx ecx, [rbp+var_1D]
mov rax, [rbp+var_8]
movsx edx, byte ptr [rax+65h]
xor eax, eax
cmp ecx, edx
mov [rbp+var_3A], al
jz short loc_54AF0
mov rax, [rbp+var_8]
mov rax, [rax+10h]
movzx eax, word ptr [rax]
cmp eax, 7FFFh
setnle al
mov [rbp+var_3A], al
loc_54AF0:
mov al, [rbp+var_3A]
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
jmp loc_54D5D
loc_54B09:
jmp short $+2; jumptable 0000000000054A26 case 4
loc_54B0B:
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+3]
movsx ecx, cx
shl ecx, 18h
add eax, ecx
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax], cl
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+3]
movsx ecx, cx
shl ecx, 18h
add eax, ecx
shr eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax+1], cl
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+3]
movsx ecx, cx
shl ecx, 18h
add eax, ecx
shr eax, 10h
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax+2], cl
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+3]
movsx ecx, cx
shl ecx, 18h
add eax, ecx
shr eax, 18h
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax+3], cl
movsx ecx, [rbp+var_1D]
mov rax, [rbp+var_8]
movsx edx, byte ptr [rax+65h]
xor eax, eax
cmp ecx, edx
mov [rbp+var_3B], al
jz short loc_54C66
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov eax, [rax]
cmp rax, 7FFFFFFFh
setnle al
mov [rbp+var_3B], al
loc_54C66:
mov al, [rbp+var_3B]
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
jmp loc_54D5D
loc_54C7F:
mov rax, [rbp+var_18]; jumptable 0000000000054A26 case 8
mov rax, [rax]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+3]
shl ecx, 18h
add eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+4]
mov rdx, [rbp+var_18]
mov rdx, [rdx]
movzx edx, byte ptr [rdx+5]
shl edx, 8
add ecx, edx
mov rdx, [rbp+var_18]
mov rdx, [rdx]
movzx edx, byte ptr [rdx+6]
shl edx, 10h
add ecx, edx
mov rdx, [rbp+var_18]
mov rdx, [rdx]
movzx edx, byte ptr [rdx+7]
shl edx, 18h
add ecx, edx
mov ecx, ecx
shl rcx, 20h
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_30]
mov [rax], rcx
movsx ecx, [rbp+var_1D]
mov rax, [rbp+var_8]
movsx edx, byte ptr [rax+65h]
xor eax, eax
cmp ecx, edx
mov [rbp+var_3C], al
jz short loc_54D3B
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_30], rax
setnbe al
mov [rbp+var_3C], al
loc_54D3B:
mov al, [rbp+var_3C]
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
jmp short loc_54D5D
def_54A26:
mov rax, [rbp+var_8]; jumptable 0000000000054A26 default case, cases 3,5-7
mov qword ptr [rax+40h], 0
loc_54D5D:
mov edx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov rcx, [rax]
mov edx, edx
add rcx, rdx
mov [rax], rcx
pop rbp
retn
|
_BYTE ** ps_fetch_from_1_to_8_bytes(long long a1, long long a2, _BYTE **a3, unsigned int a4)
{
_BYTE **result; // rax
bool v5; // [rsp+0h] [rbp-3Ch]
bool v6; // [rsp+1h] [rbp-3Bh]
bool v7; // [rsp+2h] [rbp-3Ah]
bool v8; // [rsp+3h] [rbp-39h]
unsigned long long v9; // [rsp+Ch] [rbp-30h]
char v10; // [rsp+1Fh] [rbp-1Dh]
v10 = (*(_DWORD *)(a2 + 100) & 0x20u) >> 5;
*(_QWORD *)(a1 + 64) = a4;
switch ( a4 )
{
case 1u:
**(_BYTE **)(a1 + 16) = **a3;
v8 = 0;
if ( v10 != *(char *)(a1 + 101) )
v8 = **(unsigned __int8 **)(a1 + 16) > 0x7Fu;
**(_BYTE **)(a1 + 24) = v8;
break;
case 2u:
**(_WORD **)(a1 + 16) = ((unsigned __int8)(*a3)[1] << 8) + (unsigned __int8)**a3;
v7 = 0;
if ( v10 != *(char *)(a1 + 101) )
v7 = **(unsigned __int16 **)(a1 + 16) > 0x7FFFu;
**(_BYTE **)(a1 + 24) = v7;
break;
case 4u:
**(_BYTE **)(a1 + 16) = **a3;
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = (unsigned __int16)(((unsigned __int8)(*a3)[1] << 8)
+ (unsigned __int8)**a3) >> 8;
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 2LL) = (((unsigned __int8)(*a3)[3] << 24)
+ ((unsigned __int8)(*a3)[2] << 16)
+ ((unsigned __int8)(*a3)[1] << 8)
+ (unsigned int)(unsigned __int8)**a3) >> 16;
*(_BYTE *)(*(_QWORD *)(a1 + 16) + 3LL) = (((unsigned __int8)(*a3)[3] << 24)
+ ((unsigned __int8)(*a3)[2] << 16)
+ ((unsigned __int8)(*a3)[1] << 8)
+ (unsigned int)(unsigned __int8)**a3) >> 24;
v6 = 0;
if ( v10 != *(char *)(a1 + 101) )
v6 = **(unsigned int **)(a1 + 16) > 0x7FFFFFFFuLL;
**(_BYTE **)(a1 + 24) = v6;
break;
case 8u:
v9 = ((unsigned long long)(((unsigned __int8)(*a3)[7] << 24)
+ ((unsigned __int8)(*a3)[6] << 16)
+ ((unsigned __int8)(*a3)[5] << 8)
+ (unsigned int)(unsigned __int8)(*a3)[4]) << 32)
+ ((unsigned __int8)(*a3)[3] << 24)
+ ((unsigned __int8)(*a3)[2] << 16)
+ ((unsigned __int8)(*a3)[1] << 8)
+ (unsigned int)(unsigned __int8)**a3;
**(_QWORD **)(a1 + 16) = v9;
v5 = 0;
if ( v10 != *(char *)(a1 + 101) )
v5 = v9 > 0x7FFFFFFFFFFFFFFFLL;
**(_BYTE **)(a1 + 24) = v5;
break;
default:
*(_QWORD *)(a1 + 64) = 0LL;
break;
}
result = a3;
*a3 += a4;
return result;
}
|
ps_fetch_from_1_to_8_bytes:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
AND EAX,0x20
SHR EAX,0x5
MOV byte ptr [RBP + -0x1d],AL
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],RCX
MOV EAX,dword ptr [RBP + -0x1c]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0x7
JA 0x00154d51
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x1d5d90]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX],CL
MOVSX ECX,byte ptr [RBP + -0x1d]
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDX,byte ptr [RAX + 0x65]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x39],AL
JZ 0x00154a64
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_00154a64:
MOV AL,byte ptr [RBP + -0x39]
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
JMP 0x00154d5d
caseD_2:
JMP 0x00154a7f
LAB_00154a7f:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
CWDE
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVSX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX + 0x1],CL
MOVSX ECX,byte ptr [RBP + -0x1d]
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDX,byte ptr [RAX + 0x65]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x3a],AL
JZ 0x00154af0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOVZX EAX,word ptr [RAX]
CMP EAX,0x7fff
SETG AL
MOV byte ptr [RBP + -0x3a],AL
LAB_00154af0:
MOV AL,byte ptr [RBP + -0x3a]
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
JMP 0x00154d5d
caseD_4:
JMP 0x00154b0b
LAB_00154b0b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x3]
MOVSX ECX,CX
SHL ECX,0x18
ADD EAX,ECX
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x3]
MOVSX ECX,CX
SHL ECX,0x18
ADD EAX,ECX
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x3]
MOVSX ECX,CX
SHL ECX,0x18
ADD EAX,ECX
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x3]
MOVSX ECX,CX
SHL ECX,0x18
ADD EAX,ECX
SHR EAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV byte ptr [RAX + 0x3],CL
MOVSX ECX,byte ptr [RBP + -0x1d]
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDX,byte ptr [RAX + 0x65]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x3b],AL
JZ 0x00154c66
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV EAX,dword ptr [RAX]
CMP RAX,0x7fffffff
SETG AL
MOV byte ptr [RBP + -0x3b],AL
LAB_00154c66:
MOV AL,byte ptr [RBP + -0x3b]
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
JMP 0x00154d5d
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x18
ADD EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x4]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX]
MOVZX EDX,byte ptr [RDX + 0x5]
SHL EDX,0x8
ADD ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX]
MOVZX EDX,byte ptr [RDX + 0x6]
SHL EDX,0x10
ADD ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX]
MOVZX EDX,byte ptr [RDX + 0x7]
SHL EDX,0x18
ADD ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOVSX ECX,byte ptr [RBP + -0x1d]
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDX,byte ptr [RAX + 0x65]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x3c],AL
JZ 0x00154d3b
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x30],RAX
SETA AL
MOV byte ptr [RBP + -0x3c],AL
LAB_00154d3b:
MOV AL,byte ptr [RBP + -0x3c]
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
JMP 0x00154d5d
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],0x0
LAB_00154d5d:
MOV EDX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void ps_fetch_from_1_to_8_bytes(long param_1,long param_2,long *param_3,uint param_4)
{
char cVar1;
uint uVar2;
ulong uVar3;
bool local_44;
bool local_43;
bool local_42;
bool local_41;
cVar1 = (char)((*(uint *)(param_2 + 100) & 0x20) >> 5);
*(ulong *)(param_1 + 0x40) = (ulong)param_4;
switch(param_4) {
case 1:
**(int1 **)(param_1 + 0x10) = *(int1 *)*param_3;
local_41 = false;
if (cVar1 != *(char *)(param_1 + 0x65)) {
local_41 = 0x7f < **(byte **)(param_1 + 0x10);
}
*(bool *)*(int8 *)(param_1 + 0x18) = local_41;
break;
case 2:
uVar2 = (int)(short)(ushort)*(byte *)*param_3 + (short)(ushort)*(byte *)(*param_3 + 1) * 0x100 &
0xffff;
**(int1 **)(param_1 + 0x10) = (char)uVar2;
*(char *)(*(long *)(param_1 + 0x10) + 1) = (char)(uVar2 >> 8);
local_42 = false;
if (cVar1 != *(char *)(param_1 + 0x65)) {
local_42 = 0x7fff < **(ushort **)(param_1 + 0x10);
}
*(bool *)*(int8 *)(param_1 + 0x18) = local_42;
break;
default:
*(int8 *)(param_1 + 0x40) = 0;
break;
case 4:
**(int1 **)(param_1 + 0x10) = *(int1 *)*param_3;
*(char *)(*(long *)(param_1 + 0x10) + 1) =
(char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 >> 8);
*(char *)(*(long *)(param_1 + 0x10) + 2) =
(char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 +
(uint)*(byte *)(*param_3 + 2) * 0x10000 >> 0x10);
*(char *)(*(long *)(param_1 + 0x10) + 3) =
(char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 +
(uint)*(byte *)(*param_3 + 2) * 0x10000 +
(short)(ushort)*(byte *)(*param_3 + 3) * 0x1000000 >> 0x18);
local_43 = false;
if (cVar1 != *(char *)(param_1 + 0x65)) {
local_43 = 0x7fffffff < **(uint **)(param_1 + 0x10);
}
*(bool *)*(int8 *)(param_1 + 0x18) = local_43;
break;
case 8:
uVar3 = CONCAT44((uint)*(byte *)(*param_3 + 4) + (uint)*(byte *)(*param_3 + 5) * 0x100 +
(uint)*(byte *)(*param_3 + 6) * 0x10000 +
(uint)*(byte *)(*param_3 + 7) * 0x1000000,
(uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 +
(uint)*(byte *)(*param_3 + 2) * 0x10000 +
(uint)*(byte *)(*param_3 + 3) * 0x1000000);
**(ulong **)(param_1 + 0x10) = uVar3;
local_44 = cVar1 != *(char *)(param_1 + 0x65) && 0x7fffffffffffffff < uVar3;
*(bool *)*(int8 *)(param_1 + 0x18) = local_44;
}
*param_3 = *param_3 + (ulong)param_4;
return;
}
|
|
61,294
|
best_index_int8
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
static inline int best_index_int8(int n, const int8_t * val, float x) {
if (x <= val[0]) return 0;
if (x >= val[n-1]) return n-1;
int ml = 0, mu = n-1;
while (mu-ml > 1) {
int mav = (ml+mu)/2;
if (x < val[mav]) mu = mav; else ml = mav;
}
return x - val[mu-1] < val[mu] - x ? mu-1 : mu;
}
|
O0
|
c
|
best_index_int8:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm1
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cvtsi2ss %eax, %xmm0
ucomiss %xmm1, %xmm0
jb 0x89ae1
movl $0x0, -0x4(%rbp)
jmp 0x89bb3
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jb 0x89b0e
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x89bb3
movl $0x0, -0x18(%rbp)
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x1, %eax
jle 0x89b64
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x20(%rbp)
movss -0x14(%rbp), %xmm1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x89b5c
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x89b62
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x89b1e
movss -0x14(%rbp), %xmm1
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
subss %xmm0, %xmm1
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
subss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x89ba7
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x89bad
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
best_index_int8:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
movss [rbp+var_14], xmm0
movss xmm1, [rbp+var_14]
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cvtsi2ss xmm0, eax
ucomiss xmm0, xmm1
jb short loc_89AE1
mov [rbp+var_4], 0
jmp loc_89BB3
loc_89AE1:
movss xmm0, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_8]
sub ecx, 1
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
ucomiss xmm0, xmm1
jb short loc_89B0E
mov eax, [rbp+var_8]
sub eax, 1
mov [rbp+var_4], eax
jmp loc_89BB3
loc_89B0E:
mov [rbp+var_18], 0
mov eax, [rbp+var_8]
sub eax, 1
mov [rbp+var_1C], eax
loc_89B1E:
mov eax, [rbp+var_1C]
sub eax, [rbp+var_18]
cmp eax, 1
jle short loc_89B64
mov eax, [rbp+var_18]
add eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_20], eax
movss xmm1, [rbp+var_14]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_20]
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm0, eax
ucomiss xmm0, xmm1
jbe short loc_89B5C
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
jmp short loc_89B62
loc_89B5C:
mov eax, [rbp+var_20]
mov [rbp+var_18], eax
loc_89B62:
jmp short loc_89B1E
loc_89B64:
movss xmm1, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
sub ecx, 1
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm0, eax
subss xmm1, xmm0
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm0, eax
subss xmm0, [rbp+var_14]
ucomiss xmm0, xmm1
jbe short loc_89BA7
mov eax, [rbp+var_1C]
sub eax, 1
mov [rbp+var_24], eax
jmp short loc_89BAD
loc_89BA7:
mov eax, [rbp+var_1C]
mov [rbp+var_24], eax
loc_89BAD:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_89BB3:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long best_index_int8(int a1, char *a2, float a3)
{
int v5; // [rsp+8h] [rbp-1Ch]
int v6; // [rsp+Ch] [rbp-18h]
if ( (float)*a2 < a3 )
{
if ( a3 < (float)a2[a1 - 1] )
{
v6 = 0;
v5 = a1 - 1;
while ( v5 - v6 > 1 )
{
if ( (float)a2[(v5 + v6) / 2] <= a3 )
v6 = (v5 + v6) / 2;
else
v5 = (v5 + v6) / 2;
}
if ( (float)((float)a2[v5] - a3) <= (float)(a3 - (float)a2[v5 - 1]) )
return (unsigned int)v5;
else
return (unsigned int)(v5 - 1);
}
else
{
return (unsigned int)(a1 - 1);
}
}
else
{
return 0;
}
}
|
best_index_int8:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOVSS dword ptr [RBP + -0x14],XMM0
MOVSS XMM1,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CVTSI2SS XMM0,EAX
UCOMISS XMM0,XMM1
JC 0x00189ae1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00189bb3
LAB_00189ae1:
MOVSS XMM0,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x8]
SUB ECX,0x1
MOVSXD RCX,ECX
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
UCOMISS XMM0,XMM1
JC 0x00189b0e
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00189bb3
LAB_00189b0e:
MOV dword ptr [RBP + -0x18],0x0
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_00189b1e:
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,dword ptr [RBP + -0x18]
CMP EAX,0x1
JLE 0x00189b64
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x20],EAX
MOVSS XMM1,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM0,EAX
UCOMISS XMM0,XMM1
JBE 0x00189b5c
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00189b62
LAB_00189b5c:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x18],EAX
LAB_00189b62:
JMP 0x00189b1e
LAB_00189b64:
MOVSS XMM1,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x1
MOVSXD RCX,ECX
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM0,EAX
SUBSS XMM1,XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM0,EAX
SUBSS XMM0,dword ptr [RBP + -0x14]
UCOMISS XMM0,XMM1
JBE 0x00189ba7
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00189bad
LAB_00189ba7:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x24],EAX
LAB_00189bad:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_00189bb3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int best_index_int8(float param_1,int param_2,char *param_3)
{
int iVar1;
int local_2c;
int local_24;
int local_20;
int local_c;
if ((float)(int)*param_3 < param_1) {
if (param_1 < (float)(int)param_3[param_2 + -1]) {
local_20 = 0;
local_24 = param_2 + -1;
iVar1 = local_20;
while (local_20 = iVar1, 1 < local_24 - local_20) {
iVar1 = (local_20 + local_24) / 2;
if (param_1 < (float)(int)param_3[iVar1]) {
local_24 = iVar1;
iVar1 = local_20;
}
}
if ((float)(int)param_3[local_24] - param_1 <= param_1 - (float)(int)param_3[local_24 + -1]) {
local_2c = local_24;
}
else {
local_2c = local_24 + -1;
}
local_c = local_2c;
}
else {
local_c = param_2 + -1;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
61,295
|
best_index_int8
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
static inline int best_index_int8(int n, const int8_t * val, float x) {
if (x <= val[0]) return 0;
if (x >= val[n-1]) return n-1;
int ml = 0, mu = n-1;
while (mu-ml > 1) {
int mav = (ml+mu)/2;
if (x < val[mav]) mu = mav; else ml = mav;
}
return x - val[mu-1] < val[mu] - x ? mu-1 : mu;
}
|
O2
|
c
|
best_index_int8:
xorl %eax, %eax
movss 0x13675(%rip), %xmm1 # 0x5307c
ucomiss %xmm0, %xmm1
jae 0x3fa70
ucomiss 0x136b5(%rip), %xmm0 # 0x530c8
jae 0x3fa71
pushq $0xf
popq %rcx
xorl %edi, %edi
pushq $0x2
popq %r8
leaq 0x135eb(%rip), %rsi # 0x53010
movl %ecx, %eax
subl %edi, %eax
cmpl $0x2, %eax
jl 0x3fa4a
leal (%rcx,%rdi), %eax
cltd
idivl %r8d
cltq
movsbl (%rax,%rsi), %edx
cvtsi2ss %edx, %xmm1
ucomiss %xmm0, %xmm1
cmovbel %eax, %edi
cmoval %eax, %ecx
jmp 0x3fa25
movslq %ecx, %rax
movsbl -0x1(%rax,%rsi), %edx
cvtsi2ss %edx, %xmm1
movsbl (%rax,%rsi), %edx
cvtsi2ss %edx, %xmm2
subss %xmm0, %xmm2
subss %xmm1, %xmm0
ucomiss %xmm0, %xmm2
leaq -0x1(%rax), %rax
cmovbel %ecx, %eax
retq
pushq $0xf
popq %rax
retq
nopl (%rax)
|
best_index_int8:
xor eax, eax
movss xmm1, cs:dword_5307C
ucomiss xmm1, xmm0
jnb short locret_3FA70
ucomiss xmm0, cs:dword_530C8
jnb short loc_3FA71
push 0Fh
pop rcx
xor edi, edi
push 2
pop r8
lea rsi, kvalues_iq4nl
loc_3FA25:
mov eax, ecx
sub eax, edi
cmp eax, 2
jl short loc_3FA4A
lea eax, [rcx+rdi]
cdq
idiv r8d
cdqe
movsx edx, byte ptr [rax+rsi]
cvtsi2ss xmm1, edx
ucomiss xmm1, xmm0
cmovbe edi, eax
cmova ecx, eax
jmp short loc_3FA25
loc_3FA4A:
movsxd rax, ecx
movsx edx, byte ptr [rax+rsi-1]
cvtsi2ss xmm1, edx
movsx edx, byte ptr [rax+rsi]
cvtsi2ss xmm2, edx
subss xmm2, xmm0
subss xmm0, xmm1
ucomiss xmm2, xmm0
lea rax, [rax-1]
cmovbe eax, ecx
locret_3FA70:
retn
loc_3FA71:
push 0Fh
pop rax
retn
|
long long best_index_int8(float a1)
{
long long result; // rax
int v2; // ecx
int v3; // edi
result = 0LL;
if ( a1 > -127.0 )
{
if ( a1 >= 113.0 )
{
return 15LL;
}
else
{
v2 = 15;
v3 = 0;
while ( v2 - v3 >= 2 )
{
if ( (float)kvalues_iq4nl[(v2 + v3) / 2] > a1 )
v2 = (v2 + v3) / 2;
else
v3 = (v2 + v3) / 2;
}
result = v2 - 1LL;
if ( (float)((float)kvalues_iq4nl[v2] - a1) <= (float)(a1 - (float)kvalues_iq4nl[v2 - 1]) )
return (unsigned int)v2;
}
}
return result;
}
|
best_index_int8:
XOR EAX,EAX
MOVSS XMM1,dword ptr [0x0015307c]
UCOMISS XMM1,XMM0
JNC 0x0013fa70
UCOMISS XMM0,dword ptr [0x001530c8]
JNC 0x0013fa71
PUSH 0xf
POP RCX
XOR EDI,EDI
PUSH 0x2
POP R8
LEA RSI,[0x153010]
LAB_0013fa25:
MOV EAX,ECX
SUB EAX,EDI
CMP EAX,0x2
JL 0x0013fa4a
LEA EAX,[RCX + RDI*0x1]
CDQ
IDIV R8D
CDQE
MOVSX EDX,byte ptr [RAX + RSI*0x1]
CVTSI2SS XMM1,EDX
UCOMISS XMM1,XMM0
CMOVBE EDI,EAX
CMOVA ECX,EAX
JMP 0x0013fa25
LAB_0013fa4a:
MOVSXD RAX,ECX
MOVSX EDX,byte ptr [RAX + RSI*0x1 + -0x1]
CVTSI2SS XMM1,EDX
MOVSX EDX,byte ptr [RAX + RSI*0x1]
CVTSI2SS XMM2,EDX
SUBSS XMM2,XMM0
SUBSS XMM0,XMM1
UCOMISS XMM2,XMM0
LEA RAX,[RAX + -0x1]
CMOVBE EAX,ECX
LAB_0013fa70:
RET
LAB_0013fa71:
PUSH 0xf
POP RAX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong best_index_int8(float param_1)
{
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
int iVar5;
uVar3 = 0;
if (DAT_0015307c < param_1) {
if (_DAT_001530c8 <= param_1) {
return 0xf;
}
iVar5 = 0;
for (uVar4 = 0xf; iVar1 = (int)uVar4, 1 < iVar1 - iVar5; uVar4 = uVar4 & 0xffffffff) {
uVar3 = (long)(iVar1 + iVar5) / 2;
iVar1 = (int)uVar3;
if (param_1 < (float)(int)(char)kvalues_iq4nl[iVar1]) {
uVar4 = uVar3;
iVar1 = iVar5;
}
iVar5 = iVar1;
}
lVar2 = (long)iVar1;
uVar3 = lVar2 - 1U & 0xffffffff;
if ((float)(int)(char)kvalues_iq4nl[lVar2] - param_1 <=
param_1 - (float)(int)(char)(&UNK_0015300f)[lVar2]) {
uVar3 = uVar4;
}
}
return uVar3;
}
|
|
61,296
|
minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&)
|
monkey531[P]llama/common/minja.hpp
|
SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv)
: TemplateNode(location), name(name), template_value(std::move(tv)) {}
|
O3
|
cpp
|
minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x8cb5e(%rip), %r15 # 0x12ffc8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xa349a
movq 0x8daec(%rip), %rcx # 0x130f78
cmpb $0x0, (%rcx)
je 0xa3496
incl 0x8(%rax)
jmp 0xa349a
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8cf1f(%rip), %rax # 0x1303c8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x268c4
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
movq %rax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa34fa
callq 0x267a6
movq %r14, %rdi
callq 0x1c0d0
|
_ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov rbx, rdi
lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_A349A
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_A3496
inc dword ptr [rax+8]
jmp short loc_A349A
loc_A3496:
lock inc dword ptr [rax+8]
loc_A349A:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xor eax, eax
mov [rbx+48h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+40h], xmm0
mov [r14], rax
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_A34FA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A34FA:
mov rdi, r14
call __Unwind_Resume
|
long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
result = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
|
SetTemplateNode:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV RBX,RDI
LEA R15,[0x22ffc8]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001a349a
MOV RCX,qword ptr [0x00230f78]
CMP byte ptr [RCX],0x0
JZ 0x001a3496
INC dword ptr [RAX + 0x8]
JMP 0x001a349a
LAB_001a3496:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a349a:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x2303c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_001a34c6:
CALL 0x001268c4
LAB_001a34cb:
XOR EAX,EAX
MOV qword ptr [RBX + 0x48],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV qword ptr [R14],RAX
POP RBX
POP R14
POP R15
RET
|
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::SetTemplateNode::SetTemplateNode
(SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022ffd8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00230f78 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_002303d8;
*(SetTemplateNode **)(this + 0x20) = this + 0x30;
/* try { // try from 001a34c6 to 001a34ca has its CatchHandler @ 001a34e6 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
*(int8 *)(this + 0x48) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)param_3 = 0;
return;
}
|
|
61,297
|
testing::internal::edit_distance::(anonymous namespace)::Hunk::PushLine(char, char const*)
|
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
void PushLine(char edit, const char* line) {
switch (edit) {
case ' ':
++common_;
FlushEdits();
hunk_.push_back(std::make_pair(' ', line));
break;
case '-':
++removes_;
hunk_removes_.push_back(std::make_pair('-', line));
break;
case '+':
++adds_;
hunk_adds_.push_back(std::make_pair('+', line));
break;
}
}
|
O3
|
cpp
|
testing::internal::edit_distance::(anonymous namespace)::Hunk::PushLine(char, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x2d, %esi
je 0x1d917
cmpl $0x2b, %ebp
je 0x1d905
cmpl $0x20, %ebp
jne 0x1d94b
incq 0x20(%rbx)
movq %rbx, %rdi
callq 0x3020e
movl $0x38, %r12d
movl $0x28, %r15d
jmp 0x1d927
incq 0x10(%rbx)
movl $0x50, %r12d
movl $0x40, %r15d
jmp 0x1d927
incq 0x18(%rbx)
movl $0x68, %r12d
movl $0x58, %r15d
addq %rbx, %r15
movl $0x20, %edi
callq 0x84b0
movb %bpl, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x80a0
incq (%rbx,%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZN7testing8internal13edit_distance12_GLOBAL__N_14Hunk8PushLineEcPKc:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
cmp esi, 2Dh ; '-'
jz short loc_1D917
cmp ebp, 2Bh ; '+'
jz short loc_1D905
cmp ebp, 20h ; ' '
jnz short loc_1D94B
inc qword ptr [rbx+20h]
mov rdi, rbx; this
call _ZN7testing8internal13edit_distance12_GLOBAL__N_14Hunk10FlushEditsEv; testing::internal::edit_distance::`anonymous namespace'::Hunk::FlushEdits(void)
mov r12d, 38h ; '8'
mov r15d, 28h ; '('
jmp short loc_1D927
loc_1D905:
inc qword ptr [rbx+10h]
mov r12d, 50h ; 'P'
mov r15d, 40h ; '@'
jmp short loc_1D927
loc_1D917:
inc qword ptr [rbx+18h]
mov r12d, 68h ; 'h'
mov r15d, 58h ; 'X'
loc_1D927:
add r15, rbx
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax+10h], bpl
mov [rax+18h], r14
mov rdi, rax
mov rsi, r15
call __ZNSt8__detail15_List_node_base7_M_hookEPS0_; std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)
inc qword ptr [rbx+r12]
loc_1D94B:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
void testing::internal::edit_distance::`anonymous namespace'::Hunk::PushLine(
testing::internal::edit_distance::_anonymous_namespace_::Hunk *this,
int a2,
const char *a3)
{
long long v4; // r12
long long v5; // r15
long long v6; // rax
switch ( a2 )
{
case '-':
++*((_QWORD *)this + 3);
v4 = 104LL;
v5 = 88LL;
break;
case '+':
++*((_QWORD *)this + 2);
v4 = 80LL;
v5 = 64LL;
break;
case ' ':
++*((_QWORD *)this + 4);
testing::internal::edit_distance::`anonymous namespace'::Hunk::FlushEdits(this);
v4 = 56LL;
v5 = 40LL;
break;
default:
return;
}
v6 = operator new(0x20uLL);
*(_BYTE *)(v6 + 16) = a2;
*(_QWORD *)(v6 + 24) = a3;
std::__detail::_List_node_base::_M_hook(v6, (char *)this + v5);
++*(_QWORD *)((char *)this + v4);
}
|
PushLine:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CMP ESI,0x2d
JZ 0x0011d917
CMP EBP,0x2b
JZ 0x0011d905
CMP EBP,0x20
JNZ 0x0011d94b
INC qword ptr [RBX + 0x20]
MOV RDI,RBX
CALL 0x0013020e
MOV R12D,0x38
MOV R15D,0x28
JMP 0x0011d927
LAB_0011d905:
INC qword ptr [RBX + 0x10]
MOV R12D,0x50
MOV R15D,0x40
JMP 0x0011d927
LAB_0011d917:
INC qword ptr [RBX + 0x18]
MOV R12D,0x68
MOV R15D,0x58
LAB_0011d927:
ADD R15,RBX
MOV EDI,0x20
CALL 0x001084b0
MOV byte ptr [RAX + 0x10],BPL
MOV qword ptr [RAX + 0x18],R14
MOV RDI,RAX
MOV RSI,R15
CALL 0x001080a0
INC qword ptr [RBX + R12*0x1]
LAB_0011d94b:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::edit_distance::(anonymous namespace)::Hunk::PushLine(char, char const*) */
void __thiscall
testing::internal::edit_distance::(anonymous_namespace)::Hunk::PushLine
(Hunk *this,char param_1,char *param_2)
{
_List_node_base *p_Var1;
int iVar2;
int7 in_register_00000031;
long lVar3;
iVar2 = (int)CONCAT71(in_register_00000031,param_1);
if (iVar2 == 0x2d) {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
lVar3 = 0x68;
}
else if (iVar2 == 0x2b) {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 1;
lVar3 = 0x50;
}
else {
if (iVar2 != 0x20) {
return;
}
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
FlushEdits(this);
lVar3 = 0x38;
}
p_Var1 = (_List_node_base *)operator_new(0x20);
p_Var1[0x10] = (_List_node_base)param_1;
*(char **)(p_Var1 + 0x18) = param_2;
std::__detail::_List_node_base::_M_hook(p_Var1);
*(long *)(this + lVar3) = *(long *)(this + lVar3) + 1;
return;
}
|
|
61,298
|
my_snprintf_mb2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
}
|
O3
|
c
|
my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rsi, %r14
leaq -0x120(%rbp), %rcx
movq %r8, 0x20(%rcx)
movq %r9, 0x28(%rcx)
testb %al, %al
je 0x4f70c
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, -0x60(%rbp)
leaq (%rsi,%rdx), %rbx
decq %rbx
leaq -0x40(%rbp), %r12
movq %rsi, -0x68(%rbp)
movzbl (%r15), %eax
cmpl $0x25, %eax
je 0x4f770
testl %eax, %eax
je 0x4f8d6
cmpq %rbx, %r14
je 0x4f8d3
movb $0x0, (%r14)
movb (%r15), %al
movb %al, 0x1(%r14)
addq $0x2, %r14
incq %r15
jmp 0x4f742
addq $0x2, %r15
movb -0x1(%r15), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x4f78b
movzbl %al, %ecx
leal -0x2d(%rcx), %edx
cmpl $0x2, %edx
jae 0x4f790
incq %r15
jmp 0x4f774
cmpl $0x6c, %ecx
jne 0x4f79a
movb (%r15), %al
jmp 0x4f79d
decq %r15
cmpb $0x64, %al
je 0x4f7cd
movzbl %al, %eax
cmpl $0x75, %eax
je 0x4f7cd
cmpl $0x73, %eax
jne 0x4f7f5
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x4f862
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x4f86e
movq %rbx, %rax
subq %r14, %rax
cmpq $0x1f, %rax
jbe 0x4f8d6
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x4f809
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x4f815
cmpq %rbx, %r14
je 0x4f8d3
movw $0x2500, (%r14) # imm = 0x2500
jmp 0x4f767
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movslq (%rax), %rdi
cmpb $0x64, (%r15)
jne 0x4f828
movq %r12, %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x4f832
movl %edi, %edi
movq %r12, %rsi
movl $0xa, %edx
callq 0x64b32
cmpb $0x0, -0x40(%rbp)
je 0x4f76b
leaq -0x3f(%rbp), %rax
movb $0x0, (%r14)
movb -0x1(%rax), %cl
movb %cl, 0x1(%r14)
addq $0x2, %r14
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x4f845
jmp 0x4f76b
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq (%rax), %r13
movq %rbx, %r12
subq %r14, %r12
testq %r13, %r13
leaq 0x1b9ef(%rip), %rax # 0x6b270
cmoveq %rax, %r13
movq %r13, %rdi
callq 0x24120
leaq (%rax,%rax), %rdx
movq %r12, %rcx
shrq %rcx
decq %rcx
cmpq %rdx, %r12
cmovaq %rax, %rcx
testq %rcx, %rcx
je 0x4f8ca
xorl %eax, %eax
leaq -0x40(%rbp), %r12
movb $0x0, (%r14)
movb (%r13,%rax), %dl
movb %dl, 0x1(%r14)
addq $0x2, %r14
incq %rax
cmpq %rax, %rcx
jne 0x4f8ac
jmp 0x4f76b
leaq -0x40(%rbp), %r12
jmp 0x4f76b
movq %rbx, %r14
movb $0x0, (%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4f902
subq -0x68(%rbp), %r14
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24360
|
my_snprintf_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov r14, rsi
lea rcx, [rbp+var_120]
mov [rcx+20h], r8
mov [rcx+28h], r9
test al, al
jz short loc_4F70C
movaps [rbp+var_F0], xmm0
movaps [rbp+var_E0], xmm1
movaps [rbp+var_D0], xmm2
movaps [rbp+var_C0], xmm3
movaps [rbp+var_B0], xmm4
movaps [rbp+var_A0], xmm5
movaps [rbp+var_90], xmm6
movaps [rbp+var_80], xmm7
loc_4F70C:
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_50], rcx
lea rax, [rbp+arg_0]
mov [rbp+var_58], rax
mov rax, 3000000020h
mov [rbp+var_60], rax
lea rbx, [rsi+rdx]
dec rbx
lea r12, [rbp+var_40]
mov [rbp+var_68], rsi
loc_4F742:
movzx eax, byte ptr [r15]
cmp eax, 25h ; '%'
jz short loc_4F770
test eax, eax
jz loc_4F8D6
cmp r14, rbx
jz loc_4F8D3
mov byte ptr [r14], 0
mov al, [r15]
mov [r14+1], al
loc_4F767:
add r14, 2
loc_4F76B:
inc r15
jmp short loc_4F742
loc_4F770:
add r15, 2
loc_4F774:
mov al, [r15-1]
lea ecx, [rax-30h]
cmp cl, 0Ah
jb short loc_4F78B
movzx ecx, al
lea edx, [rcx-2Dh]
cmp edx, 2
jnb short loc_4F790
loc_4F78B:
inc r15
jmp short loc_4F774
loc_4F790:
cmp ecx, 6Ch ; 'l'
jnz short loc_4F79A
mov al, [r15]
jmp short loc_4F79D
loc_4F79A:
dec r15
loc_4F79D:
cmp al, 64h ; 'd'
jz short loc_4F7CD
movzx eax, al
cmp eax, 75h ; 'u'
jz short loc_4F7CD
cmp eax, 73h ; 's'
jnz short loc_4F7F5
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja loc_4F862
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp loc_4F86E
loc_4F7CD:
mov rax, rbx
sub rax, r14
cmp rax, 1Fh
jbe loc_4F8D6
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja short loc_4F809
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp short loc_4F815
loc_4F7F5:
cmp r14, rbx
jz loc_4F8D3
mov word ptr [r14], 2500h
jmp loc_4F767
loc_4F809:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_4F815:
movsxd rdi, dword ptr [rax]
cmp byte ptr [r15], 64h ; 'd'
jnz short loc_4F828
mov rsi, r12
mov edx, 0FFFFFFF6h
jmp short loc_4F832
loc_4F828:
mov edi, edi
mov rsi, r12
mov edx, 0Ah
loc_4F832:
call int10_to_str
cmp [rbp+var_40], 0
jz loc_4F76B
lea rax, [rbp+var_3F]
loc_4F845:
mov byte ptr [r14], 0
mov cl, [rax-1]
mov [r14+1], cl
add r14, 2
cmp byte ptr [rax], 0
lea rax, [rax+1]
jnz short loc_4F845
jmp loc_4F76B
loc_4F862:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_4F86E:
mov r13, [rax]
mov r12, rbx
sub r12, r14
test r13, r13
lea rax, aNull_1; "(null)"
cmovz r13, rax
mov rdi, r13
call _strlen
lea rdx, [rax+rax]
mov rcx, r12
shr rcx, 1
dec rcx
cmp r12, rdx
cmova rcx, rax
test rcx, rcx
jz short loc_4F8CA
xor eax, eax
lea r12, [rbp+var_40]
loc_4F8AC:
mov byte ptr [r14], 0
mov dl, [r13+rax+0]
mov [r14+1], dl
add r14, 2
inc rax
cmp rcx, rax
jnz short loc_4F8AC
jmp loc_4F76B
loc_4F8CA:
lea r12, [rbp+var_40]
jmp loc_4F76B
loc_4F8D3:
mov r14, rbx
loc_4F8D6:
mov byte ptr [r14], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4F902
sub r14, [rbp+var_68]
mov rax, r14
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4F902:
call ___stack_chk_fail
|
_BYTE * my_snprintf_mb2(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
_BYTE *a10,
long long a11,
unsigned __int8 *a12,
long long a13,
long long a14,
char a15)
{
_BYTE *v16; // r14
long long v17; // rbx
unsigned __int8 v18; // al
const char **v19; // rax
char *v20; // rax
long long v21; // rdi
long long v22; // rdx
char *v23; // rax
const char *v25; // r13
unsigned long long v26; // r12
long long v27; // rax
long long v28; // rcx
long long i; // rax
char v31; // [rsp+0h] [rbp-120h] BYREF
long long v32; // [rsp+20h] [rbp-100h]
long long v33; // [rsp+28h] [rbp-F8h]
__m128 v34; // [rsp+30h] [rbp-F0h]
__m128 v35; // [rsp+40h] [rbp-E0h]
__m128 v36; // [rsp+50h] [rbp-D0h]
__m128 v37; // [rsp+60h] [rbp-C0h]
__m128 v38; // [rsp+70h] [rbp-B0h]
__m128 v39; // [rsp+80h] [rbp-A0h]
__m128 v40; // [rsp+90h] [rbp-90h]
__m128 v41; // [rsp+A0h] [rbp-80h]
_BYTE *v42; // [rsp+B8h] [rbp-68h]
long long v43; // [rsp+C0h] [rbp-60h]
char *v44; // [rsp+C8h] [rbp-58h]
char *v45; // [rsp+D0h] [rbp-50h]
char v46; // [rsp+E0h] [rbp-40h] BYREF
char v47; // [rsp+E1h] [rbp-3Fh] BYREF
unsigned long long v48; // [rsp+F0h] [rbp-30h]
v34 = a1;
v35 = a2;
v36 = a3;
v37 = a4;
v38 = a5;
v39 = a6;
v40 = a7;
v41 = a8;
v16 = a10;
v32 = a13;
v33 = a14;
v48 = __readfsqword(0x28u);
v45 = &v31;
v44 = &a15;
v43 = 0x3000000020LL;
v17 = (long long)&a10[a11 - 1];
v42 = a10;
while ( *a12 == 37 )
{
for ( a12 += 2; ; ++a12 )
{
v18 = *(a12 - 1);
if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 )
break;
}
if ( v18 == 108 )
v18 = *a12;
else
--a12;
if ( v18 == 100 || v18 == 117 )
{
if ( (unsigned long long)(v17 - (_QWORD)v16) <= 0x1F )
goto LABEL_44;
if ( (unsigned int)v43 > 0x28uLL )
{
v20 = v44;
v44 += 8;
}
else
{
v20 = &v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v21 = *(int *)v20;
if ( *a12 == 100 )
{
v22 = 4294967286LL;
}
else
{
v21 = (unsigned int)v21;
v22 = 10LL;
}
int10_to_str(v21, &v46, v22);
if ( v46 )
{
v23 = &v47;
do
{
*v16 = 0;
v16[1] = *(v23 - 1);
v16 += 2;
}
while ( *v23++ != 0 );
}
}
else
{
if ( v18 != 115 )
{
if ( v16 == (_BYTE *)v17 )
goto LABEL_43;
*(_WORD *)v16 = 9472;
goto LABEL_6;
}
if ( (unsigned int)v43 > 0x28uLL )
{
v19 = (const char **)v44;
v44 += 8;
}
else
{
v19 = (const char **)&v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v25 = *v19;
v26 = v17 - (_QWORD)v16;
if ( !*v19 )
v25 = "(null)";
v27 = strlen(v25);
v28 = (v26 >> 1) - 1;
if ( v26 > 2 * v27 )
v28 = v27;
if ( v28 )
{
for ( i = 0LL; i != v28; ++i )
{
*v16 = 0;
v16[1] = v25[i];
v16 += 2;
}
}
}
LABEL_7:
++a12;
}
if ( !*a12 )
goto LABEL_44;
if ( v16 != (_BYTE *)v17 )
{
*v16 = 0;
v16[1] = *a12;
LABEL_6:
v16 += 2;
goto LABEL_7;
}
LABEL_43:
v16 = (_BYTE *)v17;
LABEL_44:
*v16 = 0;
return (_BYTE *)(v16 - v42);
}
|
my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV R14,RSI
LEA RCX,[RBP + -0x120]
MOV qword ptr [RCX + 0x20],R8
MOV qword ptr [RCX + 0x28],R9
TEST AL,AL
JZ 0x0014f70c
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVAPS xmmword ptr [RBP + -0xe0],XMM1
MOVAPS xmmword ptr [RBP + -0xd0],XMM2
MOVAPS xmmword ptr [RBP + -0xc0],XMM3
MOVAPS xmmword ptr [RBP + -0xb0],XMM4
MOVAPS xmmword ptr [RBP + -0xa0],XMM5
MOVAPS xmmword ptr [RBP + -0x90],XMM6
MOVAPS xmmword ptr [RBP + -0x80],XMM7
LAB_0014f70c:
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x50],RCX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,0x3000000020
MOV qword ptr [RBP + -0x60],RAX
LEA RBX,[RSI + RDX*0x1]
DEC RBX
LEA R12,[RBP + -0x40]
MOV qword ptr [RBP + -0x68],RSI
LAB_0014f742:
MOVZX EAX,byte ptr [R15]
CMP EAX,0x25
JZ 0x0014f770
TEST EAX,EAX
JZ 0x0014f8d6
CMP R14,RBX
JZ 0x0014f8d3
MOV byte ptr [R14],0x0
MOV AL,byte ptr [R15]
MOV byte ptr [R14 + 0x1],AL
LAB_0014f767:
ADD R14,0x2
LAB_0014f76b:
INC R15
JMP 0x0014f742
LAB_0014f770:
ADD R15,0x2
LAB_0014f774:
MOV AL,byte ptr [R15 + -0x1]
LEA ECX,[RAX + -0x30]
CMP CL,0xa
JC 0x0014f78b
MOVZX ECX,AL
LEA EDX,[RCX + -0x2d]
CMP EDX,0x2
JNC 0x0014f790
LAB_0014f78b:
INC R15
JMP 0x0014f774
LAB_0014f790:
CMP ECX,0x6c
JNZ 0x0014f79a
MOV AL,byte ptr [R15]
JMP 0x0014f79d
LAB_0014f79a:
DEC R15
LAB_0014f79d:
CMP AL,0x64
JZ 0x0014f7cd
MOVZX EAX,AL
CMP EAX,0x75
JZ 0x0014f7cd
CMP EAX,0x73
JNZ 0x0014f7f5
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x0014f862
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x0014f86e
LAB_0014f7cd:
MOV RAX,RBX
SUB RAX,R14
CMP RAX,0x1f
JBE 0x0014f8d6
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x0014f809
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x0014f815
LAB_0014f7f5:
CMP R14,RBX
JZ 0x0014f8d3
MOV word ptr [R14],0x2500
JMP 0x0014f767
LAB_0014f809:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_0014f815:
MOVSXD RDI,dword ptr [RAX]
CMP byte ptr [R15],0x64
JNZ 0x0014f828
MOV RSI,R12
MOV EDX,0xfffffff6
JMP 0x0014f832
LAB_0014f828:
MOV EDI,EDI
MOV RSI,R12
MOV EDX,0xa
LAB_0014f832:
CALL 0x00164b32
CMP byte ptr [RBP + -0x40],0x0
JZ 0x0014f76b
LEA RAX,[RBP + -0x3f]
LAB_0014f845:
MOV byte ptr [R14],0x0
MOV CL,byte ptr [RAX + -0x1]
MOV byte ptr [R14 + 0x1],CL
ADD R14,0x2
CMP byte ptr [RAX],0x0
LEA RAX,[RAX + 0x1]
JNZ 0x0014f845
JMP 0x0014f76b
LAB_0014f862:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_0014f86e:
MOV R13,qword ptr [RAX]
MOV R12,RBX
SUB R12,R14
TEST R13,R13
LEA RAX,[0x16b270]
CMOVZ R13,RAX
MOV RDI,R13
CALL 0x00124120
LEA RDX,[RAX + RAX*0x1]
MOV RCX,R12
SHR RCX,0x1
DEC RCX
CMP R12,RDX
CMOVA RCX,RAX
TEST RCX,RCX
JZ 0x0014f8ca
XOR EAX,EAX
LEA R12,[RBP + -0x40]
LAB_0014f8ac:
MOV byte ptr [R14],0x0
MOV DL,byte ptr [R13 + RAX*0x1]
MOV byte ptr [R14 + 0x1],DL
ADD R14,0x2
INC RAX
CMP RCX,RAX
JNZ 0x0014f8ac
JMP 0x0014f76b
LAB_0014f8ca:
LEA R12,[RBP + -0x40]
JMP 0x0014f76b
LAB_0014f8d3:
MOV R14,RBX
LAB_0014f8d6:
MOV byte ptr [R14],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014f902
SUB R14,qword ptr [RBP + -0x68]
MOV RAX,R14
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014f902:
CALL 0x00124360
|
long my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int2 *param_10,long param_11,byte *param_12,
int8 param_13,int8 param_14)
{
char in_AL;
byte bVar1;
uint *puVar2;
size_t sVar3;
size_t sVar4;
int8 uVar5;
int2 *puVar6;
ulong uVar7;
char *pcVar8;
int2 *puVar9;
long in_FS_OFFSET;
int1 local_128 [32];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int2 *local_70;
ulong local_68;
uint *local_60;
int1 *local_58;
char local_48 [16];
long local_38;
local_58 = local_128;
if (in_AL != '\0') {
local_f8 = param_1;
local_e8 = param_2;
local_d8 = param_3;
local_c8 = param_4;
local_b8 = param_5;
local_a8 = param_6;
local_98 = param_7;
local_88 = param_8;
}
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = (uint *)&stack0x00000008;
local_68 = 0x3000000020;
puVar6 = (int2 *)((long)param_10 + param_11 + -1);
local_108 = param_13;
local_100 = param_14;
local_70 = param_10;
do {
puVar9 = param_10;
if (*param_12 == 0x25) {
param_12 = param_12 + 2;
while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) {
param_12 = param_12 + 1;
}
if (bVar1 == 0x6c) {
bVar1 = *param_12;
}
else {
param_12 = param_12 + -1;
}
if ((bVar1 == 100) || (bVar1 == 0x75)) {
if ((ulong)((long)puVar6 - (long)param_10) < 0x20) {
LAB_0014f8d6:
*(int1 *)puVar9 = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)puVar9 - (long)local_70;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
uVar7 = (ulong)(int)*puVar2;
if (*param_12 == 100) {
uVar5 = 0xfffffff6;
}
else {
uVar7 = (ulong)*puVar2;
uVar5 = 10;
}
int10_to_str(uVar7,local_48,uVar5);
if (local_48[0] != '\0') {
pcVar8 = local_48;
do {
pcVar8 = pcVar8 + 1;
*(int1 *)param_10 = 0;
*(char *)((long)param_10 + 1) = pcVar8[-1];
param_10 = param_10 + 1;
} while (*pcVar8 != '\0');
}
}
else {
if (bVar1 != 0x73) {
puVar9 = puVar6;
if (param_10 != puVar6) {
*param_10 = 0x2500;
goto LAB_0014f767;
}
goto LAB_0014f8d6;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
pcVar8 = *(char **)puVar2;
if (pcVar8 == (char *)0x0) {
pcVar8 = "(null)";
}
sVar3 = strlen(pcVar8);
sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 1) - 1;
if (sVar3 * 2 < (ulong)((long)puVar6 - (long)param_10)) {
sVar4 = sVar3;
}
if (sVar4 != 0) {
sVar3 = 0;
do {
*(int1 *)param_10 = 0;
*(char *)((long)param_10 + 1) = pcVar8[sVar3];
param_10 = param_10 + 1;
sVar3 = sVar3 + 1;
} while (sVar4 != sVar3);
}
}
}
else {
if ((*param_12 == 0) || (puVar9 = puVar6, param_10 == puVar6)) goto LAB_0014f8d6;
*(int1 *)param_10 = 0;
*(byte *)((long)param_10 + 1) = *param_12;
LAB_0014f767:
param_10 = param_10 + 1;
}
param_12 = param_12 + 1;
} while( true );
}
|
|
61,299
|
llm_build_context::build_inp_KQ_mask(bool)
|
monkey531[P]llama/src/llama.cpp
|
struct ggml_tensor * build_inp_KQ_mask(bool causal = true) {
lctx.inp_KQ_mask = causal
? ggml_new_tensor_2d(ctx0, GGML_TYPE_F32, n_kv, GGML_PAD(n_tokens, GGML_KQ_MASK_PAD))
: ggml_new_tensor_2d(ctx0, GGML_TYPE_F32, n_tokens, GGML_PAD(n_tokens, GGML_KQ_MASK_PAD));
cb(lctx.inp_KQ_mask, "KQ_mask", -1);
ggml_set_input(lctx.inp_KQ_mask);
return flash_attn ? ggml_cast(ctx0, lctx.inp_KQ_mask, GGML_TYPE_F16) : lctx.inp_KQ_mask;
}
|
O2
|
cpp
|
llm_build_context::build_inp_KQ_mask(bool):
pushq %rbx
movq %rdi, %rbx
movq 0xe8(%rdi), %rdi
movslq 0xb0(%rbx), %rcx
movl %ecx, %eax
testl %esi, %esi
je 0xca2d8
movl 0xb4(%rbx), %eax
movslq %eax, %rdx
addq $0x1f, %rcx
andq $-0x20, %rcx
xorl %esi, %esi
callq 0xa4000
movq 0x8(%rbx), %rcx
movq %rax, 0x408(%rcx)
movq 0xd8(%rbx), %rdi
leaq 0x74af7(%rip), %rdx # 0x13edfa
pushq $-0x1
popq %rcx
movq %rax, %rsi
callq 0x9b040
movq 0x8(%rbx), %rax
movq 0x408(%rax), %rdi
callq 0x9dc30
cmpb $0x1, 0xc8(%rbx)
jne 0xca342
movq 0x8(%rbx), %rax
movq 0xe8(%rbx), %rdi
movq 0x408(%rax), %rsi
pushq $0x1
popq %rdx
popq %rbx
jmp 0x9cf70
movq 0x8(%rbx), %rax
movq 0x408(%rax), %rax
popq %rbx
retq
nop
|
_ZN17llm_build_context17build_inp_KQ_maskEb:
push rbx
mov rbx, rdi
mov rdi, [rdi+0E8h]
movsxd rcx, dword ptr [rbx+0B0h]
mov eax, ecx
test esi, esi
jz short loc_CA2D8
mov eax, [rbx+0B4h]
loc_CA2D8:
movsxd rdx, eax
add rcx, 1Fh
and rcx, 0FFFFFFFFFFFFFFE0h
xor esi, esi
call _ggml_new_tensor_2d
mov rcx, [rbx+8]
mov [rcx+408h], rax
mov rdi, [rbx+0D8h]
lea rdx, aKqMask; "KQ_mask"
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rsi, rax
call __ZNKSt8functionIFvP11ggml_tensorPKciEEclES1_S3_i; std::function<void ()(ggml_tensor *,char const*,int)>::operator()(ggml_tensor *,char const*,int)
mov rax, [rbx+8]
mov rdi, [rax+408h]
call _ggml_set_input
cmp byte ptr [rbx+0C8h], 1
jnz short loc_CA342
mov rax, [rbx+8]
mov rdi, [rbx+0E8h]
mov rsi, [rax+408h]
push 1
pop rdx
pop rbx
jmp _ggml_cast
loc_CA342:
mov rax, [rbx+8]
mov rax, [rax+408h]
pop rbx
retn
|
long long llm_build_context::build_inp_KQ_mask(llm_build_context *this, int a2)
{
long long v3; // rdi
int v4; // eax
long long v5; // rax
v3 = *((_QWORD *)this + 29);
v4 = *((_DWORD *)this + 44);
if ( a2 )
v4 = *((_DWORD *)this + 45);
v5 = ggml_new_tensor_2d(v3, 0LL, v4, (*((int *)this + 44) + 31LL) & 0xFFFFFFFFFFFFFFE0LL);
*(_QWORD *)(*((_QWORD *)this + 1) + 1032LL) = v5;
std::function<void ()(ggml_tensor *,char const*,int)>::operator()(*((_QWORD *)this + 27), v5, "KQ_mask", -1LL);
ggml_set_input(*(_QWORD *)(*((_QWORD *)this + 1) + 1032LL));
if ( *((_BYTE *)this + 200) == 1 )
return ggml_cast(*((_QWORD *)this + 29), *(_QWORD *)(*((_QWORD *)this + 1) + 1032LL), 1LL);
else
return *(_QWORD *)(*((_QWORD *)this + 1) + 1032LL);
}
|
build_inp_KQ_mask:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xe8]
MOVSXD RCX,dword ptr [RBX + 0xb0]
MOV EAX,ECX
TEST ESI,ESI
JZ 0x001ca2d8
MOV EAX,dword ptr [RBX + 0xb4]
LAB_001ca2d8:
MOVSXD RDX,EAX
ADD RCX,0x1f
AND RCX,-0x20
XOR ESI,ESI
CALL 0x001a4000
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RCX + 0x408],RAX
MOV RDI,qword ptr [RBX + 0xd8]
LEA RDX,[0x23edfa]
PUSH -0x1
POP RCX
MOV RSI,RAX
CALL 0x0019b040
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + 0x408]
CALL 0x0019dc30
CMP byte ptr [RBX + 0xc8],0x1
JNZ 0x001ca342
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RBX + 0xe8]
MOV RSI,qword ptr [RAX + 0x408]
PUSH 0x1
POP RDX
POP RBX
JMP 0x0019cf70
LAB_001ca342:
MOV RAX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX + 0x408]
POP RBX
RET
|
/* llm_build_context::build_inp_KQ_mask(bool) */
int8 __thiscall llm_build_context::build_inp_KQ_mask(llm_build_context *this,bool param_1)
{
int iVar1;
ggml_tensor *pgVar2;
int8 uVar3;
long lVar4;
int7 in_register_00000031;
iVar1 = *(int *)(this + 0xb0);
lVar4 = (long)iVar1;
if ((int)CONCAT71(in_register_00000031,param_1) != 0) {
iVar1 = *(int *)(this + 0xb4);
}
pgVar2 = (ggml_tensor *)
ggml_new_tensor_2d(*(int8 *)(this + 0xe8),0,(long)iVar1,
lVar4 + 0x1fU & 0xffffffffffffffe0);
*(ggml_tensor **)(*(long *)(this + 8) + 0x408) = pgVar2;
std::function<void(ggml_tensor*,char_const*,int)>::operator()
(*(function<void(ggml_tensor*,char_const*,int)> **)(this + 0xd8),pgVar2,"KQ_mask",-1);
ggml_set_input(*(int8 *)(*(long *)(this + 8) + 0x408));
if (this[200] == (llm_build_context)0x1) {
uVar3 = ggml_cast(*(int8 *)(this + 0xe8),*(int8 *)(*(long *)(this + 8) + 0x408),1);
return uVar3;
}
return *(int8 *)(*(long *)(this + 8) + 0x408);
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.