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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
45,900 | gz_comp | 3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/gzwrite.c | local int gz_comp(state, flush)
gz_statep state;
int flush;
{
int ret, writ;
unsigned have, put, max = ((unsigned)-1 >> 2) + 1;
z_streamp strm = &(state->strm);
/* allocate memory if this is the first time through */
if (state->size == 0 && gz_init(state) == -1)
return -1;
/* write directly if requested */
if (state->direct) {
while (strm->avail_in) {
put = strm->avail_in > max ? max : strm->avail_in;
writ = write(state->fd, strm->next_in, put);
if (writ < 0) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
}
strm->avail_in -= (unsigned)writ;
strm->next_in += writ;
}
return 0;
}
/* check for a pending reset */
if (state->reset) {
/* don't start a new gzip member unless there is data to write */
if (strm->avail_in == 0)
return 0;
deflateReset(strm);
state->reset = 0;
}
/* run deflate() on provided input until it produces no more output */
ret = Z_OK;
do {
/* write out current buffer contents if full, or if flushing, but if
doing Z_FINISH then don't write until we get to Z_STREAM_END */
if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
(flush != Z_FINISH || ret == Z_STREAM_END))) {
while (strm->next_out > state->x.next) {
put = strm->next_out - state->x.next > (int)max ? max :
(unsigned)(strm->next_out - state->x.next);
writ = write(state->fd, state->x.next, put);
if (writ < 0) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
}
state->x.next += writ;
}
if (strm->avail_out == 0) {
strm->avail_out = state->size;
strm->next_out = state->out;
state->x.next = state->out;
}
}
/* compress */
have = strm->avail_out;
ret = deflate(strm, flush);
if (ret == Z_STREAM_ERROR) {
gz_error(state, Z_STREAM_ERROR,
"internal error: deflate stream corrupt");
return -1;
}
have -= strm->avail_out;
} while (have);
/* if that completed a deflate stream, allow another to start */
if (flush == Z_FINISH)
state->reset = 1;
/* all done, no errors */
return 0;
} | O3 | c | gz_comp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x0, 0x28(%rdi)
jne 0x87e5
movq %rbx, %rdi
callq 0x86ca
cmpl $-0x1, %eax
je 0x8976
cmpl $0x0, 0x40(%rbx)
je 0x8848
movl 0x88(%rbx), %edx
xorl %r14d, %r14d
testl %edx, %edx
je 0x897c
movq 0x80(%rbx), %rsi
movl $0x40000000, %ebp # imm = 0x40000000
cmpl %ebp, %edx
cmovael %ebp, %edx
movl 0x1c(%rbx), %edi
callq 0x30e0
testl %eax, %eax
js 0x8939
movl %eax, %esi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
addq 0x80(%rbx), %rsi
movl 0x88(%rbx), %edx
subl %eax, %edx
movl %edx, 0x88(%rbx)
movq %rsi, 0x80(%rbx)
jne 0x8808
jmp 0x897c
leaq 0x80(%rbx), %r14
cmpl $0x0, 0x60(%rbx)
je 0x8871
cmpl $0x0, 0x88(%rbx)
je 0x895d
movq %r14, %rdi
callq 0x3120
movl $0x0, 0x60(%rbx)
movl 0xa0(%rbx), %r12d
xorl %eax, %eax
movl $0x40000000, %r15d # imm = 0x40000000
testl %r12d, %r12d
je 0x8899
cmpl $0x4, %ebp
setne %cl
cmpl $0x1, %eax
sete %al
testl %ebp, %ebp
je 0x8907
orb %al, %cl
je 0x8907
movq 0x8(%rbx), %rax
movq 0x98(%rbx), %rcx
cmpq %rax, %rcx
jbe 0x88e8
subq %rax, %rcx
cmpq $0x40000001, %rcx # imm = 0x40000001
movl %ecx, %edx
cmovgeq %r15, %rdx
movl 0x1c(%rbx), %edi
movq %rax, %rsi
callq 0x30e0
testl %eax, %eax
js 0x8939
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
addq 0x8(%rbx), %rax
movq %rax, 0x8(%rbx)
movq 0x98(%rbx), %rcx
cmpq %rax, %rcx
ja 0x88a9
movl 0xa0(%rbx), %r12d
testl %r12d, %r12d
jne 0x8907
movl 0x28(%rbx), %r12d
movl %r12d, 0xa0(%rbx)
movq 0x38(%rbx), %rax
movq %rax, 0x98(%rbx)
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x3130
cmpl $-0x2, %eax
je 0x8962
movl 0xa0(%rbx), %ecx
cmpl %ecx, %r12d
movl %ecx, %r12d
jne 0x8880
xorl %r14d, %r14d
cmpl $0x4, %ebp
jne 0x897c
movl $0x1, 0x60(%rbx)
jmp 0x897c
callq 0x3070
movl (%rax), %edi
callq 0x32d0
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movq %rax, %rdx
callq 0x757b
jmp 0x897c
xorl %r14d, %r14d
jmp 0x897c
leaq 0x8cc5(%rip), %rdx # 0x1162e
movq %rbx, %rdi
movl $0xfffffffe, %esi # imm = 0xFFFFFFFE
callq 0x757b
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| gz_comp:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, esi
mov rbx, rdi
cmp dword ptr [rdi+28h], 0
jnz short loc_87E5
mov rdi, rbx
call gz_init
cmp eax, 0FFFFFFFFh
jz loc_8976
loc_87E5:
cmp dword ptr [rbx+40h], 0
jz short loc_8848
mov edx, [rbx+88h]
xor r14d, r14d
test edx, edx
jz loc_897C
mov rsi, [rbx+80h]
mov ebp, 40000000h
loc_8808:
cmp edx, ebp
cmovnb edx, ebp
mov edi, [rbx+1Ch]
call _write
test eax, eax
js loc_8939
mov esi, eax
and esi, 7FFFFFFFh
add rsi, [rbx+80h]
mov edx, [rbx+88h]
sub edx, eax
mov [rbx+88h], edx
mov [rbx+80h], rsi
jnz short loc_8808
jmp loc_897C
loc_8848:
lea r14, [rbx+80h]
cmp dword ptr [rbx+60h], 0
jz short loc_8871
cmp dword ptr [rbx+88h], 0
jz loc_895D
mov rdi, r14
call _deflateReset
mov dword ptr [rbx+60h], 0
loc_8871:
mov r12d, [rbx+0A0h]
xor eax, eax
mov r15d, 40000000h
loc_8880:
test r12d, r12d
jz short loc_8899
cmp ebp, 4
setnz cl
cmp eax, 1
setz al
test ebp, ebp
jz short loc_8907
or cl, al
jz short loc_8907
loc_8899:
mov rax, [rbx+8]
mov rcx, [rbx+98h]
cmp rcx, rax
jbe short loc_88E8
loc_88A9:
sub rcx, rax
cmp rcx, 40000001h
mov edx, ecx
cmovge rdx, r15
mov edi, [rbx+1Ch]
mov rsi, rax
call _write
test eax, eax
js short loc_8939
and eax, 7FFFFFFFh
add rax, [rbx+8]
mov [rbx+8], rax
mov rcx, [rbx+98h]
cmp rcx, rax
ja short loc_88A9
mov r12d, [rbx+0A0h]
loc_88E8:
test r12d, r12d
jnz short loc_8907
mov r12d, [rbx+28h]
mov [rbx+0A0h], r12d
mov rax, [rbx+38h]
mov [rbx+98h], rax
mov [rbx+8], rax
loc_8907:
mov rdi, r14
mov esi, ebp
call _deflate
cmp eax, 0FFFFFFFEh
jz short loc_8962
mov ecx, [rbx+0A0h]
cmp r12d, ecx
mov r12d, ecx
jnz loc_8880
xor r14d, r14d
cmp ebp, 4
jnz short loc_897C
mov dword ptr [rbx+60h], 1
jmp short loc_897C
loc_8939:
call ___errno_location
mov edi, [rax]
call _strerror
mov r14d, 0FFFFFFFFh
mov rdi, rbx
mov esi, 0FFFFFFFFh
mov rdx, rax
call gz_error
jmp short loc_897C
loc_895D:
xor r14d, r14d
jmp short loc_897C
loc_8962:
lea rdx, aInternalErrorD; "internal error: deflate stream corrupt"
mov rdi, rbx
mov esi, 0FFFFFFFEh
call gz_error
loc_8976:
mov r14d, 0FFFFFFFFh
loc_897C:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long gz_comp(long long a1, unsigned int a2)
{
long long v2; // rdx
unsigned int v3; // r14d
long long v4; // rsi
int v5; // eax
int v6; // r12d
int v7; // eax
bool v8; // al
unsigned long long v9; // rax
unsigned long long v10; // rcx
long long v11; // rcx
long long v12; // rdx
int v13; // eax
long long v14; // rax
bool v15; // zf
unsigned int *v16; // rax
const char *v17; // rax
if ( !*(_DWORD *)(a1 + 40) && (unsigned int)gz_init(a1) == -1 )
return (unsigned int)-1;
if ( *(_DWORD *)(a1 + 64) )
{
v2 = *(unsigned int *)(a1 + 136);
v3 = 0;
if ( (_DWORD)v2 )
{
v4 = *(_QWORD *)(a1 + 128);
while ( 1 )
{
if ( (unsigned int)v2 >= 0x40000000 )
v2 = 0x40000000LL;
v5 = write(*(unsigned int *)(a1 + 28), v4, v2);
if ( v5 < 0 )
break;
v4 = *(_QWORD *)(a1 + 128) + (v5 & 0x7FFFFFFF);
v2 = (unsigned int)(*(_DWORD *)(a1 + 136) - v5);
*(_DWORD *)(a1 + 136) = v2;
*(_QWORD *)(a1 + 128) = v4;
if ( !(_DWORD)v2 )
return v3;
}
goto LABEL_30;
}
return v3;
}
if ( *(_DWORD *)(a1 + 96) )
{
if ( !*(_DWORD *)(a1 + 136) )
return 0;
deflateReset(a1 + 128);
*(_DWORD *)(a1 + 96) = 0;
}
v6 = *(_DWORD *)(a1 + 160);
v7 = 0;
while ( v6 )
{
v8 = v7 == 1;
if ( a2 )
{
if ( v8 || a2 != 4 )
break;
}
LABEL_26:
v7 = deflate(a1 + 128, a2);
if ( v7 == -2 )
{
gz_error(a1, -2, "internal error: deflate stream corrupt");
return (unsigned int)-1;
}
v15 = v6 == *(_DWORD *)(a1 + 160);
v6 = *(_DWORD *)(a1 + 160);
if ( v15 )
{
v3 = 0;
if ( a2 == 4 )
*(_DWORD *)(a1 + 96) = 1;
return v3;
}
}
v9 = *(_QWORD *)(a1 + 8);
v10 = *(_QWORD *)(a1 + 152);
if ( v10 <= v9 )
{
LABEL_24:
if ( !v6 )
{
v6 = *(_DWORD *)(a1 + 40);
*(_DWORD *)(a1 + 160) = v6;
v14 = *(_QWORD *)(a1 + 56);
*(_QWORD *)(a1 + 152) = v14;
*(_QWORD *)(a1 + 8) = v14;
}
goto LABEL_26;
}
while ( 1 )
{
v11 = v10 - v9;
v12 = (unsigned int)v11;
if ( v11 >= 1073741825 )
v12 = 0x40000000LL;
v13 = write(*(unsigned int *)(a1 + 28), v9, v12);
if ( v13 < 0 )
break;
v9 = *(_QWORD *)(a1 + 8) + (v13 & 0x7FFFFFFF);
*(_QWORD *)(a1 + 8) = v9;
v10 = *(_QWORD *)(a1 + 152);
if ( v10 <= v9 )
{
v6 = *(_DWORD *)(a1 + 160);
goto LABEL_24;
}
}
LABEL_30:
v16 = (unsigned int *)__errno_location();
v17 = (const char *)strerror(*v16);
v3 = -1;
gz_error(a1, -1, v17);
return v3;
}
| gz_comp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,ESI
MOV RBX,RDI
CMP dword ptr [RDI + 0x28],0x0
JNZ 0x001087e5
MOV RDI,RBX
CALL 0x001086ca
CMP EAX,-0x1
JZ 0x00108976
LAB_001087e5:
CMP dword ptr [RBX + 0x40],0x0
JZ 0x00108848
MOV EDX,dword ptr [RBX + 0x88]
XOR R14D,R14D
TEST EDX,EDX
JZ 0x0010897c
MOV RSI,qword ptr [RBX + 0x80]
MOV EBP,0x40000000
LAB_00108808:
CMP EDX,EBP
CMOVNC EDX,EBP
MOV EDI,dword ptr [RBX + 0x1c]
CALL 0x001030e0
TEST EAX,EAX
JS 0x00108939
MOV ESI,EAX
AND ESI,0x7fffffff
ADD RSI,qword ptr [RBX + 0x80]
MOV EDX,dword ptr [RBX + 0x88]
SUB EDX,EAX
MOV dword ptr [RBX + 0x88],EDX
MOV qword ptr [RBX + 0x80],RSI
JNZ 0x00108808
JMP 0x0010897c
LAB_00108848:
LEA R14,[RBX + 0x80]
CMP dword ptr [RBX + 0x60],0x0
JZ 0x00108871
CMP dword ptr [RBX + 0x88],0x0
JZ 0x0010895d
MOV RDI,R14
CALL 0x00103120
MOV dword ptr [RBX + 0x60],0x0
LAB_00108871:
MOV R12D,dword ptr [RBX + 0xa0]
XOR EAX,EAX
MOV R15D,0x40000000
LAB_00108880:
TEST R12D,R12D
JZ 0x00108899
CMP EBP,0x4
SETNZ CL
CMP EAX,0x1
SETZ AL
TEST EBP,EBP
JZ 0x00108907
OR CL,AL
JZ 0x00108907
LAB_00108899:
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x98]
CMP RCX,RAX
JBE 0x001088e8
LAB_001088a9:
SUB RCX,RAX
CMP RCX,0x40000001
MOV EDX,ECX
CMOVGE RDX,R15
MOV EDI,dword ptr [RBX + 0x1c]
MOV RSI,RAX
CALL 0x001030e0
TEST EAX,EAX
JS 0x00108939
AND EAX,0x7fffffff
ADD RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV RCX,qword ptr [RBX + 0x98]
CMP RCX,RAX
JA 0x001088a9
MOV R12D,dword ptr [RBX + 0xa0]
LAB_001088e8:
TEST R12D,R12D
JNZ 0x00108907
MOV R12D,dword ptr [RBX + 0x28]
MOV dword ptr [RBX + 0xa0],R12D
MOV RAX,qword ptr [RBX + 0x38]
MOV qword ptr [RBX + 0x98],RAX
MOV qword ptr [RBX + 0x8],RAX
LAB_00108907:
MOV RDI,R14
MOV ESI,EBP
CALL 0x00103130
CMP EAX,-0x2
JZ 0x00108962
MOV ECX,dword ptr [RBX + 0xa0]
CMP R12D,ECX
MOV R12D,ECX
JNZ 0x00108880
XOR R14D,R14D
CMP EBP,0x4
JNZ 0x0010897c
MOV dword ptr [RBX + 0x60],0x1
JMP 0x0010897c
LAB_00108939:
CALL 0x00103070
MOV EDI,dword ptr [RAX]
CALL 0x001032d0
MOV R14D,0xffffffff
MOV RDI,RBX
MOV ESI,0xffffffff
MOV RDX,RAX
CALL 0x0010757b
JMP 0x0010897c
LAB_0010895d:
XOR R14D,R14D
JMP 0x0010897c
LAB_00108962:
LEA RDX,[0x11162e]
MOV RDI,RBX
MOV ESI,0xfffffffe
CALL 0x0010757b
LAB_00108976:
MOV R14D,0xffffffff
LAB_0010897c:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 gz_comp(long param_1,int param_2)
{
int iVar1;
int iVar2;
ssize_t sVar3;
int *piVar4;
char *pcVar5;
void *pvVar6;
uint uVar7;
size_t __n;
void *pvVar8;
int iVar9;
int8 uVar10;
if ((*(int *)(param_1 + 0x28) == 0) && (iVar1 = gz_init(param_1), iVar1 == -1)) {
LAB_00108976:
uVar10 = 0xffffffff;
}
else if (*(int *)(param_1 + 0x40) == 0) {
if (*(int *)(param_1 + 0x60) != 0) {
if (*(int *)(param_1 + 0x88) == 0) {
return 0;
}
deflateReset(param_1 + 0x80);
*(int4 *)(param_1 + 0x60) = 0;
}
iVar1 = *(int *)(param_1 + 0xa0);
iVar2 = 0;
do {
iVar9 = iVar1;
if (iVar1 == 0) {
LAB_00108899:
pvVar8 = *(void **)(param_1 + 8);
pvVar6 = *(void **)(param_1 + 0x98);
if (pvVar8 < pvVar6) {
do {
__n = (long)pvVar6 - (long)pvVar8 & 0xffffffff;
if (0x40000000 < (long)pvVar6 - (long)pvVar8) {
__n = 0x40000000;
}
sVar3 = write(*(int *)(param_1 + 0x1c),pvVar8,__n);
if ((int)(uint)sVar3 < 0) goto LAB_00108939;
pvVar8 = (void *)((ulong)((uint)sVar3 & 0x7fffffff) + *(long *)(param_1 + 8));
*(void **)(param_1 + 8) = pvVar8;
pvVar6 = *(void **)(param_1 + 0x98);
} while (pvVar8 < pvVar6);
iVar9 = *(int *)(param_1 + 0xa0);
}
if (iVar9 == 0) {
iVar9 = *(int *)(param_1 + 0x28);
*(int *)(param_1 + 0xa0) = iVar9;
*(int8 *)(param_1 + 0x98) = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x38);
}
}
else if ((param_2 != 0) && (param_2 != 4 || iVar2 == 1)) goto LAB_00108899;
iVar2 = deflate(param_1 + 0x80,param_2);
if (iVar2 == -2) {
gz_error(param_1,0xfffffffe,"internal error: deflate stream corrupt");
goto LAB_00108976;
}
iVar1 = *(int *)(param_1 + 0xa0);
} while (iVar9 != iVar1);
uVar10 = 0;
if (param_2 == 4) {
*(int4 *)(param_1 + 0x60) = 1;
uVar10 = 0;
}
}
else {
uVar7 = *(uint *)(param_1 + 0x88);
uVar10 = 0;
if (uVar7 != 0) {
pvVar8 = *(void **)(param_1 + 0x80);
do {
if (0x3fffffff < uVar7) {
uVar7 = 0x40000000;
}
sVar3 = write(*(int *)(param_1 + 0x1c),pvVar8,(ulong)uVar7);
uVar7 = (uint)sVar3;
if ((int)uVar7 < 0) {
LAB_00108939:
piVar4 = __errno_location();
pcVar5 = strerror(*piVar4);
gz_error(param_1,0xffffffff,pcVar5);
return 0xffffffff;
}
pvVar8 = (void *)((ulong)(uVar7 & 0x7fffffff) + *(long *)(param_1 + 0x80));
uVar7 = *(int *)(param_1 + 0x88) - uVar7;
*(uint *)(param_1 + 0x88) = uVar7;
*(void **)(param_1 + 0x80) = pvVar8;
} while (uVar7 != 0);
}
}
return uVar10;
}
| |
45,901 | blst_fp_from_uint32 | corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/exports.c | void blst_fp_from_uint32(vec384 ret, const unsigned int a[12])
{
if (sizeof(limb_t) == 8) {
int i;
for (i = 0; i < 6; i++)
ret[i] = a[2*i] | ((limb_t)a[2*i+1] << (32 & (8*sizeof(limb_t)-1)));
a = (const unsigned int *)ret;
}
mul_fp(ret, (const limb_t *)a, BLS12_381_RR);
} | O2 | c | blst_fp_from_uint32:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpq $0x6, %rax
je 0x5ab52
movq (%rsi,%rax,8), %rcx
movq %rcx, (%rdi,%rax,8)
incq %rax
jmp 0x5ab3f
leaq 0x253d7(%rip), %rdx # 0x7ff30
movq %rdi, %rsi
popq %rbp
jmp 0x5aad8
| blst_fp_from_uint32:
push rbp
mov rbp, rsp
xor eax, eax
loc_5AB3F:
cmp rax, 6
jz short loc_5AB52
mov rcx, [rsi+rax*8]
mov [rdi+rax*8], rcx
inc rax
jmp short loc_5AB3F
loc_5AB52:
lea rdx, BLS12_381_RR
mov rsi, rdi
pop rbp
jmp mul_fp
| long long blst_fp_from_uint32(long long a1, long long a2)
{
long long i; // rax
for ( i = 0LL; i != 6; ++i )
*(_QWORD *)(a1 + 8 * i) = *(_QWORD *)(a2 + 8 * i);
return mul_fp(a1, a1, (long long)&BLS12_381_RR);
}
| blst_fp_from_uint32:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_0015ab3f:
CMP RAX,0x6
JZ 0x0015ab52
MOV RCX,qword ptr [RSI + RAX*0x8]
MOV qword ptr [RDI + RAX*0x8],RCX
INC RAX
JMP 0x0015ab3f
LAB_0015ab52:
LEA RDX,[0x17ff30]
MOV RSI,RDI
POP RBP
JMP 0x0015aad8
|
void blst_fp_from_uint32(long param_1,long param_2)
{
long lVar1;
for (lVar1 = 0; lVar1 != 6; lVar1 = lVar1 + 1) {
*(int8 *)(param_1 + lVar1 * 8) = *(int8 *)(param_2 + lVar1 * 8);
}
mul_fp(param_1,param_1,BLS12_381_RR);
return;
}
| |
45,902 | JS_AddIntrinsicPromise | bluesky950520[P]quickjs/quickjs.c | void JS_AddIntrinsicPromise(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
JSValue obj1;
if (!JS_IsRegisteredClass(rt, JS_CLASS_PROMISE)) {
init_class_range(rt, js_async_class_def, JS_CLASS_PROMISE,
countof(js_async_class_def));
rt->class_array[JS_CLASS_PROMISE_RESOLVE_FUNCTION].call = js_promise_resolve_function_call;
rt->class_array[JS_CLASS_PROMISE_REJECT_FUNCTION].call = js_promise_resolve_function_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION].call = js_async_function_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION_RESOLVE].call = js_async_function_resolve_call;
rt->class_array[JS_CLASS_ASYNC_FUNCTION_REJECT].call = js_async_function_resolve_call;
rt->class_array[JS_CLASS_ASYNC_GENERATOR_FUNCTION].call = js_async_generator_function_call;
}
/* Promise */
ctx->class_proto[JS_CLASS_PROMISE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_PROMISE],
js_promise_proto_funcs,
countof(js_promise_proto_funcs));
obj1 = JS_NewCFunction2(ctx, js_promise_constructor, "Promise", 1,
JS_CFUNC_constructor, 0);
ctx->promise_ctor = js_dup(obj1);
JS_SetPropertyFunctionList(ctx, obj1,
js_promise_funcs,
countof(js_promise_funcs));
JS_NewGlobalCConstructor2(ctx, obj1, "Promise",
ctx->class_proto[JS_CLASS_PROMISE]);
/* Used to squelch a -Wcast-function-type warning. */
JSCFunctionType ft;
/* AsyncFunction */
ctx->class_proto[JS_CLASS_ASYNC_FUNCTION] = JS_NewObjectProto(ctx, ctx->function_proto);
ft.generic_magic = js_function_constructor;
obj1 = JS_NewCFunction3(ctx, ft.generic,
"AsyncFunction", 1,
JS_CFUNC_constructor_or_func_magic, JS_FUNC_ASYNC,
ctx->function_ctor);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_FUNCTION],
js_async_function_proto_funcs,
countof(js_async_function_proto_funcs));
JS_SetConstructor2(ctx, obj1, ctx->class_proto[JS_CLASS_ASYNC_FUNCTION],
0, JS_PROP_CONFIGURABLE);
JS_FreeValue(ctx, obj1);
/* AsyncIteratorPrototype */
ctx->async_iterator_proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->async_iterator_proto,
js_async_iterator_proto_funcs,
countof(js_async_iterator_proto_funcs));
/* AsyncFromSyncIteratorPrototype */
ctx->class_proto[JS_CLASS_ASYNC_FROM_SYNC_ITERATOR] =
JS_NewObjectProto(ctx, ctx->async_iterator_proto);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_ASYNC_FROM_SYNC_ITERATOR],
js_async_from_sync_iterator_proto_funcs,
countof(js_async_from_sync_iterator_proto_funcs));
/* AsyncGeneratorPrototype */
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR] =
JS_NewObjectProto(ctx, ctx->async_iterator_proto);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR],
js_async_generator_proto_funcs,
countof(js_async_generator_proto_funcs));
/* AsyncGeneratorFunction */
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION] =
JS_NewObjectProto(ctx, ctx->function_proto);
ft.generic_magic = js_function_constructor;
obj1 = JS_NewCFunction3(ctx, ft.generic,
"AsyncGeneratorFunction", 1,
JS_CFUNC_constructor_or_func_magic,
JS_FUNC_ASYNC_GENERATOR,
ctx->function_ctor);
JS_SetPropertyFunctionList(ctx,
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
js_async_generator_function_proto_funcs,
countof(js_async_generator_function_proto_funcs));
JS_SetConstructor2(ctx, ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
ctx->class_proto[JS_CLASS_ASYNC_GENERATOR],
JS_PROP_CONFIGURABLE, JS_PROP_CONFIGURABLE);
JS_SetConstructor2(ctx, obj1, ctx->class_proto[JS_CLASS_ASYNC_GENERATOR_FUNCTION],
0, JS_PROP_CONFIGURABLE);
JS_FreeValue(ctx, obj1);
} | O1 | c | JS_AddIntrinsicPromise:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpl $0x32, 0x78(%r14)
jb 0x1f29f
movq 0x80(%r14), %rax
cmpl $0x0, 0x7a8(%rax)
jne 0x1f305
leaq 0xa8a3a(%rip), %rsi # 0xc7ce0
movq %r14, %rdi
movl $0x31, %edx
movl $0x9, %ecx
callq 0x1ce49
movq 0x80(%r14), %rax
leaq 0x17197(%rip), %rcx # 0x3645d
movq %rcx, 0x7e8(%rax)
movq %rcx, 0x810(%rax)
leaq -0xec19(%rip), %rcx # 0x106c2
movq %rcx, 0x838(%rax)
leaq 0x17354(%rip), %rcx # 0x3663d
movq %rcx, 0x860(%rax)
movq %rcx, 0x888(%rax)
leaq -0xeaf4(%rip), %rcx # 0x1080a
movq %rcx, 0x8d8(%rax)
movq 0x40(%rbx), %r14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0x310(%r14)
movq %rdx, 0x318(%r14)
movq 0x40(%rbx), %rax
movq 0x310(%rax), %rsi
movq 0x318(%rax), %rdx
leaq 0xaa256(%rip), %rcx # 0xc95a0
movq %rbx, %rdi
movl $0x4, %r8d
callq 0x32c67
movups 0x48(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x173a7(%rip), %rsi # 0x3670e
leaq 0x7fa92(%rip), %rdx # 0x9ee00
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x21006
movq %rax, %r14
movq %rdx, %r15
movq %rax, 0x18(%rsp)
cmpl $-0x9, %r15d
jb 0x1f39c
movq 0x18(%rsp), %rax
incl (%rax)
movq %r14, 0x88(%rbx)
movq %r15, 0x90(%rbx)
leaq 0xaa26f(%rip), %rcx # 0xc9620
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x9, %r8d
callq 0x32c67
movq 0x40(%rbx), %rax
movq 0x310(%rax), %r8
movq 0x318(%rax), %r9
leaq 0x7fa22(%rip), %rcx # 0x9ee00
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x361aa
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0x340(%r14)
movq %rdx, 0x348(%r14)
movups 0x58(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x17556(%rip), %r14 # 0x36978
leaq 0x7f9df(%rip), %rdx # 0x9ee08
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x2, %r9d
callq 0x21006
movq %rax, %r15
movq %rdx, %r12
movq 0x40(%rbx), %rax
movq 0x340(%rax), %rsi
movq 0x348(%rax), %rdx
leaq 0xaa2dc(%rip), %rcx # 0xc9740
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x32c67
movq 0x40(%rbx), %rax
movq 0x340(%rax), %rcx
movq 0x348(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %r9d, %r9d
callq 0x3321f
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1d8c6
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0x160(%rbx)
movq %rdx, 0x168(%rbx)
leaq 0xa88eb(%rip), %rcx # 0xc7dc0
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %r8d
callq 0x32c67
movq 0x40(%rbx), %r15
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0x370(%r15)
movq %rdx, 0x378(%r15)
movq 0x40(%rbx), %rax
movq 0x370(%rax), %rsi
movq 0x378(%rax), %rdx
leaq 0xa88b4(%rip), %rcx # 0xc7de0
movq %rbx, %rdi
movl $0x3, %r8d
callq 0x32c67
movq 0x40(%rbx), %r15
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0x390(%r15)
movq %rdx, 0x398(%r15)
movq 0x40(%rbx), %rax
movq 0x390(%rax), %rsi
movq 0x398(%rax), %rdx
leaq 0xaa1e0(%rip), %rcx # 0xc9760
movq %rbx, %rdi
movl $0x4, %r8d
callq 0x32c67
movq 0x40(%rbx), %r15
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0x380(%r15)
movq %rdx, 0x388(%r15)
movups 0x58(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x7f852(%rip), %rdx # 0x9ee16
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x3, %r9d
callq 0x21006
movq %rax, %r14
movq %rdx, %r15
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rsi
movq 0x388(%rax), %rdx
leaq 0xaa1e1(%rip), %rcx # 0xc97e0
movq %rbx, %rdi
movl $0x1, %r8d
callq 0x32c67
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rsi
movq 0x388(%rax), %rdx
movq 0x390(%rax), %rcx
movq 0x398(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movl $0x1, %r9d
callq 0x3321f
movq 0x40(%rbx), %rax
movq 0x380(%rax), %rcx
movq 0x388(%rax), %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0x3321f
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1d8c6
| JS_AddIntrinsicPromise:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov rbx, rdi
mov r14, [rdi+18h]
cmp dword ptr [r14+78h], 32h ; '2'
jb short loc_1F29F
mov rax, [r14+80h]
cmp dword ptr [rax+7A8h], 0
jnz short loc_1F305
loc_1F29F:
lea rsi, js_async_class_def
mov rdi, r14
mov edx, 31h ; '1'
mov ecx, 9
call init_class_range
mov rax, [r14+80h]
lea rcx, js_promise_resolve_function_call
mov [rax+7E8h], rcx
mov [rax+810h], rcx
lea rcx, js_async_function_call
mov [rax+838h], rcx
lea rcx, js_async_function_resolve_call
mov [rax+860h], rcx
mov [rax+888h], rcx
lea rcx, js_async_generator_function_call
mov [rax+8D8h], rcx
loc_1F305:
mov r14, [rbx+40h]
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov ebp, 1
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+310h], rax
mov [r14+318h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+310h]
mov rdx, [rax+318h]
lea rcx, js_promise_proto_funcs
mov rdi, rbx
mov r8d, 4
call JS_SetPropertyFunctionList
movups xmm0, xmmword ptr [rbx+48h]
movups [rsp+48h+var_48], xmm0
lea rsi, js_promise_constructor
lea rdx, aPromise; "Promise"
mov rdi, rbx
mov ecx, 1
mov r8d, 2
xor r9d, r9d
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov [rsp+48h+var_30], rax
cmp r15d, 0FFFFFFF7h
jb short loc_1F39C
mov rax, [rsp+48h+var_30]
inc dword ptr [rax]
loc_1F39C:
mov [rbx+88h], r14
mov [rbx+90h], r15
lea rcx, js_promise_funcs
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r8d, 9
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+310h]
mov r9, [rax+318h]
lea rcx, aPromise; "Promise"
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_NewGlobalCConstructor2
mov r14, [rbx+40h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+340h], rax
mov [r14+348h], rdx
movups xmm0, xmmword ptr [rbx+58h]
movups [rsp+48h+var_48], xmm0
lea r14, js_function_constructor
lea rdx, aAsyncfunction; "AsyncFunction"
mov rdi, rbx
mov rsi, r14
mov ecx, 1
mov r8d, 5
mov r9d, 2
call JS_NewCFunction3
mov r15, rax
mov r12, rdx
mov rax, [rbx+40h]
mov rsi, [rax+340h]
mov rdx, [rax+348h]
lea rcx, js_async_function_proto_funcs
mov rdi, rbx
mov r8d, 1
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov rcx, [rax+340h]
mov r8, [rax+348h]
mov dword ptr [rsp+48h+var_48], ebp
mov rdi, rbx
mov rsi, r15
mov rdx, r12
xor r9d, r9d
call JS_SetConstructor2
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
mov rax, [rbx+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [rbx+160h], rax
mov [rbx+168h], rdx
lea rcx, js_async_iterator_proto_funcs
mov rdi, rbx
mov rsi, rax
mov r8d, 1
call JS_SetPropertyFunctionList
mov r15, [rbx+40h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r15+370h], rax
mov [r15+378h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+370h]
mov rdx, [rax+378h]
lea rcx, js_async_from_sync_iterator_proto_funcs
mov rdi, rbx
mov r8d, 3
call JS_SetPropertyFunctionList
mov r15, [rbx+40h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r15+390h], rax
mov [r15+398h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+390h]
mov rdx, [rax+398h]
lea rcx, js_async_generator_proto_funcs
mov rdi, rbx
mov r8d, 4
call JS_SetPropertyFunctionList
mov r15, [rbx+40h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov [r15+380h], rax
mov [r15+388h], rdx
movups xmm0, xmmword ptr [rbx+58h]
movups [rsp+48h+var_48], xmm0
lea rdx, aAsyncgenerator; "AsyncGeneratorFunction"
mov rdi, rbx
mov rsi, r14
mov ecx, 1
mov r8d, 5
mov r9d, 3
call JS_NewCFunction3
mov r14, rax
mov r15, rdx
mov rax, [rbx+40h]
mov rsi, [rax+380h]
mov rdx, [rax+388h]
lea rcx, js_async_generator_function_proto_funcs
mov rdi, rbx
mov r8d, 1
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov rsi, [rax+380h]
mov rdx, [rax+388h]
mov rcx, [rax+390h]
mov r8, [rax+398h]
mov dword ptr [rsp+48h+var_48], ebp
mov rdi, rbx
mov r9d, 1
call JS_SetConstructor2
mov rax, [rbx+40h]
mov rcx, [rax+380h]
mov r8, [rax+388h]
mov dword ptr [rsp+48h+var_48], ebp
mov rdi, rbx
mov rsi, r14
mov rdx, r15
xor r9d, r9d
call JS_SetConstructor2
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp JS_FreeValueRT
| long long JS_AddIntrinsicPromise(long long *a1)
{
long long v1; // r14
_QWORD *v2; // rax
_QWORD *v3; // r14
long long v4; // rdx
long long v5; // rdx
_DWORD *v6; // r14
long long v7; // r15
long long v8; // r14
long long v9; // rdx
_DWORD *v10; // r15
long long v11; // rdx
long long v12; // r12
long long v13; // rax
long long v14; // rdx
long long v15; // r15
long long v16; // rdx
long long v17; // r15
long long v18; // rdx
long long v19; // r15
long long v20; // rdx
_DWORD *v21; // r14
long long v22; // rdx
long long v23; // r15
v1 = a1[3];
if ( *(_DWORD *)(v1 + 120) < 0x32u || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 1960LL) )
{
init_class_range(a1[3], (long long)&js_async_class_def, 0x31u, 9);
v2 = *(_QWORD **)(v1 + 128);
v2[253] = js_promise_resolve_function_call;
v2[258] = js_promise_resolve_function_call;
v2[263] = js_async_function_call;
v2[268] = js_async_function_resolve_call;
v2[273] = js_async_function_resolve_call;
v2[283] = js_async_generator_function_call;
}
v3 = (_QWORD *)a1[8];
v3[98] = JS_NewObjectProtoClass(a1, v3[2], v3[3], 1LL);
v3[99] = v4;
JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 784), *(_QWORD *)(a1[8] + 792), &js_promise_proto_funcs, 4LL);
v6 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_promise_constructor,
(unsigned int)"Promise",
1,
2,
0,
a1[9],
a1[10]);
v7 = v5;
if ( (unsigned int)v5 >= 0xFFFFFFF7 )
++*v6;
a1[17] = (long long)v6;
a1[18] = v5;
JS_SetPropertyFunctionList(a1, v6, v5, &js_promise_funcs, 9LL);
JS_NewGlobalCConstructor2(a1, v6, v7, "Promise", *(_QWORD *)(a1[8] + 784), *(_QWORD *)(a1[8] + 792));
v8 = a1[8];
*(_QWORD *)(v8 + 832) = JS_NewObjectProtoClass(a1, a1[9], a1[10], 1LL);
*(_QWORD *)(v8 + 840) = v9;
v10 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_function_constructor,
(unsigned int)"AsyncFunction",
1,
5,
2,
a1[11],
a1[12]);
v12 = v11;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 832),
*(_QWORD *)(a1[8] + 840),
&js_async_function_proto_funcs,
1LL);
JS_SetConstructor2(a1, v10, v12, *(_QWORD *)(a1[8] + 832), *(_QWORD *)(a1[8] + 840), 0LL, 1);
JS_FreeValueRT(a1[3], v10, v12);
v13 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1[8] + 16), *(_QWORD *)(a1[8] + 24), 1LL);
a1[44] = v13;
a1[45] = v14;
JS_SetPropertyFunctionList(a1, v13, v14, &js_async_iterator_proto_funcs, 1LL);
v15 = a1[8];
*(_QWORD *)(v15 + 880) = JS_NewObjectProtoClass(a1, a1[44], a1[45], 1LL);
*(_QWORD *)(v15 + 888) = v16;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 880),
*(_QWORD *)(a1[8] + 888),
&js_async_from_sync_iterator_proto_funcs,
3LL);
v17 = a1[8];
*(_QWORD *)(v17 + 912) = JS_NewObjectProtoClass(a1, a1[44], a1[45], 1LL);
*(_QWORD *)(v17 + 920) = v18;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 912),
*(_QWORD *)(a1[8] + 920),
&js_async_generator_proto_funcs,
4LL);
v19 = a1[8];
*(_QWORD *)(v19 + 896) = JS_NewObjectProtoClass(a1, a1[9], a1[10], 1LL);
*(_QWORD *)(v19 + 904) = v20;
v21 = (_DWORD *)JS_NewCFunction3(
(_DWORD)a1,
(unsigned int)js_function_constructor,
(unsigned int)"AsyncGeneratorFunction",
1,
5,
3,
a1[11],
a1[12]);
v23 = v22;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(a1[8] + 896),
*(_QWORD *)(a1[8] + 904),
&js_async_generator_function_proto_funcs,
1LL);
JS_SetConstructor2(
a1,
*(_QWORD *)(a1[8] + 896),
*(_QWORD *)(a1[8] + 904),
*(_QWORD *)(a1[8] + 912),
*(_QWORD *)(a1[8] + 920),
1LL,
1);
JS_SetConstructor2(a1, v21, v23, *(_QWORD *)(a1[8] + 896), *(_QWORD *)(a1[8] + 904), 0LL, 1);
return JS_FreeValueRT(a1[3], v21, v23);
}
| JS_AddIntrinsicPromise:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
CMP dword ptr [R14 + 0x78],0x32
JC 0x0011f29f
MOV RAX,qword ptr [R14 + 0x80]
CMP dword ptr [RAX + 0x7a8],0x0
JNZ 0x0011f305
LAB_0011f29f:
LEA RSI,[0x1c7ce0]
MOV RDI,R14
MOV EDX,0x31
MOV ECX,0x9
CALL 0x0011ce49
MOV RAX,qword ptr [R14 + 0x80]
LEA RCX,[0x13645d]
MOV qword ptr [RAX + 0x7e8],RCX
MOV qword ptr [RAX + 0x810],RCX
LEA RCX,[0x1106c2]
MOV qword ptr [RAX + 0x838],RCX
LEA RCX,[0x13663d]
MOV qword ptr [RAX + 0x860],RCX
MOV qword ptr [RAX + 0x888],RCX
LEA RCX,[0x11080a]
MOV qword ptr [RAX + 0x8d8],RCX
LAB_0011f305:
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV EBP,0x1
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [R14 + 0x310],RAX
MOV qword ptr [R14 + 0x318],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x310]
MOV RDX,qword ptr [RAX + 0x318]
LEA RCX,[0x1c95a0]
MOV RDI,RBX
MOV R8D,0x4
CALL 0x00132c67
MOVUPS XMM0,xmmword ptr [RBX + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x13670e]
LEA RDX,[0x19ee00]
MOV RDI,RBX
MOV ECX,0x1
MOV R8D,0x2
XOR R9D,R9D
CALL 0x00121006
MOV R14,RAX
MOV R15,RDX
MOV qword ptr [RSP + 0x18],RAX
CMP R15D,-0x9
JC 0x0011f39c
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_0011f39c:
MOV qword ptr [RBX + 0x88],R14
MOV qword ptr [RBX + 0x90],R15
LEA RCX,[0x1c9620]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV R8D,0x9
CALL 0x00132c67
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0x310]
MOV R9,qword ptr [RAX + 0x318]
LEA RCX,[0x19ee00]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x001361aa
MOV R14,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [R14 + 0x340],RAX
MOV qword ptr [R14 + 0x348],RDX
MOVUPS XMM0,xmmword ptr [RBX + 0x58]
MOVUPS xmmword ptr [RSP],XMM0
LEA R14,[0x136978]
LEA RDX,[0x19ee08]
MOV RDI,RBX
MOV RSI,R14
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x2
CALL 0x00121006
MOV R15,RAX
MOV R12,RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x340]
MOV RDX,qword ptr [RAX + 0x348]
LEA RCX,[0x1c9740]
MOV RDI,RBX
MOV R8D,0x1
CALL 0x00132c67
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RAX + 0x340]
MOV R8,qword ptr [RAX + 0x348]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
XOR R9D,R9D
CALL 0x0013321f
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011d8c6
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [RBX + 0x160],RAX
MOV qword ptr [RBX + 0x168],RDX
LEA RCX,[0x1c7dc0]
MOV RDI,RBX
MOV RSI,RAX
MOV R8D,0x1
CALL 0x00132c67
MOV R15,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [R15 + 0x370],RAX
MOV qword ptr [R15 + 0x378],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x370]
MOV RDX,qword ptr [RAX + 0x378]
LEA RCX,[0x1c7de0]
MOV RDI,RBX
MOV R8D,0x3
CALL 0x00132c67
MOV R15,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x160]
MOV RDX,qword ptr [RBX + 0x168]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [R15 + 0x390],RAX
MOV qword ptr [R15 + 0x398],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x390]
MOV RDX,qword ptr [RAX + 0x398]
LEA RCX,[0x1c9760]
MOV RDI,RBX
MOV R8D,0x4
CALL 0x00132c67
MOV R15,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [R15 + 0x380],RAX
MOV qword ptr [R15 + 0x388],RDX
MOVUPS XMM0,xmmword ptr [RBX + 0x58]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[0x19ee16]
MOV RDI,RBX
MOV RSI,R14
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x3
CALL 0x00121006
MOV R14,RAX
MOV R15,RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x380]
MOV RDX,qword ptr [RAX + 0x388]
LEA RCX,[0x1c97e0]
MOV RDI,RBX
MOV R8D,0x1
CALL 0x00132c67
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x380]
MOV RDX,qword ptr [RAX + 0x388]
MOV RCX,qword ptr [RAX + 0x390]
MOV R8,qword ptr [RAX + 0x398]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV R9D,0x1
CALL 0x0013321f
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RAX + 0x380]
MOV R8,qword ptr [RAX + 0x388]
MOV dword ptr [RSP],EBP
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
XOR R9D,R9D
CALL 0x0013321f
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011d8c6
|
void JS_AddIntrinsicPromise(long param_1)
{
long lVar1;
int *piVar2;
int1 auVar3 [16];
lVar1 = *(long *)(param_1 + 0x18);
if ((*(uint *)(lVar1 + 0x78) < 0x32) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x7a8) == 0)) {
init_class_range(lVar1,js_async_class_def,0x31,9);
lVar1 = *(long *)(lVar1 + 0x80);
*(code **)(lVar1 + 0x7e8) = js_promise_resolve_function_call;
*(code **)(lVar1 + 0x810) = js_promise_resolve_function_call;
*(code **)(lVar1 + 0x838) = js_async_function_call;
*(code **)(lVar1 + 0x860) = js_async_function_resolve_call;
*(code **)(lVar1 + 0x888) = js_async_function_resolve_call;
*(code **)(lVar1 + 0x8d8) = js_async_generator_function_call;
}
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),1);
*(int1 (*) [16])(lVar1 + 0x310) = auVar3;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x310),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x318),js_promise_proto_funcs,4);
auVar3 = JS_NewCFunction3(param_1,js_promise_constructor,"Promise",1,2,0,
*(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50));
piVar2 = auVar3._0_8_;
if (0xfffffff6 < auVar3._8_4_) {
*piVar2 = *piVar2 + 1;
}
*(int1 (*) [16])(param_1 + 0x88) = auVar3;
JS_SetPropertyFunctionList(param_1,piVar2,auVar3._8_8_,js_promise_funcs,9);
JS_NewGlobalCConstructor2
(param_1,piVar2,auVar3._8_8_,"Promise",
*(int8 *)(*(long *)(param_1 + 0x40) + 0x310),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x318));
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),1);
*(int1 (*) [16])(lVar1 + 0x340) = auVar3;
auVar3 = JS_NewCFunction3(param_1,js_function_constructor,"AsyncFunction",1,5,2,
*(int4 *)(param_1 + 0x58),*(int4 *)(param_1 + 0x60));
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x340),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x348),js_async_function_proto_funcs,1);
JS_SetConstructor2(param_1,auVar3._0_8_,auVar3._8_8_,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x340),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x348),0,1);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar3._0_8_,auVar3._8_8_);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1);
*(int1 (*) [16])(param_1 + 0x160) = auVar3;
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_async_iterator_proto_funcs,1);
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x160),*(int8 *)(param_1 + 0x168),1);
*(int1 (*) [16])(lVar1 + 0x370) = auVar3;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x370),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x378),
js_async_from_sync_iterator_proto_funcs,3);
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x160),*(int8 *)(param_1 + 0x168),1);
*(int1 (*) [16])(lVar1 + 0x390) = auVar3;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x390),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x398),js_async_generator_proto_funcs,4);
lVar1 = *(long *)(param_1 + 0x40);
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),1);
*(int1 (*) [16])(lVar1 + 0x380) = auVar3;
auVar3 = JS_NewCFunction3(param_1,js_function_constructor,"AsyncGeneratorFunction",1,5,3,
*(int4 *)(param_1 + 0x58),*(int4 *)(param_1 + 0x60));
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x380),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x388),
js_async_generator_function_proto_funcs,1);
lVar1 = *(long *)(param_1 + 0x40);
JS_SetConstructor2(param_1,*(int8 *)(lVar1 + 0x380),*(int8 *)(lVar1 + 0x388),
*(int8 *)(lVar1 + 0x390),*(int8 *)(lVar1 + 0x398),1,1);
JS_SetConstructor2(param_1,auVar3._0_8_,auVar3._8_8_,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x380),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x388),0,1);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar3._0_8_,auVar3._8_8_);
return;
}
| |
45,903 | nglog::LogMessage::Init(char const*, int, nglog::LogSeverity, void (nglog::LogMessage::*)()) | ng-log[P]ng-log/src/logging.cc | void LogMessage::Init(const char* file, int line, LogSeverity severity,
void (LogMessage::*send_method)()) {
allocated_ = nullptr;
if (severity != NGLOG_FATAL || !exit_on_dfatal) {
#ifdef NGLOG_THREAD_LOCAL_STORAGE
// No need for locking, because this is thread local.
if (thread_data_available) {
thread_data_available = false;
data_ = new (&thread_msg_data) internal::LogMessageData;
} else {
allocated_ = new internal::LogMessageData();
data_ = allocated_;
}
#else // !defined(NGLOG_THREAD_LOCAL_STORAGE)
allocated_ = new internal::LogMessageData();
data_ = allocated_;
#endif // defined(NGLOG_THREAD_LOCAL_STORAGE)
data_->first_fatal_ = false;
} else {
std::lock_guard<std::mutex> l{fatal_msg_lock};
if (fatal_msg_exclusive) {
fatal_msg_exclusive = false;
data_ = &fatal_msg_data_exclusive;
data_->first_fatal_ = true;
} else {
data_ = &fatal_msg_data_shared;
data_->first_fatal_ = false;
}
}
data_->preserved_errno_ = errno;
data_->severity_ = severity;
data_->line_ = line;
data_->send_method_ = send_method;
data_->sink_ = nullptr;
data_->outvec_ = nullptr;
const auto now = std::chrono::system_clock::now();
time_ = LogMessageTime(now);
data_->num_chars_to_log_ = 0;
data_->num_chars_to_syslog_ = 0;
data_->basename_ = const_basename(file);
data_->fullname_ = file;
data_->has_been_flushed_ = false;
data_->thread_id_ = std::this_thread::get_id();
// If specified, prepend a prefix to each line. For example:
// I20201018 160715 f5d4fbb0 logging.cc:1153]
// (log level, GMT year, month, date, time, thread_id, file basename, line)
// We exclude the thread_id for the default thread.
if (FLAGS_log_prefix && (line != kNoLogPrefix)) {
std::ios saved_fmt(nullptr);
saved_fmt.copyfmt(stream());
stream().fill('0');
if (g_prefix_formatter == nullptr) {
stream() << LogSeverityNames[severity][0];
if (FLAGS_log_year_in_prefix) {
stream() << setw(4) << 1900 + time_.year();
}
stream() << setw(2) << 1 + time_.month() << setw(2) << time_.day() << ' '
<< setw(2) << time_.hour() << ':' << setw(2) << time_.min()
<< ':' << setw(2) << time_.sec() << "." << setw(6)
<< time_.usec() << ' ' << setfill(' ') << setw(5)
<< data_->thread_id_ << setfill('0') << ' ' << data_->basename_
<< ':' << data_->line_ << "] ";
} else {
(*g_prefix_formatter)(stream(), *this);
stream() << " ";
}
stream().copyfmt(saved_fmt);
}
data_->num_prefix_chars_ = data_->stream_.pcount();
if (!FLAGS_log_backtrace_at.empty()) {
char fileline[128];
std::snprintf(fileline, sizeof(fileline), "%s:%d", data_->basename_, line);
#ifdef HAVE_STACKTRACE
if (FLAGS_log_backtrace_at == fileline) {
string stacktrace = GetStackTrace();
stream() << " (stacktrace:\n" << stacktrace << ") ";
}
#endif
}
} | O2 | cpp | nglog::LogMessage::Init(char const*, int, nglog::LogSeverity, void (nglog::LogMessage::*)()):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %r9, %r14
movq %r8, %r13
movl %ecx, %r15d
movl %edx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
andq $0x0, (%rdi)
cmpl $0x3, %ecx
jne 0x9245
cmpb $0x0, 0x2439e(%rip) # 0x2d5bc
je 0x9245
leaq 0x33a69(%rip), %rdi # 0x3cc90
callq 0x1aa48
cmpb $0x0, 0x3390d(%rip) # 0x3cb40
je 0x926a
movb $0x0, 0x338f5(%rip) # 0x3cb31
leaq 0x2c20d(%rip), %rax # 0x35450
jmp 0x927f
movl $0x76f0, %edi # imm = 0x76F0
callq 0x75a0
movq %rax, %rbp
movq %rax, %rdi
callq 0x915e
movq %rbp, (%rbx)
movq %rbp, 0x8(%rbx)
movb $0x0, 0x76e1(%rbp)
jmp 0x9293
movb $0x1, %al
movb %al, 0x338ce(%rip) # 0x3cb40
movb %al, 0x2c1c9(%rip) # 0x35441
leaq 0x24ae1(%rip), %rax # 0x2dd60
movq %rax, 0x8(%rbx)
leaq 0x33a06(%rip), %rdi # 0x3cc90
callq 0x7450
movq 0x8(%rbx), %rbp
callq 0x7050
movl (%rax), %eax
movl %eax, (%rbp)
movl %r15d, 0xc(%rsp)
movl %r15d, 0x7698(%rbp)
movl 0x8(%rsp), %r15d
movl %r15d, 0x769c(%rbp)
movq %r13, 0x76a0(%rbp)
movq %r14, 0x76a8(%rbp)
andq $0x0, 0x76b0(%rbp)
movq 0x8(%rbx), %rax
andq $0x0, 0x76b0(%rax)
callq 0x7070
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0xc3a0
leaq 0x10(%rbx), %r14
pushq $0xa
popq %rcx
movq %r14, %rdi
movq %r13, %rsi
rep movsq (%rsi), %es:(%rdi)
movq 0x8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x76c0(%rax)
movq %r12, %rdi
callq 0x1c755
movq 0x8(%rbx), %r13
movq %rax, 0x76d0(%r13)
movq %r12, 0x76d8(%r13)
movb $0x0, 0x76e0(%r13)
callq 0x74e0
movq %rax, 0x76e8(%r13)
cmpl $-0x1, %r15d
je 0x95dd
leaq 0x246da(%rip), %rax # 0x2da23
cmpb $0x0, (%rax)
je 0x95dd
leaq 0x30(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x7a20
movq 0x8(%rbx), %rsi
movq 0x7538(%rsi), %rax
addq $0x7538, %rsi # imm = 0x7538
addq -0x18(%rax), %rsi
movq %r12, %rdi
callq 0x7250
movq 0x8(%rbx), %r12
movq 0x7538(%r12), %rax
addq $0x7538, %r12 # imm = 0x7538
addq -0x18(%rax), %r12
movq %r12, %rdi
callq 0x72b0
movb $0x30, 0xe0(%r12)
movq 0x247a2(%rip), %rax # 0x2db50
testq %rax, %rax
movl 0xc(%rsp), %ecx
je 0x93e4
cmpl $0x0, (%rax)
jne 0x93cf
movl $0x7538, %edi # imm = 0x7538
addq 0x8(%rbx), %rdi
movq 0x10(%rax), %rdx
movq %rbx, %rsi
callq *0x8(%rax)
movl $0x7538, %edi # imm = 0x7538
addq 0x8(%rbx), %rdi
leaq 0x15870(%rip), %rsi # 0x1ec4f
jmp 0x95aa
movl $0x7538, %edi # imm = 0x7538
addq 0x8(%rbx), %rdi
movl %ecx, %eax
leaq 0x2332a(%rip), %rcx # 0x2c720
movq (%rcx,%rax,8), %rax
movsbl (%rax), %esi
callq 0x76a0
leaq 0x2461c(%rip), %rax # 0x2da25
cmpb $0x1, (%rax)
jne 0x943d
movq 0x8(%rbx), %rax
leaq 0x7538(%rax), %rdi
movq 0x7538(%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x4, 0x7548(%rax,%rcx)
movl $0x76c, %esi # imm = 0x76C
addl 0x24(%rbx), %esi
callq 0x79e0
movq 0x8(%rbx), %rax
leaq 0x7538(%rax), %rdi
movq 0x7538(%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x7548(%rax,%rcx)
movl 0x20(%rbx), %esi
incl %esi
callq 0x79e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x1c(%rbx), %esi
movq %rax, %rdi
callq 0x79e0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x76a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x18(%rbx), %esi
movq %rax, %rdi
callq 0x79e0
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x76a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x79e0
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x76a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl (%r14), %esi
movq %rax, %rdi
callq 0x79e0
leaq 0x158a4(%rip), %rsi # 0x1eda1
movq %rax, %rdi
callq 0x7580
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movq 0x50(%rbx), %rsi
movq %rax, %rdi
callq 0x7550
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x76a0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x7910
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x5, 0x10(%rax,%rcx)
movq 0x8(%rbx), %rcx
movq 0x76e8(%rcx), %rsi
movq %rax, %rdi
callq 0xdc36
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x7910
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x76a0
movq 0x8(%rbx), %rcx
movq 0x76d0(%rcx), %rsi
movq %rax, %rdi
callq 0x7580
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x76a0
movq 0x8(%rbx), %rcx
movl 0x769c(%rcx), %esi
movq %rax, %rdi
callq 0x79e0
movq %rax, %rdi
leaq 0x14536(%rip), %rsi # 0x1dae0
callq 0x7580
movq 0x8(%rbx), %rdi
movq 0x7538(%rdi), %rax
addq $0x7538, %rdi # imm = 0x7538
addq -0x18(%rax), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7250
leaq 0x30(%rsp), %rdi
callq 0x7190
movq 0x8(%rbx), %r13
movq 0x7568(%r13), %rax
subq 0x7560(%r13), %rax
movq %rax, 0x76b8(%r13)
leaq 0x23107(%rip), %rax # 0x2c700
movq (%rax), %r14
cmpq $0x0, 0x8(%r14)
je 0x967e
movq 0x76d0(%r13), %rcx
leaq 0x13f10(%rip), %rdx # 0x1d521
leaq 0x30(%rsp), %r15
movl $0x80, %esi
movq %r15, %rdi
movl 0x8(%rsp), %r8d
xorl %eax, %eax
callq 0x7940
movq %r14, %rdi
movq %r15, %rsi
callq 0xdc4b
testb %al, %al
je 0x967e
leaq 0x10(%rsp), %rdi
callq 0x1c91e
movl $0x7538, %edi # imm = 0x7538
addq 0x8(%rbx), %rdi
leaq 0x13ed4(%rip), %rsi # 0x1d527
callq 0x7580
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x74d0
leaq 0x1583d(%rip), %rsi # 0x1eea9
movq %rax, %rdi
callq 0x7580
leaq 0x10(%rsp), %rdi
callq 0x7b38
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x76f0, %esi # imm = 0x76F0
movq %rbp, %rdi
callq 0x75b0
jmp 0x96be
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7b38
jmp 0x96be
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x7190
movq %rbx, %rdi
callq 0x7a00
| _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov r14, r9
mov r13, r8
mov r15d, ecx
mov [rsp+168h+var_160], edx
mov r12, rsi
mov rbx, rdi
and qword ptr [rdi], 0
cmp ecx, 3
jnz short loc_9245
cmp cs:_ZN5nglogL14exit_on_dfatalE, 0; nglog::exit_on_dfatal
jz short loc_9245
lea rdi, _ZN5nglogL14fatal_msg_lockE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp cs:_ZN5nglogL19fatal_msg_exclusiveE, 0; nglog::fatal_msg_exclusive
jz short loc_926A
mov cs:byte_3CB31, 0
lea rax, _ZN5nglogL21fatal_msg_data_sharedE; nglog::fatal_msg_data_shared
jmp short loc_927F
loc_9245:
mov edi, 76F0h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbp, rax
mov rdi, rax; this
call _ZN5nglog8internal14LogMessageDataC2Ev; nglog::internal::LogMessageData::LogMessageData(void)
mov [rbx], rbp
mov [rbx+8], rbp
mov byte ptr [rbp+76E1h], 0
jmp short loc_9293
loc_926A:
mov al, 1
mov cs:_ZN5nglogL19fatal_msg_exclusiveE, al; nglog::fatal_msg_exclusive
mov cs:byte_35441, al
lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive
loc_927F:
mov [rbx+8], rax
lea rdi, _ZN5nglogL14fatal_msg_lockE; this
call _pthread_mutex_unlock
mov rbp, [rbx+8]
loc_9293:
call ___errno_location
mov eax, [rax]
mov [rbp+0], eax
mov [rsp+168h+var_15C], r15d
mov [rbp+7698h], r15d
mov r15d, [rsp+168h+var_160]
mov [rbp+769Ch], r15d
mov [rbp+76A0h], r13
mov [rbp+76A8h], r14
and qword ptr [rbp+76B0h], 0
mov rax, [rbx+8]
and qword ptr [rax+76B0h], 0
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
lea r13, [rsp+168h+var_138]
mov rdi, r13
mov rsi, rax
call _ZN5nglog14LogMessageTimeC2ENSt6chrono10time_pointINS1_3_V212system_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE; nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>)
lea r14, [rbx+10h]
push 0Ah
pop rcx
mov rdi, r14
mov rsi, r13; char *
rep movsq
mov rax, [rbx+8]
xorps xmm0, xmm0
movups xmmword ptr [rax+76C0h], xmm0
mov rdi, r12; this
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov r13, [rbx+8]
mov [r13+76D0h], rax
mov [r13+76D8h], r12
mov byte ptr [r13+76E0h], 0
call _pthread_self
mov [r13+76E8h], rax
cmp r15d, 0FFFFFFFFh
jz loc_95DD
lea rax, _ZN3fLB16FLAGS_log_prefixE; fLB::FLAGS_log_prefix
cmp byte ptr [rax], 0
jz loc_95DD
lea r12, [rsp+168h+var_138]
mov rdi, r12
xor esi, esi
call __ZNSt9basic_iosIcSt11char_traitsIcEEC2EPSt15basic_streambufIcS1_E; std::ios::basic_ios(std::streambuf *)
mov rsi, [rbx+8]
mov rax, [rsi+7538h]
add rsi, 7538h
add rsi, [rax-18h]
mov rdi, r12
call __ZNSt9basic_iosIcSt11char_traitsIcEE7copyfmtERKS2_; std::ios::copyfmt(std::ios const&)
mov r12, [rbx+8]
mov rax, [r12+7538h]
add r12, 7538h
add r12, [rax-18h]
mov rdi, r12
call __ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv; std::ios::fill(void)
mov byte ptr [r12+0E0h], 30h ; '0'
mov rax, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; nglog::`anonymous namespace'::g_prefix_formatter
test rax, rax
mov ecx, [rsp+168h+var_15C]
jz short loc_93E4
cmp dword ptr [rax], 0
jnz short loc_93CF
mov edi, 7538h
add rdi, [rbx+8]
mov rdx, [rax+10h]
mov rsi, rbx
call qword ptr [rax+8]
loc_93CF:
mov edi, 7538h
add rdi, [rbx+8]
lea rsi, asc_1EC4C+3; " "
jmp loc_95AA
loc_93E4:
mov edi, 7538h
add rdi, [rbx+8]
mov eax, ecx
lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames
mov rax, [rcx+rax*8]
movsx esi, byte ptr [rax]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
lea rax, _ZN3fLB24FLAGS_log_year_in_prefixE; fLB::FLAGS_log_year_in_prefix
cmp byte ptr [rax], 1
jnz short loc_943D
mov rax, [rbx+8]
lea rdi, [rax+7538h]
mov rcx, [rax+7538h]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+7548h], 4
mov esi, 76Ch
add esi, [rbx+24h]
call __ZNSolsEi; std::ostream::operator<<(int)
loc_943D:
mov rax, [rbx+8]
lea rdi, [rax+7538h]
mov rcx, [rax+7538h]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+7548h], 2
mov esi, [rbx+20h]
inc esi
call __ZNSolsEi; std::ostream::operator<<(int)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [rbx+1Ch]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
push 20h ; ' '
pop rsi
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [rbx+18h]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
push 3Ah ; ':'
pop rsi
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [rbx+14h]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
push 3Ah ; ':'
pop rsi
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r14]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aSectionNameSIs+50h; "."
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 6
mov rsi, [rbx+50h]
mov rdi, rax
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
push 20h ; ' '
pop rsi
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
push 20h ; ' '
pop rsi
mov rdi, rax
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 5
mov rcx, [rbx+8]
mov rsi, [rcx+76E8h]
mov rdi, rax
call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_NSt6thread2idE; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::thread::id)
push 30h ; '0'
pop rsi
mov rdi, rax
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>)
push 20h ; ' '
pop rsi
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rcx, [rbx+8]
mov rsi, [rcx+76D0h]
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
push 3Ah ; ':'
pop rsi
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rcx, [rbx+8]
mov esi, [rcx+769Ch]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
mov rdi, rax
lea rsi, aLog_0+4; "] "
loc_95AA:
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbx+8]
mov rax, [rdi+7538h]
add rdi, 7538h
add rdi, [rax-18h]
lea rsi, [rsp+168h+var_138]
call __ZNSt9basic_iosIcSt11char_traitsIcEE7copyfmtERKS2_; std::ios::copyfmt(std::ios const&)
lea rdi, [rsp+168h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov r13, [rbx+8]
loc_95DD:
mov rax, [r13+7568h]
sub rax, [r13+7560h]
mov [r13+76B8h], rax
lea rax, _ZN3fLS22FLAGS_log_backtrace_atB5cxx11E; fLS::FLAGS_log_backtrace_at
mov r14, [rax]
cmp qword ptr [r14+8], 0
jz short loc_967E
mov rcx, [r13+76D0h]
lea rdx, aSD; "%s:%d"
lea r15, [rsp+168h+var_138]
mov esi, 80h
mov rdi, r15
mov r8d, [rsp+168h+var_160]
xor eax, eax
call _snprintf
mov rdi, r14
mov rsi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_967E
lea rdi, [rsp+168h+var_158]; int
call _ZN5nglog13GetStackTraceB5cxx11Ev; nglog::GetStackTrace(void)
mov edi, 7538h
add rdi, [rbx+8]
lea rsi, aStacktrace; " (stacktrace:\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, [rsp+168h+var_158]
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aCheckFailedIsl_0+23h; ") "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [rsp+168h+var_158]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_967E:
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 76F0h; unsigned __int64
mov rdi, rbp; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_96BE
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_96BE
mov rbx, rax
lea rdi, [rsp+arg_28]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_96BE:
mov rdi, rbx
call __Unwind_Resume
| void nglog::LogMessage::Init(long long a1, nglog::tools *a2, int a3, unsigned int a4, long long a5, long long a6)
{
void *v10; // rax
long long v11; // rbp
std::chrono::_V2::system_clock *v12; // rdi
long long v13; // rax
long long v14; // rax
long long v15; // r13
long long v16; // r12
long long v17; // rdi
char *v18; // rsi
long long v19; // rax
long long v20; // rax
_QWORD *v21; // rax
long long v22; // rax
_QWORD *v23; // rax
long long v24; // rax
_QWORD *v25; // rax
long long v26; // rax
_QWORD *v27; // rax
long long v28; // rax
_QWORD *v29; // rax
long long v30; // rax
long long v31; // rax
_QWORD *v32; // rax
long long v33; // rax
long long v34; // rax
long long v35; // rax
long long v36; // rax
long long v37; // rax
long long v38; // rax
long long v39; // rax
int v41[8]; // [rsp+10h] [rbp-158h] BYREF
char v42[80]; // [rsp+30h] [rbp-138h] BYREF
char v43[232]; // [rsp+80h] [rbp-E8h] BYREF
*(_QWORD *)a1 = 0LL;
if ( a4 == 3 && nglog::exit_on_dfatal )
{
std::mutex::lock((std::mutex *)&nglog::fatal_msg_lock);
if ( nglog::fatal_msg_exclusive )
{
byte_3CB31 = 0;
v10 = &nglog::fatal_msg_data_shared;
}
else
{
nglog::fatal_msg_exclusive = 1;
byte_35441 = 1;
v10 = &nglog::fatal_msg_data_exclusive;
}
*(_QWORD *)(a1 + 8) = v10;
v12 = (std::chrono::_V2::system_clock *)&nglog::fatal_msg_lock;
pthread_mutex_unlock(&nglog::fatal_msg_lock);
v11 = *(_QWORD *)(a1 + 8);
}
else
{
v11 = operator new(0x76F0uLL);
v12 = (std::chrono::_V2::system_clock *)v11;
nglog::internal::LogMessageData::LogMessageData((nglog::internal::LogMessageData *)v11);
*(_QWORD *)a1 = v11;
*(_QWORD *)(a1 + 8) = v11;
*(_BYTE *)(v11 + 30433) = 0;
}
*(_DWORD *)v11 = *(_DWORD *)__errno_location();
*(_DWORD *)(v11 + 30360) = a4;
*(_DWORD *)(v11 + 30364) = a3;
*(_QWORD *)(v11 + 30368) = a5;
*(_QWORD *)(v11 + 30376) = a6;
*(_QWORD *)(v11 + 30384) = 0LL;
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 30384LL) = 0LL;
v13 = std::chrono::_V2::system_clock::now(v12);
nglog::LogMessageTime::LogMessageTime(v42, v13);
qmemcpy((void *)(a1 + 16), v42, 0x50uLL);
*(_OWORD *)(*(_QWORD *)(a1 + 8) + 30400LL) = 0LL;
v14 = nglog::tools::const_basename(a2, v43);
v15 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v15 + 30416) = v14;
*(_QWORD *)(v15 + 30424) = a2;
*(_BYTE *)(v15 + 30432) = 0;
*(_QWORD *)(v15 + 30440) = pthread_self();
if ( a3 != -1 && fLB::FLAGS_log_prefix )
{
std::ios::basic_ios(v42, 0LL);
std::ios::copyfmt(
v42,
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 30008LL) - 24LL) + *(_QWORD *)(a1 + 8) + 30008LL);
v16 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 30008LL) - 24LL) + *(_QWORD *)(a1 + 8) + 30008LL;
std::ios::fill(v16);
*(_BYTE *)(v16 + 224) = 48;
if ( nglog::`anonymous namespace'::g_prefix_formatter )
{
if ( !*(_DWORD *)nglog::`anonymous namespace'::g_prefix_formatter )
(*((void ( **)(long long, long long, _QWORD, _QWORD))nglog::`anonymous namespace'::g_prefix_formatter + 1))(
*(_QWORD *)(a1 + 8) + 30008LL,
a1,
*((_QWORD *)nglog::`anonymous namespace'::g_prefix_formatter + 2),
a4);
v17 = *(_QWORD *)(a1 + 8) + 30008LL;
v18 = " ";
}
else
{
std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 8) + 30008LL, (unsigned int)*nglog::LogSeverityNames[a4]);
if ( fLB::FLAGS_log_year_in_prefix == 1 )
{
v19 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v19 + *(_QWORD *)(*(_QWORD *)(v19 + 30008) - 24LL) + 30024) = 4LL;
std::ostream::operator<<(v19 + 30008, (unsigned int)(*(_DWORD *)(a1 + 36) + 1900));
}
v20 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v20 + *(_QWORD *)(*(_QWORD *)(v20 + 30008) - 24LL) + 30024) = 2LL;
v21 = (_QWORD *)std::ostream::operator<<(v20 + 30008, (unsigned int)(*(_DWORD *)(a1 + 32) + 1));
*(_QWORD *)((char *)v21 + *(_QWORD *)(*v21 - 24LL) + 16) = 2LL;
v22 = std::ostream::operator<<(v21, *(unsigned int *)(a1 + 28));
v23 = (_QWORD *)std::operator<<<std::char_traits<char>>(v22, 32LL);
*(_QWORD *)((char *)v23 + *(_QWORD *)(*v23 - 24LL) + 16) = 2LL;
v24 = std::ostream::operator<<(v23, *(unsigned int *)(a1 + 24));
v25 = (_QWORD *)std::operator<<<std::char_traits<char>>(v24, 58LL);
*(_QWORD *)((char *)v25 + *(_QWORD *)(*v25 - 24LL) + 16) = 2LL;
v26 = std::ostream::operator<<(v25, *(unsigned int *)(a1 + 20));
v27 = (_QWORD *)std::operator<<<std::char_traits<char>>(v26, 58LL);
*(_QWORD *)((char *)v27 + *(_QWORD *)(*v27 - 24LL) + 16) = 2LL;
v28 = std::ostream::operator<<(v27, *(unsigned int *)(a1 + 16));
v29 = (_QWORD *)std::operator<<<std::char_traits<char>>(v28, ".");
*(_QWORD *)((char *)v29 + *(_QWORD *)(*v29 - 24LL) + 16) = 6LL;
v30 = std::ostream::_M_insert<long>(v29, *(_QWORD *)(a1 + 80));
v31 = std::operator<<<std::char_traits<char>>(v30, 32LL);
v32 = (_QWORD *)std::operator<<<char,std::char_traits<char>>(v31, 32LL);
*(_QWORD *)((char *)v32 + *(_QWORD *)(*v32 - 24LL) + 16) = 5LL;
v33 = std::operator<<<char,std::char_traits<char>>(v32, *(_QWORD *)(*(_QWORD *)(a1 + 8) + 30440LL));
v34 = std::operator<<<char,std::char_traits<char>>(v33, 48LL);
v35 = std::operator<<<std::char_traits<char>>(v34, 32LL);
v36 = std::operator<<<std::char_traits<char>>(v35, *(_QWORD *)(*(_QWORD *)(a1 + 8) + 30416LL));
v37 = std::operator<<<std::char_traits<char>>(v36, 58LL);
v17 = std::ostream::operator<<(v37, *(unsigned int *)(*(_QWORD *)(a1 + 8) + 30364LL));
v18 = "] ";
}
std::operator<<<std::char_traits<char>>(v17, v18);
std::ios::copyfmt(
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 30008LL) - 24LL) + *(_QWORD *)(a1 + 8) + 30008LL,
v42);
std::ios_base::~ios_base((std::ios_base *)v42);
v15 = *(_QWORD *)(a1 + 8);
}
*(_QWORD *)(v15 + 30392) = *(_QWORD *)(v15 + 30056) - *(_QWORD *)(v15 + 30048);
if ( fLS::FLAGS_log_backtrace_at_buf[abi:cxx11][1] )
{
snprintf(v42, 128LL, "%s:%d", *(const char **)(v15 + 30416), a3);
if ( (unsigned __int8)std::operator==<char>(fLS::FLAGS_log_backtrace_at_buf[abi:cxx11], v42) )
{
nglog::GetStackTrace[abi:cxx11]((int)v41);
v38 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 8) + 30008LL, " (stacktrace:\n");
v39 = std::operator<<<char>(v38, v41);
std::operator<<<std::char_traits<char>>(v39, ") ");
std::string::~string(v41);
}
}
}
| Init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV R14,R9
MOV R13,R8
MOV R15D,ECX
MOV dword ptr [RSP + 0x8],EDX
MOV R12,RSI
MOV RBX,RDI
AND qword ptr [RDI],0x0
CMP ECX,0x3
JNZ 0x00109245
CMP byte ptr [0x0012d5bc],0x0
JZ 0x00109245
LEA RDI,[0x13cc90]
CALL 0x0011aa48
CMP byte ptr [0x0013cb40],0x0
JZ 0x0010926a
MOV byte ptr [0x0013cb31],0x0
LEA RAX,[0x135450]
JMP 0x0010927f
LAB_00109245:
MOV EDI,0x76f0
CALL 0x001075a0
MOV RBP,RAX
LAB_00109252:
MOV RDI,RAX
CALL 0x0010915e
LAB_0010925a:
MOV qword ptr [RBX],RBP
MOV qword ptr [RBX + 0x8],RBP
MOV byte ptr [RBP + 0x76e1],0x0
JMP 0x00109293
LAB_0010926a:
MOV AL,0x1
MOV byte ptr [0x0013cb40],AL
MOV byte ptr [0x00135441],AL
LEA RAX,[0x12dd60]
LAB_0010927f:
MOV qword ptr [RBX + 0x8],RAX
LEA RDI,[0x13cc90]
CALL 0x00107450
MOV RBP,qword ptr [RBX + 0x8]
LAB_00109293:
CALL 0x00107050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP],EAX
MOV dword ptr [RSP + 0xc],R15D
MOV dword ptr [RBP + 0x7698],R15D
MOV R15D,dword ptr [RSP + 0x8]
MOV dword ptr [RBP + 0x769c],R15D
MOV qword ptr [RBP + 0x76a0],R13
MOV qword ptr [RBP + 0x76a8],R14
AND qword ptr [RBP + 0x76b0],0x0
MOV RAX,qword ptr [RBX + 0x8]
AND qword ptr [RAX + 0x76b0],0x0
CALL 0x00107070
LEA R13,[RSP + 0x30]
MOV RDI,R13
MOV RSI,RAX
CALL 0x0010c3a0
LEA R14,[RBX + 0x10]
PUSH 0xa
POP RCX
MOV RDI,R14
MOV RSI,R13
MOVSQ.REP RDI,RSI
MOV RAX,qword ptr [RBX + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x76c0],XMM0
MOV RDI,R12
CALL 0x0011c755
MOV R13,qword ptr [RBX + 0x8]
MOV qword ptr [R13 + 0x76d0],RAX
MOV qword ptr [R13 + 0x76d8],R12
MOV byte ptr [R13 + 0x76e0],0x0
CALL 0x001074e0
MOV qword ptr [R13 + 0x76e8],RAX
CMP R15D,-0x1
JZ 0x001095dd
LEA RAX,[0x12da23]
CMP byte ptr [RAX],0x0
JZ 0x001095dd
LEA R12,[RSP + 0x30]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00107a20
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RSI + 0x7538]
ADD RSI,0x7538
ADD RSI,qword ptr [RAX + -0x18]
LAB_00109377:
MOV RDI,R12
CALL 0x00107250
MOV R12,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [R12 + 0x7538]
ADD R12,0x7538
ADD R12,qword ptr [RAX + -0x18]
MOV RDI,R12
CALL 0x001072b0
MOV byte ptr [R12 + 0xe0],0x30
MOV RAX,qword ptr [0x0012db50]
TEST RAX,RAX
MOV ECX,dword ptr [RSP + 0xc]
JZ 0x001093e4
CMP dword ptr [RAX],0x0
JNZ 0x001093cf
MOV EDI,0x7538
ADD RDI,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RAX + 0x10]
MOV RSI,RBX
CALL qword ptr [RAX + 0x8]
LAB_001093cf:
MOV EDI,0x7538
ADD RDI,qword ptr [RBX + 0x8]
LEA RSI,[0x11ec4f]
JMP 0x001095aa
LAB_001093e4:
MOV EDI,0x7538
ADD RDI,qword ptr [RBX + 0x8]
MOV EAX,ECX
LEA RCX,[0x12c720]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOVSX ESI,byte ptr [RAX]
CALL 0x001076a0
LEA RAX,[0x12da25]
CMP byte ptr [RAX],0x1
JNZ 0x0010943d
MOV RAX,qword ptr [RBX + 0x8]
LEA RDI,[RAX + 0x7538]
MOV RCX,qword ptr [RAX + 0x7538]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x7548],0x4
MOV ESI,0x76c
ADD ESI,dword ptr [RBX + 0x24]
CALL 0x001079e0
LAB_0010943d:
MOV RAX,qword ptr [RBX + 0x8]
LEA RDI,[RAX + 0x7538]
MOV RCX,qword ptr [RAX + 0x7538]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x7548],0x2
MOV ESI,dword ptr [RBX + 0x20]
INC ESI
CALL 0x001079e0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [RBX + 0x1c]
MOV RDI,RAX
CALL 0x001079e0
PUSH 0x20
POP RSI
MOV RDI,RAX
CALL 0x001076a0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [RBX + 0x18]
MOV RDI,RAX
CALL 0x001079e0
PUSH 0x3a
POP RSI
MOV RDI,RAX
CALL 0x001076a0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [RBX + 0x14]
MOV RDI,RAX
CALL 0x001079e0
PUSH 0x3a
POP RSI
MOV RDI,RAX
CALL 0x001076a0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R14]
MOV RDI,RAX
CALL 0x001079e0
LEA RSI,[0x11eda1]
MOV RDI,RAX
CALL 0x00107580
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x6
MOV RSI,qword ptr [RBX + 0x50]
MOV RDI,RAX
CALL 0x00107550
PUSH 0x20
POP RSI
MOV RDI,RAX
CALL 0x001076a0
PUSH 0x20
POP RSI
MOV RDI,RAX
CALL 0x00107910
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x5
MOV RCX,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [RCX + 0x76e8]
MOV RDI,RAX
CALL 0x0010dc36
PUSH 0x30
POP RSI
MOV RDI,RAX
CALL 0x00107910
PUSH 0x20
POP RSI
MOV RDI,RAX
CALL 0x001076a0
MOV RCX,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [RCX + 0x76d0]
MOV RDI,RAX
CALL 0x00107580
PUSH 0x3a
POP RSI
MOV RDI,RAX
CALL 0x001076a0
MOV RCX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RCX + 0x769c]
MOV RDI,RAX
CALL 0x001079e0
MOV RDI,RAX
LEA RSI,[0x11dae0]
LAB_001095aa:
CALL 0x00107580
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RDI + 0x7538]
ADD RDI,0x7538
ADD RDI,qword ptr [RAX + -0x18]
LEA RSI,[RSP + 0x30]
CALL 0x00107250
LAB_001095cf:
LEA RDI,[RSP + 0x30]
CALL 0x00107190
MOV R13,qword ptr [RBX + 0x8]
LAB_001095dd:
MOV RAX,qword ptr [R13 + 0x7568]
SUB RAX,qword ptr [R13 + 0x7560]
MOV qword ptr [R13 + 0x76b8],RAX
LEA RAX,[0x12c700]
MOV R14,qword ptr [RAX]
CMP qword ptr [R14 + 0x8],0x0
JZ 0x0010967e
MOV RCX,qword ptr [R13 + 0x76d0]
LEA RDX,[0x11d521]
LEA R15,[RSP + 0x30]
MOV ESI,0x80
MOV RDI,R15
MOV R8D,dword ptr [RSP + 0x8]
XOR EAX,EAX
CALL 0x00107940
MOV RDI,R14
MOV RSI,R15
CALL 0x0010dc4b
TEST AL,AL
JZ 0x0010967e
LEA RDI,[RSP + 0x10]
CALL 0x0011c91e
MOV EDI,0x7538
ADD RDI,qword ptr [RBX + 0x8]
LAB_0010964c:
LEA RSI,[0x11d527]
CALL 0x00107580
LEA RSI,[RSP + 0x10]
MOV RDI,RAX
CALL 0x001074d0
LEA RSI,[0x11eea9]
MOV RDI,RAX
CALL 0x00107580
LAB_00109674:
LEA RDI,[RSP + 0x10]
CALL 0x00107b38
LAB_0010967e:
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::LogMessage::Init(char const*, int, nglog::LogSeverity, void (nglog::LogMessage::*)()) */
void nglog::LogMessage::Init
(int8 *param_1,char *param_2,uint param_3,uint param_4,int8 param_5,
int8 param_6)
{
long lVar1;
int *puVar2;
bool bVar3;
int1 *puVar4;
LogMessageData *this;
int *piVar5;
int8 uVar6;
pthread_t pVar7;
long lVar8;
LogMessageTime *pLVar9;
char *pcVar10;
ostream *poVar11;
byte bVar12;
string local_158 [32];
LogMessageTime local_138 [264];
bVar12 = 0;
*param_1 = 0;
if ((param_4 == 3) && (exit_on_dfatal != '\0')) {
std::mutex::lock((mutex *)fatal_msg_lock);
if (fatal_msg_exclusive == '\0') {
fatal_msg_exclusive = '\x01';
fatal_msg_data_exclusive[0x76e1] = 1;
puVar4 = fatal_msg_data_exclusive;
}
else {
DAT_0013cb31 = 0;
puVar4 = (int1 *)&fatal_msg_data_shared;
}
param_1[1] = puVar4;
pthread_mutex_unlock((pthread_mutex_t *)fatal_msg_lock);
this = (LogMessageData *)param_1[1];
}
else {
this = (LogMessageData *)operator_new(0x76f0);
/* try { // try from 00109252 to 00109259 has its CatchHandler @ 00109690 */
internal::LogMessageData::LogMessageData(this);
*param_1 = this;
param_1[1] = this;
this[0x76e1] = (LogMessageData)0x0;
}
piVar5 = __errno_location();
*(int *)this = *piVar5;
*(uint *)(this + 0x7698) = param_4;
*(uint *)(this + 0x769c) = param_3;
*(int8 *)(this + 0x76a0) = param_5;
*(int8 *)(this + 0x76a8) = param_6;
*(int8 *)(this + 0x76b0) = 0;
*(int8 *)(param_1[1] + 0x76b0) = 0;
uVar6 = std::chrono::_V2::system_clock::now();
LogMessageTime::LogMessageTime(local_138,uVar6);
pLVar9 = local_138;
piVar5 = (int *)(param_1 + 2);
for (lVar8 = 10; lVar8 != 0; lVar8 = lVar8 + -1) {
*(int8 *)piVar5 = *(int8 *)pLVar9;
pLVar9 = pLVar9 + (ulong)bVar12 * -0x10 + 8;
piVar5 = piVar5 + (ulong)bVar12 * -4 + 2;
}
lVar8 = param_1[1];
*(int8 *)(lVar8 + 0x76c0) = 0;
*(int8 *)(lVar8 + 0x76c8) = 0;
uVar6 = tools::const_basename(param_2);
lVar8 = param_1[1];
*(int8 *)(lVar8 + 0x76d0) = uVar6;
*(char **)(lVar8 + 0x76d8) = param_2;
*(int1 *)(lVar8 + 0x76e0) = 0;
pVar7 = pthread_self();
*(pthread_t *)(lVar8 + 0x76e8) = pVar7;
if ((param_3 != 0xffffffff) && (fLB::FLAGS_log_prefix != '\0')) {
std::ios::ios((ios *)local_138,(streambuf *)0x0);
/* try { // try from 00109377 to 001095ce has its CatchHandler @ 001096b1 */
std::ios::copyfmt((ios *)local_138);
lVar8 = param_1[1];
lVar1 = *(long *)(*(long *)(lVar8 + 0x7538) + -0x18);
std::ios::fill();
*(int1 *)(lVar8 + lVar1 + 0x7618) = 0x30;
if ((anonymous_namespace)::g_prefix_formatter == (int *)0x0) {
std::operator<<((ostream *)(param_1[1] + 0x7538),
**(char **)(LogSeverityNames + (ulong)param_4 * 8));
if (fLB::FLAGS_log_year_in_prefix == '\x01') {
lVar8 = param_1[1];
*(int8 *)(lVar8 + 0x7548 + *(long *)(*(long *)(lVar8 + 0x7538) + -0x18)) = 4;
std::ostream::operator<<((ostream *)(lVar8 + 0x7538),*(int *)((long)param_1 + 0x24) + 0x76c)
;
}
lVar8 = param_1[1];
*(int8 *)(lVar8 + 0x7548 + *(long *)(*(long *)(lVar8 + 0x7538) + -0x18)) = 2;
poVar11 = (ostream *)
std::ostream::operator<<((ostream *)(lVar8 + 0x7538),*(int *)(param_1 + 4) + 1);
*(int8 *)(poVar11 + *(long *)(*(long *)poVar11 + -0x18) + 0x10) = 2;
poVar11 = (ostream *)std::ostream::operator<<(poVar11,*(int *)((long)param_1 + 0x1c));
poVar11 = std::operator<<(poVar11,' ');
*(int8 *)(poVar11 + *(long *)(*(long *)poVar11 + -0x18) + 0x10) = 2;
poVar11 = (ostream *)std::ostream::operator<<(poVar11,*(int *)(param_1 + 3));
poVar11 = std::operator<<(poVar11,':');
*(int8 *)(poVar11 + *(long *)(*(long *)poVar11 + -0x18) + 0x10) = 2;
poVar11 = (ostream *)std::ostream::operator<<(poVar11,*(int *)((long)param_1 + 0x14));
poVar11 = std::operator<<(poVar11,':');
*(int8 *)(poVar11 + *(long *)(*(long *)poVar11 + -0x18) + 0x10) = 2;
poVar11 = (ostream *)std::ostream::operator<<(poVar11,*(int *)(param_1 + 2));
poVar11 = std::operator<<(poVar11,".");
*(int8 *)(poVar11 + *(long *)(*(long *)poVar11 + -0x18) + 0x10) = 6;
poVar11 = std::ostream::_M_insert<long>((long)poVar11);
poVar11 = std::operator<<(poVar11,' ');
poVar11 = std::operator<<(poVar11,0x20);
*(int8 *)(poVar11 + *(long *)(*(long *)poVar11 + -0x18) + 0x10) = 5;
poVar11 = std::operator<<(poVar11,*(int8 *)(param_1[1] + 0x76e8));
poVar11 = std::operator<<(poVar11,0x30);
poVar11 = std::operator<<(poVar11,' ');
poVar11 = std::operator<<(poVar11,*(char **)(param_1[1] + 0x76d0));
poVar11 = std::operator<<(poVar11,':');
poVar11 = (ostream *)std::ostream::operator<<(poVar11,*(int *)(param_1[1] + 0x769c));
pcVar10 = "] ";
}
else {
if (*(anonymous_namespace)::g_prefix_formatter == 0) {
(**(code **)((anonymous_namespace)::g_prefix_formatter + 2))
(param_1[1] + 0x7538,param_1,
*(int8 *)((anonymous_namespace)::g_prefix_formatter + 4));
}
poVar11 = (ostream *)(param_1[1] + 0x7538);
pcVar10 = " ";
}
std::operator<<(poVar11,pcVar10);
std::ios::copyfmt((ios *)(param_1[1] + 0x7538 +
*(long *)(*(long *)(param_1[1] + 0x7538) + -0x18)));
std::ios_base::~ios_base((ios_base *)local_138);
lVar8 = param_1[1];
}
*(long *)(lVar8 + 0x76b8) = *(long *)(lVar8 + 0x7568) - *(long *)(lVar8 + 0x7560);
puVar2 = fLS::FLAGS_log_backtrace_at_abi_cxx11_;
if (*(long *)(fLS::FLAGS_log_backtrace_at_abi_cxx11_ + 8) != 0) {
snprintf((char *)local_138,0x80,"%s:%d",*(int8 *)(lVar8 + 0x76d0),(ulong)param_3);
bVar3 = std::operator==((string *)puVar2,(char *)local_138);
if (bVar3) {
GetStackTrace_abi_cxx11_();
/* try { // try from 0010964c to 00109673 has its CatchHandler @ 001096a2 */
poVar11 = std::operator<<((ostream *)(param_1[1] + 0x7538)," (stacktrace:\n");
poVar11 = std::operator<<(poVar11,local_158);
std::operator<<(poVar11,") ");
std::__cxx11::string::~string(local_158);
}
}
return;
}
| |
45,904 | JS_ThrowSyntaxError | bluesky950520[P]quickjs/quickjs.c | JSValue __attribute__((format(printf, 2, 3))) JS_ThrowSyntaxError(JSContext *ctx, const char *fmt, ...)
{
JSValue val;
va_list ap;
va_start(ap, fmt);
val = JS_ThrowError(ctx, JS_SYNTAX_ERROR, fmt, ap);
va_end(ap);
return val;
} | O1 | c | JS_ThrowSyntaxError:
subq $0xd8, %rsp
movq %rsi, %r10
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2252b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
movl $0x3, %esi
movq %r10, %rdx
callq 0x22450
movl $0x6, %edx
xorl %eax, %eax
addq $0xd8, %rsp
retq
| JS_ThrowSyntaxError:
sub rsp, 0D8h
mov r10, rsi
lea rsi, [rsp+0D8h+var_B8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_2252B
movaps [rsp+0D8h+var_88], xmm0
movaps [rsp+0D8h+var_78], xmm1
movaps [rsp+0D8h+var_68], xmm2
movaps [rsp+0D8h+var_58], xmm3
movaps [rsp+0D8h+var_48], xmm4
movaps [rsp+0D8h+var_38], xmm5
movaps [rsp+0D8h+var_28], xmm6
movaps [rsp+0D8h+var_18], xmm7
loc_2252B:
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0D8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
mov esi, 3
mov rdx, r10
call JS_ThrowError
mov edx, 6
xor eax, eax
add rsp, 0D8h
retn
| long long JS_ThrowSyntaxError(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF
char v17; // [rsp+20h] [rbp-B8h] BYREF
long long v18; // [rsp+30h] [rbp-A8h]
long long v19; // [rsp+38h] [rbp-A0h]
long long v20; // [rsp+40h] [rbp-98h]
long long v21; // [rsp+48h] [rbp-90h]
__m128 v22; // [rsp+50h] [rbp-88h]
__m128 v23; // [rsp+60h] [rbp-78h]
__m128 v24; // [rsp+70h] [rbp-68h]
__m128 v25; // [rsp+80h] [rbp-58h]
__m128 v26; // [rsp+90h] [rbp-48h]
__m128 v27; // [rsp+A0h] [rbp-38h]
__m128 v28; // [rsp+B0h] [rbp-28h]
__m128 v29; // [rsp+C0h] [rbp-18h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v18 = a3;
v19 = a4;
v20 = a5;
v21 = a6;
v16[2] = &v17;
v16[1] = &a15;
v16[0] = 0x3000000010LL;
JS_ThrowError(a1, 3LL, a2, (long long)v16);
return 0LL;
}
| JS_ThrowSyntaxError:
SUB RSP,0xd8
MOV R10,RSI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0012252b
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0012252b:
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
MOV ESI,0x3
MOV RDX,R10
CALL 0x00122450
MOV EDX,0x6
XOR EAX,EAX
ADD RSP,0xd8
RET
|
int1 [16] JS_ThrowSyntaxError(int8 param_1,int8 param_2)
{
JS_ThrowError(param_1,3,param_2);
return ZEXT816(6) << 0x40;
}
| |
45,905 | JS_ThrowSyntaxError | bluesky950520[P]quickjs/quickjs.c | JSValue __attribute__((format(printf, 2, 3))) JS_ThrowSyntaxError(JSContext *ctx, const char *fmt, ...)
{
JSValue val;
va_list ap;
va_start(ap, fmt);
val = JS_ThrowError(ctx, JS_SYNTAX_ERROR, fmt, ap);
va_end(ap);
return val;
} | O2 | c | JS_ThrowSyntaxError:
subq $0xd8, %rsp
movq %rsi, %r10
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x1c615
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
pushq $0x3
popq %rsi
movq %r10, %rdx
callq 0x1c551
pushq $0x6
popq %rdx
xorl %eax, %eax
addq $0xd8, %rsp
retq
| JS_ThrowSyntaxError:
sub rsp, 0D8h
mov r10, rsi
lea rsi, [rsp+0D8h+var_B8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_1C615
movaps [rsp+0D8h+var_88], xmm0
movaps [rsp+0D8h+var_78], xmm1
movaps [rsp+0D8h+var_68], xmm2
movaps [rsp+0D8h+var_58], xmm3
movaps [rsp+0D8h+var_48], xmm4
movaps [rsp+0D8h+var_38], xmm5
movaps [rsp+0D8h+var_28], xmm6
movaps [rsp+0D8h+var_18], xmm7
loc_1C615:
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0D8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
push 3
pop rsi
mov rdx, r10
call JS_ThrowError
push 6
pop rdx
xor eax, eax
add rsp, 0D8h
retn
| long long JS_ThrowSyntaxError(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF
char v17; // [rsp+20h] [rbp-B8h] BYREF
long long v18; // [rsp+30h] [rbp-A8h]
long long v19; // [rsp+38h] [rbp-A0h]
long long v20; // [rsp+40h] [rbp-98h]
long long v21; // [rsp+48h] [rbp-90h]
__m128 v22; // [rsp+50h] [rbp-88h]
__m128 v23; // [rsp+60h] [rbp-78h]
__m128 v24; // [rsp+70h] [rbp-68h]
__m128 v25; // [rsp+80h] [rbp-58h]
__m128 v26; // [rsp+90h] [rbp-48h]
__m128 v27; // [rsp+A0h] [rbp-38h]
__m128 v28; // [rsp+B0h] [rbp-28h]
__m128 v29; // [rsp+C0h] [rbp-18h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v18 = a3;
v19 = a4;
v20 = a5;
v21 = a6;
v16[2] = &v17;
v16[1] = &a15;
v16[0] = 0x3000000010LL;
JS_ThrowError(a1, 3LL, a2, (long long)v16);
return 0LL;
}
| JS_ThrowSyntaxError:
SUB RSP,0xd8
MOV R10,RSI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0011c615
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0011c615:
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
PUSH 0x3
POP RSI
MOV RDX,R10
CALL 0x0011c551
PUSH 0x6
POP RDX
XOR EAX,EAX
ADD RSP,0xd8
RET
|
int1 [16] JS_ThrowSyntaxError(int8 param_1,int8 param_2)
{
JS_ThrowError(param_1,3,param_2);
return ZEXT816(6) << 0x40;
}
| |
45,906 | print_xml_tag | eloqsql/client/mysqldump.c | static void print_xml_tag(FILE * xml_file, const char* sbeg,
const char* line_end,
const char* tag_name,
const char* first_attribute_name, ...)
{
va_list arg_list;
const char *attribute_name, *attribute_value;
fputs(sbeg, xml_file);
fputc('<', xml_file);
fputs(tag_name, xml_file);
va_start(arg_list, first_attribute_name);
attribute_name= first_attribute_name;
while (attribute_name != NullS)
{
attribute_value= va_arg(arg_list, char *);
DBUG_ASSERT(attribute_value != NullS);
fputc(' ', xml_file);
fputs(attribute_name, xml_file);
fputc('\"', xml_file);
print_quoted_xml(xml_file, attribute_value, strlen(attribute_value), 0);
fputc('\"', xml_file);
attribute_name= va_arg(arg_list, char *);
}
va_end(arg_list);
fputc('>', xml_file);
fputs(line_end, xml_file);
check_io(xml_file);
} | O0 | c | print_xml_tag:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
testb %al, %al
je 0x3f8fe
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x38340
movq -0x8(%rbp), %rsi
movl $0x3c, %edi
callq 0x388b0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x38340
leaq -0x40(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x28, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x3fab9
leaq -0x40(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x104(%rbp)
cmpl $0x28, %eax
ja 0x3f9b3
movq -0x110(%rbp), %rcx
movl -0x104(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x118(%rbp)
jmp 0x3f9d0
movq -0x110(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x3f9e0
movq -0x8(%rbp), %rsi
movl $0x20, %edi
callq 0x388b0
movq -0x48(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x38340
movq -0x8(%rbp), %rsi
movl $0x22, %edi
callq 0x388b0
movq -0x8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x50(%rbp), %rdi
callq 0x38410
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x440e0
movq -0x8(%rbp), %rsi
movl $0x22, %edi
callq 0x388b0
leaq -0x40(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x11c(%rbp)
cmpl $0x28, %eax
ja 0x3fa89
movq -0x128(%rbp), %rcx
movl -0x11c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x3faa6
movq -0x128(%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, -0x48(%rbp)
jmp 0x3f96d
movq -0x8(%rbp), %rsi
movl $0x3e, %edi
callq 0x388b0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x38340
movq -0x8(%rbp), %rdi
callq 0x38d60
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
| print_xml_tag:
push rbp
mov rbp, rsp
sub rsp, 140h
test al, al
jz short loc_3F8FE
movaps [rbp+var_D0], xmm0
movaps [rbp+var_C0], xmm1
movaps [rbp+var_B0], xmm2
movaps [rbp+var_A0], xmm3
movaps [rbp+var_90], xmm4
movaps [rbp+var_80], xmm5
movaps [rbp+var_70], xmm6
movaps [rbp+var_60], xmm7
loc_3F8FE:
mov [rbp+var_D8], r9
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 rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
call _fputs
mov rsi, [rbp+var_8]
mov edi, 3Ch ; '<'
call _fputc
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
call _fputs
lea rax, [rbp+var_40]
lea rcx, [rbp+var_100]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 28h ; '('
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_3F96D:
cmp [rbp+var_48], 0
jz loc_3FAB9
lea rax, [rbp+var_40]
mov [rbp+var_110], rax
mov eax, [rbp+var_40]
mov [rbp+var_104], eax
cmp eax, 28h ; '('
ja short loc_3F9B3
mov rcx, [rbp+var_110]
mov edx, [rbp+var_104]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_118], rax
jmp short loc_3F9D0
loc_3F9B3:
mov rcx, [rbp+var_110]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_118], rax
loc_3F9D0:
mov rax, [rbp+var_118]
mov rax, [rax]
mov [rbp+var_50], rax
jmp short $+2
loc_3F9E0:
mov rsi, [rbp+var_8]
mov edi, 20h ; ' '
call _fputc
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_8]
call _fputs
mov rsi, [rbp+var_8]
mov edi, 22h ; '"'
call _fputc
mov rax, [rbp+var_8]
mov [rbp+var_138], rax
mov rax, [rbp+var_50]
mov [rbp+var_130], rax
mov rdi, [rbp+var_50]
call _strlen
mov rdi, [rbp+var_138]
mov rsi, [rbp+var_130]
mov rdx, rax
xor ecx, ecx
call print_quoted_xml
mov rsi, [rbp+var_8]
mov edi, 22h ; '"'
call _fputc
lea rax, [rbp+var_40]
mov [rbp+var_128], rax
mov eax, [rbp+var_40]
mov [rbp+var_11C], eax
cmp eax, 28h ; '('
ja short loc_3FA89
mov rcx, [rbp+var_128]
mov edx, [rbp+var_11C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_3FAA6
loc_3FA89:
mov rcx, [rbp+var_128]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_3FAA6:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_48], rax
jmp loc_3F96D
loc_3FAB9:
mov rsi, [rbp+var_8]
mov edi, 3Eh ; '>'
call _fputc
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_8]
call _fputs
mov rdi, [rbp+var_8]
call check_io
add rsp, 140h
pop rbp
retn
| long long print_xml_tag(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char *v15; // rax
long long v16; // rax
char *v17; // rax
long long v19; // [rsp+8h] [rbp-138h]
long long v20; // [rsp+10h] [rbp-130h]
char v21; // [rsp+40h] [rbp-100h] BYREF
long long v22; // [rsp+68h] [rbp-D8h]
__m128 v23; // [rsp+70h] [rbp-D0h]
__m128 v24; // [rsp+80h] [rbp-C0h]
__m128 v25; // [rsp+90h] [rbp-B0h]
__m128 v26; // [rsp+A0h] [rbp-A0h]
__m128 v27; // [rsp+B0h] [rbp-90h]
__m128 v28; // [rsp+C0h] [rbp-80h]
__m128 v29; // [rsp+D0h] [rbp-70h]
__m128 v30; // [rsp+E0h] [rbp-60h]
long long v31; // [rsp+F0h] [rbp-50h]
long long i; // [rsp+F8h] [rbp-48h]
int v33; // [rsp+100h] [rbp-40h]
int v34; // [rsp+104h] [rbp-3Ch]
char *v35; // [rsp+108h] [rbp-38h]
char *v36; // [rsp+110h] [rbp-30h]
long long v37; // [rsp+118h] [rbp-28h]
long long v38; // [rsp+120h] [rbp-20h]
long long v39; // [rsp+128h] [rbp-18h]
long long v40; // [rsp+130h] [rbp-10h]
long long v41; // [rsp+138h] [rbp-8h]
v23 = a7;
v24 = a8;
v25 = a9;
v26 = a10;
v27 = a11;
v28 = a12;
v29 = a13;
v30 = a14;
v22 = a6;
v41 = a1;
v40 = a2;
v39 = a3;
v38 = a4;
v37 = a5;
fputs(a2, a1);
fputc(60LL, a1);
fputs(v38, a1);
v36 = &v21;
v35 = &a15;
v34 = 48;
v33 = 40;
for ( i = v37; i; i = *(_QWORD *)v17 )
{
if ( (unsigned int)v33 > 0x28 )
{
v15 = v35;
v35 += 8;
}
else
{
v15 = &v36[v33];
v33 += 8;
}
v31 = *(_QWORD *)v15;
fputc(32LL, v41);
fputs(i, v41);
fputc(34LL, v41);
v19 = v41;
v20 = v31;
v16 = strlen(v31);
print_quoted_xml(v19, v20, v16, 0LL);
fputc(34LL, v41);
if ( (unsigned int)v33 > 0x28 )
{
v17 = v35;
v35 += 8;
}
else
{
v17 = &v36[v33];
v33 += 8;
}
}
fputc(62LL, v41);
fputs(v39, v41);
return check_io(v41);
}
| print_xml_tag:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
TEST AL,AL
JZ 0x0013f8fe
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM1
MOVAPS xmmword ptr [RBP + -0xb0],XMM2
MOVAPS xmmword ptr [RBP + -0xa0],XMM3
MOVAPS xmmword ptr [RBP + -0x90],XMM4
MOVAPS xmmword ptr [RBP + -0x80],XMM5
MOVAPS xmmword ptr [RBP + -0x70],XMM6
MOVAPS xmmword ptr [RBP + -0x60],XMM7
LAB_0013f8fe:
MOV qword ptr [RBP + -0xd8],R9
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 RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00138340
MOV RSI,qword ptr [RBP + -0x8]
MOV EDI,0x3c
CALL 0x001388b0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00138340
LEA RAX,[RBP + -0x40]
LEA RCX,[RBP + -0x100]
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],0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_0013f96d:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0013fab9
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x110],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x104],EAX
CMP EAX,0x28
JA 0x0013f9b3
MOV RCX,qword ptr [RBP + -0x110]
MOV EDX,dword ptr [RBP + -0x104]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x118],RAX
JMP 0x0013f9d0
LAB_0013f9b3:
MOV RCX,qword ptr [RBP + -0x110]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x118],RAX
LAB_0013f9d0:
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013f9e0
LAB_0013f9e0:
MOV RSI,qword ptr [RBP + -0x8]
MOV EDI,0x20
CALL 0x001388b0
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00138340
MOV RSI,qword ptr [RBP + -0x8]
MOV EDI,0x22
CALL 0x001388b0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x138],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x130],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00138410
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RBP + -0x130]
MOV RDX,RAX
XOR ECX,ECX
CALL 0x001440e0
MOV RSI,qword ptr [RBP + -0x8]
MOV EDI,0x22
CALL 0x001388b0
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x128],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x11c],EAX
CMP EAX,0x28
JA 0x0013fa89
MOV RCX,qword ptr [RBP + -0x128]
MOV EDX,dword ptr [RBP + -0x11c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0013faa6
LAB_0013fa89:
MOV RCX,qword ptr [RBP + -0x128]
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_0013faa6:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013f96d
LAB_0013fab9:
MOV RSI,qword ptr [RBP + -0x8]
MOV EDI,0x3e
CALL 0x001388b0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00138340
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00138d60
ADD RSP,0x140
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void print_xml_tag(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
FILE *param_9,char *param_10,char *param_11,char *param_12,char *param_13,
int8 param_14)
{
char *pcVar1;
FILE *pFVar2;
char in_AL;
size_t sVar3;
long *local_148;
long *local_120;
int1 local_108 [40];
int8 local_e0;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
char *local_58;
char *local_50;
uint local_48;
int4 local_44;
long *local_40;
int1 *local_38;
char *local_30;
char *local_28;
char *local_20;
char *local_18;
FILE *local_10;
if (in_AL != '\0') {
local_d8 = param_1;
local_c8 = param_2;
local_b8 = param_3;
local_a8 = param_4;
local_98 = param_5;
local_88 = param_6;
local_78 = param_7;
local_68 = param_8;
}
local_e0 = param_14;
local_30 = param_13;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
fputs(param_10,param_9);
fputc(0x3c,local_10);
fputs(local_28,local_10);
local_38 = local_108;
local_40 = (long *)&stack0x00000008;
local_44 = 0x30;
local_48 = 0x28;
local_50 = local_30;
while (local_50 != (char *)0x0) {
if (local_48 < 0x29) {
local_120 = (long *)(local_38 + (int)local_48);
local_48 = local_48 + 8;
}
else {
local_120 = local_40;
local_40 = local_40 + 1;
}
local_58 = (char *)*local_120;
fputc(0x20,local_10);
fputs(local_50,local_10);
fputc(0x22,local_10);
pFVar2 = local_10;
pcVar1 = local_58;
sVar3 = strlen(local_58);
print_quoted_xml(pFVar2,pcVar1,sVar3,0);
fputc(0x22,local_10);
if (local_48 < 0x29) {
local_148 = (long *)(local_38 + (int)local_48);
local_48 = local_48 + 8;
}
else {
local_148 = local_40;
local_40 = local_40 + 1;
}
local_50 = (char *)*local_148;
}
fputc(0x3e,local_10);
fputs(local_20,local_10);
check_io(local_10);
return;
}
| |
45,907 | ftxui::(anonymous namespace)::VText::~VText() | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/text.cpp | explicit VText(std::string text)
: text_(std::move(text)), width_{std::min(string_width(text_), 1)} {} | O1 | cpp | ftxui::(anonymous namespace)::VText::~VText():
pushq %rbx
movq %rdi, %rbx
leaq 0x33055(%rip), %rax # 0x58a38
movq %rax, (%rdi)
movq 0x60(%rdi), %rdi
leaq 0x70(%rbx), %rax
cmpq %rax, %rdi
je 0x259fe
movq (%rax), %rsi
incq %rsi
callq 0xb400
movq %rbx, %rdi
callq 0x24132
movl $0x88, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xb400
| _ZN5ftxui12_GLOBAL__N_15VTextD0Ev:
push rbx
mov rbx, rdi
lea rax, off_58A38
mov [rdi], rax
mov rdi, [rdi+60h]; void *
lea rax, [rbx+70h]
cmp rdi, rax
jz short loc_259FE
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_259FE:
mov rdi, rbx; this
call _ZN5ftxui4NodeD2Ev; ftxui::Node::~Node()
mov esi, 88h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void ftxui::`anonymous namespace'::VText::~VText(ftxui::_anonymous_namespace_::VText *this)
{
char *v2; // rdi
*(_QWORD *)this = off_58A38;
v2 = (char *)*((_QWORD *)this + 12);
if ( v2 != (char *)this + 112 )
operator delete(v2, *((_QWORD *)this + 14) + 1LL);
ftxui::Node::~Node((void **)this);
operator delete(this, 0x88uLL);
}
| ~VText:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x158a38]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x60]
LEA RAX,[RBX + 0x70]
CMP RDI,RAX
JZ 0x001259fe
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0010b400
LAB_001259fe:
MOV RDI,RBX
CALL 0x00124132
MOV ESI,0x88
MOV RDI,RBX
POP RBX
JMP 0x0010b400
|
/* ftxui::(anonymous namespace)::VText::~VText() */
void __thiscall ftxui::(anonymous_namespace)::VText::~VText(VText *this)
{
*(int ***)this = &PTR__VText_00158a38;
if (*(VText **)(this + 0x60) != this + 0x70) {
operator_delete(*(VText **)(this + 0x60),*(long *)(this + 0x70) + 1);
}
Node::~Node((Node *)this);
operator_delete(this,0x88);
return;
}
| |
45,908 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long) | monkey531[P]llama/common/json.hpp | inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
pushq %rax
testl %esi, %esi
jle 0x71c31
cmpq %rcx, %rdx
ja 0x71c4d
subq %r8, %rcx
jb 0x71c69
testq %r9, %r9
je 0x71c85
movl %esi, %eax
movq %r9, %rsi
subq %rdx, %rsi
movq %rdx, %r10
subq %r8, %r10
cmpq %rdx, %r8
jae 0x71c0e
subq %r9, %rcx
jb 0x71c0e
leaq (%r8,%r9), %r11
cmpq %rdx, %r11
jb 0x71bf3
addq %rsi, %r8
cmpq %r8, %r10
jbe 0x71c0e
movb -0x1(%rdi,%rax), %r8b
cmpb $0x30, %r8b
je 0x71c10
decb %r8b
movb %r8b, -0x1(%rdi,%rax)
subq %r9, %r10
movq %r11, %r8
jmp 0x71bd8
popq %rax
retq
leaq 0x2289b(%rip), %rdi # 0x944b2
leaq 0x1fd51(%rip), %rdx # 0x9196f
leaq 0x256bb(%rip), %rcx # 0x972e0
movl $0x444d, %esi # imm = 0x444D
xorl %eax, %eax
callq 0x22c90
leaq 0x2287a(%rip), %rdi # 0x944b2
leaq 0x1fd30(%rip), %rdx # 0x9196f
leaq 0x2566b(%rip), %rcx # 0x972b1
movl $0x4431, %esi # imm = 0x4431
jmp 0x71c2a
leaq 0x2285e(%rip), %rdi # 0x944b2
leaq 0x1fd14(%rip), %rdx # 0x9196f
leaq 0x25658(%rip), %rcx # 0x972ba
movl $0x4432, %esi # imm = 0x4432
jmp 0x71c2a
leaq 0x22842(%rip), %rdi # 0x944b2
leaq 0x1fcf8(%rip), %rdx # 0x9196f
leaq 0x2564a(%rip), %rcx # 0x972c8
movl $0x4433, %esi # imm = 0x4433
jmp 0x71c2a
leaq 0x22826(%rip), %rdi # 0x944b2
leaq 0x1fcdc(%rip), %rdx # 0x9196f
leaq 0x2563c(%rip), %rcx # 0x972d6
movl $0x4434, %esi # imm = 0x4434
jmp 0x71c2a
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
push rax
test esi, esi
jle loc_71C31
cmp rdx, rcx
ja loc_71C4D
sub rcx, r8
jb loc_71C69
test r9, r9
jz loc_71C85
mov eax, esi
mov rsi, r9
sub rsi, rdx
mov r10, rdx
sub r10, r8
loc_71BD8:
cmp r8, rdx
jnb short loc_71C0E
sub rcx, r9
jb short loc_71C0E
lea r11, [r8+r9]
cmp r11, rdx
jb short loc_71BF3
add r8, rsi
cmp r10, r8
jbe short loc_71C0E
loc_71BF3:
mov r8b, [rdi+rax-1]
cmp r8b, 30h ; '0'
jz short loc_71C10
dec r8b
mov [rdi+rax-1], r8b
sub r10, r9
mov r8, r11
jmp short loc_71BD8
loc_71C0E:
pop rax
retn
loc_71C10:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov esi, 444Dh
loc_71C2A:
xor eax, eax
call _ggml_abort
loc_71C31:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov esi, 4431h
jmp short loc_71C2A
loc_71C4D:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov esi, 4432h
jmp short loc_71C2A
loc_71C69:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov esi, 4433h
jmp short loc_71C2A
loc_71C85:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov esi, 4434h
jmp short loc_71C2A
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
bool v6; // cf
unsigned long long v7; // rcx
unsigned long long v8; // r10
unsigned long long v9; // r11
char v10; // r8
if ( (int)a2 <= 0 )
{
while ( 1 )
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
}
if ( a3 > a4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
goto LABEL_14;
}
v6 = a4 < a5;
v7 = a4 - a5;
if ( v6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
goto LABEL_14;
}
if ( !a6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
goto LABEL_14;
}
v8 = a3 - a5;
while ( a5 < a3 )
{
v6 = v7 < a6;
v7 -= a6;
if ( v6 )
break;
v9 = a5 + a6;
if ( a5 + a6 >= a3 && v8 <= a6 - a3 + a5 )
break;
v10 = *((_BYTE *)this + (unsigned int)a2 - 1);
if ( v10 == 48 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
goto LABEL_14;
}
*((_BYTE *)this + (unsigned int)a2 - 1) = v10 - 1;
v8 -= a6;
a5 = v9;
}
}
| grisu2_round:
PUSH RAX
TEST ESI,ESI
JLE 0x00171c31
CMP RDX,RCX
JA 0x00171c4d
SUB RCX,R8
JC 0x00171c69
TEST R9,R9
JZ 0x00171c85
MOV EAX,ESI
MOV RSI,R9
SUB RSI,RDX
MOV R10,RDX
SUB R10,R8
LAB_00171bd8:
CMP R8,RDX
JNC 0x00171c0e
SUB RCX,R9
JC 0x00171c0e
LEA R11,[R8 + R9*0x1]
CMP R11,RDX
JC 0x00171bf3
ADD R8,RSI
CMP R10,R8
JBE 0x00171c0e
LAB_00171bf3:
MOV R8B,byte ptr [RDI + RAX*0x1 + -0x1]
CMP R8B,0x30
JZ 0x00171c10
DEC R8B
MOV byte ptr [RDI + RAX*0x1 + -0x1],R8B
SUB R10,R9
MOV R8,R11
JMP 0x00171bd8
LAB_00171c0e:
POP RAX
RET
LAB_00171c10:
LEA RDI,[0x1944b2]
LEA RDX,[0x19196f]
LEA RCX,[0x1972e0]
MOV ESI,0x444d
LAB_00171c2a:
XOR EAX,EAX
CALL 0x00122c90
LAB_00171c31:
LEA RDI,[0x1944b2]
LEA RDX,[0x19196f]
LEA RCX,[0x1972b1]
MOV ESI,0x4431
JMP 0x00171c2a
LAB_00171c4d:
LEA RDI,[0x1944b2]
LEA RDX,[0x19196f]
LEA RCX,[0x1972ba]
MOV ESI,0x4432
JMP 0x00171c2a
LAB_00171c69:
LEA RDI,[0x1944b2]
LEA RDX,[0x19196f]
LEA RCX,[0x1972c8]
MOV ESI,0x4433
JMP 0x00171c2a
LAB_00171c85:
LEA RDI,[0x1944b2]
LEA RDX,[0x19196f]
LEA RCX,[0x1972d6]
MOV ESI,0x4434
JMP 0x00171c2a
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned
long, unsigned long, unsigned long) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round
(char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6)
{
int8 in_RAX;
ulong uVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
bool bVar5;
if (param_2 < 1) {
pcVar2 = "len >= 1";
uVar3 = 0x4431;
}
else if (param_4 < param_3) {
pcVar2 = "dist <= delta";
uVar3 = 0x4432;
}
else {
uVar1 = param_4 - param_5;
if (param_4 < param_5) {
pcVar2 = "rest <= delta";
uVar3 = 0x4433;
}
else if (param_6 == 0) {
pcVar2 = "ten_k > 0";
uVar3 = 0x4434;
}
else {
uVar4 = param_3 - param_5;
while( true ) {
if (((param_3 <= param_5) || (bVar5 = uVar1 < param_6, uVar1 = uVar1 - param_6, bVar5)) ||
((param_3 <= param_5 + param_6 && (uVar4 <= param_5 + (param_6 - param_3))))) {
return in_RAX;
}
if (param_1[(ulong)(uint)param_2 - 1] == '0') break;
param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1;
uVar4 = uVar4 - param_6;
param_5 = param_5 + param_6;
}
pcVar2 = "buf[len - 1] != \'0\'";
uVar3 = 0x444d;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
45,909 | google::protobuf::compiler::cpp::EnumFieldGenerator::GenerateMergingCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/enum_field.cc | void EnumFieldGenerator::GenerateMergingCode(io::Printer* printer) const {
Formatter format(printer, variables_);
format("_this->_internal_set_$name$(from._internal_$name$());\n");
} | O3 | cpp | google::protobuf::compiler::cpp::EnumFieldGenerator::GenerateMergingCode(google::protobuf::io::Printer*) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e61e
leaq 0xd9668(%rip), %rsi # 0x1cbcb2
movq %rsp, %rdi
callq 0x39938
movq %rbx, %rdi
callq 0x2e5e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e5e0
movq %r14, %rdi
callq 0x1f860
nop
| _ZNK6google8protobuf8compiler3cpp18EnumFieldGenerator19GenerateMergingCodeEPNS0_2io7PrinterE:
push r14
push rbx
sub rsp, 38h
lea rax, [rdi+18h]
lea rbx, [rsp+48h+var_40]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&)
lea rsi, aThisInternalSe; "_this->_internal_set_$name$(from._inter"...
mov rdi, rsp
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::EnumFieldGenerator::GenerateMergingCode(
google::protobuf::compiler::cpp::EnumFieldGenerator *this,
google::protobuf::io::Printer *a2)
{
long long result; // rax
google::protobuf::io::Printer *v3; // [rsp+0h] [rbp-48h] BYREF
_BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF
v3 = a2;
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(
(long long)v4,
(long long)this + 24);
result = google::protobuf::compiler::cpp::Formatter::operator()<>(
&v3,
"_this->_internal_set_$name$(from._internal_$name$());\n");
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v4);
return result;
}
| GenerateMergingCode:
PUSH R14
PUSH RBX
SUB RSP,0x38
LEA RAX,[RDI + 0x18]
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017e61e
LAB_001f2643:
LEA RSI,[0x2cbcb2]
MOV RDI,RSP
CALL 0x00139938
LAB_001f2652:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::EnumFieldGenerator::GenerateMergingCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::EnumFieldGenerator::GenerateMergingCode
(EnumFieldGenerator *this,Printer *param_1)
{
Printer *local_48;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_40 [48];
local_48 = param_1;
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18));
/* try { // try from 001f2643 to 001f2651 has its CatchHandler @ 001f2662 */
Formatter::operator()<>
((Formatter *)&local_48,"_this->_internal_set_$name$(from._internal_$name$());\n");
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_40);
return;
}
| |
45,910 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x2e048
movq %rbx, %rdx
callq 0x2dfad
jmp 0x2e04f
leaq 0x31c29(%rip), %rax # 0x5fc78
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_2E048
mov rdx, rbx
call strmake_root
jmp short loc_2E04F
loc_2E048:
lea rax, asc_5FC74+4; ""
loc_2E04F:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0012e048
MOV RDX,RBX
CALL 0x0012dfad
JMP 0x0012e04f
LAB_0012e048:
LEA RAX,[0x15fc78]
LAB_0012e04f:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_0015fc78;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
| |
45,911 | minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("ExpressionNode.expr is null");
auto result = expr->evaluate(context);
if (result.is_string()) {
out << result.get<std::string>();
} else if (result.is_boolean()) {
out << (result.get<bool>() ? "True" : "False");
} else if (!result.is_null()) {
out << result.dump();
}
} | O2 | cpp | minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x76248
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x63582
movzbl 0x40(%r14), %eax
cmpl $0x4, %eax
je 0x761c7
cmpl $0x3, %eax
jne 0x761ef
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x64434
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x237e0
jmp 0x7622c
leaq 0x28(%rsp), %rdi
callq 0x6437e
leaq 0x3e234(%rip), %rcx # 0xb440c
leaq 0x3e232(%rip), %rsi # 0xb4411
testb %al, %al
cmovneq %rcx, %rsi
movq %rbx, %rdi
callq 0x238d0
jmp 0x76236
testb %al, %al
jne 0x7620b
cmpq $0x0, 0x48(%rsp)
jne 0x7620b
cmpq $0x0, 0x38(%rsp)
jne 0x7620b
cmpq $0x0, 0x58(%rsp)
je 0x76236
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
callq 0x63a00
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x237e0
leaq 0x8(%rsp), %rdi
callq 0x24208
leaq 0x28(%rsp), %rdi
callq 0x63812
addq $0x78, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r14
leaq 0x3f199(%rip), %rsi # 0xb53f3
movq %rax, %rdi
callq 0x23320
movq 0x87d87(%rip), %rsi # 0xfdff0
movq 0x87ce8(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
jmp 0x7627c
jmp 0x7629a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x24208
jmp 0x7629d
jmp 0x7629a
movq %rax, %rbx
movq %r14, %rdi
callq 0x236a0
jmp 0x762a7
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x63812
movq %rbx, %rdi
callq 0x23fc0
nop
| _ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r14
push rbx
sub rsp, 78h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_76248
lea r14, [rsp+88h+var_60]
mov rdi, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
movzx eax, byte ptr [r14+40h]
cmp eax, 4
jz short loc_761C7
cmp eax, 3
jnz short loc_761EF
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea rsi, [rsp+88h+var_80]
mov rdi, rbx
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short loc_7622C
loc_761C7:
lea rdi, [rsp+88h+var_60]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse; "False"
test al, al
cmovnz rsi, rcx
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short loc_76236
loc_761EF:
test al, al
jnz short loc_7620B
cmp [rsp+88h+var_40], 0
jnz short loc_7620B
cmp [rsp+88h+var_50], 0
jnz short loc_7620B
cmp [rsp+88h+var_30], 0
jz short loc_76236
loc_7620B:
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, [rsp+88h+var_80]
mov rdi, rbx
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
loc_7622C:
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_76236:
lea rdi, [rsp+88h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rsp, 78h
pop rbx
pop r14
retn
loc_76248:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpressionnode; "ExpressionNode.expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_7627C
jmp short loc_7629A
loc_7627C:
mov rbx, rax
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7629D
jmp short loc_7629A
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_762A7
loc_7629A:
mov rbx, rax
loc_7629D:
lea rdi, [rsp+88h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_762A7:
mov rdi, rbx
call __Unwind_Resume
| void minja::ExpressionNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
const char *v4; // rsi
std::runtime_error *exception; // r14
_BYTE v6[32]; // [rsp+8h] [rbp-80h] BYREF
_BYTE v7[16]; // [rsp+28h] [rbp-60h] BYREF
long long v8; // [rsp+38h] [rbp-50h]
long long v9; // [rsp+48h] [rbp-40h]
long long v10; // [rsp+58h] [rbp-30h]
char v11; // [rsp+68h] [rbp-20h]
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v7, v3);
if ( v11 == 4 )
{
v4 = "False";
if ( (unsigned __int8)minja::Value::get<bool>((minja::Value *)v7) )
v4 = "True";
std::operator<<<std::char_traits<char>>(a2, v4);
}
else
{
if ( v11 == 3 )
{
minja::Value::get<std::string>((long long)v6, (minja::Value *)v7);
std::operator<<<char>(a2, v6);
LABEL_13:
std::string::~string(v6);
goto LABEL_14;
}
if ( v11 || v9 || v8 || v10 )
{
minja::Value::dump[abi:cxx11]((long long)v6, (long long)v7, 0xFFFFFFFF, 0);
std::operator<<<char>(a2, v6);
goto LABEL_13;
}
}
LABEL_14:
minja::Value::~Value((minja::Value *)v7);
}
| do_render:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x00176248
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x00163582
MOVZX EAX,byte ptr [R14 + 0x40]
CMP EAX,0x4
JZ 0x001761c7
CMP EAX,0x3
JNZ 0x001761ef
LAB_001761a9:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00164434
LAB_001761b8:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001237e0
JMP 0x0017622c
LAB_001761c7:
LEA RDI,[RSP + 0x28]
CALL 0x0016437e
LEA RCX,[0x1b440c]
LEA RSI,[0x1b4411]
TEST AL,AL
CMOVNZ RSI,RCX
MOV RDI,RBX
CALL 0x001238d0
JMP 0x00176236
LAB_001761ef:
TEST AL,AL
JNZ 0x0017620b
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x0017620b
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x0017620b
CMP qword ptr [RSP + 0x58],0x0
JZ 0x00176236
LAB_0017620b:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
PUSH -0x1
POP RDX
XOR ECX,ECX
CALL 0x00163a00
LAB_0017621f:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001237e0
LAB_0017622c:
LEA RDI,[RSP + 0x8]
CALL 0x00124208
LAB_00176236:
LEA RDI,[RSP + 0x28]
CALL 0x00163812
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_00176248:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R14,RAX
LAB_00176253:
LEA RSI,[0x1b53f3]
MOV RDI,RAX
CALL 0x00123320
LAB_00176262:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
|
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
bool bVar1;
runtime_error *this;
char *pcVar2;
string local_80 [32];
Expression local_60 [16];
long local_50;
long local_40;
long local_30;
char local_20;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00176253 to 00176261 has its CatchHandler @ 0017628d */
std::runtime_error::runtime_error(this,"ExpressionNode.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20));
if (local_20 == '\x04') {
/* try { // try from 001761c7 to 001761ec has its CatchHandler @ 0017629a */
bVar1 = Value::get<bool>((Value *)local_60);
pcVar2 = "False";
if (bVar1) {
pcVar2 = "True";
}
std::operator<<((ostream *)param_2,pcVar2);
}
else {
if (local_20 == '\x03') {
/* try { // try from 001761a9 to 001761b7 has its CatchHandler @ 0017628b */
Value::get<std::__cxx11::string>();
/* try { // try from 001761b8 to 001761c4 has its CatchHandler @ 0017627c */
std::operator<<((ostream *)param_2,local_80);
}
else {
if ((((local_20 == '\0') && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0))
goto LAB_00176236;
/* try { // try from 0017620b to 0017621e has its CatchHandler @ 0017627a */
Value::dump_abi_cxx11_((int)local_80,SUB81(local_60,0));
/* try { // try from 0017621f to 0017622b has its CatchHandler @ 00176278 */
std::operator<<((ostream *)param_2,local_80);
}
std::__cxx11::string::~string(local_80);
}
LAB_00176236:
Value::~Value((Value *)local_60);
return;
}
| |
45,912 | freeze_size | eloqsql/mysys/array.c | void freeze_size(DYNAMIC_ARRAY *array)
{
uint elements;
/*
Do nothing if we are using a static buffer
*/
if (array->malloc_flags & MY_INIT_BUFFER_USED)
return;
elements= MY_MAX(array->elements, 1);
if (array->buffer && array->max_element > elements)
{
array->buffer=(uchar*) my_realloc(array->m_psi_key, array->buffer,
elements * array->size_of_element,
MYF(MY_WME | array->malloc_flags));
array->max_element= elements;
}
} | O0 | c | freeze_size:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x84ff2
jmp 0x85070
movq -0x8(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jbe 0x85008
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0x85012
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x85012
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x85070
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0x85070
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x10, %rcx
callq 0x7fca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| freeze_size:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz short loc_84FF2
jmp short loc_85070
loc_84FF2:
mov rax, [rbp+var_8]
cmp dword ptr [rax+8], 1
jbe short loc_85008
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_10], eax
jmp short loc_85012
loc_85008:
mov eax, 1
mov [rbp+var_10], eax
jmp short $+2
loc_85012:
mov eax, [rbp+var_10]
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_85070
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
cmp eax, [rbp+var_C]
jbe short loc_85070
mov rax, [rbp+var_8]
mov edi, [rax+18h]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_C]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
or rcx, 10h
call my_realloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+0Ch], ecx
loc_85070:
add rsp, 10h
pop rbp
retn
| long long freeze_size(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+0h] [rbp-10h]
result = *(_QWORD *)(a1 + 32) & 0x100LL;
if ( !result )
{
if ( *(_DWORD *)(a1 + 8) <= 1u )
v2 = 1;
else
v2 = *(_DWORD *)(a1 + 8);
result = a1;
if ( *(_QWORD *)a1 )
{
result = *(unsigned int *)(a1 + 12);
if ( (unsigned int)result > v2 )
{
*(_QWORD *)a1 = my_realloc(
*(_DWORD *)(a1 + 24),
*(_QWORD *)a1,
*(_DWORD *)(a1 + 20) * v2,
*(_BYTE *)(a1 + 32) | 0x10u);
result = a1;
*(_DWORD *)(a1 + 12) = v2;
}
}
}
return result;
}
| freeze_size:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x00184ff2
JMP 0x00185070
LAB_00184ff2:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8],0x1
JBE 0x00185008
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00185012
LAB_00185008:
MOV EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00185012
LAB_00185012:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00185070
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x00185070
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x10
CALL 0x0017fca0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],ECX
LAB_00185070:
ADD RSP,0x10
POP RBP
RET
|
void freeze_size(long *param_1)
{
long lVar1;
uint local_18;
if ((param_1[4] & 0x100U) == 0) {
if (*(uint *)(param_1 + 1) < 2) {
local_18 = 1;
}
else {
local_18 = *(uint *)(param_1 + 1);
}
if ((*param_1 != 0) && (local_18 < *(uint *)((long)param_1 + 0xc))) {
lVar1 = my_realloc((int)param_1[3],*param_1,local_18 * *(int *)((long)param_1 + 0x14),
param_1[4] | 0x10);
*param_1 = lVar1;
*(uint *)((long)param_1 + 0xc) = local_18;
}
}
return;
}
| |
45,913 | common_embd_similarity_cos(float const*, float const*, int) | monkey531[P]llama/common/common.cpp | float common_embd_similarity_cos(const float * embd1, const float * embd2, int n){
double sum = 0.0;
double sum1 = 0.0;
double sum2 = 0.0;
for (int i = 0; i < n; i++) {
sum += embd1[i] * embd2[i];
sum1 += embd1[i] * embd1[i];
sum2 += embd2[i] * embd2[i];
}
// Handle the case where one or both vectors are zero vectors
if (sum1 == 0.0 || sum2 == 0.0) {
if (sum1 == 0.0 && sum2 == 0.0) {
return 1.0f; // two zero vectors are similar
}
return 0.0f;
}
return sum / (sqrt(sum1) * sqrt(sum2));
} | O3 | cpp | common_embd_similarity_cos(float const*, float const*, int):
subq $0x28, %rsp
testl %edx, %edx
jle 0x23b1f
movl %edx, %eax
xorpd %xmm0, %xmm0
xorpd %xmm4, %xmm4
xorl %ecx, %ecx
movss (%rsi,%rcx,4), %xmm3
movss (%rdi,%rcx,4), %xmm1
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0]
unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
mulps %xmm2, %xmm1
cvtps2pd %xmm1, %xmm1
addpd %xmm1, %xmm0
mulss %xmm3, %xmm3
xorps %xmm1, %xmm1
cvtss2sd %xmm3, %xmm1
addsd %xmm1, %xmm4
incq %rcx
cmpq %rcx, %rax
jne 0x23a9c
xorps %xmm2, %xmm2
movapd %xmm0, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
movapd %xmm4, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rcx
andl $0x1, %ecx
ucomisd %xmm2, %xmm0
jne 0x23afe
jnp 0x23b23
ucomisd %xmm2, %xmm4
jne 0x23b06
jnp 0x23b23
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movapd %xmm0, 0x10(%rsp)
jb 0x23b37
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0x23b50
movb $0x1, %cl
movb $0x1, %al
testb %cl, %al
jne 0x23b2d
xorpd %xmm0, %xmm0
jmp 0x23b8d
movss 0x84107(%rip), %xmm0 # 0xa7c3c
jmp 0x23b8d
movsd %xmm4, 0x8(%rsp)
callq 0x18560
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm4
movapd %xmm0, %xmm2
ucomisd %xmm1, %xmm4
jb 0x23b5f
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0x23b74
movapd %xmm4, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x18560
movsd 0x8(%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm2
unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1]
divsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
addq $0x28, %rsp
retq
| _Z26common_embd_similarity_cosPKfS0_i:
sub rsp, 28h
test edx, edx
jle loc_23B1F
mov eax, edx
xorpd xmm0, xmm0
xorpd xmm4, xmm4
xor ecx, ecx
loc_23A9C:
movss xmm3, dword ptr [rsi+rcx*4]
movss xmm1, dword ptr [rdi+rcx*4]
movaps xmm2, xmm1
shufps xmm2, xmm1, 0
unpcklps xmm1, xmm3
mulps xmm1, xmm2
cvtps2pd xmm1, xmm1
addpd xmm0, xmm1
mulss xmm3, xmm3
xorps xmm1, xmm1
cvtss2sd xmm1, xmm3
addsd xmm4, xmm1
inc rcx
cmp rax, rcx
jnz short loc_23A9C
xorps xmm2, xmm2
movapd xmm1, xmm0
cmpeqsd xmm1, xmm2
movq rax, xmm1
and eax, 1
movapd xmm1, xmm4
cmpeqsd xmm1, xmm2
movq rcx, xmm1
and ecx, 1
ucomisd xmm0, xmm2
jnz short loc_23AFE
jnp short loc_23B23
loc_23AFE:
ucomisd xmm4, xmm2
jnz short loc_23B06
jnp short loc_23B23
loc_23B06:
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
movapd [rsp+28h+var_18], xmm0
jb short loc_23B37
xorps xmm2, xmm2
sqrtsd xmm2, xmm0
jmp short loc_23B50
loc_23B1F:
mov cl, 1
mov al, 1
loc_23B23:
test al, cl
jnz short loc_23B2D
xorpd xmm0, xmm0
jmp short loc_23B8D
loc_23B2D:
movss xmm0, cs:dword_A7C3C
jmp short loc_23B8D
loc_23B37:
movsd [rsp+28h+var_20], xmm4
call _sqrt
xorpd xmm1, xmm1
movsd xmm4, [rsp+28h+var_20]
movapd xmm2, xmm0
loc_23B50:
ucomisd xmm4, xmm1
jb short loc_23B5F
xorps xmm0, xmm0
sqrtsd xmm0, xmm4
jmp short loc_23B74
loc_23B5F:
movapd xmm0, xmm4
movsd [rsp+28h+var_20], xmm2
call _sqrt
movsd xmm2, [rsp+28h+var_20]
loc_23B74:
movapd xmm1, [rsp+28h+var_18]
mulsd xmm2, xmm0
unpckhpd xmm1, xmm1
divsd xmm1, xmm2
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
loc_23B8D:
add rsp, 28h
retn
| float common_embd_similarity_cos(const float *a1, const float *a2, int a3)
{
__m128d v3; // xmm0
__m128d v4; // xmm4
long long i; // rcx
__m128 v6; // xmm3
char v7; // al
char v8; // cl
double v9; // xmm2_8
double v11; // xmm0_8
double v12; // xmm0_8
double v13; // [rsp+8h] [rbp-20h]
__m128d v14; // [rsp+10h] [rbp-18h]
if ( a3 <= 0 )
{
v8 = 1;
v7 = 1;
LABEL_9:
if ( ((unsigned __int8)v8 & (unsigned __int8)v7) != 0 )
return 1.0;
else
return 0.0;
}
v3 = 0LL;
v4 = 0LL;
for ( i = 0LL; i != a3; ++i )
{
v6 = (__m128)LODWORD(a2[i]);
v3 = _mm_add_pd(
v3,
_mm_cvtps_pd(
_mm_mul_ps(
_mm_unpacklo_ps((__m128)LODWORD(a1[i]), v6),
_mm_shuffle_ps((__m128)LODWORD(a1[i]), (__m128)LODWORD(a1[i]), 0))));
v4.m128d_f64[0] = v4.m128d_f64[0] + (float)(v6.m128_f32[0] * v6.m128_f32[0]);
}
v7 = *(_OWORD *)&_mm_cmpeq_sd(v3, (__m128d)0LL) & 1;
v8 = *(_OWORD *)&_mm_cmpeq_sd(v4, (__m128d)0LL) & 1;
if ( v3.m128d_f64[0] == 0.0 || v4.m128d_f64[0] == 0.0 )
goto LABEL_9;
v14 = v3;
if ( v3.m128d_f64[0] < 0.0 )
{
v13 = v4.m128d_f64[0];
v11 = sqrt(v3.m128d_f64[0]);
v4.m128d_f64[0] = v13;
v9 = v11;
}
else
{
v9 = sqrt(v3.m128d_f64[0]);
}
if ( v4.m128d_f64[0] < 0.0 )
v12 = sqrt(v4.m128d_f64[0]);
else
v12 = sqrt(v4.m128d_f64[0]);
return _mm_unpackhi_pd(v14, v14).m128d_f64[0] / (v9 * v12);
}
| common_embd_similarity_cos:
SUB RSP,0x28
TEST EDX,EDX
JLE 0x00123b1f
MOV EAX,EDX
XORPD XMM0,XMM0
XORPD XMM4,XMM4
XOR ECX,ECX
LAB_00123a9c:
MOVSS XMM3,dword ptr [RSI + RCX*0x4]
MOVSS XMM1,dword ptr [RDI + RCX*0x4]
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x0
UNPCKLPS XMM1,XMM3
MULPS XMM1,XMM2
CVTPS2PD XMM1,XMM1
ADDPD XMM0,XMM1
MULSS XMM3,XMM3
XORPS XMM1,XMM1
CVTSS2SD XMM1,XMM3
ADDSD XMM4,XMM1
INC RCX
CMP RAX,RCX
JNZ 0x00123a9c
XORPS XMM2,XMM2
MOVAPD XMM1,XMM0
CMPEQSD XMM1,XMM2
MOVQ RAX,XMM1
AND EAX,0x1
MOVAPD XMM1,XMM4
CMPEQSD XMM1,XMM2
MOVQ RCX,XMM1
AND ECX,0x1
UCOMISD XMM0,XMM2
JNZ 0x00123afe
JNP 0x00123b23
LAB_00123afe:
UCOMISD XMM4,XMM2
JNZ 0x00123b06
JNP 0x00123b23
LAB_00123b06:
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
MOVAPD xmmword ptr [RSP + 0x10],XMM0
JC 0x00123b37
XORPS XMM2,XMM2
SQRTSD XMM2,XMM0
JMP 0x00123b50
LAB_00123b1f:
MOV CL,0x1
MOV AL,0x1
LAB_00123b23:
TEST AL,CL
JNZ 0x00123b2d
XORPD XMM0,XMM0
JMP 0x00123b8d
LAB_00123b2d:
MOVSS XMM0,dword ptr [0x001a7c3c]
JMP 0x00123b8d
LAB_00123b37:
MOVSD qword ptr [RSP + 0x8],XMM4
CALL 0x00118560
XORPD XMM1,XMM1
MOVSD XMM4,qword ptr [RSP + 0x8]
MOVAPD XMM2,XMM0
LAB_00123b50:
UCOMISD XMM4,XMM1
JC 0x00123b5f
XORPS XMM0,XMM0
SQRTSD XMM0,XMM4
JMP 0x00123b74
LAB_00123b5f:
MOVAPD XMM0,XMM4
MOVSD qword ptr [RSP + 0x8],XMM2
CALL 0x00118560
MOVSD XMM2,qword ptr [RSP + 0x8]
LAB_00123b74:
MOVAPD XMM1,xmmword ptr [RSP + 0x10]
MULSD XMM2,XMM0
UNPCKHPD XMM1,XMM1
DIVSD XMM1,XMM2
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
LAB_00123b8d:
ADD RSP,0x28
RET
|
/* common_embd_similarity_cos(float const*, float const*, int) */
float common_embd_similarity_cos(float *param_1,float *param_2,int param_3)
{
float fVar1;
int1 auVar2 [16];
double dVar3;
bool bVar4;
bool bVar5;
ulong uVar6;
float fVar7;
double dVar8;
double dVar9;
double dStack_10;
if (param_3 < 1) {
bVar5 = true;
bVar4 = true;
}
else {
dVar8 = 0.0;
dVar3 = 0.0;
dVar9 = 0.0;
uVar6 = 0;
do {
fVar7 = param_2[uVar6];
fVar1 = param_1[uVar6];
dVar8 = dVar8 + (double)(fVar1 * fVar1);
dVar3 = dVar3 + (double)(fVar7 * fVar1);
dVar9 = dVar9 + (double)(fVar7 * fVar7);
uVar6 = uVar6 + 1;
} while ((uint)param_3 != uVar6);
bVar4 = dVar8 == 0.0;
bVar5 = dVar9 == 0.0;
if (((dVar8 != 0.0) || (NAN(dVar8))) && ((dVar9 != 0.0 || (NAN(dVar9))))) {
auVar2._8_4_ = SUB84(dVar3,0);
auVar2._0_8_ = dVar8;
auVar2._12_4_ = (int)((ulong)dVar3 >> 0x20);
dStack_10 = auVar2._8_8_;
if (dVar8 < 0.0) {
dVar8 = sqrt(dVar8);
}
else {
dVar8 = SQRT(dVar8);
}
if (dVar9 < 0.0) {
dVar9 = sqrt(dVar9);
}
else {
dVar9 = SQRT(dVar9);
}
return (float)(dStack_10 / (dVar8 * dVar9));
}
}
fVar7 = DAT_001a7c3c;
if (!(bool)(bVar4 & bVar5)) {
fVar7 = 0.0;
}
return fVar7;
}
| |
45,914 | hi0bits | eloqsql/strings/dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O3 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setb %cl
cmovael %edi, %eax
shll $0x4, %ecx
movl %eax, %edx
shll $0x8, %edx
cmpl $0x1000000, %eax # imm = 0x1000000
cmovael %eax, %edx
leal 0x8(%rcx), %eax
cmovael %ecx, %eax
movl %edx, %ecx
shll $0x4, %ecx
cmpl $0x10000000, %edx # imm = 0x10000000
cmovael %edx, %ecx
leal 0x4(%rax), %edx
cmovael %eax, %edx
leal (,%rcx,4), %esi
movl $0x40000000, %eax # imm = 0x40000000
cmpl %eax, %ecx
cmovael %ecx, %esi
leal 0x2(%rdx), %ecx
cmovael %edx, %ecx
leal 0x1(%rcx), %edx
cmpl %eax, %esi
movl $0x20, %eax
cmovael %edx, %eax
testl %esi, %esi
cmovsl %ecx, %eax
popq %rbp
retq
| hi0bits:
push rbp
mov rbp, rsp
mov eax, edi
shl eax, 10h
xor ecx, ecx
cmp edi, 10000h
setb cl
cmovnb eax, edi
shl ecx, 4
mov edx, eax
shl edx, 8
cmp eax, 1000000h
cmovnb edx, eax
lea eax, [rcx+8]
cmovnb eax, ecx
mov ecx, edx
shl ecx, 4
cmp edx, 10000000h
cmovnb ecx, edx
lea edx, [rax+4]
cmovnb edx, eax
lea esi, ds:0[rcx*4]
mov eax, 40000000h
cmp ecx, eax
cmovnb esi, ecx
lea ecx, [rdx+2]
cmovnb ecx, edx
lea edx, [rcx+1]
cmp esi, eax
mov eax, 20h ; ' '
cmovnb eax, edx
test esi, esi
cmovs eax, ecx
pop rbp
retn
| long long hi0bits(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // edx
bool v3; // cf
int v4; // eax
unsigned int v5; // ecx
bool v6; // cf
int v7; // edx
int v8; // esi
bool v9; // cf
unsigned int v10; // ecx
long long result; // rax
v1 = a1 << 16;
if ( a1 >= 0x10000 )
v1 = a1;
v2 = v1 << 8;
v3 = v1 < 0x1000000;
if ( v1 >= 0x1000000 )
v2 = v1;
v4 = 16 * (a1 < 0x10000) + 8;
if ( !v3 )
v4 = 16 * (a1 < 0x10000);
v5 = 16 * v2;
v6 = v2 < 0x10000000;
if ( v2 >= 0x10000000 )
v5 = v2;
v7 = v4 + 4;
if ( !v6 )
v7 = v4;
v8 = 4 * v5;
v9 = v5 < 0x40000000;
if ( v5 >= 0x40000000 )
v8 = v5;
v10 = v7 + 2;
if ( !v9 )
v10 = v7;
result = 32LL;
if ( (unsigned int)v8 >= 0x40000000 )
result = v10 + 1;
if ( v8 < 0 )
return v10;
return result;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETC CL
CMOVNC EAX,EDI
SHL ECX,0x4
MOV EDX,EAX
SHL EDX,0x8
CMP EAX,0x1000000
CMOVNC EDX,EAX
LEA EAX,[RCX + 0x8]
CMOVNC EAX,ECX
MOV ECX,EDX
SHL ECX,0x4
CMP EDX,0x10000000
CMOVNC ECX,EDX
LEA EDX,[RAX + 0x4]
CMOVNC EDX,EAX
LEA ESI,[RCX*0x4]
MOV EAX,0x40000000
CMP ECX,EAX
CMOVNC ESI,ECX
LEA ECX,[RDX + 0x2]
CMOVNC ECX,EDX
LEA EDX,[RCX + 0x1]
CMP ESI,EAX
MOV EAX,0x20
CMOVNC EAX,EDX
TEST ESI,ESI
CMOVS EAX,ECX
POP RBP
RET
|
int hi0bits(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uVar2 = param_1 << 0x10;
if (param_1 >= 0x10000) {
uVar2 = param_1;
}
iVar4 = (uint)(param_1 < 0x10000) * 0x10;
uVar1 = uVar2 << 8;
if (0xffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 8;
if (0xffffff < uVar2) {
iVar3 = iVar4;
}
uVar2 = uVar1 << 4;
if (0xfffffff < uVar1) {
uVar2 = uVar1;
}
iVar4 = iVar3 + 4;
if (0xfffffff < uVar1) {
iVar4 = iVar3;
}
uVar1 = uVar2 * 4;
if (0x3fffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 2;
if (0x3fffffff < uVar2) {
iVar3 = iVar4;
}
iVar4 = 0x20;
if (0x3fffffff < uVar1) {
iVar4 = iVar3 + 1;
}
if ((int)uVar1 < 0) {
iVar4 = iVar3;
}
return iVar4;
}
| |
45,915 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x6e6c5
leaq 0x48002(%rip), %rcx # 0xb66a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x6e6ba
movzbl 0x8(%r14), %eax
jmp 0x6e6ba
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x234b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x469c8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x492cd(%rip), %rsi # 0xb79b4
leaq 0x10(%rsp), %rdi
callq 0x665bd
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x664d0
xorl %ebp, %ebp
leaq 0x91826(%rip), %rsi # 0xfff38
leaq -0x2b1c1(%rip), %rdx # 0x43558
movq %rbx, %rdi
callq 0x24050
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24348
testb %bpl, %bpl
jne 0x6e738
jmp 0x6e740
movq %rax, %r14
movq %rbx, %rdi
callq 0x236f0
movq %r14, %rdi
callq 0x240e0
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_6E6A5; jumptable 000000000006E6A5 default case
lea rcx, jpt_6E6A5
movsxd rax, ds:(jpt_6E6A5 - 0B66A0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6E6A7:
mov eax, [r14+8]; jumptable 000000000006E6A5 cases 5,6
jmp short loc_6E6BA
loc_6E6AD:
movzx eax, byte ptr [r14+8]; jumptable 000000000006E6A5 case 4
jmp short loc_6E6BA
loc_6E6B4:
cvttsd2si eax, qword ptr [r14+8]; jumptable 000000000006E6A5 case 7
loc_6E6BA:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_6E6A5:
push 20h ; ' '; jumptable 000000000006E6A5 default case
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6E738
jmp short loc_6E740
mov r14, rax
loc_6E738:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6E740:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
_DWORD *a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF
switch ( *a1 )
{
case 4u:
result = a1[8];
break;
case 5u:
case 6u:
result = *((unsigned int *)a1 + 2);
break;
case 7u:
result = (unsigned int)(int)*((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be number, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(long long)v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x0016e6c5
LEA RCX,[0x1b66a0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x0016e6ba
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x0016e6ba
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_0016e6ba:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
PUSH 0x20
POP RDI
CALL 0x001234b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x001469c8
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0016e6e0:
LEA RSI,[0x1b79b4]
LEA RDI,[RSP + 0x10]
CALL 0x001665bd
MOV BPL,0x1
LAB_0016e6f4:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001664d0
XOR EBP,EBP
LEA RSI,[0x1fff38]
LEA RDX,[0x143558]
MOV RDI,RBX
CALL 0x00124050
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0016e6e0 to 0016e6f0 has its CatchHandler @ 0016e735 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0016e6f4 to 0016e720 has its CatchHandler @ 0016e721 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = uVar1;
return;
}
| |
45,916 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x9549d
leaq 0x5e23a(%rip), %rcx # 0xf36b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x95492
movzbl 0x8(%r14), %eax
jmp 0x95492
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b480
movq %rax, %rbx
movq %r14, %rdi
callq 0x63c50
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x5f503(%rip), %rsi # 0xf49c4
leaq 0x10(%rsp), %rdi
callq 0x8b2f7
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x8b128
xorl %ebp, %ebp
leaq 0x99a5c(%rip), %rsi # 0x12ef48
leaq -0x3566d(%rip), %rdx # 0x5fe86
movq %rbx, %rdi
callq 0x1c040
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95519
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b930
testb %bpl, %bpl
jne 0x95523
jmp 0x9552b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6c0
movq %r14, %rdi
callq 0x1c0d0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_9547D; jumptable 000000000009547D default case
lea rcx, jpt_9547D
movsxd rax, ds:(jpt_9547D - 0F36B0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9547F:
mov eax, [r14+8]; jumptable 000000000009547D cases 5,6
jmp short loc_95492
loc_95485:
movzx eax, byte ptr [r14+8]; jumptable 000000000009547D case 4
jmp short loc_95492
loc_9548C:
cvttsd2si eax, qword ptr [r14+8]; jumptable 000000000009547D case 7
loc_95492:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_9547D:
mov edi, 20h ; ' '; jumptable 000000000009547D default case
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_95519
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95519:
test bpl, bpl
jnz short loc_95523
jmp short loc_9552B
mov r14, rax
loc_95523:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_9552B:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
_DWORD *a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
switch ( *a1 )
{
case 4u:
result = a1[8];
break;
case 5u:
case 6u:
result = *((unsigned int *)a1 + 2);
break;
case 7u:
result = (unsigned int)(int)*((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be number, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x0019549d
LEA RCX,[0x1f36b0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x00195492
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x00195492
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_00195492:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x0011b480
MOV RBX,RAX
MOV RDI,R14
CALL 0x00163c50
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001954ba:
LEA RSI,[0x1f49c4]
LEA RDI,[RSP + 0x10]
CALL 0x0018b2f7
MOV BPL,0x1
LAB_001954ce:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0018b128
XOR EBP,EBP
LEA RSI,[0x22ef48]
LEA RDX,[0x15fe86]
MOV RDI,RBX
CALL 0x0011c040
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001954ba to 001954ca has its CatchHandler @ 00195520 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001954ce to 001954fa has its CatchHandler @ 001954fb */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = uVar1;
return;
}
| |
45,917 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) | monkey531[P]llama/common/json.hpp | serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
subq $0x88, %rsp
movb %dl, %al
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movb %al, 0x77(%rsp)
movl %ecx, 0x70(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x193ac0
movq 0x40(%rsp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x5a5b0
callq 0x5a140
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x50(%rax)
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, 0x48(%rsp)
movq 0x50(%rax), %rax
cmpq $0x0, 0x8(%rax)
jne 0x191b45
xorl %eax, %eax
movb %al, 0x3f(%rsp)
jmp 0x191b67
movq 0x40(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
movl %eax, 0x6c(%rsp)
leaq 0x6c(%rsp), %rdi
callq 0xa78e0
movb %al, 0x3f(%rsp)
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movb 0x3f(%rsp), %dl
movb %dl, (%rcx)
movq %rax, %rcx
addq $0x59, %rcx
movq %rcx, 0x30(%rsp)
movq 0x50(%rax), %rax
cmpq $0x0, (%rax)
jne 0x191b95
xorl %eax, %eax
movb %al, 0x2f(%rsp)
jmp 0x191bb6
movq 0x40(%rsp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xa78e0
movb %al, 0x2f(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rax
movb 0x2f(%rsp), %cl
movb %cl, (%rax)
addq $0x5a, %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
movq %rdx, 0x10(%rsp)
callq 0x5a5b0
movq 0x40(%rsp), %rax
movb 0x77(%rsp), %cl
movb %cl, 0x25a(%rax)
movq %rax, %rcx
addq $0x260, %rcx # imm = 0x260
movq %rcx, 0x8(%rsp)
movsbl 0x25a(%rax), %eax
movl %eax, 0x1c(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5b260
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq 0x20(%rsp), %rcx
callq 0x93830
jmp 0x191c2d
leaq 0x67(%rsp), %rdi
callq 0x5b6d0
movq 0x40(%rsp), %rax
movl 0x70(%rsp), %ecx
movl %ecx, 0x280(%rax)
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x67(%rsp), %rdi
callq 0x5b6d0
movq 0x40(%rsp), %rdi
callq 0x191c80
movq 0x58(%rsp), %rdi
callq 0x5ac70
nopw (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
sub rsp, 88h
mov al, dl
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_11], al
mov [rsp+88h+var_18], ecx
mov rdi, [rsp+88h+var_8]
mov [rsp+88h+var_48], rdi
call _ZNSt10shared_ptrIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEEEC2EOS5_; std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>::shared_ptr(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>&&)
mov rdi, [rsp+88h+var_48]
add rdi, 10h
xor esi, esi
mov edx, 40h ; '@'
call _memset
call _localeconv
mov rcx, rax
mov rax, [rsp+88h+var_48]
mov [rax+50h], rcx
mov rcx, rax
add rcx, 58h ; 'X'
mov [rsp+88h+var_40], rcx
mov rax, [rax+50h]
cmp qword ptr [rax+8], 0
jnz short loc_191B45
xor eax, eax
mov [rsp+88h+var_49], al
jmp short loc_191B67
loc_191B45:
mov rax, [rsp+88h+var_48]
mov rax, [rax+50h]
mov rax, [rax+8]
movsx eax, byte ptr [rax]
mov [rsp+88h+var_1C], eax
lea rdi, [rsp+88h+var_1C]
call _ZNSt11char_traitsIcE12to_char_typeERKi; std::char_traits<char>::to_char_type(int const&)
mov [rsp+88h+var_49], al
loc_191B67:
mov rax, [rsp+88h+var_48]
mov rcx, [rsp+88h+var_40]
mov dl, [rsp+88h+var_49]
mov [rcx], dl
mov rcx, rax
add rcx, 59h ; 'Y'
mov [rsp+88h+var_58], rcx
mov rax, [rax+50h]
cmp qword ptr [rax], 0
jnz short loc_191B95
xor eax, eax
mov [rsp+88h+var_59], al
jmp short loc_191BB6
loc_191B95:
mov rax, [rsp+88h+var_48]
mov rax, [rax+50h]
mov rax, [rax]
movsx eax, byte ptr [rax]
mov [rsp+88h+var_20], eax
lea rdi, [rsp+88h+var_20]
call _ZNSt11char_traitsIcE12to_char_typeERKi; std::char_traits<char>::to_char_type(int const&)
mov [rsp+88h+var_59], al
loc_191BB6:
mov rdi, [rsp+88h+var_48]
mov rax, [rsp+88h+var_58]
mov cl, [rsp+88h+var_59]
mov [rax], cl
add rdi, 5Ah ; 'Z'
xor esi, esi
mov edx, 200h
mov [rsp+88h+var_78], rdx
call _memset
mov rax, [rsp+88h+var_48]
mov cl, [rsp+88h+var_11]
mov [rax+25Ah], cl
mov rcx, rax
add rcx, 260h
mov [rsp+88h+var_80], rcx
movsx eax, byte ptr [rax+25Ah]
mov [rsp+88h+var_6C], eax
lea rdi, [rsp+88h+var_21]
mov [rsp+88h+var_68], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+88h+var_80]
mov rsi, [rsp+88h+var_78]
mov edx, [rsp+88h+var_6C]
mov rcx, [rsp+88h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
jmp short $+2
loc_191C2D:
lea rdi, [rsp+88h+var_21]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+88h+var_48]
mov ecx, [rsp+88h+var_18]
mov [rax+280h], ecx
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_5F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_38]
call _ZNSt10shared_ptrIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEEED2Ev; std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>::~shared_ptr()
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
long long a2,
char a3,
int a4)
{
long long result; // rax
char v5; // [rsp+1Ch] [rbp-6Ch]
char v6; // [rsp+2Fh] [rbp-59h]
char v7; // [rsp+3Fh] [rbp-49h]
char v8; // [rsp+67h] [rbp-21h] BYREF
unsigned int v9; // [rsp+68h] [rbp-20h] BYREF
unsigned int v10; // [rsp+6Ch] [rbp-1Ch] BYREF
int v11; // [rsp+70h] [rbp-18h]
char v12; // [rsp+77h] [rbp-11h]
long long v13; // [rsp+78h] [rbp-10h]
long long v14; // [rsp+80h] [rbp-8h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>::shared_ptr();
memset(a1 + 16, 0LL, 64LL);
*(_QWORD *)(a1 + 80) = localeconv();
if ( *(_QWORD *)(*(_QWORD *)(a1 + 80) + 8LL) )
{
v10 = **(char **)(*(_QWORD *)(a1 + 80) + 8LL);
v7 = std::char_traits<char>::to_char_type(&v10);
}
else
{
v7 = 0;
}
*(_BYTE *)(a1 + 88) = v7;
if ( **(_QWORD **)(a1 + 80) )
{
v9 = ***(char ***)(a1 + 80);
v6 = std::char_traits<char>::to_char_type(&v9);
}
else
{
v6 = 0;
}
*(_BYTE *)(a1 + 89) = v6;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = v12;
v5 = *(_BYTE *)(a1 + 602);
std::allocator<char>::allocator(&v8, 0LL);
std::string::basic_string<std::allocator<char>>(a1 + 608, 512LL, v5, (long long)&v8);
std::allocator<char>::~allocator(&v8);
result = a1;
*(_DWORD *)(a1 + 640) = v11;
return result;
}
| |||
45,918 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) | monkey531[P]llama/common/json.hpp | serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
andq $0x0, 0x8(%rdi)
movups (%rsi), %xmm0
andq $0x0, 0x8(%rsi)
movups %xmm0, (%rdi)
andq $0x0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x24290
movq %rax, 0x50(%r14)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x89663
movb (%rcx), %cl
jmp 0x89665
xorl %ecx, %ecx
movb %cl, 0x58(%r14)
movq (%rax), %rax
testq %rax, %rax
je 0x89675
movb (%rax), %al
jmp 0x89677
xorl %eax, %eax
leaq 0x8(%r14), %r15
movb %al, 0x59(%r14)
leaq 0x5a(%r14), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x23560
movb %bpl, 0x25a(%r14)
leaq 0x260(%r14), %rdi
leaq 0x270(%r14), %rax
movq %rax, 0x260(%r14)
movsbl %bpl, %edx
movl $0x200, %esi # imm = 0x200
callq 0x23ac0
movl %ebx, 0x280(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x2adb8
movq %rbx, %rdi
callq 0x240e0
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, ecx
mov ebp, edx
mov r14, rdi
and qword ptr [rdi+8], 0
movups xmm0, xmmword ptr [rsi]
and qword ptr [rsi+8], 0
movups xmmword ptr [rdi], xmm0
and qword ptr [rsi], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [r14+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_89663
mov cl, [rcx]
jmp short loc_89665
loc_89663:
xor ecx, ecx
loc_89665:
mov [r14+58h], cl
mov rax, [rax]
test rax, rax
jz short loc_89675
mov al, [rax]
jmp short loc_89677
loc_89675:
xor eax, eax
loc_89677:
lea r15, [r14+8]
mov [r14+59h], al
lea rdi, [r14+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [r14+25Ah], bpl
lea rdi, [r14+260h]
lea rax, [r14+270h]
mov [r14+260h], rax
movsx edx, bpl
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [r14+280h], ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
__int128 v6; // xmm0
long long v7; // rax
char *v8; // rcx
char v9; // cl
char *v10; // rax
char v11; // al
long long result; // rax
*(_QWORD *)(a1 + 8) = 0LL;
v6 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v6;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v7 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v7;
v8 = *(char **)(v7 + 8);
if ( v8 )
v9 = *v8;
else
v9 = 0;
*(_BYTE *)(a1 + 88) = v9;
v10 = *(char **)v7;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
| serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ECX
MOV EBP,EDX
MOV R14,RDI
AND qword ptr [RDI + 0x8],0x0
MOVUPS XMM0,xmmword ptr [RSI]
AND qword ptr [RSI + 0x8],0x0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RSI],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x00124290
MOV qword ptr [R14 + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x00189663
MOV CL,byte ptr [RCX]
JMP 0x00189665
LAB_00189663:
XOR ECX,ECX
LAB_00189665:
MOV byte ptr [R14 + 0x58],CL
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00189675
MOV AL,byte ptr [RAX]
JMP 0x00189677
LAB_00189675:
XOR EAX,EAX
LAB_00189677:
LEA R15,[R14 + 0x8]
MOV byte ptr [R14 + 0x59],AL
LEA RDI,[R14 + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x00123560
MOV byte ptr [R14 + 0x25a],BPL
LEA RDI,[R14 + 0x260]
LEA RAX,[R14 + 0x270]
MOV qword ptr [R14 + 0x260],RAX
LAB_001896ab:
MOVSX EDX,BPL
MOV ESI,0x200
CALL 0x00123ac0
LAB_001896b9:
MOV dword ptr [R14 + 0x280],EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 *param_2,
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_3,int4 param_4)
{
int8 uVar1;
lconv *plVar2;
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
sVar3;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar2 = localeconv();
*(lconv **)(this + 0x50) = plVar2;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar2->thousands_sep ==
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar3 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
}
else {
sVar3 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar2->thousands_sep;
}
this[0x58] = sVar3;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar2->decimal_point ==
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar3 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
}
else {
sVar3 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar2->decimal_point;
}
this[0x59] = sVar3;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260) = this + 0x270;
/* try { // try from 001896ab to 001896b8 has its CatchHandler @ 001896cb */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
| |
45,919 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) | monkey531[P]llama/common/json.hpp | serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x1c260
movq %rax, 0x50(%rbx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xbaba7
movb (%rcx), %r15b
movb %r15b, 0x58(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0xbabb7
movb (%rax), %al
jmp 0xbabb9
xorl %eax, %eax
movb %al, 0x59(%rbx)
leaq 0x5a(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x1b530
movb %r14b, 0x25a(%rbx)
leaq 0x260(%rbx), %rdi
leaq 0x270(%rbx), %rax
movq %rax, 0x260(%rbx)
movsbl %r14b, %edx
movl $0x200, %esi # imm = 0x200
callq 0x1baa0
movl %ebp, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xbac18
callq 0x267a6
movq %r14, %rdi
callq 0x1c0d0
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r14d, edx
mov rbx, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [rbx+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_BABA7
mov r15b, [rcx]
loc_BABA7:
mov [rbx+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_BABB7
mov al, [rax]
jmp short loc_BABB9
loc_BABB7:
xor eax, eax
loc_BABB9:
mov [rbx+59h], al
lea rdi, [rbx+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [rbx+25Ah], r14b
lea rdi, [rbx+260h]
lea rax, [rbx+270h]
mov [rbx+260h], rax
movsx edx, r14b
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [rbx+280h], ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_BAC18
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BAC18:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
| serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14D,EDX
MOV RBX,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x0011c260
MOV qword ptr [RBX + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x001baba7
MOV R15B,byte ptr [RCX]
LAB_001baba7:
MOV byte ptr [RBX + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001babb7
MOV AL,byte ptr [RAX]
JMP 0x001babb9
LAB_001babb7:
XOR EAX,EAX
LAB_001babb9:
MOV byte ptr [RBX + 0x59],AL
LEA RDI,[RBX + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x0011b530
MOV byte ptr [RBX + 0x25a],R14B
LEA RDI,[RBX + 0x260]
LEA RAX,[RBX + 0x270]
MOV qword ptr [RBX + 0x260],RAX
LAB_001babe8:
MOVSX EDX,R14B
MOV ESI,0x200
CALL 0x0011baa0
LAB_001babf6:
MOV dword ptr [RBX + 0x280],EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 *param_2,
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_3,int4 param_4)
{
int8 uVar1;
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
sVar2;
lconv *plVar3;
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep !=
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point ==
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
}
else {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260) = this + 0x270;
/* try { // try from 001babe8 to 001babf5 has its CatchHandler @ 001bac07 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
| |
45,920 | table_setup_objects::delete_row_values(TABLE*, unsigned char const*, Field**) | eloqsql/storage/perfschema/table_setup_objects.cc | int table_setup_objects::delete_row_values(TABLE *table,
const unsigned char *buf,
Field **fields)
{
assert(m_row_exists);
CHARSET_INFO *cs= &my_charset_utf8mb3_bin;
enum_object_type object_type= OBJECT_TYPE_TABLE;
String object_schema(m_row.m_schema_name, m_row.m_schema_name_length, cs);
String object_name(m_row.m_object_name, m_row.m_object_name_length, cs);
int result= delete_setup_object(object_type, &object_schema, &object_name);
if (result == 0)
result= update_derived_flags();
return result;
} | O0 | cpp | table_setup_objects::delete_row_values(TABLE*, unsigned char const*, Field**):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x8b7d03(%rip), %rcx # 0x15b2080
movq %rcx, -0x28(%rbp)
movl $0x4, -0x2c(%rbp)
movq %rax, %rsi
addq $0x2c, %rsi
movl 0xec(%rax), %eax
movl %eax, %edx
movq -0x28(%rbp), %rcx
leaq -0x50(%rbp), %rdi
callq 0x493620
movq -0x88(%rbp), %rax
movq %rax, %rsi
addq $0xf0, %rsi
movl 0x1b0(%rax), %eax
movl %eax, %edx
movq -0x28(%rbp), %rcx
leaq -0x70(%rbp), %rdi
callq 0x493620
jmp 0xcfa3cc
movl -0x2c(%rbp), %edi
leaq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xccf640
movl %eax, -0x8c(%rbp)
jmp 0xcfa3e4
movl -0x8c(%rbp), %eax
movl %eax, -0x80(%rbp)
cmpl $0x0, -0x80(%rbp)
jne 0xcfa430
callq 0xcf9c60
movl %eax, -0x90(%rbp)
jmp 0xcfa400
movl -0x90(%rbp), %eax
movl %eax, -0x80(%rbp)
jmp 0xcfa430
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xcfa45a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x48e100
jmp 0xcfa45a
movl -0x80(%rbp), %eax
movl %eax, -0x94(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x48e100
leaq -0x50(%rbp), %rdi
callq 0x48e100
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x48e100
movq -0x78(%rbp), %rdi
callq 0x433ff0
nopl (%rax)
| _ZN19table_setup_objects17delete_row_valuesEP5TABLEPKhPP5Field:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov [rbp+var_88], rax
lea rcx, my_charset_utf8mb3_bin
mov [rbp+var_28], rcx
mov [rbp+var_2C], 4
mov rsi, rax
add rsi, 2Ch ; ','; char *
mov eax, [rax+0ECh]
mov edx, eax; unsigned __int64
mov rcx, [rbp+var_28]; charset_info_st *
lea rdi, [rbp+var_50]; this
call _ZN6StringC2EPcmPK15charset_info_st; String::String(char *,ulong,charset_info_st const*)
mov rax, [rbp+var_88]
mov rsi, rax
add rsi, 0F0h; char *
mov eax, [rax+1B0h]
mov edx, eax; unsigned __int64
mov rcx, [rbp+var_28]; charset_info_st *
lea rdi, [rbp+var_70]; this
call _ZN6StringC2EPcmPK15charset_info_st; String::String(char *,ulong,charset_info_st const*)
jmp short $+2
loc_CFA3CC:
mov edi, [rbp+var_2C]
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_70]
call _Z19delete_setup_object16enum_object_typePK6StringS2_; delete_setup_object(enum_object_type,String const*,String const*)
mov [rbp+var_8C], eax
jmp short $+2
loc_CFA3E4:
mov eax, [rbp+var_8C]
mov [rbp+var_80], eax
cmp [rbp+var_80], 0
jnz short loc_CFA430
call _Z20update_derived_flagsv; update_derived_flags(void)
mov [rbp+var_90], eax
jmp short $+2
loc_CFA400:
mov eax, [rbp+var_90]
mov [rbp+var_80], eax
jmp short loc_CFA430
mov rcx, rax
mov eax, edx
mov [rbp+var_78], rcx
mov [rbp+var_7C], eax
jmp short loc_CFA45A
mov rcx, rax
mov eax, edx
mov [rbp+var_78], rcx
mov [rbp+var_7C], eax
lea rdi, [rbp+var_70]; void *
call _ZN6StringD2Ev; String::~String()
jmp short loc_CFA45A
loc_CFA430:
mov eax, [rbp+var_80]
mov [rbp+var_94], eax
lea rdi, [rbp+var_70]; void *
call _ZN6StringD2Ev; String::~String()
lea rdi, [rbp+var_50]; void *
call _ZN6StringD2Ev; String::~String()
mov eax, [rbp+var_94]
add rsp, 0A0h
pop rbp
retn
loc_CFA45A:
lea rdi, [rbp+var_50]; void *
call _ZN6StringD2Ev; String::~String()
mov rdi, [rbp+var_78]
call __Unwind_Resume
| long long table_setup_objects::delete_row_values(
table_setup_objects *this,
TABLE *a2,
const unsigned __int8 *a3,
Field **a4)
{
PFS_thread *v4; // rdi
unsigned int updated; // [rsp+20h] [rbp-80h]
char v7[32]; // [rsp+30h] [rbp-70h] BYREF
char v8[36]; // [rsp+50h] [rbp-50h] BYREF
unsigned int v9; // [rsp+74h] [rbp-2Ch]
charset_info_st *v10; // [rsp+78h] [rbp-28h]
Field **v11; // [rsp+80h] [rbp-20h]
const unsigned __int8 *v12; // [rsp+88h] [rbp-18h]
TABLE *v13; // [rsp+90h] [rbp-10h]
table_setup_objects *v14; // [rsp+98h] [rbp-8h]
v14 = this;
v13 = a2;
v12 = a3;
v11 = a4;
v10 = (charset_info_st *)my_charset_utf8mb3_bin;
v9 = 4;
String::String(
(String *)v8,
(char *)this + 44,
*((unsigned int *)this + 59),
(const charset_info_st *)my_charset_utf8mb3_bin);
String::String((String *)v7, (char *)this + 240, *((unsigned int *)this + 108), v10);
v4 = (PFS_thread *)v9;
updated = delete_setup_object((PFS_thread *)v9, (long long)v8, (long long)v7);
if ( !updated )
updated = update_derived_flags(v4);
String::~String(v7);
String::~String(v8);
return updated;
}
| init_state_maps:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x00d1b340
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x80],RAX
CMP RAX,0x0
JNZ 0x00cfa389
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00cfa5b6
LAB_00cfa389:
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x100
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV dword ptr [RBP + -0x14],0x0
LAB_00cfa3aa:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x00cfa473
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x3
CMP EAX,0x0
JZ 0x00cfa3e2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x00cfa463
LAB_00cfa3e2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00cfa40a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0xe
JMP 0x00cfa461
LAB_00cfa40a:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOVZX ESI,AL
CALL 0x00cfa690
CMP AL,0x0
JZ 0x00cfa42a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x00cfa45f
LAB_00cfa42a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00cfa452
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1a
JMP 0x00cfa45d
LAB_00cfa452:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1
LAB_00cfa45d:
JMP 0x00cfa45f
LAB_00cfa45f:
JMP 0x00cfa461
LAB_00cfa461:
JMP 0x00cfa463
LAB_00cfa463:
JMP 0x00cfa465
LAB_00cfa465:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00cfa3aa
LAB_00cfa473:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x24],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5f],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x27],0xa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2e],0x10
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x21],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3d],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3e],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3c],0x9
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7c],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x26],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x23],0xb
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3b],0x16
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3a],0x17
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x12
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5c],0x13
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2f],0x14
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2a],0x15
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x40],0x18
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x60],0x1b
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x22],0x21
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2d],0x22
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2c],0x24
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3f],0x23
MOV dword ptr [RBP + -0x14],0x0
LAB_00cfa531:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x00cfa582
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV AL,0x1
CMP ECX,0x2
MOV byte ptr [RBP + -0x29],AL
JZ 0x00cfa563
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xe
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_00cfa563:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00cfa531
LAB_00cfa582:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x58],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x78],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x42],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x62],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x4e],0x20
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x6e],0x20
MOV byte ptr [RBP + -0x1],0x0
LAB_00cfa5b6:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 init_state_maps(long param_1)
{
char cVar1;
int1 *puVar2;
bool local_31;
uint local_1c;
int1 local_9;
puVar2 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar2;
if (puVar2 == (int1 *)0x0) {
local_9 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar2 + 0x100;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) {
cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff);
if (cVar1 == '\0') {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) {
puVar2[local_1c] = 1;
}
else {
puVar2[local_1c] = 0x1a;
}
}
else {
puVar2[local_1c] = 2;
}
}
else {
puVar2[local_1c] = 0xe;
}
}
else {
puVar2[local_1c] = 2;
}
}
puVar2[0x24] = 2;
puVar2[0x5f] = 2;
puVar2[0x27] = 10;
puVar2[0x2e] = 0x10;
puVar2[0x21] = 8;
puVar2[0x3d] = 8;
puVar2[0x3e] = 8;
puVar2[0x3c] = 9;
puVar2[0x7c] = 0x11;
puVar2[0x26] = 0x11;
puVar2[0x23] = 0xb;
puVar2[0x3b] = 0x16;
puVar2[0x3a] = 0x17;
*puVar2 = 0x12;
puVar2[0x5c] = 0x13;
puVar2[0x2f] = 0x14;
puVar2[0x2a] = 0x15;
puVar2[0x40] = 0x18;
puVar2[0x60] = 0x1b;
puVar2[0x22] = 0x21;
puVar2[0x2d] = 0x22;
puVar2[0x2c] = 0x24;
puVar2[0x3f] = 0x23;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
local_31 = true;
if (puVar2[local_1c] != '\x02') {
local_31 = puVar2[local_1c] == '\x0e';
}
(puVar2 + 0x100)[local_1c] = local_31;
}
puVar2[0x58] = 0x1e;
puVar2[0x78] = 0x1e;
puVar2[0x42] = 0x1f;
puVar2[0x62] = 0x1f;
puVar2[0x4e] = 0x20;
puVar2[0x6e] = 0x20;
local_9 = 0;
}
return local_9;
}
| |
45,921 | ma_apply_redo_index | eloqsql/storage/maria/ma_key_recover.c | uint _ma_apply_redo_index(MARIA_HA *info,
LSN lsn, const uchar *header, uint head_length)
{
MARIA_SHARE *share= info->s;
pgcache_page_no_t page_pos= page_korr(header);
MARIA_PINNED_PAGE page_link;
uchar *buff;
const uchar *header_end= header + head_length;
uint page_offset= 0, org_page_length;
uint page_length, keypage_header, keynr;
uint max_page_size= share->max_index_block_size;
#ifdef DBUG_ASSERT_EXISTS
uint new_page_length= 0;
#endif
int result, mark_crashed;
MARIA_PAGE page;
DBUG_ENTER("_ma_apply_redo_index");
DBUG_PRINT("enter", ("page: %lu", (ulong) page_pos));
/* Set header to point at key data */
header+= PAGE_STORE_SIZE;
if (!(buff= pagecache_read(share->pagecache, &share->kfile,
page_pos, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link)))
{
result= 1; mark_crashed= 0;
_ma_set_fatal_error(info, my_errno);
goto err;
}
if (lsn_korr(buff) >= lsn)
{
/* Already applied */
check_skipped_lsn(info, lsn_korr(buff), 0, page_pos);
result= mark_crashed= 0;
goto err;
}
keynr= _ma_get_keynr(share, buff);
_ma_page_setup(&page, info, share->keyinfo + keynr, page_pos, buff);
org_page_length= page_length= page.size;
keypage_header= share->keypage_header;
DBUG_PRINT("redo", ("page_length: %u", page_length));
/* Apply modifications to page */
do
{
switch ((enum en_key_op) (*header++)) {
case KEY_OP_OFFSET: /* 1 */
page_offset= uint2korr(header);
header+= 2;
DBUG_PRINT("redo", ("key_op_offset: %u", page_offset));
DBUG_ASSERT(page_offset >= keypage_header && page_offset <= page_length);
break;
case KEY_OP_SHIFT: /* 2 */
{
int length= sint2korr(header);
header+= 2;
DBUG_PRINT("redo", ("key_op_shift: %d", length));
DBUG_ASSERT(page_offset != 0 && page_offset <= page_length &&
page_length + length <= max_page_size);
if (length < 0)
{
DBUG_ASSERT(page_offset - length <= page_length);
bmove(buff + page_offset, buff + page_offset - length,
page_length - page_offset + length);
}
else if (page_length != page_offset)
bmove_upp(buff + page_length + length, buff + page_length,
page_length - page_offset);
page_length+= length;
break;
}
case KEY_OP_CHANGE: /* 3 */
{
uint length= uint2korr(header);
DBUG_PRINT("redo", ("key_op_change: %u", length));
DBUG_ASSERT(page_offset != 0 && page_offset + length <= page_length);
memcpy(buff + page_offset, header + 2 , length);
page_offset+= length; /* Put offset after changed length */
header+= 2 + length;
break;
}
case KEY_OP_ADD_PREFIX: /* 4 */
{
uint insert_length= uint2korr(header);
uint changed_length= uint2korr(header+2);
DBUG_PRINT("redo", ("key_op_add_prefix: %u %u",
insert_length, changed_length));
DBUG_ASSERT(insert_length <= changed_length &&
page_length + insert_length <= max_page_size);
bmove_upp(buff + page_length + insert_length, buff + page_length,
page_length - keypage_header);
memcpy(buff + keypage_header, header + 4 , changed_length);
header+= 4 + changed_length;
page_length+= insert_length;
break;
}
case KEY_OP_DEL_PREFIX: /* 5 */
{
uint length= uint2korr(header);
header+= 2;
DBUG_PRINT("redo", ("key_op_del_prefix: %u", length));
DBUG_ASSERT(length <= page_length - keypage_header);
bmove(buff + keypage_header, buff + keypage_header +
length, page_length - keypage_header - length);
page_length-= length;
page_offset= keypage_header; /* Prepare for change */
break;
}
case KEY_OP_ADD_SUFFIX: /* 6 */
{
uint insert_length= uint2korr(header);
DBUG_PRINT("redo", ("key_op_add_suffix: %u", insert_length));
DBUG_ASSERT(page_length + insert_length <= max_page_size);
memcpy(buff + page_length, header+2, insert_length);
page_length+= insert_length;
header+= 2 + insert_length;
break;
}
case KEY_OP_DEL_SUFFIX: /* 7 */
{
uint del_length= uint2korr(header);
header+= 2;
DBUG_PRINT("redo", ("key_op_del_suffix: %u", del_length));
DBUG_ASSERT(page_length - del_length >= keypage_header);
page_length-= del_length;
break;
}
case KEY_OP_CHECK: /* 8 */
{
#ifdef EXTRA_DEBUG_KEY_CHANGES
uint check_page_length;
ha_checksum crc;
check_page_length= uint2korr(header);
crc= uint4korr(header+2);
_ma_store_page_used(share, buff, page_length);
if (check_page_length != page_length ||
crc != (uint32) my_checksum(0, buff + LSN_STORE_SIZE,
page_length - LSN_STORE_SIZE))
{
DBUG_DUMP("KEY_OP_CHECK bad page", buff, page_length);
if (header + 6 + check_page_length <= header_end)
{
DBUG_DUMP("KEY_OP_CHECK org page", header + 6, check_page_length);
}
DBUG_ASSERT("crc failure in REDO_INDEX" == 0);
}
#endif
DBUG_PRINT("redo", ("key_op_check"));
/*
This is the last entry in the block and it can contain page_length
data or not
*/
DBUG_ASSERT(header + 6 == header_end ||
header + 6 + page_length == header_end);
header= header_end;
break;
}
case KEY_OP_DEBUG:
DBUG_PRINT("redo", ("Debug: %u", (uint) header[0]));
header++;
break;
case KEY_OP_DEBUG_2:
DBUG_PRINT("redo", ("org_page_length: %u new_page_length: %u",
uint2korr(header), uint2korr(header+2)));
DBUG_ASSERT(uint2korr(header) == page_length);
#ifdef DBUG_ASSERT_EXISTS
new_page_length= MY_MIN(uint2korr(header+2), max_page_size);
#endif
header+= 4;
break;
case KEY_OP_MAX_PAGELENGTH:
DBUG_PRINT("redo", ("key_op_max_page_length"));
page_length= max_page_size;
break;
case KEY_OP_MULTI_COPY: /* 9 */
{
/*
List of fixed-len memcpy() operations with their source located inside
the page. The log record's piece looks like:
first the length 'full_length' to be used by memcpy()
then the number of bytes used by the list of (to,from) pairs
then the (to,from) pairs, so we do:
for (t,f) in [list of (to,from) pairs]:
memcpy(t, f, full_length).
*/
uint full_length, log_memcpy_length;
const uchar *log_memcpy_end;
DBUG_PRINT("redo", ("key_op_multi_copy"));
full_length= uint2korr(header);
header+= 2;
log_memcpy_length= uint2korr(header);
header+= 2;
log_memcpy_end= header + log_memcpy_length;
DBUG_ASSERT(full_length <= max_page_size);
while (header < log_memcpy_end)
{
uint to, from;
to= uint2korr(header);
header+= 2;
from= uint2korr(header);
header+= 2;
/* "from" is a place in the existing page */
DBUG_ASSERT(MY_MAX(from, to) < max_page_size);
memcpy(buff + to, buff + from, full_length);
}
break;
}
case KEY_OP_SET_PAGEFLAG:
DBUG_PRINT("redo", ("key_op_set_pageflag"));
_ma_store_keypage_flag(share, buff, *header++);
break;
case KEY_OP_COMPACT_PAGE:
{
TrID transid= transid_korr(header);
DBUG_PRINT("redo", ("key_op_compact_page"));
header+= TRANSID_SIZE;
if (_ma_compact_keypage(&page, transid))
{
result= mark_crashed= 1;
goto err;
}
page_length= page.size;
break;
}
case KEY_OP_NONE:
default:
DBUG_ASSERT(0);
result= mark_crashed= 1;
goto err;
}
} while (header < header_end);
DBUG_ASSERT(header == header_end);
DBUG_ASSERT(new_page_length == 0 || new_page_length == page_length);
/* Write modified page */
page.size= page_length;
_ma_store_page_used(share, buff, page_length);
/*
Clean old stuff up. Gives us better compression of we archive things
and makes things easer to debug
*/
if (page_length < org_page_length)
bzero(buff + page_length, org_page_length-page_length);
/* Mark page to be unlocked and written at _ma_unpin_all_pages() */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
DBUG_RETURN(0);
err:
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
if (mark_crashed)
_ma_mark_file_crashed(share);
DBUG_RETURN(result);
} | O3 | c | ma_apply_redo_index:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %ecx, -0x38(%rbp)
movq %rdx, %r14
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movq (%rdi), %rcx
movl (%rdx), %eax
movzbl 0x4(%rdx), %r13d
shlq $0x20, %r13
orq %rax, %r13
movl 0x7c0(%rcx), %eax
movl %eax, -0x54(%rbp)
movq 0x600(%rcx), %rdi
movq %rcx, -0x40(%rbp)
leaq 0x750(%rcx), %rsi
leaq -0x88(%rbp), %rax
movl $0x1, %r12d
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x32612
addq $0x10, %rsp
testq %rax, %rax
je 0x5a8af
movq %rax, %rbx
movq %r15, -0x50(%rbp)
movzwl (%rax), %eax
shlq $0x20, %rax
movzbl 0x2(%rbx), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%rbx), %esi
orq %rcx, %rsi
cmpq -0x30(%rbp), %rsi
jge 0x5a8c0
movl -0x38(%rbp), %r8d
addq %r14, %r8
addq $0x5, %r14
movq -0x40(%rbp), %r15
movl 0x744(%r15), %eax
addl $-0x4, %eax
movzbl (%rbx,%rax), %eax
imulq $0x118, %rax, %rdx # imm = 0x118
addq 0x570(%r15), %rdx
leaq -0xc0(%rbp), %rdi
movq -0x50(%rbp), %r12
movq %r12, %rsi
movq %r13, %rcx
movq %r8, %r13
movq %rbx, %r8
callq 0x58e84
movq %r13, %r8
leaq -0xc0(%rbp), %rax
movl 0x20(%rax), %eax
movl 0x744(%r15), %ecx
movq %rcx, -0x68(%rbp)
addq %rbx, %rcx
movq %rcx, -0x60(%rbp)
xorl %r13d, %r13d
leaq 0x86e22(%rip), %rsi # 0xe1428
movq %rax, -0x70(%rbp)
movl %eax, %edx
movq %r8, -0x38(%rbp)
movzbl (%r14), %eax
decl %eax
cmpl $0xd, %eax
ja 0x5a973
leaq 0x1(%r14), %r15
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movzwl 0x1(%r14), %r13d
addq $0x3, %r14
jmp 0x5a860
movl -0x54(%rbp), %eax
movl %eax, %edx
movq %r15, %r12
jmp 0x5a863
movl 0x1(%r14), %eax
movzwl 0x5(%r14), %esi
shlq $0x20, %rsi
orq %rax, %rsi
leaq -0xc0(%rbp), %rdi
movq %r8, %r15
callq 0x594e8
leaq 0x86dbb(%rip), %rsi # 0xe1428
testb %al, %al
jne 0x5a973
movq %r15, %r8
addq $0x7, %r14
movl -0xa0(%rbp), %edx
jmp 0x5a860
movzwl 0x3(%r14), %eax
leaq 0x5(%r14), %r12
testq %rax, %rax
je 0x5a863
movq %r13, -0x48(%rbp)
movq %rdx, -0x30(%rbp)
leaq (%r14,%rax), %r13
addq $0x5, %r13
movzwl (%r15), %r14d
movzwl (%r12), %edi
movzwl 0x2(%r12), %esi
addq $0x4, %r12
addq %rbx, %rdi
addq %rbx, %rsi
movq %r14, %rdx
callq 0x29080
cmpq %r13, %r12
jb 0x5a6ad
movq -0x38(%rbp), %r8
leaq 0x86d4e(%rip), %rsi # 0xe1428
movq -0x30(%rbp), %rdx
movq -0x48(%rbp), %r13
jmp 0x5a863
movzwl 0x1(%r14), %r12d
movl %r13d, %edi
addq %rbx, %rdi
addq $0x3, %r14
movq %r14, %rsi
movq %rdx, -0x30(%rbp)
movq %r12, %rdx
movq %r13, %r14
movq %r8, %r13
callq 0x29080
movq %r13, %r8
movq -0x30(%rbp), %rdx
leaq 0x86d0f(%rip), %rsi # 0xe1428
leal (%r12,%r14), %r13d
jmp 0x5a786
movswl 0x1(%r14), %r12d
testl %r12d, %r12d
js 0x5a878
movq %rdx, %r15
subl %r13d, %edx
je 0x5a8a0
movl %r15d, %esi
addq %rbx, %rsi
movl %r12d, %edi
addq %rsi, %rdi
callq 0xaacb0
jmp 0x5a895
movzwl 0x1(%r14), %r12d
movl %edx, %edi
addq %rbx, %rdi
addq $0x3, %r14
movq %r14, %rsi
movq %rdx, -0x30(%rbp)
movq %r12, %rdx
movq %r13, %r14
movq %r8, %r13
callq 0x29080
movq %r13, %r8
movq %r14, %r13
movq -0x30(%rbp), %rdx
leaq 0x86ca5(%rip), %rsi # 0xe1428
addl %r12d, %edx
addq %r15, %r12
addq $0x2, %r12
jmp 0x5a863
movzwl 0x1(%r14), %eax
addq $0x3, %r14
subl %eax, %edx
jmp 0x5a860
addq $0x5, %r14
jmp 0x5a860
movb 0x1(%r14), %al
addq $0x2, %r14
movq -0x40(%rbp), %rcx
movl 0x744(%rcx), %ecx
addl $-0x3, %ecx
movb %al, (%rbx,%rcx)
jmp 0x5a860
movzwl 0x1(%r14), %r15d
addq $0x3, %r14
movq %r15, %rsi
movq -0x60(%rbp), %rdi
addq %rdi, %rsi
movq -0x68(%rbp), %r12
movq %rdx, %r13
subl %r12d, %edx
subl %r15d, %edx
callq 0x29120
movq -0x38(%rbp), %r8
movq %r13, %rdx
leaq 0x86c2d(%rip), %rsi # 0xe1428
subl %r15d, %edx
movl %r12d, %r13d
jmp 0x5a860
movzwl 0x1(%r14), %edi
movq %rdi, -0x30(%rbp)
movzwl 0x3(%r14), %r12d
movl %edx, %esi
addq %rbx, %rsi
addq %rsi, %rdi
movq %r13, -0x48(%rbp)
movq %rdx, %r13
subl -0x68(%rbp), %edx
callq 0xaacb0
addq $0x5, %r14
movq -0x60(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x29080
movq %r13, %rdx
movq -0x48(%rbp), %r13
leaq 0x86bdf(%rip), %rsi # 0xe1428
addq %r15, %r12
addq $0x4, %r12
movq -0x30(%rbp), %rax
addl %eax, %edx
movq -0x38(%rbp), %r8
jmp 0x5a863
addq $0x2, %r14
movq %r14, %r12
movq %r12, %r14
cmpq %r8, %r12
movq -0x50(%rbp), %r12
jb 0x5a610
jmp 0x5a902
movl %r13d, %edi
addq %rbx, %rdi
movslq %r12d, %rax
movq %rdi, %rsi
subq %rax, %rsi
movq %rdx, %r15
subl %r13d, %edx
addl %r12d, %edx
callq 0x29120
movq -0x38(%rbp), %r8
leaq 0x86b88(%rip), %rsi # 0xe1428
addq $0x3, %r14
addl %r12d, %r15d
movq %r14, %r12
movq %r15, %rdx
jmp 0x5a863
callq 0xa1afa
movl (%rax), %esi
movq %r15, %rdi
callq 0x36a24
jmp 0x5a8d1
xorl %r12d, %r12d
movq -0x50(%rbp), %rdi
xorl %edx, %edx
movq %r13, %rcx
callq 0x4c7d5
movq -0x40(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x3232d
addq $0x10, %rsp
jmp 0x5a95e
movl %edx, -0xa0(%rbp)
movq -0x40(%rbp), %rcx
movl 0x744(%rcx), %eax
movb %dl, -0x1(%rbx,%rax)
movl 0x744(%rcx), %eax
movb %dh, -0x2(%rbx,%rax)
movq %rdx, %rax
movq -0x70(%rbp), %rdx
subl %eax, %edx
jbe 0x5a93a
movl %eax, %eax
addq %rax, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x292c0
leaq -0x88(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
addq $0x2e8, %r12 # imm = 0x2E8
movq %r12, %rdi
callq 0x91b9e
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rbx
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x3232d
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x38222
movl $0x1, %r12d
jmp 0x5a95e
| _ma_apply_redo_index:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov dword ptr [rbp+var_38], ecx
mov r14, rdx
mov [rbp+var_30], rsi
mov r15, rdi
mov rcx, [rdi]
mov eax, [rdx]
movzx r13d, byte ptr [rdx+4]
shl r13, 20h
or r13, rax
mov eax, [rcx+7C0h]
mov [rbp+var_54], eax
mov rdi, [rcx+600h]
mov [rbp+var_40], rcx
lea rsi, [rcx+750h]
lea rax, [rbp+var_88]
mov r12d, 1
mov rdx, r13
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
test rax, rax
jz loc_5A8AF
mov rbx, rax
mov [rbp+var_50], r15
movzx eax, word ptr [rax]
shl rax, 20h
movzx ecx, byte ptr [rbx+2]
shl rcx, 30h
or rcx, rax
mov esi, [rbx+3]
or rsi, rcx
cmp rsi, [rbp+var_30]
jge loc_5A8C0
mov r8d, dword ptr [rbp+var_38]
add r8, r14
add r14, 5
mov r15, [rbp+var_40]
mov eax, [r15+744h]
add eax, 0FFFFFFFCh
movzx eax, byte ptr [rbx+rax]
imul rdx, rax, 118h
add rdx, [r15+570h]
lea rdi, [rbp+var_C0]
mov r12, [rbp+var_50]
mov rsi, r12
mov rcx, r13
mov r13, r8
mov r8, rbx
call _ma_page_setup
mov r8, r13
lea rax, [rbp+var_C0]
mov eax, [rax+20h]
mov ecx, [r15+744h]
mov [rbp+var_68], rcx
add rcx, rbx
mov [rbp+var_60], rcx
xor r13d, r13d
lea rsi, jpt_5A62A
mov [rbp+var_70], rax
mov edx, eax
mov [rbp+var_38], r8
loc_5A610:
movzx eax, byte ptr [r14]
dec eax; switch 14 cases
cmp eax, 0Dh
ja def_5A62A; jumptable 000000000005A62A default case
lea r15, [r14+1]
movsxd rax, ds:(jpt_5A62A - 0E1428h)[rsi+rax*4]
add rax, rsi
jmp rax; switch jump
loc_5A62C:
movzx r13d, word ptr [r14+1]; jumptable 000000000005A62A case 1
add r14, 3
jmp loc_5A860
loc_5A63A:
mov eax, [rbp+var_54]; jumptable 000000000005A62A case 12
mov edx, eax
mov r12, r15
jmp loc_5A863
loc_5A647:
mov eax, [r14+1]; jumptable 000000000005A62A case 11
movzx esi, word ptr [r14+5]
shl rsi, 20h
or rsi, rax
lea rdi, [rbp+var_C0]
mov r15, r8
call _ma_compact_keypage
lea rsi, jpt_5A62A
test al, al
jnz def_5A62A; jumptable 000000000005A62A default case
mov r8, r15
add r14, 7
mov edx, [rbp+var_A0]
jmp loc_5A860
loc_5A687:
movzx eax, word ptr [r14+3]; jumptable 000000000005A62A case 9
lea r12, [r14+5]
test rax, rax
jz loc_5A863
mov [rbp+var_48], r13
mov [rbp+var_30], rdx
lea r13, [r14+rax]
add r13, 5
movzx r14d, word ptr [r15]
loc_5A6AD:
movzx edi, word ptr [r12]
movzx esi, word ptr [r12+2]
add r12, 4
add rdi, rbx
add rsi, rbx
mov rdx, r14
call _memcpy
cmp r12, r13
jb short loc_5A6AD
mov r8, [rbp+var_38]
lea rsi, jpt_5A62A
mov rdx, [rbp+var_30]
mov r13, [rbp+var_48]
jmp loc_5A863
loc_5A6E7:
movzx r12d, word ptr [r14+1]; jumptable 000000000005A62A case 3
mov edi, r13d
add rdi, rbx
add r14, 3
mov rsi, r14
mov [rbp+var_30], rdx
mov rdx, r12
mov r14, r13
mov r13, r8
call _memcpy
mov r8, r13
mov rdx, [rbp+var_30]
lea rsi, jpt_5A62A
lea r13d, [r12+r14]
jmp short loc_5A786
loc_5A71F:
movsx r12d, word ptr [r14+1]; jumptable 000000000005A62A case 2
test r12d, r12d
js loc_5A878
mov r15, rdx
sub edx, r13d
jz loc_5A8A0
mov esi, r15d
add rsi, rbx
mov edi, r12d
add rdi, rsi
call bmove_upp
jmp loc_5A895
loc_5A74F:
movzx r12d, word ptr [r14+1]; jumptable 000000000005A62A case 6
mov edi, edx
add rdi, rbx
add r14, 3
mov rsi, r14
mov [rbp+var_30], rdx
mov rdx, r12
mov r14, r13
mov r13, r8
call _memcpy
mov r8, r13
mov r13, r14
mov rdx, [rbp+var_30]
lea rsi, jpt_5A62A
add edx, r12d
loc_5A786:
add r12, r15
add r12, 2
jmp loc_5A863
loc_5A792:
movzx eax, word ptr [r14+1]; jumptable 000000000005A62A case 7
add r14, 3
sub edx, eax
jmp loc_5A860
loc_5A7A2:
add r14, 5; jumptable 000000000005A62A case 14
jmp loc_5A860
loc_5A7AB:
mov al, [r14+1]; jumptable 000000000005A62A case 10
add r14, 2
mov rcx, [rbp+var_40]
mov ecx, [rcx+744h]
add ecx, 0FFFFFFFDh
mov [rbx+rcx], al
jmp loc_5A860
loc_5A7C8:
movzx r15d, word ptr [r14+1]; jumptable 000000000005A62A case 5
add r14, 3
mov rsi, r15
mov rdi, [rbp+var_60]
add rsi, rdi
mov r12, [rbp+var_68]
mov r13, rdx
sub edx, r12d
sub edx, r15d
call _memmove
mov r8, [rbp+var_38]
mov rdx, r13
lea rsi, jpt_5A62A
sub edx, r15d
mov r13d, r12d
jmp short loc_5A860
loc_5A803:
movzx edi, word ptr [r14+1]; jumptable 000000000005A62A case 4
mov [rbp+var_30], rdi
movzx r12d, word ptr [r14+3]
mov esi, edx
add rsi, rbx
add rdi, rsi
mov [rbp+var_48], r13
mov r13, rdx
sub edx, dword ptr [rbp+var_68]
call bmove_upp
add r14, 5
mov rdi, [rbp+var_60]
mov rsi, r14
mov rdx, r12
call _memcpy
mov rdx, r13
mov r13, [rbp+var_48]
lea rsi, jpt_5A62A
add r12, r15
add r12, 4
mov rax, [rbp+var_30]
add edx, eax
mov r8, [rbp+var_38]
jmp short loc_5A863
loc_5A85C:
add r14, 2; jumptable 000000000005A62A case 13
loc_5A860:
mov r12, r14
loc_5A863:
mov r14, r12
cmp r12, r8
mov r12, [rbp+var_50]
jb loc_5A610
jmp loc_5A902; jumptable 000000000005A62A case 8
loc_5A878:
mov edi, r13d
add rdi, rbx
movsxd rax, r12d
mov rsi, rdi
sub rsi, rax
mov r15, rdx
sub edx, r13d
add edx, r12d
call _memmove
loc_5A895:
mov r8, [rbp+var_38]
lea rsi, jpt_5A62A
loc_5A8A0:
add r14, 3
add r15d, r12d
mov r12, r14
mov rdx, r15
jmp short loc_5A863
loc_5A8AF:
call _my_thread_var
mov esi, [rax]
mov rdi, r15
call _ma_set_fatal_error
jmp short loc_5A8D1
loc_5A8C0:
xor r12d, r12d
mov rdi, [rbp+var_50]
xor edx, edx
mov rcx, r13
call check_skipped_lsn
loc_5A8D1:
mov rax, [rbp+var_40]
mov rdi, [rax+600h]
mov rsi, [rbp+var_88]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
jmp short loc_5A95E
loc_5A902:
mov [rbp+var_A0], edx; jumptable 000000000005A62A case 8
mov rcx, [rbp+var_40]
mov eax, [rcx+744h]
mov [rbx+rax-1], dl
mov eax, [rcx+744h]
mov [rbx+rax-2], dh
mov rax, rdx
mov rdx, [rbp+var_70]
sub edx, eax
jbe short loc_5A93A
mov eax, eax
add rbx, rax
mov rdi, rbx
xor esi, esi
call _memset
loc_5A93A:
lea rsi, [rbp+var_88]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
add r12, 2E8h
mov rdi, r12
call insert_dynamic
xor r12d, r12d
loc_5A95E:
mov eax, r12d
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
def_5A62A:
mov rbx, [rbp+var_40]; jumptable 000000000005A62A default case
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
mov rdi, rbx
call _ma_mark_file_crashed
mov r12d, 1
jmp short loc_5A95E
| long long ma_apply_redo_index(long long *a1, signed long long a2, unsigned int *a3, int a4)
{
long long v6; // rcx
unsigned long long v7; // r13
long long v8; // rdi
const char *v9; // rsi
unsigned int v10; // r12d
unsigned __int16 *v11; // rax
unsigned __int16 *v12; // rbx
signed long long v13; // rsi
char *v14; // r8
unsigned __int16 *v15; // r14
long long v16; // r15
long long *v17; // r12
long long v18; // rcx
char *v19; // r13
unsigned long long v20; // r8
long long v21; // r13
signed long long v22; // rdx
unsigned __int16 *v23; // r15
unsigned __int16 *v24; // r14
unsigned __int16 *v25; // r12
unsigned long long v26; // r15
long long v27; // rax
unsigned long long v28; // r13
long long v29; // r14
long long v30; // rdi
long long v31; // rsi
long long v32; // r12
char *v33; // rdi
char *v34; // rsi
int v35; // r14d
unsigned long long v36; // r13
int v37; // r12d
int v38; // r15d
char *v39; // rsi
long long v40; // r14
unsigned long long v41; // r13
int v42; // eax
char v43; // al
long long v44; // r15
unsigned int v45; // r12d
int v46; // r13d
long long v47; // r12
int v48; // r13d
int v49; // edx
bool v50; // cf
signed long long v51; // r15
unsigned int *v52; // rax
long long v53; // rdx
long long v54; // rcx
long long v55; // r8
int v56; // r9d
long long v57; // rcx
unsigned int v58; // eax
long long v59; // rdx
long long v61; // rbx
_BYTE v62[32]; // [rsp+0h] [rbp-C0h] BYREF
unsigned int v63; // [rsp+20h] [rbp-A0h]
long long v64; // [rsp+38h] [rbp-88h] BYREF
int v65; // [rsp+40h] [rbp-80h]
char v66; // [rsp+48h] [rbp-78h]
long long v67; // [rsp+50h] [rbp-70h]
long long v68; // [rsp+58h] [rbp-68h]
char *v69; // [rsp+60h] [rbp-60h]
unsigned int v70; // [rsp+6Ch] [rbp-54h]
long long *v71; // [rsp+70h] [rbp-50h]
long long v72; // [rsp+78h] [rbp-48h]
long long v73; // [rsp+80h] [rbp-40h]
unsigned long long v74; // [rsp+88h] [rbp-38h]
signed long long v75; // [rsp+90h] [rbp-30h]
LODWORD(v74) = a4;
v75 = a2;
v6 = *a1;
v7 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v70 = *(_DWORD *)(*a1 + 1984);
v8 = *(_QWORD *)(v6 + 1536);
v73 = v6;
v9 = (const char *)(v6 + 1872);
v10 = 1;
v11 = (unsigned __int16 *)pagecache_read(v8, v6 + 1872, v7, 0, 0LL, 1, 4u, &v64);
if ( !v11 )
{
v52 = (unsigned int *)my_thread_var(v8, v9);
ma_set_fatal_error(a1, *v52, v53, v54, v55, v56);
LABEL_33:
pagecache_unlock_by_link(*(_QWORD *)(v73 + 1536), v64, 6, 3, 0LL, 0LL, 0);
return v10;
}
v12 = v11;
v71 = a1;
v13 = ((unsigned long long)*v11 << 32) | ((unsigned long long)*((unsigned __int8 *)v11 + 2) << 48) | *(unsigned int *)((char *)v11 + 3);
if ( v13 >= v75 )
{
v10 = 0;
check_skipped_lsn((long long)v71, v13, 0, v7);
goto LABEL_33;
}
v14 = (char *)a3 + (unsigned int)v74;
v15 = (unsigned __int16 *)((char *)a3 + 5);
v16 = v73;
v17 = v71;
v18 = v7;
v19 = v14;
ma_page_setup(
(long long)v62,
v71,
*(_QWORD *)(v73 + 1392) + 280LL * *((unsigned __int8 *)v11 + (unsigned int)(*(_DWORD *)(v73 + 1860) - 4)),
v18,
(long long)v11);
v20 = (unsigned long long)v19;
v68 = *(unsigned int *)(v16 + 1860);
v69 = (char *)v12 + v68;
v21 = 0LL;
v67 = v63;
v22 = v63;
v74 = v20;
while ( 2 )
{
v23 = (unsigned __int16 *)((char *)v15 + 1);
switch ( *(_BYTE *)v15 )
{
case 1:
v21 = *(unsigned __int16 *)((char *)v15 + 1);
v24 = (unsigned __int16 *)((char *)v15 + 3);
goto LABEL_25;
case 2:
v37 = *(__int16 *)((char *)v15 + 1);
if ( v37 < 0 )
{
v38 = v22;
memmove(
(char *)v12 + (unsigned int)v21,
(char *)v12 + (unsigned int)v21 - *(__int16 *)((char *)v15 + 1),
(unsigned int)(v37 + v22 - v21));
}
else
{
v38 = v22;
if ( (_DWORD)v22 == (_DWORD)v21 )
goto LABEL_30;
bmove_upp((char *)v12 + (unsigned int)v22 + v37, (char *)v12 + (unsigned int)v22);
}
v20 = v74;
LABEL_30:
v51 = (unsigned int)(v37 + v38);
v25 = (unsigned __int16 *)((char *)v15 + 3);
v22 = v51;
LABEL_26:
v15 = v25;
v50 = (unsigned long long)v25 < v20;
v17 = v71;
if ( v50 )
continue;
LABEL_34:
v63 = v22;
v57 = v73;
*((_BYTE *)v12 + *(unsigned int *)(v73 + 1860) - 1) = v22;
*((_BYTE *)v12 + *(unsigned int *)(v57 + 1860) - 2) = BYTE1(v22);
v58 = v22;
v59 = (unsigned int)(v67 - v22);
if ( (unsigned int)v67 > v58 )
memset((char *)v12 + v58, 0LL, v59);
v65 = 6;
v66 = 1;
insert_dynamic(v17 + 93, &v64);
v10 = 0;
break;
case 3:
v32 = *(unsigned __int16 *)((char *)v15 + 1);
v33 = (char *)v12 + (unsigned int)v21;
v34 = (char *)v15 + 3;
v75 = v22;
v35 = v21;
v36 = v20;
memcpy(v33, v34, v32);
v20 = v36;
v22 = v75;
v21 = (unsigned int)(v32 + v35);
goto LABEL_18;
case 4:
v75 = *(unsigned __int16 *)((char *)v15 + 1);
v47 = *(unsigned __int16 *)((char *)v15 + 3);
v72 = v21;
v48 = v22;
bmove_upp((char *)v12 + (unsigned int)v22 + v75, (char *)v12 + (unsigned int)v22);
memcpy(v69, (char *)v15 + 5, v47);
v49 = v48;
v21 = v72;
v25 = (unsigned __int16 *)((char *)v23 + v47 + 4);
v22 = (unsigned int)(v75 + v49);
v20 = v74;
goto LABEL_26;
case 5:
v44 = *(unsigned __int16 *)((char *)v15 + 1);
v24 = (unsigned __int16 *)((char *)v15 + 3);
v45 = v68;
v46 = v22;
memmove(v69, &v69[v44], (unsigned int)(v22 - v68 - v44));
v20 = v74;
v22 = (unsigned int)(v46 - v44);
v21 = v45;
goto LABEL_25;
case 6:
v32 = *(unsigned __int16 *)((char *)v15 + 1);
v39 = (char *)v15 + 3;
v75 = v22;
v40 = v21;
v41 = v20;
memcpy((char *)v12 + (unsigned int)v22, v39, v32);
v20 = v41;
v21 = v40;
v22 = (unsigned int)(v32 + v75);
LABEL_18:
v25 = (unsigned __int16 *)((char *)v23 + v32 + 2);
goto LABEL_26;
case 7:
v42 = *(unsigned __int16 *)((char *)v15 + 1);
v24 = (unsigned __int16 *)((char *)v15 + 3);
v22 = (unsigned int)(v22 - v42);
goto LABEL_25;
case 8:
goto LABEL_34;
case 9:
v27 = *(unsigned __int16 *)((char *)v15 + 3);
v25 = (unsigned __int16 *)((char *)v15 + 5);
if ( *(unsigned __int16 *)((char *)v15 + 3) )
{
v72 = v21;
v75 = v22;
v28 = (unsigned long long)v15 + v27 + 5;
v29 = *v23;
do
{
v30 = *v25;
v31 = v25[1];
v25 += 2;
memcpy((char *)v12 + v30, (char *)v12 + v31, v29);
}
while ( (unsigned long long)v25 < v28 );
v20 = v74;
v22 = v75;
v21 = v72;
}
goto LABEL_26;
case 0xA:
v43 = *((_BYTE *)v15 + 1);
v24 = v15 + 1;
*((_BYTE *)v12 + (unsigned int)(*(_DWORD *)(v73 + 1860) - 3)) = v43;
goto LABEL_25;
case 0xB:
v26 = v20;
if ( (unsigned __int8)ma_compact_keypage(
(long long)v62,
*(unsigned int *)((char *)v15 + 1) | ((unsigned long long)*(unsigned __int16 *)((char *)v15 + 5) << 32)) )
goto LABEL_38;
v20 = v26;
v24 = (unsigned __int16 *)((char *)v15 + 7);
v22 = v63;
LABEL_25:
v25 = v24;
goto LABEL_26;
case 0xC:
v22 = v70;
v25 = (unsigned __int16 *)((char *)v15 + 1);
goto LABEL_26;
case 0xD:
v24 = v15 + 1;
goto LABEL_25;
case 0xE:
v24 = (unsigned __int16 *)((char *)v15 + 5);
goto LABEL_25;
default:
LABEL_38:
v61 = v73;
pagecache_unlock_by_link(*(_QWORD *)(v73 + 1536), v64, 6, 3, 0LL, 0LL, 0);
ma_mark_file_crashed(v61);
return 1;
}
return v10;
}
}
| _ma_apply_redo_index:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV dword ptr [RBP + -0x38],ECX
MOV R14,RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R15,RDI
MOV RCX,qword ptr [RDI]
MOV EAX,dword ptr [RDX]
MOVZX R13D,byte ptr [RDX + 0x4]
SHL R13,0x20
OR R13,RAX
MOV EAX,dword ptr [RCX + 0x7c0]
MOV dword ptr [RBP + -0x54],EAX
MOV RDI,qword ptr [RCX + 0x600]
MOV qword ptr [RBP + -0x40],RCX
LEA RSI,[RCX + 0x750]
LEA RAX,[RBP + -0x88]
MOV R12D,0x1
MOV RDX,R13
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x00132612
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0015a8af
MOV RBX,RAX
MOV qword ptr [RBP + -0x50],R15
MOVZX EAX,word ptr [RAX]
SHL RAX,0x20
MOVZX ECX,byte ptr [RBX + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [RBX + 0x3]
OR RSI,RCX
CMP RSI,qword ptr [RBP + -0x30]
JGE 0x0015a8c0
MOV R8D,dword ptr [RBP + -0x38]
ADD R8,R14
ADD R14,0x5
MOV R15,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [R15 + 0x744]
ADD EAX,-0x4
MOVZX EAX,byte ptr [RBX + RAX*0x1]
IMUL RDX,RAX,0x118
ADD RDX,qword ptr [R15 + 0x570]
LEA RDI,[RBP + -0xc0]
MOV R12,qword ptr [RBP + -0x50]
MOV RSI,R12
MOV RCX,R13
MOV R13,R8
MOV R8,RBX
CALL 0x00158e84
MOV R8,R13
LEA RAX,[RBP + -0xc0]
MOV EAX,dword ptr [RAX + 0x20]
MOV ECX,dword ptr [R15 + 0x744]
MOV qword ptr [RBP + -0x68],RCX
ADD RCX,RBX
MOV qword ptr [RBP + -0x60],RCX
XOR R13D,R13D
LEA RSI,[0x1e1428]
MOV qword ptr [RBP + -0x70],RAX
MOV EDX,EAX
MOV qword ptr [RBP + -0x38],R8
LAB_0015a610:
MOVZX EAX,byte ptr [R14]
DEC EAX
CMP EAX,0xd
JA 0x0015a973
LEA R15,[R14 + 0x1]
MOVSXD RAX,dword ptr [RSI + RAX*0x4]
ADD RAX,RSI
switchD:
JMP RAX
caseD_1:
MOVZX R13D,word ptr [R14 + 0x1]
ADD R14,0x3
JMP 0x0015a860
caseD_c:
MOV EAX,dword ptr [RBP + -0x54]
MOV EDX,EAX
MOV R12,R15
JMP 0x0015a863
caseD_b:
MOV EAX,dword ptr [R14 + 0x1]
MOVZX ESI,word ptr [R14 + 0x5]
SHL RSI,0x20
OR RSI,RAX
LEA RDI,[RBP + -0xc0]
MOV R15,R8
CALL 0x001594e8
LEA RSI,[0x1e1428]
TEST AL,AL
JNZ 0x0015a973
MOV R8,R15
ADD R14,0x7
MOV EDX,dword ptr [RBP + -0xa0]
JMP 0x0015a860
caseD_9:
MOVZX EAX,word ptr [R14 + 0x3]
LEA R12,[R14 + 0x5]
TEST RAX,RAX
JZ 0x0015a863
MOV qword ptr [RBP + -0x48],R13
MOV qword ptr [RBP + -0x30],RDX
LEA R13,[R14 + RAX*0x1]
ADD R13,0x5
MOVZX R14D,word ptr [R15]
LAB_0015a6ad:
MOVZX EDI,word ptr [R12]
MOVZX ESI,word ptr [R12 + 0x2]
ADD R12,0x4
ADD RDI,RBX
ADD RSI,RBX
MOV RDX,R14
CALL 0x00129080
CMP R12,R13
JC 0x0015a6ad
MOV R8,qword ptr [RBP + -0x38]
LEA RSI,[0x1e1428]
MOV RDX,qword ptr [RBP + -0x30]
MOV R13,qword ptr [RBP + -0x48]
JMP 0x0015a863
caseD_3:
MOVZX R12D,word ptr [R14 + 0x1]
MOV EDI,R13D
ADD RDI,RBX
ADD R14,0x3
MOV RSI,R14
MOV qword ptr [RBP + -0x30],RDX
MOV RDX,R12
MOV R14,R13
MOV R13,R8
CALL 0x00129080
MOV R8,R13
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[0x1e1428]
LEA R13D,[R12 + R14*0x1]
JMP 0x0015a786
caseD_2:
MOVSX R12D,word ptr [R14 + 0x1]
TEST R12D,R12D
JS 0x0015a878
MOV R15,RDX
SUB EDX,R13D
JZ 0x0015a8a0
MOV ESI,R15D
ADD RSI,RBX
MOV EDI,R12D
ADD RDI,RSI
CALL 0x001aacb0
JMP 0x0015a895
caseD_6:
MOVZX R12D,word ptr [R14 + 0x1]
MOV EDI,EDX
ADD RDI,RBX
ADD R14,0x3
MOV RSI,R14
MOV qword ptr [RBP + -0x30],RDX
MOV RDX,R12
MOV R14,R13
MOV R13,R8
CALL 0x00129080
MOV R8,R13
MOV R13,R14
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[0x1e1428]
ADD EDX,R12D
LAB_0015a786:
ADD R12,R15
ADD R12,0x2
JMP 0x0015a863
caseD_7:
MOVZX EAX,word ptr [R14 + 0x1]
ADD R14,0x3
SUB EDX,EAX
JMP 0x0015a860
caseD_e:
ADD R14,0x5
JMP 0x0015a860
caseD_a:
MOV AL,byte ptr [R14 + 0x1]
ADD R14,0x2
MOV RCX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RCX + 0x744]
ADD ECX,-0x3
MOV byte ptr [RBX + RCX*0x1],AL
JMP 0x0015a860
caseD_5:
MOVZX R15D,word ptr [R14 + 0x1]
ADD R14,0x3
MOV RSI,R15
MOV RDI,qword ptr [RBP + -0x60]
ADD RSI,RDI
MOV R12,qword ptr [RBP + -0x68]
MOV R13,RDX
SUB EDX,R12D
SUB EDX,R15D
CALL 0x00129120
MOV R8,qword ptr [RBP + -0x38]
MOV RDX,R13
LEA RSI,[0x1e1428]
SUB EDX,R15D
MOV R13D,R12D
JMP 0x0015a860
caseD_4:
MOVZX EDI,word ptr [R14 + 0x1]
MOV qword ptr [RBP + -0x30],RDI
MOVZX R12D,word ptr [R14 + 0x3]
MOV ESI,EDX
ADD RSI,RBX
ADD RDI,RSI
MOV qword ptr [RBP + -0x48],R13
MOV R13,RDX
SUB EDX,dword ptr [RBP + -0x68]
CALL 0x001aacb0
ADD R14,0x5
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,R14
MOV RDX,R12
CALL 0x00129080
MOV RDX,R13
MOV R13,qword ptr [RBP + -0x48]
LEA RSI,[0x1e1428]
ADD R12,R15
ADD R12,0x4
MOV RAX,qword ptr [RBP + -0x30]
ADD EDX,EAX
MOV R8,qword ptr [RBP + -0x38]
JMP 0x0015a863
caseD_d:
ADD R14,0x2
LAB_0015a860:
MOV R12,R14
LAB_0015a863:
MOV R14,R12
CMP R12,R8
MOV R12,qword ptr [RBP + -0x50]
JC 0x0015a610
JMP 0x0015a902
LAB_0015a878:
MOV EDI,R13D
ADD RDI,RBX
MOVSXD RAX,R12D
MOV RSI,RDI
SUB RSI,RAX
MOV R15,RDX
SUB EDX,R13D
ADD EDX,R12D
CALL 0x00129120
LAB_0015a895:
MOV R8,qword ptr [RBP + -0x38]
LEA RSI,[0x1e1428]
LAB_0015a8a0:
ADD R14,0x3
ADD R15D,R12D
MOV R12,R14
MOV RDX,R15
JMP 0x0015a863
LAB_0015a8af:
CALL 0x001a1afa
MOV ESI,dword ptr [RAX]
MOV RDI,R15
CALL 0x00136a24
JMP 0x0015a8d1
LAB_0015a8c0:
XOR R12D,R12D
MOV RDI,qword ptr [RBP + -0x50]
XOR EDX,EDX
MOV RCX,R13
CALL 0x0014c7d5
LAB_0015a8d1:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x0013232d
ADD RSP,0x10
JMP 0x0015a95e
caseD_8:
MOV dword ptr [RBP + -0xa0],EDX
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RCX + 0x744]
MOV byte ptr [RBX + RAX*0x1 + -0x1],DL
MOV EAX,dword ptr [RCX + 0x744]
MOV byte ptr [RBX + RAX*0x1 + -0x2],DH
MOV RAX,RDX
MOV RDX,qword ptr [RBP + -0x70]
SUB EDX,EAX
JBE 0x0015a93a
MOV EAX,EAX
ADD RBX,RAX
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001292c0
LAB_0015a93a:
LEA RSI,[RBP + -0x88]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
ADD R12,0x2e8
MOV RDI,R12
CALL 0x00191b9e
XOR R12D,R12D
LAB_0015a95e:
MOV EAX,R12D
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015a973:
MOV RBX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x0013232d
ADD RSP,0x10
MOV RDI,RBX
CALL 0x00138222
MOV R12D,0x1
JMP 0x0015a95e
|
int8 _ma_apply_redo_index(long *param_1,ulong param_2,uint5 *param_3,int4 param_4)
{
ushort *puVar1;
ushort uVar2;
ushort uVar3;
ushort uVar4;
char cVar5;
ushort *puVar6;
int4 *puVar7;
int iVar8;
uint uVar9;
ulong uVar10;
long lVar11;
void *__dest;
ushort *puVar12;
int8 uVar13;
ulong uVar14;
int iVar15;
ulong uVar16;
ushort *puVar17;
ushort *puVar18;
int1 local_c8 [32];
uint local_a8;
int8 local_90;
int4 local_88;
int1 local_80;
ulong local_78;
ulong local_70;
void *local_68;
uint local_5c;
long *local_58;
ulong local_50;
long local_48;
ushort *local_40;
ulong local_38;
local_40 = (ushort *)CONCAT44(local_40._4_4_,param_4);
local_48 = *param_1;
uVar16 = (ulong)*param_3;
local_5c = *(uint *)(local_48 + 0x7c0);
uVar13 = 1;
local_38 = param_2;
puVar6 = (ushort *)
pagecache_read(*(int8 *)(local_48 + 0x600),local_48 + 0x750,uVar16,0,0,1,4,
&local_90);
lVar11 = local_48;
if (puVar6 == (ushort *)0x0) {
puVar7 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar7);
}
else {
uVar10 = (ulong)*(uint *)((long)puVar6 + 3) |
(ulong)(byte)puVar6[1] << 0x30 | (ulong)*puVar6 << 0x20;
local_58 = param_1;
if ((long)uVar10 < (long)local_38) {
puVar12 = (ushort *)(((ulong)local_40 & 0xffffffff) + (long)param_3);
_ma_page_setup(local_c8,param_1,
(ulong)*(byte *)((long)puVar6 + (ulong)(*(int *)(local_48 + 0x744) - 4)) *
0x118 + *(long *)(local_48 + 0x570),uVar16,puVar6);
local_78 = (ulong)local_a8;
local_70 = (ulong)*(uint *)(lVar11 + 0x744);
local_68 = (void *)(local_70 + (long)puVar6);
uVar10 = 0;
uVar16 = (ulong)local_a8;
puVar17 = (ushort *)((long)param_3 + 5);
local_40 = puVar12;
do {
uVar14 = local_70;
if (0xd < (byte)*puVar17 - 1) {
LAB_0015a973:
lVar11 = local_48;
pagecache_unlock_by_link(*(int8 *)(local_48 + 0x600),local_90,6,3,0,0,0,0);
_ma_mark_file_crashed(lVar11);
return 1;
}
puVar1 = (ushort *)((long)puVar17 + 1);
iVar15 = (int)uVar10;
iVar8 = (int)uVar16;
switch((uint)(byte)*puVar17) {
case 1:
uVar10 = (ulong)*(ushort *)((long)puVar17 + 1);
puVar18 = (ushort *)((long)puVar17 + 3);
break;
case 2:
uVar9 = (uint)*(short *)((long)puVar17 + 1);
if (*(short *)((long)puVar17 + 1) < 0) {
__dest = (void *)((uVar10 & 0xffffffff) + (long)puVar6);
memmove(__dest,(void *)((long)__dest - (long)(int)uVar9),
(ulong)((iVar8 - iVar15) + uVar9));
puVar12 = local_40;
}
else if (iVar8 != iVar15) {
bmove_upp((long)puVar6 + (ulong)uVar9 + (uVar16 & 0xffffffff));
puVar12 = local_40;
}
puVar18 = (ushort *)((long)puVar17 + 3);
uVar16 = (ulong)(iVar8 + uVar9);
break;
case 3:
uVar2 = *(ushort *)((long)puVar17 + 1);
uVar14 = (ulong)uVar2;
local_38 = uVar16;
memcpy((void *)((uVar10 & 0xffffffff) + (long)puVar6),(byte *)((long)puVar17 + 3),uVar14);
uVar10 = (ulong)((uint)uVar2 + iVar15);
uVar16 = local_38;
goto LAB_0015a786;
case 4:
local_38 = (ulong)*(ushort *)((long)puVar17 + 1);
uVar2 = *(ushort *)((long)puVar17 + 3);
lVar11 = (uVar16 & 0xffffffff) + (long)puVar6;
local_50 = uVar10;
bmove_upp(local_38 + lVar11,lVar11,iVar8 - (int)local_70);
memcpy(local_68,(byte *)((long)puVar17 + 5),(ulong)uVar2);
puVar18 = (ushort *)((long)puVar1 + (ulong)uVar2 + 4);
uVar16 = (ulong)(uint)(iVar8 + (int)local_38);
puVar12 = local_40;
uVar10 = local_50;
break;
case 5:
uVar2 = *(ushort *)((long)puVar17 + 1);
puVar18 = (ushort *)((long)puVar17 + 3);
memmove(local_68,(void *)((ulong)uVar2 + (long)local_68),
(ulong)((iVar8 - (int)local_70) - (uint)uVar2));
uVar16 = (ulong)(iVar8 - (uint)uVar2);
uVar10 = uVar14 & 0xffffffff;
puVar12 = local_40;
break;
case 6:
uVar2 = *(ushort *)((long)puVar17 + 1);
uVar14 = (ulong)uVar2;
local_38 = uVar16;
memcpy((void *)((uVar16 & 0xffffffff) + (long)puVar6),(byte *)((long)puVar17 + 3),uVar14);
uVar16 = (ulong)((int)local_38 + (uint)uVar2);
LAB_0015a786:
puVar18 = (ushort *)((long)puVar1 + uVar14 + 2);
break;
case 7:
puVar18 = (ushort *)((long)puVar17 + 3);
uVar16 = (ulong)(iVar8 - (uint)*(ushort *)((long)puVar17 + 1));
break;
case 8:
goto switchD_0015a62a_caseD_8;
case 9:
uVar2 = *(ushort *)((long)puVar17 + 3);
puVar18 = (ushort *)((long)puVar17 + 5);
if ((ulong)uVar2 != 0) {
uVar3 = *puVar1;
local_50 = uVar10;
local_38 = uVar16;
do {
uVar4 = *puVar18;
puVar12 = puVar18 + 1;
puVar18 = puVar18 + 2;
memcpy((void *)((ulong)uVar4 + (long)puVar6),(void *)((ulong)*puVar12 + (long)puVar6),
(ulong)uVar3);
uVar16 = local_38;
puVar12 = local_40;
uVar10 = local_50;
} while (puVar18 < (ushort *)((long)puVar17 + (ulong)uVar2 + 5));
}
break;
case 10:
puVar18 = puVar17 + 1;
*(byte *)((long)puVar6 + (ulong)(*(int *)(local_48 + 0x744) - 3)) =
*(byte *)((long)puVar17 + 1);
break;
case 0xb:
cVar5 = _ma_compact_keypage(local_c8,(ulong)*(uint6 *)((long)puVar17 + 1));
if (cVar5 != '\0') goto LAB_0015a973;
puVar18 = (ushort *)((long)puVar17 + 7);
uVar16 = (ulong)local_a8;
break;
case 0xc:
uVar16 = (ulong)local_5c;
puVar18 = puVar1;
break;
case 0xd:
puVar18 = puVar17 + 1;
break;
case 0xe:
puVar18 = (ushort *)((long)puVar17 + 5);
}
param_1 = local_58;
puVar17 = puVar18;
} while (puVar18 < puVar12);
switchD_0015a62a_caseD_8:
local_a8 = (uint)uVar16;
*(char *)((long)puVar6 + ((ulong)*(uint *)(local_48 + 0x744) - 1)) = (char)uVar16;
*(char *)((long)puVar6 + ((ulong)*(uint *)(local_48 + 0x744) - 2)) = (char)(uVar16 >> 8);
uVar9 = (uint)local_78 - local_a8;
if (local_a8 <= (uint)local_78 && uVar9 != 0) {
memset((void *)((long)puVar6 + (uVar16 & 0xffffffff)),0,(ulong)uVar9);
}
local_88 = 6;
local_80 = 1;
insert_dynamic(param_1 + 0x5d);
return 0;
}
uVar13 = 0;
check_skipped_lsn(param_1,uVar10,0,uVar16);
}
pagecache_unlock_by_link(*(int8 *)(local_48 + 0x600),local_90,6,3,0,0,0,0);
return uVar13;
}
| |
45,922 | OpenGL_Init_4_4 | SDL3Lite/dependencies/OpenGL.h | void OpenGL_Init_4_4()
{
glBufferStorage = (PFNGLBUFFERSTORAGEPROC)OpenGL_Load("glBufferStorage");
glClearTexImage = (PFNGLCLEARTEXIMAGEPROC)OpenGL_Load("glClearTexImage");
glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC)OpenGL_Load("glClearTexSubImage");
glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)OpenGL_Load("glBindBuffersBase");
glBindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC)OpenGL_Load("glBindBuffersRange");
glBindTextures = (PFNGLBINDTEXTURESPROC)OpenGL_Load("glBindTextures");
glBindSamplers = (PFNGLBINDSAMPLERSPROC)OpenGL_Load("glBindSamplers");
glBindImageTextures = (PFNGLBINDIMAGETEXTURESPROC)OpenGL_Load("glBindImageTextures");
glBindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC)OpenGL_Load("glBindVertexBuffers");
} | O3 | c | OpenGL_Init_4_4:
pushq %rax
leaq 0x5523(%rip), %rdi # 0x18d7b
callq 0xf3a0
movq %rax, 0xa4cc(%rip) # 0x1dd30
leaq 0x5520(%rip), %rdi # 0x18d8b
callq 0xf3a0
movq %rax, 0xa4c1(%rip) # 0x1dd38
leaq 0x551d(%rip), %rdi # 0x18d9b
callq 0xf3a0
movq %rax, 0xa4b6(%rip) # 0x1dd40
leaq 0x551d(%rip), %rdi # 0x18dae
callq 0xf3a0
movq %rax, 0xa4ab(%rip) # 0x1dd48
leaq 0x551c(%rip), %rdi # 0x18dc0
callq 0xf3a0
movq %rax, 0xa4a0(%rip) # 0x1dd50
leaq 0x551c(%rip), %rdi # 0x18dd3
callq 0xf3a0
movq %rax, 0xa495(%rip) # 0x1dd58
leaq 0x5518(%rip), %rdi # 0x18de2
callq 0xf3a0
movq %rax, 0xa48a(%rip) # 0x1dd60
leaq 0x5514(%rip), %rdi # 0x18df1
callq 0xf3a0
movq %rax, 0xa47f(%rip) # 0x1dd68
leaq 0x5515(%rip), %rdi # 0x18e05
callq 0xf3a0
movq %rax, 0xa474(%rip) # 0x1dd70
popq %rax
retq
nop
| OpenGL_Init_4_4:
push rax
lea rdi, aGlbufferstorag_0; "glBufferStorage"
call OpenGL_Load
mov cs:glBufferStorage, rax
lea rdi, aGlclearteximag_0; "glClearTexImage"
call OpenGL_Load
mov cs:glClearTexImage, rax
lea rdi, aGlcleartexsubi_0; "glClearTexSubImage"
call OpenGL_Load
mov cs:glClearTexSubImage, rax
lea rdi, aGlbindbuffersb_0; "glBindBuffersBase"
call OpenGL_Load
mov cs:glBindBuffersBase, rax
lea rdi, aGlbindbuffersr_0; "glBindBuffersRange"
call OpenGL_Load
mov cs:glBindBuffersRange, rax
lea rdi, aGlbindtextures_0; "glBindTextures"
call OpenGL_Load
mov cs:glBindTextures, rax
lea rdi, aGlbindsamplers_0; "glBindSamplers"
call OpenGL_Load
mov cs:glBindSamplers, rax
lea rdi, aGlbindimagetex_2; "glBindImageTextures"
call OpenGL_Load
mov cs:glBindImageTextures, rax
lea rdi, aGlbindvertexbu_2; "glBindVertexBuffers"
call OpenGL_Load
mov cs:glBindVertexBuffers, rax
pop rax
retn
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_4_4()
{
glBufferStorage = OpenGL_Load("glBufferStorage");
glClearTexImage = OpenGL_Load("glClearTexImage");
glClearTexSubImage = OpenGL_Load("glClearTexSubImage");
glBindBuffersBase = OpenGL_Load("glBindBuffersBase");
glBindBuffersRange = OpenGL_Load("glBindBuffersRange");
glBindTextures = OpenGL_Load("glBindTextures");
glBindSamplers = OpenGL_Load("glBindSamplers");
glBindImageTextures = OpenGL_Load("glBindImageTextures");
glBindVertexBuffers = OpenGL_Load("glBindVertexBuffers");
}
| OpenGL_Init_4_4:
PUSH RAX
LEA RDI,[0x118d7b]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd30],RAX
LEA RDI,[0x118d8b]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd38],RAX
LEA RDI,[0x118d9b]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd40],RAX
LEA RDI,[0x118dae]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd48],RAX
LEA RDI,[0x118dc0]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd50],RAX
LEA RDI,[0x118dd3]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd58],RAX
LEA RDI,[0x118de2]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd60],RAX
LEA RDI,[0x118df1]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd68],RAX
LEA RDI,[0x118e05]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd70],RAX
POP RAX
RET
|
int8 OpenGL_Init_4_4(void)
{
int8 in_RAX;
glBufferStorage = OpenGL_Load("glBufferStorage");
glClearTexImage = OpenGL_Load("glClearTexImage");
glClearTexSubImage = OpenGL_Load("glClearTexSubImage");
glBindBuffersBase = OpenGL_Load("glBindBuffersBase");
glBindBuffersRange = OpenGL_Load("glBindBuffersRange");
glBindTextures = OpenGL_Load("glBindTextures");
glBindSamplers = OpenGL_Load("glBindSamplers");
glBindImageTextures = OpenGL_Load("glBindImageTextures");
glBindVertexBuffers = OpenGL_Load("glBindVertexBuffers");
return in_RAX;
}
| |
45,923 | auto unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type::yield_value<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>::type, unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>(unifex::_task::_task<void>::type, unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type)::'lambda'(unifex::_unit::unit&&)::operator()(unifex::_unit::unit&&) const::'lambda'()>(unifex::_task::_task<void>::type&&) | aimrt_mujoco_sim/_deps/libunifex-src/include/unifex/connect_awaitable.hpp | auto yield_value(Func&& func) noexcept {
struct awaiter {
Func&& func_;
bool await_ready() noexcept {
return false;
}
void await_suspend(coro::coroutine_handle<promise_type>) {
((Func &&) func_)();
}
[[noreturn]] void await_resume() noexcept {
std::terminate();
}
};
return awaiter{(Func &&) func};
} | O0 | cpp | auto unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type::yield_value<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>::type, unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>(unifex::_task::_task<void>::type, unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type)::'lambda'(unifex::_unit::unit&&)::operator()(unifex::_unit::unit&&) const::'lambda'()>(unifex::_task::_task<void>::type&&):
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
| _ZN6unifex6_await12_sender_taskINS_17_with_query_value17_receiver_wrapperINS_14_get_scheduler3_fnENS_13_inline_sched9schedulerENS_4_seq19_successor_receiverIONS7_13schedule_taskENS2_7_senderIS5_S7_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINS8_7_senderISA_SI_E4typeEE4typeEE4typeEE4typeEE4type12promise_type11yield_valueIZNS_10_await_cpo3_fn12connect_implISG_ST_EENS1_IT0_E4typeET_S11_EUlvE_EEDaOS14_:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov rax, [rsp+var_18]
mov [rsp+var_8], rax
mov rax, [rsp+var_8]
retn
| long long unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>::type>::type>::type::promise_type::yield_value<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>::type>>::type unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>,unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>::type>>(unifex::_task::_task<void>,unifex::_await_cpo::_fn::connect_impl)::{lambda(void)#1}>(
long long a1,
long long a2)
{
return a2;
}
| yield_value<unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>::type,unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>(unifex::_task::_task<void>::type,unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type)::{lambda()#1}>:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x8],RAX
MOV RAX,qword ptr [RSP + -0x8]
RET
|
/* auto
unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,
unifex::_inline_sched::scheduler,
unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type,
unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type::yield_value<unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>::type,
unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,
unifex::_inline_sched::scheduler,
unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type,
unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>(unifex::_task::_task<void>::type,
unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,
unifex::_inline_sched::scheduler,
unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type,
unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type>::type>::type>::type>::type)::{lambda()#1}>(unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>::type,
unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,
unifex::_inline_sched::scheduler,
unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type,
unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>(unifex::_task::_task<void>::type,
unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,
unifex::_inline_sched::scheduler,
unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type,
unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,
unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler,
unifex::_task::_task<void>::type>::type>::type>::type>::type>::type)::{lambda()#1}&&) */
_lambda___1_ * __thiscall
unifex::_await::
_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>
::type::promise_type::
yield_value<unifex::_await_cpo::_fn::connect_impl<unifex::_task::_task<void>::type,unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>(unifex::_task::_task<void>::type,unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type)::_lambda()_1_>
(promise_type *this,_lambda___1_ *param_1)
{
return param_1;
}
| |
45,924 | setup_procedure(THD*, st_order*, select_result*, List<Item>&, int*) | eloqsql/sql/procedure.cc | Procedure *
setup_procedure(THD *thd,ORDER *param,select_result *result,
List<Item> &field_list,int *error)
{
uint i;
DBUG_ENTER("setup_procedure");
*error=0;
if (!param)
DBUG_RETURN(0);
for (i=0 ; i < array_elements(sql_procs) ; i++)
{
if (!my_strcasecmp(system_charset_info,
(*param->item)->name.str, sql_procs[i].name))
{
Procedure *proc=(*sql_procs[i].init)(thd,param,result,field_list);
*error= !proc;
DBUG_RETURN(proc);
}
}
my_error(ER_UNKNOWN_PROCEDURE, MYF(0), (*param->item)->name.str);
*error=1;
DBUG_RETURN(0);
} | O0 | cpp | setup_procedure(THD*, st_order*, select_result*, List<Item>&, int*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x18(%rbp)
jne 0xda299c
jmp 0xda298f
movq $0x0, -0x8(%rbp)
jmp 0xda2a85
movl $0x0, -0x34(%rbp)
cmpl $0x1, -0x34(%rbp)
jae 0xda2a54
leaq 0xf27d14(%rip), %rax # 0x1cca6c8
movq (%rax), %rax
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
leaq 0xf27cff(%rip), %rcx # 0x1cca6c8
movq (%rcx), %rdi
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
movq 0x48(%rcx), %rsi
movl -0x34(%rbp), %ecx
movl %ecx, %edx
leaq 0xd48a89(%rip), %rcx # 0x1aeb470
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0xda2a44
movl -0x34(%rbp), %eax
movl %eax, %ecx
leaq 0xd48a6c(%rip), %rax # 0x1aeb470
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xda2a85
jmp 0xda2a46
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xda29a3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x48(%rax), %rdx
movl $0x452, %edi # imm = 0x452
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x12bf0d0
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| _Z15setup_procedureP3THDP8st_orderP13select_resultR4ListI4ItemEPi:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_30]
mov dword ptr [rax], 0
cmp [rbp+var_18], 0
jnz short loc_DA299C
jmp short $+2
loc_DA298F:
mov [rbp+var_8], 0
jmp loc_DA2A85
loc_DA299C:
mov [rbp+var_34], 0
loc_DA29A3:
cmp [rbp+var_34], 1
jnb loc_DA2A54
lea rax, system_charset_info
mov rax, [rax]
mov rax, [rax+0C0h]
mov rax, [rax+40h]
lea rcx, system_charset_info
mov rdi, [rcx]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov rcx, [rcx]
mov rsi, [rcx+48h]
mov ecx, [rbp+var_34]
mov edx, ecx
lea rcx, _ZL9sql_procs; sql_procs
shl rdx, 4
add rcx, rdx
mov rdx, [rcx]
call rax
cmp eax, 0
jnz short loc_DA2A44
mov eax, [rbp+var_34]
mov ecx, eax
lea rax, _ZL9sql_procs; sql_procs
shl rcx, 4
add rax, rcx
mov rax, [rax+8]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
xor al, 0FFh
and al, 1
movzx ecx, al
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_DA2A85
loc_DA2A44:
jmp short $+2
loc_DA2A46:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_DA29A3
loc_DA2A54:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rax, [rax]
mov rdx, [rax+48h]
mov edi, 452h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
mov rax, [rbp+var_30]
mov dword ptr [rax], 1
mov [rbp+var_8], 0
loc_DA2A85:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long setup_procedure(long long a1, long long a2, long long a3, long long a4, _DWORD *a5, int a6)
{
long long v7; // [rsp+0h] [rbp-40h]
int i; // [rsp+Ch] [rbp-34h]
*a5 = 0;
if ( !a2 )
return 0LL;
for ( i = 0; !i; i = 1 )
{
if ( !(*(unsigned int ( **)(long long, _QWORD, char *))(*(_QWORD *)(system_charset_info + 192) + 64LL))(
system_charset_info,
*(_QWORD *)(**(_QWORD **)(a2 + 8) + 72LL),
sql_procs) )
{
v7 = ((long long ( *)(long long, long long, long long, long long))*(&sql_procs + 1))(a1, a2, a3, a4);
*a5 = v7 == 0;
return v7;
}
}
my_error(1106, 0, *(_QWORD *)(**(_QWORD **)(a2 + 8) + 72LL), a4, (_DWORD)a5, a6);
*a5 = 1;
return 0LL;
}
| check_vcol_func_processor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xa8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x149ce15]
MOV ECX,0x4
CALL 0x00d33de0
AND AL,0x1
ADD RSP,0x10
POP RBP
RET
|
/* Item_func_get_system_var::check_vcol_func_processor(void*) */
ulong __thiscall
Item_func_get_system_var::check_vcol_func_processor(Item_func_get_system_var *this,void *param_1)
{
ulong uVar1;
uVar1 = mark_unsupported_function
((char *)((long)&DAT_0149ce14 + 1),*(char **)(*(long *)(this + 0xa8) + 0x10),
param_1,4);
return uVar1 & 0xffffffffffffff01;
}
| |
45,925 | setup_procedure(THD*, st_order*, select_result*, List<Item>&, int*) | eloqsql/sql/procedure.cc | Procedure *
setup_procedure(THD *thd,ORDER *param,select_result *result,
List<Item> &field_list,int *error)
{
uint i;
DBUG_ENTER("setup_procedure");
*error=0;
if (!param)
DBUG_RETURN(0);
for (i=0 ; i < array_elements(sql_procs) ; i++)
{
if (!my_strcasecmp(system_charset_info,
(*param->item)->name.str, sql_procs[i].name))
{
Procedure *proc=(*sql_procs[i].init)(thd,param,result,field_list);
*error= !proc;
DBUG_RETURN(proc);
}
}
my_error(ER_UNKNOWN_PROCEDURE, MYF(0), (*param->item)->name.str);
*error=1;
DBUG_RETURN(0);
} | O3 | cpp | setup_procedure(THD*, st_order*, select_result*, List<Item>&, int*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x0, (%r8)
testq %rsi, %rsi
je 0x9f6f4f
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0xb60780(%rip), %rax # 0x1557688
movq (%rax), %rdi
movq 0xc0(%rdi), %rax
movq 0x8(%rsi), %rcx
movq (%rcx), %rcx
movq 0x48(%rcx), %rsi
leaq 0x38f768(%rip), %rdx # 0xd8668c
callq *0x40(%rax)
testl %eax, %eax
je 0x9f6f54
movq 0x8(%r12), %rax
movq (%rax), %rax
movq 0x48(%rax), %rdx
xorl %r14d, %r14d
movl $0x452, %edi # imm = 0x452
xorl %esi, %esi
xorl %eax, %eax
callq 0xcbf683
movl $0x1, %eax
jmp 0x9f6f70
xorl %r14d, %r14d
jmp 0x9f6f72
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xa03392
movq %rax, %r14
xorl %eax, %eax
testq %r14, %r14
sete %al
movl %eax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z15setup_procedureP3THDP8st_orderP13select_resultR4ListI4ItemEPi:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov dword ptr [r8], 0
test rsi, rsi
jz short loc_9F6F4F
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
lea rax, system_charset_info
mov rdi, [rax]
mov rax, [rdi+0C0h]
mov rcx, [rsi+8]
mov rcx, [rcx]
mov rsi, [rcx+48h]
lea rdx, aAnalyse; "analyse"
call qword ptr [rax+40h]
test eax, eax
jz short loc_9F6F54
mov rax, [r12+8]
mov rax, [rax]
mov rdx, [rax+48h]
xor r14d, r14d
mov edi, 452h
xor esi, esi
xor eax, eax
call my_error
mov eax, 1
jmp short loc_9F6F70
loc_9F6F4F:
xor r14d, r14d
jmp short loc_9F6F72
loc_9F6F54:
mov rdi, r13; THD *
mov rsi, r12
mov rdx, r15
mov rcx, r14
call _Z17proc_analyse_initP3THDP8st_orderP13select_resultR4ListI4ItemE; proc_analyse_init(THD *,st_order *,select_result *,List<Item> &)
mov r14, rax
xor eax, eax
test r14, r14
setz al
loc_9F6F70:
mov [rbx], eax
loc_9F6F72:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long setup_procedure(THD *a1, long long a2, long long a3, long long a4, BOOL *a5)
{
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v9; // r14
BOOL v10; // eax
*a5 = 0;
if ( !a2 )
return 0LL;
if ( (*(unsigned int ( **)(long long, _QWORD, const char *))(*(_QWORD *)(system_charset_info + 192) + 64LL))(
system_charset_info,
*(_QWORD *)(**(_QWORD **)(a2 + 8) + 72LL),
"analyse") )
{
v9 = 0LL;
my_error(1106, 0, *(_QWORD *)(**(_QWORD **)(a2 + 8) + 72LL), v6, v7, v8);
v10 = 1;
}
else
{
v9 = proc_analyse_init(a1);
v10 = v9 == 0;
}
*a5 = v10;
return v9;
}
| |||
45,926 | ps_fetch_int8 | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_int8(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch(r_param->buffer_type) {
case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
default:
{
uchar val= **row;
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong) val : (longlong)(signed char)val;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 1;
}
break;
}
} | O3 | c | ps_fetch_int8:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
cmpl $0x1, 0x60(%rdi)
jne 0x2c546
movb 0x64(%rsi), %al
shrb $0x5, %al
andb $0x1, %al
movq $0x1, 0x40(%rdi)
movq (%rbx), %rcx
movb (%rcx), %cl
movq 0x10(%rdi), %rdx
movb %cl, (%rdx)
cmpb 0x65(%rdi), %al
jne 0x2c561
xorl %eax, %eax
jmp 0x2c56a
movq (%rbx), %rax
movsbq (%rax), %rax
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
movzbl %al, %edx
cmoveq %rax, %rdx
callq 0x2d09b
jmp 0x2c570
movq 0x10(%rdi), %rax
movb (%rax), %al
shrb $0x7, %al
movq 0x18(%rdi), %rcx
movb %al, (%rcx)
incq (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ps_fetch_int8:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
cmp dword ptr [rdi+60h], 1
jnz short loc_2C546
mov al, [rsi+64h]
shr al, 5
and al, 1
mov qword ptr [rdi+40h], 1
mov rcx, [rbx]
mov cl, [rcx]
mov rdx, [rdi+10h]
mov [rdx], cl
cmp al, [rdi+65h]
jnz short loc_2C561
xor eax, eax
jmp short loc_2C56A
loc_2C546:
mov rax, [rbx]
movsx rax, byte ptr [rax]
mov ecx, [rsi+64h]
and ecx, 20h
movzx edx, al
cmovz rdx, rax
call convert_from_long
jmp short loc_2C570
loc_2C561:
mov rax, [rdi+10h]
mov al, [rax]
shr al, 7
loc_2C56A:
mov rcx, [rdi+18h]
mov [rcx], al
loc_2C570:
inc qword ptr [rbx]
add rsp, 8
pop rbx
pop rbp
retn
| char ps_fetch_int8(long long a1, long long a2, _BYTE **a3)
{
char v4; // al
char result; // al
long long v6; // rdx
if ( *(_DWORD *)(a1 + 96) == 1 )
{
v4 = (*(_BYTE *)(a2 + 100) & 0x20) != 0;
*(_QWORD *)(a1 + 64) = 1LL;
**(_BYTE **)(a1 + 16) = **a3;
if ( v4 == *(_BYTE *)(a1 + 101) )
result = 0;
else
result = **(_BYTE **)(a1 + 16) >> 7;
**(_BYTE **)(a1 + 24) = result;
}
else
{
v6 = (unsigned __int8)**a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) == 0 )
v6 = (char)**a3;
result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20);
}
++*a3;
return result;
}
| ps_fetch_int8:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
CMP dword ptr [RDI + 0x60],0x1
JNZ 0x0012c546
MOV AL,byte ptr [RSI + 0x64]
SHR AL,0x5
AND AL,0x1
MOV qword ptr [RDI + 0x40],0x1
MOV RCX,qword ptr [RBX]
MOV CL,byte ptr [RCX]
MOV RDX,qword ptr [RDI + 0x10]
MOV byte ptr [RDX],CL
CMP AL,byte ptr [RDI + 0x65]
JNZ 0x0012c561
XOR EAX,EAX
JMP 0x0012c56a
LAB_0012c546:
MOV RAX,qword ptr [RBX]
MOVSX RAX,byte ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
MOVZX EDX,AL
CMOVZ RDX,RAX
CALL 0x0012d09b
JMP 0x0012c570
LAB_0012c561:
MOV RAX,qword ptr [RDI + 0x10]
MOV AL,byte ptr [RAX]
SHR AL,0x7
LAB_0012c56a:
MOV RCX,qword ptr [RDI + 0x18]
MOV byte ptr [RCX],AL
LAB_0012c570:
INC qword ptr [RBX]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int8(long param_1,long param_2,long *param_3)
{
byte bVar1;
ulong uVar2;
if (*(int *)(param_1 + 0x60) == 1) {
bVar1 = *(byte *)(param_2 + 100);
*(int8 *)(param_1 + 0x40) = 1;
**(int1 **)(param_1 + 0x10) = *(int1 *)*param_3;
if ((bVar1 >> 5 & 1) == *(byte *)(param_1 + 0x65)) {
bVar1 = 0;
}
else {
bVar1 = **(byte **)(param_1 + 0x10) >> 7;
}
**(byte **)(param_1 + 0x18) = bVar1;
}
else {
uVar2 = (ulong)*(byte *)*param_3;
if ((*(uint *)(param_2 + 100) & 0x20) == 0) {
uVar2 = (long)(char)*(byte *)*param_3;
}
convert_from_long(param_1,param_2,uVar2);
}
*param_3 = *param_3 + 1;
return;
}
| |
45,927 | int mujoco::plugin::elasticity::CreateStencils<mujoco::plugin::elasticity::Stencil2D>(std::vector<mujoco::plugin::elasticity::Stencil2D, std::allocator<mujoco::plugin::elasticity::Stencil2D>>&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&) | aimrt_mujoco_sim/_deps/mujoco-src/plugin/elasticity/elasticity.cc | int CreateStencils(std::vector<T>& elements,
std::vector<std::pair<int, int>>& edges,
const std::vector<int>& simplex,
const std::vector<int>& edgeidx) {
int ne = 0;
int nt = simplex.size() / T::kNumVerts;
elements.resize(nt);
for (int t = 0; t < nt; t++) {
for (int v = 0; v < T::kNumVerts; v++) {
elements[t].vertices[v] = simplex[T::kNumVerts*t+v];
}
}
// map from edge vertices to their index in `edges` vector
std::unordered_map<std::pair<int, int>, int, PairHash> edge_indices;
// loop over all tetrahedra
for (int t = 0; t < nt; t++) {
int* v = elements[t].vertices;
// compute edges to vertices map for fast computations
for (int e = 0; e < T::kNumEdges; e++) {
auto pair = std::pair(
std::min(v[T::edge[e][0]], v[T::edge[e][1]]),
std::max(v[T::edge[e][0]], v[T::edge[e][1]])
);
// if edge is already present in the vector only store its index
auto [it, inserted] = edge_indices.insert({pair, ne});
if (inserted) {
edges.push_back(pair);
elements[t].edges[e] = ne++;
} else {
elements[t].edges[e] = it->second;
}
if (!edgeidx.empty()) { // SHOULD NOT OCCUR
if (elements[t].edges[e] != edgeidx[T::kNumEdges*t+e]) {
mju_error("edge ordering is incoherent between flex and plugin");
}
}
}
}
return nt;
} | O0 | cpp | int mujoco::plugin::elasticity::CreateStencils<mujoco::plugin::elasticity::Stencil2D>(std::vector<mujoco::plugin::elasticity::Stencil2D, std::allocator<mujoco::plugin::elasticity::Stencil2D>>&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movq %rcx, 0xf8(%rsp)
movl $0x0, 0xf4(%rsp)
movq 0x100(%rsp), %rdi
callq 0x9430
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, 0xf0(%rsp)
movq 0x110(%rsp), %rdi
movslq 0xf0(%rsp), %rsi
callq 0xab70
movl $0x0, 0xec(%rsp)
movl 0xec(%rsp), %eax
cmpl 0xf0(%rsp), %eax
jge 0xa87d
movl $0x0, 0xe8(%rsp)
cmpl $0x3, 0xe8(%rsp)
jge 0xa865
movq 0x100(%rsp), %rdi
imull $0x3, 0xec(%rsp), %eax
addl 0xe8(%rsp), %eax
movslq %eax, %rsi
callq 0xac10
movl (%rax), %eax
movl %eax, 0x3c(%rsp)
movq 0x110(%rsp), %rdi
movslq 0xec(%rsp), %rsi
callq 0xac30
movl 0x3c(%rsp), %edx
movslq 0xe8(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0xe8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rsp)
jmp 0xa7ff
jmp 0xa867
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
jmp 0xa7e0
leaq 0xb0(%rsp), %rdi
callq 0xac50
movl $0x0, 0xac(%rsp)
movl 0xac(%rsp), %eax
cmpl 0xf0(%rsp), %eax
jge 0xab38
movq 0x110(%rsp), %rdi
movslq 0xac(%rsp), %rsi
callq 0xac30
movq %rax, 0xa0(%rsp)
movl $0x0, 0x9c(%rsp)
cmpl $0x3, 0x9c(%rsp)
jge 0xab20
movq 0xa0(%rsp), %rax
movslq 0x9c(%rsp), %rdx
leaq 0xd53a(%rip), %rcx # 0x17e30
movslq (%rcx,%rdx,8), %rsi
leaq (%rax,%rsi,4), %rdi
movslq 0x4(%rcx,%rdx,8), %rcx
leaq (%rax,%rcx,4), %rsi
callq 0x56f0
movq %rax, 0x30(%rsp)
jmp 0xa913
movq 0xa0(%rsp), %rax
movslq 0x9c(%rsp), %rdx
leaq 0xd506(%rip), %rcx # 0x17e30
movslq (%rcx,%rdx,8), %rsi
leaq (%rax,%rsi,4), %rdi
movslq 0x4(%rcx,%rdx,8), %rcx
leaq (%rax,%rcx,4), %rsi
callq 0x5700
movq %rax, 0x28(%rsp)
jmp 0xa947
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rsi
leaq 0x94(%rsp), %rdi
callq 0xace0
jmp 0xa960
leaq 0x64(%rsp), %rdi
leaq 0x94(%rsp), %rsi
leaq 0xf4(%rsp), %rdx
callq 0xad60
jmp 0xa97c
leaq 0xb0(%rsp), %rdi
leaq 0x64(%rsp), %rsi
callq 0xad10
movb %dl, 0x1f(%rsp)
movq %rax, 0x20(%rsp)
jmp 0xa999
movb 0x1f(%rsp), %al
movq 0x20(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movb %al, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x70(%rsp)
movb 0x58(%rsp), %al
movb %al, 0x78(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x5710
movq %rax, 0x48(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x5720
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
testb $0x1, (%rax)
je 0xaa5e
movq 0x108(%rsp), %rdi
leaq 0x94(%rsp), %rsi
callq 0xadb0
jmp 0xa9fc
movl 0xf4(%rsp), %eax
movl %eax, 0x18(%rsp)
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
movq 0x110(%rsp), %rdi
movslq 0xac(%rsp), %rsi
callq 0xac30
movl 0x18(%rsp), %edx
movslq 0x9c(%rsp), %rcx
movl %edx, 0xc(%rax,%rcx,4)
jmp 0xaa94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xae90
jmp 0xab5c
movq 0x48(%rsp), %rdi
callq 0xae20
movl 0x8(%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x110(%rsp), %rdi
movslq 0xac(%rsp), %rsi
callq 0xac30
movl 0x14(%rsp), %edx
movslq 0x9c(%rsp), %rcx
movl %edx, 0xc(%rax,%rcx,4)
movq 0xf8(%rsp), %rdi
callq 0xae40
testb $0x1, %al
jne 0xab08
movq 0x110(%rsp), %rdi
movslq 0xac(%rsp), %rsi
callq 0xac30
movslq 0x9c(%rsp), %rcx
movl 0xc(%rax,%rcx,4), %eax
movl %eax, 0x10(%rsp)
movq 0xf8(%rsp), %rdi
imull $0x3, 0xac(%rsp), %eax
addl 0x9c(%rsp), %eax
movslq %eax, %rsi
callq 0xac10
movq %rax, %rcx
movl 0x10(%rsp), %eax
cmpl (%rcx), %eax
je 0xab06
leaq 0xd193(%rip), %rdi # 0x17c8e
xorl %eax, %eax
callq 0x51c0
jmp 0xab04
jmp 0xab06
jmp 0xab08
jmp 0xab0a
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0xa8d1
jmp 0xab22
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0xa895
movl 0xf0(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xae90
movl 0xc(%rsp), %eax
addq $0x118, %rsp # imm = 0x118
retq
movq 0x88(%rsp), %rdi
callq 0x5180
nopl (%rax)
| _ZN6mujoco6plugin10elasticity14CreateStencilsINS1_9Stencil2DEEEiRSt6vectorIT_SaIS5_EERS4_ISt4pairIiiESaISA_EERKS4_IiSaIiEESH_:
sub rsp, 118h
mov [rsp+118h+var_8], rdi
mov [rsp+118h+var_10], rsi
mov [rsp+118h+var_18], rdx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], 0
mov rdi, [rsp+118h+var_18]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov ecx, 3
xor edx, edx
div rcx
mov [rsp+118h+var_28], eax
mov rdi, [rsp+118h+var_8]
movsxd rsi, [rsp+118h+var_28]
call _ZNSt6vectorIN6mujoco6plugin10elasticity9Stencil2DESaIS3_EE6resizeEm; std::vector<mujoco::plugin::elasticity::Stencil2D>::resize(ulong)
mov [rsp+118h+var_2C], 0
loc_A7E0:
mov eax, [rsp+118h+var_2C]
cmp eax, [rsp+118h+var_28]
jge loc_A87D
mov [rsp+118h+var_30], 0
loc_A7FF:
cmp [rsp+118h+var_30], 3
jge short loc_A865
mov rdi, [rsp+118h+var_18]
imul eax, [rsp+118h+var_2C], 3
add eax, [rsp+118h+var_30]
movsxd rsi, eax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
mov [rsp+118h+var_DC], eax
mov rdi, [rsp+118h+var_8]
movsxd rsi, [rsp+118h+var_2C]
call _ZNSt6vectorIN6mujoco6plugin10elasticity9Stencil2DESaIS3_EEixEm; std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](ulong)
mov edx, [rsp+118h+var_DC]
movsxd rcx, [rsp+118h+var_30]
mov [rax+rcx*4], edx
mov eax, [rsp+118h+var_30]
add eax, 1
mov [rsp+118h+var_30], eax
jmp short loc_A7FF
loc_A865:
jmp short $+2
loc_A867:
mov eax, [rsp+118h+var_2C]
add eax, 1
mov [rsp+118h+var_2C], eax
jmp loc_A7E0
loc_A87D:
lea rdi, [rsp+118h+var_68]
call _ZNSt13unordered_mapISt4pairIiiEiN6mujoco6plugin10elasticity8PairHashESt8equal_toIS1_ESaIS0_IKS1_iEEEC2Ev; std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::unordered_map(void)
mov [rsp+118h+var_6C], 0
loc_A895:
mov eax, [rsp+118h+var_6C]
cmp eax, [rsp+118h+var_28]
jge loc_AB38
mov rdi, [rsp+118h+var_8]
movsxd rsi, [rsp+118h+var_6C]
call _ZNSt6vectorIN6mujoco6plugin10elasticity9Stencil2DESaIS3_EEixEm; std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](ulong)
mov [rsp+118h+var_78], rax
mov [rsp+118h+var_7C], 0
loc_A8D1:
cmp [rsp+118h+var_7C], 3
jge loc_AB20
mov rax, [rsp+118h+var_78]
movsxd rdx, [rsp+118h+var_7C]
lea rcx, _ZN6mujoco6plugin10elasticity9Stencil2D4edgeE; mujoco::plugin::elasticity::Stencil2D::edge
movsxd rsi, dword ptr [rcx+rdx*8]
lea rdi, [rax+rsi*4]
movsxd rcx, dword ptr [rcx+rdx*8+4]
lea rsi, [rax+rcx*4]
call __ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov [rsp+118h+var_E8], rax
jmp short $+2
loc_A913:
mov rax, [rsp+118h+var_78]
movsxd rdx, [rsp+118h+var_7C]
lea rcx, _ZN6mujoco6plugin10elasticity9Stencil2D4edgeE; mujoco::plugin::elasticity::Stencil2D::edge
movsxd rsi, dword ptr [rcx+rdx*8]
lea rdi, [rax+rsi*4]
movsxd rcx, dword ptr [rcx+rdx*8+4]
lea rsi, [rax+rcx*4]
call __ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov [rsp+118h+var_F0], rax
jmp short $+2
loc_A947:
mov rdx, [rsp+118h+var_F0]
mov rsi, [rsp+118h+var_E8]
lea rdi, [rsp+118h+var_84]
call _ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_
jmp short $+2
loc_A960:
lea rdi, [rsp+118h+var_B4]
lea rsi, [rsp+118h+var_84]
lea rdx, [rsp+118h+var_24]
call _ZNSt4pairIKS_IiiEiEC2IRS0_RiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_
jmp short $+2
loc_A97C:
lea rdi, [rsp+118h+var_68]
lea rsi, [rsp+118h+var_B4]
call _ZNSt13unordered_mapISt4pairIiiEiN6mujoco6plugin10elasticity8PairHashESt8equal_toIS1_ESaIS0_IKS1_iEEE6insertEOS9_; std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::insert(std::pair<std::pair<int,int> const,int>&&)
mov [rsp+118h+var_F9], dl
mov [rsp+118h+var_F8], rax
jmp short $+2
loc_A999:
mov al, [rsp+118h+var_F9]
mov rcx, [rsp+118h+var_F8]
mov [rsp+118h+var_C8], rcx
mov [rsp+118h+var_C0], al
mov rax, [rsp+118h+var_C8]
mov [rsp+118h+var_A8], rax
mov al, [rsp+118h+var_C0]
mov [rsp+118h+var_A0], al
lea rdi, [rsp+118h+var_A8]
call __ZSt3getILm0ENSt8__detail14_Node_iteratorISt4pairIKS2_IiiEiELb0ELb1EEEbEONSt13tuple_elementIXT_ES2_IT0_T1_EE4typeEOSA_; std::get<0ul,std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>,bool>(std::pair<std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>,bool>&&)
mov [rsp+118h+var_D0], rax
lea rdi, [rsp+118h+var_A8]
call __ZSt3getILm1ENSt8__detail14_Node_iteratorISt4pairIKS2_IiiEiELb0ELb1EEEbEONSt13tuple_elementIXT_ES2_IT0_T1_EE4typeEOSA_; std::get<1ul,std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>,bool>(std::pair<std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>,bool>&&)
mov [rsp+118h+var_D8], rax
mov rax, [rsp+118h+var_D8]
test byte ptr [rax], 1
jz short loc_AA5E
mov rdi, [rsp+118h+var_10]
lea rsi, [rsp+118h+var_84]
call _ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_; std::vector<std::pair<int,int>>::push_back(std::pair<int,int> const&)
jmp short $+2
loc_A9FC:
mov eax, [rsp+118h+var_24]
mov [rsp+118h+var_100], eax
add eax, 1
mov [rsp+118h+var_24], eax
mov rdi, [rsp+118h+var_8]
movsxd rsi, [rsp+118h+var_6C]
call _ZNSt6vectorIN6mujoco6plugin10elasticity9Stencil2DESaIS3_EEixEm; std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](ulong)
mov edx, [rsp+118h+var_100]
movsxd rcx, [rsp+118h+var_7C]
mov [rax+rcx*4+0Ch], edx
jmp short loc_AA94
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_A8]
call _ZNSt13unordered_mapISt4pairIiiEiN6mujoco6plugin10elasticity8PairHashESt8equal_toIS1_ESaIS0_IKS1_iEEED2Ev; std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::~unordered_map()
jmp loc_AB5C
loc_AA5E:
mov rdi, [rsp+118h+var_D0]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKS1_IiiEiELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>::operator->(void)
mov eax, [rax+8]
mov [rsp+118h+var_104], eax
mov rdi, [rsp+118h+var_8]
movsxd rsi, [rsp+118h+var_6C]
call _ZNSt6vectorIN6mujoco6plugin10elasticity9Stencil2DESaIS3_EEixEm; std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](ulong)
mov edx, [rsp+118h+var_104]
movsxd rcx, [rsp+118h+var_7C]
mov [rax+rcx*4+0Ch], edx
loc_AA94:
mov rdi, [rsp+118h+var_20]
call _ZNKSt6vectorIiSaIiEE5emptyEv; std::vector<int>::empty(void)
test al, 1
jnz short loc_AB08
mov rdi, [rsp+118h+var_8]
movsxd rsi, [rsp+118h+var_6C]
call _ZNSt6vectorIN6mujoco6plugin10elasticity9Stencil2DESaIS3_EEixEm; std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](ulong)
movsxd rcx, [rsp+118h+var_7C]
mov eax, [rax+rcx*4+0Ch]
mov [rsp+118h+var_108], eax
mov rdi, [rsp+118h+var_20]
imul eax, [rsp+118h+var_6C], 3
add eax, [rsp+118h+var_7C]
movsxd rsi, eax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rcx, rax
mov eax, [rsp+118h+var_108]
cmp eax, [rcx]
jz short loc_AB06
lea rdi, aEdgeOrderingIs; "edge ordering is incoherent between fle"...
xor eax, eax
call _mju_error
jmp short $+2
loc_AB04:
jmp short $+2
loc_AB06:
jmp short $+2
loc_AB08:
jmp short $+2
loc_AB0A:
mov eax, [rsp+118h+var_7C]
add eax, 1
mov [rsp+118h+var_7C], eax
jmp loc_A8D1
loc_AB20:
jmp short $+2
loc_AB22:
mov eax, [rsp+118h+var_6C]
add eax, 1
mov [rsp+118h+var_6C], eax
jmp loc_A895
loc_AB38:
mov eax, [rsp+118h+var_28]
mov [rsp+118h+var_10C], eax
lea rdi, [rsp+118h+var_68]
call _ZNSt13unordered_mapISt4pairIiiEiN6mujoco6plugin10elasticity8PairHashESt8equal_toIS1_ESaIS0_IKS1_iEEED2Ev; std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::~unordered_map()
mov eax, [rsp+118h+var_10C]
add rsp, 118h
retn
loc_AB5C:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
| long long mujoco::plugin::elasticity::CreateStencils<mujoco::plugin::elasticity::Stencil2D>(
long long a1,
long long a2,
_QWORD *a3,
long long a4)
{
unsigned long long v4; // rax
char v5; // dl
long long v6; // rax
long long v7; // rax
long long v8; // rax
unsigned int v10; // [rsp+Ch] [rbp-10Ch]
int v11; // [rsp+10h] [rbp-108h]
int v12; // [rsp+14h] [rbp-104h]
int v13; // [rsp+18h] [rbp-100h]
long long v14; // [rsp+28h] [rbp-F0h]
long long v15; // [rsp+30h] [rbp-E8h]
int v16; // [rsp+3Ch] [rbp-DCh]
long long v17; // [rsp+48h] [rbp-D0h]
_BYTE v18[12]; // [rsp+64h] [rbp-B4h] BYREF
long long v19; // [rsp+70h] [rbp-A8h] BYREF
char v20; // [rsp+78h] [rbp-A0h]
_BYTE v21[8]; // [rsp+94h] [rbp-84h] BYREF
int m; // [rsp+9Ch] [rbp-7Ch]
long long v23; // [rsp+A0h] [rbp-78h]
int k; // [rsp+ACh] [rbp-6Ch]
_BYTE v25[56]; // [rsp+B0h] [rbp-68h] BYREF
int j; // [rsp+E8h] [rbp-30h]
int i; // [rsp+ECh] [rbp-2Ch]
int v28; // [rsp+F0h] [rbp-28h]
int v29; // [rsp+F4h] [rbp-24h] BYREF
long long v30; // [rsp+F8h] [rbp-20h]
_QWORD *v31; // [rsp+100h] [rbp-18h]
long long v32; // [rsp+108h] [rbp-10h]
long long v33; // [rsp+110h] [rbp-8h]
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = 0;
v4 = std::vector<int>::size(a3);
v28 = v4 / 3;
std::vector<mujoco::plugin::elasticity::Stencil2D>::resize(a1, v28, v4 % 3);
for ( i = 0; i < v28; ++i )
{
for ( j = 0; j < 3; ++j )
{
v16 = *(_DWORD *)std::vector<int>::operator[](v31, j + 3 * i);
*(_DWORD *)(std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](v33, i) + 4LL * j) = v16;
}
}
std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::unordered_map(v25);
for ( k = 0; k < v28; ++k )
{
v23 = std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](v33, k);
for ( m = 0; m < 3; ++m )
{
v15 = std::min<int>(
v23 + 4LL * mujoco::plugin::elasticity::Stencil2D::edge[2 * m],
v23 + 4LL * mujoco::plugin::elasticity::Stencil2D::edge[2 * m + 1]);
v14 = std::max<int>(
v23 + 4LL * mujoco::plugin::elasticity::Stencil2D::edge[2 * m],
v23 + 4LL * mujoco::plugin::elasticity::Stencil2D::edge[2 * m + 1]);
ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_(
v21,
v15,
v14);
ZNSt4pairIKS_IiiEiEC2IRS0_RiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(
v18,
v21,
&v29);
v19 = std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::insert(
v25,
v18);
v20 = v5;
v17 = std::get<0ul,std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>,bool>(&v19);
if ( (*(_BYTE *)std::get<1ul,std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>,bool>(&v19) & 1) != 0 )
{
std::vector<std::pair<int,int>>::push_back(v32, v21);
v13 = v29++;
v6 = std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](v33, k);
*(_DWORD *)(v6 + 4LL * m + 12) = v13;
}
else
{
v12 = *(_DWORD *)(std::__detail::_Node_iterator<std::pair<std::pair const<int,int>,int>,false,true>::operator->(v17)
+ 8);
v7 = std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](v33, k);
*(_DWORD *)(v7 + 4LL * m + 12) = v12;
}
if ( (std::vector<int>::empty(v30) & 1) == 0 )
{
v8 = std::vector<mujoco::plugin::elasticity::Stencil2D>::operator[](v33, k);
v11 = *(_DWORD *)(v8 + 4LL * m + 12);
if ( v11 != *(_DWORD *)std::vector<int>::operator[](v30, m + 3 * k) )
mju_error("edge ordering is incoherent between flex and plugin");
}
}
}
v10 = v28;
std::unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::~unordered_map(v25);
return v10;
}
| CreateStencils<mujoco::plugin::elasticity::Stencil2D>:
SUB RSP,0x118
MOV qword ptr [RSP + 0x110],RDI
MOV qword ptr [RSP + 0x108],RSI
MOV qword ptr [RSP + 0x100],RDX
MOV qword ptr [RSP + 0xf8],RCX
MOV dword ptr [RSP + 0xf4],0x0
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x00109430
MOV ECX,0x3
XOR EDX,EDX
DIV RCX
MOV dword ptr [RSP + 0xf0],EAX
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0xf0]
CALL 0x0010ab70
MOV dword ptr [RSP + 0xec],0x0
LAB_0010a7e0:
MOV EAX,dword ptr [RSP + 0xec]
CMP EAX,dword ptr [RSP + 0xf0]
JGE 0x0010a87d
MOV dword ptr [RSP + 0xe8],0x0
LAB_0010a7ff:
CMP dword ptr [RSP + 0xe8],0x3
JGE 0x0010a865
MOV RDI,qword ptr [RSP + 0x100]
IMUL EAX,dword ptr [RSP + 0xec],0x3
ADD EAX,dword ptr [RSP + 0xe8]
MOVSXD RSI,EAX
CALL 0x0010ac10
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x3c],EAX
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0xec]
CALL 0x0010ac30
MOV EDX,dword ptr [RSP + 0x3c]
MOVSXD RCX,dword ptr [RSP + 0xe8]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0xe8]
ADD EAX,0x1
MOV dword ptr [RSP + 0xe8],EAX
JMP 0x0010a7ff
LAB_0010a865:
JMP 0x0010a867
LAB_0010a867:
MOV EAX,dword ptr [RSP + 0xec]
ADD EAX,0x1
MOV dword ptr [RSP + 0xec],EAX
JMP 0x0010a7e0
LAB_0010a87d:
LEA RDI,[RSP + 0xb0]
CALL 0x0010ac50
MOV dword ptr [RSP + 0xac],0x0
LAB_0010a895:
MOV EAX,dword ptr [RSP + 0xac]
CMP EAX,dword ptr [RSP + 0xf0]
JGE 0x0010ab38
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0xac]
CALL 0x0010ac30
MOV qword ptr [RSP + 0xa0],RAX
MOV dword ptr [RSP + 0x9c],0x0
LAB_0010a8d1:
CMP dword ptr [RSP + 0x9c],0x3
JGE 0x0010ab20
MOV RAX,qword ptr [RSP + 0xa0]
MOVSXD RDX,dword ptr [RSP + 0x9c]
LEA RCX,[0x117e30]
MOVSXD RSI,dword ptr [RCX + RDX*0x8]
LEA RDI,[RAX + RSI*0x4]
MOVSXD RCX,dword ptr [RCX + RDX*0x8 + 0x4]
LEA RSI,[RAX + RCX*0x4]
LAB_0010a907:
CALL 0x001056f0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0010a913
LAB_0010a913:
MOV RAX,qword ptr [RSP + 0xa0]
MOVSXD RDX,dword ptr [RSP + 0x9c]
LEA RCX,[0x117e30]
MOVSXD RSI,dword ptr [RCX + RDX*0x8]
LEA RDI,[RAX + RSI*0x4]
MOVSXD RCX,dword ptr [RCX + RDX*0x8 + 0x4]
LEA RSI,[RAX + RCX*0x4]
CALL 0x00105700
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0010a947
LAB_0010a947:
MOV RDX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
LEA RDI,[RSP + 0x94]
CALL 0x0010ace0
JMP 0x0010a960
LAB_0010a960:
LEA RDI,[RSP + 0x64]
LEA RSI,[RSP + 0x94]
LEA RDX,[RSP + 0xf4]
CALL 0x0010ad60
JMP 0x0010a97c
LAB_0010a97c:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x64]
CALL 0x0010ad10
MOV byte ptr [RSP + 0x1f],DL
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0010a999
LAB_0010a999:
MOV AL,byte ptr [RSP + 0x1f]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x50],RCX
MOV byte ptr [RSP + 0x58],AL
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x70],RAX
MOV AL,byte ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x78],AL
LEA RDI,[RSP + 0x70]
CALL 0x00105710
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x70]
CALL 0x00105720
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
TEST byte ptr [RAX],0x1
JZ 0x0010aa5e
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[RSP + 0x94]
CALL 0x0010adb0
JMP 0x0010a9fc
LAB_0010a9fc:
MOV EAX,dword ptr [RSP + 0xf4]
MOV dword ptr [RSP + 0x18],EAX
ADD EAX,0x1
MOV dword ptr [RSP + 0xf4],EAX
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0xac]
CALL 0x0010ac30
MOV EDX,dword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x9c]
MOV dword ptr [RAX + RCX*0x4 + 0xc],EDX
JMP 0x0010aa94
LAB_0010aa5e:
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0010ae20
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0xac]
CALL 0x0010ac30
MOV EDX,dword ptr [RSP + 0x14]
MOVSXD RCX,dword ptr [RSP + 0x9c]
MOV dword ptr [RAX + RCX*0x4 + 0xc],EDX
LAB_0010aa94:
MOV RDI,qword ptr [RSP + 0xf8]
CALL 0x0010ae40
TEST AL,0x1
JNZ 0x0010ab08
MOV RDI,qword ptr [RSP + 0x110]
MOVSXD RSI,dword ptr [RSP + 0xac]
CALL 0x0010ac30
MOVSXD RCX,dword ptr [RSP + 0x9c]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0xc]
MOV dword ptr [RSP + 0x10],EAX
MOV RDI,qword ptr [RSP + 0xf8]
IMUL EAX,dword ptr [RSP + 0xac],0x3
ADD EAX,dword ptr [RSP + 0x9c]
MOVSXD RSI,EAX
CALL 0x0010ac10
MOV RCX,RAX
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX]
JZ 0x0010ab06
LEA RDI,[0x117c8e]
XOR EAX,EAX
CALL 0x001051c0
LAB_0010ab02:
JMP 0x0010ab04
LAB_0010ab04:
JMP 0x0010ab06
LAB_0010ab06:
JMP 0x0010ab08
LAB_0010ab08:
JMP 0x0010ab0a
LAB_0010ab0a:
MOV EAX,dword ptr [RSP + 0x9c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x9c],EAX
JMP 0x0010a8d1
LAB_0010ab20:
JMP 0x0010ab22
LAB_0010ab22:
MOV EAX,dword ptr [RSP + 0xac]
ADD EAX,0x1
MOV dword ptr [RSP + 0xac],EAX
JMP 0x0010a895
LAB_0010ab38:
MOV EAX,dword ptr [RSP + 0xf0]
MOV dword ptr [RSP + 0xc],EAX
LEA RDI,[RSP + 0xb0]
CALL 0x0010ae90
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0x118
RET
|
/* int
mujoco::plugin::elasticity::CreateStencils<mujoco::plugin::elasticity::Stencil2D>(std::vector<mujoco::plugin::elasticity::Stencil2D,
std::allocator<mujoco::plugin::elasticity::Stencil2D> >&, std::vector<std::pair<int, int>,
std::allocator<std::pair<int, int> > >&, std::vector<int, std::allocator<int> > const&,
std::vector<int, std::allocator<int> > const&) */
int mujoco::plugin::elasticity::CreateStencils<mujoco::plugin::elasticity::Stencil2D>
(vector *param_1,vector *param_2,vector *param_3,vector *param_4)
{
int4 uVar1;
int iVar2;
int1 auVar3 [16];
ulong uVar4;
int4 *puVar5;
long lVar6;
int *piVar7;
int *piVar8;
type *this;
type *ptVar9;
int1 extraout_DL;
pair local_b4 [12];
int8 local_a8;
int1 local_a0;
pair local_84 [8];
int local_7c;
long local_78;
int local_6c;
unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int>const,int>>>
local_68 [56];
int local_30;
int local_2c;
int local_28;
int local_24;
vector *local_20;
vector *local_18;
vector *local_10;
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
*local_8;
local_24 = 0;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = (vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
*)param_1;
uVar4 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_3);
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar4;
local_28 = SUB164(auVar3 / ZEXT816(3),0);
std::
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
::resize(local_8,(long)local_28);
for (local_2c = 0; local_2c < local_28; local_2c = local_2c + 1) {
for (local_30 = 0; local_30 < 3; local_30 = local_30 + 1) {
puVar5 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)local_18,
(long)(local_2c * 3 + local_30));
uVar1 = *puVar5;
lVar6 = std::
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
::operator[](local_8,(long)local_2c);
*(int4 *)(lVar6 + (long)local_30 * 4) = uVar1;
}
}
std::
unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int>const,int>>>
::unordered_map(local_68);
for (local_6c = 0; iVar2 = local_28, local_6c < local_28; local_6c = local_6c + 1) {
local_78 = std::
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
::operator[](local_8,(long)local_6c);
for (local_7c = 0; local_7c < 3; local_7c = local_7c + 1) {
/* try { // try from 0010a907 to 0010ab01 has its CatchHandler @ 0010aa38 */
piVar7 = std::min<int>((int *)(local_78 +
(long)*(int *)(Stencil2D::edge + (long)local_7c * 8) * 4),
(int *)(local_78 +
(long)*(int *)(Stencil2D::edge + (long)local_7c * 8 + 4) * 4));
piVar8 = std::max<int>((int *)(local_78 +
(long)*(int *)(Stencil2D::edge + (long)local_7c * 8) * 4),
(int *)(local_78 +
(long)*(int *)(Stencil2D::edge + (long)local_7c * 8 + 4) * 4));
_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS3_S4_EEEbE4typeELb1EEERKiS8_
(local_84,piVar7,piVar8);
_ZNSt4pairIKS_IiiEiEC2IRS0_RiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_
(local_b4,local_84,&local_24);
local_a8 = std::
unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int>const,int>>>
::insert(local_68,local_b4);
local_a0 = extraout_DL;
this = std::
get<0ul,std::__detail::_Node_iterator<std::pair<std::pair<int,int>const,int>,false,true>,bool>
((pair *)&local_a8);
ptVar9 = std::
get<1ul,std::__detail::_Node_iterator<std::pair<std::pair<int,int>const,int>,false,true>,bool>
((pair *)&local_a8);
if (((byte)*ptVar9 & 1) == 0) {
lVar6 = std::__detail::_Node_iterator<std::pair<std::pair<int,int>const,int>,false,true>::
operator->((_Node_iterator<std::pair<std::pair<int,int>const,int>,false,true> *)this
);
uVar1 = *(int4 *)(lVar6 + 8);
lVar6 = std::
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
::operator[](local_8,(long)local_6c);
*(int4 *)(lVar6 + 0xc + (long)local_7c * 4) = uVar1;
}
else {
std::vector<std::pair<int,int>,std::allocator<std::pair<int,int>>>::push_back
((vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *)local_10,
local_84);
iVar2 = local_24;
local_24 = local_24 + 1;
lVar6 = std::
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
::operator[](local_8,(long)local_6c);
*(int *)(lVar6 + 0xc + (long)local_7c * 4) = iVar2;
}
uVar4 = std::vector<int,std::allocator<int>>::empty
((vector<int,std::allocator<int>> *)local_20);
if ((uVar4 & 1) == 0) {
lVar6 = std::
vector<mujoco::plugin::elasticity::Stencil2D,std::allocator<mujoco::plugin::elasticity::Stencil2D>>
::operator[](local_8,(long)local_6c);
iVar2 = *(int *)(lVar6 + 0xc + (long)local_7c * 4);
piVar7 = (int *)std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)local_20,
(long)(local_6c * 3 + local_7c));
if (iVar2 != *piVar7) {
mju_error("edge ordering is incoherent between flex and plugin");
}
}
}
}
std::
unordered_map<std::pair<int,int>,int,mujoco::plugin::elasticity::PairHash,std::equal_to<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int>const,int>>>
::~unordered_map(local_68);
return iVar2;
}
| |
45,928 | init_timers() | eloqsql/storage/perfschema/pfs_timer.cc | void init_timers(void)
{
double pico_frequency= 1.0e12;
cycle_v0= my_timer_cycles();
nanosec_v0= my_timer_nanoseconds();
microsec_v0= my_timer_microseconds();
millisec_v0= my_timer_milliseconds();
tick_v0= my_timer_ticks();
if (sys_timer_info.cycles.frequency > 0)
cycle_to_pico= round_to_ulong(pico_frequency/
(double)sys_timer_info.cycles.frequency);
else
cycle_to_pico= 0;
if (sys_timer_info.nanoseconds.frequency > 0)
nanosec_to_pico= round_to_ulong(pico_frequency/
(double)sys_timer_info.nanoseconds.frequency);
else
nanosec_to_pico= 0;
if (sys_timer_info.microseconds.frequency > 0)
microsec_to_pico= round_to_ulong(pico_frequency/
(double)sys_timer_info.microseconds.frequency);
else
microsec_to_pico= 0;
if (sys_timer_info.milliseconds.frequency > 0)
millisec_to_pico= round_to_ulong(pico_frequency/
(double)sys_timer_info.milliseconds.frequency);
else
millisec_to_pico= 0;
if (sys_timer_info.ticks.frequency > 0)
tick_to_pico= round_to_ulonglong(pico_frequency/
(double)sys_timer_info.ticks.frequency);
else
tick_to_pico= 0;
to_pico_data[TIMER_NAME_CYCLE].m_v0= cycle_v0;
to_pico_data[TIMER_NAME_CYCLE].m_factor= cycle_to_pico;
to_pico_data[TIMER_NAME_NANOSEC].m_v0= nanosec_v0;
to_pico_data[TIMER_NAME_NANOSEC].m_factor= nanosec_to_pico;
to_pico_data[TIMER_NAME_MICROSEC].m_v0= microsec_v0;
to_pico_data[TIMER_NAME_MICROSEC].m_factor= microsec_to_pico;
to_pico_data[TIMER_NAME_MILLISEC].m_v0= millisec_v0;
to_pico_data[TIMER_NAME_MILLISEC].m_factor= millisec_to_pico;
to_pico_data[TIMER_NAME_TICK].m_v0= tick_v0;
to_pico_data[TIMER_NAME_TICK].m_factor= tick_to_pico;
/*
Depending on the platform and build options,
some timers may not be available.
Pick best replacements.
*/
/*
For WAIT, the cycle timer is used by default. However, it is not available
on all architectures. Fall back to the nanosecond timer in this case. It is
unlikely that neither cycle nor nanosecond are available, but we continue
probing less resolution timers anyway for consistency with other events.
*/
if (cycle_to_pico != 0)
{
/* Normal case. */
wait_timer= TIMER_NAME_CYCLE;
}
else if (nanosec_to_pico != 0)
{
/* Robustness, no known cases. */
wait_timer= TIMER_NAME_NANOSEC;
}
else if (microsec_to_pico != 0)
{
/* Robustness, no known cases. */
wait_timer= TIMER_NAME_MICROSEC;
}
else if (millisec_to_pico != 0)
{
/* Robustness, no known cases. */
wait_timer= TIMER_NAME_MILLISEC;
}
else
{
/*
Will never be reached on any architecture, but must provide a default if
no other timers are available.
*/
wait_timer= TIMER_NAME_TICK;
}
/*
For STAGE and STATEMENT, a timer with a fixed frequency is better.
The prefered timer is nanosecond, or lower resolutions.
*/
if (nanosec_to_pico != 0)
{
/* Normal case. */
stage_timer= TIMER_NAME_NANOSEC;
statement_timer= TIMER_NAME_NANOSEC;
transaction_timer= TIMER_NAME_NANOSEC;
}
else if (microsec_to_pico != 0)
{
/* Windows. */
stage_timer= TIMER_NAME_MICROSEC;
statement_timer= TIMER_NAME_MICROSEC;
transaction_timer= TIMER_NAME_MICROSEC;
}
else if (millisec_to_pico != 0)
{
/* Robustness, no known cases. */
stage_timer= TIMER_NAME_MILLISEC;
statement_timer= TIMER_NAME_MILLISEC;
transaction_timer= TIMER_NAME_MILLISEC;
}
else if (tick_to_pico != 0)
{
/* Robustness, no known cases. */
stage_timer= TIMER_NAME_TICK;
statement_timer= TIMER_NAME_TICK;
transaction_timer= TIMER_NAME_TICK;
}
else
{
/* Robustness, no known cases. */
stage_timer= TIMER_NAME_CYCLE;
statement_timer= TIMER_NAME_CYCLE;
transaction_timer= TIMER_NAME_CYCLE;
}
/*
For IDLE, a timer with a fixed frequency is critical,
as the CPU clock may slow down a lot if the server is completely idle.
The prefered timer is microsecond, or lower resolutions.
*/
if (microsec_to_pico != 0)
{
/* Normal case. */
idle_timer= TIMER_NAME_MICROSEC;
}
else if (millisec_to_pico != 0)
{
/* Robustness, no known cases. */
wait_timer= TIMER_NAME_MILLISEC;
}
else if (tick_to_pico != 0)
{
/* Robustness, no known cases. */
idle_timer= TIMER_NAME_TICK;
}
else
{
/* Robustness, no known cases. */
idle_timer= TIMER_NAME_CYCLE;
}
} | O3 | cpp | init_timers():
pushq %rbp
movq %rsp, %rbp
rdtsc
shlq $0x20, %rdx
orq %rax, %rdx
movq %rdx, 0x38e24c(%rip) # 0x3d1c70
callq 0x47e98
movq %rax, 0x38e248(%rip) # 0x3d1c78
callq 0x47ec1
movq %rax, 0x38e244(%rip) # 0x3d1c80
callq 0x47efd
movq %rax, 0x38e240(%rip) # 0x3d1c88
callq 0x47f3d
movq %rax, 0x38e23c(%rip) # 0x3d1c90
leaq 0x39798d(%rip), %rdx # 0x3db3e8
movq 0x10(%rdx), %rsi
movq 0x30(%rdx), %rdi
movq %rsi, %xmm0
movq 0x385b0(%rip), %xmm1 # 0x7c020
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x385b4(%rip), %xmm2 # 0x7c030
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3 # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movsd 0x3e44c(%rip), %xmm0 # 0x81ee0
movapd %xmm0, %xmm5
divsd %xmm3, %xmm5
movsd 0x3e444(%rip), %xmm3 # 0x81ee8
addsd %xmm3, %xmm5
cvttsd2si %xmm5, %r8
movq %r8, %r9
movsd 0x3e3f8(%rip), %xmm4 # 0x81eb0
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %rcx
sarq $0x3f, %r9
andq %r9, %rcx
orq %r8, %rcx
testq %rsi, %rsi
cmoveq %rsi, %rcx
movq %rcx, 0x38e1bf(%rip) # 0x3d1c98
movq %rdi, %xmm5
punpckldq %xmm1, %xmm5 # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6 # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
movapd %xmm0, %xmm5
divsd %xmm6, %xmm5
addsd %xmm3, %xmm5
cvttsd2si %xmm5, %r8
movq %r8, %r9
sarq $0x3f, %r9
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %rsi
andq %r9, %rsi
orq %r8, %rsi
testq %rdi, %rdi
cmoveq %rdi, %rsi
movq 0x50(%rdx), %r8
movq %r8, %xmm5
punpckldq %xmm1, %xmm5 # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6 # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
movapd %xmm0, %xmm5
divsd %xmm6, %xmm5
addsd %xmm3, %xmm5
cvttsd2si %xmm5, %r9
movq %rsi, 0x38e14b(%rip) # 0x3d1ca0
movq %r9, %r10
sarq $0x3f, %r10
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %rdi
andq %r10, %rdi
orq %r9, %rdi
testq %r8, %r8
cmoveq %r8, %rdi
movq %rdi, 0x38e12f(%rip) # 0x3d1ca8
movq 0x70(%rdx), %r9
movq %r9, %xmm5
punpckldq %xmm1, %xmm5 # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6 # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
movapd %xmm0, %xmm5
divsd %xmm6, %xmm5
addsd %xmm3, %xmm5
cvttsd2si %xmm5, %r10
movq %r10, %r11
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %r8
sarq $0x3f, %r11
andq %r11, %r8
orq %r10, %r8
testq %r9, %r9
cmoveq %r9, %r8
movq %r8, 0x38e0e5(%rip) # 0x3d1cb0
movq 0x90(%rdx), %r9
movq %r9, %xmm5
punpckldq %xmm1, %xmm5 # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm1
unpckhpd %xmm5, %xmm1 # xmm1 = xmm1[1],xmm5[1]
addsd %xmm5, %xmm1
divsd %xmm1, %xmm0
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %r10
movq %r10, %r11
sarq $0x3f, %r11
subsd %xmm4, %xmm0
cvttsd2si %xmm0, %rdx
andq %r11, %rdx
orq %r10, %rdx
testq %r9, %r9
cmoveq %r9, %rdx
movq %rdx, 0x38e09c(%rip) # 0x3d1cb8
movq 0x38e04d(%rip), %r9 # 0x3d1c70
movq %r9, 0x38e0a6(%rip) # 0x3d1cd0
movq %rcx, 0x38e0a7(%rip) # 0x3d1cd8
movq 0x38e040(%rip), %r9 # 0x3d1c78
movq %r9, 0x38e0a1(%rip) # 0x3d1ce0
movq %rsi, 0x38e0a2(%rip) # 0x3d1ce8
movq 0x38e033(%rip), %r9 # 0x3d1c80
movq %r9, 0x38e09c(%rip) # 0x3d1cf0
movq %rdi, 0x38e09d(%rip) # 0x3d1cf8
movq 0x38e026(%rip), %r9 # 0x3d1c88
movq %r9, 0x38e097(%rip) # 0x3d1d00
movq %r8, 0x38e098(%rip) # 0x3d1d08
movq %rax, 0x38e099(%rip) # 0x3d1d10
movq %rdx, 0x38e09a(%rip) # 0x3d1d18
testq %rcx, %rcx
je 0x43ca1
movl $0x1, 0x2d4957(%rip) # 0x3185e4
testq %rsi, %rsi
jne 0x43cb0
testq %rdi, %rdi
jne 0x43cee
testq %r8, %r8
jne 0x43d16
jmp 0x43d43
testq %rsi, %rsi
je 0x43cdf
movl $0x2, 0x2d4934(%rip) # 0x3185e4
movl $0x2, %eax
movl %eax, 0x2d492d(%rip) # 0x3185e8
movl %eax, 0x2d492b(%rip) # 0x3185ec
movl %eax, 0x2d4929(%rip) # 0x3185f0
testq %rdi, %rdi
jne 0x43d05
testq %r8, %r8
jne 0x43d2d
testq %rdx, %rdx
jne 0x43d5f
jmp 0x43d82
testq %rdi, %rdi
je 0x43d11
movl $0x3, 0x2d48f6(%rip) # 0x3185e4
movl $0x3, %eax
movl %eax, 0x2d48ef(%rip) # 0x3185e8
movl %eax, 0x2d48ed(%rip) # 0x3185ec
movl %eax, 0x2d48eb(%rip) # 0x3185f0
movl $0x3, 0x2d48d1(%rip) # 0x3185e0
jmp 0x43d8c
testq %r8, %r8
je 0x43d39
movl $0x4, %eax
movl %eax, 0x2d48c7(%rip) # 0x3185e8
movl %eax, 0x2d48c5(%rip) # 0x3185ec
movl %eax, 0x2d48c3(%rip) # 0x3185f0
movl $0x4, 0x2d48ad(%rip) # 0x3185e4
jmp 0x43d8c
movl $0x5, 0x2d48a1(%rip) # 0x3185e4
testq %rdx, %rdx
je 0x43d6b
movl $0x5, %eax
movl %eax, 0x2d4895(%rip) # 0x3185e8
movl %eax, 0x2d4893(%rip) # 0x3185ec
movl %eax, 0x2d4891(%rip) # 0x3185f0
movl $0x5, 0x2d4877(%rip) # 0x3185e0
jmp 0x43d8c
movl $0x1, %eax
movl %eax, 0x2d4872(%rip) # 0x3185e8
movl %eax, 0x2d4870(%rip) # 0x3185ec
movl %eax, 0x2d486e(%rip) # 0x3185f0
movl $0x1, 0x2d4854(%rip) # 0x3185e0
popq %rbp
retq
| _Z11init_timersv:
push rbp
mov rbp, rsp
rdtsc
shl rdx, 20h
or rdx, rax
mov cs:_ZL8cycle_v0, rdx; cycle_v0
call my_timer_nanoseconds
mov cs:_ZL10nanosec_v0, rax; nanosec_v0
call my_timer_microseconds
mov cs:_ZL11microsec_v0, rax; microsec_v0
call my_timer_milliseconds
mov cs:_ZL11millisec_v0, rax; millisec_v0
call my_timer_ticks
mov cs:_ZL7tick_v0, rax; tick_v0
lea rdx, sys_timer_info
mov rsi, [rdx+10h]
mov rdi, [rdx+30h]
movq xmm0, rsi
movq xmm1, qword ptr cs:xmmword_7C020
punpckldq xmm0, xmm1
movapd xmm2, cs:xmmword_7C030
subpd xmm0, xmm2
movapd xmm3, xmm0
unpckhpd xmm3, xmm0
addsd xmm3, xmm0
movsd xmm0, cs:qword_81EE0
movapd xmm5, xmm0
divsd xmm5, xmm3
movsd xmm3, cs:qword_81EE8
addsd xmm5, xmm3
cvttsd2si r8, xmm5
mov r9, r8
movsd xmm4, cs:qword_81EB0
subsd xmm5, xmm4
cvttsd2si rcx, xmm5
sar r9, 3Fh
and rcx, r9
or rcx, r8
test rsi, rsi
cmovz rcx, rsi
mov cs:_ZL13cycle_to_pico, rcx; cycle_to_pico
movq xmm5, rdi
punpckldq xmm5, xmm1
subpd xmm5, xmm2
movapd xmm6, xmm5
unpckhpd xmm6, xmm5
addsd xmm6, xmm5
movapd xmm5, xmm0
divsd xmm5, xmm6
addsd xmm5, xmm3
cvttsd2si r8, xmm5
mov r9, r8
sar r9, 3Fh
subsd xmm5, xmm4
cvttsd2si rsi, xmm5
and rsi, r9
or rsi, r8
test rdi, rdi
cmovz rsi, rdi
mov r8, [rdx+50h]
movq xmm5, r8
punpckldq xmm5, xmm1
subpd xmm5, xmm2
movapd xmm6, xmm5
unpckhpd xmm6, xmm5
addsd xmm6, xmm5
movapd xmm5, xmm0
divsd xmm5, xmm6
addsd xmm5, xmm3
cvttsd2si r9, xmm5
mov cs:_ZL15nanosec_to_pico, rsi; nanosec_to_pico
mov r10, r9
sar r10, 3Fh
subsd xmm5, xmm4
cvttsd2si rdi, xmm5
and rdi, r10
or rdi, r9
test r8, r8
cmovz rdi, r8
mov cs:_ZL16microsec_to_pico, rdi; microsec_to_pico
mov r9, [rdx+70h]
movq xmm5, r9
punpckldq xmm5, xmm1
subpd xmm5, xmm2
movapd xmm6, xmm5
unpckhpd xmm6, xmm5
addsd xmm6, xmm5
movapd xmm5, xmm0
divsd xmm5, xmm6
addsd xmm5, xmm3
cvttsd2si r10, xmm5
mov r11, r10
subsd xmm5, xmm4
cvttsd2si r8, xmm5
sar r11, 3Fh
and r8, r11
or r8, r10
test r9, r9
cmovz r8, r9
mov cs:_ZL16millisec_to_pico, r8; millisec_to_pico
mov r9, [rdx+90h]
movq xmm5, r9
punpckldq xmm5, xmm1
subpd xmm5, xmm2
movapd xmm1, xmm5
unpckhpd xmm1, xmm5
addsd xmm1, xmm5
divsd xmm0, xmm1
addsd xmm0, xmm3
cvttsd2si r10, xmm0
mov r11, r10
sar r11, 3Fh
subsd xmm0, xmm4
cvttsd2si rdx, xmm0
and rdx, r11
or rdx, r10
test r9, r9
cmovz rdx, r9
mov cs:_ZL12tick_to_pico, rdx; tick_to_pico
mov r9, cs:_ZL8cycle_v0; cycle_v0
mov cs:qword_3D1CD0, r9
mov cs:qword_3D1CD8, rcx
mov r9, cs:_ZL10nanosec_v0; nanosec_v0
mov cs:qword_3D1CE0, r9
mov cs:qword_3D1CE8, rsi
mov r9, cs:_ZL11microsec_v0; microsec_v0
mov cs:qword_3D1CF0, r9
mov cs:qword_3D1CF8, rdi
mov r9, cs:_ZL11millisec_v0; millisec_v0
mov cs:qword_3D1D00, r9
mov cs:qword_3D1D08, r8
mov cs:qword_3D1D10, rax
mov cs:qword_3D1D18, rdx
test rcx, rcx
jz short loc_43CA1
mov cs:wait_timer, 1
test rsi, rsi
jnz short loc_43CB0
test rdi, rdi
jnz short loc_43CEE
test r8, r8
jnz short loc_43D16
jmp loc_43D43
loc_43CA1:
test rsi, rsi
jz short loc_43CDF
mov cs:wait_timer, 2
loc_43CB0:
mov eax, 2
mov cs:stage_timer, eax
mov cs:statement_timer, eax
mov cs:transaction_timer, eax
test rdi, rdi
jnz short loc_43D05
test r8, r8
jnz short loc_43D2D
test rdx, rdx
jnz loc_43D5F
jmp loc_43D82
loc_43CDF:
test rdi, rdi
jz short loc_43D11
mov cs:wait_timer, 3
loc_43CEE:
mov eax, 3
mov cs:stage_timer, eax
mov cs:statement_timer, eax
mov cs:transaction_timer, eax
loc_43D05:
mov cs:idle_timer, 3
jmp short loc_43D8C
loc_43D11:
test r8, r8
jz short loc_43D39
loc_43D16:
mov eax, 4
mov cs:stage_timer, eax
mov cs:statement_timer, eax
mov cs:transaction_timer, eax
loc_43D2D:
mov cs:wait_timer, 4
jmp short loc_43D8C
loc_43D39:
mov cs:wait_timer, 5
loc_43D43:
test rdx, rdx
jz short loc_43D6B
mov eax, 5
mov cs:stage_timer, eax
mov cs:statement_timer, eax
mov cs:transaction_timer, eax
loc_43D5F:
mov cs:idle_timer, 5
jmp short loc_43D8C
loc_43D6B:
mov eax, 1
mov cs:stage_timer, eax
mov cs:statement_timer, eax
mov cs:transaction_timer, eax
loc_43D82:
mov cs:idle_timer, 1
loc_43D8C:
pop rbp
retn
| long long init_timers(void)
{
long long v0; // rax
unsigned long long v1; // rsi
unsigned long long v2; // rdi
__m128i v3; // xmm1
__m128d v4; // xmm0
long long v5; // rcx
__m128d v6; // xmm5
long long v7; // rsi
unsigned long long v8; // r8
__m128d v9; // xmm5
long long v10; // rdi
unsigned long long v11; // r9
__m128d v12; // xmm5
long long v13; // r8
unsigned long long v14; // r9
__m128d v15; // xmm5
long long v16; // rdx
long long result; // rax
cycle_v0 = __rdtsc();
nanosec_v0 = my_timer_nanoseconds();
microsec_v0 = my_timer_microseconds();
millisec_v0 = my_timer_milliseconds();
v0 = my_timer_ticks();
tick_v0 = v0;
v1 = sys_timer_info[2];
v2 = sys_timer_info[6];
v3 = _mm_loadl_epi64((const __m128i *)&xmmword_7C020);
v4 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v1, v3), (__m128d)xmmword_7C030);
v5 = (unsigned int)(int)(1.0e12 / (_mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]) + 0.5);
if ( !v1 )
v5 = 0LL;
cycle_to_pico = v5;
v6 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v2, v3), (__m128d)xmmword_7C030);
v7 = (unsigned int)(int)(1.0e12 / (_mm_unpackhi_pd(v6, v6).m128d_f64[0] + v6.m128d_f64[0]) + 0.5);
if ( !v2 )
v7 = 0LL;
v8 = sys_timer_info[10];
v9 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v8, v3), (__m128d)xmmword_7C030);
nanosec_to_pico = v7;
v10 = (unsigned int)(int)(1.0e12 / (_mm_unpackhi_pd(v9, v9).m128d_f64[0] + v9.m128d_f64[0]) + 0.5);
if ( !v8 )
v10 = 0LL;
microsec_to_pico = v10;
v11 = sys_timer_info[14];
v12 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v11, v3), (__m128d)xmmword_7C030);
v13 = (unsigned int)(int)(1.0e12 / (_mm_unpackhi_pd(v12, v12).m128d_f64[0] + v12.m128d_f64[0]) + 0.5);
if ( !v11 )
v13 = 0LL;
millisec_to_pico = v13;
v14 = sys_timer_info[18];
v15 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v14, v3), (__m128d)xmmword_7C030);
v16 = (unsigned int)(int)(1.0e12 / (_mm_unpackhi_pd(v15, v15).m128d_f64[0] + v15.m128d_f64[0]) + 0.5);
if ( !v14 )
v16 = 0LL;
tick_to_pico = v16;
qword_3D1CD0 = cycle_v0;
qword_3D1CD8 = v5;
qword_3D1CE0 = nanosec_v0;
qword_3D1CE8 = v7;
qword_3D1CF0 = microsec_v0;
qword_3D1CF8 = v10;
qword_3D1D00 = millisec_v0;
qword_3D1D08 = v13;
qword_3D1D10 = v0;
qword_3D1D18 = v16;
if ( v5 )
{
wait_timer = 1;
if ( !v7 )
{
if ( !v10 )
{
if ( !v13 )
goto LABEL_30;
LABEL_27:
result = 4LL;
stage_timer = 4;
statement_timer = 4;
transaction_timer = 4;
goto LABEL_28;
}
LABEL_24:
result = 3LL;
stage_timer = 3;
statement_timer = 3;
transaction_timer = 3;
goto LABEL_25;
}
}
else
{
if ( !v7 )
{
if ( !v10 )
{
if ( !v13 )
{
wait_timer = 5;
LABEL_30:
if ( v16 )
{
result = 5LL;
stage_timer = 5;
statement_timer = 5;
transaction_timer = 5;
goto LABEL_32;
}
result = 1LL;
stage_timer = 1;
statement_timer = 1;
transaction_timer = 1;
goto LABEL_34;
}
goto LABEL_27;
}
wait_timer = 3;
goto LABEL_24;
}
wait_timer = 2;
}
result = 2LL;
stage_timer = 2;
statement_timer = 2;
transaction_timer = 2;
if ( v10 )
{
LABEL_25:
idle_timer = 3;
return result;
}
if ( v13 )
{
LABEL_28:
wait_timer = 4;
return result;
}
if ( v16 )
{
LABEL_32:
idle_timer = 5;
return result;
}
LABEL_34:
idle_timer = 1;
return result;
}
| init_timers:
PUSH RBP
MOV RBP,RSP
RDTSC
SHL RDX,0x20
OR RDX,RAX
MOV qword ptr [0x004d1c70],RDX
CALL 0x00147e98
MOV qword ptr [0x004d1c78],RAX
CALL 0x00147ec1
MOV qword ptr [0x004d1c80],RAX
CALL 0x00147efd
MOV qword ptr [0x004d1c88],RAX
CALL 0x00147f3d
MOV qword ptr [0x004d1c90],RAX
LEA RDX,[0x4db3e8]
MOV RSI,qword ptr [RDX + 0x10]
MOV RDI,qword ptr [RDX + 0x30]
MOVQ XMM0,RSI
MOVQ XMM1,qword ptr [0x0017c020]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM2,xmmword ptr [0x0017c030]
SUBPD XMM0,XMM2
MOVAPD XMM3,XMM0
UNPCKHPD XMM3,XMM0
ADDSD XMM3,XMM0
MOVSD XMM0,qword ptr [0x00181ee0]
MOVAPD XMM5,XMM0
DIVSD XMM5,XMM3
MOVSD XMM3,qword ptr [0x00181ee8]
ADDSD XMM5,XMM3
CVTTSD2SI R8,XMM5
MOV R9,R8
MOVSD XMM4,qword ptr [0x00181eb0]
SUBSD XMM5,XMM4
CVTTSD2SI RCX,XMM5
SAR R9,0x3f
AND RCX,R9
OR RCX,R8
TEST RSI,RSI
CMOVZ RCX,RSI
MOV qword ptr [0x004d1c98],RCX
MOVQ XMM5,RDI
PUNPCKLDQ XMM5,XMM1
SUBPD XMM5,XMM2
MOVAPD XMM6,XMM5
UNPCKHPD XMM6,XMM5
ADDSD XMM6,XMM5
MOVAPD XMM5,XMM0
DIVSD XMM5,XMM6
ADDSD XMM5,XMM3
CVTTSD2SI R8,XMM5
MOV R9,R8
SAR R9,0x3f
SUBSD XMM5,XMM4
CVTTSD2SI RSI,XMM5
AND RSI,R9
OR RSI,R8
TEST RDI,RDI
CMOVZ RSI,RDI
MOV R8,qword ptr [RDX + 0x50]
MOVQ XMM5,R8
PUNPCKLDQ XMM5,XMM1
SUBPD XMM5,XMM2
MOVAPD XMM6,XMM5
UNPCKHPD XMM6,XMM5
ADDSD XMM6,XMM5
MOVAPD XMM5,XMM0
DIVSD XMM5,XMM6
ADDSD XMM5,XMM3
CVTTSD2SI R9,XMM5
MOV qword ptr [0x004d1ca0],RSI
MOV R10,R9
SAR R10,0x3f
SUBSD XMM5,XMM4
CVTTSD2SI RDI,XMM5
AND RDI,R10
OR RDI,R9
TEST R8,R8
CMOVZ RDI,R8
MOV qword ptr [0x004d1ca8],RDI
MOV R9,qword ptr [RDX + 0x70]
MOVQ XMM5,R9
PUNPCKLDQ XMM5,XMM1
SUBPD XMM5,XMM2
MOVAPD XMM6,XMM5
UNPCKHPD XMM6,XMM5
ADDSD XMM6,XMM5
MOVAPD XMM5,XMM0
DIVSD XMM5,XMM6
ADDSD XMM5,XMM3
CVTTSD2SI R10,XMM5
MOV R11,R10
SUBSD XMM5,XMM4
CVTTSD2SI R8,XMM5
SAR R11,0x3f
AND R8,R11
OR R8,R10
TEST R9,R9
CMOVZ R8,R9
MOV qword ptr [0x004d1cb0],R8
MOV R9,qword ptr [RDX + 0x90]
MOVQ XMM5,R9
PUNPCKLDQ XMM5,XMM1
SUBPD XMM5,XMM2
MOVAPD XMM1,XMM5
UNPCKHPD XMM1,XMM5
ADDSD XMM1,XMM5
DIVSD XMM0,XMM1
ADDSD XMM0,XMM3
CVTTSD2SI R10,XMM0
MOV R11,R10
SAR R11,0x3f
SUBSD XMM0,XMM4
CVTTSD2SI RDX,XMM0
AND RDX,R11
OR RDX,R10
TEST R9,R9
CMOVZ RDX,R9
MOV qword ptr [0x004d1cb8],RDX
MOV R9,qword ptr [0x004d1c70]
MOV qword ptr [0x004d1cd0],R9
MOV qword ptr [0x004d1cd8],RCX
MOV R9,qword ptr [0x004d1c78]
MOV qword ptr [0x004d1ce0],R9
MOV qword ptr [0x004d1ce8],RSI
MOV R9,qword ptr [0x004d1c80]
MOV qword ptr [0x004d1cf0],R9
MOV qword ptr [0x004d1cf8],RDI
MOV R9,qword ptr [0x004d1c88]
MOV qword ptr [0x004d1d00],R9
MOV qword ptr [0x004d1d08],R8
MOV qword ptr [0x004d1d10],RAX
MOV qword ptr [0x004d1d18],RDX
TEST RCX,RCX
JZ 0x00143ca1
MOV dword ptr [0x004185e4],0x1
TEST RSI,RSI
JNZ 0x00143cb0
TEST RDI,RDI
JNZ 0x00143cee
TEST R8,R8
JNZ 0x00143d16
JMP 0x00143d43
LAB_00143ca1:
TEST RSI,RSI
JZ 0x00143cdf
MOV dword ptr [0x004185e4],0x2
LAB_00143cb0:
MOV EAX,0x2
MOV dword ptr [0x004185e8],EAX
MOV dword ptr [0x004185ec],EAX
MOV dword ptr [0x004185f0],EAX
TEST RDI,RDI
JNZ 0x00143d05
TEST R8,R8
JNZ 0x00143d2d
TEST RDX,RDX
JNZ 0x00143d5f
JMP 0x00143d82
LAB_00143cdf:
TEST RDI,RDI
JZ 0x00143d11
MOV dword ptr [0x004185e4],0x3
LAB_00143cee:
MOV EAX,0x3
MOV dword ptr [0x004185e8],EAX
MOV dword ptr [0x004185ec],EAX
MOV dword ptr [0x004185f0],EAX
LAB_00143d05:
MOV dword ptr [0x004185e0],0x3
JMP 0x00143d8c
LAB_00143d11:
TEST R8,R8
JZ 0x00143d39
LAB_00143d16:
MOV EAX,0x4
MOV dword ptr [0x004185e8],EAX
MOV dword ptr [0x004185ec],EAX
MOV dword ptr [0x004185f0],EAX
LAB_00143d2d:
MOV dword ptr [0x004185e4],0x4
JMP 0x00143d8c
LAB_00143d39:
MOV dword ptr [0x004185e4],0x5
LAB_00143d43:
TEST RDX,RDX
JZ 0x00143d6b
MOV EAX,0x5
MOV dword ptr [0x004185e8],EAX
MOV dword ptr [0x004185ec],EAX
MOV dword ptr [0x004185f0],EAX
LAB_00143d5f:
MOV dword ptr [0x004185e0],0x5
JMP 0x00143d8c
LAB_00143d6b:
MOV EAX,0x1
MOV dword ptr [0x004185e8],EAX
MOV dword ptr [0x004185ec],EAX
MOV dword ptr [0x004185f0],EAX
LAB_00143d82:
MOV dword ptr [0x004185e0],0x1
LAB_00143d8c:
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* init_timers() */
void init_timers(void)
{
int8 in_RAX;
ulong uVar1;
int1 auVar2 [16];
double dVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
uVar1 = rdtsc();
cycle_v0 = uVar1 & 0xffffffff00000000 | CONCAT44((int)((ulong)in_RAX >> 0x20),(int)uVar1);
nanosec_v0 = my_timer_nanoseconds();
microsec_v0 = my_timer_microseconds();
millisec_v0 = my_timer_milliseconds();
tick_v0 = my_timer_ticks();
auVar2._8_4_ = SUB84(sys_timer_info._16_8_,4);
auVar2._0_8_ = sys_timer_info._16_8_;
auVar2._12_4_ = DAT_0017c020._4_4_;
dVar3 = DAT_00181ee0 /
((auVar2._8_8_ - _UNK_0017c038) +
((double)CONCAT44((int4)DAT_0017c020,(int)sys_timer_info._16_8_) - _DAT_0017c030)) +
DAT_00181ee8;
uVar1 = (ulong)dVar3;
cycle_to_pico = (long)(dVar3 - DAT_00181eb0) & (long)uVar1 >> 0x3f | uVar1;
if (sys_timer_info._16_8_ == 0) {
cycle_to_pico = 0;
}
auVar4._8_4_ = SUB84(sys_timer_info._48_8_,4);
auVar4._0_8_ = sys_timer_info._48_8_;
auVar4._12_4_ = DAT_0017c020._4_4_;
dVar3 = DAT_00181ee0 /
((auVar4._8_8_ - _UNK_0017c038) +
((double)CONCAT44((int4)DAT_0017c020,(int)sys_timer_info._48_8_) - _DAT_0017c030)) +
DAT_00181ee8;
uVar1 = (ulong)dVar3;
nanosec_to_pico = (long)(dVar3 - DAT_00181eb0) & (long)uVar1 >> 0x3f | uVar1;
if (sys_timer_info._48_8_ == 0) {
nanosec_to_pico = 0;
}
auVar5._8_4_ = SUB84(sys_timer_info._80_8_,4);
auVar5._0_8_ = sys_timer_info._80_8_;
auVar5._12_4_ = DAT_0017c020._4_4_;
dVar3 = DAT_00181ee0 /
((auVar5._8_8_ - _UNK_0017c038) +
((double)CONCAT44((int4)DAT_0017c020,(int)sys_timer_info._80_8_) - _DAT_0017c030)) +
DAT_00181ee8;
uVar1 = (ulong)dVar3;
microsec_to_pico = (long)(dVar3 - DAT_00181eb0) & (long)uVar1 >> 0x3f | uVar1;
if (sys_timer_info._80_8_ == 0) {
microsec_to_pico = 0;
}
auVar6._8_4_ = SUB84(sys_timer_info._112_8_,4);
auVar6._0_8_ = sys_timer_info._112_8_;
auVar6._12_4_ = DAT_0017c020._4_4_;
dVar3 = DAT_00181ee0 /
((auVar6._8_8_ - _UNK_0017c038) +
((double)CONCAT44((int4)DAT_0017c020,(int)sys_timer_info._112_8_) - _DAT_0017c030))
+ DAT_00181ee8;
uVar1 = (ulong)dVar3;
millisec_to_pico = (long)(dVar3 - DAT_00181eb0) & (long)uVar1 >> 0x3f | uVar1;
if (sys_timer_info._112_8_ == 0) {
millisec_to_pico = 0;
}
auVar7._8_4_ = SUB84(sys_timer_info._144_8_,4);
auVar7._0_8_ = sys_timer_info._144_8_;
auVar7._12_4_ = DAT_0017c020._4_4_;
dVar3 = DAT_00181ee0 /
((auVar7._8_8_ - _UNK_0017c038) +
((double)CONCAT44((int4)DAT_0017c020,(int)sys_timer_info._144_8_) - _DAT_0017c030))
+ DAT_00181ee8;
uVar1 = (ulong)dVar3;
tick_to_pico = (long)(dVar3 - DAT_00181eb0) & (long)uVar1 >> 0x3f | uVar1;
if (sys_timer_info._144_8_ == 0) {
tick_to_pico = 0;
}
to_pico_data._16_8_ = cycle_v0;
to_pico_data._24_8_ = cycle_to_pico;
to_pico_data._32_8_ = nanosec_v0;
to_pico_data._40_8_ = nanosec_to_pico;
to_pico_data._48_8_ = microsec_v0;
to_pico_data._56_8_ = microsec_to_pico;
to_pico_data._64_8_ = millisec_v0;
to_pico_data._72_8_ = millisec_to_pico;
to_pico_data._80_8_ = tick_v0;
to_pico_data._88_8_ = tick_to_pico;
if (cycle_to_pico == 0) {
if (nanosec_to_pico != 0) {
wait_timer = 2;
goto LAB_00143cb0;
}
if (microsec_to_pico != 0) {
wait_timer = 3;
goto LAB_00143cee;
}
if (millisec_to_pico == 0) {
wait_timer = 5;
goto LAB_00143d43;
}
LAB_00143d16:
stage_timer = 4;
statement_timer = 4;
transaction_timer = 4;
LAB_00143d2d:
wait_timer = 4;
}
else {
wait_timer = 1;
if (nanosec_to_pico == 0) {
if (microsec_to_pico == 0) {
if (millisec_to_pico == 0) {
LAB_00143d43:
if (tick_to_pico != 0) {
idle_timer = 5;
stage_timer = 5;
statement_timer = 5;
transaction_timer = 5;
to_pico_data._16_8_ = cycle_v0;
to_pico_data._32_8_ = nanosec_v0;
to_pico_data._48_8_ = microsec_v0;
to_pico_data._64_8_ = millisec_v0;
return;
}
idle_timer = 1;
stage_timer = 1;
statement_timer = 1;
transaction_timer = 1;
to_pico_data._16_8_ = cycle_v0;
to_pico_data._32_8_ = nanosec_v0;
to_pico_data._48_8_ = microsec_v0;
to_pico_data._64_8_ = millisec_v0;
return;
}
goto LAB_00143d16;
}
LAB_00143cee:
stage_timer = 3;
statement_timer = 3;
transaction_timer = 3;
}
else {
LAB_00143cb0:
stage_timer = 2;
statement_timer = 2;
transaction_timer = 2;
if (microsec_to_pico == 0) {
if (millisec_to_pico == 0) {
if (tick_to_pico != 0) {
idle_timer = 5;
stage_timer = 2;
statement_timer = 2;
transaction_timer = 2;
to_pico_data._16_8_ = cycle_v0;
to_pico_data._32_8_ = nanosec_v0;
to_pico_data._48_8_ = microsec_v0;
to_pico_data._64_8_ = millisec_v0;
return;
}
idle_timer = 1;
stage_timer = 2;
statement_timer = 2;
transaction_timer = 2;
to_pico_data._16_8_ = cycle_v0;
to_pico_data._32_8_ = nanosec_v0;
to_pico_data._48_8_ = microsec_v0;
to_pico_data._64_8_ = millisec_v0;
return;
}
goto LAB_00143d2d;
}
}
idle_timer = 3;
}
return;
}
| |
45,929 | ma_alloc_buffer | eloqsql/storage/maria/ma_open.c | my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size,
size_t new_size, myf flag)
{
if (*old_size < new_size)
{
uchar *addr;
if (!(addr= (uchar*) my_realloc(PSI_INSTRUMENT_ME, *old_addr, new_size,
MYF(MY_ALLOW_ZERO_PTR | flag))))
return 1;
*old_addr= addr;
*old_size= new_size;
}
return 0;
} | O3 | c | ma_alloc_buffer:
cmpq %rdx, (%rsi)
jae 0x54ee0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rsi
orq $0x40, %rcx
xorl %edi, %edi
callq 0x9fed4
testq %rax, %rax
je 0x54ee3
movq %rax, (%r15)
movq %rbx, (%r14)
xorl %eax, %eax
jmp 0x54ee5
xorl %eax, %eax
retq
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ma_alloc_buffer:
cmp [rsi], rdx
jnb short loc_54EE0
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rsi, [rdi]
or rcx, 40h
xor edi, edi
call my_realloc
test rax, rax
jz short loc_54EE3
mov [r15], rax
mov [r14], rbx
xor eax, eax
jmp short loc_54EE5
loc_54EE0:
xor eax, eax
retn
loc_54EE3:
mov al, 1
loc_54EE5:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_alloc_buffer(
long long *a1,
unsigned long long *a2,
unsigned long long a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // rax
if ( *a2 >= a3 )
return 0LL;
v7 = my_realloc(0LL, *a1, a3, a4 | 0x40, a5, a6);
if ( !v7 )
return 1LL;
*a1 = v7;
*a2 = a3;
return 0LL;
}
| _ma_alloc_buffer:
CMP qword ptr [RSI],RDX
JNC 0x00154ee0
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RSI,qword ptr [RDI]
OR RCX,0x40
XOR EDI,EDI
CALL 0x0019fed4
TEST RAX,RAX
JZ 0x00154ee3
MOV qword ptr [R15],RAX
MOV qword ptr [R14],RBX
XOR EAX,EAX
JMP 0x00154ee5
LAB_00154ee0:
XOR EAX,EAX
RET
LAB_00154ee3:
MOV AL,0x1
LAB_00154ee5:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
bool _ma_alloc_buffer(long *param_1,ulong *param_2,ulong param_3,ulong param_4)
{
long lVar1;
if (param_3 <= *param_2) {
return false;
}
lVar1 = my_realloc(0,*param_1,param_3,param_4 | 0x40);
if (lVar1 != 0) {
*param_1 = lVar1;
*param_2 = param_3;
}
return lVar1 == 0;
}
| |
45,930 | GetRenderWidth | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | int GetRenderWidth(void)
{
int width = 0;
#if defined(__APPLE__)
Vector2 scale = GetWindowScaleDPI();
width = (int)((float)CORE.Window.render.width*scale.x);
#else
width = CORE.Window.render.width;
#endif
return width;
} | O2 | c | GetRenderWidth:
movl 0xc7504(%rip), %eax # 0x127c24
retq
| GetRenderWidth:
mov eax, dword ptr cs:qword_127C24
retn
| long long GetRenderWidth()
{
return (unsigned int)qword_127C24;
}
| GetRenderWidth:
MOV EAX,dword ptr [0x00227c24]
RET
|
int4 GetRenderWidth(void)
{
return DAT_00227c24;
}
| |
45,931 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O0 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x76(%rbp)
jae 0x43db8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x43dc1
jmp 0x43dd1
jmp 0x43dc3
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43d89
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x43de0
jmp 0x43fa1
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x43e01
movl $0x1, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43e2b
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x43e22
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43e29
movl $0x0, -0x3c(%rbp)
jmp 0x43e2b
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x43f45
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
movzbl -0x75(%rbp), %eax
cmpl $0x30, %eax
jl 0x43ea0
movzbl -0x75(%rbp), %eax
cmpl $0x39, %eax
jg 0x43ea0
movzbl -0x75(%rbp), %eax
subl $0x30, %eax
movb %al, -0x75(%rbp)
jmp 0x43ee8
movzbl -0x75(%rbp), %eax
cmpl $0x41, %eax
jl 0x43ec1
movzbl -0x75(%rbp), %eax
cmpl $0x5a, %eax
jg 0x43ec1
movzbl -0x75(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x43ee6
movzbl -0x75(%rbp), %eax
cmpl $0x61, %eax
jl 0x43ee2
movzbl -0x75(%rbp), %eax
cmpl $0x7a, %eax
jg 0x43ee2
movzbl -0x75(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x43ee4
jmp 0x43f45
jmp 0x43ee6
jmp 0x43ee8
movzbl -0x75(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x43ef3
jmp 0x43f45
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x43f10
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x43f19
movzbl -0x75(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x43f19
movl $0x1, -0x74(%rbp)
jmp 0x43f32
movslq -0x24(%rbp), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x75(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x43f34
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x43e6b
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x43f51
jmp 0x43fa1
cmpq $0x0, -0x30(%rbp)
je 0x43f63
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x74(%rbp)
je 0x43f7d
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x43fc5
cmpl $0x0, -0x3c(%rbp)
je 0x43f8f
xorl %eax, %eax
subq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x43f97
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x43fc5
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x43fbd
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| my_strntoull_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_43D89:
mov rcx, [rbp+var_60]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_76], al
jnb short loc_43DB8
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_76], al
loc_43DB8:
mov al, [rbp+var_76]
test al, 1
jnz short loc_43DC1
jmp short loc_43DD1
loc_43DC1:
jmp short $+2
loc_43DC3:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_43D89
loc_43DD1:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jnz short loc_43DE0
jmp loc_43FA1
loc_43DE0:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_43E01
mov [rbp+var_3C], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_43E2B
loc_43E01:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_43E22
mov [rbp+var_3C], 0
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_43E29
loc_43E22:
mov [rbp+var_3C], 0
loc_43E29:
jmp short $+2
loc_43E2B:
mov rax, [rbp+var_60]
mov [rbp+var_70], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_48], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
mov [rbp+var_74], 0
mov [rbp+var_58], 0
loc_43E6B:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jz loc_43F45
mov rax, [rbp+var_60]
mov al, [rax]
mov [rbp+var_75], al
movzx eax, [rbp+var_75]
cmp eax, 30h ; '0'
jl short loc_43EA0
movzx eax, [rbp+var_75]
cmp eax, 39h ; '9'
jg short loc_43EA0
movzx eax, [rbp+var_75]
sub eax, 30h ; '0'
mov [rbp+var_75], al
jmp short loc_43EE8
loc_43EA0:
movzx eax, [rbp+var_75]
cmp eax, 41h ; 'A'
jl short loc_43EC1
movzx eax, [rbp+var_75]
cmp eax, 5Ah ; 'Z'
jg short loc_43EC1
movzx eax, [rbp+var_75]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_43EE6
loc_43EC1:
movzx eax, [rbp+var_75]
cmp eax, 61h ; 'a'
jl short loc_43EE2
movzx eax, [rbp+var_75]
cmp eax, 7Ah ; 'z'
jg short loc_43EE2
movzx eax, [rbp+var_75]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_43EE4
loc_43EE2:
jmp short loc_43F45
loc_43EE4:
jmp short $+2
loc_43EE6:
jmp short $+2
loc_43EE8:
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_24]
jl short loc_43EF3
jmp short loc_43F45
loc_43EF3:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
ja short loc_43F10
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jnz short loc_43F19
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_4C]
jbe short loc_43F19
loc_43F10:
mov [rbp+var_74], 1
jmp short loc_43F32
loc_43F19:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_58]
mov [rbp+var_58], rax
movzx eax, [rbp+var_75]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_43F32:
jmp short $+2
loc_43F34:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp loc_43E6B
loc_43F45:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_70]
jnz short loc_43F51
jmp short loc_43FA1
loc_43F51:
cmp [rbp+var_30], 0
jz short loc_43F63
mov rcx, [rbp+var_60]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_43F63:
cmp [rbp+var_74], 0
jz short loc_43F7D
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_43FC5
loc_43F7D:
cmp [rbp+var_3C], 0
jz short loc_43F8F
xor eax, eax
sub rax, [rbp+var_58]
mov [rbp+var_80], rax
jmp short loc_43F97
loc_43F8F:
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
loc_43F97:
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_43FC5
loc_43FA1:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_43FBD
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_43FBD:
mov [rbp+var_8], 0
loc_43FC5:
mov rax, [rbp+var_8]
pop rbp
retn
| long long my_strntoull_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
bool v8; // [rsp+Ah] [rbp-76h]
unsigned __int8 v9; // [rsp+Bh] [rbp-75h]
unsigned __int8 v10; // [rsp+Bh] [rbp-75h]
int v11; // [rsp+Ch] [rbp-74h]
_BYTE *v12; // [rsp+10h] [rbp-70h]
_BYTE *v13; // [rsp+18h] [rbp-68h]
_BYTE *v14; // [rsp+20h] [rbp-60h]
unsigned long long v15; // [rsp+28h] [rbp-58h]
unsigned long long v16; // [rsp+38h] [rbp-48h]
int v17; // [rsp+44h] [rbp-3Ch]
*a6 = 0;
v14 = a2;
v13 = &a2[a3];
while ( 1 )
{
v8 = 0;
if ( v14 < v13 )
v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0;
if ( !v8 )
break;
++v14;
}
if ( v14 == v13 )
goto LABEL_39;
if ( *v14 == 45 )
{
v17 = 1;
++v14;
}
else
{
v17 = 0;
if ( *v14 == 43 )
++v14;
}
v12 = v14;
v16 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0;
v15 = 0LL;
while ( v14 != v13 )
{
v9 = *v14;
if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u )
{
if ( v9 < 0x41u || v9 > 0x5Au )
{
if ( v9 < 0x61u || v9 > 0x7Au )
break;
v10 = v9 - 97 + 10;
}
else
{
v10 = v9 - 65 + 10;
}
}
else
{
v10 = v9 - 48;
}
if ( v10 >= a4 )
break;
if ( v15 > v16 || v15 == v16 && v10 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) )
v11 = 1;
else
v15 = v15 * a4 + v10;
++v14;
}
if ( v14 == v12 )
{
LABEL_39:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v14;
if ( v11 )
{
*a6 = 34;
return -1LL;
}
else if ( v17 )
{
return -(long long)v15;
}
else
{
return v15;
}
}
}
| my_strntoull_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 dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
LAB_00143d89:
MOV RCX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x76],AL
JNC 0x00143db8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x76],AL
LAB_00143db8:
MOV AL,byte ptr [RBP + -0x76]
TEST AL,0x1
JNZ 0x00143dc1
JMP 0x00143dd1
LAB_00143dc1:
JMP 0x00143dc3
LAB_00143dc3:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143d89
LAB_00143dd1:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x00143de0
JMP 0x00143fa1
LAB_00143de0:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x00143e01
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143e2b
LAB_00143e01:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x00143e22
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143e29
LAB_00143e22:
MOV dword ptr [RBP + -0x3c],0x0
LAB_00143e29:
JMP 0x00143e2b
LAB_00143e2b:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x4c],EAX
MOV dword ptr [RBP + -0x74],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_00143e6b:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x00143f45
MOV RAX,qword ptr [RBP + -0x60]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x30
JL 0x00143ea0
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x39
JG 0x00143ea0
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x30
MOV byte ptr [RBP + -0x75],AL
JMP 0x00143ee8
LAB_00143ea0:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x41
JL 0x00143ec1
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x5a
JG 0x00143ec1
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x00143ee6
LAB_00143ec1:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x61
JL 0x00143ee2
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x7a
JG 0x00143ee2
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x00143ee4
LAB_00143ee2:
JMP 0x00143f45
LAB_00143ee4:
JMP 0x00143ee6
LAB_00143ee6:
JMP 0x00143ee8
LAB_00143ee8:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x00143ef3
JMP 0x00143f45
LAB_00143ef3:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x00143f10
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00143f19
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x4c]
JBE 0x00143f19
LAB_00143f10:
MOV dword ptr [RBP + -0x74],0x1
JMP 0x00143f32
LAB_00143f19:
MOVSXD RAX,dword ptr [RBP + -0x24]
IMUL RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOVZX EAX,byte ptr [RBP + -0x75]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_00143f32:
JMP 0x00143f34
LAB_00143f34:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00143e6b
LAB_00143f45:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x70]
JNZ 0x00143f51
JMP 0x00143fa1
LAB_00143f51:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00143f63
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00143f63:
CMP dword ptr [RBP + -0x74],0x0
JZ 0x00143f7d
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00143fc5
LAB_00143f7d:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00143f8f
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x00143f97
LAB_00143f8f:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
LAB_00143f97:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00143fc5
LAB_00143fa1:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00143fbd
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00143fbd:
MOV qword ptr [RBP + -0x8],0x0
LAB_00143fc5:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5,
int4 *param_6)
{
int1 auVar1 [16];
int1 auVar2 [16];
bool bVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
bool bVar7;
ulong local_88;
byte local_7d;
byte *local_68;
ulong local_60;
*param_6 = 0;
pbVar5 = param_2 + param_3;
local_68 = param_2;
while( true ) {
bVar7 = false;
if (local_68 < pbVar5) {
bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0;
}
if (!bVar7) break;
local_68 = local_68 + 1;
}
if (local_68 != pbVar5) {
if (*local_68 == 0x2d) {
bVar7 = true;
local_68 = local_68 + 1;
}
else {
if (*local_68 == 0x2b) {
local_68 = local_68 + 1;
}
bVar7 = false;
}
pbVar4 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = (long)param_4;
uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0);
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)param_4;
bVar3 = false;
local_60 = 0;
for (; local_68 != pbVar5; local_68 = local_68 + 1) {
local_7d = *local_68;
if ((local_7d < 0x30) || (0x39 < local_7d)) {
if ((local_7d < 0x41) || (0x5a < local_7d)) {
if ((local_7d < 0x61) || (0x7a < local_7d)) break;
local_7d = local_7d + 0xa9;
}
else {
local_7d = local_7d - 0x37;
}
}
else {
local_7d = local_7d - 0x30;
}
if (param_4 <= (int)(uint)local_7d) break;
if ((uVar6 < local_60) ||
((local_60 == uVar6 &&
(SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d)))
) {
bVar3 = true;
}
else {
local_60 = (ulong)local_7d + (long)param_4 * local_60;
}
}
if (local_68 != pbVar4) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_68;
}
if (bVar3) {
*param_6 = 0x22;
return 0xffffffffffffffff;
}
if (bVar7) {
local_88 = -local_60;
}
else {
local_88 = local_60;
}
return local_88;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
| |
45,932 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0x386a1
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0x386a1
incq %r10
cmpq %r11, %r10
jb 0x3868e
cmpq %r11, %r10
je 0x38789
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0x38766
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0x38715
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0x38704
addb $-0x37, %r12b
jmp 0x38712
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0x38754
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0x38754
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0x3872c
movq %rdi, %r15
jmp 0x38743
jne 0x38735
movq %rax, %r15
cmpl %edx, %ebx
ja 0x38743
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0x386e1
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0x38768
movb $0x1, %al
cmpq %r10, %r11
je 0x38789
testq %r8, %r8
je 0x38775
movq %r11, (%r8)
testb %al, %al
je 0x3879c
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0x387aa
movl $0x21, (%r9)
testq %r8, %r8
je 0x38798
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0x387aa
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_386A1
mov rax, [rdi+40h]
mov r10, rsi
loc_3868E:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_386A1
inc r10
cmp r10, r11
jb short loc_3868E
loc_386A1:
cmp r10, r11
jz loc_38789
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_38766
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_386E1:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_38715
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_38704
add r12b, 0C9h
jmp short loc_38712
loc_38704:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_38754
add r12b, 0A9h
loc_38712:
mov ebx, r12d
loc_38715:
movzx ebx, bl
cmp ebx, ecx
jge short loc_38754
mov r12d, 1
cmp rdi, rax
jbe short loc_3872C
mov r15, rdi
jmp short loc_38743
loc_3872C:
jnz short loc_38735
mov r15, rax
cmp ebx, edx
ja short loc_38743
loc_38735:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_38743:
inc r14
cmp r14, r11
jnz short loc_386E1
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_38754:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_38768
loc_38766:
mov al, 1
loc_38768:
cmp r11, r10
jz short loc_38789
test r8, r8
jz short loc_38775
mov [r8], r11
loc_38775:
test al, al
jz short loc_3879C
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_387AA
loc_38789:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_38798
mov [r8], rsi
loc_38798:
xor eax, eax
jmp short loc_387AA
loc_3879C:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_387AA:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x001386a1
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_0013868e:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x001386a1
INC R10
CMP R10,R11
JC 0x0013868e
LAB_001386a1:
CMP R10,R11
JZ 0x00138789
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x00138766
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_001386e1:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x00138715
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x00138704
ADD R12B,0xc9
JMP 0x00138712
LAB_00138704:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x00138754
ADD R12B,0xa9
LAB_00138712:
MOV EBX,R12D
LAB_00138715:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x00138754
MOV R12D,0x1
CMP RDI,RAX
JBE 0x0013872c
MOV R15,RDI
JMP 0x00138743
LAB_0013872c:
JNZ 0x00138735
MOV R15,RAX
CMP EBX,EDX
JA 0x00138743
LAB_00138735:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_00138743:
INC R14
CMP R14,R11
JNZ 0x001386e1
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_00138754:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x00138768
LAB_00138766:
MOV AL,0x1
LAB_00138768:
CMP R11,R10
JZ 0x00138789
TEST R8,R8
JZ 0x00138775
MOV qword ptr [R8],R11
LAB_00138775:
TEST AL,AL
JZ 0x0013879c
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x001387aa
LAB_00138789:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x00138798
MOV qword ptr [R8],RSI
LAB_00138798:
XOR EAX,EAX
JMP 0x001387aa
LAB_0013879c:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_001387aa:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_00138754;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_00138754;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_00138754:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
| |
45,933 | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/common.cpp | std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) {
std::string text;
text.resize(std::max(text.capacity(), tokens.size()));
int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
if (n_chars < 0) {
text.resize(-n_chars);
n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization
}
text.resize(n_chars);
// NOTE: the original tokenizer decodes bytes after collecting the pieces.
return text;
} | O0 | cpp | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool):
subq $0xb8, %rsp
movq %rdi, 0x68(%rsp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, 0x60(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
andb $0x1, %al
movb %al, 0x9f(%rsp)
movb $0x0, 0x9e(%rsp)
callq 0x504a0
movq 0x68(%rsp), %rdi
callq 0x502b0
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x152390
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x7e960
movq %rax, 0x70(%rsp)
jmp 0x14b0d7
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rsi
callq 0x505a0
jmp 0x14b0eb
movq 0xa8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x152bf0
movq %rax, 0x48(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x152390
movq 0x68(%rsp), %rdi
movl %eax, 0x54(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x50fb0
movq %rax, 0x58(%rsp)
jmp 0x14b130
movq 0x68(%rsp), %rdi
callq 0x503f0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x54(%rsp), %edx
movq 0x58(%rsp), %rcx
movl %eax, %r8d
movzbl 0x9f(%rsp), %r9d
andl $0x1, %r9d
movq %rsp, %rax
movl %r9d, (%rax)
xorl %r9d, %r9d
callq 0x50eb0
movl %eax, 0x3c(%rsp)
jmp 0x14b171
movl 0x3c(%rsp), %eax
movl %eax, 0x78(%rsp)
cmpl $0x0, 0x78(%rsp)
jge 0x14b286
movq 0x68(%rsp), %rdi
movl 0x78(%rsp), %eax
negl %eax
movslq %eax, %rsi
callq 0x505a0
jmp 0x14b199
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x152bf0
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x152390
movq 0x68(%rsp), %rdi
movl %eax, 0x2c(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x50fb0
movq %rax, 0x30(%rsp)
jmp 0x14b1de
movq 0x68(%rsp), %rdi
callq 0x503f0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %edx
movq 0x30(%rsp), %rcx
movl %eax, %r8d
movzbl 0x9f(%rsp), %r9d
andl $0x1, %r9d
movq %rsp, %rax
movl %r9d, (%rax)
xorl %r9d, %r9d
callq 0x50eb0
movl %eax, 0x14(%rsp)
jmp 0x14b21f
movq 0x68(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, 0x78(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x503f0
movq %rax, %rcx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jle 0x14b284
leaq 0x8e866(%rip), %rdi # 0x1d9ab1
leaq 0x8e8ab(%rip), %rdx # 0x1d9afd
leaq 0x8ef17(%rip), %rcx # 0x1da170
xorl %eax, %eax
movl $0x6e2, %esi # imm = 0x6E2
callq 0x50bc0
jmp 0x14b267
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x510c0
jmp 0x14b2c0
jmp 0x14b286
movq 0x68(%rsp), %rdi
movslq 0x78(%rsp), %rsi
callq 0x505a0
jmp 0x14b297
movb $0x1, 0x9e(%rsp)
testb $0x1, 0x9e(%rsp)
jne 0x14b2b3
movq 0x68(%rsp), %rdi
callq 0x510c0
movq 0x60(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x80(%rsp), %rdi
callq 0x50940
nopl (%rax)
| _Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb:
sub rsp, 0B8h
mov [rsp+0B8h+var_50], rdi
mov al, cl
mov rcx, rdi
mov [rsp+0B8h+var_58], rcx
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
and al, 1
mov [rsp+0B8h+var_19], al
mov [rsp+0B8h+var_1A], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+0B8h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv; std::string::capacity(void)
mov [rsp+0B8h+var_28], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rsp+0B8h+var_30], rax
lea rdi, [rsp+0B8h+var_28]
lea rsi, [rsp+0B8h+var_30]
call _ZSt3maxImERKT_S2_S2_; std::max<ulong>(ulong const&,ulong const&)
mov [rsp+0B8h+var_48], rax
jmp short $+2
loc_14B0D7:
mov rdi, [rsp+0B8h+var_50]
mov rax, [rsp+0B8h+var_48]
mov rsi, [rax]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
jmp short $+2
loc_14B0EB:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_78], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorIiSaIiEE4dataEv; std::vector<int>::data(void)
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_64], eax
xor eax, eax
mov esi, eax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rsp+0B8h+var_60], rax
jmp short $+2
loc_14B130:
mov rdi, [rsp+0B8h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+0B8h+var_78]
mov rsi, [rsp+0B8h+var_70]
mov edx, [rsp+0B8h+var_64]
mov rcx, [rsp+0B8h+var_60]
mov r8d, eax
movzx r9d, [rsp+0B8h+var_19]
and r9d, 1
mov rax, rsp
mov [rax], r9d
xor r9d, r9d
call _llama_detokenize
mov [rsp+0B8h+var_7C], eax
jmp short $+2
loc_14B171:
mov eax, [rsp+0B8h+var_7C]
mov [rsp+0B8h+var_40], eax
cmp [rsp+0B8h+var_40], 0
jge loc_14B286
mov rdi, [rsp+0B8h+var_50]
mov eax, [rsp+0B8h+var_40]
neg eax
movsxd rsi, eax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
jmp short $+2
loc_14B199:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_A0], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorIiSaIiEE4dataEv; std::vector<int>::data(void)
mov [rsp+0B8h+var_98], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_8C], eax
xor eax, eax
mov esi, eax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rsp+0B8h+var_88], rax
jmp short $+2
loc_14B1DE:
mov rdi, [rsp+0B8h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+0B8h+var_A0]
mov rsi, [rsp+0B8h+var_98]
mov edx, [rsp+0B8h+var_8C]
mov rcx, [rsp+0B8h+var_88]
mov r8d, eax
movzx r9d, [rsp+0B8h+var_19]
and r9d, 1
mov rax, rsp
mov [rax], r9d
xor r9d, r9d
call _llama_detokenize
mov [rsp+0B8h+var_A4], eax
jmp short $+2
loc_14B21F:
mov rdi, [rsp+0B8h+var_50]
mov eax, [rsp+0B8h+var_A4]
mov [rsp+0B8h+var_40], eax
mov eax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_A8], eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov eax, [rsp+0B8h+var_A8]
cmp eax, ecx
jle short loc_14B284
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()"
xor eax, eax
mov esi, 6E2h
call _ggml_abort
jmp short $+2
loc_14B267:
mov rdi, [rsp+0B8h+var_50]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_38], rcx
mov [rsp+0B8h+var_3C], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_14B2C0
loc_14B284:
jmp short $+2
loc_14B286:
mov rdi, [rsp+0B8h+var_50]
movsxd rsi, [rsp+0B8h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
jmp short $+2
loc_14B297:
mov [rsp+0B8h+var_1A], 1
test [rsp+0B8h+var_1A], 1
jnz short loc_14B2B3
mov rdi, [rsp+0B8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_14B2B3:
mov rax, [rsp+0B8h+var_58]
add rsp, 0B8h
retn
loc_14B2C0:
mov rdi, [rsp+0B8h+var_38]
call __Unwind_Resume
| void * common_detokenize[abi:cxx11](void *a1, long long a2, long long a3, char a4)
{
unsigned int v4; // eax
unsigned int v5; // eax
long long v7; // [rsp+18h] [rbp-A0h]
long long v8; // [rsp+20h] [rbp-98h]
unsigned int v9; // [rsp+2Ch] [rbp-8Ch]
long long v10; // [rsp+30h] [rbp-88h]
long long v11; // [rsp+40h] [rbp-78h]
long long v12; // [rsp+48h] [rbp-70h]
unsigned int v13; // [rsp+54h] [rbp-64h]
long long v14; // [rsp+58h] [rbp-60h]
_QWORD *v15; // [rsp+70h] [rbp-48h]
int v16; // [rsp+78h] [rbp-40h]
long long v17; // [rsp+80h] [rbp-38h]
long long v18; // [rsp+88h] [rbp-30h] BYREF
long long v19; // [rsp+90h] [rbp-28h] BYREF
char v20; // [rsp+9Eh] [rbp-1Ah]
char v21; // [rsp+9Fh] [rbp-19h]
long long v22; // [rsp+A0h] [rbp-18h]
long long v23; // [rsp+A8h] [rbp-10h]
void *v24; // [rsp+B0h] [rbp-8h]
v24 = a1;
v23 = a2;
v22 = a3;
v21 = a4 & 1;
v20 = 0;
std::string::basic_string(a1);
v19 = std::string::capacity(a1);
v18 = std::vector<int>::size(v22);
v15 = std::max<unsigned long>(&v19, &v18);
std::string::resize(a1, *v15);
v11 = v23;
v12 = std::vector<int>::data(v22);
v13 = std::vector<int>::size(v22);
v14 = std::string::operator[](a1, 0LL);
v4 = std::string::size(a1);
v16 = llama_detokenize(v11, v12, v13, v14, v4, 0LL, v21 & 1);
if ( v16 < 0 )
{
std::string::resize(a1, -v16);
v7 = v23;
v8 = std::vector<int>::data(v22);
v9 = std::vector<int>::size(v22);
v10 = std::string::operator[](a1, 0LL);
v5 = std::string::size(a1);
v16 = llama_detokenize(v7, v8, v9, v10, v5, 0LL, v21 & 1);
if ( v16 > (int)std::string::size(a1) )
{
v17 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1762LL,
"GGML_ASSERT(%s) failed",
"n_chars <= (int32_t)text.size()");
std::string::~string(a1);
_Unwind_Resume(v17);
}
}
std::string::resize(a1, v16);
return a1;
}
| |||
45,934 | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/common.cpp | std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) {
std::string text;
text.resize(std::max(text.capacity(), tokens.size()));
int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
if (n_chars < 0) {
text.resize(-n_chars);
n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization
}
text.resize(n_chars);
// NOTE: the original tokenizer decodes bytes after collecting the pieces.
return text;
} | O2 | cpp | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rax
subq (%rdx), %rax
sarq $0x2, %rax
cmpq $0x10, %rax
pushq $0xf
popq %rsi
cmovaeq %rax, %rsi
callq 0x20930
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movzbl %bpl, %ebp
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x200b0
testl %eax, %eax
jns 0x6ebfc
negl %eax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20930
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x200b0
cmpl 0x8(%rbx), %eax
jg 0x6ec15
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x20930
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36efd(%rip), %rdi # 0xa5b19
leaq 0x36f42(%rip), %rdx # 0xa5b65
leaq 0x375ae(%rip), %rcx # 0xa61d8
movl $0x6e2, %esi # imm = 0x6E2
xorl %eax, %eax
callq 0x20af0
jmp 0x6ec38
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d78
movq %r14, %rdi
callq 0x20b90
| _Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp rax, 10h
push 0Fh
pop rsi
cmovnb rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
movzx ebp, bpl
mov [rsp+28h+var_28], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
test eax, eax
jns short loc_6EBFC
neg eax
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
mov [rsp+28h+var_28], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
cmp eax, [rbx+8]
jg short loc_6EC15
loc_6EBFC:
movsxd rsi, eax
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6EC15:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()"
mov esi, 6E2h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_6EC38:
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, long long a4)
{
long long v4; // rax
unsigned __int8 v5; // bp
long long v8; // rsi
int v9; // eax
long long v10; // rdx
long long v11; // rcx
long long v13; // r14
long long v14; // [rsp+0h] [rbp-28h]
long long v15; // [rsp+0h] [rbp-28h]
HIDWORD(v14) = HIDWORD(v4);
v5 = a4;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v8 = 15LL;
if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 )
v8 = (long long)(a3[1] - *a3) >> 2;
std::string::resize(a1, v8, a3, a4);
LODWORD(v14) = v5;
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v14);
if ( v9 < 0 )
{
std::string::resize(a1, (unsigned int)-v9, v10, v11);
LODWORD(v15) = v5;
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v15);
if ( v9 > *((_DWORD *)a1 + 2) )
{
v13 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1762LL,
"GGML_ASSERT(%s) failed",
"n_chars <= (int32_t)text.size()");
std::string::~string(a1);
_Unwind_Resume(v13);
}
}
std::string::resize(a1, v9, v10, v11);
return a1;
}
| |||
45,935 | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/common.cpp | std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) {
std::string text;
text.resize(std::max(text.capacity(), tokens.size()));
int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
if (n_chars < 0) {
text.resize(-n_chars);
n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization
}
text.resize(n_chars);
// NOTE: the original tokenizer decodes bytes after collecting the pieces.
return text;
} | O3 | cpp | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rax
subq (%rdx), %rax
sarq $0x2, %rax
cmpq $0x10, %rax
movl $0xf, %esi
cmovaeq %rax, %rsi
xorl %edx, %edx
callq 0x181d0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movzbl %bpl, %ebp
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x180c0
testl %eax, %eax
jns 0x7f6bc
negl %eax
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x181d0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x180c0
cmpl 0x8(%rbx), %eax
jg 0x7f6d9
movslq %eax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x181d0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x41029(%rip), %rdi # 0xc0709
leaq 0x4106e(%rip), %rdx # 0xc0755
leaq 0x416da(%rip), %rcx # 0xc0dc8
movl $0x6e2, %esi # imm = 0x6E2
xorl %eax, %eax
callq 0x18ad0
jmp 0x7f6fc
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x7f713
movq (%r12), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18b90
| _Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, ecx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp rax, 10h
mov esi, 0Fh
cmovnb rsi, rax
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
movzx ebp, bpl
mov [rsp+38h+var_38], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
test eax, eax
jns short loc_7F6BC
neg eax
mov rdi, rbx
mov rsi, rax
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
mov [rsp+38h+var_38], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
cmp eax, [rbx+8]
jg short loc_7F6D9
loc_7F6BC:
movsxd rsi, eax
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7F6D9:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()"
mov esi, 6E2h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_7F6FC:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_7F713
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7F713:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, unsigned __int8 a4)
{
_QWORD *v7; // r12
long long v8; // rsi
int v9; // eax
long long v11; // r14
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v8 = 15LL;
if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 )
v8 = (long long)(a3[1] - *a3) >> 2;
std::string::resize(a1, v8, 0LL);
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, a4);
if ( v9 < 0 )
{
std::string::resize(a1, (unsigned int)-v9, 0LL);
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, a4);
if ( v9 > *((_DWORD *)a1 + 2) )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1762LL,
"GGML_ASSERT(%s) failed",
"n_chars <= (int32_t)text.size()");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v11);
}
}
std::string::resize(a1, v9, 0LL);
return a1;
}
| common_detokenize[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBP,ECX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
CMP RAX,0x10
MOV ESI,0xf
CMOVNC RSI,RAX
LAB_0017f653:
XOR EDX,EDX
CALL 0x001181d0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,RSI
SHR RDX,0x2
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RBX + 0x8]
LAB_0017f66f:
MOVZX EBP,BPL
MOV dword ptr [RSP],EBP
MOV RDI,R14
XOR R9D,R9D
CALL 0x001180c0
TEST EAX,EAX
JNS 0x0017f6bc
NEG EAX
MOV RDI,RBX
MOV RSI,RAX
XOR EDX,EDX
CALL 0x001181d0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,RSI
SHR RDX,0x2
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RBX + 0x8]
MOV dword ptr [RSP],EBP
MOV RDI,R14
XOR R9D,R9D
CALL 0x001180c0
CMP EAX,dword ptr [RBX + 0x8]
JG 0x0017f6d9
LAB_0017f6bc:
MOVSXD RSI,EAX
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001181d0
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017f6d9:
LEA RDI,[0x1c0709]
LEA RDX,[0x1c0755]
LEA RCX,[0x1c0dc8]
MOV ESI,0x6e2
XOR EAX,EAX
CALL 0x00118ad0
|
/* common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int> > const&,
bool) */
llama_vocab * common_detokenize_abi_cxx11_(llama_vocab *param_1,vector *param_2,bool param_3)
{
int iVar1;
ulong uVar2;
int1 in_CL;
int7 in_register_00000011;
long *plVar3;
ulong uVar4;
plVar3 = (long *)CONCAT71(in_register_00000011,param_3);
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
uVar2 = plVar3[1] - *plVar3 >> 2;
uVar4 = 0xf;
if (0xf < uVar2) {
uVar4 = uVar2;
}
/* try { // try from 0017f653 to 0017f659 has its CatchHandler @ 0017f6fa */
std::__cxx11::string::resize((ulong)param_1,(char)uVar4);
/* try { // try from 0017f66f to 0017f6f9 has its CatchHandler @ 0017f6fc */
iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,-(char)iVar1);
iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,
*(int8 *)param_1,*(int4 *)(param_1 + 8),0,in_CL);
if (*(int *)(param_1 + 8) < iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6e2
,"GGML_ASSERT(%s) failed","n_chars <= (int32_t)text.size()");
}
}
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
return param_1;
}
| |
45,936 | mysql_hex_string | eloqsql/libmariadb/libmariadb/mariadb_lib.c | ulong STDCALL mysql_hex_string(char *to, const char *from, unsigned long len)
{
char *start= to;
char hexdigits[]= "0123456789ABCDEF";
while (len--)
{
*to++= hexdigits[((unsigned char)*from) >> 4];
*to++= hexdigits[((unsigned char)*from) & 0x0F];
from++;
}
*to= 0;
return (ulong)(to - start);
} | O0 | c | mysql_hex_string:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x317b0(%rip), %rax # 0x6df80
movq %rax, -0x20(%rbp)
movq 0x317ad(%rip), %rax # 0x6df88
movq %rax, -0x18(%rbp)
movb 0x317ab(%rip), %al # 0x6df90
movb %al, -0x10(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpq $0x0, %rax
je 0x3c84d
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3c7e8
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3c87f
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
callq 0x144c0
nopw %cs:(%rax,%rax)
| mysql_hex_string:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, cs:qword_6DF80
mov [rbp+var_20], rax
mov rax, cs:qword_6DF88
mov [rbp+var_18], rax
mov al, cs:byte_6DF90
mov [rbp+var_10], al
loc_3C7E8:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
cmp rax, 0
jz short loc_3C84D
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
sar eax, 4
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 0Fh
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_3C7E8
loc_3C84D:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_40]
sub rax, rcx
mov [rbp+var_48], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3C87F
mov rax, [rbp+var_48]
add rsp, 50h
pop rbp
retn
loc_3C87F:
call ___stack_chk_fail
| _BYTE * mysql_hex_string(_BYTE *a1, unsigned __int8 *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v8; // [rsp+28h] [rbp-28h]
char v9[24]; // [rsp+30h] [rbp-20h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
strcpy(v9, "0123456789ABCDEF");
while ( a3-- )
{
*v8 = v9[(int)*a2 >> 4];
v4 = v8 + 1;
v8 += 2;
*v4 = v9[*a2++ & 0xF];
}
*v8 = 0;
return (_BYTE *)(v8 - a1);
}
| mysql_hex_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x0016df80]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x0016df88]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [0x0016df90]
MOV byte ptr [RBP + -0x10],AL
LAB_0013c7e8:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
CMP RAX,0x0
JZ 0x0013c84d
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
SAR EAX,0x4
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xf
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013c7e8
LAB_0013c84d:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013c87f
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x50
POP RBP
RET
LAB_0013c87f:
CALL 0x001144c0
|
long mysql_hex_string(char *param_1,byte *param_2,long param_3)
{
char *pcVar1;
long in_FS_OFFSET;
long local_40;
byte *local_38;
char *local_30;
char local_28 [16];
char local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28._0_8_ = s_0123456789ABCDEF_0016df80._0_8_;
local_28._8_8_ = s_0123456789ABCDEF_0016df80._8_8_;
local_18 = s_0123456789ABCDEF_0016df80[0x10];
local_40 = param_3;
local_38 = param_2;
local_30 = param_1;
while (local_40 != 0) {
pcVar1 = local_30 + 1;
*local_30 = local_28[(int)(uint)*local_38 >> 4];
local_30 = local_30 + 2;
*pcVar1 = local_28[(int)(*local_38 & 0xf)];
local_38 = local_38 + 1;
local_40 = local_40 + -1;
}
*local_30 = '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return (long)local_30 - (long)param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
45,937 | my_uni_utf32 | eloqsql/strings/ctype-ucs2.c | static int
my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (wc > 0x10FFFF)
return MY_CS_ILUNI;
s[0]= (uchar) (wc >> 24);
s[1]= (uchar) (wc >> 16) & 0xFF;
s[2]= (uchar) (wc >> 8) & 0xFF;
s[3]= (uchar) wc & 0xFF;
return 4;
} | O0 | c | my_uni_utf32:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0x131d7b
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x131dec
cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF
jbe 0x131d8e
movl $0x0, -0x4(%rbp)
jmp 0x131dec
movq -0x18(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x10, %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x3(%rax)
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uni_utf32:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_131D7B
mov [rbp+var_4], 0FFFFFF98h
jmp short loc_131DEC
loc_131D7B:
cmp [rbp+var_18], 10FFFFh
jbe short loc_131D8E
mov [rbp+var_4], 0
jmp short loc_131DEC
loc_131D8E:
mov rax, [rbp+var_18]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 10h
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 8
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+3], cl
mov [rbp+var_4], 4
loc_131DEC:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_uni_utf32(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( (unsigned long long)(a3 + 4) <= a4 )
{
if ( a2 <= 0x10FFFF )
{
*a3 = BYTE3(a2);
a3[1] = BYTE2(a2);
a3[2] = BYTE1(a2);
a3[3] = a2;
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
| inline_mysql_cond_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00131da4
LEA RAX,[0x3c0238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
LAB_00131da4:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a260
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_cond_destroy(pthread_cond_t *param_1)
{
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x68))(param_1[1].__align);
param_1[1].__align = 0;
}
pthread_cond_destroy(param_1);
return;
}
| |
45,938 | 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;
}
| |
45,939 | 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;
}
| |||
45,940 | my_free_open_file_info | eloqsql/mysys/my_file.c | void my_free_open_file_info()
{
DBUG_ENTER("my_free_file_info");
if (my_file_info != my_file_info_default)
{
/* Copy data back for my_print_open_files */
memcpy((char*) my_file_info_default, my_file_info,
sizeof(*my_file_info_default)* MY_NFILE);
my_free(my_file_info);
my_file_info= my_file_info_default;
my_file_limit= MY_NFILE;
}
DBUG_VOID_RETURN;
} | O0 | c | my_free_open_file_info:
pushq %rbp
movq %rsp, %rbp
leaq 0xb92d35(%rip), %rcx # 0xc82f00
leaq 0x1cfb76(%rip), %rax # 0x2bfd48
cmpq %rcx, (%rax)
je 0xf021f
leaq 0x1cfb6a(%rip), %rax # 0x2bfd48
movq (%rax), %rsi
leaq 0xb92d18(%rip), %rdi # 0xc82f00
movl $0x400, %edx # imm = 0x400
callq 0x2a090
leaq 0x1cfb4f(%rip), %rax # 0x2bfd48
movq (%rax), %rdi
callq 0xf3d70
leaq 0x1cfb40(%rip), %rax # 0x2bfd48
leaq 0xb92cf1(%rip), %rcx # 0xc82f00
movq %rcx, (%rax)
leaq 0x1cfb27(%rip), %rax # 0x2bfd40
movl $0x40, (%rax)
jmp 0xf0221
jmp 0xf0223
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| my_free_open_file_info:
push rbp
mov rbp, rsp
lea rcx, my_file_info_default
lea rax, my_file_info
cmp [rax], rcx
jz short loc_F021F
lea rax, my_file_info
mov rsi, [rax]
lea rdi, my_file_info_default
mov edx, 400h
call _memcpy
lea rax, my_file_info
mov rdi, [rax]
call my_free
lea rax, my_file_info
lea rcx, my_file_info_default
mov [rax], rcx
lea rax, my_file_limit
mov dword ptr [rax], 40h ; '@'
loc_F021F:
jmp short $+2
loc_F0221:
jmp short $+2
loc_F0223:
pop rbp
retn
| _UNKNOWN **my_free_open_file_info()
{
_UNKNOWN **result; // rax
result = &my_file_info;
if ( my_file_info != &my_file_info_default )
{
memcpy(&my_file_info_default, my_file_info, 1024LL);
my_free(my_file_info);
my_file_info = &my_file_info_default;
result = (_UNKNOWN **)my_file_limit;
my_file_limit[0] = 64;
}
return result;
}
| my_free_open_file_info:
PUSH RBP
MOV RBP,RSP
LEA RCX,[0xd82f00]
LEA RAX,[0x3bfd48]
CMP qword ptr [RAX],RCX
JZ 0x001f021f
LEA RAX,[0x3bfd48]
MOV RSI,qword ptr [RAX]
LEA RDI,[0xd82f00]
MOV EDX,0x400
CALL 0x0012a090
LEA RAX,[0x3bfd48]
MOV RDI,qword ptr [RAX]
CALL 0x001f3d70
LEA RAX,[0x3bfd48]
LEA RCX,[0xd82f00]
MOV qword ptr [RAX],RCX
LEA RAX,[0x3bfd40]
MOV dword ptr [RAX],0x40
LAB_001f021f:
JMP 0x001f0221
LAB_001f0221:
JMP 0x001f0223
LAB_001f0223:
POP RBP
RET
|
void my_free_open_file_info(void)
{
if (my_file_info != my_file_info_default) {
memcpy(my_file_info_default,my_file_info,0x400);
my_free(my_file_info);
my_file_info = my_file_info_default;
my_file_limit = 0x40;
}
return;
}
| |
45,941 | mysql_stmt_send_long_data_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_send_long_data_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
TRUE,
r_my_bool)
} | O3 | c | mysql_stmt_send_long_data_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x2fda1
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x308f7
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x2fe04
movl (%r15), %r15d
jmp 0x2fe7a
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1dee5(%rip), %rax # 0x4dca0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1deca(%rip), %rax # 0x4dcb0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, (%rbx)
jmp 0x2fe7a
movb $0x0, 0x15(%r15)
js 0x2fe11
movb 0x8(%r15), %al
jmp 0x2fe75
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1de71(%rip), %rax # 0x4dca0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1de56(%rip), %rax # 0x4dcb0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, %al
movb %al, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_send_long_data_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_2FDA1
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_2FE04
mov r15d, [r15]
jmp loc_2FE7A
loc_2FDA1:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov byte ptr [rbx], 1
jmp short loc_2FE7A
loc_2FE04:
mov byte ptr [r15+15h], 0
js short loc_2FE11
mov al, [r15+8]
jmp short loc_2FE75
loc_2FE11:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov al, 1
loc_2FE75:
mov [rbx], al
xor r15d, r15d
loc_2FE7A:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_send_long_data_cont(char *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
char v7; // al
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = *((_BYTE *)v4 + 8);
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
| mysql_stmt_send_long_data_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x0012fda1
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x001308f7
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012fe04
MOV R15D,dword ptr [R15]
JMP 0x0012fe7a
LAB_0012fda1:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dca0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dcb0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV byte ptr [RBX],0x1
JMP 0x0012fe7a
LAB_0012fe04:
MOV byte ptr [R15 + 0x15],0x0
JS 0x0012fe11
MOV AL,byte ptr [R15 + 0x8]
JMP 0x0012fe75
LAB_0012fe11:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dca0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dcb0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV AL,0x1
LAB_0012fe75:
MOV byte ptr [RBX],AL
XOR R15D,R15D
LAB_0012fe7a:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_send_long_data_cont(int1 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int1 uVar2;
int iVar3;
int4 uVar4;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar4 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0014dd20,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar3 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar3 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar3 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014dcf0,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar2 = 1;
}
else {
uVar2 = *(int1 *)(puVar1 + 2);
}
*param_1 = uVar2;
uVar4 = 0;
}
else {
uVar4 = *puVar1;
}
}
return uVar4;
}
| |
45,942 | OpenSubdiv::v3_6_0::Bfr::FaceVertex::Initialize(int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp | void
FaceVertex::Initialize(int faceSize, int regFaceSize) {
_commonFaceSize = (short) faceSize;
_regFaceSize = (unsigned char) regFaceSize;
_numFaceVerts = 0;
_isExpInfSharp = false;
_isExpSemiSharp = false;
_isImpInfSharp = false;
_isImpSemiSharp = false;
_vDesc._isValid = false;
_vDesc._isInitialized = false;
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::FaceVertex::Initialize(int, int):
movw %si, 0x9c(%rdi)
movb %dl, 0x9e(%rdi)
movl $0x0, 0xa0(%rdi)
andb $-0x10, 0x9f(%rdi)
andb $-0x4, (%rdi)
retq
| _ZN10OpenSubdiv6v3_6_03Bfr10FaceVertex10InitializeEii:
mov [rdi+9Ch], si
mov [rdi+9Eh], dl
mov dword ptr [rdi+0A0h], 0
and byte ptr [rdi+9Fh], 0F0h
and byte ptr [rdi], 0FCh
retn
| void OpenSubdiv::v3_6_0::Bfr::FaceVertex::Initialize(
OpenSubdiv::v3_6_0::Bfr::FaceVertex *this,
__int16 a2,
char a3)
{
*((_WORD *)this + 78) = a2;
*((_BYTE *)this + 158) = a3;
*((_DWORD *)this + 40) = 0;
*((_BYTE *)this + 159) &= 0xF0u;
*(_BYTE *)this &= 0xFCu;
}
| Initialize:
MOV word ptr [RDI + 0x9c],SI
MOV byte ptr [RDI + 0x9e],DL
MOV dword ptr [RDI + 0xa0],0x0
AND byte ptr [RDI + 0x9f],0xf0
AND byte ptr [RDI],0xfc
RET
|
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::Initialize(int, int) */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::FaceVertex::Initialize(FaceVertex *this,int param_1,int param_2)
{
*(short *)(this + 0x9c) = (short)param_1;
this[0x9e] = SUB41(param_2,0);
*(int4 *)(this + 0xa0) = 0;
this[0x9f] = (FaceVertex)((byte)this[0x9f] & 0xf0);
*this = (FaceVertex)((byte)*this & 0xfc);
return;
}
| |
45,943 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
return result;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0xadbfb
movq %rsi, %r14
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0xadca4
movq 0x8(%r14), %rax
addq (%rax), %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x404b7(%rip), %rdi # 0xee0b9
leaq 0x404fa(%rip), %rdx # 0xee103
leaq 0x40583(%rip), %rcx # 0xee193
movl $0x582c, %esi # imm = 0x582C
xorl %eax, %eax
callq 0x1c0c0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
push r15
push r14
push rbx
mov rbx, rdi
mov [rdi], rsi
mov qword ptr [rdi+8], 0
mov rax, 8000000000000000h
mov [rdi+18h], rax
mov rdi, [rsi+8]
test rdi, rdi
jz short loc_ADBFB
mov r14, rsi
mov rsi, [rdx+10h]
mov r15, rsi
sub r15, [rdi]
mov rdx, rcx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [r14+8]
add r15, [rax]
mov [rbx+10h], r15
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_ADBFB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
mov esi, 582Ch
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
_QWORD *a1,
long long a2,
long long a3,
long long a4)
{
_QWORD *v5; // rdi
long long v6; // r15
*a1 = a2;
a1[1] = 0LL;
a1[3] = 0x8000000000000000LL;
v5 = *(_QWORD **)(a2 + 8);
if ( v5 )
{
v6 = *(_QWORD *)(a3 + 16) - *v5;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::insert(
v5,
*(_QWORD *)(a3 + 16),
a4);
a1[2] = **(_QWORD **)(a2 + 8) + v6;
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL,
"GGML_ASSERT(%s) failed",
"m_data.m_value.array != nullptr");
return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL);
}
}
| insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI + 0x18],RAX
MOV RDI,qword ptr [RSI + 0x8]
TEST RDI,RDI
JZ 0x001adbfb
MOV R14,RSI
MOV RSI,qword ptr [RDX + 0x10]
MOV R15,RSI
SUB R15,qword ptr [RDI]
MOV RDX,RCX
CALL 0x001adca4
MOV RAX,qword ptr [R14 + 0x8]
ADD R15,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],R15
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_001adbfb:
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1ee193]
MOV ESI,0x582c
XOR EAX,EAX
CALL 0x0011c0c0
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
long * nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>
(long *param_1,long param_2,long param_3,int8 param_4)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*pvVar1;
long lVar2;
long lVar3;
*param_1 = param_2;
param_1[1] = 0;
param_1[3] = -0x8000000000000000;
pvVar1 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8);
if (pvVar1 != (vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)0x0) {
lVar2 = *(long *)(param_3 + 0x10);
lVar3 = *(long *)pvVar1;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::insert(pvVar1,lVar2,param_4);
param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8);
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c,
"GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr");
}
| |
45,944 | string_indexof_char | bluesky950520[P]quickjs/quickjs.c | static int string_indexof_char(JSString *p, int c, int from)
{
/* assuming 0 <= from <= p->len */
int i, len = p->len;
if (p->is_wide_char) {
for (i = from; i < len; i++) {
if (p->u.str16[i] == c)
return i;
}
} else {
if ((c & ~0xff) == 0) {
for (i = from; i < len; i++) {
if (p->u.str8[i] == (uint8_t)c)
return i;
}
}
}
return -1;
} | O0 | c | string_indexof_char:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl %edx, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
je 0x8aae7
movl -0x18(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
cmpl -0x20(%rsp), %eax
jge 0x8aae5
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movzwl 0x18(%rax,%rcx,2), %eax
cmpl -0x14(%rsp), %eax
jne 0x8aad6
movl -0x1c(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x8ab46
jmp 0x8aad8
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x8aaad
jmp 0x8ab3e
movl -0x14(%rsp), %eax
andl $0xffffff00, %eax # imm = 0xFFFFFF00
cmpl $0x0, %eax
jne 0x8ab3c
movl -0x18(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
cmpl -0x20(%rsp), %eax
jge 0x8ab3a
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movzbl 0x18(%rax,%rcx), %eax
movl -0x14(%rsp), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x8ab2b
movl -0x1c(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x8ab46
jmp 0x8ab2d
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x8aafd
jmp 0x8ab3c
jmp 0x8ab3e
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
| string_indexof_char:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
mov [rsp+var_18], edx
mov rax, [rsp+var_10]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov [rsp+var_20], eax
mov rax, [rsp+var_10]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jz short loc_8AAE7
mov eax, [rsp+var_18]
mov [rsp+var_1C], eax
loc_8AAAD:
mov eax, [rsp+var_1C]
cmp eax, [rsp+var_20]
jge short loc_8AAE5
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_1C]
movzx eax, word ptr [rax+rcx*2+18h]
cmp eax, [rsp+var_14]
jnz short loc_8AAD6
mov eax, [rsp+var_1C]
mov [rsp+var_4], eax
jmp short loc_8AB46
loc_8AAD6:
jmp short $+2
loc_8AAD8:
mov eax, [rsp+var_1C]
add eax, 1
mov [rsp+var_1C], eax
jmp short loc_8AAAD
loc_8AAE5:
jmp short loc_8AB3E
loc_8AAE7:
mov eax, [rsp+var_14]
and eax, 0FFFFFF00h
cmp eax, 0
jnz short loc_8AB3C
mov eax, [rsp+var_18]
mov [rsp+var_1C], eax
loc_8AAFD:
mov eax, [rsp+var_1C]
cmp eax, [rsp+var_20]
jge short loc_8AB3A
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_1C]
movzx eax, byte ptr [rax+rcx+18h]
mov ecx, [rsp+var_14]
movzx ecx, cl
cmp eax, ecx
jnz short loc_8AB2B
mov eax, [rsp+var_1C]
mov [rsp+var_4], eax
jmp short loc_8AB46
loc_8AB2B:
jmp short $+2
loc_8AB2D:
mov eax, [rsp+var_1C]
add eax, 1
mov [rsp+var_1C], eax
jmp short loc_8AAFD
loc_8AB3A:
jmp short $+2
loc_8AB3C:
jmp short $+2
loc_8AB3E:
mov [rsp+var_4], 0FFFFFFFFh
loc_8AB46:
mov eax, [rsp+var_4]
retn
| long long string_indexof_char(long long a1, int a2, unsigned int a3)
{
int v4; // [rsp+0h] [rbp-20h]
unsigned int i; // [rsp+4h] [rbp-1Ch]
unsigned int j; // [rsp+4h] [rbp-1Ch]
v4 = *(_QWORD *)(a1 + 4) & 0x7FFFFFFF;
if ( (*(_QWORD *)(a1 + 4) & 0x80000000LL) != 0 )
{
for ( i = a3; (int)i < v4; ++i )
{
if ( *(unsigned __int16 *)(a1 + 2LL * (int)i + 24) == a2 )
return i;
}
}
else if ( (a2 & 0xFFFFFF00) == 0 )
{
for ( j = a3; (int)j < v4; ++j )
{
if ( *(unsigned __int8 *)(a1 + (int)j + 24) == (unsigned __int8)a2 )
return j;
}
}
return (unsigned int)-1;
}
| string_indexof_char:
MOV qword ptr [RSP + -0x10],RDI
MOV dword ptr [RSP + -0x14],ESI
MOV dword ptr [RSP + -0x18],EDX
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV dword ptr [RSP + -0x20],EAX
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JZ 0x0018aae7
MOV EAX,dword ptr [RSP + -0x18]
MOV dword ptr [RSP + -0x1c],EAX
LAB_0018aaad:
MOV EAX,dword ptr [RSP + -0x1c]
CMP EAX,dword ptr [RSP + -0x20]
JGE 0x0018aae5
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x1c]
MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18]
CMP EAX,dword ptr [RSP + -0x14]
JNZ 0x0018aad6
MOV EAX,dword ptr [RSP + -0x1c]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0018ab46
LAB_0018aad6:
JMP 0x0018aad8
LAB_0018aad8:
MOV EAX,dword ptr [RSP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + -0x1c],EAX
JMP 0x0018aaad
LAB_0018aae5:
JMP 0x0018ab3e
LAB_0018aae7:
MOV EAX,dword ptr [RSP + -0x14]
AND EAX,0xffffff00
CMP EAX,0x0
JNZ 0x0018ab3c
MOV EAX,dword ptr [RSP + -0x18]
MOV dword ptr [RSP + -0x1c],EAX
LAB_0018aafd:
MOV EAX,dword ptr [RSP + -0x1c]
CMP EAX,dword ptr [RSP + -0x20]
JGE 0x0018ab3a
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x1c]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x18]
MOV ECX,dword ptr [RSP + -0x14]
MOVZX ECX,CL
CMP EAX,ECX
JNZ 0x0018ab2b
MOV EAX,dword ptr [RSP + -0x1c]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0018ab46
LAB_0018ab2b:
JMP 0x0018ab2d
LAB_0018ab2d:
MOV EAX,dword ptr [RSP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + -0x1c],EAX
JMP 0x0018aafd
LAB_0018ab3a:
JMP 0x0018ab3c
LAB_0018ab3c:
JMP 0x0018ab3e
LAB_0018ab3e:
MOV dword ptr [RSP + -0x4],0xffffffff
LAB_0018ab46:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int string_indexof_char(long param_1,uint param_2,int param_3)
{
uint uVar1;
int local_1c;
uVar1 = (uint)*(int8 *)(param_1 + 4) & 0x7fffffff;
local_1c = param_3;
if ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0) {
if ((param_2 & 0xffffff00) == 0) {
for (; local_1c < (int)uVar1; local_1c = local_1c + 1) {
if ((uint)*(byte *)(param_1 + 0x18 + (long)local_1c) == (param_2 & 0xff)) {
return local_1c;
}
}
}
}
else {
for (; local_1c < (int)uVar1; local_1c = local_1c + 1) {
if (*(ushort *)(param_1 + 0x18 + (long)local_1c * 2) == param_2) {
return local_1c;
}
}
}
return -1;
}
| |
45,945 | string_indexof_char | bluesky950520[P]quickjs/quickjs.c | static int string_indexof_char(JSString *p, int c, int from)
{
/* assuming 0 <= from <= p->len */
int i, len = p->len;
if (p->is_wide_char) {
for (i = from; i < len; i++) {
if (p->u.str16[i] == c)
return i;
}
} else {
if ((c & ~0xff) == 0) {
for (i = from; i < len; i++) {
if (p->u.str8[i] == (uint8_t)c)
return i;
}
}
}
return -1;
} | O1 | c | string_indexof_char:
movq 0x4(%rdi), %rcx
movl %ecx, %r8d
andl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
js 0x4fa01
cmpl $0xff, %esi
ja 0x4fa00
cmpl %edx, %r8d
jle 0x4fa00
movslq %edx, %r9
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq (%r9,%rdi), %r8
addq $0x18, %r8
subq %r9, %rcx
xorl %edi, %edi
movzbl (%r8,%rdi), %r9d
cmpl %esi, %r9d
je 0x4fa30
incq %rdi
cmpq %rdi, %rcx
jne 0x4f9ee
retq
cmpl %edx, %r8d
jle 0x4fa00
movslq %edx, %r9
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq (%rdi,%r9,2), %r8
addq $0x18, %r8
subq %r9, %rcx
xorl %edi, %edi
movzwl (%r8,%rdi,2), %r9d
cmpl %esi, %r9d
je 0x4fa30
incq %rdi
cmpq %rdi, %rcx
jne 0x4fa1c
jmp 0x4fa00
addl %edi, %edx
movl %edx, %eax
retq
| string_indexof_char:
mov rcx, [rdi+4]
mov r8d, ecx
and r8d, 7FFFFFFFh
mov eax, 0FFFFFFFFh
test ecx, ecx
js short loc_4FA01
cmp esi, 0FFh
ja short locret_4FA00
cmp r8d, edx
jle short locret_4FA00
movsxd r9, edx
and ecx, 7FFFFFFFh
lea r8, [r9+rdi]
add r8, 18h
sub rcx, r9
xor edi, edi
loc_4F9EE:
movzx r9d, byte ptr [r8+rdi]
cmp r9d, esi
jz short loc_4FA30
inc rdi
cmp rcx, rdi
jnz short loc_4F9EE
locret_4FA00:
retn
loc_4FA01:
cmp r8d, edx
jle short locret_4FA00
movsxd r9, edx
and ecx, 7FFFFFFFh
lea r8, [rdi+r9*2]
add r8, 18h
sub rcx, r9
xor edi, edi
loc_4FA1C:
movzx r9d, word ptr [r8+rdi*2]
cmp r9d, esi
jz short loc_4FA30
inc rdi
cmp rcx, rdi
jnz short loc_4FA1C
jmp short locret_4FA00
loc_4FA30:
add edx, edi
mov eax, edx
retn
| long long string_indexof_char(long long a1, unsigned int a2, int a3)
{
long long v3; // rcx
int v4; // r8d
long long result; // rax
long long v6; // r8
long long v7; // rcx
long long v8; // rdi
long long v9; // r8
long long v10; // rcx
v3 = *(_QWORD *)(a1 + 4);
v4 = v3 & 0x7FFFFFFF;
result = 0xFFFFFFFFLL;
if ( (int)v3 < 0 )
{
if ( v4 > a3 )
{
v9 = a1 + 2LL * a3 + 24;
v10 = (v3 & 0x7FFFFFFF) - a3;
v8 = 0LL;
while ( *(unsigned __int16 *)(v9 + 2 * v8) != a2 )
{
if ( v10 == ++v8 )
return result;
}
return (unsigned int)(v8 + a3);
}
}
else if ( a2 <= 0xFF && v4 > a3 )
{
v6 = a3 + a1 + 24;
v7 = (v3 & 0x7FFFFFFF) - a3;
v8 = 0LL;
while ( *(unsigned __int8 *)(v6 + v8) != a2 )
{
if ( v7 == ++v8 )
return result;
}
return (unsigned int)(v8 + a3);
}
return result;
}
| string_indexof_char:
MOV RCX,qword ptr [RDI + 0x4]
MOV R8D,ECX
AND R8D,0x7fffffff
MOV EAX,0xffffffff
TEST ECX,ECX
JS 0x0014fa01
CMP ESI,0xff
JA 0x0014fa00
CMP R8D,EDX
JLE 0x0014fa00
MOVSXD R9,EDX
AND ECX,0x7fffffff
LEA R8,[R9 + RDI*0x1]
ADD R8,0x18
SUB RCX,R9
XOR EDI,EDI
LAB_0014f9ee:
MOVZX R9D,byte ptr [R8 + RDI*0x1]
CMP R9D,ESI
JZ 0x0014fa30
INC RDI
CMP RCX,RDI
JNZ 0x0014f9ee
LAB_0014fa00:
RET
LAB_0014fa01:
CMP R8D,EDX
JLE 0x0014fa00
MOVSXD R9,EDX
AND ECX,0x7fffffff
LEA R8,[RDI + R9*0x2]
ADD R8,0x18
SUB RCX,R9
XOR EDI,EDI
LAB_0014fa1c:
MOVZX R9D,word ptr [R8 + RDI*0x2]
CMP R9D,ESI
JZ 0x0014fa30
INC RDI
CMP RCX,RDI
JNZ 0x0014fa1c
JMP 0x0014fa00
LAB_0014fa30:
ADD EDX,EDI
MOV EAX,EDX
RET
|
int string_indexof_char(long param_1,uint param_2,int param_3)
{
uint uVar1;
long lVar2;
uVar1 = (uint)*(int8 *)(param_1 + 4);
if ((int)uVar1 < 0) {
if (param_3 < (int)(uVar1 & 0x7fffffff)) {
lVar2 = 0;
do {
if (*(ushort *)(param_1 + (long)param_3 * 2 + 0x18 + lVar2 * 2) == param_2)
goto LAB_0014fa30;
lVar2 = lVar2 + 1;
} while ((ulong)(uVar1 & 0x7fffffff) - (long)param_3 != lVar2);
}
}
else if ((param_2 < 0x100) && (param_3 < (int)(uVar1 & 0x7fffffff))) {
lVar2 = 0;
do {
if (*(byte *)(param_3 + param_1 + 0x18 + lVar2) == param_2) {
LAB_0014fa30:
return param_3 + (int)lVar2;
}
lVar2 = lVar2 + 1;
} while ((ulong)(uVar1 & 0x7fffffff) - (long)param_3 != lVar2);
}
return -1;
}
| |
45,946 | map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>, std::allocator<std::pair<ggml_tensor* const, ggml_tensor*>>>&, ggml_context*, ggml_tensor*) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | static ggml_tensor * map_tensor(std::map<ggml_tensor *, ggml_tensor *> & tensor_map, ggml_context * ctx, ggml_tensor * tensor) {
if (!tensor) {
return nullptr;
}
if (tensor_map.find(tensor) != tensor_map.end()) {
return tensor_map[tensor];
}
ggml_tensor * new_tensor = ggml_dup_tensor(ctx, tensor);
tensor_map[tensor] = new_tensor;
new_tensor->op = tensor->op;
for (int i = 0; i < GGML_MAX_DIMS; i++) {
new_tensor->nb[i] = tensor->nb[i];
}
new_tensor->flags = tensor->flags;
memcpy(new_tensor->op_params, tensor->op_params, sizeof(tensor->op_params));
strcpy(new_tensor->name, tensor->name);
new_tensor->data = tensor->data;
new_tensor->buffer = tensor->buffer;
new_tensor->extra = tensor->extra;
new_tensor->view_offs = tensor->view_offs;
new_tensor->view_src = map_tensor(tensor_map, ctx, tensor->view_src);
for (int i = 0; i < GGML_MAX_SRC; i++) {
new_tensor->src[i] = map_tensor(tensor_map, ctx, tensor->src[i]);
}
return new_tensor;
} | O1 | cpp | map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>, std::allocator<std::pair<ggml_tensor* const, ggml_tensor*>>>&, ggml_context*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testq %rdx, %rdx
je 0x2c9fb
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
leaq 0x8(%rdi), %rax
movq %rax, %rcx
testq %rsi, %rsi
je 0x2c9d0
movq %rax, %rcx
xorl %edi, %edi
cmpq %rdx, 0x20(%rsi)
setb %dil
cmovaeq %rsi, %rcx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x2c9b8
movq %rax, %rsi
cmpq %rax, %rcx
je 0x2c9e3
cmpq %rdx, 0x20(%rcx)
cmovaq %rax, %rcx
movq %rcx, %rsi
cmpq %rax, %rsi
je 0x2ca03
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x17a40
movq (%rax), %r15
jmp 0x2cb0f
xorl %r15d, %r15d
jmp 0x2cb0f
movq %r14, %rdi
movq %rdx, %rsi
callq 0x18050
movq %rax, %r15
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17a40
movq %r15, (%rax)
movq (%r12), %r12
movl 0x50(%r12), %eax
movl %eax, 0x50(%r15)
movl $0x6, %eax
movq (%r12,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
incq %rax
cmpq $0xa, %rax
jne 0x2ca34
movl 0x94(%r12), %eax
movl %eax, 0x94(%r15)
movups 0x54(%r12), %xmm0
movups 0x64(%r12), %xmm1
movups 0x74(%r12), %xmm2
movups 0x84(%r12), %xmm3
movups %xmm0, 0x54(%r15)
movups %xmm1, 0x64(%r15)
movups %xmm2, 0x74(%r15)
movups %xmm3, 0x84(%r15)
movl $0x100, %esi # imm = 0x100
movq %r15, %rdi
addq %rsi, %rdi
addq %r12, %rsi
callq 0x17f70
movq 0xf8(%r12), %rax
movq %rax, 0xf8(%r15)
movq 0x8(%r12), %rax
movq %rax, 0x8(%r15)
movq 0x140(%r12), %rax
movq %rax, 0x140(%r15)
movq 0xf0(%r12), %rax
movq %rax, 0xf0(%r15)
movq 0xe8(%r12), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c98e
movq %rax, 0xe8(%r15)
movl $0x13, %r12d
movq (%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c98e
movq %rax, (%r15,%r12,8)
incq %r12
cmpq $0x1d, %r12
jne 0x2caef
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_:
push r15
push r14
push r12
push rbx
push rax
mov [rsp+28h+var_28], rdx
test rdx, rdx
jz short loc_2C9FB
mov r14, rsi
mov rbx, rdi
mov rsi, [rdi+10h]
lea rax, [rdi+8]
mov rcx, rax
test rsi, rsi
jz short loc_2C9D0
mov rcx, rax
loc_2C9B8:
xor edi, edi
cmp [rsi+20h], rdx
setb dil
cmovnb rcx, rsi
mov rsi, [rsi+rdi*8+10h]
test rsi, rsi
jnz short loc_2C9B8
loc_2C9D0:
mov rsi, rax
cmp rcx, rax
jz short loc_2C9E3
cmp [rcx+20h], rdx
cmova rcx, rax
mov rsi, rcx
loc_2C9E3:
cmp rsi, rax
jz short loc_2CA03
mov rsi, rsp
mov rdi, rbx
call __ZNSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEixERS5_; std::map<ggml_tensor *,ggml_tensor *>::operator[](ggml_tensor * const&)
mov r15, [rax]
jmp loc_2CB0F
loc_2C9FB:
xor r15d, r15d
jmp loc_2CB0F
loc_2CA03:
mov rdi, r14
mov rsi, rdx
call _ggml_dup_tensor
mov r15, rax
mov r12, rsp
mov rdi, rbx
mov rsi, r12
call __ZNSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEixERS5_; std::map<ggml_tensor *,ggml_tensor *>::operator[](ggml_tensor * const&)
mov [rax], r15
mov r12, [r12]
mov eax, [r12+50h]
mov [r15+50h], eax
mov eax, 6
loc_2CA34:
mov rcx, [r12+rax*8]
mov [r15+rax*8], rcx
inc rax
cmp rax, 0Ah
jnz short loc_2CA34
mov eax, [r12+94h]
mov [r15+94h], eax
movups xmm0, xmmword ptr [r12+54h]
movups xmm1, xmmword ptr [r12+64h]
movups xmm2, xmmword ptr [r12+74h]
movups xmm3, xmmword ptr [r12+84h]
movups xmmword ptr [r15+54h], xmm0
movups xmmword ptr [r15+64h], xmm1
movups xmmword ptr [r15+74h], xmm2
movups xmmword ptr [r15+84h], xmm3
mov esi, 100h
mov rdi, r15
add rdi, rsi
add rsi, r12
call _strcpy
mov rax, [r12+0F8h]
mov [r15+0F8h], rax
mov rax, [r12+8]
mov [r15+8], rax
mov rax, [r12+140h]
mov [r15+140h], rax
mov rax, [r12+0F0h]
mov [r15+0F0h], rax
mov rdx, [r12+0E8h]
mov rdi, rbx
mov rsi, r14
call _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_; map_tensor(std::map<ggml_tensor *,ggml_tensor *> &,ggml_context *,ggml_tensor *)
mov [r15+0E8h], rax
mov r12d, 13h
loc_2CAEF:
mov rax, [rsp+28h+var_28]
mov rdx, [rax+r12*8]
mov rdi, rbx
mov rsi, r14
call _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_; map_tensor(std::map<ggml_tensor *,ggml_tensor *> &,ggml_context *,ggml_tensor *)
mov [r15+r12*8], rax
inc r12
cmp r12, 1Dh
jnz short loc_2CAEF
loc_2CB0F:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long map_tensor(long long a1, long long a2, unsigned long long a3, double a4)
{
long long v5; // rsi
long long v6; // rax
long long v7; // rcx
long long v8; // rsi
long long v9; // r15
long long v10; // r12
long long i; // rax
__int128 v12; // xmm1
__int128 v13; // xmm2
__int128 v14; // xmm3
long long j; // r12
_QWORD v17[5]; // [rsp+0h] [rbp-28h] BYREF
v17[0] = a3;
if ( !a3 )
return 0LL;
v5 = *(_QWORD *)(a1 + 16);
v6 = a1 + 8;
v7 = a1 + 8;
if ( v5 )
{
v7 = a1 + 8;
do
{
if ( *(_QWORD *)(v5 + 32) >= a3 )
v7 = v5;
v5 = *(_QWORD *)(v5 + 8LL * (*(_QWORD *)(v5 + 32) < a3) + 16);
}
while ( v5 );
}
v8 = a1 + 8;
if ( v7 != v6 )
{
if ( *(_QWORD *)(v7 + 32) > a3 )
v7 = a1 + 8;
v8 = v7;
}
if ( v8 != v6 )
return *(_QWORD *)std::map<ggml_tensor *,ggml_tensor *>::operator[](a1, v17);
v9 = ggml_dup_tensor(a2, a3, a4);
*(_QWORD *)std::map<ggml_tensor *,ggml_tensor *>::operator[](a1, v17) = v9;
v10 = v17[0];
*(_DWORD *)(v9 + 80) = *(_DWORD *)(v17[0] + 80LL);
for ( i = 6LL; i != 10; ++i )
*(_QWORD *)(v9 + 8 * i) = *(_QWORD *)(v10 + 8 * i);
*(_DWORD *)(v9 + 148) = *(_DWORD *)(v10 + 148);
v12 = *(_OWORD *)(v10 + 100);
v13 = *(_OWORD *)(v10 + 116);
v14 = *(_OWORD *)(v10 + 132);
*(_OWORD *)(v9 + 84) = *(_OWORD *)(v10 + 84);
*(_OWORD *)(v9 + 100) = v12;
*(_OWORD *)(v9 + 116) = v13;
*(_OWORD *)(v9 + 132) = v14;
strcpy(v9 + 256, v10 + 256);
*(_QWORD *)(v9 + 248) = *(_QWORD *)(v10 + 248);
*(_QWORD *)(v9 + 8) = *(_QWORD *)(v10 + 8);
*(_QWORD *)(v9 + 320) = *(_QWORD *)(v10 + 320);
*(_QWORD *)(v9 + 240) = *(_QWORD *)(v10 + 240);
*(_QWORD *)(v9 + 232) = map_tensor(a1, a2, *(_QWORD *)(v10 + 232));
for ( j = 19LL; j != 29; ++j )
*(_QWORD *)(v9 + 8 * j) = map_tensor(a1, a2, *(_QWORD *)(v17[0] + 8 * j));
return v9;
}
| map_tensor:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDX
TEST RDX,RDX
JZ 0x0012c9fb
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
LEA RAX,[RDI + 0x8]
MOV RCX,RAX
TEST RSI,RSI
JZ 0x0012c9d0
MOV RCX,RAX
LAB_0012c9b8:
XOR EDI,EDI
CMP qword ptr [RSI + 0x20],RDX
SETC DIL
CMOVNC RCX,RSI
MOV RSI,qword ptr [RSI + RDI*0x8 + 0x10]
TEST RSI,RSI
JNZ 0x0012c9b8
LAB_0012c9d0:
MOV RSI,RAX
CMP RCX,RAX
JZ 0x0012c9e3
CMP qword ptr [RCX + 0x20],RDX
CMOVA RCX,RAX
MOV RSI,RCX
LAB_0012c9e3:
CMP RSI,RAX
JZ 0x0012ca03
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00117a40
MOV R15,qword ptr [RAX]
JMP 0x0012cb0f
LAB_0012c9fb:
XOR R15D,R15D
JMP 0x0012cb0f
LAB_0012ca03:
MOV RDI,R14
MOV RSI,RDX
CALL 0x00118050
MOV R15,RAX
MOV R12,RSP
MOV RDI,RBX
MOV RSI,R12
CALL 0x00117a40
MOV qword ptr [RAX],R15
MOV R12,qword ptr [R12]
MOV EAX,dword ptr [R12 + 0x50]
MOV dword ptr [R15 + 0x50],EAX
MOV EAX,0x6
LAB_0012ca34:
MOV RCX,qword ptr [R12 + RAX*0x8]
MOV qword ptr [R15 + RAX*0x8],RCX
INC RAX
CMP RAX,0xa
JNZ 0x0012ca34
MOV EAX,dword ptr [R12 + 0x94]
MOV dword ptr [R15 + 0x94],EAX
MOVUPS XMM0,xmmword ptr [R12 + 0x54]
MOVUPS XMM1,xmmword ptr [R12 + 0x64]
MOVUPS XMM2,xmmword ptr [R12 + 0x74]
MOVUPS XMM3,xmmword ptr [R12 + 0x84]
MOVUPS xmmword ptr [R15 + 0x54],XMM0
MOVUPS xmmword ptr [R15 + 0x64],XMM1
MOVUPS xmmword ptr [R15 + 0x74],XMM2
MOVUPS xmmword ptr [R15 + 0x84],XMM3
MOV ESI,0x100
MOV RDI,R15
ADD RDI,RSI
ADD RSI,R12
CALL 0x00117f70
MOV RAX,qword ptr [R12 + 0xf8]
MOV qword ptr [R15 + 0xf8],RAX
MOV RAX,qword ptr [R12 + 0x8]
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [R12 + 0x140]
MOV qword ptr [R15 + 0x140],RAX
MOV RAX,qword ptr [R12 + 0xf0]
MOV qword ptr [R15 + 0xf0],RAX
MOV RDX,qword ptr [R12 + 0xe8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012c98e
MOV qword ptr [R15 + 0xe8],RAX
MOV R12D,0x13
LAB_0012caef:
MOV RAX,qword ptr [RSP]
MOV RDX,qword ptr [RAX + R12*0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012c98e
MOV qword ptr [R15 + R12*0x8],RAX
INC R12
CMP R12,0x1d
JNZ 0x0012caef
LAB_0012cb0f:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>,
std::allocator<std::pair<ggml_tensor* const, ggml_tensor*> > >&, ggml_context*, ggml_tensor*) */
long map_tensor(map *param_1,ggml_context *param_2,ggml_tensor *param_3)
{
map *pmVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
ggml_tensor *pgVar8;
long *plVar9;
long lVar10;
long lVar11;
int8 uVar12;
map *pmVar13;
map *pmVar14;
ggml_tensor *local_28;
if (param_3 == (ggml_tensor *)0x0) {
lVar10 = 0;
}
else {
pmVar1 = param_1 + 8;
pmVar13 = pmVar1;
for (pmVar14 = *(map **)(param_1 + 0x10); pmVar14 != (map *)0x0;
pmVar14 = *(map **)(pmVar14 +
(ulong)(*(ggml_tensor **)(pmVar14 + 0x20) < param_3) * 8 + 0x10)) {
if (*(ggml_tensor **)(pmVar14 + 0x20) >= param_3) {
pmVar13 = pmVar14;
}
}
pmVar14 = pmVar1;
if ((pmVar13 != pmVar1) && (pmVar14 = pmVar13, param_3 < *(ggml_tensor **)(pmVar13 + 0x20))) {
pmVar14 = pmVar1;
}
local_28 = param_3;
if (pmVar14 == pmVar1) {
lVar10 = ggml_dup_tensor(param_2,param_3);
plVar9 = (long *)std::
map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::operator[]((map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
pgVar8 = local_28;
*plVar9 = lVar10;
*(int4 *)(lVar10 + 0x50) = *(int4 *)(local_28 + 0x50);
lVar11 = 6;
do {
*(int8 *)(lVar10 + lVar11 * 8) = *(int8 *)(local_28 + lVar11 * 8);
lVar11 = lVar11 + 1;
} while (lVar11 != 10);
*(int4 *)(lVar10 + 0x94) = *(int4 *)(local_28 + 0x94);
uVar12 = *(int8 *)(local_28 + 0x5c);
uVar2 = *(int8 *)(local_28 + 100);
uVar3 = *(int8 *)(local_28 + 0x6c);
uVar4 = *(int8 *)(local_28 + 0x74);
uVar5 = *(int8 *)(local_28 + 0x7c);
uVar6 = *(int8 *)(local_28 + 0x84);
uVar7 = *(int8 *)(local_28 + 0x8c);
*(int8 *)(lVar10 + 0x54) = *(int8 *)(local_28 + 0x54);
*(int8 *)(lVar10 + 0x5c) = uVar12;
*(int8 *)(lVar10 + 100) = uVar2;
*(int8 *)(lVar10 + 0x6c) = uVar3;
*(int8 *)(lVar10 + 0x74) = uVar4;
*(int8 *)(lVar10 + 0x7c) = uVar5;
*(int8 *)(lVar10 + 0x84) = uVar6;
*(int8 *)(lVar10 + 0x8c) = uVar7;
strcpy((char *)(lVar10 + 0x100),(char *)(local_28 + 0x100));
*(int8 *)(lVar10 + 0xf8) = *(int8 *)(pgVar8 + 0xf8);
*(int8 *)(lVar10 + 8) = *(int8 *)(pgVar8 + 8);
*(int8 *)(lVar10 + 0x140) = *(int8 *)(pgVar8 + 0x140);
*(int8 *)(lVar10 + 0xf0) = *(int8 *)(pgVar8 + 0xf0);
uVar12 = map_tensor(param_1,param_2,*(ggml_tensor **)(pgVar8 + 0xe8));
*(int8 *)(lVar10 + 0xe8) = uVar12;
lVar11 = 0x13;
do {
uVar12 = map_tensor(param_1,param_2,*(ggml_tensor **)(local_28 + lVar11 * 8));
*(int8 *)(lVar10 + lVar11 * 8) = uVar12;
lVar11 = lVar11 + 1;
} while (lVar11 != 0x1d);
}
else {
plVar9 = (long *)std::
map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::operator[]((map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
lVar10 = *plVar9;
}
}
return lVar10;
}
| |
45,947 | map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>, std::allocator<std::pair<ggml_tensor* const, ggml_tensor*>>>&, ggml_context*, ggml_tensor*) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | static ggml_tensor * map_tensor(std::map<ggml_tensor *, ggml_tensor *> & tensor_map, ggml_context * ctx, ggml_tensor * tensor) {
if (!tensor) {
return nullptr;
}
if (tensor_map.find(tensor) != tensor_map.end()) {
return tensor_map[tensor];
}
ggml_tensor * new_tensor = ggml_dup_tensor(ctx, tensor);
tensor_map[tensor] = new_tensor;
new_tensor->op = tensor->op;
for (int i = 0; i < GGML_MAX_DIMS; i++) {
new_tensor->nb[i] = tensor->nb[i];
}
new_tensor->flags = tensor->flags;
memcpy(new_tensor->op_params, tensor->op_params, sizeof(tensor->op_params));
strcpy(new_tensor->name, tensor->name);
new_tensor->data = tensor->data;
new_tensor->buffer = tensor->buffer;
new_tensor->extra = tensor->extra;
new_tensor->view_offs = tensor->view_offs;
new_tensor->view_src = map_tensor(tensor_map, ctx, tensor->view_src);
for (int i = 0; i < GGML_MAX_SRC; i++) {
new_tensor->src[i] = map_tensor(tensor_map, ctx, tensor->src[i]);
}
return new_tensor;
} | O2 | cpp | map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>, std::allocator<std::pair<ggml_tensor* const, ggml_tensor*>>>&, ggml_context*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testq %rdx, %rdx
je 0x30afd
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
callq 0x20170
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x30b0f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1dec0
movq (%rax), %r15
jmp 0x30b00
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsp, %r12
movq (%r12), %rsi
movq %r14, %rdi
callq 0x1e7a0
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1dec0
movq %r15, (%rax)
movq (%r12), %r12
movl 0x50(%r12), %eax
movl %eax, 0x50(%r15)
pushq $0x6
popq %rax
cmpq $0xa, %rax
je 0x30b52
movq (%r12,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
incq %rax
jmp 0x30b3f
movl 0x94(%r12), %eax
movl %eax, 0x94(%r15)
movups 0x54(%r12), %xmm0
movups 0x64(%r12), %xmm1
movups 0x74(%r12), %xmm2
movups 0x84(%r12), %xmm3
movups %xmm0, 0x54(%r15)
movups %xmm1, 0x64(%r15)
movups %xmm2, 0x74(%r15)
movups %xmm3, 0x84(%r15)
movl $0x100, %esi # imm = 0x100
movq %r15, %rdi
addq %rsi, %rdi
addq %r12, %rsi
callq 0x1e620
movq 0xf8(%r12), %rax
movq %rax, 0xf8(%r15)
movq 0x8(%r12), %rax
movq %rax, 0x8(%r15)
movq 0x140(%r12), %rax
movq %rax, 0x140(%r15)
movq 0xf0(%r12), %rax
movq %rax, 0xf0(%r15)
movq 0xe8(%r12), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30ac5
movq %rax, 0xe8(%r15)
pushq $0x13
popq %r12
cmpq $0x1d, %r12
je 0x30b00
movq (%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30ac5
movq %rax, (%r15,%r12,8)
incq %r12
jmp 0x30bfa
| _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_:
push r15
push r14
push r12
push rbx
push rax
mov [rsp+28h+var_28], rdx
test rdx, rdx
jz short loc_30AFD
mov r14, rsi
mov rbx, rdi
mov rsi, rsp
call __ZNSt8_Rb_treeIP11ggml_tensorSt4pairIKS1_S1_ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE4findERS3_; std::_Rb_tree<ggml_tensor *,std::pair<ggml_tensor * const,ggml_tensor *>,std::_Select1st<std::pair<ggml_tensor * const,ggml_tensor *>>,std::less<ggml_tensor *>,std::allocator<std::pair<ggml_tensor * const,ggml_tensor *>>>::find(ggml_tensor * const&)
lea rcx, [rbx+8]
cmp rax, rcx
jz short loc_30B0F
mov rsi, rsp
mov rdi, rbx
call __ZNSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEixERS5_; std::map<ggml_tensor *,ggml_tensor *>::operator[](ggml_tensor * const&)
mov r15, [rax]
jmp short loc_30B00
loc_30AFD:
xor r15d, r15d
loc_30B00:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_30B0F:
mov r12, rsp
mov rsi, [r12]
mov rdi, r14
call _ggml_dup_tensor
mov r15, rax
mov rdi, rbx
mov rsi, r12
call __ZNSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEixERS5_; std::map<ggml_tensor *,ggml_tensor *>::operator[](ggml_tensor * const&)
mov [rax], r15
mov r12, [r12]
mov eax, [r12+50h]
mov [r15+50h], eax
push 6
pop rax
loc_30B3F:
cmp rax, 0Ah
jz short loc_30B52
mov rcx, [r12+rax*8]
mov [r15+rax*8], rcx
inc rax
jmp short loc_30B3F
loc_30B52:
mov eax, [r12+94h]
mov [r15+94h], eax
movups xmm0, xmmword ptr [r12+54h]
movups xmm1, xmmword ptr [r12+64h]
movups xmm2, xmmword ptr [r12+74h]
movups xmm3, xmmword ptr [r12+84h]
movups xmmword ptr [r15+54h], xmm0
movups xmmword ptr [r15+64h], xmm1
movups xmmword ptr [r15+74h], xmm2
movups xmmword ptr [r15+84h], xmm3
mov esi, 100h
mov rdi, r15
add rdi, rsi
add rsi, r12
call _strcpy
mov rax, [r12+0F8h]
mov [r15+0F8h], rax
mov rax, [r12+8]
mov [r15+8], rax
mov rax, [r12+140h]
mov [r15+140h], rax
mov rax, [r12+0F0h]
mov [r15+0F0h], rax
mov rdx, [r12+0E8h]
mov rdi, rbx
mov rsi, r14
call _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_; map_tensor(std::map<ggml_tensor *,ggml_tensor *> &,ggml_context *,ggml_tensor *)
mov [r15+0E8h], rax
push 13h
pop r12
loc_30BFA:
cmp r12, 1Dh
jz loc_30B00
mov rax, [rsp+28h+var_28]
mov rdx, [rax+r12*8]
mov rdi, rbx
mov rsi, r14
call _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_; map_tensor(std::map<ggml_tensor *,ggml_tensor *> &,ggml_context *,ggml_tensor *)
mov [r15+r12*8], rax
inc r12
jmp short loc_30BFA
| long long map_tensor(long long a1, long long a2, unsigned int *a3)
{
long long v3; // r15
unsigned int *v5; // r12
long long i; // rax
__int128 v7; // xmm1
__int128 v8; // xmm2
__int128 v9; // xmm3
long long j; // r12
unsigned int *v11[5]; // [rsp+0h] [rbp-28h] BYREF
v11[0] = a3;
if ( !a3 )
return 0LL;
if ( std::_Rb_tree<ggml_tensor *,std::pair<ggml_tensor * const,ggml_tensor *>,std::_Select1st<std::pair<ggml_tensor * const,ggml_tensor *>>,std::less<ggml_tensor *>,std::allocator<std::pair<ggml_tensor * const,ggml_tensor *>>>::find(
a1,
v11) != a1 + 8 )
return *(_QWORD *)std::map<ggml_tensor *,ggml_tensor *>::operator[](a1, v11);
v3 = ggml_dup_tensor(a2, v11[0]);
*(_QWORD *)std::map<ggml_tensor *,ggml_tensor *>::operator[](a1, v11) = v3;
v5 = v11[0];
*(_DWORD *)(v3 + 80) = v11[0][20];
for ( i = 6LL; i != 10; ++i )
*(_QWORD *)(v3 + 8 * i) = *(_QWORD *)&v5[2 * i];
*(_DWORD *)(v3 + 148) = v5[37];
v7 = *(_OWORD *)(v5 + 25);
v8 = *(_OWORD *)(v5 + 29);
v9 = *(_OWORD *)(v5 + 33);
*(_OWORD *)(v3 + 84) = *(_OWORD *)(v5 + 21);
*(_OWORD *)(v3 + 100) = v7;
*(_OWORD *)(v3 + 116) = v8;
*(_OWORD *)(v3 + 132) = v9;
strcpy(v3 + 256, v5 + 64);
*(_QWORD *)(v3 + 248) = *((_QWORD *)v5 + 31);
*(_QWORD *)(v3 + 8) = *((_QWORD *)v5 + 1);
*(_QWORD *)(v3 + 320) = *((_QWORD *)v5 + 40);
*(_QWORD *)(v3 + 240) = *((_QWORD *)v5 + 30);
*(_QWORD *)(v3 + 232) = map_tensor(a1, a2, *((_QWORD *)v5 + 29));
for ( j = 19LL; j != 29; ++j )
*(_QWORD *)(v3 + 8 * j) = map_tensor(a1, a2, *(_QWORD *)&v11[0][2 * j]);
return v3;
}
| map_tensor:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDX
TEST RDX,RDX
JZ 0x00130afd
MOV R14,RSI
MOV RBX,RDI
MOV RSI,RSP
CALL 0x00120170
LEA RCX,[RBX + 0x8]
CMP RAX,RCX
JZ 0x00130b0f
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011dec0
MOV R15,qword ptr [RAX]
JMP 0x00130b00
LAB_00130afd:
XOR R15D,R15D
LAB_00130b00:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00130b0f:
MOV R12,RSP
MOV RSI,qword ptr [R12]
MOV RDI,R14
CALL 0x0011e7a0
MOV R15,RAX
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011dec0
MOV qword ptr [RAX],R15
MOV R12,qword ptr [R12]
MOV EAX,dword ptr [R12 + 0x50]
MOV dword ptr [R15 + 0x50],EAX
PUSH 0x6
POP RAX
LAB_00130b3f:
CMP RAX,0xa
JZ 0x00130b52
MOV RCX,qword ptr [R12 + RAX*0x8]
MOV qword ptr [R15 + RAX*0x8],RCX
INC RAX
JMP 0x00130b3f
LAB_00130b52:
MOV EAX,dword ptr [R12 + 0x94]
MOV dword ptr [R15 + 0x94],EAX
MOVUPS XMM0,xmmword ptr [R12 + 0x54]
MOVUPS XMM1,xmmword ptr [R12 + 0x64]
MOVUPS XMM2,xmmword ptr [R12 + 0x74]
MOVUPS XMM3,xmmword ptr [R12 + 0x84]
MOVUPS xmmword ptr [R15 + 0x54],XMM0
MOVUPS xmmword ptr [R15 + 0x64],XMM1
MOVUPS xmmword ptr [R15 + 0x74],XMM2
MOVUPS xmmword ptr [R15 + 0x84],XMM3
MOV ESI,0x100
MOV RDI,R15
ADD RDI,RSI
ADD RSI,R12
CALL 0x0011e620
MOV RAX,qword ptr [R12 + 0xf8]
MOV qword ptr [R15 + 0xf8],RAX
MOV RAX,qword ptr [R12 + 0x8]
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [R12 + 0x140]
MOV qword ptr [R15 + 0x140],RAX
MOV RAX,qword ptr [R12 + 0xf0]
MOV qword ptr [R15 + 0xf0],RAX
MOV RDX,qword ptr [R12 + 0xe8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00130ac5
MOV qword ptr [R15 + 0xe8],RAX
PUSH 0x13
POP R12
LAB_00130bfa:
CMP R12,0x1d
JZ 0x00130b00
MOV RAX,qword ptr [RSP]
MOV RDX,qword ptr [RAX + R12*0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00130ac5
MOV qword ptr [R15 + R12*0x8],RAX
INC R12
JMP 0x00130bfa
|
/* map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>,
std::allocator<std::pair<ggml_tensor* const, ggml_tensor*> > >&, ggml_context*, ggml_tensor*) */
long map_tensor(map *param_1,ggml_context *param_2,ggml_tensor *param_3)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
ggml_tensor *pgVar7;
map *pmVar8;
long *plVar9;
long lVar10;
long lVar11;
int8 uVar12;
ggml_tensor *local_28;
if (param_3 == (ggml_tensor *)0x0) {
lVar10 = 0;
}
else {
local_28 = param_3;
pmVar8 = (map *)std::
_Rb_tree<ggml_tensor*,std::pair<ggml_tensor*const,ggml_tensor*>,std::_Select1st<std::pair<ggml_tensor*const,ggml_tensor*>>,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::find((_Rb_tree<ggml_tensor*,std::pair<ggml_tensor*const,ggml_tensor*>,std::_Select1st<std::pair<ggml_tensor*const,ggml_tensor*>>,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
if (pmVar8 == param_1 + 8) {
lVar10 = ggml_dup_tensor(param_2,local_28);
plVar9 = (long *)std::
map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::operator[]((map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
pgVar7 = local_28;
*plVar9 = lVar10;
*(int4 *)(lVar10 + 0x50) = *(int4 *)(local_28 + 0x50);
for (lVar11 = 6; lVar11 != 10; lVar11 = lVar11 + 1) {
*(int8 *)(lVar10 + lVar11 * 8) = *(int8 *)(local_28 + lVar11 * 8);
}
*(int4 *)(lVar10 + 0x94) = *(int4 *)(local_28 + 0x94);
uVar12 = *(int8 *)(local_28 + 0x5c);
uVar1 = *(int8 *)(local_28 + 100);
uVar2 = *(int8 *)(local_28 + 0x6c);
uVar3 = *(int8 *)(local_28 + 0x74);
uVar4 = *(int8 *)(local_28 + 0x7c);
uVar5 = *(int8 *)(local_28 + 0x84);
uVar6 = *(int8 *)(local_28 + 0x8c);
*(int8 *)(lVar10 + 0x54) = *(int8 *)(local_28 + 0x54);
*(int8 *)(lVar10 + 0x5c) = uVar12;
*(int8 *)(lVar10 + 100) = uVar1;
*(int8 *)(lVar10 + 0x6c) = uVar2;
*(int8 *)(lVar10 + 0x74) = uVar3;
*(int8 *)(lVar10 + 0x7c) = uVar4;
*(int8 *)(lVar10 + 0x84) = uVar5;
*(int8 *)(lVar10 + 0x8c) = uVar6;
strcpy((char *)(lVar10 + 0x100),(char *)(local_28 + 0x100));
*(int8 *)(lVar10 + 0xf8) = *(int8 *)(pgVar7 + 0xf8);
*(int8 *)(lVar10 + 8) = *(int8 *)(pgVar7 + 8);
*(int8 *)(lVar10 + 0x140) = *(int8 *)(pgVar7 + 0x140);
*(int8 *)(lVar10 + 0xf0) = *(int8 *)(pgVar7 + 0xf0);
uVar12 = map_tensor(param_1,param_2,*(ggml_tensor **)(pgVar7 + 0xe8));
*(int8 *)(lVar10 + 0xe8) = uVar12;
for (lVar11 = 0x13; lVar11 != 0x1d; lVar11 = lVar11 + 1) {
uVar12 = map_tensor(param_1,param_2,*(ggml_tensor **)(local_28 + lVar11 * 8));
*(int8 *)(lVar10 + lVar11 * 8) = uVar12;
}
}
else {
plVar9 = (long *)std::
map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::operator[]((map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
lVar10 = *plVar9;
}
}
return lVar10;
}
| |
45,948 | map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>, std::allocator<std::pair<ggml_tensor* const, ggml_tensor*>>>&, ggml_context*, ggml_tensor*) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | static ggml_tensor * map_tensor(std::map<ggml_tensor *, ggml_tensor *> & tensor_map, ggml_context * ctx, ggml_tensor * tensor) {
if (!tensor) {
return nullptr;
}
if (tensor_map.find(tensor) != tensor_map.end()) {
return tensor_map[tensor];
}
ggml_tensor * new_tensor = ggml_dup_tensor(ctx, tensor);
tensor_map[tensor] = new_tensor;
new_tensor->op = tensor->op;
for (int i = 0; i < GGML_MAX_DIMS; i++) {
new_tensor->nb[i] = tensor->nb[i];
}
new_tensor->flags = tensor->flags;
memcpy(new_tensor->op_params, tensor->op_params, sizeof(tensor->op_params));
strcpy(new_tensor->name, tensor->name);
new_tensor->data = tensor->data;
new_tensor->buffer = tensor->buffer;
new_tensor->extra = tensor->extra;
new_tensor->view_offs = tensor->view_offs;
new_tensor->view_src = map_tensor(tensor_map, ctx, tensor->view_src);
for (int i = 0; i < GGML_MAX_SRC; i++) {
new_tensor->src[i] = map_tensor(tensor_map, ctx, tensor->src[i]);
}
return new_tensor;
} | O3 | cpp | map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>, std::allocator<std::pair<ggml_tensor* const, ggml_tensor*>>>&, ggml_context*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testq %rdx, %rdx
je 0x2b53e
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x2b430
leaq 0x8(%rbx), %rsi
movq %rsi, %rcx
xorl %edi, %edi
cmpq %rdx, 0x20(%rax)
setb %dil
cmovaeq %rax, %rcx
movq 0x10(%rax,%rdi,8), %rax
testq %rax, %rax
jne 0x2b409
cmpq %rsi, %rcx
je 0x2b430
cmpq %rdx, 0x20(%rcx)
jbe 0x2b543
movq %r14, %rdi
movq %rdx, %rsi
callq 0x17040
movq %rax, %r15
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x16a40
movq %r15, (%rax)
movq (%r12), %r12
movl 0x50(%r12), %eax
movl %eax, 0x50(%r15)
movl $0x6, %eax
movq (%r12,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
incq %rax
cmpq $0xa, %rax
jne 0x2b461
movl 0x94(%r12), %eax
movl %eax, 0x94(%r15)
movups 0x54(%r12), %xmm0
movups 0x64(%r12), %xmm1
movups 0x74(%r12), %xmm2
movups 0x84(%r12), %xmm3
movups %xmm0, 0x54(%r15)
movups %xmm1, 0x64(%r15)
movups %xmm2, 0x74(%r15)
movups %xmm3, 0x84(%r15)
movl $0x100, %esi # imm = 0x100
movq %r15, %rdi
addq %rsi, %rdi
addq %r12, %rsi
callq 0x16f60
movq 0xf8(%r12), %rax
movq %rax, 0xf8(%r15)
movq 0x8(%r12), %rax
movq %rax, 0x8(%r15)
movq 0x140(%r12), %rax
movq %rax, 0x140(%r15)
movq 0xf0(%r12), %rax
movq %rax, 0xf0(%r15)
movq 0xe8(%r12), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b3de
movq %rax, 0xe8(%r15)
movl $0x13, %r12d
movq (%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b3de
movq %rax, (%r15,%r12,8)
incq %r12
cmpq $0x1d, %r12
jne 0x2b51c
jmp 0x2b551
xorl %r15d, %r15d
jmp 0x2b551
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x16a40
movq (%rax), %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_:
push r15
push r14
push r12
push rbx
push rax
mov [rsp+28h+var_28], rdx
test rdx, rdx
jz loc_2B53E
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+10h]
test rax, rax
jz short loc_2B430
lea rsi, [rbx+8]
mov rcx, rsi
loc_2B409:
xor edi, edi
cmp [rax+20h], rdx
setb dil
cmovnb rcx, rax
mov rax, [rax+rdi*8+10h]
test rax, rax
jnz short loc_2B409
cmp rcx, rsi
jz short loc_2B430
cmp [rcx+20h], rdx
jbe loc_2B543
loc_2B430:
mov rdi, r14
mov rsi, rdx
call _ggml_dup_tensor
mov r15, rax
mov r12, rsp
mov rdi, rbx
mov rsi, r12
call __ZNSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEixERS5_; std::map<ggml_tensor *,ggml_tensor *>::operator[](ggml_tensor * const&)
mov [rax], r15
mov r12, [r12]
mov eax, [r12+50h]
mov [r15+50h], eax
mov eax, 6
loc_2B461:
mov rcx, [r12+rax*8]
mov [r15+rax*8], rcx
inc rax
cmp rax, 0Ah
jnz short loc_2B461
mov eax, [r12+94h]
mov [r15+94h], eax
movups xmm0, xmmword ptr [r12+54h]
movups xmm1, xmmword ptr [r12+64h]
movups xmm2, xmmword ptr [r12+74h]
movups xmm3, xmmword ptr [r12+84h]
movups xmmword ptr [r15+54h], xmm0
movups xmmword ptr [r15+64h], xmm1
movups xmmword ptr [r15+74h], xmm2
movups xmmword ptr [r15+84h], xmm3
mov esi, 100h
mov rdi, r15
add rdi, rsi
add rsi, r12
call _strcpy
mov rax, [r12+0F8h]
mov [r15+0F8h], rax
mov rax, [r12+8]
mov [r15+8], rax
mov rax, [r12+140h]
mov [r15+140h], rax
mov rax, [r12+0F0h]
mov [r15+0F0h], rax
mov rdx, [r12+0E8h]
mov rdi, rbx
mov rsi, r14
call _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_; map_tensor(std::map<ggml_tensor *,ggml_tensor *> &,ggml_context *,ggml_tensor *)
mov [r15+0E8h], rax
mov r12d, 13h
loc_2B51C:
mov rax, [rsp+28h+var_28]
mov rdx, [rax+r12*8]
mov rdi, rbx
mov rsi, r14
call _ZL10map_tensorRSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEP12ggml_contextS1_; map_tensor(std::map<ggml_tensor *,ggml_tensor *> &,ggml_context *,ggml_tensor *)
mov [r15+r12*8], rax
inc r12
cmp r12, 1Dh
jnz short loc_2B51C
jmp short loc_2B551
loc_2B53E:
xor r15d, r15d
jmp short loc_2B551
loc_2B543:
mov rsi, rsp
mov rdi, rbx
call __ZNSt3mapIP11ggml_tensorS1_St4lessIS1_ESaISt4pairIKS1_S1_EEEixERS5_; std::map<ggml_tensor *,ggml_tensor *>::operator[](ggml_tensor * const&)
mov r15, [rax]
loc_2B551:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long map_tensor(long long a1, long long a2, unsigned long long a3, double a4)
{
long long v4; // rax
long long v5; // rcx
long long v6; // r15
long long v7; // r12
long long i; // rax
__int128 v9; // xmm1
__int128 v10; // xmm2
__int128 v11; // xmm3
long long j; // r12
_QWORD v14[5]; // [rsp+0h] [rbp-28h] BYREF
v14[0] = a3;
if ( !a3 )
return 0LL;
v4 = *(_QWORD *)(a1 + 16);
if ( !v4 )
goto LABEL_9;
v5 = a1 + 8;
do
{
if ( *(_QWORD *)(v4 + 32) >= a3 )
v5 = v4;
v4 = *(_QWORD *)(v4 + 8LL * (*(_QWORD *)(v4 + 32) < a3) + 16);
}
while ( v4 );
if ( v5 != a1 + 8 && *(_QWORD *)(v5 + 32) <= a3 )
return *(_QWORD *)std::map<ggml_tensor *,ggml_tensor *>::operator[](a1, v14);
LABEL_9:
v6 = ggml_dup_tensor(a2, a3, a4);
*(_QWORD *)std::map<ggml_tensor *,ggml_tensor *>::operator[](a1, v14) = v6;
v7 = v14[0];
*(_DWORD *)(v6 + 80) = *(_DWORD *)(v14[0] + 80LL);
for ( i = 6LL; i != 10; ++i )
*(_QWORD *)(v6 + 8 * i) = *(_QWORD *)(v7 + 8 * i);
*(_DWORD *)(v6 + 148) = *(_DWORD *)(v7 + 148);
v9 = *(_OWORD *)(v7 + 100);
v10 = *(_OWORD *)(v7 + 116);
v11 = *(_OWORD *)(v7 + 132);
*(_OWORD *)(v6 + 84) = *(_OWORD *)(v7 + 84);
*(_OWORD *)(v6 + 100) = v9;
*(_OWORD *)(v6 + 116) = v10;
*(_OWORD *)(v6 + 132) = v11;
strcpy(v6 + 256, v7 + 256);
*(_QWORD *)(v6 + 248) = *(_QWORD *)(v7 + 248);
*(_QWORD *)(v6 + 8) = *(_QWORD *)(v7 + 8);
*(_QWORD *)(v6 + 320) = *(_QWORD *)(v7 + 320);
*(_QWORD *)(v6 + 240) = *(_QWORD *)(v7 + 240);
*(_QWORD *)(v6 + 232) = map_tensor(a1, a2, *(_QWORD *)(v7 + 232));
for ( j = 19LL; j != 29; ++j )
*(_QWORD *)(v6 + 8 * j) = map_tensor(a1, a2, *(_QWORD *)(v14[0] + 8 * j));
return v6;
}
| map_tensor:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDX
TEST RDX,RDX
JZ 0x0012b53e
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x0012b430
LEA RSI,[RBX + 0x8]
MOV RCX,RSI
LAB_0012b409:
XOR EDI,EDI
CMP qword ptr [RAX + 0x20],RDX
SETC DIL
CMOVNC RCX,RAX
MOV RAX,qword ptr [RAX + RDI*0x8 + 0x10]
TEST RAX,RAX
JNZ 0x0012b409
CMP RCX,RSI
JZ 0x0012b430
CMP qword ptr [RCX + 0x20],RDX
JBE 0x0012b543
LAB_0012b430:
MOV RDI,R14
MOV RSI,RDX
CALL 0x00117040
MOV R15,RAX
MOV R12,RSP
MOV RDI,RBX
MOV RSI,R12
CALL 0x00116a40
MOV qword ptr [RAX],R15
MOV R12,qword ptr [R12]
MOV EAX,dword ptr [R12 + 0x50]
MOV dword ptr [R15 + 0x50],EAX
MOV EAX,0x6
LAB_0012b461:
MOV RCX,qword ptr [R12 + RAX*0x8]
MOV qword ptr [R15 + RAX*0x8],RCX
INC RAX
CMP RAX,0xa
JNZ 0x0012b461
MOV EAX,dword ptr [R12 + 0x94]
MOV dword ptr [R15 + 0x94],EAX
MOVUPS XMM0,xmmword ptr [R12 + 0x54]
MOVUPS XMM1,xmmword ptr [R12 + 0x64]
MOVUPS XMM2,xmmword ptr [R12 + 0x74]
MOVUPS XMM3,xmmword ptr [R12 + 0x84]
MOVUPS xmmword ptr [R15 + 0x54],XMM0
MOVUPS xmmword ptr [R15 + 0x64],XMM1
MOVUPS xmmword ptr [R15 + 0x74],XMM2
MOVUPS xmmword ptr [R15 + 0x84],XMM3
MOV ESI,0x100
MOV RDI,R15
ADD RDI,RSI
ADD RSI,R12
CALL 0x00116f60
MOV RAX,qword ptr [R12 + 0xf8]
MOV qword ptr [R15 + 0xf8],RAX
MOV RAX,qword ptr [R12 + 0x8]
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [R12 + 0x140]
MOV qword ptr [R15 + 0x140],RAX
MOV RAX,qword ptr [R12 + 0xf0]
MOV qword ptr [R15 + 0xf0],RAX
MOV RDX,qword ptr [R12 + 0xe8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012b3de
MOV qword ptr [R15 + 0xe8],RAX
MOV R12D,0x13
LAB_0012b51c:
MOV RAX,qword ptr [RSP]
MOV RDX,qword ptr [RAX + R12*0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012b3de
MOV qword ptr [R15 + R12*0x8],RAX
INC R12
CMP R12,0x1d
JNZ 0x0012b51c
JMP 0x0012b551
LAB_0012b53e:
XOR R15D,R15D
JMP 0x0012b551
LAB_0012b543:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00116a40
MOV R15,qword ptr [RAX]
LAB_0012b551:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* map_tensor(std::map<ggml_tensor*, ggml_tensor*, std::less<ggml_tensor*>,
std::allocator<std::pair<ggml_tensor* const, ggml_tensor*> > >&, ggml_context*, ggml_tensor*) */
long map_tensor(map *param_1,ggml_context *param_2,ggml_tensor *param_3)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
ggml_tensor *pgVar7;
map *pmVar8;
long lVar9;
long *plVar10;
long lVar11;
int8 uVar12;
map *pmVar13;
ggml_tensor *local_28;
if (param_3 == (ggml_tensor *)0x0) {
lVar9 = 0;
}
else {
pmVar8 = *(map **)(param_1 + 0x10);
local_28 = param_3;
if (pmVar8 != (map *)0x0) {
pmVar13 = param_1 + 8;
do {
if (*(ggml_tensor **)(pmVar8 + 0x20) >= param_3) {
pmVar13 = pmVar8;
}
pmVar8 = *(map **)(pmVar8 + (ulong)(*(ggml_tensor **)(pmVar8 + 0x20) < param_3) * 8 + 0x10);
} while (pmVar8 != (map *)0x0);
if ((pmVar13 != param_1 + 8) && (*(ggml_tensor **)(pmVar13 + 0x20) <= param_3)) {
plVar10 = (long *)std::
map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::operator[]((map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
return *plVar10;
}
}
lVar9 = ggml_dup_tensor(param_2,param_3);
plVar10 = (long *)std::
map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
::operator[]((map<ggml_tensor*,ggml_tensor*,std::less<ggml_tensor*>,std::allocator<std::pair<ggml_tensor*const,ggml_tensor*>>>
*)param_1,&local_28);
pgVar7 = local_28;
*plVar10 = lVar9;
*(int4 *)(lVar9 + 0x50) = *(int4 *)(local_28 + 0x50);
lVar11 = 6;
do {
*(int8 *)(lVar9 + lVar11 * 8) = *(int8 *)(local_28 + lVar11 * 8);
lVar11 = lVar11 + 1;
} while (lVar11 != 10);
*(int4 *)(lVar9 + 0x94) = *(int4 *)(local_28 + 0x94);
uVar12 = *(int8 *)(local_28 + 0x5c);
uVar1 = *(int8 *)(local_28 + 100);
uVar2 = *(int8 *)(local_28 + 0x6c);
uVar3 = *(int8 *)(local_28 + 0x74);
uVar4 = *(int8 *)(local_28 + 0x7c);
uVar5 = *(int8 *)(local_28 + 0x84);
uVar6 = *(int8 *)(local_28 + 0x8c);
*(int8 *)(lVar9 + 0x54) = *(int8 *)(local_28 + 0x54);
*(int8 *)(lVar9 + 0x5c) = uVar12;
*(int8 *)(lVar9 + 100) = uVar1;
*(int8 *)(lVar9 + 0x6c) = uVar2;
*(int8 *)(lVar9 + 0x74) = uVar3;
*(int8 *)(lVar9 + 0x7c) = uVar4;
*(int8 *)(lVar9 + 0x84) = uVar5;
*(int8 *)(lVar9 + 0x8c) = uVar6;
strcpy((char *)(lVar9 + 0x100),(char *)(local_28 + 0x100));
*(int8 *)(lVar9 + 0xf8) = *(int8 *)(pgVar7 + 0xf8);
*(int8 *)(lVar9 + 8) = *(int8 *)(pgVar7 + 8);
*(int8 *)(lVar9 + 0x140) = *(int8 *)(pgVar7 + 0x140);
*(int8 *)(lVar9 + 0xf0) = *(int8 *)(pgVar7 + 0xf0);
uVar12 = map_tensor(param_1,param_2,*(ggml_tensor **)(pgVar7 + 0xe8));
*(int8 *)(lVar9 + 0xe8) = uVar12;
lVar11 = 0x13;
do {
uVar12 = map_tensor(param_1,param_2,*(ggml_tensor **)(local_28 + lVar11 * 8));
*(int8 *)(lVar9 + lVar11 * 8) = uVar12;
lVar11 = lVar11 + 1;
} while (lVar11 != 0x1d);
}
return lVar9;
}
| |
45,949 | mi_keylength | eloqsql/storage/myisam/mi_search.c | uint _mi_keylength(MI_KEYDEF *keyinfo, register uchar *key)
{
reg1 HA_KEYSEG *keyseg;
uchar *start;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
return (keyinfo->keylength);
start=key;
for (keyseg=keyinfo->seg ; keyseg->type ; keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
if (!*key++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,key);
key+=length;
}
else
key+= keyseg->length;
}
return((uint) (key-start)+keyseg->length);
} | O0 | c | mi_keylength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0xc4a2c
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xc4b2e
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0xc4b16
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc4a79
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpb $0x0, (%rax)
jne 0xc4a77
jmp 0xc4b05
jmp 0xc4a79
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0xc4aed
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xc4aae
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0xc4adb
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xc4b03
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xc4b05
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
jmp 0xc4a40
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x20(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_keylength:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Ah]
and eax, 28h
cmp eax, 0
jnz short loc_C4A2C
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+12h]
mov [rbp+var_4], eax
jmp loc_C4B2E
loc_C4A2C:
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_20], rax
loc_C4A40:
mov rax, [rbp+var_20]
cmp byte ptr [rax+18h], 0
jz loc_C4B16
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_C4A79
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp byte ptr [rax], 0
jnz short loc_C4A77
jmp loc_C4B05
loc_C4A77:
jmp short $+2
loc_C4A79:
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz short loc_C4AED
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_C4AAE
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
jmp short loc_C4ADB
loc_C4AAE:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
add rax, 3
mov [rbp+var_18], rax
loc_C4ADB:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_C4B03
loc_C4AED:
mov rax, [rbp+var_20]
movzx ecx, word ptr [rax+14h]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_C4B03:
jmp short $+2
loc_C4B05:
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_20], rax
jmp loc_C4A40
loc_C4B16:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_20]
movzx ecx, word ptr [rcx+14h]
add eax, ecx
mov [rbp+var_4], eax
loc_C4B2E:
mov eax, [rbp+var_4]
pop rbp
retn
| long long mi_keylength(long long a1, unsigned __int8 *a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 *v3; // rax
int v5; // [rsp+0h] [rbp-2Ch]
long long i; // [rsp+Ch] [rbp-20h]
unsigned __int8 *v7; // [rsp+14h] [rbp-18h]
unsigned __int8 *v8; // [rsp+14h] [rbp-18h]
v7 = a2;
if ( (*(_WORD *)(a1 + 10) & 0x28) != 0 )
{
for ( i = *(_QWORD *)(a1 + 40); *(_BYTE *)(i + 24); i += 32LL )
{
if ( (*(_WORD *)(i + 18) & 0x10) != 0 )
{
v2 = v7++;
if ( !*v2 )
continue;
}
if ( (*(_WORD *)(i + 18) & 0x29) != 0 )
{
if ( *v7 == 255 )
{
v5 = _byteswap_ushort(*(_WORD *)(v7 + 1));
v8 = v7 + 3;
}
else
{
v3 = v7;
v8 = v7 + 1;
v5 = *v3;
}
v7 = &v8[v5];
}
else
{
v7 += *(unsigned __int16 *)(i + 20);
}
}
return (unsigned int)(*(unsigned __int16 *)(i + 20) + (_DWORD)v7 - (_DWORD)a2);
}
else
{
return *(unsigned __int16 *)(a1 + 18);
}
}
| _mi_keylength:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x001c4a2c
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001c4b2e
LAB_001c4a2c:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_001c4a40:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x001c4b16
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c4a79
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP byte ptr [RAX],0x0
JNZ 0x001c4a77
JMP 0x001c4b05
LAB_001c4a77:
JMP 0x001c4a79
LAB_001c4a79:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x001c4aed
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001c4aae
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001c4adb
LAB_001c4aae:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
MOV qword ptr [RBP + -0x18],RAX
LAB_001c4adb:
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001c4b03
LAB_001c4aed:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001c4b03:
JMP 0x001c4b05
LAB_001c4b05:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x20
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001c4a40
LAB_001c4b16:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RCX + 0x14]
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001c4b2e:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint _mi_keylength(long param_1,byte *param_2)
{
byte bVar1;
byte *pbVar2;
uint local_34;
long local_28;
byte *local_20;
uint local_c;
if ((*(ushort *)(param_1 + 10) & 0x28) == 0) {
local_c = (uint)*(ushort *)(param_1 + 0x12);
}
else {
local_20 = param_2;
for (local_28 = *(long *)(param_1 + 0x28); *(char *)(local_28 + 0x18) != '\0';
local_28 = local_28 + 0x20) {
if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) ||
(pbVar2 = local_20 + 1, bVar1 = *local_20, local_20 = pbVar2, bVar1 != 0)) {
if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) {
local_20 = local_20 + (int)(uint)*(ushort *)(local_28 + 0x14);
}
else {
if (*local_20 == 0xff) {
local_34 = (uint)CONCAT11(local_20[1],local_20[2]);
local_20 = local_20 + 3;
}
else {
local_34 = (uint)*local_20;
local_20 = local_20 + 1;
}
local_20 = local_20 + local_34;
}
}
}
local_c = ((int)local_20 - (int)param_2) + (uint)*(ushort *)(local_28 + 0x14);
}
return local_c;
}
| |
45,950 | ggml_threadpool_resume | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c | void ggml_threadpool_resume(struct ggml_threadpool * threadpool) {
#ifndef GGML_USE_OPENMP
ggml_mutex_lock(&threadpool->mutex);
if (threadpool->pause) {
ggml_threadpool_resume_locked(threadpool);
}
ggml_mutex_unlock(&threadpool->mutex);
#else
UNUSED(threadpool);
#endif
} | O1 | c | ggml_threadpool_resume:
pushq %rbx
movq %rdi, %rbx
callq 0xacd0
movb 0x105(%rbx), %al
testb $0x1, %al
je 0xd356
xorl %eax, %eax
xchgb %al, 0x105(%rbx)
leaq 0x28(%rbx), %rdi
callq 0xa270
movq %rbx, %rdi
popq %rbx
jmp 0xa620
| ggml_threadpool_resume:
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov al, [rbx+105h]
test al, 1
jz short loc_D356
xor eax, eax
xchg al, [rbx+105h]
lea rdi, [rbx+28h]
call _pthread_cond_broadcast
loc_D356:
mov rdi, rbx
pop rbx
jmp _pthread_mutex_unlock
| long long ggml_threadpool_resume(long long a1)
{
pthread_mutex_lock(a1);
if ( (*(_BYTE *)(a1 + 261) & 1) != 0 )
{
*(_BYTE *)(a1 + 261) = 0;
pthread_cond_broadcast(a1 + 40);
}
return pthread_mutex_unlock(a1);
}
| ggml_threadpool_resume:
PUSH RBX
MOV RBX,RDI
CALL 0x0010acd0
MOV AL,byte ptr [RBX + 0x105]
TEST AL,0x1
JZ 0x0010d356
XOR EAX,EAX
XCHG byte ptr [RBX + 0x105],AL
LEA RDI,[RBX + 0x28]
CALL 0x0010a270
LAB_0010d356:
MOV RDI,RBX
POP RBX
JMP 0x0010a620
|
void ggml_threadpool_resume(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
if ((*(byte *)((long)param_1 + 0x105) & 1) != 0) {
LOCK();
*(int1 *)((long)param_1 + 0x105) = 0;
UNLOCK();
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1));
}
pthread_mutex_unlock(param_1);
return;
}
| |
45,951 | 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;
} | O3 | c | my_strxfrm_pad_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r13d
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, -0x30(%rbp)
movq %rdi, %r12
movl 0x10(%rbp), %ecx
testl %r8d, %r8d
sete %al
cmpq %r15, %rdx
setae %sil
testb $0x40, %r13b
sete %dl
orb %al, %dl
orb %sil, %dl
jne 0x36e5e
movl %r8d, %ebx
movl %r15d, %eax
subl %r14d, %eax
imull 0x98(%r12), %ebx
cmpl %eax, %ebx
cmovael %eax, %ebx
movzbl 0xb0(%r12), %ecx
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0x78(%rax)
movl 0x10(%rbp), %ecx
addq %rbx, %r14
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x387b6
testb %r13b, %r13b
jns 0x36e9d
cmpq %r15, %r14
jae 0x36e9d
movq %r15, %rdx
subq %r14, %rdx
movzbl 0xb0(%r12), %ecx
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *0x78(%rax)
movq %r15, %r14
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strxfrm_pad_desc_and_reverse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13d, r9d
mov r15, rcx
mov r14, rdx
mov [rbp+var_30], rsi
mov r12, rdi
mov ecx, [rbp+arg_0]
test r8d, r8d
setz al
cmp rdx, r15
setnb sil
test r13b, 40h
setz dl
or dl, al
or dl, sil
jnz short loc_36E5E
mov ebx, r8d
mov eax, r15d
sub eax, r14d
imul ebx, [r12+98h]
cmp ebx, eax
cmovnb ebx, eax
movzx ecx, byte ptr [r12+0B0h]
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+78h]
mov ecx, [rbp+arg_0]
add r14, rbx
loc_36E5E:
mov rbx, [rbp+var_30]
mov rdi, rbx
mov rsi, r14
mov edx, r13d
call my_strxfrm_desc_and_reverse
test r13b, r13b
jns short loc_36E9D
cmp r14, r15
jnb short loc_36E9D
mov rdx, r15
sub rdx, r14
movzx ecx, byte ptr [r12+0B0h]
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r14
call qword ptr [rax+78h]
mov r14, r15
loc_36E9D:
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
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 long long v9; // r14
long long v10; // rcx
long long v11; // rbx
v9 = a3;
v10 = a7;
if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 )
{
v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5);
if ( (unsigned int)v11 >= (int)a4 - (int)a3 )
v11 = (unsigned int)(a4 - a3);
(*(void ( **)(long long, unsigned long long, long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))(
a1,
a3,
v11,
*(unsigned __int8 *)(a1 + 176));
v10 = a7;
v9 += v11;
}
my_strxfrm_desc_and_reverse(a2, v9, a6, v10);
if ( (a6 & 0x80u) != 0 && v9 < a4 )
{
(*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))(
a1,
v9,
a4 - v9,
*(unsigned __int8 *)(a1 + 176));
v9 = a4;
}
return v9 - a2;
}
| my_strxfrm_pad_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13D,R9D
MOV R15,RCX
MOV R14,RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R12,RDI
MOV ECX,dword ptr [RBP + 0x10]
TEST R8D,R8D
SETZ AL
CMP RDX,R15
SETNC SIL
TEST R13B,0x40
SETZ DL
OR DL,AL
OR DL,SIL
JNZ 0x00136e5e
MOV EBX,R8D
MOV EAX,R15D
SUB EAX,R14D
IMUL EBX,dword ptr [R12 + 0x98]
CMP EBX,EAX
CMOVNC EBX,EAX
MOVZX ECX,byte ptr [R12 + 0xb0]
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + 0x10]
ADD R14,RBX
LAB_00136e5e:
MOV RBX,qword ptr [RBP + -0x30]
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R13D
CALL 0x001387b6
TEST R13B,R13B
JNS 0x00136e9d
CMP R14,R15
JNC 0x00136e9d
MOV RDX,R15
SUB RDX,R14
MOVZX ECX,byte ptr [R12 + 0xb0]
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R14
CALL qword ptr [RAX + 0x78]
MOV R14,R15
LAB_00136e9d:
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
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)
{
uint uVar1;
uint uVar2;
if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) {
uVar1 = (int)param_4 - (int)param_3;
uVar2 = param_5 * *(int *)(param_1 + 0x98);
if (uVar1 <= uVar2) {
uVar2 = uVar1;
}
(**(code **)(*(long *)(param_1 + 0xb8) + 0x78))
(param_1,param_3,(ulong)uVar2,*(int1 *)(param_1 + 0xb0));
param_3 = param_3 + uVar2;
}
my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7);
if (((char)param_6 < '\0') && (param_3 < param_4)) {
(**(code **)(*(long *)(param_1 + 0xb8) + 0x78))
(param_1,param_3,param_4 - param_3,*(int1 *)(param_1 + 0xb0));
param_3 = param_4;
}
return param_3 - param_2;
}
| |
45,952 | get_bits | bluesky950520[P]quickjs/libbf.c | static inline limb_t get_bits(const limb_t *tab, limb_t len, slimb_t pos)
{
limb_t i, a0, a1;
int p;
i = pos >> LIMB_LOG2_BITS;
p = pos & (LIMB_BITS - 1);
if (i < len)
a0 = tab[i];
else
a0 = 0;
if (p == 0) {
return a0;
} else {
i++;
if (i < len)
a1 = tab[i];
else
a1 = 0;
return (a0 >> p) | (a1 << (LIMB_BITS - p));
}
} | O2 | c | get_bits:
movq %rdx, %rcx
movq %rdx, %r8
sarq $0x6, %r8
andl $0x3f, %edx
cmpq %rsi, %r8
jae 0x7622d
movq (%rdi,%r8,8), %rax
jmp 0x7622f
xorl %eax, %eax
testl %edx, %edx
je 0x76252
leaq 0x1(%r8), %r9
cmpq %rsi, %r9
jae 0x76243
movq 0x8(%rdi,%r8,8), %rsi
jmp 0x76245
xorl %esi, %esi
shrq %cl, %rax
negb %dl
movl %edx, %ecx
shlq %cl, %rsi
orq %rsi, %rax
retq
| get_bits:
mov rcx, rdx
mov r8, rdx
sar r8, 6
and edx, 3Fh
cmp r8, rsi
jnb short loc_7622D
mov rax, [rdi+r8*8]
jmp short loc_7622F
loc_7622D:
xor eax, eax
loc_7622F:
test edx, edx
jz short locret_76252
lea r9, [r8+1]
cmp r9, rsi
jnb short loc_76243
mov rsi, [rdi+r8*8+8]
jmp short loc_76245
loc_76243:
xor esi, esi
loc_76245:
shr rax, cl
neg dl
mov ecx, edx
shl rsi, cl
or rax, rsi
locret_76252:
retn
| unsigned long long get_bits(long long a1, unsigned long long a2, long long a3)
{
char v3; // cl
unsigned long long v4; // r8
int v5; // edx
unsigned long long result; // rax
long long v7; // rsi
v3 = a3;
v4 = a3 >> 6;
v5 = a3 & 0x3F;
if ( v4 >= a2 )
result = 0LL;
else
result = *(_QWORD *)(a1 + 8 * v4);
if ( v5 )
{
if ( v4 + 1 >= a2 )
v7 = 0LL;
else
v7 = *(_QWORD *)(a1 + 8 * v4 + 8);
return (v7 << -(char)v5) | (result >> v3);
}
return result;
}
| get_bits:
MOV RCX,RDX
MOV R8,RDX
SAR R8,0x6
AND EDX,0x3f
CMP R8,RSI
JNC 0x0017622d
MOV RAX,qword ptr [RDI + R8*0x8]
JMP 0x0017622f
LAB_0017622d:
XOR EAX,EAX
LAB_0017622f:
TEST EDX,EDX
JZ 0x00176252
LEA R9,[R8 + 0x1]
CMP R9,RSI
JNC 0x00176243
MOV RSI,qword ptr [RDI + R8*0x8 + 0x8]
JMP 0x00176245
LAB_00176243:
XOR ESI,ESI
LAB_00176245:
SHR RAX,CL
NEG DL
MOV ECX,EDX
SHL RSI,CL
OR RAX,RSI
LAB_00176252:
RET
|
ulong get_bits(long param_1,ulong param_2,ulong param_3)
{
ulong uVar1;
long lVar2;
ulong uVar3;
uVar3 = (long)param_3 >> 6;
if (uVar3 < param_2) {
uVar1 = *(ulong *)(param_1 + uVar3 * 8);
}
else {
uVar1 = 0;
}
if ((param_3 & 0x3f) != 0) {
if (uVar3 + 1 < param_2) {
lVar2 = *(long *)(param_1 + 8 + uVar3 * 8);
}
else {
lVar2 = 0;
}
uVar1 = uVar1 >> ((byte)param_3 & 0x3f) | lVar2 << (-((byte)param_3 & 0x3f) & 0x3f);
}
return uVar1;
}
| |
45,953 | google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
if ((8000u <= tag)) {
ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
} | O0 | cpp | google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*):
subq $0x78, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xd41f0
xorb $-0x1, %al
testb $0x1, %al
jne 0xb1627
jmp 0xb183a
movq 0x48(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
xorl %edx, %edx
callq 0xd4220
movq %rax, 0x48(%rsp)
movl 0x3c(%rsp), %eax
shrl $0x3, %eax
subl $0x3e7, %eax # imm = 0x3E7
jne 0xb16ec
jmp 0xb1651
movl 0x3c(%rsp), %eax
movzbl %al, %eax
cmpl $0x3a, %eax
jne 0xb16e5
movq 0x48(%rsp), %rax
addq $-0x2, %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0xd6c20
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0x1b4330
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb16b9
jmp 0xb16be
jmp 0xb1846
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xd4310
testb $0x1, %al
jne 0xb16d3
jmp 0xb16e3
jmp 0xb16d5
movq 0x48(%rsp), %rdi
callq 0xd6c40
testb $0x1, %al
jne 0xb166f
jmp 0xb16e7
jmp 0xb16ee
jmp 0xb160d
jmp 0xb16ee
cmpl $0x0, 0x3c(%rsp)
je 0xb1701
movl 0x3c(%rsp), %eax
andl $0x7, %eax
cmpl $0x4, %eax
jne 0xb172a
cmpq $0x0, 0x48(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb1712
jmp 0xb1717
jmp 0xb1846
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0xd4350
jmp 0xb183c
movl $0x1f40, %eax # imm = 0x1F40
cmpl 0x3c(%rsp), %eax
ja 0xb17a0
movq 0x30(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movl 0x3c(%rsp), %eax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x800e0
movq 0x30(%rsp), %r8
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
addq $0x8, %r8
movq 0x40(%rsp), %r9
callq 0x1044d0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb1796
jmp 0xb179b
jmp 0xb1846
jmp 0xb160d
movq 0x30(%rsp), %rax
movl 0x3c(%rsp), %ecx
movq %rcx, (%rsp)
addq $0x8, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xb17f6
movq 0x8(%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0x60(%rsp)
jmp 0xb1805
movq 0x8(%rsp), %rdi
callq 0xdf250
movq %rax, 0x60(%rsp)
movq (%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
callq 0x163b20
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb1833
jmp 0xb1835
jmp 0xb1846
jmp 0xb160d
jmp 0xb183c
movq 0x48(%rsp), %rax
addq $0x78, %rsp
retq
movq $0x0, 0x48(%rsp)
jmp 0xb183c
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf21ExtensionRangeOptions14_InternalParseEPKcPNS0_8internal12ParseContextE:
sub rsp, 78h
mov qword ptr [rsp+78h+var_28], rdi; int
mov [rsp+78h+var_30], rsi
mov [rsp+78h+var_38], rdx; int
mov rax, qword ptr [rsp+78h+var_28]
mov [rsp+78h+var_48], rax; int
loc_B160D:
mov rdi, [rsp+78h+var_38]; this
lea rsi, [rsp+78h+var_30]; char **
call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**)
xor al, 0FFh
test al, 1
jnz short loc_B1627
jmp loc_B183A
loc_B1627:
mov rdi, [rsp+78h+var_30]; this
lea rsi, [rsp+78h+var_3C]; char *
xor edx, edx; unsigned int *
call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint)
mov [rsp+78h+var_30], rax; int
mov eax, dword ptr [rsp+78h+var_3C]
shr eax, 3
sub eax, 3E7h
jnz loc_B16EC
jmp short $+2
loc_B1651:
mov eax, dword ptr [rsp+78h+var_3C]
movzx eax, al
cmp eax, 3Ah ; ':'
jnz loc_B16E5
mov rax, [rsp+78h+var_30]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rsp+78h+var_30], rax
loc_B166F:
mov rdi, [rsp+78h+var_48]; this
mov rax, [rsp+78h+var_30]
add rax, 2
mov [rsp+78h+var_30], rax
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_50], rax
call _ZN6google8protobuf21ExtensionRangeOptions34_internal_add_uninterpreted_optionEv; google::protobuf::ExtensionRangeOptions::_internal_add_uninterpreted_option(void)
mov rdi, [rsp+78h+var_50]; this
mov rsi, rax; google::protobuf::MessageLite *
mov rdx, [rsp+78h+var_30]; char *
call _ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc; google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite *,char const*)
mov [rsp+78h+var_30], rax
cmp [rsp+78h+var_30], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B16B9
jmp short loc_B16BE
loc_B16B9:
jmp loc_B1846
loc_B16BE:
mov rdi, [rsp+78h+var_38]; this
mov rsi, [rsp+78h+var_30]; char *
call _ZN6google8protobuf8internal18EpsCopyInputStream13DataAvailableEPKc; google::protobuf::internal::EpsCopyInputStream::DataAvailable(char const*)
test al, 1
jnz short loc_B16D3
jmp short loc_B16E3
loc_B16D3:
jmp short $+2
loc_B16D5:
mov rdi, [rsp+78h+var_30]
call _ZN6google8protobuf8internal9ExpectTagILj7994EEEbPKc; google::protobuf::internal::ExpectTag<7994u>(char const*)
test al, 1
jnz short loc_B166F
loc_B16E3:
jmp short loc_B16E7
loc_B16E5:
jmp short loc_B16EE
loc_B16E7:
jmp loc_B160D
loc_B16EC:
jmp short $+2
loc_B16EE:
cmp dword ptr [rsp+78h+var_3C], 0
jz short loc_B1701
mov eax, dword ptr [rsp+78h+var_3C]
and eax, 7
cmp eax, 4
jnz short loc_B172A
loc_B1701:
cmp [rsp+78h+var_30], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B1712
jmp short loc_B1717
loc_B1712:
jmp loc_B1846
loc_B1717:
mov rdi, [rsp+78h+var_38]; this
mov esi, dword ptr [rsp+78h+var_3C]; unsigned int
call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint)
jmp loc_B183C
loc_B172A:
mov eax, 1F40h
cmp eax, dword ptr [rsp+78h+var_3C]
ja short loc_B17A0
mov rax, [rsp+78h+var_48]
add rax, 10h
mov [rsp+78h+var_68], rax
mov eax, dword ptr [rsp+78h+var_3C]
mov [rsp+78h+var_60], rax
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_58], rax
call _ZN6google8protobuf21ExtensionRangeOptions25internal_default_instanceEv; google::protobuf::ExtensionRangeOptions::internal_default_instance(void)
mov r8, [rsp+78h+var_48]
mov rdi, [rsp+78h+var_68]; this
mov rsi, [rsp+78h+var_60]; unsigned __int64
mov rdx, [rsp+78h+var_58]; char *
mov rcx, rax; google::protobuf::Message *
add r8, 8; google::protobuf::internal::InternalMetadata *
mov r9, [rsp+78h+var_38]; google::protobuf::internal::ParseContext *
call _ZN6google8protobuf8internal12ExtensionSet10ParseFieldEmPKcPKNS0_7MessageEPNS1_16InternalMetadataEPNS1_12ParseContextE; google::protobuf::internal::ExtensionSet::ParseField(ulong,char const*,google::protobuf::Message const*,google::protobuf::internal::InternalMetadata *,google::protobuf::internal::ParseContext *)
mov [rsp+78h+var_30], rax
cmp [rsp+78h+var_30], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B1796
jmp short loc_B179B
loc_B1796:
jmp loc_B1846
loc_B179B:
jmp loc_B160D
loc_B17A0:
mov rax, [rsp+78h+var_48]
mov ecx, dword ptr [rsp+78h+var_3C]; int
mov [rsp+78h+var_78], rcx; int
add rax, 8
mov qword ptr [rsp+78h+var_20], rax; int
mov rax, qword ptr [rsp+78h+var_20]
mov qword ptr [rsp+78h+var_70], rax; int
mov qword ptr [rsp+78h+var_10], rax; int
mov rax, qword ptr [rsp+78h+var_10]
mov qword ptr [rsp+78h+var_8], rax; int
mov rax, qword ptr [rsp+78h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_B17F6
mov rdi, qword ptr [rsp+78h+var_70]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+78h+var_18], rax
jmp short loc_B1805
loc_B17F6:
mov rdi, qword ptr [rsp+78h+var_70]; int
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov [rsp+78h+var_18], rax
loc_B1805:
mov rdi, [rsp+78h+var_78]; this
mov rsi, [rsp+78h+var_18]; unsigned __int64
mov rdx, [rsp+78h+var_30]; google::protobuf::UnknownFieldSet *
mov rcx, [rsp+78h+var_38]; char *
call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *)
mov [rsp+78h+var_30], rax
cmp [rsp+78h+var_30], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_B1833
jmp short loc_B1835
loc_B1833:
jmp short loc_B1846
loc_B1835:
jmp loc_B160D
loc_B183A:
jmp short $+2
loc_B183C:
mov rax, [rsp+78h+var_30]
add rsp, 78h
retn
loc_B1846:
mov [rsp+78h+var_30], 0
jmp short loc_B183C
| _InternalParse:
SUB RSP,0x78
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x30],RAX
LAB_001b160d:
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x48]
CALL 0x001d41f0
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b1627
JMP 0x001b183a
LAB_001b1627:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x3c]
XOR EDX,EDX
CALL 0x001d4220
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,dword ptr [RSP + 0x3c]
SHR EAX,0x3
SUB EAX,0x3e7
JNZ 0x001b16ec
JMP 0x001b1651
LAB_001b1651:
MOV EAX,dword ptr [RSP + 0x3c]
MOVZX EAX,AL
CMP EAX,0x3a
JNZ 0x001b16e5
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,-0x2
MOV qword ptr [RSP + 0x48],RAX
LAB_001b166f:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x2
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x001d6c20
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x002b4330
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b16b9
JMP 0x001b16be
LAB_001b16b9:
JMP 0x001b1846
LAB_001b16be:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x001d4310
TEST AL,0x1
JNZ 0x001b16d3
JMP 0x001b16e3
LAB_001b16d3:
JMP 0x001b16d5
LAB_001b16d5:
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001d6c40
TEST AL,0x1
JNZ 0x001b166f
LAB_001b16e3:
JMP 0x001b16e7
LAB_001b16e5:
JMP 0x001b16ee
LAB_001b16e7:
JMP 0x001b160d
LAB_001b16ec:
JMP 0x001b16ee
LAB_001b16ee:
CMP dword ptr [RSP + 0x3c],0x0
JZ 0x001b1701
MOV EAX,dword ptr [RSP + 0x3c]
AND EAX,0x7
CMP EAX,0x4
JNZ 0x001b172a
LAB_001b1701:
CMP qword ptr [RSP + 0x48],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b1712
JMP 0x001b1717
LAB_001b1712:
JMP 0x001b1846
LAB_001b1717:
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x3c]
CALL 0x001d4350
JMP 0x001b183c
LAB_001b172a:
MOV EAX,0x1f40
CMP EAX,dword ptr [RSP + 0x3c]
JA 0x001b17a0
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x10
MOV qword ptr [RSP + 0x10],RAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001800e0
MOV R8,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,RAX
ADD R8,0x8
MOV R9,qword ptr [RSP + 0x40]
CALL 0x002044d0
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b1796
JMP 0x001b179b
LAB_001b1796:
JMP 0x001b1846
LAB_001b179b:
JMP 0x001b160d
LAB_001b17a0:
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP],RCX
ADD RAX,0x8
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001b17f6
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001b1805
LAB_001b17f6:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001df250
MOV qword ptr [RSP + 0x60],RAX
LAB_001b1805:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
CALL 0x00263b20
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b1833
JMP 0x001b1835
LAB_001b1833:
JMP 0x001b1846
LAB_001b1835:
JMP 0x001b160d
LAB_001b183a:
JMP 0x001b183c
LAB_001b183c:
MOV RAX,qword ptr [RSP + 0x48]
ADD RSP,0x78
RET
LAB_001b1846:
MOV qword ptr [RSP + 0x48],0x0
JMP 0x001b183c
|
/* google::protobuf::ExtensionRangeOptions::_InternalParse(char const*,
google::protobuf::internal::ParseContext*) */
char * __thiscall
google::protobuf::ExtensionRangeOptions::_InternalParse
(ExtensionRangeOptions *this,char *param_1,ParseContext *param_2)
{
ParseContext *this_00;
byte bVar1;
bool bVar2;
char *pcVar3;
MessageLite *pMVar4;
ulong uVar5;
Message *pMVar6;
uint local_3c;
ParseContext *local_38;
char *local_30;
ExtensionRangeOptions *local_28;
InternalMetadata *local_20;
UnknownFieldSet *local_18;
InternalMetadata *local_10;
InternalMetadata *local_8;
local_38 = param_2;
local_30 = param_1;
local_28 = this;
while( true ) {
while( true ) {
bVar1 = internal::ParseContext::Done(local_38,&local_30);
if (((bVar1 ^ 0xff) & 1) == 0) {
return local_30;
}
pcVar3 = (char *)internal::ReadTag(local_30,&local_3c,0);
if ((local_3c >> 3 != 999) || ((local_3c & 0xff) != 0x3a)) break;
local_30 = pcVar3 + -2;
do {
this_00 = local_38;
local_30 = local_30 + 2;
pMVar4 = (MessageLite *)_internal_add_uninterpreted_option(this);
local_30 = (char *)internal::ParseContext::ParseMessage(this_00,pMVar4,local_30);
if (local_30 == (char *)0x0) {
return (char *)0x0;
}
uVar5 = internal::EpsCopyInputStream::DataAvailable((EpsCopyInputStream *)local_38,local_30)
;
} while (((uVar5 & 1) != 0) && (bVar2 = internal::ExpectTag<7994u>(local_30), bVar2));
}
local_30 = pcVar3;
if ((local_3c == 0) || ((local_3c & 7) == 4)) break;
if (local_3c < 8000) {
uVar5 = (ulong)local_3c;
local_20 = (InternalMetadata *)(this + 8);
local_10 = local_20;
local_8 = local_20;
if ((*(ulong *)local_20 & 1) == 0) {
local_18 = internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(local_20);
}
else {
local_18 = (UnknownFieldSet *)
internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
(local_20);
local_18 = (UnknownFieldSet *)((Container *)local_18 + 8);
}
local_30 = (char *)internal::UnknownFieldParse(uVar5,local_18,local_30,local_38);
if (local_30 == (char *)0x0) {
return (char *)0x0;
}
}
else {
uVar5 = (ulong)local_3c;
pMVar6 = (Message *)internal_default_instance();
local_30 = (char *)internal::ExtensionSet::ParseField
((ExtensionSet *)(this + 0x10),uVar5,pcVar3,pMVar6,
(InternalMetadata *)(this + 8),local_38);
if (local_30 == (char *)0x0) {
return (char *)0x0;
}
}
}
if (pcVar3 == (char *)0x0) {
return (char *)0x0;
}
internal::EpsCopyInputStream::SetLastTag((EpsCopyInputStream *)local_38,local_3c);
return local_30;
}
| ||
45,954 | google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
case 999:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
if ((8000u <= tag)) {
ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
CHK_(ptr != nullptr);
continue;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
} | O3 | cpp | google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq %rsp, %rax
movq %rsi, (%rax)
movl 0x5c(%rdx), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x594d4
testb %al, %al
jne 0x4bed5
leaq 0x8(%r14), %r15
leaq 0x10(%r14), %r12
addq $0x28, %r14
movq %rsp, %rbp
movq (%rsp), %rdi
movzbl (%rdi), %edx
leaq 0x1(%rdi), %rax
testb %dl, %dl
js 0x4be03
movq %rax, (%rsp)
testl %edx, %edx
je 0x4becb
movl %edx, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
je 0x4becb
movl %edx, %r13d
cmpl $0x1f40, %edx # imm = 0x1F40
jb 0x4be1d
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
leaq 0xb676a(%rip), %rcx # 0x102560
movq %r15, %r8
movq %rbx, %r9
callq 0x6254a
jmp 0x4be40
movzbl (%rax), %eax
movl %eax, %ecx
shll $0x7, %ecx
addl %ecx, %edx
addl $-0x80, %edx
testb %al, %al
js 0x4be4e
addq $0x2, %rdi
movq %rdi, %rax
jmp 0x4be55
movq (%r15), %rsi
testb $0x1, %sil
je 0x4beb7
andq $-0x4, %rsi
addq $0x8, %rsi
movq %r13, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x8822d
movq %rax, (%rsp)
testq %rax, %rax
jne 0x4be9f
jmp 0x4bee8
movl %edx, %esi
callq 0x9f24e
movq %rax, (%rsp)
cmpl $0x1f3a, %edx # imm = 0x1F3A
jne 0x4bdc5
addq $-0x2, %rax
addq $0x2, %rax
movq %rax, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x59568
movq (%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10dda
movq %rax, (%rsp)
testq %rax, %rax
je 0x4bee8
cmpq %rax, (%rbx)
jbe 0x4be9f
cmpw $0x3eba, (%rax) # imm = 0x3EBA
je 0x4be69
movl 0x5c(%rbx), %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x594d4
testb %al, %al
je 0x4bdb2
jmp 0x4bed5
movq %r15, %rdi
callq 0x59664
movq %rax, %rsi
movq (%rsp), %rax
jmp 0x4be32
testq %rax, %rax
je 0x4bee8
decl %edx
movl %edx, 0x50(%rbx)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, (%rsp)
jmp 0x4bed5
| _ZN6google8protobuf21ExtensionRangeOptions14_InternalParseEPKcPNS0_8internal12ParseContextE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rdi
mov rax, rsp
mov [rax], rsi
mov edx, [rdx+5Ch]; int
mov rdi, rbx; this
mov rsi, rax; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jnz loc_4BED5
lea r15, [r14+8]
lea r12, [r14+10h]
add r14, 28h ; '('
mov rbp, rsp
loc_4BDB2:
mov rdi, [rsp+38h+var_38]; this
movzx edx, byte ptr [rdi]
lea rax, [rdi+1]
test dl, dl
js short loc_4BE03
mov [rsp+38h+var_38], rax
loc_4BDC5:
test edx, edx
jz loc_4BECB
mov ecx, edx
and ecx, 7
cmp ecx, 4
jz loc_4BECB
mov r13d, edx
cmp edx, 1F40h
jb short loc_4BE1D
mov rdi, r12; this
mov rsi, r13; unsigned __int64
mov rdx, rax; char *
lea rcx, _ZN6google8protobuf40_ExtensionRangeOptions_default_instance_E; google::protobuf::Message *
mov r8, r15; google::protobuf::internal::InternalMetadata *
mov r9, rbx; google::protobuf::internal::ParseContext *
call _ZN6google8protobuf8internal12ExtensionSet10ParseFieldEmPKcPKNS0_7MessageEPNS1_16InternalMetadataEPNS1_12ParseContextE; google::protobuf::internal::ExtensionSet::ParseField(ulong,char const*,google::protobuf::Message const*,google::protobuf::internal::InternalMetadata *,google::protobuf::internal::ParseContext *)
jmp short loc_4BE40
loc_4BE03:
movzx eax, byte ptr [rax]
mov ecx, eax
shl ecx, 7
add edx, ecx
add edx, 0FFFFFF80h; unsigned int
test al, al
js short loc_4BE4E
add rdi, 2
mov rax, rdi
jmp short loc_4BE55
loc_4BE1D:
mov rsi, [r15]
test sil, 1
jz loc_4BEB7
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8; unsigned __int64
loc_4BE32:
mov rdi, r13; this
mov rdx, rax; google::protobuf::UnknownFieldSet *
mov rcx, rbx; char *
call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *)
loc_4BE40:
mov [rsp+38h+var_38], rax
test rax, rax
jnz short loc_4BE9F
jmp loc_4BEE8
loc_4BE4E:
mov esi, edx; char *
call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint)
loc_4BE55:
mov [rsp+38h+var_38], rax
cmp edx, 1F3Ah
jnz loc_4BDC5
add rax, 0FFFFFFFFFFFFFFFEh
loc_4BE69:
add rax, 2
mov [rsp+38h+var_38], rax
mov rdi, r14; this
xor esi, esi
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINS0_19UninterpretedOptionEE11TypeHandlerEEEPNT_4TypeEPKS9_; google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler::Type * const*)
mov rdx, [rsp+38h+var_38]; char *
mov rdi, rbx; this
mov rsi, rax; google::protobuf::MessageLite *
call _ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc; google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite *,char const*)
mov [rsp+38h+var_38], rax
test rax, rax
jz short loc_4BEE8
cmp [rbx], rax
jbe short loc_4BE9F
cmp word ptr [rax], 3EBAh
jz short loc_4BE69
loc_4BE9F:
mov edx, [rbx+5Ch]; int
mov rdi, rbx; this
mov rsi, rbp; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jz loc_4BDB2
jmp short loc_4BED5
loc_4BEB7:
mov rdi, r15
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov rsi, rax
mov rax, [rsp+38h+var_38]
jmp loc_4BE32
loc_4BECB:
test rax, rax
jz short loc_4BEE8
dec edx
mov [rbx+50h], edx
loc_4BED5:
mov rax, [rsp+38h+var_38]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4BEE8:
mov [rsp+38h+var_38], 0
jmp short loc_4BED5
| google::protobuf::internal * google::protobuf::ExtensionRangeOptions::_InternalParse(
google::protobuf::ExtensionRangeOptions *this,
google::protobuf::internal *a2,
google::protobuf::internal::ParseContext *a3)
{
google::protobuf::internal::ParseContext *v4; // r8
google::protobuf::internal::InternalMetadata *v5; // r15
unsigned int v6; // edx
google::protobuf::internal *TagFallback; // rax
google::protobuf::internal *v8; // r13
google::protobuf::internal *v9; // rax
int v10; // eax
unsigned long long v11; // rsi
unsigned long long v12; // rax
google::protobuf::MessageLite *v13; // rax
google::protobuf::internal *v15[7]; // [rsp+0h] [rbp-38h] BYREF
v15[0] = a2;
if ( !(unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(
a3,
(const char **)v15,
*((_DWORD *)a3 + 23)) )
{
v5 = (google::protobuf::ExtensionRangeOptions *)((char *)this + 8);
while ( 1 )
{
v6 = *(unsigned __int8 *)v15[0];
TagFallback = (google::protobuf::internal *)((char *)v15[0] + 1);
if ( (v6 & 0x80u) != 0 )
{
v10 = *(unsigned __int8 *)TagFallback;
v6 = (v10 << 7) + v6 - 128;
if ( (v10 & 0x80u) != 0 )
TagFallback = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback(
v15[0],
(const char *)v6,
v6);
else
TagFallback = (google::protobuf::internal *)((char *)v15[0] + 2);
v15[0] = TagFallback;
if ( v6 == 7994 )
{
v12 = (unsigned long long)TagFallback - 2;
while ( 1 )
{
v15[0] = (google::protobuf::internal *)(v12 + 2);
v13 = (google::protobuf::MessageLite *)google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>((google::protobuf::ExtensionRangeOptions *)((char *)this + 40));
v12 = google::protobuf::internal::ParseContext::ParseMessage(a3, v13, (const char *)v15[0]);
v15[0] = (google::protobuf::internal *)v12;
if ( !v12 )
goto LABEL_28;
if ( *(_QWORD *)a3 <= v12 || *(_WORD *)v12 != 16058 )
goto LABEL_22;
}
}
}
else
{
++v15[0];
}
if ( !v6 || (v6 & 7) == 4 )
break;
v8 = (google::protobuf::internal *)v6;
if ( v6 < 0x1F40 )
{
if ( (*(_QWORD *)v5 & 1) != 0 )
{
v11 = (*(_QWORD *)v5 & 0xFFFFFFFFFFFFFFFCLL) + 8;
}
else
{
v11 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(v5);
TagFallback = v15[0];
}
v9 = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse(
v8,
v11,
TagFallback,
(const char *)a3,
v4);
}
else
{
v9 = (google::protobuf::internal *)google::protobuf::internal::ExtensionSet::ParseField(
(google::protobuf::ExtensionRangeOptions *)((char *)this + 16),
v6,
(const char *)TagFallback,
(const google::protobuf::Message *)&google::protobuf::_ExtensionRangeOptions_default_instance_,
v5,
a3);
}
v15[0] = v9;
if ( !v9 )
goto LABEL_28;
LABEL_22:
if ( (unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(
a3,
(const char **)v15,
*((_DWORD *)a3 + 23)) )
return v15[0];
}
if ( TagFallback )
{
*((_DWORD *)a3 + 20) = v6 - 1;
return v15[0];
}
LABEL_28:
v15[0] = 0LL;
}
return v15[0];
}
| _InternalParse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
MOV RAX,RSP
MOV qword ptr [RAX],RSI
MOV EDX,dword ptr [RDX + 0x5c]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001594d4
TEST AL,AL
JNZ 0x0014bed5
LEA R15,[R14 + 0x8]
LEA R12,[R14 + 0x10]
ADD R14,0x28
MOV RBP,RSP
LAB_0014bdb2:
MOV RDI,qword ptr [RSP]
MOVZX EDX,byte ptr [RDI]
LEA RAX,[RDI + 0x1]
TEST DL,DL
JS 0x0014be03
MOV qword ptr [RSP],RAX
LAB_0014bdc5:
TEST EDX,EDX
JZ 0x0014becb
MOV ECX,EDX
AND ECX,0x7
CMP ECX,0x4
JZ 0x0014becb
MOV R13D,EDX
CMP EDX,0x1f40
JC 0x0014be1d
MOV RDI,R12
MOV RSI,R13
MOV RDX,RAX
LEA RCX,[0x202560]
MOV R8,R15
MOV R9,RBX
CALL 0x0016254a
JMP 0x0014be40
LAB_0014be03:
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
SHL ECX,0x7
ADD EDX,ECX
ADD EDX,-0x80
TEST AL,AL
JS 0x0014be4e
ADD RDI,0x2
MOV RAX,RDI
JMP 0x0014be55
LAB_0014be1d:
MOV RSI,qword ptr [R15]
TEST SIL,0x1
JZ 0x0014beb7
AND RSI,-0x4
ADD RSI,0x8
LAB_0014be32:
MOV RDI,R13
MOV RDX,RAX
MOV RCX,RBX
CALL 0x0018822d
LAB_0014be40:
MOV qword ptr [RSP],RAX
TEST RAX,RAX
JNZ 0x0014be9f
JMP 0x0014bee8
LAB_0014be4e:
MOV ESI,EDX
CALL 0x0019f24e
LAB_0014be55:
MOV qword ptr [RSP],RAX
CMP EDX,0x1f3a
JNZ 0x0014bdc5
ADD RAX,-0x2
LAB_0014be69:
ADD RAX,0x2
MOV qword ptr [RSP],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159568
MOV RDX,qword ptr [RSP]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00110dda
MOV qword ptr [RSP],RAX
TEST RAX,RAX
JZ 0x0014bee8
CMP qword ptr [RBX],RAX
JBE 0x0014be9f
CMP word ptr [RAX],0x3eba
JZ 0x0014be69
LAB_0014be9f:
MOV EDX,dword ptr [RBX + 0x5c]
MOV RDI,RBX
MOV RSI,RBP
CALL 0x001594d4
TEST AL,AL
JZ 0x0014bdb2
JMP 0x0014bed5
LAB_0014beb7:
MOV RDI,R15
CALL 0x00159664
MOV RSI,RAX
MOV RAX,qword ptr [RSP]
JMP 0x0014be32
LAB_0014becb:
TEST RAX,RAX
JZ 0x0014bee8
DEC EDX
MOV dword ptr [RBX + 0x50],EDX
LAB_0014bed5:
MOV RAX,qword ptr [RSP]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014bee8:
MOV qword ptr [RSP],0x0
JMP 0x0014bed5
|
/* google::protobuf::ExtensionRangeOptions::_InternalParse(char const*,
google::protobuf::internal::ParseContext*) */
byte * __thiscall
google::protobuf::ExtensionRangeOptions::_InternalParse
(ExtensionRangeOptions *this,char *param_1,ParseContext *param_2)
{
InternalMetadata *this_00;
byte bVar1;
byte bVar2;
char cVar3;
uint uVar5;
Type *pTVar4;
UnknownFieldSet *pUVar6;
int1 auVar7 [12];
byte *local_38;
local_38 = (byte *)param_1;
cVar3 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_38,*(int *)(param_2 + 0x5c));
if (cVar3 == '\0') {
this_00 = (InternalMetadata *)(this + 8);
do {
bVar1 = *local_38;
auVar7[8] = bVar1;
auVar7._0_8_ = local_38 + 1;
auVar7._9_3_ = 0;
if ((char)bVar1 < '\0') {
bVar2 = local_38[1];
uVar5 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80;
if ((char)bVar2 < '\0') {
auVar7 = internal::ReadTagFallback((char *)local_38,uVar5);
}
else {
auVar7._8_4_ = uVar5;
auVar7._0_8_ = local_38 + 2;
}
if (auVar7._8_4_ != 0x1f3a) goto LAB_0014bdc5;
local_38 = (byte *)(auVar7._0_8_ + -2);
do {
local_38 = local_38 + 2;
pTVar4 = internal::RepeatedPtrFieldBase::
Add<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>
((Type *)(this + 0x28));
local_38 = (byte *)internal::ParseContext::ParseMessage
(param_2,(MessageLite *)pTVar4,(char *)local_38);
if (local_38 == (byte *)0x0) {
return (byte *)0x0;
}
} while ((local_38 < *(byte **)param_2) && (*(short *)local_38 == 0x3eba));
}
else {
LAB_0014bdc5:
uVar5 = auVar7._8_4_;
local_38 = auVar7._0_8_;
if ((uVar5 == 0) || ((uVar5 & 7) == 4)) {
if (local_38 == (byte *)0x0) {
return (byte *)0x0;
}
*(uint *)(param_2 + 0x50) = uVar5 - 1;
return local_38;
}
if (uVar5 < 8000) {
if ((*(ulong *)this_00 & 1) == 0) {
pUVar6 = internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(this_00);
}
else {
pUVar6 = (UnknownFieldSet *)((*(ulong *)this_00 & 0xfffffffffffffffc) + 8);
}
local_38 = (byte *)internal::UnknownFieldParse
((ulong)uVar5,pUVar6,(char *)local_38,param_2);
}
else {
local_38 = (byte *)internal::ExtensionSet::ParseField
((ExtensionSet *)(this + 0x10),(ulong)uVar5,(char *)local_38,
(Message *)_ExtensionRangeOptions_default_instance_,this_00,
param_2);
}
if (local_38 == (byte *)0x0) {
return (byte *)0x0;
}
}
cVar3 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_38,*(int *)(param_2 + 0x5c));
} while (cVar3 == '\0');
}
return local_38;
}
| |
45,955 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_bom() | llama.cpp/common/json.hpp | bool skip_bom()
{
if (get() == 0xEF)
{
// check if we completely parse the BOM
return get() == 0xBB && get() == 0xBF;
}
// the first character is not the beginning of the BOM; unget it to
// process is later
unget();
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_bom():
pushq %rbx
movq %rdi, %rbx
callq 0x216d4
cmpl $0xef, %eax
je 0x85074
movq %rbx, %rdi
callq 0x8596a
movb $0x1, %al
popq %rbx
retq
movq %rbx, %rdi
callq 0x216d4
cmpl $0xbb, %eax
je 0x85087
xorl %eax, %eax
jmp 0x85072
movq %rbx, %rdi
callq 0x216d4
cmpl $0xbf, %eax
sete %al
jmp 0x85072
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv:
push rbx
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0EFh
jz short loc_85074
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov al, 1
loc_85072:
pop rbx
retn
loc_85074:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BBh
jz short loc_85087
xor eax, eax
jmp short loc_85072
loc_85087:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BFh
setz al
jmp short loc_85072
| bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(
__m128i *a1)
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 239 )
return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187
&& (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
return 1;
}
| skip_bom:
PUSH RBX
MOV RBX,RDI
CALL 0x001216d4
CMP EAX,0xef
JZ 0x00185074
MOV RDI,RBX
CALL 0x0018596a
MOV AL,0x1
LAB_00185072:
POP RBX
RET
LAB_00185074:
MOV RDI,RBX
CALL 0x001216d4
CMP EAX,0xbb
JZ 0x00185087
XOR EAX,EAX
JMP 0x00185072
LAB_00185087:
MOV RDI,RBX
CALL 0x001216d4
CMP EAX,0xbf
SETZ AL
JMP 0x00185072
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::skip_bom() */
bool __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
bool bVar2;
iVar1 = get(this);
if (iVar1 == 0xef) {
iVar1 = get(this);
if (iVar1 == 0xbb) {
iVar1 = get(this);
bVar2 = iVar1 == 0xbf;
}
else {
bVar2 = false;
}
}
else {
unget(this);
bVar2 = true;
}
return bVar2;
}
| |
45,956 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0xb5719
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0xb5719
incq %r10
cmpq %r11, %r10
jb 0xb5706
cmpq %r11, %r10
je 0xb5801
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0xb57de
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0xb578d
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0xb577c
addb $-0x37, %r12b
jmp 0xb578a
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0xb57cc
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0xb57cc
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0xb57a4
movq %rdi, %r15
jmp 0xb57bb
jne 0xb57ad
movq %rax, %r15
cmpl %edx, %ebx
ja 0xb57bb
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0xb5759
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0xb57e0
movb $0x1, %al
cmpq %r10, %r11
je 0xb5801
testq %r8, %r8
je 0xb57ed
movq %r11, (%r8)
testb %al, %al
je 0xb5814
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0xb5822
movl $0x21, (%r9)
testq %r8, %r8
je 0xb5810
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0xb5822
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_B5719
mov rax, [rdi+40h]
mov r10, rsi
loc_B5706:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_B5719
inc r10
cmp r10, r11
jb short loc_B5706
loc_B5719:
cmp r10, r11
jz loc_B5801
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_B57DE
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_B5759:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_B578D
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_B577C
add r12b, 0C9h
jmp short loc_B578A
loc_B577C:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_B57CC
add r12b, 0A9h
loc_B578A:
mov ebx, r12d
loc_B578D:
movzx ebx, bl
cmp ebx, ecx
jge short loc_B57CC
mov r12d, 1
cmp rdi, rax
jbe short loc_B57A4
mov r15, rdi
jmp short loc_B57BB
loc_B57A4:
jnz short loc_B57AD
mov r15, rax
cmp ebx, edx
ja short loc_B57BB
loc_B57AD:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_B57BB:
inc r14
cmp r14, r11
jnz short loc_B5759
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_B57CC:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_B57E0
loc_B57DE:
mov al, 1
loc_B57E0:
cmp r11, r10
jz short loc_B5801
test r8, r8
jz short loc_B57ED
mov [r8], r11
loc_B57ED:
test al, al
jz short loc_B5814
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_B5822
loc_B5801:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_B5810
mov [r8], rsi
loc_B5810:
xor eax, eax
jmp short loc_B5822
loc_B5814:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_B5822:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x001b5719
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_001b5706:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x001b5719
INC R10
CMP R10,R11
JC 0x001b5706
LAB_001b5719:
CMP R10,R11
JZ 0x001b5801
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x001b57de
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_001b5759:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x001b578d
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x001b577c
ADD R12B,0xc9
JMP 0x001b578a
LAB_001b577c:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x001b57cc
ADD R12B,0xa9
LAB_001b578a:
MOV EBX,R12D
LAB_001b578d:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x001b57cc
MOV R12D,0x1
CMP RDI,RAX
JBE 0x001b57a4
MOV R15,RDI
JMP 0x001b57bb
LAB_001b57a4:
JNZ 0x001b57ad
MOV R15,RAX
CMP EBX,EDX
JA 0x001b57bb
LAB_001b57ad:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_001b57bb:
INC R14
CMP R14,R11
JNZ 0x001b5759
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_001b57cc:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x001b57e0
LAB_001b57de:
MOV AL,0x1
LAB_001b57e0:
CMP R11,R10
JZ 0x001b5801
TEST R8,R8
JZ 0x001b57ed
MOV qword ptr [R8],R11
LAB_001b57ed:
TEST AL,AL
JZ 0x001b5814
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x001b5822
LAB_001b5801:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x001b5810
MOV qword ptr [R8],RSI
LAB_001b5810:
XOR EAX,EAX
JMP 0x001b5822
LAB_001b5814:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_001b5822:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001b57cc;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_001b57cc;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_001b57cc:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
| |
45,957 | gguf_get_val_i32 | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | int32_t gguf_get_val_i32(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<int32_t>();
} | O3 | cpp | gguf_get_val_i32:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3e71a
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %r15 # imm = 0x2E8BA2E8BA2E8BA3
imulq %r15, %rax
cmpq %rsi, %rax
jle 0x3e71a
imulq $0x58, %rbx, %r12
addq %r12, %rdi
callq 0x16610
cmpq $0x1, %rax
jne 0x3e736
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
cmpq %rbx, %rax
jbe 0x3e715
addq %r12, %rdi
xorl %esi, %esi
callq 0x169f0
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x18a48
leaq 0x1edbc(%rip), %rdi # 0x5d4dd
leaq 0xdf3d(%rip), %rdx # 0x4c665
leaq 0x1f224(%rip), %rcx # 0x5d953
movl $0x33d, %esi # imm = 0x33D
jmp 0x3e750
leaq 0x1eda0(%rip), %rdi # 0x5d4dd
leaq 0xdf21(%rip), %rdx # 0x4c665
leaq 0x1f2d7(%rip), %rcx # 0x5da22
movl $0x33e, %esi # imm = 0x33E
xorl %eax, %eax
callq 0x17cd0
| gguf_get_val_i32:
push r15
push r14
push r12
push rbx
push rax
test rsi, rsi
js short loc_3E71A
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi+8]
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
mov r15, 2E8BA2E8BA2E8BA3h
imul rax, r15
cmp rax, rsi
jle short loc_3E71A
imul r12, rbx, 58h ; 'X'
add rdi, r12; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3E736
mov rdi, [r14+8]
mov rax, [r14+10h]
sub rax, rdi
sar rax, 3
imul rax, r15
cmp rax, rbx
jbe short loc_3E715
add rdi, r12
xor esi, esi
call __ZNK7gguf_kv7get_valIiEERKT_m; gguf_kv::get_val<int>(ulong)
mov eax, [rax]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_3E715:
call gguf_get_val_i32_cold_1
loc_3E71A:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 33Dh
jmp short loc_3E750
loc_3E736:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 33Eh
loc_3E750:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_i32(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // rdi
long long v8; // rdi
const char *v10; // rcx
int v11; // esi
if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) )
{
v10 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v11 = 829;
goto LABEL_9;
}
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 )
{
v10 = "ctx->kv[key_id].get_ne() == 1";
v11 = 830;
LABEL_9:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
v8 = *(_QWORD *)(a1 + 8);
if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v8) >> 3) <= (unsigned long long)a2 )
gguf_get_val_i32_cold_1(v8);
return *(unsigned int *)gguf_kv::get_val<int>(88 * a2 + v8, 0LL);
}
| gguf_get_val_i32:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013e71a
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
MOV R15,0x2e8ba2e8ba2e8ba3
IMUL RAX,R15
CMP RAX,RSI
JLE 0x0013e71a
IMUL R12,RBX,0x58
ADD RDI,R12
CALL 0x00116610
CMP RAX,0x1
JNZ 0x0013e736
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
SUB RAX,RDI
SAR RAX,0x3
IMUL RAX,R15
CMP RAX,RBX
JBE 0x0013e715
ADD RDI,R12
XOR ESI,ESI
CALL 0x001169f0
MOV EAX,dword ptr [RAX]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013e715:
CALL 0x00118a48
LAB_0013e71a:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15d953]
MOV ESI,0x33d
JMP 0x0013e750
LAB_0013e736:
LEA RDI,[0x15d4dd]
LEA RDX,[0x14c665]
LEA RCX,[0x15da22]
MOV ESI,0x33e
LAB_0013e750:
XOR EAX,EAX
CALL 0x00117cd0
|
int gguf_get_val_i32(long param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
int *piVar3;
char *pcVar4;
int8 uVar5;
if ((-1 < (long)param_2) &&
(lVar1 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3,
lVar1 - param_2 != 0 && (long)param_2 <= lVar1)) {
lVar1 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58));
if (lVar1 != 1) {
pcVar4 = "ctx->kv[key_id].get_ne() == 1";
uVar5 = 0x33e;
goto LAB_0013e750;
}
uVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
if (param_2 <= uVar2 && uVar2 - param_2 != 0) {
piVar3 = gguf_kv::get_val<int>((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58),0);
return *piVar3;
}
gguf_get_val_i32_cold_1();
}
pcVar4 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar5 = 0x33d;
LAB_0013e750:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
uVar5,"GGML_ASSERT(%s) failed",pcVar4);
}
| |
45,958 | copy_uca_collation | eloqsql/mysys/charset.c | static void
copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from,
CHARSET_INFO *loaded)
{
to->cset= from->cset;
to->coll= from->coll;
/*
Single-level UCA collation have strnxfrm_multiple=8.
In case of a multi-level UCA collation we use strnxfrm_multiply=4.
That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller
to allocate a buffer smaller size for each level, for performance purpose,
and to fit longer VARCHARs to @@max_sort_length.
This makes filesort produce non-precise order for some rare Unicode
characters that produce more than 4 weights (long expansions).
UCA requires 2 bytes per weight multiplied by the number of levels.
In case of a 2-level collation, each character requires 4*2=8 bytes.
Therefore, the longest VARCHAR that fits into the default @@max_sort_length
is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64)
would fit.
Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4,
for the same purpose.
TODO: we could add a new LDML syntax to choose strxfrm_multiply value.
*/
to->strxfrm_multiply= loaded->levels_for_order > 1 ?
4 : from->strxfrm_multiply;
to->min_sort_char= from->min_sort_char;
to->max_sort_char= from->max_sort_char;
to->mbminlen= from->mbminlen;
to->mbmaxlen= from->mbmaxlen;
to->caseup_multiply= from->caseup_multiply;
to->casedn_multiply= from->casedn_multiply;
to->state|= MY_CS_AVAILABLE | MY_CS_LOADED |
MY_CS_STRNXFRM | MY_CS_UNICODE;
} | O0 | c | copy_uca_collation:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x18(%rbp), %rax
movzbl 0xb2(%rax), %eax
cmpl $0x1, %eax
jle 0x2bc16
movl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2bc23
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rax
movl 0x98(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x98(%rax)
movq -0x10(%rbp), %rax
movl 0x9c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x9c(%rax)
movq -0x10(%rbp), %rax
movb 0x94(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x94(%rax)
movq -0x10(%rbp), %rax
movb 0x95(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x95(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x2c8, %ecx # imm = 0x2C8
movl %ecx, 0xc(%rax)
popq %rbp
retq
nop
| copy_uca_collation:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov rcx, [rax+0B8h]
mov rax, [rbp+var_8]
mov [rax+0B8h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+0C0h]
mov rax, [rbp+var_8]
mov [rax+0C0h], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+0B2h]
cmp eax, 1
jle short loc_2BC16
mov eax, 4
mov [rbp+var_1C], eax
jmp short loc_2BC23
loc_2BC16:
mov rax, [rbp+var_10]
mov eax, [rax+90h]
mov [rbp+var_1C], eax
loc_2BC23:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_8]
mov [rax+90h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+0A0h]
mov rax, [rbp+var_8]
mov [rax+0A0h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+0A8h]
mov rax, [rbp+var_8]
mov [rax+0A8h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+98h]
mov rax, [rbp+var_8]
mov [rax+98h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+9Ch]
mov rax, [rbp+var_8]
mov [rax+9Ch], ecx
mov rax, [rbp+var_10]
mov cl, [rax+94h]
mov rax, [rbp+var_8]
mov [rax+94h], cl
mov rax, [rbp+var_10]
mov cl, [rax+95h]
mov rax, [rbp+var_8]
mov [rax+95h], cl
mov rax, [rbp+var_8]
mov ecx, [rax+0Ch]
or ecx, 2C8h
mov [rax+0Ch], ecx
pop rbp
retn
| long long copy_uca_collation(long long a1, long long a2, long long a3)
{
long long result; // rax
int v4; // [rsp+0h] [rbp-1Ch]
*(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184);
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192);
if ( *(unsigned __int8 *)(a3 + 178) <= 1u )
v4 = *(_DWORD *)(a2 + 144);
else
v4 = 4;
*(_DWORD *)(a1 + 144) = v4;
*(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160);
*(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168);
*(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152);
*(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156);
*(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148);
*(_BYTE *)(a1 + 149) = *(_BYTE *)(a2 + 149);
result = a1;
*(_DWORD *)(a1 + 12) |= 0x2C8u;
return result;
}
| copy_uca_collation:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc0],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0xb2]
CMP EAX,0x1
JLE 0x0012bc16
MOV EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0012bc23
LAB_0012bc16:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x90]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0012bc23:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x90],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xa0]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xa8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x98],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x9c]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x9c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX + 0x94]
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x94],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX + 0x95]
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x95],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x2c8
MOV dword ptr [RAX + 0xc],ECX
POP RBP
RET
|
void copy_uca_collation(long param_1,long param_2,long param_3)
{
int4 local_24;
*(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8);
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0);
if (*(byte *)(param_3 + 0xb2) < 2) {
local_24 = *(int4 *)(param_2 + 0x90);
}
else {
local_24 = 4;
}
*(int4 *)(param_1 + 0x90) = local_24;
*(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0);
*(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8);
*(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98);
*(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c);
*(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94);
*(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95);
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8;
return;
}
| |
45,959 | mi_rrnd | eloqsql/storage/myisam/mi_rrnd.c | int mi_rrnd(MI_INFO *info, uchar *buf, register my_off_t filepos)
{
my_bool skip_deleted_blocks;
DBUG_ENTER("mi_rrnd");
skip_deleted_blocks=0;
if (filepos == HA_OFFSET_ERROR)
{
skip_deleted_blocks=1;
if (info->lastpos == HA_OFFSET_ERROR) /* First read ? */
filepos= info->s->pack.header_length; /* Read first record */
else
filepos= info->nextpos;
}
if (info->once_flags & RRND_PRESERVE_LASTINX)
info->once_flags&= ~RRND_PRESERVE_LASTINX;
else
info->lastinx= -1; /* Can't forward or backward */
/* Init all but update-flag */
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno);
DBUG_RETURN ((*info->s->read_rnd)(info,buf,filepos,skip_deleted_blocks));
} | O0 | c | mi_rrnd:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x46946
movb $0x1, -0x21(%rbp)
movq -0x10(%rbp), %rax
cmpq $-0x1, 0x170(%rax)
jne 0x46935
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x238(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x46944
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x46946
movq -0x10(%rbp), %rax
movl 0x1cc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4696d
movq -0x10(%rbp), %rax
movl 0x1cc(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x1cc(%rax)
jmp 0x4697b
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x1d4(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
andl $0x401, %ecx # imm = 0x401
movl %ecx, 0x1d0(%rax)
movq -0x10(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x469cb
movq -0x10(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
movl $0x1, %esi
callq 0x6f4c0
cmpl $0x0, %eax
je 0x469cb
jmp 0x469bf
callq 0x83cd0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x469f0
jmp 0x469cd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x2b8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movsbl -0x21(%rbp), %ecx
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| mi_rrnd:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_21], 0
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_46946
mov [rbp+var_21], 1
mov rax, [rbp+var_10]
cmp qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
jnz short loc_46935
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+238h]
mov [rbp+var_20], rax
jmp short loc_46944
loc_46935:
mov rax, [rbp+var_10]
mov rax, [rax+178h]
mov [rbp+var_20], rax
loc_46944:
jmp short $+2
loc_46946:
mov rax, [rbp+var_10]
mov eax, [rax+1CCh]
and eax, 2
cmp eax, 0
jz short loc_4696D
mov rax, [rbp+var_10]
mov ecx, [rax+1CCh]
and ecx, 0FFFFFFFDh
mov [rax+1CCh], ecx
jmp short loc_4697B
loc_4696D:
mov rax, [rbp+var_10]
mov dword ptr [rax+1D4h], 0FFFFFFFFh
loc_4697B:
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
and ecx, 401h
mov [rax+1D0h], ecx
mov rax, [rbp+var_10]
mov eax, [rax+1C8h]
and eax, 10h
cmp eax, 0
jz short loc_469CB
mov rdi, [rbp+var_10]
add rdi, 220h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_469CB
jmp short $+2
loc_469BF:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_469F0
loc_469CB:
jmp short $+2
loc_469CD:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+2B8h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
movsx ecx, [rbp+var_21]
call rax
mov [rbp+var_4], eax
loc_469F0:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mi_rrnd(long long a1, long long a2, long long a3)
{
long long v3; // rdi
char v5; // [rsp+Fh] [rbp-21h]
long long v6; // [rsp+10h] [rbp-20h]
v6 = a3;
v5 = 0;
if ( a3 == -1 )
{
v5 = 1;
if ( *(_QWORD *)(a1 + 368) == -1LL )
v6 = *(_QWORD *)(*(_QWORD *)a1 + 568LL);
else
v6 = *(_QWORD *)(a1 + 376);
}
if ( (*(_DWORD *)(a1 + 460) & 2) != 0 )
*(_DWORD *)(a1 + 460) &= ~2u;
else
*(_DWORD *)(a1 + 468) = -1;
*(_DWORD *)(a1 + 464) &= 0x401u;
if ( (*(_DWORD *)(a1 + 456) & 0x10) != 0 && (v3 = a1 + 544, (unsigned int)my_b_flush_io_cache(a1 + 544, 1LL)) )
return *(unsigned int *)my_thread_var(v3);
else
return (unsigned int)(*(long long ( **)(long long, long long, long long, _QWORD))(*(_QWORD *)a1 + 696LL))(
a1,
a2,
v6,
(unsigned int)v5);
}
| mi_rrnd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RBP + -0x21],0x0
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x00146946
MOV byte ptr [RBP + -0x21],0x1
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x170],-0x1
JNZ 0x00146935
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x238]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00146944
LAB_00146935:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x178]
MOV qword ptr [RBP + -0x20],RAX
LAB_00146944:
JMP 0x00146946
LAB_00146946:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1cc]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0014696d
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1cc]
AND ECX,0xfffffffd
MOV dword ptr [RAX + 0x1cc],ECX
JMP 0x0014697b
LAB_0014696d:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1d4],0xffffffff
LAB_0014697b:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0x401
MOV dword ptr [RAX + 0x1d0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001469cb
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x220
MOV ESI,0x1
CALL 0x0016f4c0
CMP EAX,0x0
JZ 0x001469cb
JMP 0x001469bf
LAB_001469bf:
CALL 0x00183cd0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001469f0
LAB_001469cb:
JMP 0x001469cd
LAB_001469cd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2b8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RBP + -0x21]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
LAB_001469f0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mi_rrnd(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
int1 local_29;
long local_28;
int4 local_c;
local_29 = 0;
local_28 = param_3;
if (param_3 == -1) {
local_29 = 1;
if (param_1[0x2e] == -1) {
local_28 = *(long *)(*param_1 + 0x238);
}
else {
local_28 = param_1[0x2f];
}
}
if ((*(uint *)((long)param_1 + 0x1cc) & 2) == 0) {
*(int4 *)((long)param_1 + 0x1d4) = 0xffffffff;
}
else {
*(uint *)((long)param_1 + 0x1cc) = *(uint *)((long)param_1 + 0x1cc) & 0xfffffffd;
}
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0x401;
if (((*(uint *)(param_1 + 0x39) & 0x10) == 0) ||
(iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 == 0)) {
local_c = (**(code **)(*param_1 + 0x2b8))(param_1,param_2,local_28,local_29);
}
else {
puVar2 = (int4 *)_my_thread_var();
local_c = *puVar2;
}
return local_c;
}
| |
45,960 | mi_readinfo | eloqsql/storage/myisam/mi_locking.c | int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
{
DBUG_ENTER("_mi_readinfo");
if (info->lock_type == F_UNLCK)
{
MYISAM_SHARE *share=info->s;
if (!share->tot_locks)
{
if (my_lock(share->kfile,lock_type,0L,F_TO_EOF,
info->lock_wait | MY_SEEK_NOT_DONE))
DBUG_RETURN(1);
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
int error= my_errno ? my_errno : HA_ERR_FILE_TOO_SHORT;
(void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
MYF(MY_SEEK_NOT_DONE));
my_errno= error;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
(void) _mi_test_if_changed(info);
info->invalidator=info->s->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
{
my_errno=EACCES; /* Not allowed to change */
DBUG_RETURN(-1); /* when have read_lock() */
}
DBUG_RETURN(0);
} | O3 | c | mi_readinfo:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x1f4(%rdi), %ecx
cmpl $0x2, %ecx
jne 0x7d79b
movl %edx, %r15d
movq %rdi, %r14
movq (%rdi), %rbx
cmpl $0x0, 0x368(%rbx)
je 0x7d7ba
testl %r15d, %r15d
je 0x7d783
movq %r14, %rdi
callq 0x7d54a
movq (%r14), %rax
movq 0x2f0(%rax), %rax
movq %rax, 0x148(%r14)
xorl %eax, %eax
jmp 0x7d837
xorl $0x1, %esi
xorl %eax, %eax
orl %ecx, %esi
jne 0x7d837
callq 0xa2a4e
movl $0xd, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x7d837
movl 0x350(%rbx), %edi
movq 0x330(%r14), %r8
orq $0x20, %r8
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa0a80
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x7d837
movl 0x350(%rbx), %edi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x810d0
testl %eax, %eax
je 0x7d776
callq 0xa2a4e
cmpl $0x0, (%rax)
je 0x7d80a
callq 0xa2a4e
movl (%rax), %r14d
jmp 0x7d810
movl $0xaf, %r14d
movl 0x350(%rbx), %edi
movl $0x20, %r8d
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa0a80
callq 0xa2a4e
movl %r14d, (%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _mi_readinfo:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ecx, [rdi+1F4h]
cmp ecx, 2
jnz short loc_7D79B
mov r15d, edx
mov r14, rdi
mov rbx, [rdi]
cmp dword ptr [rbx+368h], 0
jz short loc_7D7BA
loc_7D776:
test r15d, r15d
jz short loc_7D783
mov rdi, r14
call _mi_test_if_changed
loc_7D783:
mov rax, [r14]
mov rax, [rax+2F0h]
mov [r14+148h], rax
xor eax, eax
jmp loc_7D837
loc_7D79B:
xor esi, 1
xor eax, eax
or esi, ecx
jnz loc_7D837
call _my_thread_var
mov dword ptr [rax], 0Dh
mov eax, 0FFFFFFFFh
jmp short loc_7D837
loc_7D7BA:
mov edi, [rbx+350h]
mov r8, [r14+330h]
or r8, 20h
xor edx, edx
xor ecx, ecx
call my_lock
mov ecx, eax
mov eax, 1
test ecx, ecx
jnz short loc_7D837
mov edi, [rbx+350h]
mov rsi, rbx
mov edx, 1
call mi_state_info_read_dsk
test eax, eax
jz short loc_7D776
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_7D80A
call _my_thread_var
mov r14d, [rax]
jmp short loc_7D810
loc_7D80A:
mov r14d, 0AFh
loc_7D810:
mov edi, [rbx+350h]
mov r8d, 20h ; ' '
mov esi, 2
xor edx, edx
xor ecx, ecx
call my_lock
call _my_thread_var
mov [rax], r14d
mov eax, 1
loc_7D837:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mi_readinfo(long long *a1, long long a2, int a3)
{
int v3; // ecx
long long v6; // rbx
long long result; // rax
const char *v8; // rsi
int v9; // ecx
long long v10; // rdi
int v11; // r14d
long long v12; // rdi
v3 = *((_DWORD *)a1 + 125);
if ( v3 == 2 )
{
v6 = *a1;
if ( *(_DWORD *)(*a1 + 872) )
goto LABEL_3;
v9 = my_lock(*(unsigned int *)(v6 + 848), a2, 0LL, 0LL, a1[102] | 0x20);
result = 1LL;
if ( v9 )
return result;
v10 = *(unsigned int *)(v6 + 848);
if ( !(unsigned int)mi_state_info_read_dsk(v10, v6, 1LL) )
{
LABEL_3:
if ( a3 )
mi_test_if_changed(a1);
a1[41] = *(_QWORD *)(*a1 + 752);
return 0LL;
}
else
{
if ( *(_DWORD *)my_thread_var(v10, (const char *)v6) )
v11 = *(_DWORD *)my_thread_var(v10, (const char *)v6);
else
v11 = 175;
v12 = *(unsigned int *)(v6 + 848);
my_lock(v12, 2LL, 0LL, 0LL, 32LL);
*(_DWORD *)my_thread_var(v12, (_BYTE *)&dword_0 + 2) = v11;
return 1LL;
}
}
else
{
result = 0LL;
v8 = (const char *)(v3 | (unsigned int)a2 ^ 1);
if ( !(_DWORD)v8 )
{
*(_DWORD *)my_thread_var(a1, v8) = 13;
return 0xFFFFFFFFLL;
}
}
return result;
}
| _mi_readinfo:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV ECX,dword ptr [RDI + 0x1f4]
CMP ECX,0x2
JNZ 0x0017d79b
MOV R15D,EDX
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP dword ptr [RBX + 0x368],0x0
JZ 0x0017d7ba
LAB_0017d776:
TEST R15D,R15D
JZ 0x0017d783
MOV RDI,R14
CALL 0x0017d54a
LAB_0017d783:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV qword ptr [R14 + 0x148],RAX
XOR EAX,EAX
JMP 0x0017d837
LAB_0017d79b:
XOR ESI,0x1
XOR EAX,EAX
OR ESI,ECX
JNZ 0x0017d837
CALL 0x001a2a4e
MOV dword ptr [RAX],0xd
MOV EAX,0xffffffff
JMP 0x0017d837
LAB_0017d7ba:
MOV EDI,dword ptr [RBX + 0x350]
MOV R8,qword ptr [R14 + 0x330]
OR R8,0x20
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001a0a80
MOV ECX,EAX
MOV EAX,0x1
TEST ECX,ECX
JNZ 0x0017d837
MOV EDI,dword ptr [RBX + 0x350]
MOV RSI,RBX
MOV EDX,0x1
CALL 0x001810d0
TEST EAX,EAX
JZ 0x0017d776
CALL 0x001a2a4e
CMP dword ptr [RAX],0x0
JZ 0x0017d80a
CALL 0x001a2a4e
MOV R14D,dword ptr [RAX]
JMP 0x0017d810
LAB_0017d80a:
MOV R14D,0xaf
LAB_0017d810:
MOV EDI,dword ptr [RBX + 0x350]
MOV R8D,0x20
MOV ESI,0x2
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001a0a80
CALL 0x001a2a4e
MOV dword ptr [RAX],R14D
MOV EAX,0x1
LAB_0017d837:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 _mi_readinfo(long *param_1,int8 param_2,int param_3)
{
long lVar1;
int iVar2;
int *piVar3;
int4 *puVar4;
int4 uVar5;
if (*(int *)((long)param_1 + 500) != 2) {
if ((int)param_2 != 1 || *(int *)((long)param_1 + 500) != 0) {
return 0;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xd;
return 0xffffffff;
}
lVar1 = *param_1;
if (*(int *)(lVar1 + 0x368) == 0) {
iVar2 = my_lock(*(int4 *)(lVar1 + 0x350),param_2,0,0,param_1[0x66] | 0x20);
if (iVar2 != 0) {
return 1;
}
iVar2 = mi_state_info_read_dsk(*(int4 *)(lVar1 + 0x350),lVar1,1);
if (iVar2 != 0) {
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 0) {
uVar5 = 0xaf;
}
else {
puVar4 = (int4 *)_my_thread_var();
uVar5 = *puVar4;
}
my_lock(*(int4 *)(lVar1 + 0x350),2,0,0,0x20);
puVar4 = (int4 *)_my_thread_var();
*puVar4 = uVar5;
return 1;
}
}
if (param_3 != 0) {
_mi_test_if_changed(param_1);
}
param_1[0x29] = *(long *)(*param_1 + 0x2f0);
return 0;
}
| |
45,961 | httplib::Response::set_chunked_content_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>) | monkey531[P]llama/examples/server/httplib.h | inline void Response::set_chunked_content_provider(
const std::string &content_type, ContentProviderWithoutLength provider,
ContentProviderResourceReleaser resource_releaser) {
set_header("Content-Type", content_type);
content_length_ = 0;
content_provider_ = detail::ContentProviderAdapter(std::move(provider));
content_provider_resource_releaser_ = std::move(resource_releaser);
is_chunked_content_provider_ = true;
} | O0 | c | httplib::Response::set_chunked_content_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>):
subq $0xa8, %rsp
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x654b0
movq 0x28(%rsp), %rdx
leaq 0x178aca(%rip), %rsi # 0x2e2033
leaq 0x68(%rsp), %rdi
callq 0x98e10
jmp 0x169575
movq 0x20(%rsp), %rdi
movq 0x98(%rsp), %rdx
leaq 0x68(%rsp), %rsi
callq 0x104830
jmp 0x16958e
leaq 0x68(%rsp), %rdi
callq 0x65a60
leaq 0x67(%rsp), %rdi
callq 0x65a30
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rax
movq $0x0, 0xc0(%rax)
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x172d30
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0xc8, %rdi
callq 0x172d60
jmp 0x1695de
leaq 0x30(%rsp), %rdi
callq 0x172db0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0xe8, %rdi
callq 0x131cd0
movq 0x20(%rsp), %rax
movb $0x1, 0x108(%rax)
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x16963a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x65a60
leaq 0x67(%rsp), %rdi
callq 0x65a30
jmp 0x16965e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x172db0
movq 0x58(%rsp), %rdi
callq 0x64e40
nopl (%rax,%rax)
| _ZN7httplib8Response28set_chunked_content_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbmRNS_8DataSinkEEES9_IFvbEE:
sub rsp, 0A8h
mov [rsp+0A8h+var_98], rdx
mov [rsp+0A8h+var_90], rcx
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_20], rcx
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_88], rax
lea rdi, [rsp+0A8h+var_41]
mov [rsp+0A8h+var_80], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0A8h+var_80]
lea rsi, aContentType; "Content-Type"
lea rdi, [rsp+0A8h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_169575:
mov rdi, [rsp+0A8h+var_88]
mov rdx, [rsp+0A8h+var_10]
lea rsi, [rsp+0A8h+var_40]
call _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; httplib::Response::set_header(std::string const&,std::string const&)
jmp short $+2
loc_16958E:
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rsi, [rsp+0A8h+var_98]
mov rax, [rsp+0A8h+var_88]
mov qword ptr [rax+0C0h], 0
lea rdi, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_A0], rdi
call _ZN7httplib6detail22ContentProviderAdapterC2EOSt8functionIFbmRNS_8DataSinkEEE; httplib::detail::ContentProviderAdapter::ContentProviderAdapter(std::function<bool ()(ulong,httplib::DataSink &)> &&)
mov rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_A0]
add rdi, 0C8h
call _ZNSt8functionIFbmmRN7httplib8DataSinkEEEaSINS0_6detail22ContentProviderAdapterEEENSt9enable_ifIXsrNS4_9_CallableIT_NS8_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISA_E4typeEE4typeES4_EE5valueESt5decayISA_EE4type4typeESt15__invoke_resultIRSL_JmmS2_EEEE5valueERS4_E4typeEOSA_
jmp short $+2
loc_1695DE:
lea rdi, [rsp+0A8h+var_78]; this
call _ZN7httplib6detail22ContentProviderAdapterD2Ev; httplib::detail::ContentProviderAdapter::~ContentProviderAdapter()
mov rsi, [rsp+0A8h+var_90]
mov rdi, [rsp+0A8h+var_88]
add rdi, 0E8h
call _ZNSt8functionIFvbEEaSEOS1_; std::function<void ()(bool)>::operator=(std::function<void ()(bool)>&&)
mov rax, [rsp+0A8h+var_88]
mov byte ptr [rax+108h], 1
add rsp, 0A8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_16963A
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_16963A:
lea rdi, [rsp+arg_5F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_16965E
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_28]; this
call _ZN7httplib6detail22ContentProviderAdapterD2Ev; httplib::detail::ContentProviderAdapter::~ContentProviderAdapter()
loc_16965E:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long httplib::Response::set_chunked_content_provider(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
_BYTE v7[55]; // [rsp+30h] [rbp-78h] BYREF
char v8; // [rsp+67h] [rbp-41h] BYREF
_BYTE v9[32]; // [rsp+68h] [rbp-40h] BYREF
long long v10; // [rsp+88h] [rbp-20h]
long long v11; // [rsp+90h] [rbp-18h]
long long v12; // [rsp+98h] [rbp-10h]
long long v13; // [rsp+A0h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
std::allocator<char>::allocator(&v8, a2, a3);
std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"Content-Type", (long long)&v8);
httplib::Response::set_header(a1, (long long)v9, v12);
std::string::~string(v9);
std::allocator<char>::~allocator(&v8);
*(_QWORD *)(a1 + 192) = 0LL;
httplib::detail::ContentProviderAdapter::ContentProviderAdapter(v7, a3);
std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::operator=<httplib::detail::ContentProviderAdapter>(
a1 + 200,
v7);
httplib::detail::ContentProviderAdapter::~ContentProviderAdapter((httplib::detail::ContentProviderAdapter *)v7);
std::function<void ()(bool)>::operator=(a1 + 232, a4);
result = a1;
*(_BYTE *)(a1 + 264) = 1;
return result;
}
| |||
45,962 | httplib::Response::set_chunked_content_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>) | monkey531[P]llama/examples/server/httplib.h | inline void Response::set_chunked_content_provider(
const std::string &content_type, ContentProviderWithoutLength provider,
ContentProviderResourceReleaser resource_releaser) {
set_header("Content-Type", content_type);
content_length_ = 0;
content_provider_ = detail::ContentProviderAdapter(std::move(provider));
content_provider_resource_releaser_ = std::move(resource_releaser);
is_chunked_content_provider_ = true;
} | O3 | c | httplib::Response::set_chunked_content_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, httplib::DataSink&)>, std::function<void (bool)>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc0774(%rip), %rsi # 0x146fdf
leaq 0xc0779(%rip), %rdx # 0x146feb
movq %rsp, %rdi
callq 0x4b514
movq %rsp, %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x624da
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x8689e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq $0x0, 0xc0(%rbx)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x894c4
leaq 0xc8(%rbx), %rdi
movq %r12, %rsi
callq 0x8940e
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x868dd
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xe8(%rbx), %rdi
movq %r14, %rsi
callq 0x72060
movb $0x1, 0x108(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x8691f
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x86945
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x86945
movq %rax, %rdi
callq 0x3f24b
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x86945
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x86945
movq %rax, %rbx
movq %rbx, %rdi
callq 0x20380
nop
| _ZN7httplib8Response28set_chunked_content_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbmRNS_8DataSinkEEES9_IFvbEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea r13, [rsp+48h+var_38]
mov [r13-10h], r13
lea rsi, aContentType; "Content-Type"
lea rdx, aContentType+0Ch; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, rsp
mov rdi, rbx
mov rdx, r12
call _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; httplib::Response::set_header(std::string const&,std::string const&)
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r13
jz short loc_8689E
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8689E:
mov qword ptr [rbx+0C0h], 0
mov r12, rsp
mov rdi, r12
mov rsi, r15
call _ZNSt8functionIFbmRN7httplib8DataSinkEEEC2ERKS4_; std::function<bool ()(ulong,httplib::DataSink &)>::function(std::function<bool ()(ulong,httplib::DataSink &)> const&)
lea rdi, [rbx+0C8h]
mov rsi, r12
call _ZNSt8functionIFbmmRN7httplib8DataSinkEEEaSINS0_6detail22ContentProviderAdapterEEENSt9enable_ifIXsrNS4_9_CallableIT_NS8_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISA_E4typeEE4typeES4_EE5valueESt5decayISA_EE4type4typeESt15__invoke_resultIRSL_JmmS2_EEEE5valueERS4_E4typeEOSA_
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_868DD
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_868DD:
lea rdi, [rbx+0E8h]
mov rsi, r14
call _ZNSt8functionIFvbEEaSEOS1_; std::function<void ()(bool)>::operator=(std::function<void ()(bool)>&&)
mov byte ptr [rbx+108h], 1
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_8691F
mov rbx, rax
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_86945
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_86945
loc_8691F:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r13
jz short loc_86945
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_86945
mov rbx, rax
loc_86945:
mov rdi, rbx
call __Unwind_Resume
| __int128 * httplib::Response::set_chunked_content_provider(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long v6; // rcx
long long v7; // r8
long long v8; // r9
__int128 *result; // rax
void *v10[2]; // [rsp+0h] [rbp-48h] BYREF
_QWORD v11[7]; // [rsp+10h] [rbp-38h] BYREF
v10[0] = v11;
std::string::_M_construct<char const*>((long long)v10, "Content-Type", (long long)"");
httplib::Response::set_header(a1, (long long *)v10, a2, v6, v7, v8, (char)v10[0]);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
*(_QWORD *)(a1 + 192) = 0LL;
std::function<bool ()(unsigned long,httplib::DataSink &)>::function(v10, a3);
std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::operator=<httplib::detail::ContentProviderAdapter>(
a1 + 200,
v10);
if ( v11[0] )
((void ( *)(void **, void **, long long))v11[0])(v10, v10, 3LL);
result = std::function<void ()(bool)>::operator=((__int128 *)(a1 + 232), a4);
*(_BYTE *)(a1 + 264) = 1;
return result;
}
| set_chunked_content_provider:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
LAB_00186864:
LEA RSI,[0x246fdf]
LEA RDX,[0x246feb]
MOV RDI,RSP
CALL 0x0014b514
LAB_0018687a:
MOV RSI,RSP
MOV RDI,RBX
MOV RDX,R12
CALL 0x001624da
LAB_00186888:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x0018689e
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011fae0
LAB_0018689e:
MOV qword ptr [RBX + 0xc0],0x0
MOV R12,RSP
MOV RDI,R12
MOV RSI,R15
CALL 0x001894c4
LEA RDI,[RBX + 0xc8]
LAB_001868be:
MOV RSI,R12
CALL 0x0018940e
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001868dd
LAB_001868d0:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001868dd:
LEA RDI,[RBX + 0xe8]
MOV RSI,R14
CALL 0x00172060
MOV byte ptr [RBX + 0x108],0x1
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::Response::set_chunked_content_provider(std::__cxx11::string const&, std::function<bool
(unsigned long, httplib::DataSink&)>, std::function<void (bool)>) */
void __thiscall
httplib::Response::set_chunked_content_provider
(Response *this,string *param_1,function *param_3,function *param_4)
{
code **local_48 [2];
code *local_38 [2];
local_48[0] = local_38;
/* try { // try from 00186864 to 00186879 has its CatchHandler @ 00186942 */
std::__cxx11::string::_M_construct<char_const*>(local_48,"Content-Type","");
/* try { // try from 0018687a to 00186887 has its CatchHandler @ 00186927 */
set_header(this,(string *)local_48,param_1);
if (local_48[0] != local_38) {
operator_delete(local_48[0],(ulong)(local_38[0] + 1));
}
*(int8 *)(this + 0xc0) = 0;
std::function<bool(unsigned_long,httplib::DataSink&)>::function
((function<bool(unsigned_long,httplib::DataSink&)> *)local_48,param_3);
/* try { // try from 001868be to 001868c5 has its CatchHandler @ 00186903 */
std::function<bool(unsigned_long,unsigned_long,httplib::DataSink&)>::operator=
((function<bool(unsigned_long,unsigned_long,httplib::DataSink&)> *)(this + 200),
(ContentProviderAdapter *)local_48);
if (local_38[0] != (code *)0x0) {
/* try { // try from 001868d0 to 001868dc has its CatchHandler @ 00186901 */
(*local_38[0])(local_48,local_48,3);
}
std::function<void(bool)>::operator=((function<void(bool)> *)(this + 0xe8),param_4);
this[0x108] = (Response)0x1;
return;
}
| |
45,963 | mi_ck_real_write_btree | eloqsql/storage/myisam/mi_write.c | int _mi_ck_real_write_btree(MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *key, uint key_length, my_off_t *root, uint comp_flag)
{
int error;
DBUG_ENTER("_mi_ck_real_write_btree");
/* key_length parameter is used only if comp_flag is SEARCH_FIND */
if (*root == HA_OFFSET_ERROR ||
(error=w_search(info, keyinfo, comp_flag, key, key_length,
*root, (uchar *) 0, (uchar*) 0,
(my_off_t) 0, 1)) > 0)
error=_mi_enlarge_root(info,keyinfo,key,root);
DBUG_RETURN(error);
} | O0 | c | mi_ck_real_write_btree:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpq $-0x1, (%rax)
je 0x506c4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movq -0x28(%rbp), %rax
movq (%rax), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
callq 0x506f0
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jle 0x506dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x50dd0
movl %eax, -0x30(%rbp)
jmp 0x506de
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _mi_ck_real_write_btree:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_506C4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov r8d, [rbp+var_1C]
mov rax, [rbp+var_28]
mov r9, [rax]
xor eax, eax
mov [rsp+60h+var_60], 0
mov [rsp+60h+var_58], 0
mov [rsp+60h+var_50], 0
mov [rsp+60h+var_48], 1
call w_search
mov [rbp+var_30], eax
cmp eax, 0
jle short loc_506DC
loc_506C4:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
call _mi_enlarge_root
mov [rbp+var_30], eax
loc_506DC:
jmp short $+2
loc_506DE:
mov eax, [rbp+var_30]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 60h
pop rbp
retn
| long long mi_ck_real_write_btree(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int a6)
{
int v7; // [rsp+30h] [rbp-30h]
if ( *a5 == -1LL )
return (unsigned int)mi_enlarge_root(a1, a2, a3, a5);
v7 = w_search(a1, a2, a6, a3, a4, *a5, 0LL, 0LL, 0LL, 1);
if ( v7 > 0 )
return (unsigned int)mi_enlarge_root(a1, a2, a3, a5);
return (unsigned int)v7;
}
| _mi_ck_real_write_btree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],-0x1
JZ 0x001506c4
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8D,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RAX]
XOR EAX,EAX
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x18],0x1
CALL 0x001506f0
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0x0
JLE 0x001506dc
LAB_001506c4:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x00150dd0
MOV dword ptr [RBP + -0x30],EAX
LAB_001506dc:
JMP 0x001506de
LAB_001506de:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x60
POP RBP
RET
|
int _mi_ck_real_write_btree
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
long *param_5,int4 param_6)
{
int iVar1;
if ((*param_5 != -1) &&
(iVar1 = w_search(param_1,param_2,param_6,param_3,param_4,*param_5,0,0,0,1), iVar1 < 1)) {
return iVar1;
}
iVar1 = _mi_enlarge_root(param_1,param_2,param_3,param_5);
return iVar1;
}
| |
45,964 | mi_ck_real_write_btree | eloqsql/storage/myisam/mi_write.c | int _mi_ck_real_write_btree(MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *key, uint key_length, my_off_t *root, uint comp_flag)
{
int error;
DBUG_ENTER("_mi_ck_real_write_btree");
/* key_length parameter is used only if comp_flag is SEARCH_FIND */
if (*root == HA_OFFSET_ERROR ||
(error=w_search(info, keyinfo, comp_flag, key, key_length,
*root, (uchar *) 0, (uchar*) 0,
(my_off_t) 0, 1)) > 0)
error=_mi_enlarge_root(info,keyinfo,key,root);
DBUG_RETURN(error);
} | O3 | c | mi_ck_real_write_btree:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%r8), %rax
cmpq $-0x1, %rax
je 0x4182e
movl %ecx, %r8d
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movl $0x1, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movl %r9d, %edx
movq %r14, %rcx
movq %rax, %r9
callq 0x41858
testl %eax, %eax
jle 0x4184b
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x41c14
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _mi_ck_real_write_btree:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov rbx, r8
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rax, [r8]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_4182E
mov r8d, ecx
xorps xmm0, xmm0
movups [rsp+40h+var_40], xmm0
mov [rsp+40h+var_28], 1
mov [rsp+40h+var_30], 0
mov rdi, r12
mov rsi, r15
mov edx, r9d
mov rcx, r14
mov r9, rax
call w_search
test eax, eax
jle short loc_4184B
loc_4182E:
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, rbx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _mi_enlarge_root
loc_4184B:
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long mi_ck_real_write_btree(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int a6)
{
long long result; // rax
if ( *a5 == -1LL )
return mi_enlarge_root(a1, a2, a3, a5);
result = w_search(a1, a2, a6, a3, a4, *a5, 0LL, 0LL, 0LL, 1);
if ( (int)result > 0 )
return mi_enlarge_root(a1, a2, a3, a5);
return result;
}
| _mi_ck_real_write_btree:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,R8
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RAX,qword ptr [R8]
CMP RAX,-0x1
JZ 0x0014182e
MOV R8D,ECX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x1
MOV qword ptr [RSP + 0x10],0x0
MOV RDI,R12
MOV RSI,R15
MOV EDX,R9D
MOV RCX,R14
MOV R9,RAX
CALL 0x00141858
TEST EAX,EAX
JLE 0x0014184b
LAB_0014182e:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00141c14
LAB_0014184b:
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void _mi_ck_real_write_btree
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
long *param_5,int4 param_6)
{
int iVar1;
if (*param_5 != -1) {
iVar1 = w_search(param_1,param_2,param_6,param_3,param_4,*param_5,0,0,0,1);
if (iVar1 < 1) {
return;
}
}
_mi_enlarge_root(param_1,param_2,param_3,param_5);
return;
}
| |
45,965 | str_to_TIME | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | int str_to_TIME(const char *str, size_t length, MYSQL_TIME *tm)
{
const char *p = str;
const char *end = str + length;
int is_time = 0;
if (!p)
goto error;
while (p < end && isspace(*p))
p++;
while (p < end && isspace(end[-1]))
end--;
if (end -p < 5)
goto error;
if (*p == '-')
{
tm->neg = 1;
/* Only TIME can't be negative.*/
is_time = 1;
p++;
}
else
{
int i;
tm->neg = 0;
/*
Date parsing (in server) accepts leading zeroes, thus position of the delimiters
is not fixed. Scan the string to find out what we need to parse.
*/
for (i = 1; p + i < end; i++)
{
if(p[i] == '-' || p [i] == ':')
{
is_time = p[i] == ':';
break;
}
}
}
if (is_time)
{
if (parse_time(p, end - p, &p, tm))
goto error;
tm->year = tm->month = tm->day = 0;
tm->time_type = MYSQL_TIMESTAMP_TIME;
return 0;
}
if (parse_date(p, end - p, &p, tm))
goto error;
if (p == end || p[0] != ' ')
{
tm->hour = tm->minute = tm->second = tm->second_part = 0;
tm->time_type = MYSQL_TIMESTAMP_DATE;
return 0;
}
/* Skip space. */
p++;
if (parse_time(p, end - p, &p, tm))
goto error;
/* In DATETIME, hours must be < 24.*/
if (tm->hour > 23)
goto error;
tm->time_type = MYSQL_TIMESTAMP_DATETIME;
return 0;
error:
memset(tm, 0, sizeof(*tm));
tm->time_type = MYSQL_TIMESTAMP_ERROR;
return 1;
} | O3 | c | str_to_TIME:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r10
testq %rdi, %rdi
je 0x347fa
movq %rsi, %r11
movq %rdi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
movq %r10, -0x40(%rbp)
movq %rsi, %r12
jle 0x346b7
leaq (%r15,%r11), %r14
callq 0x144e0
movq %r12, %r11
movq (%rax), %rax
movq %r15, %rbx
movsbq (%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x346b7
incq %rbx
cmpq %r14, %rbx
jb 0x346a4
movq %rbx, -0x38(%rbp)
movl $0x1, %eax
subq %r15, %rax
movq %rbx, %rcx
subq %r15, %rcx
movq %rax, %r13
movq %rcx, %r14
leaq (%r15,%r11), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, %rbx
jae 0x346ff
callq 0x144e0
movq %r12, %r11
movq (%rax), %rdx
movsbq -0x1(%r15,%r12), %rsi
decq %r15
leaq 0x1(%r13), %rax
leaq 0x1(%r14), %rcx
testb $0x20, 0x1(%rdx,%rsi,2)
jne 0x346c9
movq %r11, %rsi
subq %r14, %rsi
cmpq $0x5, %rsi
movq -0x40(%rbp), %r10
jl 0x347fa
leaq 0x1(%rbx), %rdi
cmpb $0x2d, (%rbx)
jne 0x34764
movb $0x1, 0x20(%r10)
movq %rdi, -0x38(%rbp)
notq %r14
addq %r11, %r14
movq %r14, %rsi
leaq -0x38(%rbp), %rdx
movq %r10, %rcx
callq 0x34a0f
movq -0x40(%rbp), %r10
testl %eax, %eax
jne 0x347fa
movl $0x0, 0x8(%r10)
movq $0x0, (%r10)
movl $0x2, 0x24(%r10)
xorl %eax, %eax
jmp 0x3481b
movb $0x0, 0x20(%r10)
movq -0x30(%rbp), %r14
cmpq %r14, %rdi
jae 0x34788
movzbl (%rdi), %eax
cmpl $0x2d, %eax
je 0x34788
cmpl $0x3a, %eax
je 0x348cf
incq %rdi
jmp 0x3476d
movabsq $0x199999999999999a, %rcx # imm = 0x199999999999999A
xorl %eax, %eax
xorl %edx, %edx
movsbq (%rbx,%rax), %rsi
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
setb %dil
jae 0x347e4
cmpq %rcx, %rdx
jae 0x347e4
leaq (%rdx,%rdx), %rdi
leaq (%rdi,%rdi,4), %rdi
movl $0x2f, %r8d
subq %rsi, %r8
cmpq %r8, %rdi
ja 0x347e1
leaq (%rdi,%rsi), %rdx
addq $-0x30, %rdx
leaq (%rbx,%rax), %rsi
incq %rsi
incq %rax
cmpq %r14, %rsi
jb 0x34796
addq %rbx, %rax
xorl %esi, %esi
jmp 0x347f1
movb $0x1, %dil
testq %rax, %rax
sete %sil
orb %dil, %sil
addq %rbx, %rax
movq %rdx, %rdi
shrq $0x20, %rdi
je 0x3482a
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r10)
movups %xmm0, (%r10)
movq $0x0, 0x20(%r10)
movl $0xffffffff, 0x24(%r10) # imm = 0xFFFFFFFF
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, (%r10)
cmpq $0x2710, %rdx # imm = 0x2710
setae %dil
orb %dil, %sil
jne 0x347fa
cmpq %rax, -0x30(%rbp)
je 0x347fa
cmpb $0x2d, (%rax)
jne 0x347fa
movq %rax, %rsi
subq %rbx, %rsi
cmpq $0x2, %rsi
jne 0x3486a
leal 0x7d0(%rdx), %esi
leal 0x76c(%rdx), %edi
cmpq $0x46, %rdx
cmovbl %esi, %edi
movl %edi, (%r10)
movq %r11, %rdx
subq %rax, %rdx
subq %r13, %rdx
testq %rdx, %rdx
jle 0x347fa
incq %rax
xorl %esi, %esi
xorl %edx, %edx
movq -0x30(%rbp), %r14
movsbq (%rax,%rsi), %rdi
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
setb %r8b
jae 0x348da
cmpq %rcx, %rdx
jae 0x348da
leaq (%rdx,%rdx), %r8
leaq (%r8,%r8,4), %r8
movl $0x2f, %r9d
subq %rdi, %r9
cmpq %r9, %r8
ja 0x348d7
leaq (%r8,%rdi), %rdx
addq $-0x30, %rdx
leaq (%rax,%rsi), %rdi
incq %rdi
incq %rsi
cmpq %r14, %rdi
jb 0x34883
addq %rsi, %rax
xorl %esi, %esi
jmp 0x348e7
movq %rbx, %rdi
jmp 0x3472e
movb $0x1, %r8b
addq %rsi, %rax
testq %rsi, %rsi
sete %sil
orb %r8b, %sil
movq %rdx, %rdi
shrq $0x20, %rdi
jne 0x347fa
movl %edx, 0x4(%r10)
cmpq $0xd, %rdx
setae %dl
orb %dl, %sil
jne 0x347fa
cmpq %rax, -0x30(%rbp)
je 0x347fa
cmpb $0x2d, (%rax)
jne 0x347fa
movq %r11, %rdx
subq %rax, %rdx
subq %r13, %rdx
testq %rdx, %rdx
jle 0x347fa
incq %rax
xorl %esi, %esi
xorl %edx, %edx
movq -0x30(%rbp), %r14
movsbq (%rax,%rsi), %rdi
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
setb %r8b
jae 0x34987
cmpq %rcx, %rdx
jae 0x34987
leaq (%rdx,%rdx), %r8
leaq (%r8,%r8,4), %r8
movl $0x2f, %r9d
subq %rdi, %r9
cmpq %r9, %r8
ja 0x34984
leaq (%r8,%rdi), %rdx
addq $-0x30, %rdx
leaq (%rax,%rsi), %rdi
incq %rdi
incq %rsi
cmpq %r14, %rdi
jb 0x34938
addq %rsi, %rax
xorl %ecx, %ecx
jmp 0x34993
movb $0x1, %r8b
addq %rsi, %rax
testq %rsi, %rsi
sete %cl
orb %r8b, %cl
movl %edx, 0x8(%r10)
movq %rax, -0x38(%rbp)
testb %cl, %cl
jne 0x347fa
cmpq $0x1f, %rdx
ja 0x347fa
cmpq %rax, -0x30(%rbp)
je 0x349f8
cmpb $0x20, (%rax)
jne 0x349f8
leaq 0x1(%rax), %rdi
leaq -0x38(%rbp), %rdx
movq %rdi, (%rdx)
subq %rax, %r11
subq %r13, %r11
movq %r11, %rsi
movq %r10, %rcx
callq 0x34a0f
movq -0x40(%rbp), %r10
testl %eax, %eax
jne 0x347fa
cmpl $0x17, 0xc(%r10)
ja 0x347fa
movl $0x1, 0x24(%r10)
jmp 0x3475d
xorl %eax, %eax
movl %eax, 0x24(%r10)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%r10)
movl %eax, 0x1c(%r10)
jmp 0x3481b
| str_to_TIME:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r10, rdx
test rdi, rdi
jz loc_347FA
mov r11, rsi
mov r15, rdi
mov rbx, rdi
test rsi, rsi
mov [rbp+var_40], r10
mov r12, rsi
jle short loc_346B7
lea r14, [r15+r11]
call ___ctype_b_loc
mov r11, r12
mov rax, [rax]
mov rbx, r15
loc_346A4:
movsx rcx, byte ptr [rbx]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_346B7
inc rbx
cmp rbx, r14
jb short loc_346A4
loc_346B7:
mov [rbp+var_38], rbx
mov eax, 1
sub rax, r15
mov rcx, rbx
sub rcx, r15
loc_346C9:
mov r13, rax
mov r14, rcx
lea rax, [r15+r11]
mov [rbp+var_30], rax
cmp rbx, rax
jnb short loc_346FF
call ___ctype_b_loc
mov r11, r12
mov rdx, [rax]
movsx rsi, byte ptr [r15+r12-1]
dec r15
lea rax, [r13+1]
lea rcx, [r14+1]
test byte ptr [rdx+rsi*2+1], 20h
jnz short loc_346C9
loc_346FF:
mov rsi, r11
sub rsi, r14
cmp rsi, 5
mov r10, [rbp+var_40]
jl loc_347FA
lea rdi, [rbx+1]
cmp byte ptr [rbx], 2Dh ; '-'
jnz short loc_34764
mov byte ptr [r10+20h], 1
mov [rbp+var_38], rdi
not r14
add r14, r11
mov rsi, r14
loc_3472E:
lea rdx, [rbp+var_38]
mov rcx, r10
call parse_time
mov r10, [rbp+var_40]
test eax, eax
jnz loc_347FA
mov dword ptr [r10+8], 0
mov qword ptr [r10], 0
mov dword ptr [r10+24h], 2
loc_3475D:
xor eax, eax
jmp loc_3481B
loc_34764:
mov byte ptr [r10+20h], 0
mov r14, [rbp+var_30]
loc_3476D:
cmp rdi, r14
jnb short loc_34788
movzx eax, byte ptr [rdi]
cmp eax, 2Dh ; '-'
jz short loc_34788
cmp eax, 3Ah ; ':'
jz loc_348CF
inc rdi
jmp short loc_3476D
loc_34788:
mov rcx, 199999999999999Ah
xor eax, eax
xor edx, edx
loc_34796:
movsx rsi, byte ptr [rbx+rax]
lea edi, [rsi-30h]
cmp dil, 0Ah
setb dil
jnb short loc_347E4
cmp rdx, rcx
jnb short loc_347E4
lea rdi, [rdx+rdx]
lea rdi, [rdi+rdi*4]
mov r8d, 2Fh ; '/'
sub r8, rsi
cmp rdi, r8
ja short loc_347E1
lea rdx, [rdi+rsi]
add rdx, 0FFFFFFFFFFFFFFD0h
lea rsi, [rbx+rax]
inc rsi
inc rax
cmp rsi, r14
jb short loc_34796
add rax, rbx
xor esi, esi
jmp short loc_347F1
loc_347E1:
mov dil, 1
loc_347E4:
test rax, rax
setz sil
or sil, dil
add rax, rbx
loc_347F1:
mov rdi, rdx
shr rdi, 20h
jz short loc_3482A
loc_347FA:
xorps xmm0, xmm0
movups xmmword ptr [r10+10h], xmm0
movups xmmword ptr [r10], xmm0
mov qword ptr [r10+20h], 0
mov dword ptr [r10+24h], 0FFFFFFFFh
mov eax, 1
loc_3481B:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3482A:
mov [r10], edx
cmp rdx, 2710h
setnb dil
or sil, dil
jnz short loc_347FA
cmp [rbp+var_30], rax
jz short loc_347FA
cmp byte ptr [rax], 2Dh ; '-'
jnz short loc_347FA
mov rsi, rax
sub rsi, rbx
cmp rsi, 2
jnz short loc_3486A
lea esi, [rdx+7D0h]
lea edi, [rdx+76Ch]
cmp rdx, 46h ; 'F'
cmovb edi, esi
mov [r10], edi
loc_3486A:
mov rdx, r11
sub rdx, rax
sub rdx, r13
test rdx, rdx
jle short loc_347FA
inc rax
xor esi, esi
xor edx, edx
mov r14, [rbp+var_30]
loc_34883:
movsx rdi, byte ptr [rax+rsi]
lea r8d, [rdi-30h]
cmp r8b, 0Ah
setb r8b
jnb short loc_348DA
cmp rdx, rcx
jnb short loc_348DA
lea r8, [rdx+rdx]
lea r8, [r8+r8*4]
mov r9d, 2Fh ; '/'
sub r9, rdi
cmp r8, r9
ja short loc_348D7
lea rdx, [r8+rdi]
add rdx, 0FFFFFFFFFFFFFFD0h
lea rdi, [rax+rsi]
inc rdi
inc rsi
cmp rdi, r14
jb short loc_34883
add rax, rsi
xor esi, esi
jmp short loc_348E7
loc_348CF:
mov rdi, rbx
jmp loc_3472E
loc_348D7:
mov r8b, 1
loc_348DA:
add rax, rsi
test rsi, rsi
setz sil
or sil, r8b
loc_348E7:
mov rdi, rdx
shr rdi, 20h
jnz loc_347FA
mov [r10+4], edx
cmp rdx, 0Dh
setnb dl
or sil, dl
jnz loc_347FA
cmp [rbp+var_30], rax
jz loc_347FA
cmp byte ptr [rax], 2Dh ; '-'
jnz loc_347FA
mov rdx, r11
sub rdx, rax
sub rdx, r13
test rdx, rdx
jle loc_347FA
inc rax
xor esi, esi
xor edx, edx
mov r14, [rbp+var_30]
loc_34938:
movsx rdi, byte ptr [rax+rsi]
lea r8d, [rdi-30h]
cmp r8b, 0Ah
setb r8b
jnb short loc_34987
cmp rdx, rcx
jnb short loc_34987
lea r8, [rdx+rdx]
lea r8, [r8+r8*4]
mov r9d, 2Fh ; '/'
sub r9, rdi
cmp r8, r9
ja short loc_34984
lea rdx, [r8+rdi]
add rdx, 0FFFFFFFFFFFFFFD0h
lea rdi, [rax+rsi]
inc rdi
inc rsi
cmp rdi, r14
jb short loc_34938
add rax, rsi
xor ecx, ecx
jmp short loc_34993
loc_34984:
mov r8b, 1
loc_34987:
add rax, rsi
test rsi, rsi
setz cl
or cl, r8b
loc_34993:
mov [r10+8], edx
mov [rbp+var_38], rax
test cl, cl
jnz loc_347FA
cmp rdx, 1Fh
ja loc_347FA
cmp [rbp+var_30], rax
jz short loc_349F8
cmp byte ptr [rax], 20h ; ' '
jnz short loc_349F8
lea rdi, [rax+1]
lea rdx, [rbp+var_38]
mov [rdx], rdi
sub r11, rax
sub r11, r13
mov rsi, r11
mov rcx, r10
call parse_time
mov r10, [rbp+var_40]
test eax, eax
jnz loc_347FA
cmp dword ptr [r10+0Ch], 17h
ja loc_347FA
mov dword ptr [r10+24h], 1
jmp loc_3475D
loc_349F8:
xor eax, eax
mov [r10+24h], eax
xorps xmm0, xmm0
movups xmmword ptr [r10+0Ch], xmm0
mov [r10+1Ch], eax
jmp loc_3481B
| long long str_to_TIME(_BYTE *a1, long long a2, long long a3)
{
long long v3; // r10
long long v4; // r11
_BYTE *v5; // r15
unsigned __int8 *v6; // rbx
long long *v8; // rax
long long v9; // rax
long long v10; // rax
_BYTE *v11; // rcx
long long v12; // r13
signed long long v13; // r14
long long *v14; // rax
long long v15; // rdx
long long v16; // rsi
long long v17; // rsi
unsigned __int8 *v18; // rdi
int v19; // eax
long long result; // rax
int v21; // eax
long long v22; // rax
unsigned long long v23; // rdx
long long v24; // rsi
bool v25; // di
unsigned long long v26; // rsi
unsigned __int8 *v27; // rax
bool v28; // si
int v29; // edi
_BYTE *v30; // rax
long long v31; // rsi
unsigned long long v32; // rdx
long long v33; // rdi
bool v34; // r8
unsigned long long v35; // rdi
unsigned __int8 *v36; // rax
bool v37; // si
_BYTE *v38; // rax
long long v39; // rsi
unsigned long long v40; // rdx
long long v41; // rdi
bool v42; // r8
unsigned long long v43; // rdi
unsigned __int8 *v44; // rax
bool v45; // cl
int v46; // eax
unsigned __int8 *v48; // [rsp+8h] [rbp-38h] BYREF
unsigned __int8 *v49; // [rsp+10h] [rbp-30h]
v3 = a3;
if ( !a1 )
goto LABEL_29;
v4 = a2;
v5 = a1;
v6 = a1;
if ( a2 > 0 )
{
v8 = (long long *)__ctype_b_loc();
v4 = a2;
v9 = *v8;
v6 = a1;
do
{
if ( (*(_BYTE *)(v9 + 2LL * (char)*v6 + 1) & 0x20) == 0 )
break;
++v6;
}
while ( v6 < &a1[a2] );
}
v48 = v6;
v10 = 1LL - (_QWORD)a1;
v11 = (_BYTE *)(v6 - a1);
do
{
v12 = v10;
v13 = (signed long long)v11;
v49 = &v5[v4];
if ( v6 >= &v5[v4] )
break;
v14 = (long long *)__ctype_b_loc();
v4 = a2;
v15 = *v14;
v16 = (char)v5[a2 - 1];
--v5;
v10 = v12 + 1;
v11 = (_BYTE *)(v13 + 1);
}
while ( (*(_BYTE *)(v15 + 2 * v16 + 1) & 0x20) != 0 );
v17 = v4 - v13;
v3 = a3;
if ( v4 - v13 < 5 )
goto LABEL_29;
v18 = v6 + 1;
if ( *v6 == 45 )
{
*(_BYTE *)(a3 + 32) = 1;
v48 = v6 + 1;
v17 = v4 + ~v13;
LABEL_12:
v19 = parse_time(v18, v17, &v48, a3);
v3 = a3;
if ( !v19 )
{
*(_DWORD *)(a3 + 8) = 0;
*(_QWORD *)a3 = 0LL;
*(_DWORD *)(a3 + 36) = 2;
return 0LL;
}
goto LABEL_29;
}
*(_BYTE *)(a3 + 32) = 0;
while ( v18 < v49 )
{
v21 = *v18;
if ( v21 == 45 )
break;
if ( v21 == 58 )
{
v18 = v6;
goto LABEL_12;
}
++v18;
}
v22 = 0LL;
v23 = 0LL;
while ( 1 )
{
v24 = (char)v6[v22];
v25 = (unsigned __int8)(v24 - 48) < 0xAu;
if ( (unsigned __int8)(v24 - 48) >= 0xAu || v23 >= 0x199999999999999ALL )
break;
if ( 10 * v23 > 47 - v24 )
{
v25 = 1;
break;
}
v23 = 10 * v23 + v24 - 48;
v26 = (unsigned long long)&v6[++v22];
if ( v26 >= (unsigned long long)v49 )
{
v27 = &v6[v22];
v28 = 0;
goto LABEL_28;
}
}
v28 = v25 || v22 == 0;
v27 = &v6[v22];
LABEL_28:
if ( HIDWORD(v23) )
goto LABEL_29;
*(_DWORD *)a3 = v23;
if ( v23 >= 0x2710 || v28 || v49 == v27 || *v27 != 45 )
goto LABEL_29;
if ( v27 - v6 == 2 )
{
v29 = v23 + 1900;
if ( v23 < 0x46 )
v29 = v23 + 2000;
*(_DWORD *)a3 = v29;
}
if ( v4 - (long long)v27 - v12 <= 0 )
goto LABEL_29;
v30 = v27 + 1;
v31 = 0LL;
v32 = 0LL;
while ( 1 )
{
v33 = (char)v30[v31];
v34 = (unsigned __int8)(v33 - 48) < 0xAu;
if ( (unsigned __int8)(v33 - 48) >= 0xAu || v32 >= 0x199999999999999ALL )
break;
if ( 10 * v32 > 47 - v33 )
{
v34 = 1;
break;
}
v32 = 10 * v32 + v33 - 48;
v35 = (unsigned long long)&v30[++v31];
if ( v35 >= (unsigned long long)v49 )
{
v36 = &v30[v31];
v37 = 0;
goto LABEL_47;
}
}
v36 = &v30[v31];
v37 = v34 || v31 == 0;
LABEL_47:
if ( HIDWORD(v32) )
goto LABEL_29;
*(_DWORD *)(a3 + 4) = v32;
if ( v32 >= 0xD || v37 || v49 == v36 || *v36 != 45 || v4 - (long long)v36 - v12 <= 0 )
goto LABEL_29;
v38 = v36 + 1;
v39 = 0LL;
v40 = 0LL;
while ( 1 )
{
v41 = (char)v38[v39];
v42 = (unsigned __int8)(v41 - 48) < 0xAu;
if ( (unsigned __int8)(v41 - 48) >= 0xAu || v40 >= 0x199999999999999ALL )
break;
if ( 10 * v40 > 47 - v41 )
{
v42 = 1;
break;
}
v40 = 10 * v40 + v41 - 48;
v43 = (unsigned long long)&v38[++v39];
if ( v43 >= (unsigned long long)v49 )
{
v44 = &v38[v39];
v45 = 0;
goto LABEL_60;
}
}
v44 = &v38[v39];
v45 = v42 || v39 == 0;
LABEL_60:
*(_DWORD *)(a3 + 8) = v40;
v48 = v44;
if ( v45 || v40 > 0x1F )
{
LABEL_29:
*(_OWORD *)(v3 + 16) = 0LL;
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 32) = 0LL;
*(_DWORD *)(v3 + 36) = -1;
return 1LL;
}
if ( v49 != v44 && *v44 == 32 )
{
v48 = v44 + 1;
v46 = parse_time(v44 + 1, v4 - (_QWORD)v44 - v12, &v48, a3);
v3 = a3;
if ( !v46 && *(_DWORD *)(a3 + 12) <= 0x17u )
{
*(_DWORD *)(a3 + 36) = 1;
return 0LL;
}
goto LABEL_29;
}
result = 0LL;
*(_DWORD *)(a3 + 36) = 0;
*(_OWORD *)(a3 + 12) = 0LL;
*(_DWORD *)(a3 + 28) = 0;
return result;
}
| str_to_TIME:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R10,RDX
TEST RDI,RDI
JZ 0x001347fa
MOV R11,RSI
MOV R15,RDI
MOV RBX,RDI
TEST RSI,RSI
MOV qword ptr [RBP + -0x40],R10
MOV R12,RSI
JLE 0x001346b7
LEA R14,[R15 + R11*0x1]
CALL 0x001144e0
MOV R11,R12
MOV RAX,qword ptr [RAX]
MOV RBX,R15
LAB_001346a4:
MOVSX RCX,byte ptr [RBX]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x001346b7
INC RBX
CMP RBX,R14
JC 0x001346a4
LAB_001346b7:
MOV qword ptr [RBP + -0x38],RBX
MOV EAX,0x1
SUB RAX,R15
MOV RCX,RBX
SUB RCX,R15
LAB_001346c9:
MOV R13,RAX
MOV R14,RCX
LEA RAX,[R15 + R11*0x1]
MOV qword ptr [RBP + -0x30],RAX
CMP RBX,RAX
JNC 0x001346ff
CALL 0x001144e0
MOV R11,R12
MOV RDX,qword ptr [RAX]
MOVSX RSI,byte ptr [R15 + R12*0x1 + -0x1]
DEC R15
LEA RAX,[R13 + 0x1]
LEA RCX,[R14 + 0x1]
TEST byte ptr [RDX + RSI*0x2 + 0x1],0x20
JNZ 0x001346c9
LAB_001346ff:
MOV RSI,R11
SUB RSI,R14
CMP RSI,0x5
MOV R10,qword ptr [RBP + -0x40]
JL 0x001347fa
LEA RDI,[RBX + 0x1]
CMP byte ptr [RBX],0x2d
JNZ 0x00134764
MOV byte ptr [R10 + 0x20],0x1
MOV qword ptr [RBP + -0x38],RDI
NOT R14
ADD R14,R11
MOV RSI,R14
LAB_0013472e:
LEA RDX,[RBP + -0x38]
MOV RCX,R10
CALL 0x00134a0f
MOV R10,qword ptr [RBP + -0x40]
TEST EAX,EAX
JNZ 0x001347fa
MOV dword ptr [R10 + 0x8],0x0
MOV qword ptr [R10],0x0
MOV dword ptr [R10 + 0x24],0x2
LAB_0013475d:
XOR EAX,EAX
JMP 0x0013481b
LAB_00134764:
MOV byte ptr [R10 + 0x20],0x0
MOV R14,qword ptr [RBP + -0x30]
LAB_0013476d:
CMP RDI,R14
JNC 0x00134788
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x2d
JZ 0x00134788
CMP EAX,0x3a
JZ 0x001348cf
INC RDI
JMP 0x0013476d
LAB_00134788:
MOV RCX,0x199999999999999a
XOR EAX,EAX
XOR EDX,EDX
LAB_00134796:
MOVSX RSI,byte ptr [RBX + RAX*0x1]
LEA EDI,[RSI + -0x30]
CMP DIL,0xa
SETC DIL
JNC 0x001347e4
CMP RDX,RCX
JNC 0x001347e4
LEA RDI,[RDX + RDX*0x1]
LEA RDI,[RDI + RDI*0x4]
MOV R8D,0x2f
SUB R8,RSI
CMP RDI,R8
JA 0x001347e1
LEA RDX,[RDI + RSI*0x1]
ADD RDX,-0x30
LEA RSI,[RBX + RAX*0x1]
INC RSI
INC RAX
CMP RSI,R14
JC 0x00134796
ADD RAX,RBX
XOR ESI,ESI
JMP 0x001347f1
LAB_001347e1:
MOV DIL,0x1
LAB_001347e4:
TEST RAX,RAX
SETZ SIL
OR SIL,DIL
ADD RAX,RBX
LAB_001347f1:
MOV RDI,RDX
SHR RDI,0x20
JZ 0x0013482a
LAB_001347fa:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R10 + 0x10],XMM0
MOVUPS xmmword ptr [R10],XMM0
MOV qword ptr [R10 + 0x20],0x0
MOV dword ptr [R10 + 0x24],0xffffffff
MOV EAX,0x1
LAB_0013481b:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013482a:
MOV dword ptr [R10],EDX
CMP RDX,0x2710
SETNC DIL
OR SIL,DIL
JNZ 0x001347fa
CMP qword ptr [RBP + -0x30],RAX
JZ 0x001347fa
CMP byte ptr [RAX],0x2d
JNZ 0x001347fa
MOV RSI,RAX
SUB RSI,RBX
CMP RSI,0x2
JNZ 0x0013486a
LEA ESI,[RDX + 0x7d0]
LEA EDI,[RDX + 0x76c]
CMP RDX,0x46
CMOVC EDI,ESI
MOV dword ptr [R10],EDI
LAB_0013486a:
MOV RDX,R11
SUB RDX,RAX
SUB RDX,R13
TEST RDX,RDX
JLE 0x001347fa
INC RAX
XOR ESI,ESI
XOR EDX,EDX
MOV R14,qword ptr [RBP + -0x30]
LAB_00134883:
MOVSX RDI,byte ptr [RAX + RSI*0x1]
LEA R8D,[RDI + -0x30]
CMP R8B,0xa
SETC R8B
JNC 0x001348da
CMP RDX,RCX
JNC 0x001348da
LEA R8,[RDX + RDX*0x1]
LEA R8,[R8 + R8*0x4]
MOV R9D,0x2f
SUB R9,RDI
CMP R8,R9
JA 0x001348d7
LEA RDX,[R8 + RDI*0x1]
ADD RDX,-0x30
LEA RDI,[RAX + RSI*0x1]
INC RDI
INC RSI
CMP RDI,R14
JC 0x00134883
ADD RAX,RSI
XOR ESI,ESI
JMP 0x001348e7
LAB_001348cf:
MOV RDI,RBX
JMP 0x0013472e
LAB_001348d7:
MOV R8B,0x1
LAB_001348da:
ADD RAX,RSI
TEST RSI,RSI
SETZ SIL
OR SIL,R8B
LAB_001348e7:
MOV RDI,RDX
SHR RDI,0x20
JNZ 0x001347fa
MOV dword ptr [R10 + 0x4],EDX
CMP RDX,0xd
SETNC DL
OR SIL,DL
JNZ 0x001347fa
CMP qword ptr [RBP + -0x30],RAX
JZ 0x001347fa
CMP byte ptr [RAX],0x2d
JNZ 0x001347fa
MOV RDX,R11
SUB RDX,RAX
SUB RDX,R13
TEST RDX,RDX
JLE 0x001347fa
INC RAX
XOR ESI,ESI
XOR EDX,EDX
MOV R14,qword ptr [RBP + -0x30]
LAB_00134938:
MOVSX RDI,byte ptr [RAX + RSI*0x1]
LEA R8D,[RDI + -0x30]
CMP R8B,0xa
SETC R8B
JNC 0x00134987
CMP RDX,RCX
JNC 0x00134987
LEA R8,[RDX + RDX*0x1]
LEA R8,[R8 + R8*0x4]
MOV R9D,0x2f
SUB R9,RDI
CMP R8,R9
JA 0x00134984
LEA RDX,[R8 + RDI*0x1]
ADD RDX,-0x30
LEA RDI,[RAX + RSI*0x1]
INC RDI
INC RSI
CMP RDI,R14
JC 0x00134938
ADD RAX,RSI
XOR ECX,ECX
JMP 0x00134993
LAB_00134984:
MOV R8B,0x1
LAB_00134987:
ADD RAX,RSI
TEST RSI,RSI
SETZ CL
OR CL,R8B
LAB_00134993:
MOV dword ptr [R10 + 0x8],EDX
MOV qword ptr [RBP + -0x38],RAX
TEST CL,CL
JNZ 0x001347fa
CMP RDX,0x1f
JA 0x001347fa
CMP qword ptr [RBP + -0x30],RAX
JZ 0x001349f8
CMP byte ptr [RAX],0x20
JNZ 0x001349f8
LEA RDI,[RAX + 0x1]
LEA RDX,[RBP + -0x38]
MOV qword ptr [RDX],RDI
SUB R11,RAX
SUB R11,R13
MOV RSI,R11
MOV RCX,R10
CALL 0x00134a0f
MOV R10,qword ptr [RBP + -0x40]
TEST EAX,EAX
JNZ 0x001347fa
CMP dword ptr [R10 + 0xc],0x17
JA 0x001347fa
MOV dword ptr [R10 + 0x24],0x1
JMP 0x0013475d
LAB_001349f8:
XOR EAX,EAX
MOV dword ptr [R10 + 0x24],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R10 + 0xc],XMM0
MOV dword ptr [R10 + 0x1c],EAX
JMP 0x0013481b
|
int8 str_to_TIME(char *param_1,long param_2,int *param_3)
{
char cVar1;
long lVar2;
int iVar3;
ushort **ppuVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
char *pcVar8;
long lVar9;
int iVar10;
char *pcVar11;
bool bVar12;
char *local_40;
char *local_38;
if (param_1 != (char *)0x0) {
pcVar8 = param_1;
if (0 < param_2) {
ppuVar4 = __ctype_b_loc();
do {
if ((*(byte *)((long)*ppuVar4 + (long)*pcVar8 * 2 + 1) & 0x20) == 0) break;
pcVar8 = pcVar8 + 1;
} while (pcVar8 < param_1 + param_2);
}
lVar5 = -(long)param_1;
uVar7 = (long)pcVar8 - (long)param_1;
local_40 = pcVar8;
do {
uVar6 = uVar7;
lVar5 = lVar5 + 1;
local_38 = param_1 + param_2;
if (local_38 <= pcVar8) break;
ppuVar4 = __ctype_b_loc();
pcVar11 = param_1 + param_2 + -1;
param_1 = param_1 + -1;
uVar7 = uVar6 + 1;
} while ((*(byte *)((long)*ppuVar4 + (long)*pcVar11 * 2 + 1) & 0x20) != 0);
lVar9 = param_2 - uVar6;
if (4 < lVar9) {
pcVar11 = pcVar8 + 1;
if (*pcVar8 == '-') {
*(int1 *)(param_3 + 8) = 1;
lVar9 = ~uVar6 + param_2;
pcVar8 = pcVar11;
local_40 = pcVar11;
LAB_0013472e:
iVar3 = parse_time(pcVar8,lVar9,&local_40,param_3);
if (iVar3 == 0) {
param_3[2] = 0;
param_3[0] = 0;
param_3[1] = 0;
param_3[9] = 2;
return 0;
}
}
else {
*(int1 *)(param_3 + 8) = 0;
for (; (pcVar11 < local_38 && (*pcVar11 != '-')); pcVar11 = pcVar11 + 1) {
if (*pcVar11 == ':') goto LAB_0013472e;
}
lVar9 = 0;
uVar7 = 0;
do {
cVar1 = pcVar8[lVar9];
bVar12 = (byte)(cVar1 - 0x30U) < 10;
if ((!bVar12) || (0x1999999999999999 < uVar7)) {
LAB_001347e4:
bVar12 = (bool)(lVar9 == 0 | bVar12);
goto LAB_001347f1;
}
if (0x2fU - (long)cVar1 < uVar7 * 10) {
bVar12 = true;
goto LAB_001347e4;
}
uVar7 = (uVar7 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar9 + 1;
lVar9 = lVar9 + 1;
} while (pcVar8 + lVar2 < local_38);
bVar12 = false;
LAB_001347f1:
pcVar11 = pcVar8 + lVar9;
if (uVar7 >> 0x20 == 0) {
iVar3 = (int)uVar7;
*param_3 = iVar3;
if (((!bVar12 && uVar7 < 10000) && (local_38 != pcVar11)) && (*pcVar11 == '-')) {
if ((long)pcVar11 - (long)pcVar8 == 2) {
iVar10 = iVar3 + 0x76c;
if (uVar7 < 0x46) {
iVar10 = iVar3 + 2000;
}
*param_3 = iVar10;
}
if (param_2 - (long)pcVar11 != lVar5 && -1 < (param_2 - (long)pcVar11) - lVar5) {
lVar9 = 0;
uVar7 = 0;
do {
cVar1 = pcVar11[lVar9 + 1];
bVar12 = (byte)(cVar1 - 0x30U) < 10;
if ((!bVar12) || (0x1999999999999999 < uVar7)) {
LAB_001348da:
bVar12 = (bool)(lVar9 == 0 | bVar12);
goto LAB_001348e7;
}
if (0x2fU - (long)cVar1 < uVar7 * 10) {
bVar12 = true;
goto LAB_001348da;
}
uVar7 = (uVar7 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar9 + 2;
lVar9 = lVar9 + 1;
} while (pcVar11 + lVar2 < local_38);
bVar12 = false;
LAB_001348e7:
pcVar11 = pcVar11 + lVar9 + 1;
if (((uVar7 >> 0x20 == 0) && (param_3[1] = (int)uVar7, !bVar12 && uVar7 < 0xd)) &&
((local_38 != pcVar11 &&
((*pcVar11 == '-' &&
(param_2 - (long)pcVar11 != lVar5 && -1 < (param_2 - (long)pcVar11) - lVar5))))))
{
lVar9 = 0;
uVar7 = 0;
do {
cVar1 = pcVar11[lVar9 + 1];
bVar12 = (byte)(cVar1 - 0x30U) < 10;
if ((!bVar12) || (0x1999999999999999 < uVar7)) {
LAB_00134987:
bVar12 = (bool)(lVar9 == 0 | bVar12);
goto LAB_00134993;
}
if (0x2fU - (long)cVar1 < uVar7 * 10) {
bVar12 = true;
goto LAB_00134987;
}
uVar7 = (uVar7 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar9 + 2;
lVar9 = lVar9 + 1;
} while (pcVar11 + lVar2 < local_38);
bVar12 = false;
LAB_00134993:
pcVar11 = pcVar11 + lVar9 + 1;
param_3[2] = (int)uVar7;
if ((!bVar12) && (uVar7 < 0x20)) {
if ((local_38 == pcVar11) || (*pcVar11 != ' ')) {
param_3[9] = 0;
param_3[3] = 0;
param_3[4] = 0;
param_3[5] = 0;
param_3[6] = 0;
param_3[7] = 0;
return 0;
}
local_40 = pcVar11 + 1;
iVar3 = parse_time(local_40,(param_2 - (long)pcVar11) - lVar5,&local_40,param_3);
if ((iVar3 == 0) && ((uint)param_3[3] < 0x18)) {
param_3[9] = 1;
return 0;
}
}
}
}
}
}
}
}
}
param_3[4] = 0;
param_3[5] = 0;
param_3[6] = 0;
param_3[7] = 0;
param_3[0] = 0;
param_3[1] = 0;
param_3[2] = 0;
param_3[3] = 0;
param_3[8] = 0;
param_3[9] = 0;
param_3[9] = -1;
return 1;
}
| |
45,966 | ma_hashtbl_insert | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | my_bool ma_hashtbl_insert(MA_HASHTBL *info,const uchar *record)
{
int flag;
uint halfbuff,hash_nr,first_index,idx;
uchar *ptr_to_rec= NULL,*ptr_to_rec2= NULL;
MA_HASHTBL_LINK *data,*empty,*gpos= NULL,*gpos2 = NULL,*pos;
LINT_INIT(gpos); LINT_INIT(gpos2);
LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2);
flag=0;
if (!(empty=(MA_HASHTBL_LINK*) ma_alloc_dynamic(&info->array)))
return(TRUE); /* No more memory */
info->current_record= NO_RECORD;
data=dynamic_element(&info->array,0,MA_HASHTBL_LINK*);
halfbuff= info->blength >> 1;
idx=first_index=info->records-halfbuff;
if (idx != info->records) /* If some records */
{
do
{
pos=data+idx;
hash_nr=rec_hashnr(info,pos->data);
if (flag == 0) /* First loop; Check if ok */
if (hash_mask(hash_nr,info->blength,info->records) != first_index)
break;
if (!(hash_nr & halfbuff))
{ /* Key will not move */
if (!(flag & LOWFIND))
{
if (flag & HIGHFIND)
{
flag=LOWFIND | HIGHFIND;
/* key shall be moved to the current empty position */
gpos=empty;
ptr_to_rec=pos->data;
empty=pos; /* This place is now free */
}
else
{
flag=LOWFIND | LOWUSED; /* key isn't changed */
gpos=pos;
ptr_to_rec=pos->data;
}
}
else
{
if (!(flag & LOWUSED))
{
/* Change link of previous LOW-key */
gpos->data=ptr_to_rec;
gpos->next=(uint) (pos-data);
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
}
gpos=pos;
ptr_to_rec=pos->data;
}
}
else
{ /* key will be moved */
if (!(flag & HIGHFIND))
{
flag= (flag & LOWFIND) | HIGHFIND;
/* key shall be moved to the last (empty) position */
gpos2 = empty; empty=pos;
ptr_to_rec2=pos->data;
}
else
{
if (!(flag & HIGHUSED))
{
/* Change link of previous hash-key and save */
gpos2->data=ptr_to_rec2;
gpos2->next=(uint) (pos-data);
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
}
gpos2=pos;
ptr_to_rec2=pos->data;
}
}
}
while ((idx=pos->next) != NO_RECORD);
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
{
gpos->data=ptr_to_rec;
gpos->next=NO_RECORD;
}
if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND)
{
gpos2->data=ptr_to_rec2;
gpos2->next=NO_RECORD;
}
}
/* Check if we are at the empty position */
idx=hash_mask(rec_hashnr(info,record),info->blength,info->records+1);
pos=data+idx;
if (pos == empty)
{
pos->data=(uchar*) record;
pos->next=NO_RECORD;
}
else
{
/* Check if more records in same hash-nr family */
empty[0]=pos[0];
gpos=data+hash_rec_mask(info,pos,info->blength,info->records+1);
if (pos == gpos)
{
pos->data=(uchar*) record;
pos->next=(uint) (empty - data);
}
else
{
pos->data=(uchar*) record;
pos->next=NO_RECORD;
movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data));
}
}
if (++info->records == info->blength)
info->blength+= info->blength;
return(0);
} | O0 | c | ma_hashtbl_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x45f60
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jne 0x48257
movb $0x1, -0x1(%rbp)
jmp 0x485dd
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
shrl %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x48481
jmp 0x4829c
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x485f0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x482ea
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x48010
cmpl -0x28(%rbp), %eax
je 0x482e8
jmp 0x4843d
jmp 0x482ea
movl -0x24(%rbp), %eax
andl -0x20(%rbp), %eax
cmpl $0x0, %eax
jne 0x483a4
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x48351
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x48334
movl $0x5, -0x1c(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x4834f
movl $0x3, -0x1c(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x4839f
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x4838b
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
andl $0x4, %eax
orl $0x3, %eax
movl %eax, -0x1c(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x48429
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x483d9
movl -0x1c(%rbp), %eax
andl $0x1, %eax
orl $0x4, %eax
movl %eax, -0x1c(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x48427
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x48413
movq -0x40(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
andl $0x1, %eax
orl $0xc, %eax
movl %eax, -0x1c(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x48429
jmp 0x4842b
movq -0x68(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
jne 0x4829c
movl -0x1c(%rbp), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x4845e
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movl -0x1c(%rbp), %eax
andl $0xc, %eax
cmpl $0x4, %eax
jne 0x4847f
movq -0x40(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
jmp 0x48481
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x485f0
movl %eax, %edi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
callq 0x48010
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x484e0
movq -0x18(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
jmp 0x485b2
movq -0x50(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
callq 0x480e0
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0x4855e
movq -0x18(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, (%rax)
jmp 0x485b0
movq -0x18(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq -0x48(%rbp), %rdi
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %ecx
callq 0x48630
jmp 0x485b2
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x8(%rcx)
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x485d9
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_hashtbl_insert:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_38], 0
mov [rbp+var_40], 0
mov [rbp+var_58], 0
mov [rbp+var_60], 0
mov [rbp+var_1C], 0
mov rdi, [rbp+var_10]
add rdi, 18h
call ma_alloc_dynamic
mov [rbp+var_50], rax
cmp rax, 0
jnz short loc_48257
mov [rbp+var_1], 1
jmp loc_485DD
loc_48257:
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0FFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
shr eax, 1
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov eax, [rax+8]
sub eax, [rbp+var_20]
mov [rbp+var_28], eax
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+8]
jz loc_48481
jmp short $+2
loc_4829C:
mov rax, [rbp+var_48]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_68]
mov rsi, [rax+8]
call rec_hashnr
mov [rbp+var_24], eax
cmp [rbp+var_1C], 0
jnz short loc_482EA
mov edi, [rbp+var_24]
mov rax, [rbp+var_10]
mov esi, [rax+0Ch]
mov rax, [rbp+var_10]
mov edx, [rax+8]
call hash_mask
cmp eax, [rbp+var_28]
jz short loc_482E8
jmp loc_4843D
loc_482E8:
jmp short $+2
loc_482EA:
mov eax, [rbp+var_24]
and eax, [rbp+var_20]
cmp eax, 0
jnz loc_483A4
mov eax, [rbp+var_1C]
and eax, 1
cmp eax, 0
jnz short loc_48351
mov eax, [rbp+var_1C]
and eax, 4
cmp eax, 0
jz short loc_48334
mov [rbp+var_1C], 5
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
mov rax, [rbp+var_68]
mov rax, [rax+8]
mov [rbp+var_38], rax
mov rax, [rbp+var_68]
mov [rbp+var_50], rax
jmp short loc_4834F
loc_48334:
mov [rbp+var_1C], 3
mov rax, [rbp+var_68]
mov [rbp+var_58], rax
mov rax, [rbp+var_68]
mov rax, [rax+8]
mov [rbp+var_38], rax
loc_4834F:
jmp short loc_4839F
loc_48351:
mov eax, [rbp+var_1C]
and eax, 2
cmp eax, 0
jnz short loc_4838B
mov rcx, [rbp+var_38]
mov rax, [rbp+var_58]
mov [rax+8], rcx
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
sub rax, rcx
sar rax, 4
mov ecx, eax
mov rax, [rbp+var_58]
mov [rax], ecx
mov eax, [rbp+var_1C]
and eax, 4
or eax, 3
mov [rbp+var_1C], eax
loc_4838B:
mov rax, [rbp+var_68]
mov [rbp+var_58], rax
mov rax, [rbp+var_68]
mov rax, [rax+8]
mov [rbp+var_38], rax
loc_4839F:
jmp loc_48429
loc_483A4:
mov eax, [rbp+var_1C]
and eax, 4
cmp eax, 0
jnz short loc_483D9
mov eax, [rbp+var_1C]
and eax, 1
or eax, 4
mov [rbp+var_1C], eax
mov rax, [rbp+var_50]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
mov [rbp+var_50], rax
mov rax, [rbp+var_68]
mov rax, [rax+8]
mov [rbp+var_40], rax
jmp short loc_48427
loc_483D9:
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jnz short loc_48413
mov rcx, [rbp+var_40]
mov rax, [rbp+var_60]
mov [rax+8], rcx
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
sub rax, rcx
sar rax, 4
mov ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
mov eax, [rbp+var_1C]
and eax, 1
or eax, 0Ch
mov [rbp+var_1C], eax
loc_48413:
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
mov rax, [rax+8]
mov [rbp+var_40], rax
loc_48427:
jmp short $+2
loc_48429:
jmp short $+2
loc_4842B:
mov rax, [rbp+var_68]
mov eax, [rax]
mov [rbp+var_2C], eax
cmp eax, 0FFFFFFFFh
jnz loc_4829C
loc_4843D:
mov eax, [rbp+var_1C]
and eax, 3
cmp eax, 1
jnz short loc_4845E
mov rcx, [rbp+var_38]
mov rax, [rbp+var_58]
mov [rax+8], rcx
mov rax, [rbp+var_58]
mov dword ptr [rax], 0FFFFFFFFh
loc_4845E:
mov eax, [rbp+var_1C]
and eax, 0Ch
cmp eax, 4
jnz short loc_4847F
mov rcx, [rbp+var_40]
mov rax, [rbp+var_60]
mov [rax+8], rcx
mov rax, [rbp+var_60]
mov dword ptr [rax], 0FFFFFFFFh
loc_4847F:
jmp short $+2
loc_48481:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rec_hashnr
mov edi, eax
mov rax, [rbp+var_10]
mov esi, [rax+0Ch]
mov rax, [rbp+var_10]
mov edx, [rax+8]
add edx, 1
call hash_mask
mov [rbp+var_2C], eax
mov rax, [rbp+var_48]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
cmp rax, [rbp+var_50]
jnz short loc_484E0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_68]
mov [rax+8], rcx
mov rax, [rbp+var_68]
mov dword ptr [rax], 0FFFFFFFFh
jmp loc_485B2
loc_484E0:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_68]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_48]
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_68]
mov rax, [rbp+var_10]
mov edx, [rax+0Ch]
mov rax, [rbp+var_10]
mov ecx, [rax+8]
add ecx, 1
call hash_rec_mask
mov ecx, eax
mov rax, [rbp+var_70]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_68]
cmp rax, [rbp+var_58]
jnz short loc_4855E
mov rcx, [rbp+var_18]
mov rax, [rbp+var_68]
mov [rax+8], rcx
mov rax, [rbp+var_50]
mov rcx, [rbp+var_48]
sub rax, rcx
sar rax, 4
mov ecx, eax
mov rax, [rbp+var_68]
mov [rax], ecx
jmp short loc_485B0
loc_4855E:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_68]
mov [rax+8], rcx
mov rax, [rbp+var_68]
mov dword ptr [rax], 0FFFFFFFFh
mov rdi, [rbp+var_48]
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
sub rax, rcx
sar rax, 4
mov edx, eax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_48]
sub rax, rcx
sar rax, 4
mov ecx, eax
call movelink
loc_485B0:
jmp short $+2
loc_485B2:
mov rcx, [rbp+var_10]
mov eax, [rcx+8]
add eax, 1
mov [rcx+8], eax
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jnz short loc_485D9
mov rax, [rbp+var_10]
mov ecx, [rax+0Ch]
mov rax, [rbp+var_10]
add ecx, [rax+0Ch]
mov [rax+0Ch], ecx
loc_485D9:
mov [rbp+var_1], 0
loc_485DD:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char ma_hashtbl_insert(long long a1, long long a2)
{
unsigned int v2; // eax
int v3; // eax
int *v5; // [rsp+8h] [rbp-68h]
long long v6; // [rsp+8h] [rbp-68h]
_QWORD *v7; // [rsp+10h] [rbp-60h]
_QWORD *v8; // [rsp+18h] [rbp-58h]
long long v9; // [rsp+18h] [rbp-58h]
_QWORD *v10; // [rsp+20h] [rbp-50h]
long long v11; // [rsp+28h] [rbp-48h]
long long v12; // [rsp+30h] [rbp-40h]
long long v13; // [rsp+38h] [rbp-38h]
unsigned int v14; // [rsp+44h] [rbp-2Ch]
unsigned int v15; // [rsp+48h] [rbp-28h]
unsigned int v16; // [rsp+4Ch] [rbp-24h]
int v17; // [rsp+50h] [rbp-20h]
int v18; // [rsp+54h] [rbp-1Ch]
v13 = 0LL;
v12 = 0LL;
v8 = 0LL;
v7 = 0LL;
v18 = 0;
v10 = (_QWORD *)ma_alloc_dynamic((long long *)(a1 + 24));
if ( !v10 )
return 1;
*(_DWORD *)(a1 + 16) = -1;
v11 = *(_QWORD *)(a1 + 24);
v17 = *(_DWORD *)(a1 + 12) >> 1;
v15 = *(_DWORD *)(a1 + 8) - v17;
v14 = v15;
if ( v15 != *(_DWORD *)(a1 + 8) )
{
do
{
v5 = (int *)(16LL * v14 + v11);
v16 = rec_hashnr(a1, *((_QWORD *)v5 + 1));
if ( !v18 && (unsigned int)hash_mask(v16, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) != v15 )
break;
if ( (v17 & v16) != 0 )
{
if ( (v18 & 4) != 0 )
{
if ( (v18 & 8) == 0 )
{
v7[1] = v12;
*(_DWORD *)v7 = (16LL * v14) >> 4;
v18 = v18 & 1 | 0xC;
}
v7 = (_QWORD *)(16LL * v14 + v11);
v12 = *((_QWORD *)v5 + 1);
}
else
{
v18 = v18 & 1 | 4;
v7 = v10;
v10 = (_QWORD *)(16LL * v14 + v11);
v12 = *((_QWORD *)v5 + 1);
}
}
else if ( (v18 & 1) != 0 )
{
if ( (v18 & 2) == 0 )
{
v8[1] = v13;
*(_DWORD *)v8 = (16LL * v14) >> 4;
v18 = v18 & 4 | 3;
}
v8 = (_QWORD *)(16LL * v14 + v11);
v13 = *((_QWORD *)v5 + 1);
}
else if ( (v18 & 4) != 0 )
{
v18 = 5;
v8 = v10;
v13 = *((_QWORD *)v5 + 1);
v10 = (_QWORD *)(16LL * v14 + v11);
}
else
{
v18 = 3;
v8 = (_QWORD *)(16LL * v14 + v11);
v13 = *((_QWORD *)v5 + 1);
}
v14 = *v5;
}
while ( *v5 != -1 );
if ( (v18 & 3) == 1 )
{
v8[1] = v13;
*(_DWORD *)v8 = -1;
}
if ( (v18 & 0xC) == 4 )
{
v7[1] = v12;
*(_DWORD *)v7 = -1;
}
}
v2 = rec_hashnr(a1, a2);
v6 = 16LL * (unsigned int)hash_mask(v2, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8) + 1) + v11;
if ( (_QWORD *)v6 == v10 )
{
*(_QWORD *)(v6 + 8) = a2;
*(_DWORD *)v6 = -1;
}
else
{
*v10 = *(_QWORD *)v6;
v10[1] = *(_QWORD *)(v6 + 8);
v9 = 16LL * (unsigned int)hash_rec_mask(a1, v6, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8) + 1) + v11;
*(_QWORD *)(v6 + 8) = a2;
if ( v6 == v9 )
{
*(_DWORD *)v6 = ((long long)v10 - v11) >> 4;
}
else
{
*(_DWORD *)v6 = -1;
movelink(
v11,
(unsigned int)((v6 - v11) >> 4),
(unsigned int)((v9 - v11) >> 4),
(unsigned int)(((long long)v10 - v11) >> 4));
}
}
v3 = *(_DWORD *)(a1 + 8) + 1;
*(_DWORD *)(a1 + 8) = v3;
if ( v3 == *(_DWORD *)(a1 + 12) )
*(_DWORD *)(a1 + 12) *= 2;
return 0;
}
| ma_hashtbl_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV qword ptr [RBP + -0x60],0x0
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
CALL 0x00145f60
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JNZ 0x00148257
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001485dd
LAB_00148257:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
SHR EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
SUB EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x28],EAX
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x8]
JZ 0x00148481
JMP 0x0014829c
LAB_0014829c:
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001485f0
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x001482ea
MOV EDI,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
CALL 0x00148010
CMP EAX,dword ptr [RBP + -0x28]
JZ 0x001482e8
JMP 0x0014843d
LAB_001482e8:
JMP 0x001482ea
LAB_001482ea:
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,dword ptr [RBP + -0x20]
CMP EAX,0x0
JNZ 0x001483a4
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00148351
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00148334
MOV dword ptr [RBP + -0x1c],0x5
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0014834f
LAB_00148334:
MOV dword ptr [RBP + -0x1c],0x3
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014834f:
JMP 0x0014839f
LAB_00148351:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0014838b
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
SAR RAX,0x4
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x4
OR EAX,0x3
MOV dword ptr [RBP + -0x1c],EAX
LAB_0014838b:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014839f:
JMP 0x00148429
LAB_001483a4:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x4
CMP EAX,0x0
JNZ 0x001483d9
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
OR EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00148427
LAB_001483d9:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JNZ 0x00148413
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
SAR RAX,0x4
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
OR EAX,0xc
MOV dword ptr [RBP + -0x1c],EAX
LAB_00148413:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
LAB_00148427:
JMP 0x00148429
LAB_00148429:
JMP 0x0014842b
LAB_0014842b:
MOV RAX,qword ptr [RBP + -0x68]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,-0x1
JNZ 0x0014829c
LAB_0014843d:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x3
CMP EAX,0x1
JNZ 0x0014845e
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],0xffffffff
LAB_0014845e:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0xc
CMP EAX,0x4
JNZ 0x0014847f
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],0xffffffff
LAB_0014847f:
JMP 0x00148481
LAB_00148481:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001485f0
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
ADD EDX,0x1
CALL 0x00148010
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x50]
JNZ 0x001484e0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x68]
MOV dword ptr [RAX],0xffffffff
JMP 0x001485b2
LAB_001484e0:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
CALL 0x001480e0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x58]
JNZ 0x0014855e
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
SAR RAX,0x4
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV dword ptr [RAX],ECX
JMP 0x001485b0
LAB_0014855e:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x68]
MOV dword ptr [RAX],0xffffffff
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
SAR RAX,0x4
MOV ECX,EAX
CALL 0x00148630
LAB_001485b0:
JMP 0x001485b2
LAB_001485b2:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x8]
ADD EAX,0x1
MOV dword ptr [RCX + 0x8],EAX
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x001485d9
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x10]
ADD ECX,dword ptr [RAX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
LAB_001485d9:
MOV byte ptr [RBP + -0x1],0x0
LAB_001485dd:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 ma_hashtbl_insert(long param_1,int8 param_2)
{
long lVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
int4 uVar6;
int iVar7;
uint *puVar8;
uint *puVar9;
uint *local_68;
uint *local_60;
uint *local_58;
int8 local_48;
int8 local_40;
uint local_34;
uint local_24;
int1 local_9;
local_40 = 0;
local_48 = 0;
local_60 = (uint *)0x0;
local_68 = (uint *)0x0;
local_24 = 0;
local_58 = (uint *)ma_alloc_dynamic(param_1 + 0x18);
if (local_58 == (uint *)0x0) {
local_9 = 1;
}
else {
*(int4 *)(param_1 + 0x10) = 0xffffffff;
lVar1 = *(long *)(param_1 + 0x18);
uVar2 = *(uint *)(param_1 + 0xc) >> 1;
uVar3 = *(int *)(param_1 + 8) - uVar2;
local_34 = uVar3;
if (uVar3 != *(uint *)(param_1 + 8)) {
do {
puVar8 = (uint *)(lVar1 + (ulong)local_34 * 0x10);
uVar4 = rec_hashnr(param_1,*(int8 *)(puVar8 + 2));
if ((local_24 == 0) &&
(uVar5 = hash_mask(uVar4,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)),
uVar5 != uVar3)) break;
if ((uVar4 & uVar2) == 0) {
if ((local_24 & 1) == 0) {
if ((local_24 & 4) == 0) {
local_24 = 3;
local_40 = *(int8 *)(puVar8 + 2);
local_60 = puVar8;
}
else {
local_24 = 5;
local_60 = local_58;
local_40 = *(int8 *)(puVar8 + 2);
local_58 = puVar8;
}
}
else {
if ((local_24 & 2) == 0) {
*(int8 *)(local_60 + 2) = local_40;
*local_60 = (uint)((long)puVar8 - lVar1 >> 4);
local_24 = local_24 & 4 | 3;
}
local_40 = *(int8 *)(puVar8 + 2);
local_60 = puVar8;
}
}
else if ((local_24 & 4) == 0) {
local_24 = local_24 & 1 | 4;
local_68 = local_58;
local_48 = *(int8 *)(puVar8 + 2);
local_58 = puVar8;
}
else {
if ((local_24 & 8) == 0) {
*(int8 *)(local_68 + 2) = local_48;
*local_68 = (uint)((long)puVar8 - lVar1 >> 4);
local_24 = local_24 & 1 | 0xc;
}
local_48 = *(int8 *)(puVar8 + 2);
local_68 = puVar8;
}
local_34 = *puVar8;
} while (*puVar8 != 0xffffffff);
if ((local_24 & 3) == 1) {
*(int8 *)(local_60 + 2) = local_40;
*local_60 = 0xffffffff;
}
if ((local_24 & 0xc) == 4) {
*(int8 *)(local_68 + 2) = local_48;
*local_68 = 0xffffffff;
}
}
uVar6 = rec_hashnr(param_1,param_2);
uVar2 = hash_mask(uVar6,*(int4 *)(param_1 + 0xc),*(int *)(param_1 + 8) + 1);
puVar8 = (uint *)(lVar1 + (ulong)uVar2 * 0x10);
if (puVar8 == local_58) {
*(int8 *)(puVar8 + 2) = param_2;
*puVar8 = 0xffffffff;
}
else {
*(int8 *)local_58 = *(int8 *)puVar8;
*(int8 *)(local_58 + 2) = *(int8 *)(puVar8 + 2);
uVar2 = hash_rec_mask(param_1,puVar8,*(int4 *)(param_1 + 0xc),*(int *)(param_1 + 8) + 1)
;
puVar9 = (uint *)(lVar1 + (ulong)uVar2 * 0x10);
if (puVar8 == puVar9) {
*(int8 *)(puVar8 + 2) = param_2;
*puVar8 = (uint)((long)local_58 - lVar1 >> 4);
}
else {
*(int8 *)(puVar8 + 2) = param_2;
*puVar8 = 0xffffffff;
movelink(lVar1,(long)puVar8 - lVar1 >> 4 & 0xffffffff,(long)puVar9 - lVar1 >> 4 & 0xffffffff
,(long)local_58 - lVar1 >> 4 & 0xffffffff);
}
}
iVar7 = *(int *)(param_1 + 8) + 1;
*(int *)(param_1 + 8) = iVar7;
if (iVar7 == *(int *)(param_1 + 0xc)) {
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + *(int *)(param_1 + 0xc);
}
local_9 = 0;
}
return local_9;
}
| |
45,967 | ma_hashtbl_insert | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | my_bool ma_hashtbl_insert(MA_HASHTBL *info,const uchar *record)
{
int flag;
uint halfbuff,hash_nr,first_index,idx;
uchar *ptr_to_rec= NULL,*ptr_to_rec2= NULL;
MA_HASHTBL_LINK *data,*empty,*gpos= NULL,*gpos2 = NULL,*pos;
LINT_INIT(gpos); LINT_INIT(gpos2);
LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2);
flag=0;
if (!(empty=(MA_HASHTBL_LINK*) ma_alloc_dynamic(&info->array)))
return(TRUE); /* No more memory */
info->current_record= NO_RECORD;
data=dynamic_element(&info->array,0,MA_HASHTBL_LINK*);
halfbuff= info->blength >> 1;
idx=first_index=info->records-halfbuff;
if (idx != info->records) /* If some records */
{
do
{
pos=data+idx;
hash_nr=rec_hashnr(info,pos->data);
if (flag == 0) /* First loop; Check if ok */
if (hash_mask(hash_nr,info->blength,info->records) != first_index)
break;
if (!(hash_nr & halfbuff))
{ /* Key will not move */
if (!(flag & LOWFIND))
{
if (flag & HIGHFIND)
{
flag=LOWFIND | HIGHFIND;
/* key shall be moved to the current empty position */
gpos=empty;
ptr_to_rec=pos->data;
empty=pos; /* This place is now free */
}
else
{
flag=LOWFIND | LOWUSED; /* key isn't changed */
gpos=pos;
ptr_to_rec=pos->data;
}
}
else
{
if (!(flag & LOWUSED))
{
/* Change link of previous LOW-key */
gpos->data=ptr_to_rec;
gpos->next=(uint) (pos-data);
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
}
gpos=pos;
ptr_to_rec=pos->data;
}
}
else
{ /* key will be moved */
if (!(flag & HIGHFIND))
{
flag= (flag & LOWFIND) | HIGHFIND;
/* key shall be moved to the last (empty) position */
gpos2 = empty; empty=pos;
ptr_to_rec2=pos->data;
}
else
{
if (!(flag & HIGHUSED))
{
/* Change link of previous hash-key and save */
gpos2->data=ptr_to_rec2;
gpos2->next=(uint) (pos-data);
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
}
gpos2=pos;
ptr_to_rec2=pos->data;
}
}
}
while ((idx=pos->next) != NO_RECORD);
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
{
gpos->data=ptr_to_rec;
gpos->next=NO_RECORD;
}
if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND)
{
gpos2->data=ptr_to_rec2;
gpos2->next=NO_RECORD;
}
}
/* Check if we are at the empty position */
idx=hash_mask(rec_hashnr(info,record),info->blength,info->records+1);
pos=data+idx;
if (pos == empty)
{
pos->data=(uchar*) record;
pos->next=NO_RECORD;
}
else
{
/* Check if more records in same hash-nr family */
empty[0]=pos[0];
gpos=data+hash_rec_mask(info,pos,info->blength,info->records+1);
if (pos == gpos)
{
pos->data=(uchar*) record;
pos->next=(uint) (empty - data);
}
else
{
pos->data=(uchar*) record;
pos->next=NO_RECORD;
movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data));
}
}
if (++info->records == info->blength)
info->blength+= info->blength;
return(0);
} | O3 | c | ma_hashtbl_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x3135e
testq %rax, %rax
je 0x324f7
movq %rax, %r13
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movq 0x18(%rbx), %rcx
movl 0xc(%rbx), %edx
cmpl $0x2, %edx
movq %rbx, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movq %r14, -0x40(%rbp)
jb 0x32506
movl 0x8(%rbx), %ebx
shrl %edx
subl %edx, %ebx
xorl %r12d, %r12d
movl %ebx, -0x74(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movl %edx, %r14d
movq %r13, -0x30(%rbp)
movl %ebx, %r15d
shlq $0x4, %r15
movq 0x8(%rcx,%r15), %rdi
movq -0x70(%rbp), %r13
movq 0x30(%r13), %rax
testq %rax, %rax
je 0x323b2
leaq -0x34(%rbp), %rsi
xorl %edx, %edx
callq *%rax
movq %rax, %rdi
movl -0x34(%rbp), %esi
jmp 0x323c0
movl 0x4(%r13), %esi
movl %esi, -0x34(%rbp)
movl (%r13), %eax
addq %rax, %rdi
callq *0x40(%r13)
testl %r12d, %r12d
jne 0x323e8
movl 0xc(%r13), %ecx
leal -0x1(%rcx), %edx
andl %eax, %edx
shrl %ecx
decl %ecx
andl %eax, %ecx
cmpl 0x8(%r13), %edx
cmovbl %edx, %ecx
cmpl -0x74(%rbp), %ecx
jne 0x324fe
movq -0x68(%rbp), %rcx
addq %rcx, %r15
movl %r14d, %edx
testl %r14d, %eax
je 0x3241d
testb $0x4, %r12b
jne 0x32452
andl $0x1, %r12d
orl $0x4, %r12d
movq 0x8(%r15), %rax
movq %rax, -0x60(%rbp)
movq %r15, %r13
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x324ac
testb $0x1, %r12b
jne 0x32480
andl $0x4, %r12d
movl %r12d, %eax
shrl %eax
addl $0x3, %eax
testl %r12d, %r12d
movq 0x8(%r15), %rsi
movq %rsi, -0x50(%rbp)
movq %r15, %r13
movq -0x30(%rbp), %rsi
cmoveq %rsi, %r13
cmoveq %r15, %rsi
movl %eax, %r12d
movq %rsi, -0x48(%rbp)
jmp 0x324ac
testb $0x8, %r12b
jne 0x3246e
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rsi
movq %rax, 0x8(%rsi)
movl %ebx, (%rsi)
andl $0x1, %r12d
orl $0xc, %r12d
movq 0x8(%r15), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %r13
movq %r15, -0x58(%rbp)
jmp 0x324ac
testb $0x2, %r12b
jne 0x3249c
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rsi
movq %rax, 0x8(%rsi)
movl %ebx, (%rsi)
andl $0x4, %r12d
orl $0x3, %r12d
movq 0x8(%r15), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %r13
movq %r15, -0x48(%rbp)
movl (%r15), %ebx
cmpl $-0x1, %ebx
jne 0x32382
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x324d5
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rax, 0x8(%rcx)
movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF
andl $0xc, %r12d
cmpl $0x4, %r12d
movq -0x40(%rbp), %r14
jne 0x32506
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rax, 0x8(%rcx)
movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF
jmp 0x32506
movb $0x1, %al
jmp 0x325eb
movq -0x30(%rbp), %r13
movq -0x40(%rbp), %r14
movq -0x70(%rbp), %r15
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x3252a
leaq -0x78(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq *%rax
movq %rax, %rdi
movl (%r12), %esi
jmp 0x32537
movl 0x4(%r15), %esi
movl %esi, -0x78(%rbp)
movl (%r15), %edi
addq %r14, %rdi
callq *0x40(%r15)
movl 0x8(%r15), %ecx
movl 0xc(%r15), %ebx
incl %ecx
leal -0x1(%rbx), %edx
andl %eax, %edx
shrl %ebx
decl %ebx
andl %eax, %ebx
cmpl %ecx, %edx
cmovbl %edx, %ebx
movq %rbx, %r14
shlq $0x4, %r14
addq -0x68(%rbp), %r14
cmpq %r13, %r14
je 0x3259d
movups (%r14), %xmm0
movups %xmm0, (%r13)
movl 0x8(%r15), %ecx
movl 0xc(%r15), %edx
incl %ecx
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x32218
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%r14)
cmpl %eax, %ebx
jne 0x325ae
subq -0x68(%rbp), %r13
shrq $0x4, %r13
movl %r13d, (%r14)
jmp 0x325d3
movq -0x40(%rbp), %rax
movq %rax, 0x8(%r14)
movl $0xffffffff, (%r14) # imm = 0xFFFFFFFF
jmp 0x325d3
movl $0xffffffff, (%r14) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rdx
subq %rdx, %r13
shrq $0x4, %r13
movl %eax, %ecx
shlq $0x4, %rcx
movl (%rdx,%rcx), %eax
cmpl %ebx, %eax
jne 0x325c0
addq %rcx, %rdx
movl %r13d, (%rdx)
movq -0x70(%rbp), %rcx
movl 0x8(%rcx), %eax
incl %eax
movl %eax, 0x8(%rcx)
cmpl 0xc(%rcx), %eax
jne 0x325e9
addl %eax, %eax
movl %eax, 0xc(%rcx)
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_hashtbl_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rbx, rdi
add rdi, 18h
call ma_alloc_dynamic
test rax, rax
jz loc_324F7
mov r13, rax
mov dword ptr [rbx+10h], 0FFFFFFFFh
mov rcx, [rbx+18h]
mov edx, [rbx+0Ch]
cmp edx, 2
mov [rbp+var_70], rbx
mov [rbp+var_68], rcx
mov [rbp+var_40], r14
jb loc_32506
mov ebx, [rbx+8]
shr edx, 1
sub ebx, edx
xor r12d, r12d
mov [rbp+var_74], ebx
mov [rbp+var_50], 0
mov [rbp+var_60], 0
mov [rbp+var_48], 0
mov [rbp+var_58], 0
loc_32382:
mov r14d, edx
mov [rbp+var_30], r13
mov r15d, ebx
shl r15, 4
mov rdi, [rcx+r15+8]
mov r13, [rbp+var_70]
mov rax, [r13+30h]
test rax, rax
jz short loc_323B2
lea rsi, [rbp+var_34]
xor edx, edx
call rax
mov rdi, rax
mov esi, [rbp+var_34]
jmp short loc_323C0
loc_323B2:
mov esi, [r13+4]
mov [rbp+var_34], esi
mov eax, [r13+0]
add rdi, rax
loc_323C0:
call qword ptr [r13+40h]
test r12d, r12d
jnz short loc_323E8
mov ecx, [r13+0Ch]
lea edx, [rcx-1]
and edx, eax
shr ecx, 1
dec ecx
and ecx, eax
cmp edx, [r13+8]
cmovb ecx, edx
cmp ecx, [rbp+var_74]
jnz loc_324FE
loc_323E8:
mov rcx, [rbp+var_68]
add r15, rcx
mov edx, r14d
test eax, r14d
jz short loc_3241D
test r12b, 4
jnz short loc_32452
and r12d, 1
or r12d, 4
mov rax, [r15+8]
mov [rbp+var_60], rax
mov r13, r15
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
jmp loc_324AC
loc_3241D:
test r12b, 1
jnz short loc_32480
and r12d, 4
mov eax, r12d
shr eax, 1
add eax, 3
test r12d, r12d
mov rsi, [r15+8]
mov [rbp+var_50], rsi
mov r13, r15
mov rsi, [rbp+var_30]
cmovz r13, rsi
cmovz rsi, r15
mov r12d, eax
mov [rbp+var_48], rsi
jmp short loc_324AC
loc_32452:
test r12b, 8
jnz short loc_3246E
mov rax, [rbp+var_60]
mov rsi, [rbp+var_58]
mov [rsi+8], rax
mov [rsi], ebx
and r12d, 1
or r12d, 0Ch
loc_3246E:
mov rax, [r15+8]
mov [rbp+var_60], rax
mov r13, [rbp+var_30]
mov [rbp+var_58], r15
jmp short loc_324AC
loc_32480:
test r12b, 2
jnz short loc_3249C
mov rax, [rbp+var_50]
mov rsi, [rbp+var_48]
mov [rsi+8], rax
mov [rsi], ebx
and r12d, 4
or r12d, 3
loc_3249C:
mov rax, [r15+8]
mov [rbp+var_50], rax
mov r13, [rbp+var_30]
mov [rbp+var_48], r15
loc_324AC:
mov ebx, [r15]
cmp ebx, 0FFFFFFFFh
jnz loc_32382
mov eax, r12d
and eax, 3
cmp eax, 1
jnz short loc_324D5
mov rax, [rbp+var_50]
mov rcx, [rbp+var_48]
mov [rcx+8], rax
mov dword ptr [rcx], 0FFFFFFFFh
loc_324D5:
and r12d, 0Ch
cmp r12d, 4
mov r14, [rbp+var_40]
jnz short loc_32506
mov rax, [rbp+var_60]
mov rcx, [rbp+var_58]
mov [rcx+8], rax
mov dword ptr [rcx], 0FFFFFFFFh
jmp short loc_32506
loc_324F7:
mov al, 1
jmp loc_325EB
loc_324FE:
mov r13, [rbp+var_30]
mov r14, [rbp+var_40]
loc_32506:
mov r15, [rbp+var_70]
mov rax, [r15+30h]
test rax, rax
jz short loc_3252A
lea r12, [rbp+var_78]
mov rdi, r14
mov rsi, r12
xor edx, edx
call rax
mov rdi, rax
mov esi, [r12]
jmp short loc_32537
loc_3252A:
mov esi, [r15+4]
mov [rbp+var_78], esi
mov edi, [r15]
add rdi, r14
loc_32537:
call qword ptr [r15+40h]
mov ecx, [r15+8]
mov ebx, [r15+0Ch]
inc ecx
lea edx, [rbx-1]
and edx, eax
shr ebx, 1
dec ebx
and ebx, eax
cmp edx, ecx
cmovb ebx, edx
mov r14, rbx
shl r14, 4
add r14, [rbp+var_68]
cmp r14, r13
jz short loc_3259D
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [r13+0], xmm0
mov ecx, [r15+8]
mov edx, [r15+0Ch]
inc ecx
mov rsi, [r14+8]
mov rdi, r15
call hash_rec_mask
mov rcx, [rbp+var_40]
mov [r14+8], rcx
cmp ebx, eax
jnz short loc_325AE
sub r13, [rbp+var_68]
shr r13, 4
mov [r14], r13d
jmp short loc_325D3
loc_3259D:
mov rax, [rbp+var_40]
mov [r14+8], rax
mov dword ptr [r14], 0FFFFFFFFh
jmp short loc_325D3
loc_325AE:
mov dword ptr [r14], 0FFFFFFFFh
mov rdx, [rbp+var_68]
sub r13, rdx
shr r13, 4
loc_325C0:
mov ecx, eax
shl rcx, 4
mov eax, [rdx+rcx]
cmp eax, ebx
jnz short loc_325C0
add rdx, rcx
mov [rdx], r13d
loc_325D3:
mov rcx, [rbp+var_70]
mov eax, [rcx+8]
inc eax
mov [rcx+8], eax
cmp eax, [rcx+0Ch]
jnz short loc_325E9
add eax, eax
mov [rcx+0Ch], eax
loc_325E9:
xor eax, eax
loc_325EB:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_hashtbl_insert(unsigned int *a1, long long a2)
{
long long v2; // r14
long long v3; // rax
_OWORD *v4; // r13
long long v5; // rcx
unsigned int v6; // edx
unsigned int v7; // edx
unsigned int v8; // ebx
int v9; // r12d
unsigned int v10; // r14d
long long v11; // r15
long long v12; // rdi
long long ( *v13)(long long, unsigned int *, _QWORD); // rax
long long v14; // rdi
long long v15; // rsi
int v16; // eax
unsigned int v17; // ecx
unsigned int v18; // edx
int v19; // ecx
long long v20; // r15
unsigned int v21; // r12d
unsigned int *v22; // rsi
unsigned int *v23; // rsi
unsigned int *v24; // rsi
unsigned int *v25; // rcx
unsigned int *v26; // rcx
long long ( **v28)(long long, long long); // r15
long long ( *v29)(long long, unsigned int *, _QWORD); // rax
long long v30; // rdi
long long v31; // rsi
int v32; // eax
unsigned int v33; // ebx
unsigned int v34; // edx
long long v35; // rbx
long long v36; // r14
unsigned int v37; // eax
unsigned long long v38; // r13
long long v39; // rcx
unsigned int *v40; // rcx
int v41; // eax
unsigned int v42; // [rsp+8h] [rbp-78h] BYREF
unsigned int v43; // [rsp+Ch] [rbp-74h]
unsigned int *v44; // [rsp+10h] [rbp-70h]
long long v45; // [rsp+18h] [rbp-68h]
long long v46; // [rsp+20h] [rbp-60h]
unsigned int *v47; // [rsp+28h] [rbp-58h]
long long v48; // [rsp+30h] [rbp-50h]
unsigned int *v49; // [rsp+38h] [rbp-48h]
long long v50; // [rsp+40h] [rbp-40h]
unsigned int v51; // [rsp+4Ch] [rbp-34h] BYREF
_OWORD *v52; // [rsp+50h] [rbp-30h]
v2 = a2;
v3 = ma_alloc_dynamic((long long)(a1 + 6));
if ( !v3 )
return 1LL;
v4 = (_OWORD *)v3;
a1[4] = -1;
v5 = *((_QWORD *)a1 + 3);
v6 = a1[3];
v44 = a1;
v45 = v5;
v50 = a2;
if ( v6 >= 2 )
{
v7 = v6 >> 1;
v8 = a1[2] - v7;
v9 = 0;
v43 = v8;
v48 = 0LL;
v46 = 0LL;
v49 = 0LL;
v47 = 0LL;
do
{
v10 = v7;
v52 = v4;
v11 = 16LL * v8;
v12 = *(_QWORD *)(v5 + v11 + 8);
v13 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)v44 + 6);
if ( v13 )
{
v14 = v13(v12, &v51, 0LL);
v15 = v51;
}
else
{
v15 = v44[1];
v51 = v44[1];
v14 = *v44 + v12;
}
v16 = (*((long long ( **)(long long, long long))v44 + 8))(v14, v15);
if ( !v9 )
{
v17 = v44[3];
v18 = v16 & (v17 - 1);
v19 = v16 & ((v17 >> 1) - 1);
if ( v18 < v44[2] )
v19 = v18;
if ( v19 != v43 )
{
v4 = v52;
v2 = v50;
goto LABEL_31;
}
}
v5 = v45;
v20 = v45 + v11;
v7 = v10;
if ( (v10 & v16) != 0 )
{
if ( (v9 & 4) != 0 )
{
if ( (v9 & 8) == 0 )
{
v23 = v47;
*((_QWORD *)v47 + 1) = v46;
*v23 = v8;
v9 = v9 & 1 | 0xC;
}
v46 = *(_QWORD *)(v20 + 8);
v4 = v52;
v47 = (unsigned int *)v20;
}
else
{
v9 = v9 & 1 | 4;
v46 = *(_QWORD *)(v20 + 8);
v4 = (_OWORD *)v20;
v47 = (unsigned int *)v52;
}
}
else if ( (v9 & 1) != 0 )
{
if ( (v9 & 2) == 0 )
{
v24 = v49;
*((_QWORD *)v49 + 1) = v48;
*v24 = v8;
v9 = v9 & 4 | 3;
}
v48 = *(_QWORD *)(v20 + 8);
v4 = v52;
v49 = (unsigned int *)v20;
}
else
{
v21 = v9 & 4;
v48 = *(_QWORD *)(v20 + 8);
v4 = (_OWORD *)v20;
v22 = (unsigned int *)v52;
if ( !v21 )
{
v4 = v52;
v22 = (unsigned int *)v20;
}
v9 = (v21 >> 1) + 3;
v49 = v22;
}
v8 = *(_DWORD *)v20;
}
while ( *(_DWORD *)v20 != -1 );
if ( (v9 & 3) == 1 )
{
v25 = v49;
*((_QWORD *)v49 + 1) = v48;
*v25 = -1;
}
v2 = v50;
if ( (v9 & 0xC) == 4 )
{
v26 = v47;
*((_QWORD *)v47 + 1) = v46;
*v26 = -1;
}
}
LABEL_31:
v28 = (long long ( **)(long long, long long))v44;
v29 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)v44 + 6);
if ( v29 )
{
v30 = v29(v2, &v42, 0LL);
v31 = v42;
}
else
{
v31 = v44[1];
v42 = v44[1];
v30 = v2 + *v44;
}
v32 = v28[8](v30, v31);
v33 = *((_DWORD *)v28 + 3);
v34 = v32 & (v33 - 1);
v35 = v32 & ((v33 >> 1) - 1);
if ( v34 < *((_DWORD *)v28 + 2) + 1 )
v35 = v34;
v36 = v45 + 16 * v35;
if ( (_OWORD *)v36 == v4 )
{
*(_QWORD *)(v36 + 8) = v50;
*(_DWORD *)v36 = -1;
}
else
{
*v4 = *(_OWORD *)v36;
v37 = hash_rec_mask((unsigned int *)v28, *(_QWORD *)(v36 + 8), *((_DWORD *)v28 + 3), *((_DWORD *)v28 + 2) + 1);
*(_QWORD *)(v36 + 8) = v50;
if ( (_DWORD)v35 == v37 )
{
*(_DWORD *)v36 = ((unsigned long long)v4 - v45) >> 4;
}
else
{
*(_DWORD *)v36 = -1;
v38 = ((unsigned long long)v4 - v45) >> 4;
do
{
v39 = 16LL * v37;
v37 = *(_DWORD *)(v45 + v39);
}
while ( v37 != (_DWORD)v35 );
*(_DWORD *)(v39 + v45) = v38;
}
}
v40 = v44;
v41 = v44[2] + 1;
v44[2] = v41;
if ( v41 == v40[3] )
v40[3] = 2 * v41;
return 0LL;
}
| ma_hashtbl_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x18
CALL 0x0013135e
TEST RAX,RAX
JZ 0x001324f7
MOV R13,RAX
MOV dword ptr [RBX + 0x10],0xffffffff
MOV RCX,qword ptr [RBX + 0x18]
MOV EDX,dword ptr [RBX + 0xc]
CMP EDX,0x2
MOV qword ptr [RBP + -0x70],RBX
MOV qword ptr [RBP + -0x68],RCX
MOV qword ptr [RBP + -0x40],R14
JC 0x00132506
MOV EBX,dword ptr [RBX + 0x8]
SHR EDX,0x1
SUB EBX,EDX
XOR R12D,R12D
MOV dword ptr [RBP + -0x74],EBX
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_00132382:
MOV R14D,EDX
MOV qword ptr [RBP + -0x30],R13
MOV R15D,EBX
SHL R15,0x4
MOV RDI,qword ptr [RCX + R15*0x1 + 0x8]
MOV R13,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [R13 + 0x30]
TEST RAX,RAX
JZ 0x001323b2
LEA RSI,[RBP + -0x34]
XOR EDX,EDX
CALL RAX
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x34]
JMP 0x001323c0
LAB_001323b2:
MOV ESI,dword ptr [R13 + 0x4]
MOV dword ptr [RBP + -0x34],ESI
MOV EAX,dword ptr [R13]
ADD RDI,RAX
LAB_001323c0:
CALL qword ptr [R13 + 0x40]
TEST R12D,R12D
JNZ 0x001323e8
MOV ECX,dword ptr [R13 + 0xc]
LEA EDX,[RCX + -0x1]
AND EDX,EAX
SHR ECX,0x1
DEC ECX
AND ECX,EAX
CMP EDX,dword ptr [R13 + 0x8]
CMOVC ECX,EDX
CMP ECX,dword ptr [RBP + -0x74]
JNZ 0x001324fe
LAB_001323e8:
MOV RCX,qword ptr [RBP + -0x68]
ADD R15,RCX
MOV EDX,R14D
TEST EAX,R14D
JZ 0x0013241d
TEST R12B,0x4
JNZ 0x00132452
AND R12D,0x1
OR R12D,0x4
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x60],RAX
MOV R13,R15
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001324ac
LAB_0013241d:
TEST R12B,0x1
JNZ 0x00132480
AND R12D,0x4
MOV EAX,R12D
SHR EAX,0x1
ADD EAX,0x3
TEST R12D,R12D
MOV RSI,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x50],RSI
MOV R13,R15
MOV RSI,qword ptr [RBP + -0x30]
CMOVZ R13,RSI
CMOVZ RSI,R15
MOV R12D,EAX
MOV qword ptr [RBP + -0x48],RSI
JMP 0x001324ac
LAB_00132452:
TEST R12B,0x8
JNZ 0x0013246e
MOV RAX,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV qword ptr [RSI + 0x8],RAX
MOV dword ptr [RSI],EBX
AND R12D,0x1
OR R12D,0xc
LAB_0013246e:
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x60],RAX
MOV R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],R15
JMP 0x001324ac
LAB_00132480:
TEST R12B,0x2
JNZ 0x0013249c
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RSI + 0x8],RAX
MOV dword ptr [RSI],EBX
AND R12D,0x4
OR R12D,0x3
LAB_0013249c:
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],R15
LAB_001324ac:
MOV EBX,dword ptr [R15]
CMP EBX,-0x1
JNZ 0x00132382
MOV EAX,R12D
AND EAX,0x3
CMP EAX,0x1
JNZ 0x001324d5
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX + 0x8],RAX
MOV dword ptr [RCX],0xffffffff
LAB_001324d5:
AND R12D,0xc
CMP R12D,0x4
MOV R14,qword ptr [RBP + -0x40]
JNZ 0x00132506
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RCX + 0x8],RAX
MOV dword ptr [RCX],0xffffffff
JMP 0x00132506
LAB_001324f7:
MOV AL,0x1
JMP 0x001325eb
LAB_001324fe:
MOV R13,qword ptr [RBP + -0x30]
MOV R14,qword ptr [RBP + -0x40]
LAB_00132506:
MOV R15,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [R15 + 0x30]
TEST RAX,RAX
JZ 0x0013252a
LEA R12,[RBP + -0x78]
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
CALL RAX
MOV RDI,RAX
MOV ESI,dword ptr [R12]
JMP 0x00132537
LAB_0013252a:
MOV ESI,dword ptr [R15 + 0x4]
MOV dword ptr [RBP + -0x78],ESI
MOV EDI,dword ptr [R15]
ADD RDI,R14
LAB_00132537:
CALL qword ptr [R15 + 0x40]
MOV ECX,dword ptr [R15 + 0x8]
MOV EBX,dword ptr [R15 + 0xc]
INC ECX
LEA EDX,[RBX + -0x1]
AND EDX,EAX
SHR EBX,0x1
DEC EBX
AND EBX,EAX
CMP EDX,ECX
CMOVC EBX,EDX
MOV R14,RBX
SHL R14,0x4
ADD R14,qword ptr [RBP + -0x68]
CMP R14,R13
JZ 0x0013259d
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [R13],XMM0
MOV ECX,dword ptr [R15 + 0x8]
MOV EDX,dword ptr [R15 + 0xc]
INC ECX
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00132218
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [R14 + 0x8],RCX
CMP EBX,EAX
JNZ 0x001325ae
SUB R13,qword ptr [RBP + -0x68]
SHR R13,0x4
MOV dword ptr [R14],R13D
JMP 0x001325d3
LAB_0013259d:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [R14 + 0x8],RAX
MOV dword ptr [R14],0xffffffff
JMP 0x001325d3
LAB_001325ae:
MOV dword ptr [R14],0xffffffff
MOV RDX,qword ptr [RBP + -0x68]
SUB R13,RDX
SHR R13,0x4
LAB_001325c0:
MOV ECX,EAX
SHL RCX,0x4
MOV EAX,dword ptr [RDX + RCX*0x1]
CMP EAX,EBX
JNZ 0x001325c0
ADD RDX,RCX
MOV dword ptr [RDX],R13D
LAB_001325d3:
MOV RCX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RCX + 0x8]
INC EAX
MOV dword ptr [RCX + 0x8],EAX
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x001325e9
ADD EAX,EAX
MOV dword ptr [RCX + 0xc],EAX
LAB_001325e9:
XOR EAX,EAX
LAB_001325eb:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_hashtbl_insert(uint *param_1,long param_2)
{
uint uVar1;
uint uVar2;
uint *puVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
uint *puVar11;
uint *puVar12;
uint local_80;
uint local_7c;
uint *local_78;
long local_70;
int8 local_68;
uint *local_60;
int8 local_58;
uint *local_50;
long local_48;
uint local_3c;
uint *local_38;
puVar3 = (uint *)ma_alloc_dynamic(param_1 + 6);
if (puVar3 == (uint *)0x0) {
uVar5 = 1;
}
else {
param_1[4] = 0xffffffff;
local_70 = *(long *)(param_1 + 6);
local_78 = param_1;
local_48 = param_2;
if (1 < param_1[3]) {
uVar7 = param_1[3] >> 1;
uVar9 = param_1[2] - uVar7;
uVar10 = 0;
local_58 = 0;
local_68 = 0;
local_50 = (uint *)0x0;
local_60 = (uint *)0x0;
local_7c = uVar9;
do {
puVar12 = local_78;
lVar4 = *(long *)(local_70 + 8 + (ulong)uVar9 * 0x10);
local_38 = puVar3;
if (*(code **)(local_78 + 0xc) == (code *)0x0) {
local_3c = local_78[1];
lVar4 = lVar4 + (ulong)*local_78;
}
else {
lVar4 = (**(code **)(local_78 + 0xc))(lVar4,&local_3c,0);
}
uVar2 = (**(code **)(puVar12 + 0x10))(lVar4,local_3c);
if (uVar10 == 0) {
uVar8 = puVar12[3] - 1 & uVar2;
uVar1 = (puVar12[3] >> 1) - 1 & uVar2;
if (uVar8 < puVar12[2]) {
uVar1 = uVar8;
}
puVar3 = local_38;
if (uVar1 != local_7c) goto LAB_00132506;
}
puVar12 = (uint *)((ulong)uVar9 * 0x10 + local_70);
puVar3 = puVar12;
if ((uVar2 & uVar7) == 0) {
if ((uVar10 & 1) == 0) {
uVar9 = uVar10 & 4;
uVar10 = (uVar9 >> 1) + 3;
local_58 = *(int8 *)(puVar12 + 2);
local_50 = local_38;
if (uVar9 == 0) {
puVar3 = local_38;
local_50 = puVar12;
}
}
else {
if ((uVar10 & 2) == 0) {
*(int8 *)(local_50 + 2) = local_58;
*local_50 = uVar9;
uVar10 = uVar10 & 4 | 3;
}
local_58 = *(int8 *)(puVar12 + 2);
puVar3 = local_38;
local_50 = puVar12;
}
}
else if ((uVar10 & 4) == 0) {
uVar10 = uVar10 & 1 | 4;
local_68 = *(int8 *)(puVar12 + 2);
local_60 = local_38;
}
else {
if ((uVar10 & 8) == 0) {
*(int8 *)(local_60 + 2) = local_68;
*local_60 = uVar9;
uVar10 = uVar10 & 1 | 0xc;
}
local_68 = *(int8 *)(puVar12 + 2);
puVar3 = local_38;
local_60 = puVar12;
}
uVar9 = *puVar12;
} while (uVar9 != 0xffffffff);
if ((uVar10 & 3) == 1) {
*(int8 *)(local_50 + 2) = local_58;
*local_50 = 0xffffffff;
}
if ((uVar10 & 0xc) == 4) {
*(int8 *)(local_60 + 2) = local_68;
*local_60 = 0xffffffff;
}
}
LAB_00132506:
puVar12 = local_78;
if (*(code **)(local_78 + 0xc) == (code *)0x0) {
local_80 = local_78[1];
lVar4 = (ulong)*local_78 + local_48;
}
else {
lVar4 = (**(code **)(local_78 + 0xc))(local_48,&local_80,0);
}
uVar9 = (**(code **)(puVar12 + 0x10))(lVar4,local_80);
uVar10 = puVar12[3] - 1 & uVar9;
uVar9 = (puVar12[3] >> 1) - 1 & uVar9;
if (uVar10 < puVar12[2] + 1) {
uVar9 = uVar10;
}
puVar11 = (uint *)((ulong)uVar9 * 0x10 + local_70);
if (puVar11 == puVar3) {
*(long *)(puVar11 + 2) = local_48;
*puVar11 = 0xffffffff;
}
else {
uVar10 = puVar11[1];
uVar7 = puVar11[2];
uVar2 = puVar11[3];
*puVar3 = *puVar11;
puVar3[1] = uVar10;
puVar3[2] = uVar7;
puVar3[3] = uVar2;
uVar10 = hash_rec_mask(puVar12,*(int8 *)(puVar11 + 2),puVar12[3],puVar12[2] + 1);
*(long *)(puVar11 + 2) = local_48;
if (uVar9 == uVar10) {
*puVar11 = (uint)((ulong)((long)puVar3 - local_70) >> 4);
}
else {
*puVar11 = 0xffffffff;
do {
uVar6 = (ulong)uVar10;
uVar10 = *(uint *)(local_70 + uVar6 * 0x10);
} while (uVar10 != uVar9);
*(int *)(local_70 + uVar6 * 0x10) = (int)((ulong)((long)puVar3 - local_70) >> 4);
}
}
uVar9 = local_78[2] + 1;
local_78[2] = uVar9;
if (uVar9 == local_78[3]) {
local_78[3] = uVar9 * 2;
}
uVar5 = 0;
}
return uVar5;
}
| |
45,968 | mysql_change_user_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_change_user_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_change_user,
(parms->mysql, parms->user, parms->passwd, parms->db),
parms->mysql,
my_bool,
r_my_bool)
} | O3 | c | mysql_change_user_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
movq %rax, %rdi
callq 0x1ab01
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_change_user_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdx, [rdi+10h]
mov rcx, [rdi+18h]
mov rdi, rax
call mysql_change_user
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_change_user_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_change_user(*(_QWORD *)a1, *(char **)(a1 + 8), *(char **)(a1 + 16), *(_QWORD *)(a1 + 24));
*(_BYTE *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
| mysql_change_user_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x18]
MOV RDI,RAX
CALL 0x0011ab01
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_change_user_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_change_user(*param_1,param_1[1],param_1[2],param_1[3]);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
45,969 | my_hash_sort_utf16_nopad | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_utf16_nopad(CHARSET_INFO *cs,
const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res= mb_wc(cs, &wc, (uchar *) s, (uchar *) e)) > 0)
{
my_tosort_utf16(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_utf16_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x40(%rbp)
movq (%rcx), %rbx
movq %r8, -0x48(%rbp)
movq (%r8), %r14
testq %rdx, %rdx
jle 0x7e079
movq %rdx, %r15
movq %rsi, %r12
movq 0x78(%rdi), %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
addq %rsi, %r15
movq %rdi, %r13
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq *-0x50(%rbp)
testl %eax, %eax
jle 0x7e079
movq -0x38(%rbp), %rdx
movl $0xfffd, %esi # imm = 0xFFFD
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rdx
movq %r13, %rdi
ja 0x7e022
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rsi
movq %rdx, %rcx
shrq $0x8, %rcx
movq (%rsi,%rcx,8), %rsi
testq %rsi, %rsi
je 0x7e02e
movzbl %dl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x8(%rsi,%rcx,4), %esi
movq %rsi, -0x38(%rbp)
movl %esi, %ecx
shrl $0x8, %ecx
movq %rsi, %rdx
movl %ebx, %esi
andl $0x3f, %esi
addq %r14, %rsi
movzbl %dl, %edx
imulq %rsi, %rdx
movq %rbx, %rsi
shlq $0x8, %rsi
addq %rdx, %rsi
xorq %rbx, %rsi
movl %esi, %edx
andl $0x3f, %edx
addq %r14, %rdx
addq $0x3, %rdx
imulq %rcx, %rdx
movq %rsi, %rbx
shlq $0x8, %rbx
addq %rdx, %rbx
xorq %rsi, %rbx
addq $0x6, %r14
movl %eax, %eax
addq %rax, %r12
cmpq %r15, %r12
jb 0x7dfd2
movq -0x40(%rbp), %rax
movq %rbx, (%rax)
movq -0x48(%rbp), %rax
movq %r14, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_hash_sort_utf16_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_40], rcx
mov rbx, [rcx]
mov [rbp+var_48], r8
mov r14, [r8]
test rdx, rdx
jle loc_7E079
mov r15, rdx
mov r12, rsi
mov rax, [rdi+78h]
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
mov rax, [rax+28h]
mov [rbp+var_50], rax
add r15, rsi
loc_7DFD2:
mov r13, rdi
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r15
call [rbp+var_50]
test eax, eax
jle loc_7E079
mov rdx, [rbp+var_38]
mov esi, 0FFFDh
mov rcx, [rbp+var_30]
cmp rdx, [rcx]
mov rdi, r13
ja short loc_7E022
mov rcx, [rbp+var_30]
mov rsi, [rcx+8]
mov rcx, rdx
shr rcx, 8
mov rsi, [rsi+rcx*8]
test rsi, rsi
jz short loc_7E02E
movzx ecx, dl
lea rcx, [rcx+rcx*2]
mov esi, [rsi+rcx*4+8]
loc_7E022:
mov [rbp+var_38], rsi
mov ecx, esi
shr ecx, 8
mov rdx, rsi
loc_7E02E:
mov esi, ebx
and esi, 3Fh
add rsi, r14
movzx edx, dl
imul rdx, rsi
mov rsi, rbx
shl rsi, 8
add rsi, rdx
xor rsi, rbx
mov edx, esi
and edx, 3Fh
add rdx, r14
add rdx, 3
imul rdx, rcx
mov rbx, rsi
shl rbx, 8
add rbx, rdx
xor rbx, rsi
add r14, 6
mov eax, eax
add r12, rax
cmp r12, r15
jb loc_7DFD2
loc_7E079:
mov rax, [rbp+var_40]
mov [rax], rbx
mov rax, [rbp+var_48]
mov [rax], r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * my_hash_sort_utf16_nopad(long long a1, unsigned long long a2, long long a3, long long *a4, _QWORD *a5)
{
long long v5; // rbx
long long v6; // r14
unsigned long long v7; // r12
unsigned long long v8; // r15
int v9; // eax
unsigned __int8 v10; // dl
long long v11; // rsi
unsigned long long v12; // rcx
long long v13; // rsi
long long v14; // rsi
_QWORD *result; // rax
long long ( *v16)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+0h] [rbp-50h]
unsigned long long v19; // [rsp+18h] [rbp-38h] BYREF
unsigned long long *v20; // [rsp+20h] [rbp-30h]
v5 = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = a2;
v20 = *(unsigned long long **)(a1 + 120);
v16 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
v8 = a2 + a3;
while ( 1 )
{
v9 = v16(a1, &v19, v7, v8);
if ( v9 <= 0 )
goto LABEL_9;
v10 = v19;
v11 = 65533LL;
if ( v19 > *v20 )
goto LABEL_7;
v12 = v19 >> 8;
v13 = *(_QWORD *)(v20[1] + 8 * (v19 >> 8));
if ( v13 )
break;
LABEL_8:
v14 = v5 ^ ((v6 + (v5 & 0x3F)) * v10 + (v5 << 8));
v5 = v14 ^ (v12 * (v6 + (((unsigned __int8)v5 ^ (unsigned __int8)((v6 + (v5 & 0x3F)) * v10)) & 0x3F) + 3)
+ (v14 << 8));
v6 += 6LL;
v7 += (unsigned int)v9;
if ( v7 >= v8 )
goto LABEL_9;
}
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v19 + 8);
LABEL_7:
v19 = v11;
v12 = (unsigned int)v11 >> 8;
v10 = v11;
goto LABEL_8;
}
LABEL_9:
*a4 = v5;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_utf16_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x40],RCX
MOV RBX,qword ptr [RCX]
MOV qword ptr [RBP + -0x48],R8
MOV R14,qword ptr [R8]
TEST RDX,RDX
JLE 0x0017e079
MOV R15,RDX
MOV R12,RSI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x50],RAX
ADD R15,RSI
LAB_0017dfd2:
MOV R13,RDI
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R15
CALL qword ptr [RBP + -0x50]
TEST EAX,EAX
JLE 0x0017e079
MOV RDX,qword ptr [RBP + -0x38]
MOV ESI,0xfffd
MOV RCX,qword ptr [RBP + -0x30]
CMP RDX,qword ptr [RCX]
MOV RDI,R13
JA 0x0017e022
MOV RCX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RCX + 0x8]
MOV RCX,RDX
SHR RCX,0x8
MOV RSI,qword ptr [RSI + RCX*0x8]
TEST RSI,RSI
JZ 0x0017e02e
MOVZX ECX,DL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RSI + RCX*0x4 + 0x8]
LAB_0017e022:
MOV qword ptr [RBP + -0x38],RSI
MOV ECX,ESI
SHR ECX,0x8
MOV RDX,RSI
LAB_0017e02e:
MOV ESI,EBX
AND ESI,0x3f
ADD RSI,R14
MOVZX EDX,DL
IMUL RDX,RSI
MOV RSI,RBX
SHL RSI,0x8
ADD RSI,RDX
XOR RSI,RBX
MOV EDX,ESI
AND EDX,0x3f
ADD RDX,R14
ADD RDX,0x3
IMUL RDX,RCX
MOV RBX,RSI
SHL RBX,0x8
ADD RBX,RDX
XOR RBX,RSI
ADD R14,0x6
MOV EAX,EAX
ADD R12,RAX
CMP R12,R15
JC 0x0017dfd2
LAB_0017e079:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RBX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_hash_sort_utf16_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
code *pcVar1;
long lVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
ulong local_40;
ulong *local_38;
uVar6 = *param_4;
lVar7 = *param_5;
if (0 < param_3) {
local_38 = *(ulong **)(param_1 + 0x78);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar8 = param_3 + param_2;
do {
uVar3 = (*pcVar1)(param_1,&local_40,param_2,uVar8);
if ((int)uVar3 < 1) break;
uVar5 = 0xfffd;
if (*local_38 < local_40) {
LAB_0017e022:
uVar4 = uVar5 >> 8;
local_40 = uVar5;
}
else {
uVar4 = local_40 >> 8;
lVar2 = *(long *)(local_38[1] + uVar4 * 8);
if (lVar2 != 0) {
uVar5 = (ulong)*(uint *)(lVar2 + 8 + (local_40 & 0xff) * 0xc);
goto LAB_0017e022;
}
}
uVar6 = uVar6 * 0x100 + (local_40 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar7) ^ uVar6;
uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar7 + 3) * uVar4 ^ uVar6;
lVar7 = lVar7 + 6;
param_2 = param_2 + uVar3;
} while (param_2 < uVar8);
}
*param_4 = uVar6;
*param_5 = lVar7;
return;
}
| |
45,970 | minja::Parser::parseMathPlusMinus() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseMathPlusMinus() {
static std::regex plus_minus_tok(R"(\+|-(?![}%#]\}))");
auto left = parseMathMulDiv();
if (!left) throw std::runtime_error("Expected left side of 'math plus/minus' expression");
std::string op_str;
while (!(op_str = consumeToken(plus_minus_tok)).empty()) {
auto right = parseMathMulDiv();
if (!right) throw std::runtime_error("Expected right side of 'math plus/minus' expression");
auto op = op_str == "+" ? BinaryOpExpr::Op::Add : BinaryOpExpr::Op::Sub;
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), op);
}
return left;
} | O3 | cpp | minja::Parser::parseMathPlusMinus():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x6a72a(%rip), %rax # 0x101d78
movb (%rax), %al
testb %al, %al
movq %rdi, (%rsp)
je 0x97856
movq %rbp, %rdi
movq %r14, %rsi
callq 0x97968
cmpq $0x0, (%rbp)
je 0x978b1
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x18(%rsp), %r12
leaq 0x38(%rsp), %r13
leaq 0x678b9(%rip), %rax # 0xfef50
addq $0x10, %rax
movq %rax, 0x58(%rsp)
movq %r12, %rdi
movq %r14, %rsi
leaq 0x6a6ab(%rip), %rdx # 0x101d58
movl $0x1, %ecx
callq 0x94888
movq %r13, %rdi
movq %r12, %rsi
callq 0x1c670
movq 0x8(%rax), %r15
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x976e2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1c110
testq %r15, %r15
je 0x977ee
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x97968
cmpq $0x0, 0x8(%rsp)
je 0x9781f
movq %r13, %rdi
leaq 0x35225(%rip), %rsi # 0xcc933
callq 0x1cad0
cmpl $0x1, %eax
movl $0x2, %r15d
sbbl $0x0, %r15d
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x9774b
movq 0x68853(%rip), %rcx # 0xfff90
cmpb $0x0, (%rcx)
je 0x97747
incl 0x8(%rax)
jmp 0x9774b
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
movq %r14, %rbx
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
movl $0x58, %edi
callq 0x1c160
movq %rax, %r13
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r13)
movq 0x58(%rsp), %rax
movq %rax, (%r13)
movq %r13, %r14
addq $0x10, %r14
movq %r14, %rdi
movq %r12, %rsi
movq (%rsp), %rbp
movq %rbp, %rdx
leaq 0x8(%rsp), %rcx
movl %r15d, %r8d
callq 0xa1fa0
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movups (%rbp), %xmm0
movq %r14, (%rbp)
movq %r13, 0x8(%rbp)
movaps %xmm0, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x34564
leaq 0x68(%rsp), %rdi
callq 0x34564
leaq 0x20(%rsp), %rdi
callq 0x34564
leaq 0x10(%rsp), %rdi
callq 0x34564
leaq 0x38(%rsp), %r13
movq %rbx, %r14
jmp 0x976a0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x9780a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1c110
movq %rbp, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1c460
movq %rax, %r15
leaq 0x367ac(%rip), %rsi # 0xcdfdf
movq %rax, %rdi
callq 0x1c280
movq 0x68776(%rip), %rsi # 0xfffb8
movq 0x6872f(%rip), %rdx # 0xfff78
movq %r15, %rdi
callq 0x1c7b0
jmp 0x978e3
leaq 0x6a51b(%rip), %rdi # 0x101d78
callq 0x1c3e0
testl %eax, %eax
je 0x9765c
leaq 0x6a4e7(%rip), %rdi # 0x101d58
leaq 0x36724(%rip), %rsi # 0xcdf9c
movl $0x10, %edx
callq 0x68a34
leaq -0x2edef(%rip), %rdi # 0x68a9a
leaq 0x6a4c8(%rip), %rsi # 0x101d58
leaq 0x68e81(%rip), %rdx # 0x100718
callq 0x1ca80
leaq 0x6a4d5(%rip), %rdi # 0x101d78
callq 0x1c710
movq (%rsp), %rbp
jmp 0x9765c
movl $0x10, %edi
callq 0x1c460
movq %rax, %r15
leaq 0x366e7(%rip), %rsi # 0xcdfac
movq %rax, %rdi
callq 0x1c280
movq 0x686e4(%rip), %rsi # 0xfffb8
movq 0x6869d(%rip), %rdx # 0xfff78
movq %r15, %rdi
callq 0x1c7b0
movq %rax, %r14
leaq 0x6a48b(%rip), %rdi # 0x101d78
callq 0x1c4f0
jmp 0x9795f
movq %rax, %r14
jmp 0x97952
movq %rax, %r14
movq %r15, %rdi
callq 0x1caa0
jmp 0x97952
movq %rax, %r14
jmp 0x97927
movq %rax, %r14
movq %r15, %rdi
callq 0x1caa0
jmp 0x97927
jmp 0x97933
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x34564
leaq 0x10(%rsp), %rdi
callq 0x34564
jmp 0x97936
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x97952
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0x34564
movq %r14, %rdi
callq 0x1c7d0
nop
| _ZN5minja6Parser18parseMathPlusMinusEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rsi
mov rbp, rdi
lea rax, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok
mov al, [rax]
test al, al
mov qword ptr [rsp+0B8h+var_B8], rdi; int
jz loc_97856
loc_9765C:
mov rdi, rbp; this
mov rsi, r14
call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void)
cmp qword ptr [rbp+0], 0
jz loc_978B1
lea rax, [rsp+0B8h+var_70]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r12, [rsp+0B8h+var_A0]
lea r13, [rsp+0B8h+var_80]
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [rsp+0B8h+var_60], rax
loc_976A0:
mov rdi, r12; int
mov rsi, r14; int
lea rdx, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, r13
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov r15, [rax+8]
mov rdi, [rsp+0B8h+var_A0]; void *
lea rax, [rsp+0B8h+var_90]
cmp rdi, rax
jz short loc_976E2
mov rsi, [rsp+0B8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_976E2:
test r15, r15
jz loc_977EE
lea rdi, [rsp+0B8h+var_B0]; this
mov rsi, r14
call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void)
cmp [rsp+0B8h+var_B0], 0
jz loc_9781F
mov rdi, r13
lea rsi, asc_CC932+1; "+"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
cmp eax, 1
mov r15d, 2
sbb r15d, 0
mov rax, [r14]
mov [rsp+0B8h+var_A0], rax
mov rax, [r14+8]
mov [rsp+0B8h+var_98], rax
test rax, rax
jz short loc_9774B
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_97747
inc dword ptr [rax+8]
jmp short loc_9774B
loc_97747:
lock inc dword ptr [rax+8]
loc_9774B:
mov rax, [r14+20h]
mov rbx, r14
sub rax, [r14+10h]
mov [rsp+0B8h+var_90], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rax, 100000001h
mov [r13+8], rax
mov rax, [rsp+0B8h+var_60]
mov [r13+0], rax
mov r14, r13
add r14, 10h
mov rdi, r14
mov rsi, r12
mov rbp, qword ptr [rsp+0B8h+var_B8]
mov rdx, rbp
lea rcx, [rsp+0B8h+var_B0]
mov r8d, r15d
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)
xorps xmm0, xmm0
movaps [rsp+0B8h+var_58], xmm0
movups xmm0, xmmword ptr [rbp+0]
mov [rbp+0], r14
mov [rbp+8], r13
movaps [rsp+0B8h+var_48], xmm0
lea rdi, [rsp+0B8h+var_48+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_58+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_A8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [rsp+0B8h+var_80]
mov r14, rbx
jmp loc_976A0
loc_977EE:
mov rdi, [rsp+0B8h+var_80]; void *
lea rax, [rsp+0B8h+var_70]
cmp rdi, rax
jz short loc_9780A
mov rsi, [rsp+0B8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9780A:
mov rax, rbp
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9781F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_4; "Expected right side of 'math plus/minus"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp loc_978E3
loc_97856:
lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_9765C
lea rdi, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; minja::Parser::parseMathPlusMinus(void)::plus_minus_tok
lea rsi, asc_CDF9C; "\\+|-(?![}%#]\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_release
mov rbp, qword ptr [rsp+0B8h+var_B8]
jmp loc_9765C
loc_978B1:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_4; "Expected left side of 'math plus/minus'"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_978E3:
mov r14, rax
lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_9795F
mov r14, rax
jmp short loc_97952
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_97952
mov r14, rax
jmp short loc_97927
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_97927
jmp short loc_97933
mov r14, rax
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_97927:
lea rdi, [rsp+0B8h+var_A8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_97936
loc_97933:
mov r14, rax
loc_97936:
mov rdi, [rsp+0B8h+var_80]; void *
lea rax, [rsp+0B8h+var_70]
cmp rdi, rax
jz short loc_97952
mov rsi, [rsp+0B8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97952:
mov rdi, qword ptr [rsp+0B8h+var_B8]
add rdi, 8
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_9795F:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathPlusMinus(minja::Parser *this, long long a2)
{
minja::Parser *v2; // rbp
long long v3; // r15
unsigned int v4; // r15d
volatile signed __int32 *v5; // rax
long long **v6; // r13
__int128 v7; // xmm0
std::runtime_error *v9; // r15
std::runtime_error *exception; // r15
long long v11; // [rsp+8h] [rbp-B0h] BYREF
volatile signed __int32 *v12; // [rsp+10h] [rbp-A8h] BYREF
void *v13; // [rsp+18h] [rbp-A0h] BYREF
volatile signed __int32 *v14; // [rsp+20h] [rbp-98h] BYREF
long long v15; // [rsp+28h] [rbp-90h] BYREF
void *v16[2]; // [rsp+38h] [rbp-80h] BYREF
_QWORD v17[2]; // [rsp+48h] [rbp-70h] BYREF
long long *v18; // [rsp+58h] [rbp-60h]
__int128 v19; // [rsp+60h] [rbp-58h] BYREF
__int128 v20; // [rsp+70h] [rbp-48h] BYREF
v2 = this;
if ( !(_BYTE)`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11],
(long long)"\\+|-(?![}%#]\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]);
v2 = this;
}
minja::Parser::parseMathMulDiv(v2);
if ( !*(_QWORD *)v2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math plus/minus' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v16[0] = v17;
v16[1] = 0LL;
LOBYTE(v17[0]) = 0;
v18 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
while ( 1 )
{
minja::Parser::consumeToken(
&v13,
a2,
(long long)&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11],
1u);
v3 = *(_QWORD *)(std::string::operator=(v16, &v13) + 8);
if ( v13 != &v15 )
operator delete(v13, v15 + 1);
if ( !v3 )
break;
minja::Parser::parseMathMulDiv((minja::Parser *)&v11);
if ( !v11 )
{
v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v9, "Expected right side of 'math plus/minus' expression");
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = (((unsigned int)std::string::compare(v16, "+") | 0x200000000uLL) - 1) >> 32;
v13 = *(void **)a2;
v5 = *(volatile signed __int32 **)(a2 + 8);
v14 = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v5 + 2);
else
_InterlockedIncrement(v5 + 2);
}
v15 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v6 = (long long **)operator new(0x58uLL);
v6[1] = (long long *)0x100000001LL;
*v6 = v18;
v2 = this;
minja::BinaryOpExpr::BinaryOpExpr(v6 + 2, &v13, this, &v11, v4);
v19 = 0LL;
v7 = *(_OWORD *)this;
*(_QWORD *)this = v6 + 2;
*((_QWORD *)this + 1) = v6;
v20 = v7;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v20 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v19 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
}
if ( v16[0] != v17 )
operator delete(v16[0], v17[0] + 1LL);
return v2;
}
| parseMathPlusMinus:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RSI
MOV RBP,RDI
LEA RAX,[0x201d78]
MOV AL,byte ptr [RAX]
TEST AL,AL
MOV qword ptr [RSP],RDI
JZ 0x00197856
LAB_0019765c:
MOV RDI,RBP
MOV RSI,R14
CALL 0x00197968
CMP qword ptr [RBP],0x0
JZ 0x001978b1
LEA RAX,[RSP + 0x48]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R12,[RSP + 0x18]
LEA R13,[RSP + 0x38]
LEA RAX,[0x1fef50]
ADD RAX,0x10
MOV qword ptr [RSP + 0x58],RAX
LAB_001976a0:
MOV RDI,R12
MOV RSI,R14
LEA RDX,[0x201d58]
MOV ECX,0x1
CALL 0x00194888
MOV RDI,R13
MOV RSI,R12
CALL 0x0011c670
MOV R15,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
JZ 0x001976e2
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011c110
LAB_001976e2:
TEST R15,R15
JZ 0x001977ee
LAB_001976eb:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00197968
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0019781f
MOV RDI,R13
LEA RSI,[0x1cc933]
CALL 0x0011cad0
CMP EAX,0x1
MOV R15D,0x2
SBB R15D,0x0
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0019774b
MOV RCX,qword ptr [0x001fff90]
CMP byte ptr [RCX],0x0
JZ 0x00197747
INC dword ptr [RAX + 0x8]
JMP 0x0019774b
LAB_00197747:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019774b:
MOV RAX,qword ptr [R14 + 0x20]
MOV RBX,R14
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_0019775b:
MOV EDI,0x58
CALL 0x0011c160
LAB_00197765:
MOV R13,RAX
MOV RAX,0x100000001
MOV qword ptr [R13 + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [R13],RAX
MOV R14,R13
ADD R14,0x10
MOV RDI,R14
MOV RSI,R12
MOV RBP,qword ptr [RSP]
MOV RDX,RBP
LEA RCX,[RSP + 0x8]
MOV R8D,R15D
CALL 0x001a1fa0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVUPS XMM0,xmmword ptr [RBP]
MOV qword ptr [RBP],R14
MOV qword ptr [RBP + 0x8],R13
MOVAPS xmmword ptr [RSP + 0x70],XMM0
LEA RDI,[RSP + 0x78]
CALL 0x00134564
LEA RDI,[RSP + 0x68]
CALL 0x00134564
LEA RDI,[RSP + 0x20]
CALL 0x00134564
LEA RDI,[RSP + 0x10]
CALL 0x00134564
LEA R13,[RSP + 0x38]
MOV R14,RBX
JMP 0x001976a0
LAB_001977ee:
MOV RDI,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x0019780a
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011c110
LAB_0019780a:
MOV RAX,RBP
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019781f:
MOV EDI,0x10
CALL 0x0011c460
MOV R15,RAX
LAB_0019782c:
LEA RSI,[0x1cdfdf]
MOV RDI,RAX
CALL 0x0011c280
LAB_0019783b:
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R15
CALL 0x0011c7b0
LAB_00197856:
LEA RDI,[0x201d78]
CALL 0x0011c3e0
TEST EAX,EAX
JZ 0x0019765c
LAB_0019786a:
LEA RDI,[0x201d58]
LEA RSI,[0x1cdf9c]
MOV EDX,0x10
CALL 0x00168a34
LAB_00197882:
LEA RDI,[0x168a9a]
LEA RSI,[0x201d58]
LEA RDX,[0x200718]
CALL 0x0011ca80
LEA RDI,[0x201d78]
CALL 0x0011c710
MOV RBP,qword ptr [RSP]
JMP 0x0019765c
LAB_001978b1:
MOV EDI,0x10
CALL 0x0011c460
MOV R15,RAX
LAB_001978be:
LEA RSI,[0x1cdfac]
MOV RDI,RAX
CALL 0x0011c280
LAB_001978cd:
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R15
CALL 0x0011c7b0
|
/* minja::Parser::parseMathPlusMinus() */
long * minja::Parser::parseMathPlusMinus(void)
{
int iVar1;
long lVar2;
int8 *puVar3;
runtime_error *prVar4;
int8 *in_RSI;
long *in_RDI;
long local_b0;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_a8 [8];
long *local_a0;
long local_98;
long local_90 [2];
int1 *local_80;
int8 local_78;
int1 local_70;
int7 uStack_6f;
int **local_60;
int8 local_58;
int8 uStack_50;
long local_48;
long alStack_40 [2];
if (parseMathPlusMinus()::plus_minus_tok_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseMathPlusMinus()::plus_minus_tok_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 0019786a to 00197881 has its CatchHandler @ 001978e3 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseMathPlusMinus()::plus_minus_tok_abi_cxx11_);
}
}
parseMathMulDiv();
if (*in_RDI != 0) {
local_80 = &local_70;
local_78 = 0;
local_70 = 0;
local_60 = &PTR___Sp_counted_base_001fef60;
while( true ) {
/* try { // try from 001976a0 to 001976b6 has its CatchHandler @ 00197933 */
consumeToken((string *)&local_a0,in_RSI,parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,1);
lVar2 = std::__cxx11::string::operator=((string *)&local_80,(string *)&local_a0);
lVar2 = *(long *)(lVar2 + 8);
if (local_a0 != local_90) {
operator_delete(local_a0,local_90[0] + 1);
}
if (lVar2 == 0) break;
/* try { // try from 001976eb to 001976f7 has its CatchHandler @ 00197918 */
parseMathMulDiv();
if (local_b0 == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019782c to 0019783a has its CatchHandler @ 0019790b */
std::runtime_error::runtime_error
(prVar4,"Expected right side of \'math plus/minus\' expression");
/* try { // try from 0019783b to 00197850 has its CatchHandler @ 00197906 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
iVar1 = std::__cxx11::string::compare((char *)&local_80);
local_a0 = (long *)*in_RSI;
local_98 = in_RSI[1];
if (local_98 != 0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
*(int *)(local_98 + 8) = *(int *)(local_98 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_98 + 8) = *(int *)(local_98 + 8) + 1;
}
}
local_90[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 0019775b to 00197764 has its CatchHandler @ 0019791a */
puVar3 = (int8 *)operator_new(0x58);
puVar3[1] = 0x100000001;
*puVar3 = local_60;
BinaryOpExpr::BinaryOpExpr
((BinaryOpExpr *)(puVar3 + 2),(string *)&local_a0,in_RDI,&local_b0,
2 - (uint)(iVar1 == 0));
local_58 = 0;
uStack_50 = 0;
local_48 = *in_RDI;
alStack_40[0] = in_RDI[1];
*in_RDI = (long)(puVar3 + 2);
in_RDI[1] = (long)puVar3;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_98);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a8);
}
if (local_80 != &local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
return in_RDI;
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001978be to 001978cc has its CatchHandler @ 001978f9 */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'math plus/minus\' expression");
/* try { // try from 001978cd to 001978e2 has its CatchHandler @ 001978f4 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
| |
45,971 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const char * value_hint_2,
const std::string & help,
void (*handler)(common_params & params, const std::string &, const std::string &)
) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {} | O0 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq %r9, 0x78(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movl $0x0, 0x64(%rsp)
leaq 0x64(%rsp), %rax
movq %rax, 0x68(%rsp)
movq $0x1, 0x70(%rsp)
leaq 0x62(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x9e240
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %r8
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x63(%rsp), %rcx
callq 0x9e250
jmp 0x8ef80
leaq 0x62(%rsp), %rdi
callq 0x9e330
movq 0x20(%rsp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
callq 0x9e340
movq 0x20(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x40(%rsp)
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x9e350
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x9e360
jmp 0x8eff7
leaq 0x3f(%rsp), %rdi
callq 0x66ee0
movq 0x20(%rsp), %rdi
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rdi)
movq 0x88(%rsp), %rax
movq %rax, 0x80(%rdi)
movq $0x0, 0x88(%rdi)
addq $0x90, %rdi
movq 0x80(%rsp), %rsi
callq 0x591f0
jmp 0x8f042
movq 0x20(%rsp), %rax
movb $0x0, 0xb0(%rax)
movq $0x0, 0xb8(%rax)
movq $0x0, 0xc0(%rax)
movq 0x78(%rsp), %rcx
movq %rcx, 0xc8(%rax)
movq $0x0, 0xd0(%rax)
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x62(%rsp), %rdi
callq 0x9e330
jmp 0x8f0e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x3f(%rsp), %rdi
callq 0x66ee0
jmp 0x8f0cf
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
callq 0x66d00
movq 0x8(%rsp), %rdi
callq 0x66d60
movq 0x28(%rsp), %rdi
callq 0x66d60
movq 0x58(%rsp), %rdi
callq 0x59b90
nopl (%rax)
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_20], rcx
mov [rsp+0A8h+var_28], r8
mov [rsp+0A8h+var_30], r9
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_80], rax
mov [rsp+0A8h+var_88], rax
mov [rsp+0A8h+var_44], 0
lea rax, [rsp+0A8h+var_44]
mov [rsp+0A8h+var_40], rax
mov [rsp+0A8h+var_38], 1
lea rdi, [rsp+0A8h+var_46]
mov [rsp+0A8h+var_78], rdi
call _ZNSaI13llama_exampleEC2Ev; std::allocator<llama_example>::allocator(void)
mov rdi, [rsp+0A8h+var_80]
mov r8, [rsp+0A8h+var_78]
mov rsi, [rsp+0A8h+var_40]
mov rdx, [rsp+0A8h+var_38]
lea rcx, [rsp+0A8h+var_45]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
jmp short $+2
loc_8EF80:
lea rdi, [rsp+0A8h+var_46]
call _ZNSaI13llama_exampleED2Ev; std::allocator<llama_example>::~allocator()
mov rax, [rsp+0A8h+var_88]
mov rdi, rax
add rdi, 30h ; '0'
mov [rsp+0A8h+var_A0], rdi
xorps xmm0, xmm0
movups xmmword ptr [rax+50h], xmm0
movups xmmword ptr [rax+40h], xmm0
movups xmmword ptr [rax+30h], xmm0
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2Ev; std::set<llama_example>::set(void)
mov rax, [rsp+0A8h+var_88]
add rax, 60h ; '`'
mov [rsp+0A8h+var_98], rax
mov rax, [rsp+0A8h+var_10]
movups xmm0, xmmword ptr [rax]
movaps [rsp+0A8h+var_68], xmm0
lea rdi, [rsp+0A8h+var_69]
mov [rsp+0A8h+var_90], rdi
call _ZNSaIPKcEC2Ev; std::allocator<char const*>::allocator(void)
mov rdi, [rsp+0A8h+var_98]
mov rcx, [rsp+0A8h+var_90]
mov rsi, qword ptr [rsp+0A8h+var_68]
mov rdx, qword ptr [rsp+0A8h+var_68+8]
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
jmp short $+2
loc_8EFF7:
lea rdi, [rsp+0A8h+var_69]
call _ZNSaIPKcED2Ev; std::allocator<char const*>::~allocator()
mov rdi, [rsp+0A8h+var_88]
mov rax, [rsp+0A8h+var_18]
mov [rdi+78h], rax
mov rax, [rsp+0A8h+var_20]
mov [rdi+80h], rax
mov qword ptr [rdi+88h], 0
add rdi, 90h
mov rsi, [rsp+0A8h+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_8F042:
mov rax, [rsp+0A8h+var_88]
mov byte ptr [rax+0B0h], 0
mov qword ptr [rax+0B8h], 0
mov qword ptr [rax+0C0h], 0
mov rcx, [rsp+0A8h+var_30]
mov [rax+0C8h], rcx
mov qword ptr [rax+0D0h], 0
add rsp, 0A8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_5A]
call _ZNSaI13llama_exampleED2Ev; std::allocator<llama_example>::~allocator()
jmp short loc_8F0E3
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_37]
call _ZNSaIPKcED2Ev; std::allocator<char const*>::~allocator()
jmp short loc_8F0CF
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
loc_8F0CF:
mov rdi, [rsp+arg_0]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EED2Ev; std::set<llama_example>::~set()
mov rdi, [rsp+arg_20]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EED2Ev; std::set<llama_example>::~set()
loc_8F0E3:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, __int128 *a2, long long a3, long long a4, long long a5, long long a6)
{
int v6; // r9d
int v7; // r8d
int v8; // r9d
long long result; // rax
int v10; // [rsp+0h] [rbp-A8h]
char v11; // [rsp+3Fh] [rbp-69h] BYREF
__int128 v12; // [rsp+40h] [rbp-68h]
char v13; // [rsp+62h] [rbp-46h] BYREF
char v14; // [rsp+63h] [rbp-45h] BYREF
int v15; // [rsp+64h] [rbp-44h] BYREF
int *v16; // [rsp+68h] [rbp-40h]
long long v17; // [rsp+70h] [rbp-38h]
long long v18; // [rsp+78h] [rbp-30h]
long long v19; // [rsp+80h] [rbp-28h]
long long v20; // [rsp+88h] [rbp-20h]
long long v21; // [rsp+90h] [rbp-18h]
__int128 *v22; // [rsp+98h] [rbp-10h]
long long v23; // [rsp+A0h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v15 = 0;
v16 = &v15;
v17 = 1LL;
std::allocator<llama_example>::allocator();
std::set<llama_example>::set(a1, (_DWORD)v16, v17, (unsigned int)&v14, (unsigned int)&v13, v6);
std::allocator<llama_example>::~allocator(&v13);
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
std::set<llama_example>::set();
v12 = *v22;
std::allocator<char const*>::allocator();
std::vector<char const*>::vector(a1 + 96, v12, DWORD2(v12), (unsigned int)&v11, v7, v8, v10);
std::allocator<char const*>::~allocator((long long)&v11);
*(_QWORD *)(a1 + 120) = v21;
*(_QWORD *)(a1 + 128) = v20;
*(_QWORD *)(a1 + 136) = 0LL;
std::string::basic_string(a1 + 144, v19);
result = a1;
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = 0LL;
*(_QWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 200) = v18;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
| common_arg:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x80],R8
MOV qword ptr [RSP + 0x78],R9
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x64],0x0
LEA RAX,[RSP + 0x64]
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],0x1
LEA RDI,[RSP + 0x62]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x0019e240
MOV RDI,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LAB_0018ef74:
LEA RCX,[RSP + 0x63]
CALL 0x0019e250
JMP 0x0018ef80
LAB_0018ef80:
LEA RDI,[RSP + 0x62]
CALL 0x0019e330
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,RAX
ADD RDI,0x30
MOV qword ptr [RSP + 0x8],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x50],XMM0
MOVUPS xmmword ptr [RAX + 0x40],XMM0
MOVUPS xmmword ptr [RAX + 0x30],XMM0
CALL 0x0019e340
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x60
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
LEA RDI,[RSP + 0x3f]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0019e350
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LAB_0018eff0:
CALL 0x0019e360
JMP 0x0018eff7
LAB_0018eff7:
LEA RDI,[RSP + 0x3f]
CALL 0x00166ee0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RDI + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RDI + 0x80],RAX
MOV qword ptr [RDI + 0x88],0x0
ADD RDI,0x90
MOV RSI,qword ptr [RSP + 0x80]
LAB_0018f03b:
CALL 0x001591f0
LAB_0018f040:
JMP 0x0018f042
LAB_0018f042:
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX + 0xb0],0x0
MOV qword ptr [RAX + 0xb8],0x0
MOV qword ptr [RAX + 0xc0],0x0
MOV RCX,qword ptr [RSP + 0x78]
MOV qword ptr [RAX + 0xc8],RCX
MOV qword ptr [RAX + 0xd0],0x0
ADD RSP,0xa8
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&,
std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4,
_func_void_common_params_ptr_string_ptr_string_ptr *param_5)
{
allocator<char_const*> local_69;
int8 local_68;
int8 uStack_60;
allocator<llama_example> local_46;
int1 local_45;
int4 local_44;
int4 *local_40;
int8 local_38;
_func_void_common_params_ptr_string_ptr_string_ptr *local_30;
string *local_28;
char *local_20;
char *local_18;
int8 *local_10;
common_arg *local_8;
local_44 = 0;
local_40 = &local_44;
local_38 = 1;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = (int8 *)param_1;
local_8 = this;
std::allocator<llama_example>::allocator(&local_46);
/* try { // try from 0018ef74 to 0018ef7d has its CatchHandler @ 0018f083 */
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,local_40,local_38,&local_45,&local_46);
std::allocator<llama_example>::~allocator(&local_46);
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
((set<llama_example,std::less<llama_example>,std::allocator<llama_example>> *)
(this + 0x30));
local_68 = *local_10;
uStack_60 = local_10[1];
std::allocator<char_const*>::allocator(&local_69);
/* try { // try from 0018eff0 to 0018eff4 has its CatchHandler @ 0018f09d */
std::vector<char_const*,std::allocator<char_const*>>::vector
(this + 0x60,local_68,uStack_60,&local_69);
std::allocator<char_const*>::~allocator(&local_69);
*(char **)(this + 0x78) = local_18;
*(char **)(this + 0x80) = local_20;
*(int8 *)(this + 0x88) = 0;
/* try { // try from 0018f03b to 0018f03f has its CatchHandler @ 0018f0b7 */
std::__cxx11::string::string((string *)(this + 0x90),local_28);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_30;
*(int8 *)(this + 0xd0) = 0;
return;
}
| |
45,972 | 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;
}
| |
45,973 | process_dbl_arg | eloqsql/strings/my_vsnprintf.c | static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
} | O0 | c | process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jne 0x7c1d2
movq $0x6, -0x18(%rbp)
jmp 0x7c1e3
cmpq $0x1f, -0x18(%rbp)
jb 0x7c1e1
movq $0x1e, -0x18(%rbp)
jmp 0x7c1e3
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x7c205
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x7c218
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x66, %eax
jne 0x7c24b
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x74280
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7c270
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x75cc0
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| process_dbl_arg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
movsd [rbp+var_20], xmm0
mov [rbp+var_21], al
cmp [rbp+var_18], 0FFFFh
jnz short loc_7C1D2
mov [rbp+var_18], 6
jmp short loc_7C1E3
loc_7C1D2:
cmp [rbp+var_18], 1Fh
jb short loc_7C1E1
mov [rbp+var_18], 1Eh
loc_7C1E1:
jmp short $+2
loc_7C1E3:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
sub rcx, rdx
sub rcx, 1
cmp rax, rcx
jnb short loc_7C205
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short loc_7C218
loc_7C205:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
sub rax, 1
mov [rbp+var_30], rax
loc_7C218:
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
movsx eax, [rbp+var_21]
cmp eax, 66h ; 'f'
jnz short loc_7C24B
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov edi, eax
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call my_fcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
jmp short loc_7C270
loc_7C24B:
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov esi, eax
mov rdx, [rbp+var_8]
mov edi, 1
xor eax, eax
mov ecx, eax
call my_gcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
loc_7C270:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _BYTE * process_dbl_arg(_BYTE *a1, long long a2, unsigned long long a3, char a4, double a5)
{
int v6; // [rsp+0h] [rbp-30h]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = a3;
if ( a3 == 0xFFFF )
{
v7 = 6LL;
}
else if ( a3 >= 0x1F )
{
v7 = 30LL;
}
if ( v7 >= a2 - (long long)a1 - 1 )
v6 = a2 - (_DWORD)a1 - 1;
else
v6 = v7;
if ( a4 == 102 )
return &a1[my_fcvt(v6, a1, 0LL, a5)];
else
return &a1[my_gcvt(1, v6, a1, 0LL, a5)];
}
| process_dbl_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOVSD qword ptr [RBP + -0x20],XMM0
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x18],0xffff
JNZ 0x0017c1d2
MOV qword ptr [RBP + -0x18],0x6
JMP 0x0017c1e3
LAB_0017c1d2:
CMP qword ptr [RBP + -0x18],0x1f
JC 0x0017c1e1
MOV qword ptr [RBP + -0x18],0x1e
LAB_0017c1e1:
JMP 0x0017c1e3
LAB_0017c1e3:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
SUB RCX,0x1
CMP RAX,RCX
JNC 0x0017c205
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017c218
LAB_0017c205:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_0017c218:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOVSX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x66
JNZ 0x0017c24b
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00174280
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017c270
LAB_0017c24b:
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x8]
MOV EDI,0x1
XOR EAX,EAX
MOV ECX,EAX
CALL 0x00175cc0
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017c270:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long process_dbl_arg(int8 param_1,long param_2,long param_3,ulong param_4,char param_5)
{
int8 local_38;
int8 local_20;
int8 local_10;
if (param_4 == 0xffff) {
local_20 = 6;
}
else {
local_20 = param_4;
if (0x1e < param_4) {
local_20 = 0x1e;
}
}
if (local_20 < (param_3 - param_2) - 1U) {
local_38 = local_20;
}
else {
local_38 = (param_3 - param_2) - 1;
}
if (param_5 == 'f') {
local_10 = my_fcvt(param_1,local_38 & 0xffffffff,param_2,0);
}
else {
local_10 = my_gcvt(param_1,1,local_38 & 0xffffffff,param_2,0);
}
local_10 = local_10 + param_2;
return local_10;
}
| |
45,974 | Explain_update::Explain_update(st_mem_root*, bool) | eloqsql/sql/sql_explain.h | Explain_update(MEM_ROOT *root, bool is_analyze) :
Explain_node(root),
filesort_tracker(NULL),
command_tracker(is_analyze)
{} | O0 | c | Explain_update::Explain_update(st_mem_root*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rsi
callq 0x57ddb0
movq -0x38(%rbp), %rdi
leaq 0x81ab75(%rip), %rax # 0x12a0568
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x48, %rdi
movq %rdi, -0x30(%rbp)
callq 0x6472f0
jmp 0xa85a09
movq -0x38(%rbp), %rdi
addq $0x88, %rdi
callq 0x6471b0
jmp 0xa85a1b
movq -0x38(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0x40(%rbp)
callq 0x57de00
jmp 0xa85a31
movq -0x38(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
callq 0x6471b0
jmp 0xa85a43
movq -0x38(%rbp), %rdi
addq $0x128, %rdi # imm = 0x128
callq 0x647340
jmp 0xa85a55
movq -0x38(%rbp), %rdi
addq $0x160, %rdi # imm = 0x160
movq %rdi, -0x48(%rbp)
callq 0x57de00
jmp 0xa85a6b
movq -0x38(%rbp), %rdi
addq $0x1e8, %rdi # imm = 0x1E8
callq 0x5a53c0
jmp 0xa85a7d
movq -0x38(%rbp), %rdi
movq $0x0, 0x200(%rdi)
addq $0x208, %rdi # imm = 0x208
callq 0x5a53c0
jmp 0xa85a9a
movq -0x38(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
movzbl -0x11(%rbp), %esi
andl $0x1, %esi
callq 0x5a5460
jmp 0xa85ab3
movq -0x38(%rbp), %rdi
addq $0x248, %rdi # imm = 0x248
callq 0x5a54a0
jmp 0xa85ac5
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa85b1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa85b13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xa85b0a
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x6424d0
movq -0x40(%rbp), %rdi
callq 0x6424d0
movq -0x30(%rbp), %rdi
callq 0x647480
movq -0x38(%rbp), %rdi
callq 0x57dee0
movq -0x20(%rbp), %rdi
callq 0x433ff0
nop
| _ZN14Explain_updateC2EP11st_mem_rootb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
and al, 1
mov [rbp+var_11], al
mov rdi, [rbp+var_8]
mov [rbp+var_38], rdi
mov rsi, [rbp+var_10]
call _ZN12Explain_nodeC2EP11st_mem_root; Explain_node::Explain_node(st_mem_root *)
mov rdi, [rbp+var_38]
lea rax, _ZTV14Explain_update; `vtable for'Explain_update
add rax, 10h
mov [rdi], rax
add rdi, 48h ; 'H'
mov [rbp+var_30], rdi
call _ZN12StringBufferILm32EEC2Ev; StringBuffer<32ul>::StringBuffer(void)
jmp short $+2
loc_A85A09:
mov rdi, [rbp+var_38]
add rdi, 88h; this
call _ZN11String_listC2Ev; String_list::String_list(void)
jmp short $+2
loc_A85A1B:
mov rdi, [rbp+var_38]
add rdi, 0A8h
mov [rbp+var_40], rdi
call _ZN12StringBufferILm64EEC2Ev; StringBuffer<64ul>::StringBuffer(void)
jmp short $+2
loc_A85A31:
mov rdi, [rbp+var_38]
add rdi, 110h; this
call _ZN11String_listC2Ev; String_list::String_list(void)
jmp short $+2
loc_A85A43:
mov rdi, [rbp+var_38]
add rdi, 128h; this
call _ZN17Explain_index_useC2Ev; Explain_index_use::Explain_index_use(void)
jmp short $+2
loc_A85A55:
mov rdi, [rbp+var_38]
add rdi, 160h
mov [rbp+var_48], rdi
call _ZN12StringBufferILm64EEC2Ev; StringBuffer<64ul>::StringBuffer(void)
jmp short $+2
loc_A85A6B:
mov rdi, [rbp+var_38]
add rdi, 1E8h; this
call _ZN20Table_access_trackerC2Ev; Table_access_tracker::Table_access_tracker(void)
jmp short $+2
loc_A85A7D:
mov rdi, [rbp+var_38]
mov qword ptr [rdi+200h], 0
add rdi, 208h; this
call _ZN20Table_access_trackerC2Ev; Table_access_tracker::Table_access_tracker(void)
jmp short $+2
loc_A85A9A:
mov rdi, [rbp+var_38]
add rdi, 220h; this
movzx esi, [rbp+var_11]
and esi, 1; bool
call _ZN24Time_and_counter_trackerC2Eb; Time_and_counter_tracker::Time_and_counter_tracker(bool)
jmp short $+2
loc_A85AB3:
mov rdi, [rbp+var_38]
add rdi, 248h; this
call _ZN17Exec_time_trackerC2Ev; Exec_time_tracker::Exec_time_tracker(void)
jmp short $+2
loc_A85AC5:
add rsp, 50h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_A85B1C
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_A85B13
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_A85B0A
mov rdi, [rbp+var_48]
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
call _ZN12StringBufferILm64EED2Ev; StringBuffer<64ul>::~StringBuffer()
loc_A85B0A:
mov rdi, [rbp+var_40]
call _ZN12StringBufferILm64EED2Ev; StringBuffer<64ul>::~StringBuffer()
loc_A85B13:
mov rdi, [rbp+var_30]
call _ZN12StringBufferILm32EED2Ev; StringBuffer<32ul>::~StringBuffer()
loc_A85B1C:
mov rdi, [rbp+var_38]; this
call _ZN12Explain_nodeD2Ev; Explain_node::~Explain_node()
mov rdi, [rbp+var_20]
call __Unwind_Resume
| void Explain_update::Explain_update(long long a1, long long a2, char a3)
{
char v3; // [rsp+3Fh] [rbp-11h]
v3 = a3 & 1;
Explain_node::Explain_node(a1, a2);
*(_QWORD *)a1 = &`vtable for'Explain_update + 2;
StringBuffer<32ul>::StringBuffer((char *)(a1 + 72));
String_list::String_list((String_list *)(a1 + 136));
StringBuffer<64ul>::StringBuffer((char *)(a1 + 168));
String_list::String_list((String_list *)(a1 + 272));
Explain_index_use::Explain_index_use((Explain_index_use *)(a1 + 296));
StringBuffer<64ul>::StringBuffer((char *)(a1 + 352));
Table_access_tracker::Table_access_tracker((Table_access_tracker *)(a1 + 488));
*(_QWORD *)(a1 + 512) = 0LL;
Table_access_tracker::Table_access_tracker((Table_access_tracker *)(a1 + 520));
Time_and_counter_tracker::Time_and_counter_tracker((Time_and_counter_tracker *)(a1 + 544), v3 & 1);
Exec_time_tracker::Exec_time_tracker((Exec_time_tracker *)(a1 + 584));
}
| fix_length_and_dec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RDI
CALL 0x00a68630
TEST AL,0x1
JNZ 0x00a859df
JMP 0x00a859e5
LAB_00a859df:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00a859f2
LAB_00a859e5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x005e4560
MOV byte ptr [RBP + -0x1],0x0
LAB_00a859f2:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* Item_func_glength::fix_length_and_dec() */
bool __thiscall Item_func_glength::fix_length_and_dec(Item_func_glength *this)
{
byte bVar1;
bool bVar2;
bVar1 = Item_real_func::fix_length_and_dec((Item_real_func *)this);
bVar2 = (bVar1 & 1) != 0;
if (!bVar2) {
Item::set_maybe_null((Item *)this);
}
return bVar2;
}
| |
45,975 | LoadMusicStreamFromMemory | csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/raudio.c | Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize)
{
Music music = { 0 };
bool musicLoaded = false;
if (false) { }
#if defined(SUPPORT_FILEFORMAT_WAV)
else if ((strcmp(fileType, ".wav") == 0) || (strcmp(fileType, ".WAV") == 0))
{
drwav *ctxWav = RL_CALLOC(1, sizeof(drwav));
bool success = drwav_init_memory(ctxWav, (const void *)data, dataSize, NULL);
if (success)
{
music.ctxType = MUSIC_AUDIO_WAV;
music.ctxData = ctxWav;
int sampleSize = ctxWav->bitsPerSample;
if (ctxWav->bitsPerSample == 24) sampleSize = 16; // Forcing conversion to s16 on UpdateMusicStream()
music.stream = LoadAudioStream(ctxWav->sampleRate, sampleSize, ctxWav->channels);
music.frameCount = (unsigned int)ctxWav->totalPCMFrameCount;
music.looping = true; // Looping enabled by default
musicLoaded = true;
}
else {
drwav_uninit(ctxWav);
RL_FREE(ctxWav);
}
}
#endif
#if defined(SUPPORT_FILEFORMAT_OGG)
else if ((strcmp(fileType, ".ogg") == 0) || (strcmp(fileType, ".OGG") == 0))
{
// Open ogg audio stream
stb_vorbis* ctxOgg = stb_vorbis_open_memory((const unsigned char *)data, dataSize, NULL, NULL);
if (ctxOgg != NULL)
{
music.ctxType = MUSIC_AUDIO_OGG;
music.ctxData = ctxOgg;
stb_vorbis_info info = stb_vorbis_get_info((stb_vorbis *)music.ctxData); // Get Ogg file info
// OGG bit rate defaults to 16 bit, it's enough for compressed format
music.stream = LoadAudioStream(info.sample_rate, 16, info.channels);
// WARNING: It seems this function returns length in frames, not samples, so we multiply by channels
music.frameCount = (unsigned int)stb_vorbis_stream_length_in_samples((stb_vorbis *)music.ctxData);
music.looping = true; // Looping enabled by default
musicLoaded = true;
}
else
{
stb_vorbis_close(ctxOgg);
}
}
#endif
#if defined(SUPPORT_FILEFORMAT_MP3)
else if ((strcmp(fileType, ".mp3") == 0) || (strcmp(fileType, ".MP3") == 0))
{
drmp3 *ctxMp3 = RL_CALLOC(1, sizeof(drmp3));
int success = drmp3_init_memory(ctxMp3, (const void*)data, dataSize, NULL);
if (success)
{
music.ctxType = MUSIC_AUDIO_MP3;
music.ctxData = ctxMp3;
music.stream = LoadAudioStream(ctxMp3->sampleRate, 32, ctxMp3->channels);
music.frameCount = (unsigned int)drmp3_get_pcm_frame_count(ctxMp3);
music.looping = true; // Looping enabled by default
musicLoaded = true;
}
else
{
drmp3_uninit(ctxMp3);
RL_FREE(ctxMp3);
}
}
#endif
#if defined(SUPPORT_FILEFORMAT_QOA)
else if ((strcmp(fileType, ".qoa") == 0) || (strcmp(fileType, ".QOA") == 0))
{
qoaplay_desc *ctxQoa = NULL;
if ((data != NULL) && (dataSize > 0))
{
ctxQoa = qoaplay_open_memory(data, dataSize);
}
if (ctxQoa != NULL)
{
music.ctxType = MUSIC_AUDIO_QOA;
music.ctxData = ctxQoa;
// NOTE: We are loading samples are 32bit float normalized data, so,
// we configure the output audio stream to also use float 32bit
music.stream = LoadAudioStream(ctxQoa->info.samplerate, 32, ctxQoa->info.channels);
music.frameCount = ctxQoa->info.samples;
music.looping = true; // Looping enabled by default
musicLoaded = true;
}
else{} //No uninit required
}
#endif
#if defined(SUPPORT_FILEFORMAT_FLAC)
else if ((strcmp(fileType, ".flac") == 0) || (strcmp(fileType, ".FLAC") == 0))
{
drflac *ctxFlac = drflac_open_memory((const void*)data, dataSize, NULL);
if (ctxFlac != NULL)
{
music.ctxType = MUSIC_AUDIO_FLAC;
music.ctxData = ctxFlac;
int sampleSize = ctxFlac->bitsPerSample;
if (ctxFlac->bitsPerSample == 24) sampleSize = 16; // Forcing conversion to s16 on UpdateMusicStream()
music.stream = LoadAudioStream(ctxFlac->sampleRate, sampleSize, ctxFlac->channels);
music.frameCount = (unsigned int)ctxFlac->totalPCMFrameCount;
music.looping = true; // Looping enabled by default
musicLoaded = true;
}
else
{
drflac_free(ctxFlac, NULL);
}
}
#endif
#if defined(SUPPORT_FILEFORMAT_XM)
else if ((strcmp(fileType, ".xm") == 0) || (strcmp(fileType, ".XM") == 0))
{
jar_xm_context_t *ctxXm = NULL;
int result = jar_xm_create_context_safe(&ctxXm, (const char *)data, dataSize, AUDIO.System.device.sampleRate);
if (result == 0) // XM AUDIO.System.context created successfully
{
music.ctxType = MUSIC_MODULE_XM;
music.ctxData = ctxXm;
jar_xm_set_max_loop_count(ctxXm, 0); // Set infinite number of loops
unsigned int bits = 32;
if (AUDIO_DEVICE_FORMAT == ma_format_s16) bits = 16;
else if (AUDIO_DEVICE_FORMAT == ma_format_u8) bits = 8;
// NOTE: Only stereo is supported for XM
music.stream = LoadAudioStream(AUDIO.System.device.sampleRate, bits, 2);
music.frameCount = (unsigned int)jar_xm_get_remaining_samples(ctxXm); // NOTE: Always 2 channels (stereo)
music.looping = true; // Looping enabled by default
jar_xm_reset(ctxXm); // Make sure we start at the beginning of the song
musicLoaded = true;
}
else
{
jar_xm_free_context(ctxXm);
}
}
#endif
#if defined(SUPPORT_FILEFORMAT_MOD)
else if ((strcmp(fileType, ".mod") == 0) || (strcmp(fileType, ".MOD") == 0))
{
jar_mod_context_t *ctxMod = (jar_mod_context_t *)RL_MALLOC(sizeof(jar_mod_context_t));
int result = 0;
jar_mod_init(ctxMod);
// Copy data to allocated memory for default UnloadMusicStream
unsigned char *newData = (unsigned char *)RL_MALLOC(dataSize);
int it = dataSize/sizeof(unsigned char);
for (int i = 0; i < it; i++) newData[i] = data[i];
// Memory loaded version for jar_mod_load_file()
if (dataSize && (dataSize < 32*1024*1024))
{
ctxMod->modfilesize = dataSize;
ctxMod->modfile = newData;
if (jar_mod_load(ctxMod, (void *)ctxMod->modfile, dataSize)) result = dataSize;
}
if (result > 0)
{
music.ctxType = MUSIC_MODULE_MOD;
music.ctxData = ctxMod;
// NOTE: Only stereo is supported for MOD
music.stream = LoadAudioStream(AUDIO.System.device.sampleRate, 16, 2);
music.frameCount = (unsigned int)jar_mod_max_samples(ctxMod); // NOTE: Always 2 channels (stereo)
music.looping = true; // Looping enabled by default
musicLoaded = true;
}
else
{
jar_mod_unload(ctxMod);
RL_FREE(ctxMod);
}
}
#endif
else TRACELOG(LOG_WARNING, "STREAM: Data format not supported");
if (!musicLoaded)
{
TRACELOG(LOG_WARNING, "FILEIO: Music data could not be loaded");
}
else
{
// Show some music stream info
TRACELOG(LOG_INFO, "FILEIO: Music data loaded successfully");
TRACELOG(LOG_INFO, " > Sample rate: %i Hz", music.stream.sampleRate);
TRACELOG(LOG_INFO, " > Sample size: %i bits", music.stream.sampleSize);
TRACELOG(LOG_INFO, " > Channels: %i (%s)", music.stream.channels, (music.stream.channels == 1)? "Mono" : (music.stream.channels == 2)? "Stereo" : "Multi");
TRACELOG(LOG_INFO, " > Total frames: %i", music.frameCount);
}
return music;
} | O3 | c | LoadMusicStreamFromMemory:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x30(%rdi)
leaq 0x91a08(%rip), %rsi # 0xd5e98
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x445b5
leaq 0x919f6(%rip), %rsi # 0xd5e9d
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x445b5
leaq 0x91a02(%rip), %rsi # 0xd5ec0
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44627
leaq 0x919f0(%rip), %rsi # 0xd5ec5
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44627
leaq 0x919fc(%rip), %rsi # 0xd5ee8
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44735
leaq 0x919ea(%rip), %rsi # 0xd5eed
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44735
leaq 0x919f6(%rip), %rsi # 0xd5f10
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x447a9
leaq 0x919e4(%rip), %rsi # 0xd5f15
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x447a9
leaq 0x91f3d(%rip), %rsi # 0xd6485
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44805
leaq 0x9202d(%rip), %rsi # 0xd658c
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44805
leaq 0x91f13(%rip), %rsi # 0xd6489
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44840
leaq 0x92003(%rip), %rsi # 0xd6590
movq %r15, %rdi
callq 0xa760
testl %eax, %eax
je 0x44840
leaq 0x91ff1(%rip), %rsi # 0xd6595
movl $0x4, %edi
xorl %eax, %eax
callq 0xb9e53
jmp 0x44710
movl $0x1, %edi
movl $0x190, %esi # imm = 0x190
callq 0xa330
movq %rax, %r15
movslq %ebp, %rdx
movq $0x0, (%rsp)
movq %rax, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2ecd2
testl %eax, %eax
je 0x44700
movl $0x1, 0x28(%rbx)
movzwl 0x72(%r15), %eax
cmpw $0x18, %ax
movl $0x10, %ecx
cmovnel %eax, %ecx
movq %r15, 0x30(%rbx)
movzwl %cx, %edx
movl 0x6c(%r15), %esi
movzwl 0x70(%r15), %ecx
movq %rbx, %rdi
callq 0x4437e
movl 0x78(%r15), %r14d
movl %r14d, 0x20(%rbx)
jmp 0x4466c
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x371e2
testq %rax, %rax
je 0x44710
movq %rax, %r14
movl $0x2, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movl (%rax), %esi
movl 0x4(%rax), %ecx
movq %rbx, %rdi
movl $0x10, %edx
callq 0x4437e
movq %r14, %rdi
callq 0x36bad
movl %eax, %r14d
movl %eax, 0x20(%rbx)
movb $0x1, 0x24(%rbx)
leaq 0x91f67(%rip), %rsi # 0xd65de
movl $0x3, %edi
xorl %eax, %eax
callq 0xb9e53
movl 0x10(%rbx), %edx
leaq 0x91e80(%rip), %rsi # 0xd650d
movl $0x3, %edi
xorl %eax, %eax
callq 0xb9e53
movl 0x14(%rbx), %edx
leaq 0x91e85(%rip), %rsi # 0xd6528
movl $0x3, %edi
xorl %eax, %eax
callq 0xb9e53
movl 0x18(%rbx), %edx
cmpl $0x2, %edx
leaq 0x91eab(%rip), %rax # 0xd6567
leaq 0x91eab(%rip), %rsi # 0xd656e
cmoveq %rax, %rsi
cmpl $0x1, %edx
leaq 0x91e91(%rip), %rcx # 0xd6562
cmovneq %rsi, %rcx
leaq 0x91e69(%rip), %rsi # 0xd6545
movl $0x3, %edi
xorl %eax, %eax
callq 0xb9e53
leaq 0x91e85(%rip), %rsi # 0xd6574
movl $0x3, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0xb9e53
jmp 0x44723
movq %r15, %rdi
callq 0x2efe4
movq %r15, %rdi
callq 0xa650
leaq 0x91ea0(%rip), %rsi # 0xd65b7
movl $0x4, %edi
xorl %eax, %eax
callq 0xb9e53
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
movl $0x3ec0, %esi # imm = 0x3EC0
callq 0xa330
movq %rax, %r15
movslq %ebp, %rdx
movq %rax, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3b6de
testl %eax, %eax
je 0x447f8
movl $0x4, 0x28(%rbx)
movq %r15, 0x30(%rbx)
movl 0x1a0c(%r15), %ecx
movl 0x1a10(%r15), %esi
movq %rbx, %rdi
movl $0x20, %edx
callq 0x4437e
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3bffa
movl %eax, %r14d
testl %eax, %eax
je 0x44621
movl 0x10(%rsp), %r14d
jmp 0x44621
testq %r14, %r14
sete %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0x44710
movq %r14, %rdi
movl %ebp, %esi
callq 0x3db94
testq %rax, %rax
je 0x44710
movq %rax, %r14
movl $0x5, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movl (%rax), %ecx
movl 0x4(%rax), %esi
movq %rbx, %rdi
movl $0x20, %edx
callq 0x4437e
movl 0x8(%r14), %r14d
jmp 0x44621
movq %r15, %rdi
callq 0x3ba74
jmp 0x44708
leaq 0x10(%rsp), %rdi
movq $0x0, (%rdi)
movslq %ebp, %rdx
movl 0xf345a(%rip), %ecx # 0x137c74
movq %r14, %rsi
callq 0x3e356
testl %eax, %eax
je 0x448e9
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x44710
movq (%rax), %rdi
jmp 0x4470b
movl $0x1ba0, %edi # imm = 0x1BA0
callq 0xa6f0
movq %rax, %r15
movq %rax, %rdi
callq 0x40cfb
movslq %ebp, %r12
movq %r12, %rdi
callq 0xa6f0
movq %rax, %r13
testl %r12d, %r12d
jle 0x44875
movl %ebp, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0xa410
testl %ebp, %ebp
sete %al
cmpl $0x2000000, %ebp # imm = 0x2000000
setge %cl
orb %al, %cl
jne 0x44939
movq %r12, 0x1b90(%r15)
movq %r13, 0x1b88(%r15)
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x41dc3
testl %ebp, %ebp
jle 0x44939
testb %al, %al
je 0x44939
movl $0x7, 0x28(%rbx)
movq %r15, 0x30(%rbx)
movl 0xf33ad(%rip), %esi # 0x137c74
movq %rbx, %rdi
movl $0x10, %edx
movl $0x2, %ecx
callq 0x4437e
movq %r15, %rdi
callq 0x4204b
movq %rax, %r14
jmp 0x44621
movl $0x6, 0x28(%rbx)
movq 0x10(%rsp), %r15
movq %r15, 0x30(%rbx)
movb $0x0, 0x199(%r15)
movl 0xf336d(%rip), %esi # 0x137c74
movq %rbx, %rdi
movl $0x20, %edx
movl $0x2, %ecx
callq 0x4437e
movq %r15, %rdi
callq 0x3fe83
movq %rax, %r14
movl %r14d, 0x20(%rbx)
movb $0x1, 0x24(%rbx)
movq %r15, %rdi
callq 0x40b60
jmp 0x44670
movq %r15, %rdi
callq 0x41c41
jmp 0x44708
| LoadMusicStreamFromMemory:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+30h], 0
lea rsi, aWav; ".wav"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_445B5
lea rsi, aWav_0; ".WAV"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_445B5
lea rsi, aOgg; ".ogg"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44627
lea rsi, aOgg_0; ".OGG"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44627
lea rsi, aMp3; ".mp3"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44735
lea rsi, aMp3_0; ".MP3"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44735
lea rsi, aQoa; ".qoa"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_447A9
lea rsi, aQoa_0; ".QOA"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_447A9
lea rsi, aXm; ".xm"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44805
lea rsi, aXm_0; ".XM"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44805
lea rsi, aMod; ".mod"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44840
lea rsi, aMod_0; ".MOD"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_44840
lea rsi, aStreamDataForm; "STREAM: Data format not supported"
mov edi, 4
xor eax, eax
call TraceLog
jmp loc_44710
loc_445B5:
mov edi, 1
mov esi, 190h
call _calloc
mov r15, rax
movsxd rdx, ebp
mov [rsp+48h+var_48], 0
mov rdi, rax
mov rsi, r14
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call drwav_init_memory_ex
test eax, eax
jz loc_44700
mov dword ptr [rbx+28h], 1
movzx eax, word ptr [r15+72h]
cmp ax, 18h
mov ecx, 10h
cmovnz ecx, eax
mov [rbx+30h], r15
movzx edx, cx
mov esi, [r15+6Ch]
movzx ecx, word ptr [r15+70h]
mov rdi, rbx
call LoadAudioStream
mov r14d, [r15+78h]
loc_44621:
mov [rbx+20h], r14d
jmp short loc_4466C
loc_44627:
mov rdi, r14
mov esi, ebp
xor edx, edx
xor ecx, ecx
call stb_vorbis_open_memory
test rax, rax
jz loc_44710
mov r14, rax
mov dword ptr [rbx+28h], 2
mov [rbx+30h], rax
mov esi, [rax]
mov ecx, [rax+4]
mov rdi, rbx
mov edx, 10h
call LoadAudioStream
mov rdi, r14
call stb_vorbis_stream_length_in_samples
mov r14d, eax
mov [rbx+20h], eax
loc_4466C:
mov byte ptr [rbx+24h], 1
loc_44670:
lea rsi, aFileioMusicDat; "FILEIO: Music data loaded successfully"
mov edi, 3
xor eax, eax
call TraceLog
mov edx, [rbx+10h]
lea rsi, aSampleRateIHz; " > Sample rate: %i Hz"
mov edi, 3
xor eax, eax
call TraceLog
mov edx, [rbx+14h]
lea rsi, aSampleSizeIBit; " > Sample size: %i bits"
mov edi, 3
xor eax, eax
call TraceLog
mov edx, [rbx+18h]
cmp edx, 2
lea rax, aStereo; "Stereo"
lea rsi, aMulti; "Multi"
cmovz rsi, rax
cmp edx, 1
lea rcx, aMono; "Mono"
cmovnz rcx, rsi
lea rsi, aChannelsIS; " > Channels: %i (%s)"
mov edi, 3
xor eax, eax
call TraceLog
lea rsi, aTotalFramesI; " > Total frames: %i"
mov edi, 3
mov edx, r14d
xor eax, eax
call TraceLog
jmp short loc_44723
loc_44700:
mov rdi, r15
call drwav_uninit
loc_44708:
mov rdi, r15
loc_4470B:
call _free
loc_44710:
lea rsi, aFileioMusicDat_0; "FILEIO: Music data could not be loaded"
mov edi, 4
xor eax, eax
call TraceLog
loc_44723:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44735:
mov edi, 1
mov esi, 3EC0h
call _calloc
mov r15, rax
movsxd rdx, ebp
mov rdi, rax
mov rsi, r14
xor ecx, ecx
call drmp3_init_memory
test eax, eax
jz loc_447F8
mov dword ptr [rbx+28h], 4
mov [rbx+30h], r15
mov ecx, [r15+1A0Ch]
mov esi, [r15+1A10h]
mov rdi, rbx
mov edx, 20h ; ' '
call LoadAudioStream
lea rdx, [rsp+48h+var_38]
mov rdi, r15
xor esi, esi
call drmp3_get_mp3_and_pcm_frame_count
mov r14d, eax
test eax, eax
jz loc_44621
mov r14d, dword ptr [rsp+48h+var_38]
jmp loc_44621
loc_447A9:
test r14, r14
setz al
test ebp, ebp
setle cl
or cl, al
jnz loc_44710
mov rdi, r14
mov esi, ebp
call qoaplay_open_memory
test rax, rax
jz loc_44710
mov r14, rax
mov dword ptr [rbx+28h], 5
mov [rbx+30h], rax
mov ecx, [rax]
mov esi, [rax+4]
mov rdi, rbx
mov edx, 20h ; ' '
call LoadAudioStream
mov r14d, [r14+8]
jmp loc_44621
loc_447F8:
mov rdi, r15
call drmp3_uninit
jmp loc_44708
loc_44805:
lea rdi, [rsp+48h+var_38]
mov qword ptr [rdi], 0
movsxd rdx, ebp
mov ecx, cs:dword_137C74
mov rsi, r14
call jar_xm_create_context_safe
test eax, eax
jz loc_448E9
mov rax, [rsp+48h+var_38]
test rax, rax
jz loc_44710
mov rdi, [rax]
jmp loc_4470B
loc_44840:
mov edi, 1BA0h
call _malloc
mov r15, rax
mov rdi, rax
call jar_mod_init
movsxd r12, ebp
mov rdi, r12
call _malloc
mov r13, rax
test r12d, r12d
jle short loc_44875
mov edx, ebp
mov rdi, r13
mov rsi, r14
call _memcpy
loc_44875:
test ebp, ebp
setz al
cmp ebp, 2000000h
setnl cl
or cl, al
jnz loc_44939
mov [r15+1B90h], r12
mov [r15+1B88h], r13
mov rdi, r15
mov rsi, r13
mov edx, ebp
call jar_mod_load
test ebp, ebp
jle loc_44939
test al, al
jz loc_44939
mov dword ptr [rbx+28h], 7
mov [rbx+30h], r15
mov esi, cs:dword_137C74
mov rdi, rbx
mov edx, 10h
mov ecx, 2
call LoadAudioStream
mov rdi, r15
call jar_mod_max_samples
mov r14, rax
jmp loc_44621
loc_448E9:
mov dword ptr [rbx+28h], 6
mov r15, [rsp+48h+var_38]
mov [rbx+30h], r15
mov byte ptr [r15+199h], 0
mov esi, cs:dword_137C74
mov rdi, rbx
mov edx, 20h ; ' '
mov ecx, 2
call LoadAudioStream
mov rdi, r15
call jar_xm_get_remaining_samples
mov r14, rax
mov [rbx+20h], r14d
mov byte ptr [rbx+24h], 1
mov rdi, r15
call jar_xm_reset
jmp loc_44670
loc_44939:
mov rdi, r15
call jar_mod_unload
jmp loc_44708
| long long LoadMusicStreamFromMemory(
long long a1,
long long a2,
_OWORD *a3,
int a4,
double a5,
double a6,
double a7,
double a8)
{
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v19; // r15
unsigned __int16 v20; // cx
int v21; // edx
int v22; // ecx
int v23; // r8d
int v24; // r9d
int mp3_and_pcm_frame_count; // r14d
int *v26; // rax
long long v27; // r14
int v28; // ecx
int v29; // r8d
int v30; // r9d
int v31; // ecx
int v32; // r8d
int v33; // r9d
int v34; // r8d
int v35; // r9d
int v36; // edx
const char *v37; // rsi
const char *v38; // rcx
int v39; // ecx
int v40; // r8d
int v41; // r9d
long long v42; // rdi
int *v44; // rax
int *v45; // r14
long long v46; // rax
long long v47; // r13
char v48; // al
long long v49; // r15
long long v50[7]; // [rsp+10h] [rbp-38h] BYREF
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
if ( !(unsigned int)strcmp(a2, ".wav") || !(unsigned int)strcmp(a2, ".WAV") )
{
v19 = calloc(1LL, 400LL);
if ( (unsigned int)drwav_init_memory_ex((_QWORD *)v19, (long long)a3, a4, 0LL, 0LL, 0, 0LL) )
{
*(_DWORD *)(a1 + 40) = 1;
v20 = 16;
if ( *(_WORD *)(v19 + 114) != 24 )
v20 = *(_WORD *)(v19 + 114);
*(_QWORD *)(a1 + 48) = v19;
LoadAudioStream(a1, *(_DWORD *)(v19 + 108), v20, *(unsigned __int16 *)(v19 + 112), 0.0, a6, a7, a8);
mp3_and_pcm_frame_count = *(_DWORD *)(v19 + 120);
goto LABEL_18;
}
drwav_uninit(v19);
goto LABEL_28;
}
if ( !(unsigned int)strcmp(a2, ".ogg") || !(unsigned int)strcmp(a2, ".OGG") )
{
v26 = stb_vorbis_open_memory((long long)a3, a4, 0LL, 0LL);
if ( !v26 )
goto LABEL_30;
v27 = (long long)v26;
*(_DWORD *)(a1 + 40) = 2;
*(_QWORD *)(a1 + 48) = v26;
LoadAudioStream(a1, *v26, 16, v26[1], 0.0, a6, a7, a8);
mp3_and_pcm_frame_count = stb_vorbis_stream_length_in_samples(v27);
*(_DWORD *)(a1 + 32) = mp3_and_pcm_frame_count;
goto LABEL_21;
}
if ( !(unsigned int)strcmp(a2, ".mp3") || !(unsigned int)strcmp(a2, ".MP3") )
{
v19 = calloc(1LL, 16064LL);
if ( (unsigned int)drmp3_init_memory(v19, (long long)a3, a4, 0LL) )
{
*(_DWORD *)(a1 + 40) = 4;
*(_QWORD *)(a1 + 48) = v19;
LoadAudioStream(a1, *(_DWORD *)(v19 + 6672), 32, *(_DWORD *)(v19 + 6668), 0.0, a6, a7, a8);
mp3_and_pcm_frame_count = drmp3_get_mp3_and_pcm_frame_count(v19, 0LL, v50);
if ( mp3_and_pcm_frame_count )
mp3_and_pcm_frame_count = v50[0];
goto LABEL_18;
}
drmp3_uninit(v19);
goto LABEL_28;
}
if ( !(unsigned int)strcmp(a2, ".qoa") || !(unsigned int)strcmp(a2, ".QOA") )
{
LOBYTE(v12) = a3 == 0LL || a4 <= 0;
if ( (_BYTE)v12 )
goto LABEL_30;
v44 = (int *)qoaplay_open_memory(a3, a4);
if ( !v44 )
goto LABEL_30;
v45 = v44;
*(_DWORD *)(a1 + 40) = 5;
*(_QWORD *)(a1 + 48) = v44;
LoadAudioStream(a1, v44[1], 32, *v44, 0.0, a6, a7, a8);
mp3_and_pcm_frame_count = v45[2];
goto LABEL_18;
}
if ( !(unsigned int)strcmp(a2, ".xm") || !(unsigned int)strcmp(a2, ".XM") )
{
v50[0] = 0LL;
if ( !(unsigned int)jar_xm_create_context_safe(v50, (long long)a3, a4, dword_137C74) )
{
*(_DWORD *)(a1 + 40) = 6;
v49 = v50[0];
*(_QWORD *)(a1 + 48) = v50[0];
*(_BYTE *)(v49 + 409) = 0;
LoadAudioStream(a1, dword_137C74, 32, 2, 0.0, a6, a7, a8);
mp3_and_pcm_frame_count = jar_xm_get_remaining_samples(v49);
*(_DWORD *)(a1 + 32) = mp3_and_pcm_frame_count;
*(_BYTE *)(a1 + 36) = 1;
jar_xm_reset(v49);
goto LABEL_22;
}
if ( !v50[0] )
goto LABEL_30;
v42 = *(_QWORD *)v50[0];
LABEL_29:
free(v42);
goto LABEL_30;
}
if ( (unsigned int)strcmp(a2, ".mod") && (unsigned int)strcmp(a2, ".MOD") )
{
TraceLog(4, (unsigned int)"STREAM: Data format not supported", v15, v16, v17, v18);
LABEL_30:
TraceLog(4, (unsigned int)"FILEIO: Music data could not be loaded", v11, v12, v13, v14);
return a1;
}
v19 = malloc(7072LL);
jar_mod_init(v19);
v46 = malloc(a4);
v47 = v46;
if ( a4 > 0 )
memcpy(v46);
if ( a4 == 0
|| a4 >= 0x2000000
|| (*(_QWORD *)(v19 + 7056) = a4, *(_QWORD *)(v19 + 7048) = v47, v48 = jar_mod_load(v19, v47, a4), a4 <= 0)
|| !v48 )
{
jar_mod_unload(v19);
LABEL_28:
v42 = v19;
goto LABEL_29;
}
*(_DWORD *)(a1 + 40) = 7;
*(_QWORD *)(a1 + 48) = v19;
LoadAudioStream(a1, dword_137C74, 16, 2, 0.0, a6, a7, a8);
mp3_and_pcm_frame_count = jar_mod_max_samples(v19);
LABEL_18:
*(_DWORD *)(a1 + 32) = mp3_and_pcm_frame_count;
LABEL_21:
*(_BYTE *)(a1 + 36) = 1;
LABEL_22:
TraceLog(3, (unsigned int)"FILEIO: Music data loaded successfully", v21, v22, v23, v24);
TraceLog(3, (unsigned int)" > Sample rate: %i Hz", *(_DWORD *)(a1 + 16), v28, v29, v30);
TraceLog(3, (unsigned int)" > Sample size: %i bits", *(_DWORD *)(a1 + 20), v31, v32, v33);
v36 = *(_DWORD *)(a1 + 24);
v37 = "Multi";
if ( v36 == 2 )
v37 = "Stereo";
v38 = "Mono";
if ( v36 != 1 )
LODWORD(v38) = (_DWORD)v37;
TraceLog(3, (unsigned int)" > Channels: %i (%s)", v36, (_DWORD)v38, v34, v35);
TraceLog(3, (unsigned int)" > Total frames: %i", mp3_and_pcm_frame_count, v39, v40, v41);
return a1;
}
| LoadMusicStreamFromMemory:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x30],0x0
LEA RSI,[0x1d5e98]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x001445b5
LEA RSI,[0x1d5e9d]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x001445b5
LEA RSI,[0x1d5ec0]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144627
LEA RSI,[0x1d5ec5]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144627
LEA RSI,[0x1d5ee8]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144735
LEA RSI,[0x1d5eed]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144735
LEA RSI,[0x1d5f10]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x001447a9
LEA RSI,[0x1d5f15]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x001447a9
LEA RSI,[0x1d6485]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144805
LEA RSI,[0x1d658c]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144805
LEA RSI,[0x1d6489]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144840
LEA RSI,[0x1d6590]
MOV RDI,R15
CALL 0x0010a760
TEST EAX,EAX
JZ 0x00144840
LEA RSI,[0x1d6595]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001b9e53
JMP 0x00144710
LAB_001445b5:
MOV EDI,0x1
MOV ESI,0x190
CALL 0x0010a330
MOV R15,RAX
MOVSXD RDX,EBP
MOV qword ptr [RSP],0x0
MOV RDI,RAX
MOV RSI,R14
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012ecd2
TEST EAX,EAX
JZ 0x00144700
MOV dword ptr [RBX + 0x28],0x1
MOVZX EAX,word ptr [R15 + 0x72]
CMP AX,0x18
MOV ECX,0x10
CMOVNZ ECX,EAX
MOV qword ptr [RBX + 0x30],R15
MOVZX EDX,CX
MOV ESI,dword ptr [R15 + 0x6c]
MOVZX ECX,word ptr [R15 + 0x70]
MOV RDI,RBX
CALL 0x0014437e
MOV R14D,dword ptr [R15 + 0x78]
LAB_00144621:
MOV dword ptr [RBX + 0x20],R14D
JMP 0x0014466c
LAB_00144627:
MOV RDI,R14
MOV ESI,EBP
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001371e2
TEST RAX,RAX
JZ 0x00144710
MOV R14,RAX
MOV dword ptr [RBX + 0x28],0x2
MOV qword ptr [RBX + 0x30],RAX
MOV ESI,dword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x4]
MOV RDI,RBX
MOV EDX,0x10
CALL 0x0014437e
MOV RDI,R14
CALL 0x00136bad
MOV R14D,EAX
MOV dword ptr [RBX + 0x20],EAX
LAB_0014466c:
MOV byte ptr [RBX + 0x24],0x1
LAB_00144670:
LEA RSI,[0x1d65de]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001b9e53
MOV EDX,dword ptr [RBX + 0x10]
LEA RSI,[0x1d650d]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001b9e53
MOV EDX,dword ptr [RBX + 0x14]
LEA RSI,[0x1d6528]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001b9e53
MOV EDX,dword ptr [RBX + 0x18]
CMP EDX,0x2
LEA RAX,[0x1d6567]
LEA RSI,[0x1d656e]
CMOVZ RSI,RAX
CMP EDX,0x1
LEA RCX,[0x1d6562]
CMOVNZ RCX,RSI
LEA RSI,[0x1d6545]
MOV EDI,0x3
XOR EAX,EAX
CALL 0x001b9e53
LEA RSI,[0x1d6574]
MOV EDI,0x3
MOV EDX,R14D
XOR EAX,EAX
CALL 0x001b9e53
JMP 0x00144723
LAB_00144700:
MOV RDI,R15
CALL 0x0012efe4
LAB_00144708:
MOV RDI,R15
LAB_0014470b:
CALL 0x0010a650
LAB_00144710:
LEA RSI,[0x1d65b7]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001b9e53
LAB_00144723:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00144735:
MOV EDI,0x1
MOV ESI,0x3ec0
CALL 0x0010a330
MOV R15,RAX
MOVSXD RDX,EBP
MOV RDI,RAX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0013b6de
TEST EAX,EAX
JZ 0x001447f8
MOV dword ptr [RBX + 0x28],0x4
MOV qword ptr [RBX + 0x30],R15
MOV ECX,dword ptr [R15 + 0x1a0c]
MOV ESI,dword ptr [R15 + 0x1a10]
MOV RDI,RBX
MOV EDX,0x20
CALL 0x0014437e
LEA RDX,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013bffa
MOV R14D,EAX
TEST EAX,EAX
JZ 0x00144621
MOV R14D,dword ptr [RSP + 0x10]
JMP 0x00144621
LAB_001447a9:
TEST R14,R14
SETZ AL
TEST EBP,EBP
SETLE CL
OR CL,AL
JNZ 0x00144710
MOV RDI,R14
MOV ESI,EBP
CALL 0x0013db94
TEST RAX,RAX
JZ 0x00144710
MOV R14,RAX
MOV dword ptr [RBX + 0x28],0x5
MOV qword ptr [RBX + 0x30],RAX
MOV ECX,dword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x4]
MOV RDI,RBX
MOV EDX,0x20
CALL 0x0014437e
MOV R14D,dword ptr [R14 + 0x8]
JMP 0x00144621
LAB_001447f8:
MOV RDI,R15
CALL 0x0013ba74
JMP 0x00144708
LAB_00144805:
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],0x0
MOVSXD RDX,EBP
MOV ECX,dword ptr [0x00237c74]
MOV RSI,R14
CALL 0x0013e356
TEST EAX,EAX
JZ 0x001448e9
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00144710
MOV RDI,qword ptr [RAX]
JMP 0x0014470b
LAB_00144840:
MOV EDI,0x1ba0
CALL 0x0010a6f0
MOV R15,RAX
MOV RDI,RAX
CALL 0x00140cfb
MOVSXD R12,EBP
MOV RDI,R12
CALL 0x0010a6f0
MOV R13,RAX
TEST R12D,R12D
JLE 0x00144875
MOV EDX,EBP
MOV RDI,R13
MOV RSI,R14
CALL 0x0010a410
LAB_00144875:
TEST EBP,EBP
SETZ AL
CMP EBP,0x2000000
SETGE CL
OR CL,AL
JNZ 0x00144939
MOV qword ptr [R15 + 0x1b90],R12
MOV qword ptr [R15 + 0x1b88],R13
MOV RDI,R15
MOV RSI,R13
MOV EDX,EBP
CALL 0x00141dc3
TEST EBP,EBP
JLE 0x00144939
TEST AL,AL
JZ 0x00144939
MOV dword ptr [RBX + 0x28],0x7
MOV qword ptr [RBX + 0x30],R15
MOV ESI,dword ptr [0x00237c74]
MOV RDI,RBX
MOV EDX,0x10
MOV ECX,0x2
CALL 0x0014437e
MOV RDI,R15
CALL 0x0014204b
MOV R14,RAX
JMP 0x00144621
LAB_001448e9:
MOV dword ptr [RBX + 0x28],0x6
MOV R15,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x30],R15
MOV byte ptr [R15 + 0x199],0x0
MOV ESI,dword ptr [0x00237c74]
MOV RDI,RBX
MOV EDX,0x20
MOV ECX,0x2
CALL 0x0014437e
MOV RDI,R15
CALL 0x0013fe83
MOV R14,RAX
MOV dword ptr [RBX + 0x20],R14D
MOV byte ptr [RBX + 0x24],0x1
MOV RDI,R15
CALL 0x00140b60
JMP 0x00144670
LAB_00144939:
MOV RDI,R15
CALL 0x00141c41
JMP 0x00144708
|
int8 * LoadMusicStreamFromMemory(int8 *param_1,char *param_2,void *param_3,uint param_4)
{
int8 *puVar1;
char cVar2;
int iVar3;
uint uVar4;
int4 *puVar5;
void *__ptr;
void *__dest;
ulong uVar6;
short sVar7;
char *pcVar8;
char *pcVar9;
int8 *local_38;
param_1[4] = 0;
param_1[5] = 0;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
param_1[6] = 0;
iVar3 = strcmp(param_2,".wav");
if ((iVar3 == 0) || (iVar3 = strcmp(param_2,".WAV"), iVar3 == 0)) {
__ptr = calloc(1,400);
iVar3 = drwav_init_memory_ex(__ptr,param_3,(long)(int)param_4,0,0,0,0);
if (iVar3 != 0) {
*(int4 *)(param_1 + 5) = 1;
sVar7 = 0x10;
if (*(short *)((long)__ptr + 0x72) != 0x18) {
sVar7 = *(short *)((long)__ptr + 0x72);
}
param_1[6] = __ptr;
LoadAudioStream(param_1,*(int4 *)((long)__ptr + 0x6c),sVar7,
*(int2 *)((long)__ptr + 0x70));
uVar6 = (ulong)*(uint *)((long)__ptr + 0x78);
goto LAB_00144621;
}
drwav_uninit(__ptr);
goto LAB_0014470b;
}
iVar3 = strcmp(param_2,".ogg");
if ((iVar3 != 0) && (iVar3 = strcmp(param_2,".OGG"), iVar3 != 0)) {
iVar3 = strcmp(param_2,".mp3");
if ((iVar3 == 0) || (iVar3 = strcmp(param_2,".MP3"), iVar3 == 0)) {
__ptr = calloc(1,0x3ec0);
iVar3 = drmp3_init_memory(__ptr,param_3,(long)(int)param_4,0);
if (iVar3 != 0) {
*(int4 *)(param_1 + 5) = 4;
param_1[6] = __ptr;
LoadAudioStream(param_1,*(int4 *)((long)__ptr + 0x1a10),0x20,
*(int4 *)((long)__ptr + 0x1a0c));
uVar4 = drmp3_get_mp3_and_pcm_frame_count(__ptr,0,&local_38);
uVar6 = (ulong)uVar4;
if (uVar4 != 0) {
uVar6 = (ulong)local_38 & 0xffffffff;
}
goto LAB_00144621;
}
drmp3_uninit(__ptr);
}
else {
iVar3 = strcmp(param_2,".qoa");
if ((iVar3 == 0) || (iVar3 = strcmp(param_2,".QOA"), iVar3 == 0)) {
if (((int)param_4 < 1 || param_3 == (void *)0x0) ||
(puVar5 = (int4 *)qoaplay_open_memory(param_3,param_4), puVar5 == (int4 *)0x0
)) goto LAB_00144710;
*(int4 *)(param_1 + 5) = 5;
param_1[6] = puVar5;
LoadAudioStream(param_1,puVar5[1],0x20,*puVar5);
uVar6 = (ulong)(uint)puVar5[2];
LAB_00144621:
*(int *)(param_1 + 4) = (int)uVar6;
goto LAB_0014466c;
}
iVar3 = strcmp(param_2,".xm");
if ((iVar3 == 0) || (iVar3 = strcmp(param_2,".XM"), iVar3 == 0)) {
local_38 = (int8 *)0x0;
iVar3 = jar_xm_create_context_safe(&local_38,param_3,(long)(int)param_4,AUDIO._1028_4_);
puVar1 = local_38;
if (iVar3 == 0) {
*(int4 *)(param_1 + 5) = 6;
param_1[6] = local_38;
*(int1 *)((long)local_38 + 0x199) = 0;
LoadAudioStream(param_1,AUDIO._1028_4_,0x20,2);
uVar6 = jar_xm_get_remaining_samples(puVar1);
*(int *)(param_1 + 4) = (int)uVar6;
*(int1 *)((long)param_1 + 0x24) = 1;
jar_xm_reset(puVar1);
goto LAB_00144670;
}
if (local_38 == (int8 *)0x0) goto LAB_00144710;
__ptr = (void *)*local_38;
}
else {
iVar3 = strcmp(param_2,".mod");
if ((iVar3 != 0) && (iVar3 = strcmp(param_2,".MOD"), iVar3 != 0)) {
TraceLog(4,"STREAM: Data format not supported");
goto LAB_00144710;
}
__ptr = malloc(0x1ba0);
jar_mod_init(__ptr);
__dest = malloc((long)(int)param_4);
if (0 < (int)param_4) {
memcpy(__dest,param_3,(ulong)param_4);
}
if ((int)param_4 < 0x2000000 && param_4 != 0) {
*(long *)((long)__ptr + 0x1b90) = (long)(int)param_4;
*(void **)((long)__ptr + 0x1b88) = __dest;
cVar2 = jar_mod_load(__ptr,__dest,param_4);
if ((0 < (int)param_4) && (cVar2 != '\0')) {
*(int4 *)(param_1 + 5) = 7;
param_1[6] = __ptr;
LoadAudioStream(param_1,AUDIO._1028_4_,0x10,2);
uVar6 = jar_mod_max_samples(__ptr);
goto LAB_00144621;
}
}
jar_mod_unload(__ptr);
}
}
LAB_0014470b:
free(__ptr);
LAB_00144710:
TraceLog(4,"FILEIO: Music data could not be loaded");
return param_1;
}
puVar5 = (int4 *)stb_vorbis_open_memory(param_3,param_4,0,0);
if (puVar5 == (int4 *)0x0) goto LAB_00144710;
*(int4 *)(param_1 + 5) = 2;
param_1[6] = puVar5;
LoadAudioStream(param_1,*puVar5,0x10,puVar5[1]);
uVar4 = stb_vorbis_stream_length_in_samples(puVar5);
uVar6 = (ulong)uVar4;
*(uint *)(param_1 + 4) = uVar4;
LAB_0014466c:
*(int1 *)((long)param_1 + 0x24) = 1;
LAB_00144670:
TraceLog(3,"FILEIO: Music data loaded successfully");
TraceLog(3," > Sample rate: %i Hz",*(int4 *)(param_1 + 2));
TraceLog(3," > Sample size: %i bits",*(int4 *)((long)param_1 + 0x14));
iVar3 = *(int *)(param_1 + 3);
pcVar9 = "Multi";
if (iVar3 == 2) {
pcVar9 = "Stereo";
}
pcVar8 = "Mono";
if (iVar3 != 1) {
pcVar8 = pcVar9;
}
TraceLog(3," > Channels: %i (%s)",iVar3,pcVar8);
TraceLog(3," > Total frames: %i",uVar6 & 0xffffffff);
return param_1;
}
| |
45,976 | my_snprintf | eloqsql/strings/my_vsnprintf.c | size_t my_snprintf(char* to, size_t n, const char* fmt, ...)
{
size_t result;
va_list args;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
} | O3 | c | my_snprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdx, %r10
movq %rsi, %rdx
movq %rdi, %rsi
leaq -0xd0(%rbp), %rdi
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x61883
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %r8
movq %rdi, 0x10(%r8)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r8)
movabsq $0x3000000018, %rax # imm = 0x3000000018
movq %rax, (%r8)
leaq 0x2bf2e9(%rip), %rdi # 0x320b90
movq %r10, %rcx
callq 0x60650
addq $0xd0, %rsp
popq %rbp
retq
| my_snprintf:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov r10, rdx
mov rdx, rsi
mov rsi, rdi
lea rdi, [rbp+var_D0]
mov [rdi+18h], rcx
mov [rdi+20h], r8
mov [rdi+28h], r9
test al, al
jz short loc_61883
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_61883:
lea r8, [rbp+var_20]
mov [r8+10h], rdi
lea rax, [rbp+arg_0]
mov [r8+8], rax
mov rax, 3000000018h
mov [r8], rax
lea rdi, my_charset_latin1
mov rcx, r10
call my_vsnprintf_ex
add rsp, 0D0h
pop rbp
retn
| unsigned long long my_snprintf(
unsigned long long a1,
long long a2,
unsigned __int8 *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-D0h] BYREF
long long v17; // [rsp+18h] [rbp-B8h]
long long v18; // [rsp+20h] [rbp-B0h]
long long v19; // [rsp+28h] [rbp-A8h]
__m128 v20; // [rsp+30h] [rbp-A0h]
__m128 v21; // [rsp+40h] [rbp-90h]
__m128 v22; // [rsp+50h] [rbp-80h]
__m128 v23; // [rsp+60h] [rbp-70h]
__m128 v24; // [rsp+70h] [rbp-60h]
__m128 v25; // [rsp+80h] [rbp-50h]
__m128 v26; // [rsp+90h] [rbp-40h]
__m128 v27; // [rsp+A0h] [rbp-30h]
_QWORD v28[4]; // [rsp+B0h] [rbp-20h] BYREF
v20 = a7;
v21 = a8;
v22 = a9;
v23 = a10;
v24 = a11;
v25 = a12;
v26 = a13;
v27 = a14;
v17 = a4;
v18 = a5;
v19 = a6;
v28[2] = &v16;
v28[1] = &a15;
v28[0] = 0x3000000018LL;
return my_vsnprintf_ex((long long)my_charset_latin1, a1, a2, a3, (unsigned int *)v28);
}
| my_snprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV R10,RDX
MOV RDX,RSI
MOV RSI,RDI
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],R8
MOV qword ptr [RDI + 0x28],R9
TEST AL,AL
JZ 0x00161883
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_00161883:
LEA R8,[RBP + -0x20]
MOV qword ptr [R8 + 0x10],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [R8 + 0x8],RAX
MOV RAX,0x3000000018
MOV qword ptr [R8],RAX
LEA RDI,[0x420b90]
MOV RCX,R10
CALL 0x00160650
ADD RSP,0xd0
POP RBP
RET
|
void my_snprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [24];
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
int1 *local_20;
int1 *local_18;
local_18 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_20 = &stack0x00000008;
local_28 = 0x3000000018;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
my_vsnprintf_ex(&my_charset_latin1,param_9,param_10,param_11);
return;
}
| |
45,977 | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | void
Level::getFaceVTags(Index fIndex, VTag vTags[], int fvarChannel) const {
ConstIndexArray fVerts = getFaceVertices(fIndex);
if (fvarChannel < 0) {
for (int i = 0; i < fVerts.size(); ++i) {
vTags[i] = getVertexTag(fVerts[i]);
}
} else {
FVarLevel const & fvarLevel = getFVarLevel(fvarChannel);
ConstIndexArray fValues = fvarLevel.getFaceValues(fIndex);
for (int i = 0; i < fVerts.size(); ++i) {
Index valueIndex = fvarLevel.findVertexValueIndex(fVerts[i], fValues[i]);
FVarLevel::ValueTag valueTag = fvarLevel.getValueTag(valueIndex);
vTags[i] = valueTag.combineWithLevelVTag(getVertexTag(fVerts[i]));
}
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*, int) const:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movl -0xc(%rbp), %esi
callq 0xce580
movl %edx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0xebe78
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x8c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xcc250
movl %eax, %ecx
movl -0x8c(%rbp), %eax
cmpl %ecx, %eax
jge 0xebe73
movl -0x44(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0xcabf0
movq -0x88(%rbp), %rdi
movl (%rax), %esi
callq 0xc5a90
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movw (%rdx), %dx
movw %dx, (%rax,%rcx,2)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xebe1e
jmp 0xebf78
movq -0x88(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xd3510
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xc63c0
movl %edx, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x90(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xcc250
movl %eax, %ecx
movl -0x90(%rbp), %eax
cmpl %ecx, %eax
jge 0xebf76
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x74(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0xcabf0
movl (%rax), %eax
movl %eax, -0x94(%rbp)
movl -0x74(%rbp), %esi
leaq -0x60(%rbp), %rdi
callq 0xcabf0
movq -0xa0(%rbp), %rdi
movl -0x94(%rbp), %esi
movl (%rax), %edx
callq 0xc9120
movl %eax, -0x78(%rbp)
movq -0x50(%rbp), %rdi
movl -0x78(%rbp), %esi
callq 0xc7710
movb %al, -0x79(%rbp)
movl -0x74(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0xcabf0
movq -0x88(%rbp), %rdi
movl (%rax), %esi
callq 0xc5a90
movw (%rax), %ax
movw %ax, -0x7e(%rbp)
leaq -0x79(%rbp), %rdi
movzwl -0x7e(%rbp), %esi
callq 0xd7030
movw %ax, -0x7c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x74(%rbp), %rcx
movw -0x7c(%rbp), %dx
movw %dx, (%rax,%rcx,2)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xebeb3
jmp 0xebf78
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rdi, [rbp+var_8]; this
mov [rbp+var_88], rdi
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov [rbp+var_38], edx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_30], rax
mov eax, [rbp+var_38]
mov [rbp+var_28], eax
cmp [rbp+var_1C], 0
jge short loc_EBE78
mov [rbp+var_44], 0
loc_EBE1E:
mov eax, [rbp+var_44]
mov [rbp+var_8C], eax
lea rdi, [rbp+var_30]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov ecx, eax
mov eax, [rbp+var_8C]
cmp eax, ecx
jge short loc_EBE73
mov esi, [rbp+var_44]
lea rdi, [rbp+var_30]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_88]; this
mov esi, [rax]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getVertexTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexTag(int)
mov rdx, rax
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_44]
mov dx, [rdx]
mov [rax+rcx*2], dx
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_EBE1E
loc_EBE73:
jmp loc_EBF78
loc_EBE78:
mov rdi, [rbp+var_88]; this
mov esi, [rbp+var_1C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFVarLevelEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFVarLevel(int)
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel13getFaceValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getFaceValues(int)
mov [rbp+var_68], edx
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov [rbp+var_60], rax
mov eax, [rbp+var_68]
mov [rbp+var_58], eax
mov [rbp+var_74], 0
loc_EBEB3:
mov eax, [rbp+var_74]
mov [rbp+var_90], eax
lea rdi, [rbp+var_30]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov ecx, eax
mov eax, [rbp+var_90]
cmp eax, ecx
jge loc_EBF76
mov rax, [rbp+var_50]
mov [rbp+var_A0], rax
mov esi, [rbp+var_74]
lea rdi, [rbp+var_30]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov eax, [rax]
mov [rbp+var_94], eax
mov esi, [rbp+var_74]
lea rdi, [rbp+var_60]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_A0]; this
mov esi, [rbp+var_94]; int
mov edx, [rax]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel20findVertexValueIndexEii; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::findVertexValueIndex(int,int)
mov [rbp+var_78], eax
mov rdi, [rbp+var_50]; this
mov esi, [rbp+var_78]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel11getValueTagEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getValueTag(int)
mov [rbp+var_79], al
mov esi, [rbp+var_74]
lea rdi, [rbp+var_30]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_88]; this
mov esi, [rax]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getVertexTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexTag(int)
mov ax, [rax]
mov [rbp+var_7E], ax
lea rdi, [rbp+var_79]
movzx esi, [rbp+var_7E]
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel8ValueTag20combineWithLevelVTagENS2_5Level4VTagE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag::combineWithLevelVTag(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag)
mov [rbp+var_7C], ax
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_74]
mov dx, [rbp+var_7C]
mov [rax+rcx*2], dx
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
jmp loc_EBEB3
loc_EBF76:
jmp short $+2
loc_EBF78:
add rsp, 0A0h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *a3,
int a4)
{
long long FaceVertices; // rax
int v5; // edx
int v6; // ecx
long long result; // rax
int *v8; // rax
_WORD *VertexTag; // rax
long long FaceValues; // rax
int v11; // edx
int v12; // ecx
int *v13; // rax
int *v14; // rax
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v15; // [rsp+0h] [rbp-A0h]
int v16; // [rsp+Ch] [rbp-94h]
unsigned int v17; // [rsp+10h] [rbp-90h]
unsigned __int16 v18; // [rsp+22h] [rbp-7Eh]
__int16 v19; // [rsp+24h] [rbp-7Ch]
char ValueTag; // [rsp+27h] [rbp-79h] BYREF
int VertexValueIndex; // [rsp+28h] [rbp-78h]
unsigned int i; // [rsp+2Ch] [rbp-74h]
long long v23; // [rsp+30h] [rbp-70h]
int v24; // [rsp+38h] [rbp-68h]
long long v25; // [rsp+40h] [rbp-60h] BYREF
int v26; // [rsp+48h] [rbp-58h]
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *FVarLevel; // [rsp+50h] [rbp-50h]
unsigned int j; // [rsp+5Ch] [rbp-44h]
long long v29; // [rsp+60h] [rbp-40h]
int v30; // [rsp+68h] [rbp-38h]
long long v31; // [rsp+70h] [rbp-30h] BYREF
int v32; // [rsp+78h] [rbp-28h]
int v33; // [rsp+84h] [rbp-1Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *v34; // [rsp+88h] [rbp-18h]
int v35; // [rsp+94h] [rbp-Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v36; // [rsp+98h] [rbp-8h]
v36 = this;
v35 = a2;
v34 = a3;
v33 = a4;
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(this, a2);
v30 = v5;
v29 = FaceVertices;
v31 = FaceVertices;
v32 = v5;
if ( v33 >= 0 )
{
FVarLevel = (OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getFVarLevel(
this,
v33);
FaceValues = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getFaceValues(FVarLevel, v35);
v24 = v11;
v23 = FaceValues;
v25 = FaceValues;
v26 = v11;
for ( i = 0; ; ++i )
{
v17 = i;
v12 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v31);
result = v17;
if ( (int)v17 >= v12 )
break;
v15 = FVarLevel;
v16 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v31, i);
v13 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v25, i);
VertexValueIndex = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::findVertexValueIndex(v15, v16, *v13);
ValueTag = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getValueTag(FVarLevel, VertexValueIndex);
v14 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v31, i);
v18 = *(_WORD *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexTag(this, *v14);
v19 = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag::combineWithLevelVTag(&ValueTag, v18);
*((_WORD *)v34 + (int)i) = v19;
}
}
else
{
for ( j = 0; ; ++j )
{
v6 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v31);
result = j;
if ( (int)j >= v6 )
break;
v8 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v31, j);
VertexTag = (_WORD *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexTag(this, *v8);
*((_WORD *)v34 + (int)j) = *VertexTag;
}
}
return result;
}
| getFaceVTags:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x88],RDI
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001ce580
MOV dword ptr [RBP + -0x38],EDX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x1c],0x0
JGE 0x001ebe78
MOV dword ptr [RBP + -0x44],0x0
LAB_001ebe1e:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x8c],EAX
LEA RDI,[RBP + -0x30]
CALL 0x001cc250
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x8c]
CMP EAX,ECX
JGE 0x001ebe73
MOV ESI,dword ptr [RBP + -0x44]
LEA RDI,[RBP + -0x30]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0x88]
MOV ESI,dword ptr [RAX]
CALL 0x001c5a90
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x44]
MOV DX,word ptr [RDX]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001ebe1e
LAB_001ebe73:
JMP 0x001ebf78
LAB_001ebe78:
MOV RDI,qword ptr [RBP + -0x88]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x001d3510
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001c63c0
MOV dword ptr [RBP + -0x68],EDX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x68]
MOV dword ptr [RBP + -0x58],EAX
MOV dword ptr [RBP + -0x74],0x0
LAB_001ebeb3:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x90],EAX
LEA RDI,[RBP + -0x30]
CALL 0x001cc250
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x90]
CMP EAX,ECX
JGE 0x001ebf76
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xa0],RAX
MOV ESI,dword ptr [RBP + -0x74]
LEA RDI,[RBP + -0x30]
CALL 0x001cabf0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x94],EAX
MOV ESI,dword ptr [RBP + -0x74]
LEA RDI,[RBP + -0x60]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xa0]
MOV ESI,dword ptr [RBP + -0x94]
MOV EDX,dword ptr [RAX]
CALL 0x001c9120
MOV dword ptr [RBP + -0x78],EAX
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x78]
CALL 0x001c7710
MOV byte ptr [RBP + -0x79],AL
MOV ESI,dword ptr [RBP + -0x74]
LEA RDI,[RBP + -0x30]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0x88]
MOV ESI,dword ptr [RAX]
CALL 0x001c5a90
MOV AX,word ptr [RAX]
MOV word ptr [RBP + -0x7e],AX
LEA RDI,[RBP + -0x79]
MOVZX ESI,word ptr [RBP + -0x7e]
CALL 0x001d7030
MOV word ptr [RBP + -0x7c],AX
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x74]
MOV DX,word ptr [RBP + -0x7c]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001ebeb3
LAB_001ebf76:
JMP 0x001ebf78
LAB_001ebf78:
ADD RSP,0xa0
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,
OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*, int) const */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags
(Level *this,int param_1,VTag *param_2,int param_3)
{
int iVar1;
FVarLevel *this_00;
int2 uVar2;
int iVar3;
int *piVar4;
int2 *puVar5;
ValueTag local_81;
int local_80;
int local_7c;
int1 local_78 [12];
ConstArray<int> local_68 [16];
FVarLevel *local_58;
int local_4c;
int1 local_48 [12];
ConstArray<int> local_38 [20];
int local_24;
VTag *local_20;
int local_14;
Level *local_10;
local_24 = param_3;
local_20 = param_2;
local_14 = param_1;
local_10 = this;
local_48 = getFaceVertices(this,param_1);
local_38._0_12_ = local_48;
if (local_24 < 0) {
local_4c = 0;
while( true ) {
iVar1 = local_4c;
iVar3 = ConstArray<int>::size(local_38);
if (iVar3 <= iVar1) break;
piVar4 = (int *)ConstArray<int>::operator[](local_38,local_4c);
puVar5 = (int2 *)getVertexTag(this,*piVar4);
*(int2 *)(local_20 + (long)local_4c * 2) = *puVar5;
local_4c = local_4c + 1;
}
}
else {
local_58 = (FVarLevel *)getFVarLevel(this,local_24);
local_78 = FVarLevel::getFaceValues(local_58,local_14);
local_7c = 0;
local_68._0_12_ = local_78;
while( true ) {
iVar1 = local_7c;
iVar3 = ConstArray<int>::size(local_38);
this_00 = local_58;
if (iVar3 <= iVar1) break;
piVar4 = (int *)ConstArray<int>::operator[](local_38,local_7c);
iVar1 = *piVar4;
piVar4 = (int *)ConstArray<int>::operator[](local_68,local_7c);
local_80 = FVarLevel::findVertexValueIndex(this_00,iVar1,*piVar4);
local_81 = (ValueTag)FVarLevel::getValueTag(local_58,local_80);
piVar4 = (int *)ConstArray<int>::operator[](local_38,local_7c);
puVar5 = (int2 *)getVertexTag(this,*piVar4);
uVar2 = FVarLevel::ValueTag::combineWithLevelVTag(&local_81,*puVar5);
*(int2 *)(local_20 + (long)local_7c * 2) = uVar2;
local_7c = local_7c + 1;
}
}
return;
}
| |
45,978 | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | void
Level::getFaceVTags(Index fIndex, VTag vTags[], int fvarChannel) const {
ConstIndexArray fVerts = getFaceVertices(fIndex);
if (fvarChannel < 0) {
for (int i = 0; i < fVerts.size(); ++i) {
vTags[i] = getVertexTag(fVerts[i]);
}
} else {
FVarLevel const & fvarLevel = getFVarLevel(fvarChannel);
ConstIndexArray fValues = fvarLevel.getFaceValues(fIndex);
for (int i = 0; i < fVerts.size(); ++i) {
Index valueIndex = fvarLevel.findVertexValueIndex(fVerts[i], fValues[i]);
FVarLevel::ValueTag valueTag = fvarLevel.getValueTag(valueIndex);
vTags[i] = valueTag.combineWithLevelVTag(getVertexTag(fVerts[i]));
}
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*, int) const:
pushq %r15
pushq %r14
pushq %rbx
leal 0x1(%rsi,%rsi), %eax
movslq %eax, %r8
movq 0x18(%rdi), %r9
movslq (%r9,%r8,4), %rax
shlq $0x2, %rax
addq 0x30(%rdi), %rax
addl %esi, %esi
movslq %esi, %rsi
movl (%r9,%rsi,4), %esi
testl %ecx, %ecx
js 0x44366
testl %esi, %esi
jle 0x44389
movl %ecx, %ecx
movq 0x1c8(%rdi), %r9
movq (%r9,%rcx,8), %rcx
movq (%rcx), %r9
movq 0x18(%r9), %r9
movslq (%r9,%r8,4), %r8
shlq $0x2, %r8
addq 0x18(%rcx), %r8
xorl %r9d, %r9d
movslq (%rax,%r9,4), %r11
movl (%r8,%r9,4), %r10d
movq (%rcx), %rbx
cmpl $0x0, 0xc(%rbx)
jle 0x44286
movl %r10d, %ebx
jmp 0x442ab
movq 0x60(%rcx), %rbx
movslq (%rbx,%r11,4), %r14
leal -0x1(%r14), %ebx
shlq $0x2, %r14
addq 0x90(%rcx), %r14
incl %ebx
leaq 0x4(%r14), %r15
cmpl %r10d, (%r14)
movq %r15, %r14
jne 0x4429d
movslq %ebx, %r10
movq 0xa8(%rcx), %rbx
movzbl (%rbx,%r10), %r10d
movq 0x1b0(%rdi), %rbx
movzwl (%rbx,%r11,2), %ebx
testb $0x1, %r10b
je 0x44353
andl $0xf87f, %ebx # imm = 0xF87F
leal 0x400(%rbx), %r11d
testb $0x18, %r10b
je 0x44301
orl $0x200, %ebx # imm = 0x200
testb $0x8, %r10b
cmovnel %ebx, %r11d
andl $0xffffbe67, %r11d # imm = 0xFFFFBE67
orl $0x4000, %r11d # imm = 0x4000
jmp 0x44319
andl $0xffffbc67, %r11d # imm = 0xFFFFBC67
xorl %ebx, %ebx
cmpb $0x40, %r10b
setb %bl
leal (%r11,%rbx,8), %r11d
addl $0x10, %r11d
movzwl %r10w, %ebx
movl %ebx, %r14d
shll $0x8, %r14d
orl %ebx, %r14d
movl %r11d, %ebx
andl $0x5ff8, %ebx # imm = 0x5FF8
andl $0x8002, %r14d # imm = 0x8002
orl %ebx, %r14d
shrb $0x2, %r10b
movzbl %r10b, %r10d
orl %r11d, %r10d
andl $0x1, %r10d
leal (%r10,%r14), %ebx
addl $0x2004, %ebx # imm = 0x2004
movw %bx, (%rdx,%r9,2)
incq %r9
cmpq %rsi, %r9
jne 0x44270
jmp 0x44389
testl %esi, %esi
jle 0x44389
xorl %ecx, %ecx
movslq (%rax,%rcx,4), %r8
movq 0x1b0(%rdi), %r9
movzwl (%r9,%r8,2), %r8d
movw %r8w, (%rdx,%rcx,2)
incq %rcx
cmpq %rcx, %rsi
jne 0x4436c
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi:
push r15
push r14
push rbx
lea eax, [rsi+rsi+1]
movsxd r8, eax
mov r9, [rdi+18h]
movsxd rax, dword ptr [r9+r8*4]
shl rax, 2
add rax, [rdi+30h]
add esi, esi
movsxd rsi, esi
mov esi, [r9+rsi*4]
test ecx, ecx
js loc_44366
test esi, esi
jle loc_44389
mov ecx, ecx
mov r9, [rdi+1C8h]
mov rcx, [r9+rcx*8]
mov r9, [rcx]
mov r9, [r9+18h]
movsxd r8, dword ptr [r9+r8*4]
shl r8, 2
add r8, [rcx+18h]
xor r9d, r9d
loc_44270:
movsxd r11, dword ptr [rax+r9*4]
mov r10d, [r8+r9*4]
mov rbx, [rcx]
cmp dword ptr [rbx+0Ch], 0
jle short loc_44286
mov ebx, r10d
jmp short loc_442AB
loc_44286:
mov rbx, [rcx+60h]
movsxd r14, dword ptr [rbx+r11*4]
lea ebx, [r14-1]
shl r14, 2
add r14, [rcx+90h]
loc_4429D:
inc ebx
lea r15, [r14+4]
cmp [r14], r10d
mov r14, r15
jnz short loc_4429D
loc_442AB:
movsxd r10, ebx
mov rbx, [rcx+0A8h]
movzx r10d, byte ptr [rbx+r10]
mov rbx, [rdi+1B0h]
movzx ebx, word ptr [rbx+r11*2]
test r10b, 1
jz loc_44353
and ebx, 0F87Fh
lea r11d, [rbx+400h]
test r10b, 18h
jz short loc_44301
or ebx, 200h
test r10b, 8
cmovnz r11d, ebx
and r11d, 0FFFFBE67h
or r11d, 4000h
jmp short loc_44319
loc_44301:
and r11d, 0FFFFBC67h
xor ebx, ebx
cmp r10b, 40h ; '@'
setb bl
lea r11d, [r11+rbx*8]
add r11d, 10h
loc_44319:
movzx ebx, r10w
mov r14d, ebx
shl r14d, 8
or r14d, ebx
mov ebx, r11d
and ebx, 5FF8h
and r14d, 8002h
or r14d, ebx
shr r10b, 2
movzx r10d, r10b
or r10d, r11d
and r10d, 1
lea ebx, [r10+r14]
add ebx, 2004h
loc_44353:
mov [rdx+r9*2], bx
inc r9
cmp r9, rsi
jnz loc_44270
jmp short loc_44389
loc_44366:
test esi, esi
jle short loc_44389
xor ecx, ecx
loc_4436C:
movsxd r8, dword ptr [rax+rcx*4]
mov r9, [rdi+1B0h]
movzx r8d, word ptr [r9+r8*2]
mov [rdx+rcx*2], r8w
inc rcx
cmp rsi, rcx
jnz short loc_4436C
loc_44389:
pop rbx
pop r14
pop r15
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(_QWORD *a1, int a2, long long a3, int a4)
{
long long v4; // r8
long long v5; // r9
long long result; // rax
long long v7; // rsi
_QWORD *v8; // rcx
long long v9; // r8
long long j; // r9
long long v11; // r11
int v12; // ebx
long long v13; // r14
_DWORD *v14; // r14
__int16 v16; // r10
__int16 v17; // bx
__int16 v18; // bx
__int16 v19; // r11
__int16 v20; // bx
__int16 v21; // r11
long long i; // rcx
v4 = 2 * a2 + 1;
v5 = a1[3];
result = a1[6] + 4LL * *(int *)(v5 + 4 * v4);
v7 = *(unsigned int *)(v5 + 8LL * a2);
if ( a4 < 0 )
{
if ( (int)v7 > 0 )
{
for ( i = 0LL; i != v7; ++i )
*(_WORD *)(a3 + 2 * i) = *(_WORD *)(a1[54] + 2LL * *(int *)(result + 4 * i));
}
}
else if ( (int)v7 > 0 )
{
v8 = *(_QWORD **)(a1[57] + 8LL * (unsigned int)a4);
v9 = v8[3] + 4LL * *(int *)(*(_QWORD *)(*v8 + 24LL) + 4 * v4);
for ( j = 0LL; j != v7; ++j )
{
v11 = *(int *)(result + 4 * j);
if ( *(int *)(*v8 + 12LL) <= 0 )
{
v13 = *(int *)(v8[12] + 4 * v11);
v12 = v13 - 1;
v14 = (_DWORD *)(v8[18] + 4 * v13);
do
++v12;
while ( *v14++ != *(_DWORD *)(v9 + 4 * j) );
}
else
{
v12 = *(_DWORD *)(v9 + 4 * j);
}
v16 = *(unsigned __int8 *)(v8[21] + v12);
v17 = *(_WORD *)(a1[54] + 2 * v11);
if ( (v16 & 1) != 0 )
{
v18 = v17 & 0xF87F;
v19 = v18 + 1024;
if ( (v16 & 0x18) != 0 )
{
v20 = v18 | 0x200;
if ( (v16 & 8) != 0 )
v19 = v20;
v21 = v19 & 0xBE67 | 0x4000;
}
else
{
v21 = (v19 & 0xBC67) + 8 * ((unsigned __int8)v16 < 0x40u) + 16;
}
v17 = (v21 & 1 | ((v16 & 4) != 0)) + (v21 & 0x5FF8 | (v16 | (v16 << 8)) & 0x8002) + 8196;
}
*(_WORD *)(a3 + 2 * j) = v17;
}
}
return result;
}
| getFaceVTags:
PUSH R15
PUSH R14
PUSH RBX
LEA EAX,[RSI + RSI*0x1 + 0x1]
MOVSXD R8,EAX
MOV R9,qword ptr [RDI + 0x18]
MOVSXD RAX,dword ptr [R9 + R8*0x4]
SHL RAX,0x2
ADD RAX,qword ptr [RDI + 0x30]
ADD ESI,ESI
MOVSXD RSI,ESI
MOV ESI,dword ptr [R9 + RSI*0x4]
TEST ECX,ECX
JS 0x00144366
TEST ESI,ESI
JLE 0x00144389
MOV ECX,ECX
MOV R9,qword ptr [RDI + 0x1c8]
MOV RCX,qword ptr [R9 + RCX*0x8]
MOV R9,qword ptr [RCX]
MOV R9,qword ptr [R9 + 0x18]
MOVSXD R8,dword ptr [R9 + R8*0x4]
SHL R8,0x2
ADD R8,qword ptr [RCX + 0x18]
XOR R9D,R9D
LAB_00144270:
MOVSXD R11,dword ptr [RAX + R9*0x4]
MOV R10D,dword ptr [R8 + R9*0x4]
MOV RBX,qword ptr [RCX]
CMP dword ptr [RBX + 0xc],0x0
JLE 0x00144286
MOV EBX,R10D
JMP 0x001442ab
LAB_00144286:
MOV RBX,qword ptr [RCX + 0x60]
MOVSXD R14,dword ptr [RBX + R11*0x4]
LEA EBX,[R14 + -0x1]
SHL R14,0x2
ADD R14,qword ptr [RCX + 0x90]
LAB_0014429d:
INC EBX
LEA R15,[R14 + 0x4]
CMP dword ptr [R14],R10D
MOV R14,R15
JNZ 0x0014429d
LAB_001442ab:
MOVSXD R10,EBX
MOV RBX,qword ptr [RCX + 0xa8]
MOVZX R10D,byte ptr [RBX + R10*0x1]
MOV RBX,qword ptr [RDI + 0x1b0]
MOVZX EBX,word ptr [RBX + R11*0x2]
TEST R10B,0x1
JZ 0x00144353
AND EBX,0xf87f
LEA R11D,[RBX + 0x400]
TEST R10B,0x18
JZ 0x00144301
OR EBX,0x200
TEST R10B,0x8
CMOVNZ R11D,EBX
AND R11D,0xffffbe67
OR R11D,0x4000
JMP 0x00144319
LAB_00144301:
AND R11D,0xffffbc67
XOR EBX,EBX
CMP R10B,0x40
SETC BL
LEA R11D,[R11 + RBX*0x8]
ADD R11D,0x10
LAB_00144319:
MOVZX EBX,R10W
MOV R14D,EBX
SHL R14D,0x8
OR R14D,EBX
MOV EBX,R11D
AND EBX,0x5ff8
AND R14D,0x8002
OR R14D,EBX
SHR R10B,0x2
MOVZX R10D,R10B
OR R10D,R11D
AND R10D,0x1
LEA EBX,[R10 + R14*0x1]
ADD EBX,0x2004
LAB_00144353:
MOV word ptr [RDX + R9*0x2],BX
INC R9
CMP R9,RSI
JNZ 0x00144270
JMP 0x00144389
LAB_00144366:
TEST ESI,ESI
JLE 0x00144389
XOR ECX,ECX
LAB_0014436c:
MOVSXD R8,dword ptr [RAX + RCX*0x4]
MOV R9,qword ptr [RDI + 0x1b0]
MOVZX R8D,word ptr [R9 + R8*0x2]
MOV word ptr [RDX + RCX*0x2],R8W
INC RCX
CMP RSI,RCX
JNZ 0x0014436c
LAB_00144389:
POP RBX
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,
OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag*, int) const */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags
(Level *this,int param_1,VTag *param_2,int param_3)
{
byte bVar1;
uint uVar2;
int iVar3;
int iVar4;
int iVar5;
long *plVar6;
long lVar7;
int iVar8;
long lVar9;
ulong uVar10;
ushort uVar11;
ushort uVar12;
long lVar13;
int *piVar14;
lVar9 = (long)(param_1 * 2 + 1);
lVar7 = (long)*(int *)(*(long *)(this + 0x18) + lVar9 * 4) * 4 + *(long *)(this + 0x30);
uVar2 = *(uint *)(*(long *)(this + 0x18) + (long)(param_1 * 2) * 4);
if (param_3 < 0) {
if (0 < (int)uVar2) {
uVar10 = 0;
do {
*(int2 *)(param_2 + uVar10 * 2) =
*(int2 *)(*(long *)(this + 0x1b0) + (long)*(int *)(lVar7 + uVar10 * 4) * 2);
uVar10 = uVar10 + 1;
} while (uVar2 != uVar10);
}
}
else if (0 < (int)uVar2) {
plVar6 = *(long **)(*(long *)(this + 0x1c8) + (ulong)(uint)param_3 * 8);
iVar3 = *(int *)(*(long *)(*plVar6 + 0x18) + lVar9 * 4);
lVar9 = plVar6[3];
uVar10 = 0;
do {
lVar13 = (long)*(int *)(lVar7 + uVar10 * 4);
iVar4 = *(int *)((long)iVar3 * 4 + lVar9 + uVar10 * 4);
iVar8 = iVar4;
if (*(int *)(*plVar6 + 0xc) < 1) {
iVar5 = *(int *)(plVar6[0xc] + lVar13 * 4);
iVar8 = iVar5 + -1;
piVar14 = (int *)((long)iVar5 * 4 + plVar6[0x12]);
do {
iVar8 = iVar8 + 1;
iVar5 = *piVar14;
piVar14 = piVar14 + 1;
} while (iVar5 != iVar4);
}
bVar1 = *(byte *)(plVar6[0x15] + (long)iVar8);
uVar12 = *(ushort *)(*(long *)(this + 0x1b0) + lVar13 * 2);
if ((bVar1 & 1) != 0) {
uVar11 = (uVar12 & 0xf87f) + 0x400;
if ((bVar1 & 0x18) == 0) {
uVar12 = (uVar11 & 0xbc67) + (ushort)(bVar1 < 0x40) * 8 + 0x10;
}
else {
if ((bVar1 & 8) != 0) {
uVar11 = uVar12 & 0xf87f | 0x200;
}
uVar12 = uVar11 & 0xbe67 | 0x4000;
}
uVar12 = ((bVar1 >> 2 | uVar12) & 1) + (CONCAT11(bVar1,bVar1) & 0x8002 | uVar12 & 0x5ff8) +
0x2004;
}
*(ushort *)(param_2 + uVar10 * 2) = uVar12;
uVar10 = uVar10 + 1;
} while (uVar10 != uVar2);
}
return;
}
| |
45,979 | 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>::set_parents() | monkey531[P]llama/common/json.hpp | void set_parents()
{
#if JSON_DIAGNOSTICS
switch (m_data.m_type)
{
case value_t::array:
{
for (auto& element : *m_data.m_value.array)
{
element.m_parent = this;
}
break;
}
case value_t::object:
{
for (auto& element : *m_data.m_value.object)
{
element.second.m_parent = this;
}
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
break;
}
#endif
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parents():
movq %rdi, -0x8(%rsp)
retq
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv:
mov [rsp+var_8], rdi
retn
| void nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents()
{
;
}
| set_parents:
MOV qword ptr [RSP + -0x8],RDI
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::set_parents() */
void nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::set_parents(void)
{
return;
}
| |
45,980 | bc_get_leb128 | bluesky950520[P]quickjs/quickjs.c | static int bc_get_leb128(BCReaderState *s, uint32_t *pval)
{
int ret;
ret = get_leb128(pval, s->ptr, s->buf_end);
if (unlikely(ret < 0))
return bc_read_error_end(s);
s->ptr += ret;
return 0;
} | O0 | c | bc_get_leb128:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
callq 0x71d30
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x78f77
movq 0x18(%rsp), %rdi
callq 0x791d0
movl %eax, 0x24(%rsp)
jmp 0x78f96
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
| bc_get_leb128:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_10]
mov rsi, [rax+10h]
mov rax, [rsp+28h+var_10]
mov rdx, [rax+18h]
call get_leb128
mov [rsp+28h+var_1C], eax
cmp [rsp+28h+var_1C], 0
setl al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_78F77
mov rdi, [rsp+28h+var_10]
call bc_read_error_end
mov [rsp+28h+var_4], eax
jmp short loc_78F96
loc_78F77:
mov edx, [rsp+28h+var_1C]
mov rax, [rsp+28h+var_10]
mov rcx, [rax+10h]
movsxd rdx, edx
add rcx, rdx
mov [rax+10h], rcx
mov [rsp+28h+var_4], 0
loc_78F96:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long bc_get_leb128(long long a1, _DWORD *a2)
{
int leb128; // [rsp+Ch] [rbp-1Ch]
leb128 = get_leb128(a2, *(_BYTE **)(a1 + 16), *(_QWORD *)(a1 + 24));
if ( leb128 >= 0 )
{
*(_QWORD *)(a1 + 16) += leb128;
return 0;
}
else
{
return (unsigned int)bc_read_error_end(a1);
}
}
| bc_get_leb128:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00171d30
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
SETL AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00178f77
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001791d0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00178f96
LAB_00178f77:
MOV EDX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RSP + 0x24],0x0
LAB_00178f96:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 bc_get_leb128(long param_1,int8 param_2)
{
int iVar1;
int4 local_4;
iVar1 = get_leb128(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
if (iVar1 < 0) {
local_4 = bc_read_error_end(param_1);
}
else {
*(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (long)iVar1;
local_4 = 0;
}
return local_4;
}
| |
45,981 | bc_get_leb128 | bluesky950520[P]quickjs/quickjs.c | static int bc_get_leb128(BCReaderState *s, uint32_t *pval)
{
int ret;
ret = get_leb128(pval, s->ptr, s->buf_end);
if (unlikely(ret < 0))
return bc_read_error_end(s);
s->ptr += ret;
return 0;
} | O1 | c | bc_get_leb128:
pushq %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdx
cmpq %rdx, %rax
jae 0x44eb4
leaq 0x1(%rax), %r8
xorl %ecx, %ecx
xorl %r9d, %r9d
xorl %r10d, %r10d
movl %r10d, %r11d
movzbl -0x1(%r8), %ebx
movl %ebx, %r10d
andl $0x7f, %r10d
shll %cl, %r10d
orl %r11d, %r10d
testb %bl, %bl
jns 0x44ed3
cmpl $0x4, %r9d
leal 0x1(%r9), %r9d
setb %r11b
cmpq %rdx, %r8
setb %bl
andb %r11b, %bl
addl $0x7, %ecx
incq %r8
cmpb $0x1, %bl
je 0x44e7b
movl $0x0, (%rsi)
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
testl %r9d, %r9d
js 0x44edb
movl %r9d, %ecx
addq %rcx, %rax
movq %rax, 0x10(%rdi)
xorl %eax, %eax
popq %rbx
retq
movl %r10d, (%rsi)
incl %r9d
jmp 0x44ec0
callq 0x13425
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x44ed1
| bc_get_leb128:
push rbx
mov rax, [rdi+10h]
mov rdx, [rdi+18h]
cmp rax, rdx
jnb short loc_44EB4
lea r8, [rax+1]
xor ecx, ecx
xor r9d, r9d
xor r10d, r10d
loc_44E7B:
mov r11d, r10d
movzx ebx, byte ptr [r8-1]
mov r10d, ebx
and r10d, 7Fh
shl r10d, cl
or r10d, r11d
test bl, bl
jns short loc_44ED3
cmp r9d, 4
lea r9d, [r9+1]
setb r11b
cmp r8, rdx
setb bl
and bl, r11b
add ecx, 7
inc r8
cmp bl, 1
jz short loc_44E7B
loc_44EB4:
mov dword ptr [rsi], 0
mov r9d, 0FFFFFFFFh
loc_44EC0:
test r9d, r9d
js short loc_44EDB
mov ecx, r9d
add rax, rcx
mov [rdi+10h], rax
xor eax, eax
loc_44ED1:
pop rbx
retn
loc_44ED3:
mov [rsi], r10d
inc r9d
jmp short loc_44EC0
loc_44EDB:
call bc_get_leb128_cold_1
mov eax, 0FFFFFFFFh
jmp short loc_44ED1
| long long bc_get_leb128(long long a1, _DWORD *a2, long long a3, int a4, unsigned long long a5)
{
unsigned long long v5; // rax
unsigned long long v6; // rdx
unsigned int v7; // r9d
int v8; // r10d
bool v9; // cf
bool v10; // bl
int v11; // r9d
v5 = *(_QWORD *)(a1 + 16);
v6 = *(_QWORD *)(a1 + 24);
if ( v5 >= v6 )
{
LABEL_5:
*a2 = 0;
v11 = -1;
}
else
{
a5 = v5 + 1;
a4 = 0;
v7 = 0;
v8 = 0;
while ( 1 )
{
v8 |= (*(_BYTE *)(a5 - 1) & 0x7F) << a4;
if ( *(char *)(a5 - 1) >= 0 )
break;
v9 = v7++ < 4;
v10 = v9 && a5 < v6;
a4 += 7;
++a5;
if ( !v10 )
goto LABEL_5;
}
*a2 = v8;
v11 = v7 + 1;
}
if ( v11 < 0 )
{
bc_get_leb128_cold_1(a1, (long long)a2, v6, a4, a5, v11);
return 0xFFFFFFFFLL;
}
else
{
*(_QWORD *)(a1 + 16) = (unsigned int)v11 + v5;
return 0LL;
}
}
| bc_get_leb128:
PUSH RBX
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDI + 0x18]
CMP RAX,RDX
JNC 0x00144eb4
LEA R8,[RAX + 0x1]
XOR ECX,ECX
XOR R9D,R9D
XOR R10D,R10D
LAB_00144e7b:
MOV R11D,R10D
MOVZX EBX,byte ptr [R8 + -0x1]
MOV R10D,EBX
AND R10D,0x7f
SHL R10D,CL
OR R10D,R11D
TEST BL,BL
JNS 0x00144ed3
CMP R9D,0x4
LEA R9D,[R9 + 0x1]
SETC R11B
CMP R8,RDX
SETC BL
AND BL,R11B
ADD ECX,0x7
INC R8
CMP BL,0x1
JZ 0x00144e7b
LAB_00144eb4:
MOV dword ptr [RSI],0x0
MOV R9D,0xffffffff
LAB_00144ec0:
TEST R9D,R9D
JS 0x00144edb
MOV ECX,R9D
ADD RAX,RCX
MOV qword ptr [RDI + 0x10],RAX
XOR EAX,EAX
LAB_00144ed1:
POP RBX
RET
LAB_00144ed3:
MOV dword ptr [RSI],R10D
INC R9D
JMP 0x00144ec0
LAB_00144edb:
CALL 0x00113425
MOV EAX,0xffffffff
JMP 0x00144ed1
|
int8 bc_get_leb128(long param_1,uint *param_2)
{
byte *pbVar1;
byte *pbVar2;
int8 uVar3;
byte bVar4;
byte *pbVar5;
uint uVar6;
ulong uVar7;
uint uVar8;
bool bVar9;
pbVar1 = *(byte **)(param_1 + 0x10);
if (pbVar1 < *(byte **)(param_1 + 0x18)) {
bVar4 = 0;
uVar6 = 0;
uVar8 = 0;
pbVar2 = pbVar1;
do {
pbVar5 = pbVar2 + 1;
uVar8 = (*pbVar2 & 0x7f) << (bVar4 & 0x1f) | uVar8;
if (-1 < (char)*pbVar2) {
*param_2 = uVar8;
uVar7 = (ulong)(uVar6 + 1);
goto LAB_00144ec0;
}
bVar9 = uVar6 < 4;
uVar6 = uVar6 + 1;
bVar4 = bVar4 + 7;
pbVar2 = pbVar5;
} while (pbVar5 < *(byte **)(param_1 + 0x18) && bVar9);
}
*param_2 = 0;
uVar7 = 0xffffffff;
LAB_00144ec0:
if ((int)uVar7 < 0) {
bc_get_leb128_cold_1();
uVar3 = 0xffffffff;
}
else {
*(byte **)(param_1 + 0x10) = pbVar1 + uVar7;
uVar3 = 0;
}
return uVar3;
}
| |
45,982 | reset_pagecache_counters | eloqsql/storage/maria/ma_pagecache.c | int reset_pagecache_counters(const char *name __attribute__((unused)),
PAGECACHE *pagecache)
{
DBUG_ENTER("reset_pagecache_counters");
if (!pagecache->inited)
{
DBUG_PRINT("info", ("Key cache %s not initialized.", name));
DBUG_RETURN(0);
}
DBUG_PRINT("info", ("Resetting counters for key cache %s.", name));
pagecache->global_blocks_changed= 0; /* Key_blocks_not_flushed */
pagecache->global_cache_r_requests= 0; /* Key_read_requests */
pagecache->global_cache_read= 0; /* Key_reads */
pagecache->global_cache_w_requests= 0; /* Key_write_requests */
pagecache->global_cache_write= 0; /* Key_writes */
DBUG_RETURN(0);
} | O3 | c | reset_pagecache_counters:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x1a8(%rsi)
je 0x35771
xorps %xmm0, %xmm0
movups %xmm0, 0x178(%rsi)
movups %xmm0, 0x168(%rsi)
movq $0x0, 0x188(%rsi)
xorl %eax, %eax
popq %rbp
retq
| reset_pagecache_counters:
push rbp
mov rbp, rsp
cmp byte ptr [rsi+1A8h], 0
jz short loc_35771
xorps xmm0, xmm0
movups xmmword ptr [rsi+178h], xmm0
movups xmmword ptr [rsi+168h], xmm0
mov qword ptr [rsi+188h], 0
loc_35771:
xor eax, eax
pop rbp
retn
| long long reset_pagecache_counters(long long a1, long long a2)
{
if ( *(_BYTE *)(a2 + 424) )
{
*(_OWORD *)(a2 + 376) = 0LL;
*(_OWORD *)(a2 + 360) = 0LL;
*(_QWORD *)(a2 + 392) = 0LL;
}
return 0LL;
}
| reset_pagecache_counters:
PUSH RBP
MOV RBP,RSP
CMP byte ptr [RSI + 0x1a8],0x0
JZ 0x00135771
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x178],XMM0
MOVUPS xmmword ptr [RSI + 0x168],XMM0
MOV qword ptr [RSI + 0x188],0x0
LAB_00135771:
XOR EAX,EAX
POP RBP
RET
|
int8 reset_pagecache_counters(int8 param_1,long param_2)
{
if (*(char *)(param_2 + 0x1a8) != '\0') {
*(int8 *)(param_2 + 0x178) = 0;
*(int8 *)(param_2 + 0x180) = 0;
*(int8 *)(param_2 + 0x168) = 0;
*(int8 *)(param_2 + 0x170) = 0;
*(int8 *)(param_2 + 0x188) = 0;
}
return 0;
}
| |
45,983 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_latin1_de:
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 -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8ef60
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x8ef41
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x10418d(%rip), %rax # 0x193030
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x104244(%rip), %rax # 0x193130
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x8ef2e
jmp 0x8eefa
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x8ef2e
jmp 0x8ef30
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x8ee83
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_latin1_de:
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 rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_0
mov [rbp+var_30], rax
loc_8EE83:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb loc_8EF41
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, combo1map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
cmp eax, 0
jz short loc_8EF2E
jmp short $+2
loc_8EEFA:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_8EF2E:
jmp short $+2
loc_8EF30:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_8EE83
loc_8EF41:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 50h
pop rbp
retn
| _QWORD * my_hash_sort_latin1_de(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
unsigned long long v8; // [rsp+20h] [rbp-30h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
v11 = a2;
v7 = *a4;
v6 = *a5;
v8 = skip_trailing_space_0(a2, a3);
while ( (unsigned long long)v11 < v8 )
{
v7 ^= (v7 << 8) + combo1map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
if ( combo2map[*v11] )
{
v7 ^= (v7 << 8) + combo2map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
}
++v11;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_latin1_de:
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 RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0018ef60
MOV qword ptr [RBP + -0x30],RAX
LAB_0018ee83:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0018ef41
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x293030]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x293130]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JZ 0x0018ef2e
JMP 0x0018eefa
LAB_0018eefa:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0018ef2e
LAB_0018ef2e:
JMP 0x0018ef30
LAB_0018ef30:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0018ee83
LAB_0018ef41:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
pbVar2 = (byte *)skip_trailing_space(param_2,param_3);
for (local_18 = param_2; local_18 < pbVar2; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)(byte)combo1map[*local_18] + local_40 * 0x100
^ local_40;
lVar1 = local_48 + 3;
if ((byte)combo2map[*local_18] != 0) {
local_40 = ((local_40 & 0x3f) + local_48 + 3) * (ulong)(uint)(byte)combo2map[*local_18] +
local_40 * 0x100 ^ local_40;
lVar1 = local_48 + 6;
}
local_48 = lVar1;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
45,984 | ma_apply_redo_insert_row_head_or_tail | eloqsql/storage/maria/ma_blockrec.c | uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn,
uint page_type,
my_bool new_page,
const uchar *header,
const uchar *data,
size_t data_length)
{
MARIA_SHARE *share= info->s;
pgcache_page_no_t page;
uint rownr, empty_space;
uint block_size= share->block_size;
uint rec_offset;
uchar *buff, *dir;
uint result;
MARIA_PINNED_PAGE page_link;
enum pagecache_page_lock lock_method;
enum pagecache_page_pin pin_method;
my_off_t end_of_page;
uint error;
DBUG_ENTER("_ma_apply_redo_insert_row_head_or_tail");
page= page_korr(header);
rownr= dirpos_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u data_length: %u",
(ulong) ma_recordpos(page, rownr),
(ulong) page, rownr, (uint) data_length));
share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
end_of_page= (page + 1) * share->block_size;
if (end_of_page > share->state.state.data_file_length)
{
DBUG_PRINT("info", ("Enlarging data file from %lu to %lu",
(ulong) share->state.state.data_file_length,
(ulong) end_of_page));
/*
New page at end of file. Note that the test above is also positive if
data_file_length is not a multiple of block_size (system crashed while
writing the last page): in this case we just extend the last page and
fill it entirely with zeroes, then the REDO will put correct data on
it.
*/
lock_method= PAGECACHE_LOCK_WRITE;
pin_method= PAGECACHE_PIN;
DBUG_ASSERT(rownr == 0 && new_page);
if (rownr != 0 || !new_page)
goto crashed_file;
buff= info->keyread_buff;
info->keyread_buff_used= 1;
make_empty_page(info, buff, page_type, 1);
empty_space= (block_size - PAGE_OVERHEAD_SIZE(share));
rec_offset= PAGE_HEADER_SIZE(share);
dir= buff+ block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
}
else
{
lock_method= PAGECACHE_LOCK_LEFT_WRITELOCKED;
pin_method= PAGECACHE_PIN_LEFT_PINNED;
share->pagecache->readwrite_flags&= ~MY_WME;
share->silence_encryption_errors= 1;
buff= pagecache_read(share->pagecache, &info->dfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link);
share->pagecache->readwrite_flags= share->pagecache->org_readwrite_flags;
share->silence_encryption_errors= 0;
if (!buff)
{
/* Skip errors when reading outside of file and uninitialized pages */
if (!new_page || (my_errno != HA_ERR_FILE_TOO_SHORT &&
my_errno != HA_ERR_WRONG_CRC &&
my_errno != HA_ERR_DECRYPTION_FAILED))
{
DBUG_PRINT("error", ("Error %d when reading page", (int) my_errno));
goto err;
}
/* Create new page */
buff= pagecache_block_link_to_buffer(page_link.link);
buff[PAGE_TYPE_OFFSET]= UNALLOCATED_PAGE;
}
else if (lsn_korr(buff) >= lsn) /* Test if already applied */
{
check_skipped_lsn(info, lsn_korr(buff), 1, page);
/* Fix bitmap, just in case */
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
if (!enough_free_entries_on_page(share, buff))
empty_space= 0; /* Page is full */
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space))
goto err;
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(0);
}
if (((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type))
{
/*
This is a page that has been freed before and now should be
changed to new type.
*/
if (!new_page)
{
DBUG_PRINT("error",
("Found page of wrong type: %u, should have been %u",
(uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK),
page_type));
goto crashed_file;
}
make_empty_page(info, buff, page_type, 0);
empty_space= block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE;
(void) extend_directory(info, buff, block_size, 0, rownr, &empty_space,
page_type == HEAD_PAGE);
rec_offset= PAGE_HEADER_SIZE(share);
dir= dir_entry_pos(buff, block_size, rownr);
empty_space+= uint2korr(dir+2);
}
else
{
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
uint length;
DBUG_ASSERT(!new_page);
dir= dir_entry_pos(buff, block_size, rownr);
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
if (max_entry <= rownr)
{
/* Add directory entry first in directory and data last on page */
if (extend_directory(info, buff, block_size, max_entry, rownr,
&empty_space, page_type == HEAD_PAGE))
goto crashed_file;
}
if (extend_area_on_page(info, buff, dir, rownr,
(uint) data_length, &empty_space,
&rec_offset, &length, page_type == HEAD_PAGE))
goto crashed_file;
}
}
/* Copy data */
int2store(dir+2, data_length);
memcpy(buff + rec_offset, data, data_length);
empty_space-= (uint) data_length;
int2store(buff + EMPTY_SPACE_OFFSET, empty_space);
/* Fix bitmap */
if (!enough_free_entries_on_page(share, buff))
empty_space= 0; /* Page is full */
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space))
goto err;
/*
If page was not read before, write it but keep it pinned.
We don't update its LSN When we have processed all REDOs for this page
in the current REDO's group, we will stamp page with UNDO's LSN
(if we stamped it now, a next REDO, in
this group, for this page, would be skipped) and unpin then.
*/
result= 0;
if (lock_method == PAGECACHE_LOCK_WRITE &&
pagecache_write(share->pagecache,
&info->dfile, page, 0,
buff, PAGECACHE_PLAIN_PAGE,
lock_method, pin_method,
PAGECACHE_WRITE_DELAY, &page_link.link,
LSN_IMPOSSIBLE))
result= my_errno;
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
/*
Data page and bitmap page are in place, we can update data_file_length in
case we extended the file. We could not do it earlier: bitmap code tests
data_file_length to know if it has to create a new page or not.
*/
set_if_bigger(share->state.state.data_file_length, end_of_page);
DBUG_RETURN(result);
crashed_file:
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
err:
error= my_errno;
if (lock_method == PAGECACHE_LOCK_LEFT_WRITELOCKED)
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
_ma_mark_file_crashed(share);
DBUG_ASSERT(!maria_assert_if_crashed_table); /* catch recovery error early */
DBUG_RETURN((my_errno= error));
} | O3 | c | ma_apply_redo_insert_row_head_or_tail:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %r12d
movq %rsi, %r14
movq (%rdi), %rbx
movl 0x7bc(%rbx), %r13d
movl (%r8), %eax
movzbl 0x4(%r8), %ecx
shlq $0x20, %rcx
leaq (%rcx,%rax), %r10
movzbl 0x5(%r8), %r11d
orl $0x181, 0x170(%rbx) # imm = 0x181
leaq (%rcx,%rax), %rsi
incq %rsi
imulq %r13, %rsi
movq 0x40(%rbx), %r8
cmpq %r8, %rsi
jbe 0x5ec0b
testl %r11d, %r11d
setne %al
testb %r12b, %r12b
sete %cl
movl $0x4, %r14d
orb %al, %cl
jne 0x5efc0
movq %r9, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movq %r10, -0x60(%rbp)
movq %rsi, -0x58(%rbp)
movq 0x380(%rdi), %r15
movb $0x1, 0x685(%rdi)
movq %rdi, -0x38(%rbp)
movq %r15, %rsi
movl %edx, -0x30(%rbp)
movl $0x1, %ecx
callq 0x5f052
movl 0xc18(%rbx), %eax
movl %r13d, %ecx
subl %eax, %ecx
addl $-0x14, %ecx
movl %ecx, -0x2c(%rbp)
addl $0xc, %eax
movl %eax, -0x3c(%rbp)
addq %r15, %r13
addq $-0x8, %r13
movl $0x4, -0x48(%rbp)
movl $0x2, %eax
movq %rax, -0x50(%rbp)
jmp 0x5eeb7
movq %r11, -0x48(%rbp)
movq %r9, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movl %edx, -0x30(%rbp)
movq %rsi, -0x58(%rbp)
movq 0x600(%rbx), %rax
movl $0xffffffef, %ecx # imm = 0xFFFFFFEF
andq %rcx, 0x198(%rax)
movb $0x1, 0x7ec(%rbx)
movq 0x600(%rbx), %rcx
movq %rdi, -0x38(%rbp)
leaq 0x470(%rdi), %rsi
leaq -0x88(%rbp), %rax
movq %rcx, %rdi
movq %r10, -0x60(%rbp)
movq %r10, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x32206
addq $0x10, %rsp
movq %rax, %r15
movq 0x600(%rbx), %rax
movq 0x1a0(%rax), %rcx
movq %rcx, 0x198(%rax)
movb $0x0, 0x7ec(%rbx)
testq %r15, %r15
je 0x5ecc4
movzwl (%r15), %eax
shlq $0x20, %rax
movzbl 0x2(%r15), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%r15), %esi
orq %rcx, %rsi
cmpq %r14, %rsi
jge 0x5edcc
movzbl 0x7(%r15), %eax
andl $0x7, %eax
jmp 0x5ed0d
testb %r12b, %r12b
je 0x5ee1a
callq 0xa16ee
cmpl $0xaf, (%rax)
je 0x5ecf8
callq 0xa16ee
cmpl $0xb0, (%rax)
je 0x5ecf8
callq 0xa16ee
cmpl $0xc0, (%rax)
jne 0x5ee1a
movq -0x88(%rbp), %rdi
callq 0x346e9
movq %rax, %r15
movb $0x0, 0x7(%rax)
xorl %eax, %eax
movl -0x30(%rbp), %edx
cmpl %edx, %eax
movq -0x38(%rbp), %rdi
jne 0x5ee27
movzbl 0x8(%r15), %ecx
movzwl 0xa(%r15), %eax
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %r14
cmpb %r14b, %cl
ja 0x5ed64
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
subq $0x8, %rsp
leaq -0x2c(%rbp), %r9
movq %r15, %rsi
movl %r13d, %edx
movl %r14d, %r8d
pushq %rax
callq 0x5f0e8
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rdi
addq $0x10, %rsp
testb %al, %al
jne 0x5efba
addq %r15, %r13
leal (,%r14,4), %eax
subq %rax, %r13
addq $-0x8, %r13
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
subq $0x8, %rsp
leaq -0x8c(%rbp), %r10
leaq -0x3c(%rbp), %r11
leaq -0x2c(%rbp), %r9
movq %r15, %rsi
movq %r13, %rdx
movl %r14d, %ecx
movq 0x10(%rbp), %r8
pushq %rax
pushq %r10
pushq %r11
callq 0x5f25e
movq -0x38(%rbp), %rdi
addq $0x20, %rsp
testb %al, %al
jne 0x5efba
movl $0x2, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
jmp 0x5eeb7
movq -0x38(%rbp), %rdi
movl $0x1, %edx
movq -0x60(%rbp), %r13
movq %r13, %rcx
callq 0x4c3c9
movzwl 0xa(%r15), %r14d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5bbca
xorl %r12d, %r12d
testb %al, %al
cmovel %r12d, %r14d
xorl %edx, %edx
cmpl $0x1, -0x30(%rbp)
sete %dl
movq -0x38(%rbp), %rdi
movq %r13, %rsi
movl %r14d, %ecx
callq 0x41873
testb %al, %al
je 0x5f025
callq 0xa16ee
movl (%rax), %r12d
jmp 0x5efd8
testb %r12b, %r12b
je 0x5efba
movq $0x0, -0x50(%rbp)
movq %rdi, %r12
movq %r15, %rsi
xorl %ecx, %ecx
movl %edx, %r14d
callq 0x5f052
movl %r13d, %eax
subl 0xc18(%rbx), %eax
addl $-0x10, %eax
leaq -0x2c(%rbp), %rcx
movl %eax, (%rcx)
movq %rcx, %r9
xorl %eax, %eax
cmpl $0x1, %r14d
sete %al
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movq -0x48(%rbp), %r14
movl %r14d, %r8d
movq %r9, %r12
pushq %rax
callq 0x5f0e8
addq $0x10, %rsp
movl 0xc18(%rbx), %eax
addl $0xc, %eax
movl %eax, -0x3c(%rbp)
addq %r15, %r13
leal (,%r14,4), %eax
subq %rax, %r13
movzwl -0x6(%r13), %eax
addq $-0x8, %r13
addl %eax, (%r12)
movl $0x2, -0x48(%rbp)
movq 0x10(%rbp), %r12
movw %r12w, 0x2(%r13)
movl -0x3c(%rbp), %edi
addq %r15, %rdi
movq -0x70(%rbp), %rsi
movq %r12, %rdx
callq 0x29080
movl -0x2c(%rbp), %r14d
subl %r12d, %r14d
movl %r14d, -0x2c(%rbp)
movw %r14w, 0xa(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5bbca
testb %al, %al
jne 0x5eefb
movl $0x0, -0x2c(%rbp)
xorl %r14d, %r14d
xorl %edx, %edx
cmpl $0x1, -0x30(%rbp)
sete %dl
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq -0x60(%rbp), %r13
movq %r13, %rsi
movl %r14d, %ecx
callq 0x41873
testb %al, %al
movl -0x48(%rbp), %r14d
jne 0x5efca
movq %r12, %r14
xorl %r12d, %r12d
movq -0x68(%rbp), %rax
cmpq %rax, -0x58(%rbp)
jbe 0x5ef89
movq 0x600(%rbx), %rdi
leaq 0x470(%r14), %rsi
movl 0x80(%rdi), %eax
subq $0x8, %rsp
xorl %r12d, %r12d
leaq -0x88(%rbp), %r10
movq %r13, %rdx
xorl %ecx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %rax
pushq %r12
pushq $0x0
pushq %r10
pushq %r12
pushq -0x50(%rbp)
pushq $0x4
callq 0x3366a
addq $0x40, %rsp
testb %al, %al
je 0x5ef89
callq 0xa16ee
movl (%rax), %r12d
leaq -0x88(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
movq %r14, %rdi
addq $0x2e8, %rdi # imm = 0x2E8
callq 0x91792
movq -0x58(%rbp), %rax
cmpq %rax, 0x40(%rbx)
jae 0x5f013
movq %rax, 0x40(%rbx)
jmp 0x5f013
movl $0x2, %r14d
movl $0x7f, %esi
callq 0x36618
callq 0xa16ee
movl (%rax), %r12d
cmpl $0x2, %r14d
jne 0x5f003
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x31f21
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x37e16
callq 0xa16ee
movl %r12d, (%rax)
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
callq 0x31f21
addq $0x10, %rsp
jmp 0x5f013
| _ma_apply_redo_insert_row_head_or_tail:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12d, ecx
mov r14, rsi
mov rbx, [rdi]
mov r13d, [rbx+7BCh]
mov eax, [r8]
movzx ecx, byte ptr [r8+4]
shl rcx, 20h
lea r10, [rcx+rax]
movzx r11d, byte ptr [r8+5]
or dword ptr [rbx+170h], 181h
lea rsi, [rcx+rax]
inc rsi
imul rsi, r13
mov r8, [rbx+40h]
cmp rsi, r8
jbe short loc_5EC0B
test r11d, r11d
setnz al
test r12b, r12b
setz cl
mov r14d, 4
or cl, al
jnz loc_5EFC0
mov [rbp+var_70], r9
mov [rbp+var_68], r8
mov [rbp+var_60], r10
mov [rbp+var_58], rsi
mov r15, [rdi+380h]
mov byte ptr [rdi+685h], 1
mov [rbp+var_38], rdi
mov rsi, r15
mov [rbp+var_30], edx
mov ecx, 1
call make_empty_page
mov eax, [rbx+0C18h]
mov ecx, r13d
sub ecx, eax
add ecx, 0FFFFFFECh
mov [rbp+var_2C], ecx
add eax, 0Ch
mov [rbp+var_3C], eax
add r13, r15
add r13, 0FFFFFFFFFFFFFFF8h
mov dword ptr [rbp+var_48], 4
mov eax, 2
mov [rbp+var_50], rax
jmp loc_5EEB7
loc_5EC0B:
mov [rbp+var_48], r11
mov [rbp+var_70], r9
mov [rbp+var_68], r8
mov [rbp+var_30], edx
mov [rbp+var_58], rsi
mov rax, [rbx+600h]
mov ecx, 0FFFFFFEFh
and [rax+198h], rcx
mov byte ptr [rbx+7ECh], 1
mov rcx, [rbx+600h]
mov [rbp+var_38], rdi
lea rsi, [rdi+470h]
lea rax, [rbp+var_88]
mov rdi, rcx
mov [rbp+var_60], r10
mov rdx, r10
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
mov r15, rax
mov rax, [rbx+600h]
mov rcx, [rax+1A0h]
mov [rax+198h], rcx
mov byte ptr [rbx+7ECh], 0
test r15, r15
jz short loc_5ECC4
movzx eax, word ptr [r15]
shl rax, 20h
movzx ecx, byte ptr [r15+2]
shl rcx, 30h
or rcx, rax
mov esi, [r15+3]
or rsi, rcx
cmp rsi, r14
jge loc_5EDCC
movzx eax, byte ptr [r15+7]
and eax, 7
jmp short loc_5ED0D
loc_5ECC4:
test r12b, r12b
jz loc_5EE1A
call _my_thread_var
cmp dword ptr [rax], 0AFh
jz short loc_5ECF8
call _my_thread_var
cmp dword ptr [rax], 0B0h
jz short loc_5ECF8
call _my_thread_var
cmp dword ptr [rax], 0C0h
jnz loc_5EE1A
loc_5ECF8:
mov rdi, [rbp+var_88]
call pagecache_block_link_to_buffer
mov r15, rax
mov byte ptr [rax+7], 0
xor eax, eax
loc_5ED0D:
mov edx, [rbp+var_30]
cmp eax, edx
mov rdi, [rbp+var_38]
jnz loc_5EE27
movzx ecx, byte ptr [r15+8]
movzx eax, word ptr [r15+0Ah]
mov [rbp+var_2C], eax
mov r14, [rbp+var_48]
cmp cl, r14b
ja short loc_5ED64
xor eax, eax
cmp edx, 1
setz al
sub rsp, 8
lea r9, [rbp+var_2C]
mov rsi, r15
mov edx, r13d
mov r8d, r14d
push rax
call extend_directory
mov edx, [rbp+var_30]
mov rdi, [rbp+var_38]
add rsp, 10h
test al, al
jnz loc_5EFBA
loc_5ED64:
add r13, r15
lea eax, ds:0[r14*4]
sub r13, rax
add r13, 0FFFFFFFFFFFFFFF8h
xor eax, eax
cmp edx, 1
setz al
sub rsp, 8
lea r10, [rbp+var_8C]
lea r11, [rbp+var_3C]
lea r9, [rbp+var_2C]
mov rsi, r15
mov rdx, r13
mov ecx, r14d
mov r8, [rbp+arg_0]
push rax
push r10
push r11
call extend_area_on_page
mov rdi, [rbp+var_38]
add rsp, 20h
test al, al
jnz loc_5EFBA
mov dword ptr [rbp+var_48], 2
mov [rbp+var_50], 0
jmp loc_5EEB7
loc_5EDCC:
mov rdi, [rbp+var_38]
mov edx, 1
mov r13, [rbp+var_60]
mov rcx, r13
call check_skipped_lsn
movzx r14d, word ptr [r15+0Ah]
mov rdi, rbx
mov rsi, r15
call enough_free_entries_on_page
xor r12d, r12d
test al, al
cmovz r14d, r12d
xor edx, edx
cmp [rbp+var_30], 1
setz dl
mov rdi, [rbp+var_38]
mov rsi, r13
mov ecx, r14d
call _ma_bitmap_set
test al, al
jz loc_5F025
loc_5EE1A:
call _my_thread_var
mov r12d, [rax]
jmp loc_5EFD8
loc_5EE27:
test r12b, r12b
jz loc_5EFBA
mov [rbp+var_50], 0
mov r12, rdi
mov rsi, r15
xor ecx, ecx
mov r14d, edx
call make_empty_page
mov eax, r13d
sub eax, [rbx+0C18h]
add eax, 0FFFFFFF0h
lea rcx, [rbp+var_2C]
mov [rcx], eax
mov r9, rcx
xor eax, eax
cmp r14d, 1
setz al
sub rsp, 8
mov rdi, r12
mov rsi, r15
mov edx, r13d
xor ecx, ecx
mov r14, [rbp+var_48]
mov r8d, r14d
mov r12, r9
push rax
call extend_directory
add rsp, 10h
mov eax, [rbx+0C18h]
add eax, 0Ch
mov [rbp+var_3C], eax
add r13, r15
lea eax, ds:0[r14*4]
sub r13, rax
movzx eax, word ptr [r13-6]
add r13, 0FFFFFFFFFFFFFFF8h
add [r12], eax
mov dword ptr [rbp+var_48], 2
loc_5EEB7:
mov r12, [rbp+arg_0]
mov [r13+2], r12w
mov edi, [rbp+var_3C]
add rdi, r15
mov rsi, [rbp+var_70]
mov rdx, r12
call _memcpy
mov r14d, [rbp+var_2C]
sub r14d, r12d
mov [rbp+var_2C], r14d
mov [r15+0Ah], r14w
mov rdi, rbx
mov rsi, r15
call enough_free_entries_on_page
test al, al
jnz short loc_5EEFB
mov [rbp+var_2C], 0
xor r14d, r14d
loc_5EEFB:
xor edx, edx
cmp [rbp+var_30], 1
setz dl
mov r12, [rbp+var_38]
mov rdi, r12
mov r13, [rbp+var_60]
mov rsi, r13
mov ecx, r14d
call _ma_bitmap_set
test al, al
mov r14d, dword ptr [rbp+var_48]
jnz loc_5EFCA
mov r14, r12
xor r12d, r12d
mov rax, [rbp+var_68]
cmp [rbp+var_58], rax
jbe short loc_5EF89
mov rdi, [rbx+600h]
lea rsi, [r14+470h]
mov eax, [rdi+80h]
sub rsp, 8
xor r12d, r12d
lea r10, [rbp+var_88]
mov rdx, r13
xor ecx, ecx
mov r8, r15
mov r9d, 1
push rax
push r12
push 0
push r10
push r12
push [rbp+var_50]
push 4
call pagecache_write_part
add rsp, 40h
test al, al
jz short loc_5EF89
call _my_thread_var
mov r12d, [rax]
loc_5EF89:
lea rsi, [rbp+var_88]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
mov rdi, r14
add rdi, 2E8h
call insert_dynamic
mov rax, [rbp+var_58]
cmp [rbx+40h], rax
jnb short loc_5F013
mov [rbx+40h], rax
jmp short loc_5F013
loc_5EFBA:
mov r14d, 2
loc_5EFC0:
mov esi, 7Fh
call _ma_set_fatal_error
loc_5EFCA:
call _my_thread_var
mov r12d, [rax]
cmp r14d, 2
jnz short loc_5F003
loc_5EFD8:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
loc_5F003:
mov rdi, rbx
call _ma_mark_file_crashed
call _my_thread_var
mov [rax], r12d
loc_5F013:
mov eax, r12d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5F025:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push r12
push r12
call pagecache_unlock_by_link
add rsp, 10h
jmp short loc_5F013
| long long ma_apply_redo_insert_row_head_or_tail(
long long *a1,
long long a2,
long long a3,
char a4,
unsigned int *a5,
long long a6,
long long a7)
{
long long v9; // rbx
long long v10; // r13
long long v11; // rax
unsigned long long v12; // rcx
long long v13; // r10
long long v14; // r11
unsigned long long v15; // rsi
unsigned long long v16; // r8
int v17; // r14d
unsigned __int16 *v18; // r15
int v19; // eax
long long v20; // r13
long long v21; // rcx
const char *v22; // rsi
long long *v23; // rdi
long long v24; // rsi
int v25; // eax
int v26; // ecx
int v27; // r14d
char v28; // al
char v29; // al
unsigned long long v30; // r13
unsigned int v31; // r14d
unsigned int v32; // r12d
unsigned int v33; // r14d
char v34; // al
int v35; // r14d
char *v36; // r13
int v37; // eax
unsigned int v38; // r14d
long long *v39; // r12
long long v40; // r13
const char *v41; // rsi
char v42; // al
long long *v43; // r14
__m128i *v44; // rdi
_BYTE v46[4]; // [rsp+4h] [rbp-8Ch] BYREF
const char *v47; // [rsp+8h] [rbp-88h] BYREF
int v48; // [rsp+10h] [rbp-80h]
char v49; // [rsp+18h] [rbp-78h]
long long v50; // [rsp+20h] [rbp-70h]
unsigned long long v51; // [rsp+28h] [rbp-68h]
const char *v52; // [rsp+30h] [rbp-60h]
unsigned long long v53; // [rsp+38h] [rbp-58h]
long long v54; // [rsp+40h] [rbp-50h]
long long v55; // [rsp+48h] [rbp-48h]
unsigned int v56; // [rsp+54h] [rbp-3Ch] BYREF
long long *v57; // [rsp+58h] [rbp-38h]
unsigned int v58; // [rsp+60h] [rbp-30h]
_DWORD v59[11]; // [rsp+64h] [rbp-2Ch] BYREF
v9 = *a1;
v10 = *(unsigned int *)(*a1 + 1980);
v11 = *a5;
v12 = (unsigned long long)*((unsigned __int8 *)a5 + 4) << 32;
v13 = v12 + v11;
v14 = *((unsigned __int8 *)a5 + 5);
*(_DWORD *)(v9 + 368) |= 0x181u;
v15 = v10 * (v12 + v11 + 1);
v16 = *(_QWORD *)(v9 + 64);
if ( v15 > v16 )
{
v17 = 4;
LOBYTE(v12) = (_DWORD)v14 != 0 || a4 == 0;
if ( !(_BYTE)v12 )
{
v50 = a6;
v51 = v16;
v52 = (const char *)v13;
v53 = v15;
v18 = (unsigned __int16 *)a1[112];
*((_BYTE *)a1 + 1669) = 1;
v57 = a1;
v58 = a3;
make_empty_page(a1, v18, a3, 1LL);
v19 = *(_DWORD *)(v9 + 3096);
v59[0] = v10 - v19 - 20;
v56 = v19 + 12;
v20 = (long long)v18 + v10 - 8;
LODWORD(v55) = 4;
v54 = 2LL;
goto LABEL_23;
}
LABEL_32:
v41 = (_BYTE *)(&dword_7C + 3);
ma_set_fatal_error(a1, 127LL, a3, v12, v16, a6);
goto LABEL_33;
}
v55 = v14;
v50 = a6;
v51 = v16;
v58 = a3;
v53 = v10 * (v12 + v11 + 1);
*(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) &= 0xFFFFFFEFuLL;
*(_BYTE *)(v9 + 2028) = 1;
v21 = *(_QWORD *)(v9 + 1536);
v57 = a1;
v22 = (const char *)(a1 + 142);
v23 = (long long *)v21;
v52 = (const char *)v13;
v18 = (unsigned __int16 *)pagecache_read(v21, (long long)v22, v13, 0, 0LL, 1, 4u, &v47);
*(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) = *(_QWORD *)(*(_QWORD *)(v9 + 1536) + 416LL);
*(_BYTE *)(v9 + 2028) = 0;
if ( v18 )
{
v12 = ((unsigned long long)*v18 << 32) | ((unsigned long long)*((unsigned __int8 *)v18 + 2) << 48);
v24 = v12 | *(unsigned int *)((char *)v18 + 3);
if ( v24 < a2 )
{
v25 = *((_BYTE *)v18 + 7) & 7;
goto LABEL_12;
}
v30 = (unsigned long long)v52;
check_skipped_lsn((long long)v57, v24, 1, (int)v52);
v31 = v18[5];
v32 = 0;
if ( !enough_free_entries_on_page(v9, v18) )
v31 = 0;
v23 = v57;
v22 = (const char *)v30;
if ( !(unsigned __int8)ma_bitmap_set(v57, v30, v58 == 1, v31) )
{
pagecache_unlock_by_link(*(_QWORD *)(v9 + 1536), (long long)v47, 6, 3, 0LL, 0LL, 0);
return v32;
}
LABEL_20:
v32 = *(_DWORD *)my_thread_var(v23, v22);
goto LABEL_34;
}
if ( !a4
|| *(_DWORD *)my_thread_var(v23, v22) != 175
&& *(_DWORD *)my_thread_var(v23, v22) != 176
&& *(_DWORD *)my_thread_var(v23, v22) != 192 )
{
goto LABEL_20;
}
v18 = (unsigned __int16 *)pagecache_block_link_to_buffer((long long)v47);
*((_BYTE *)v18 + 7) = 0;
v25 = 0;
LABEL_12:
a3 = v58;
a1 = v57;
if ( v25 == v58 )
{
v26 = *((unsigned __int8 *)v18 + 8);
v59[0] = v18[5];
v27 = v55;
if ( (unsigned __int8)v26 > (unsigned __int8)v55
|| (v28 = extend_directory((_DWORD)v57, (_DWORD)v18, v10, v26, v55, (unsigned int)v59, v58 == 1),
a3 = v58,
a1 = v57,
!v28) )
{
v20 = (long long)v18 + v10 - (unsigned int)(4 * v27) - 8;
v29 = extend_area_on_page(
(_DWORD)a1,
(_DWORD)v18,
v20,
v27,
a7,
(unsigned int)v59,
(long long)&v56,
(long long)v46,
(_DWORD)a3 == 1);
a1 = v57;
if ( !v29 )
{
LODWORD(v55) = 2;
v54 = 0LL;
goto LABEL_23;
}
}
LABEL_31:
v17 = 2;
goto LABEL_32;
}
if ( !a4 )
goto LABEL_31;
v54 = 0LL;
v33 = v58;
make_empty_page(v57, v18, v58, 0LL);
v59[0] = v10 - *(_DWORD *)(v9 + 3096) - 16;
v34 = v33 == 1;
v35 = v55;
extend_directory((_DWORD)a1, (_DWORD)v18, v10, 0, v55, (unsigned int)v59, v34);
v56 = *(_DWORD *)(v9 + 3096) + 12;
v36 = (char *)v18 + v10 - (unsigned int)(4 * v35);
v37 = *((unsigned __int16 *)v36 - 3);
v20 = (long long)(v36 - 8);
v59[0] += v37;
LODWORD(v55) = 2;
LABEL_23:
*(_WORD *)(v20 + 2) = a7;
memcpy((char *)v18 + v56, v50, a7);
v38 = v59[0] - a7;
v59[0] = v38;
v18[5] = v38;
if ( !enough_free_entries_on_page(v9, v18) )
{
v59[0] = 0;
v38 = 0;
}
v39 = v57;
a1 = v57;
v40 = (long long)v52;
v41 = v52;
v42 = ma_bitmap_set(v57, (unsigned long long)v52, v58 == 1, v38);
v17 = v55;
if ( v42 )
{
LABEL_33:
v32 = *(_DWORD *)my_thread_var(a1, v41);
if ( v17 != 2 )
{
LABEL_35:
ma_mark_file_crashed(v9);
*(_DWORD *)my_thread_var(v9, v41) = v32;
return v32;
}
LABEL_34:
v41 = v47;
pagecache_unlock_by_link(*(_QWORD *)(v9 + 1536), (long long)v47, 6, 3, 0LL, 0LL, 0);
goto LABEL_35;
}
v43 = v39;
v32 = 0;
if ( v53 > v51 )
{
v44 = *(__m128i **)(v9 + 1536);
v32 = 0;
if ( (unsigned __int8)pagecache_write_part(
v44,
(char *)v43 + 1136,
v40,
0,
(char *)v18,
1,
4u,
v54,
0,
&v47,
0LL,
0,
v44[8].m128i_u32[0]) )
v32 = *(_DWORD *)my_thread_var(v44, (const char *)v43 + 1136);
}
v48 = 6;
v49 = 1;
insert_dynamic(v43 + 93, &v47);
if ( *(_QWORD *)(v9 + 64) < v53 )
*(_QWORD *)(v9 + 64) = v53;
return v32;
}
| _ma_apply_redo_insert_row_head_or_tail:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12D,ECX
MOV R14,RSI
MOV RBX,qword ptr [RDI]
MOV R13D,dword ptr [RBX + 0x7bc]
MOV EAX,dword ptr [R8]
MOVZX ECX,byte ptr [R8 + 0x4]
SHL RCX,0x20
LEA R10,[RCX + RAX*0x1]
MOVZX R11D,byte ptr [R8 + 0x5]
OR dword ptr [RBX + 0x170],0x181
LEA RSI,[RCX + RAX*0x1]
INC RSI
IMUL RSI,R13
MOV R8,qword ptr [RBX + 0x40]
CMP RSI,R8
JBE 0x0015ec0b
TEST R11D,R11D
SETNZ AL
TEST R12B,R12B
SETZ CL
MOV R14D,0x4
OR CL,AL
JNZ 0x0015efc0
MOV qword ptr [RBP + -0x70],R9
MOV qword ptr [RBP + -0x68],R8
MOV qword ptr [RBP + -0x60],R10
MOV qword ptr [RBP + -0x58],RSI
MOV R15,qword ptr [RDI + 0x380]
MOV byte ptr [RDI + 0x685],0x1
MOV qword ptr [RBP + -0x38],RDI
MOV RSI,R15
MOV dword ptr [RBP + -0x30],EDX
MOV ECX,0x1
CALL 0x0015f052
MOV EAX,dword ptr [RBX + 0xc18]
MOV ECX,R13D
SUB ECX,EAX
ADD ECX,-0x14
MOV dword ptr [RBP + -0x2c],ECX
ADD EAX,0xc
MOV dword ptr [RBP + -0x3c],EAX
ADD R13,R15
ADD R13,-0x8
MOV dword ptr [RBP + -0x48],0x4
MOV EAX,0x2
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015eeb7
LAB_0015ec0b:
MOV qword ptr [RBP + -0x48],R11
MOV qword ptr [RBP + -0x70],R9
MOV qword ptr [RBP + -0x68],R8
MOV dword ptr [RBP + -0x30],EDX
MOV qword ptr [RBP + -0x58],RSI
MOV RAX,qword ptr [RBX + 0x600]
MOV ECX,0xffffffef
AND qword ptr [RAX + 0x198],RCX
MOV byte ptr [RBX + 0x7ec],0x1
MOV RCX,qword ptr [RBX + 0x600]
MOV qword ptr [RBP + -0x38],RDI
LEA RSI,[RDI + 0x470]
LEA RAX,[RBP + -0x88]
MOV RDI,RCX
MOV qword ptr [RBP + -0x60],R10
MOV RDX,R10
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x00132206
ADD RSP,0x10
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0x600]
MOV RCX,qword ptr [RAX + 0x1a0]
MOV qword ptr [RAX + 0x198],RCX
MOV byte ptr [RBX + 0x7ec],0x0
TEST R15,R15
JZ 0x0015ecc4
MOVZX EAX,word ptr [R15]
SHL RAX,0x20
MOVZX ECX,byte ptr [R15 + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [R15 + 0x3]
OR RSI,RCX
CMP RSI,R14
JGE 0x0015edcc
MOVZX EAX,byte ptr [R15 + 0x7]
AND EAX,0x7
JMP 0x0015ed0d
LAB_0015ecc4:
TEST R12B,R12B
JZ 0x0015ee1a
CALL 0x001a16ee
CMP dword ptr [RAX],0xaf
JZ 0x0015ecf8
CALL 0x001a16ee
CMP dword ptr [RAX],0xb0
JZ 0x0015ecf8
CALL 0x001a16ee
CMP dword ptr [RAX],0xc0
JNZ 0x0015ee1a
LAB_0015ecf8:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x001346e9
MOV R15,RAX
MOV byte ptr [RAX + 0x7],0x0
XOR EAX,EAX
LAB_0015ed0d:
MOV EDX,dword ptr [RBP + -0x30]
CMP EAX,EDX
MOV RDI,qword ptr [RBP + -0x38]
JNZ 0x0015ee27
MOVZX ECX,byte ptr [R15 + 0x8]
MOVZX EAX,word ptr [R15 + 0xa]
MOV dword ptr [RBP + -0x2c],EAX
MOV R14,qword ptr [RBP + -0x48]
CMP CL,R14B
JA 0x0015ed64
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
SUB RSP,0x8
LEA R9,[RBP + -0x2c]
MOV RSI,R15
MOV EDX,R13D
MOV R8D,R14D
PUSH RAX
CALL 0x0015f0e8
MOV EDX,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x10
TEST AL,AL
JNZ 0x0015efba
LAB_0015ed64:
ADD R13,R15
LEA EAX,[R14*0x4]
SUB R13,RAX
ADD R13,-0x8
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
SUB RSP,0x8
LEA R10,[RBP + -0x8c]
LEA R11,[RBP + -0x3c]
LEA R9,[RBP + -0x2c]
MOV RSI,R15
MOV RDX,R13
MOV ECX,R14D
MOV R8,qword ptr [RBP + 0x10]
PUSH RAX
PUSH R10
PUSH R11
CALL 0x0015f25e
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x20
TEST AL,AL
JNZ 0x0015efba
MOV dword ptr [RBP + -0x48],0x2
MOV qword ptr [RBP + -0x50],0x0
JMP 0x0015eeb7
LAB_0015edcc:
MOV RDI,qword ptr [RBP + -0x38]
MOV EDX,0x1
MOV R13,qword ptr [RBP + -0x60]
MOV RCX,R13
CALL 0x0014c3c9
MOVZX R14D,word ptr [R15 + 0xa]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015bbca
XOR R12D,R12D
TEST AL,AL
CMOVZ R14D,R12D
XOR EDX,EDX
CMP dword ptr [RBP + -0x30],0x1
SETZ DL
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R13
MOV ECX,R14D
CALL 0x00141873
TEST AL,AL
JZ 0x0015f025
LAB_0015ee1a:
CALL 0x001a16ee
MOV R12D,dword ptr [RAX]
JMP 0x0015efd8
LAB_0015ee27:
TEST R12B,R12B
JZ 0x0015efba
MOV qword ptr [RBP + -0x50],0x0
MOV R12,RDI
MOV RSI,R15
XOR ECX,ECX
MOV R14D,EDX
CALL 0x0015f052
MOV EAX,R13D
SUB EAX,dword ptr [RBX + 0xc18]
ADD EAX,-0x10
LEA RCX,[RBP + -0x2c]
MOV dword ptr [RCX],EAX
MOV R9,RCX
XOR EAX,EAX
CMP R14D,0x1
SETZ AL
SUB RSP,0x8
MOV RDI,R12
MOV RSI,R15
MOV EDX,R13D
XOR ECX,ECX
MOV R14,qword ptr [RBP + -0x48]
MOV R8D,R14D
MOV R12,R9
PUSH RAX
CALL 0x0015f0e8
ADD RSP,0x10
MOV EAX,dword ptr [RBX + 0xc18]
ADD EAX,0xc
MOV dword ptr [RBP + -0x3c],EAX
ADD R13,R15
LEA EAX,[R14*0x4]
SUB R13,RAX
MOVZX EAX,word ptr [R13 + -0x6]
ADD R13,-0x8
ADD dword ptr [R12],EAX
MOV dword ptr [RBP + -0x48],0x2
LAB_0015eeb7:
MOV R12,qword ptr [RBP + 0x10]
MOV word ptr [R13 + 0x2],R12W
MOV EDI,dword ptr [RBP + -0x3c]
ADD RDI,R15
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,R12
CALL 0x00129080
MOV R14D,dword ptr [RBP + -0x2c]
SUB R14D,R12D
MOV dword ptr [RBP + -0x2c],R14D
MOV word ptr [R15 + 0xa],R14W
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015bbca
TEST AL,AL
JNZ 0x0015eefb
MOV dword ptr [RBP + -0x2c],0x0
XOR R14D,R14D
LAB_0015eefb:
XOR EDX,EDX
CMP dword ptr [RBP + -0x30],0x1
SETZ DL
MOV R12,qword ptr [RBP + -0x38]
MOV RDI,R12
MOV R13,qword ptr [RBP + -0x60]
MOV RSI,R13
MOV ECX,R14D
CALL 0x00141873
TEST AL,AL
MOV R14D,dword ptr [RBP + -0x48]
JNZ 0x0015efca
MOV R14,R12
XOR R12D,R12D
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RBP + -0x58],RAX
JBE 0x0015ef89
MOV RDI,qword ptr [RBX + 0x600]
LEA RSI,[R14 + 0x470]
MOV EAX,dword ptr [RDI + 0x80]
SUB RSP,0x8
XOR R12D,R12D
LEA R10,[RBP + -0x88]
MOV RDX,R13
XOR ECX,ECX
MOV R8,R15
MOV R9D,0x1
PUSH RAX
PUSH R12
PUSH 0x0
PUSH R10
PUSH R12
PUSH qword ptr [RBP + -0x50]
PUSH 0x4
CALL 0x0013366a
ADD RSP,0x40
TEST AL,AL
JZ 0x0015ef89
CALL 0x001a16ee
MOV R12D,dword ptr [RAX]
LAB_0015ef89:
LEA RSI,[RBP + -0x88]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
MOV RDI,R14
ADD RDI,0x2e8
CALL 0x00191792
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RBX + 0x40],RAX
JNC 0x0015f013
MOV qword ptr [RBX + 0x40],RAX
JMP 0x0015f013
LAB_0015efba:
MOV R14D,0x2
LAB_0015efc0:
MOV ESI,0x7f
CALL 0x00136618
LAB_0015efca:
CALL 0x001a16ee
MOV R12D,dword ptr [RAX]
CMP R14D,0x2
JNZ 0x0015f003
LAB_0015efd8:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x00131f21
ADD RSP,0x10
LAB_0015f003:
MOV RDI,RBX
CALL 0x00137e16
CALL 0x001a16ee
MOV dword ptr [RAX],R12D
LAB_0015f013:
MOV EAX,R12D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015f025:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH R12
PUSH R12
CALL 0x00131f21
ADD RSP,0x10
JMP 0x0015f013
|
int4
_ma_apply_redo_insert_row_head_or_tail
(long *param_1,long param_2,int8 param_3,char param_4,uint5 *param_5,void *param_6,
size_t param_7)
{
ulong *puVar1;
ulong uVar2;
byte bVar3;
long lVar4;
uint5 uVar5;
long lVar6;
long *plVar7;
uint uVar8;
char cVar9;
uint uVar10;
ushort *puVar11;
int *piVar12;
int4 *puVar13;
ulong uVar14;
ulong uVar15;
int4 uVar16;
ulong uVar17;
long lVar18;
ushort uVar19;
uint uVar20;
int iVar21;
int1 local_94 [4];
int8 local_90;
int4 local_88;
int1 local_80;
void *local_78;
ulong local_70;
ulong local_68;
ulong local_60;
int8 local_58;
ulong local_50;
uint local_44;
long *local_40;
uint local_38;
uint local_34;
lVar4 = *param_1;
uVar20 = *(uint *)(lVar4 + 0x7bc);
uVar17 = (ulong)uVar20;
uVar5 = *param_5;
uVar2 = (ulong)*param_5;
bVar3 = *(byte *)((long)param_5 + 5);
*(uint *)(lVar4 + 0x170) = *(uint *)(lVar4 + 0x170) | 0x181;
uVar14 = ((ulong)uVar5 + 1) * uVar17;
uVar15 = *(ulong *)(lVar4 + 0x40);
if (uVar14 < uVar15 || uVar14 - uVar15 == 0) {
puVar1 = (ulong *)(*(long *)(lVar4 + 0x600) + 0x198);
*puVar1 = *puVar1 & 0xffffffef;
*(int1 *)(lVar4 + 0x7ec) = 1;
local_78 = param_6;
local_70 = uVar15;
local_68 = uVar2;
local_60 = uVar14;
local_50 = (ulong)bVar3;
local_40 = param_1;
local_38 = (uint)param_3;
puVar11 = (ushort *)
pagecache_read(*(int8 *)(lVar4 + 0x600),param_1 + 0x8e,uVar2,0,0,1,4,&local_90);
uVar2 = local_68;
*(int8 *)(*(long *)(lVar4 + 0x600) + 0x198) =
*(int8 *)(*(long *)(lVar4 + 0x600) + 0x1a0);
*(int1 *)(lVar4 + 0x7ec) = 0;
if (puVar11 == (ushort *)0x0) {
if ((param_4 != '\0') &&
(((piVar12 = (int *)_my_thread_var(), *piVar12 == 0xaf ||
(piVar12 = (int *)_my_thread_var(), *piVar12 == 0xb0)) ||
(piVar12 = (int *)_my_thread_var(), *piVar12 == 0xc0)))) {
puVar11 = (ushort *)pagecache_block_link_to_buffer(local_90);
*(int1 *)((long)puVar11 + 7) = 0;
uVar10 = 0;
goto LAB_0015ed0d;
}
}
else {
uVar15 = (ulong)*(uint *)((long)puVar11 + 3) |
(ulong)(byte)puVar11[1] << 0x30 | (ulong)*puVar11 << 0x20;
if ((long)uVar15 < param_2) {
uVar10 = *(byte *)((long)puVar11 + 7) & 7;
LAB_0015ed0d:
uVar8 = local_38;
plVar7 = local_40;
uVar2 = local_50;
if (uVar10 == local_38) {
local_34 = (uint)puVar11[5];
if (((byte)local_50 < (byte)puVar11[4]) ||
(cVar9 = extend_directory(local_40,puVar11,uVar17,(byte)puVar11[4],
local_50 & 0xffffffff,&local_34,local_38 == 1), cVar9 == '\0'
)) {
lVar18 = (long)puVar11 + (uVar17 - (uint)((int)uVar2 * 4)) + -8;
cVar9 = extend_area_on_page(local_40,puVar11,lVar18,uVar2 & 0xffffffff,param_7,&local_34
,&local_44,local_94,local_38 == 1);
if (cVar9 == '\0') {
local_50 = CONCAT44(local_50._4_4_,2);
local_58 = 0;
goto LAB_0015eeb7;
}
}
LAB_0015efba:
iVar21 = 2;
param_1 = local_40;
goto LAB_0015efc0;
}
if (param_4 == '\0') goto LAB_0015efba;
local_58 = 0;
make_empty_page(local_40,puVar11,local_38,0);
uVar2 = local_50;
local_34 = (uVar20 - *(int *)(lVar4 + 0xc18)) - 0x10;
extend_directory(plVar7,puVar11,uVar17,0,local_50 & 0xffffffff,&local_34,uVar8 == 1);
local_44 = *(int *)(lVar4 + 0xc18) + 0xc;
lVar6 = uVar17 - (uint)((int)uVar2 * 4);
lVar18 = (long)puVar11 + lVar6 + -8;
local_34 = local_34 + *(ushort *)((long)puVar11 + lVar6 + -6);
local_50 = CONCAT44(local_50._4_4_,2);
LAB_0015eeb7:
*(short *)(lVar18 + 2) = (short)param_7;
memcpy((void *)((ulong)local_44 + (long)puVar11),local_78,param_7);
uVar20 = local_34 - (int)param_7;
puVar11[5] = (ushort)uVar20;
local_34 = uVar20;
cVar9 = enough_free_entries_on_page(lVar4,puVar11);
plVar7 = local_40;
uVar2 = local_68;
if (cVar9 == '\0') {
local_34 = 0;
uVar20 = 0;
}
cVar9 = _ma_bitmap_set(local_40,local_68,local_38 == 1,uVar20);
iVar21 = (int)local_50;
if (cVar9 == '\0') {
uVar16 = 0;
if (local_70 < local_60) {
uVar16 = 0;
cVar9 = pagecache_write_part
(*(long *)(lVar4 + 0x600),plVar7 + 0x8e,uVar2,0,puVar11,1,4,local_58,0
,&local_90,0,0,*(int4 *)(*(long *)(lVar4 + 0x600) + 0x80));
if (cVar9 != '\0') {
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
}
}
local_88 = 6;
local_80 = 1;
insert_dynamic(plVar7 + 0x5d);
if (local_60 <= *(ulong *)(lVar4 + 0x40)) {
return uVar16;
}
*(ulong *)(lVar4 + 0x40) = local_60;
return uVar16;
}
goto LAB_0015efca;
}
check_skipped_lsn(local_40,uVar15,1,local_68);
uVar19 = puVar11[5];
cVar9 = enough_free_entries_on_page(lVar4,puVar11);
if (cVar9 == '\0') {
uVar19 = 0;
}
cVar9 = _ma_bitmap_set(local_40,uVar2,local_38 == 1,uVar19);
if (cVar9 == '\0') {
pagecache_unlock_by_link(*(int8 *)(lVar4 + 0x600),local_90,6,3,0,0,0,0);
return 0;
}
}
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
}
else {
iVar21 = 4;
if (param_4 != '\0' && bVar3 == 0) {
puVar11 = (ushort *)param_1[0x70];
*(int1 *)((long)param_1 + 0x685) = 1;
local_78 = param_6;
local_70 = uVar15;
local_68 = uVar2;
local_60 = uVar14;
local_40 = param_1;
local_38 = (uint)param_3;
make_empty_page(param_1,puVar11,param_3,1);
local_34 = (uVar20 - *(int *)(lVar4 + 0xc18)) - 0x14;
local_44 = *(int *)(lVar4 + 0xc18) + 0xc;
lVar18 = (long)puVar11 + (uVar17 - 8);
local_50 = CONCAT44(local_50._4_4_,4);
local_58 = 2;
goto LAB_0015eeb7;
}
LAB_0015efc0:
_ma_set_fatal_error(param_1,0x7f);
LAB_0015efca:
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
if (iVar21 != 2) goto LAB_0015f003;
}
pagecache_unlock_by_link(*(int8 *)(lVar4 + 0x600),local_90,6,3,0,0,0,0);
LAB_0015f003:
_ma_mark_file_crashed(lVar4);
puVar13 = (int4 *)_my_thread_var();
*puVar13 = uVar16;
return uVar16;
}
| |
45,985 | my_thread_init_thr_mutex | eloqsql/mysys/my_thr_init.c | static void my_thread_init_thr_mutex(struct st_my_thread_var *var)
{
mysql_mutex_init(key_my_thread_var_mutex, &var->mutex, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_my_thread_var_suspend, &var->suspend, NULL);
} | O3 | c | my_thread_init_thr_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x31f2c9(%rip), %rax # 0x36a8f0
movl (%rax), %edi
leaq 0x40(%rbx), %r14
leaq 0x2ec29c(%rip), %r15 # 0x3378d0
movq (%r15), %rax
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x80(%rbx)
movq %r14, 0x78(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
leaq 0x31f252(%rip), %rsi # 0x36a8a8
movq %r14, %rdi
callq 0x25480
leaq 0x31f2cf(%rip), %rax # 0x36a934
movl (%rax), %edi
leaq 0x8(%rbx), %r14
movq (%r15), %rax
movq %r14, %rsi
callq *0x60(%rax)
movq %rax, 0x38(%rbx)
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x253a0
| my_thread_init_thr_mutex:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
lea rax, key_my_thread_var_mutex
mov edi, [rax]
lea r14, [rbx+40h]
lea r15, PSI_server
mov rax, [r15]
mov rsi, r14
call qword ptr [rax+40h]
mov [rbx+80h], rax
mov [rbx+78h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+68h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
lea rax, key_my_thread_var_suspend
mov edi, [rax]
lea r14, [rbx+8]
mov rax, [r15]
mov rsi, r14
call qword ptr [rax+60h]
mov [rbx+38h], rax
mov rdi, r14
xor esi, esi
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_cond_init
| long long my_thread_init_thr_mutex(long long a1)
{
*(_QWORD *)(a1 + 128) = ((long long ( *)(_QWORD, long long))PSI_server[8])(key_my_thread_var_mutex, a1 + 64);
*(_QWORD *)(a1 + 120) = a1 + 64;
*(_OWORD *)(a1 + 104) = 0LL;
pthread_mutex_init(a1 + 64, &my_fast_mutexattr);
*(_QWORD *)(a1 + 56) = ((long long ( *)(_QWORD, long long))PSI_server[12])(key_my_thread_var_suspend, a1 + 8);
return pthread_cond_init(a1 + 8, 0LL);
}
| my_thread_init_thr_mutex:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x46a8f0]
MOV EDI,dword ptr [RAX]
LEA R14,[RBX + 0x40]
LEA R15,[0x4378d0]
MOV RAX,qword ptr [R15]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [RBX + 0x80],RAX
MOV qword ptr [RBX + 0x78],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x68],XMM0
LEA RSI,[0x46a8a8]
MOV RDI,R14
CALL 0x00125480
LEA RAX,[0x46a934]
MOV EDI,dword ptr [RAX]
LEA R14,[RBX + 0x8]
MOV RAX,qword ptr [R15]
MOV RSI,R14
CALL qword ptr [RAX + 0x60]
MOV qword ptr [RBX + 0x38],RAX
MOV RDI,R14
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001253a0
|
void my_thread_init_thr_mutex(long param_1)
{
pthread_mutex_t *__mutex;
int8 uVar1;
__mutex = (pthread_mutex_t *)(param_1 + 0x40);
uVar1 = (**(code **)(PSI_server + 0x40))(key_my_thread_var_mutex,__mutex);
*(int8 *)(param_1 + 0x80) = uVar1;
*(pthread_mutex_t **)(param_1 + 0x78) = __mutex;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr);
uVar1 = (**(code **)(PSI_server + 0x60))(key_my_thread_var_suspend);
*(int8 *)(param_1 + 0x38) = uVar1;
pthread_cond_init((pthread_cond_t *)(param_1 + 8),(pthread_condattr_t *)0x0);
return;
}
| |
45,986 | common_log_main() | monkey531[P]llama/common/log.cpp | struct common_log * common_log_main() {
static struct common_log log;
return &log;
} | O3 | cpp | common_log_main():
pushq %rbx
movb 0x61946(%rip), %al # 0x12d518
testb %al, %al
je 0xcbbdf
leaq 0x6186b(%rip), %rax # 0x12d448
popq %rbx
retq
leaq 0x61932(%rip), %rdi # 0x12d518
callq 0x1b020
testl %eax, %eax
je 0xcbbd6
leaq 0x61852(%rip), %rdi # 0x12d448
movl $0x100, %esi # imm = 0x100
callq 0xcc2ca
leaq 0x10d(%rip), %rdi # 0xcbd14
leaq 0x6183a(%rip), %rsi # 0x12d448
leaq 0x60cc3(%rip), %rdx # 0x12c8d8
callq 0x1a7a0
leaq 0x618f7(%rip), %rdi # 0x12d518
callq 0x1a5d0
jmp 0xcbbd6
movq %rax, %rbx
leaq 0x618e6(%rip), %rdi # 0x12d518
callq 0x1a5c0
movq %rbx, %rdi
callq 0x1afc0
| _Z15common_log_mainv:
push rbx
mov al, cs:_ZGVZ15common_log_mainvE3log; `guard variable for'common_log_main(void)::log
test al, al
jz short loc_CBBDF
loc_CBBD6:
lea rax, _ZZ15common_log_mainvE3log; common_log_main(void)::log
pop rbx
retn
loc_CBBDF:
lea rdi, _ZGVZ15common_log_mainvE3log; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_CBBD6
lea rdi, _ZZ15common_log_mainvE3log; this
mov esi, 100h; unsigned __int64
call _ZN10common_logC2Em; common_log::common_log(ulong)
lea rdi, _ZN10common_logD2Ev; lpfunc
lea rsi, _ZZ15common_log_mainvE3log; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZ15common_log_mainvE3log; __guard *
call ___cxa_guard_release
jmp short loc_CBBD6
mov rbx, rax
lea rdi, _ZGVZ15common_log_mainvE3log; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
| void *common_log_main(void)
{
if ( !(_BYTE)`guard variable for'common_log_main(void)::log
&& __cxa_guard_acquire(&`guard variable for'common_log_main(void)::log) )
{
common_log::common_log((common_log *)&common_log_main(void)::log, 0x100uLL);
__cxa_atexit(common_log::~common_log, &common_log_main(void)::log, &_dso_handle);
__cxa_guard_release(&`guard variable for'common_log_main(void)::log);
}
return &common_log_main(void)::log;
}
| common_log_main:
PUSH RBX
MOV AL,byte ptr [0x0022d518]
TEST AL,AL
JZ 0x001cbbdf
LAB_001cbbd6:
LEA RAX,[0x22d448]
POP RBX
RET
LAB_001cbbdf:
LEA RDI,[0x22d518]
CALL 0x0011b020
TEST EAX,EAX
JZ 0x001cbbd6
LAB_001cbbef:
LEA RDI,[0x22d448]
MOV ESI,0x100
CALL 0x001cc2ca
LAB_001cbc00:
LEA RDI,[0x1cbd14]
LEA RSI,[0x22d448]
LEA RDX,[0x22c8d8]
CALL 0x0011a7a0
LEA RDI,[0x22d518]
CALL 0x0011a5d0
JMP 0x001cbbd6
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* common_log_main() */
int1 * common_log_main(void)
{
int iVar1;
if (common_log_main()::log == '\0') {
iVar1 = __cxa_guard_acquire(&common_log_main()::log);
if (iVar1 != 0) {
/* try { // try from 001cbbef to 001cbbff has its CatchHandler @ 001cbc28 */
common_log::common_log((common_log *)common_log_main()::log,0x100);
__cxa_atexit(common_log::~common_log,common_log_main()::log,&__dso_handle);
__cxa_guard_release(&common_log_main()::log);
}
}
return common_log_main()::log;
}
| |
45,987 | CreateDevice(VkPhysicalDevice_T*, VkDeviceCreateInfo const*, VkAllocationCallbacks const*, VkDevice_T**) | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkDevice *pDevice)
{
auto *layer = getInstanceLayer(gpu);
auto *chainInfo = getChainInfo(pCreateInfo, VK_LAYER_LINK_INFO);
auto fpGetDeviceProcAddr = chainInfo->u.pLayerInfo->pfnNextGetDeviceProcAddr;
auto fpCreateDevice = layer->getTable()->CreateDevice;
// Advance the link info for the next element on the chain
chainInfo->u.pLayerInfo = chainInfo->u.pLayerInfo->pNext;
auto res = fpCreateDevice(gpu, pCreateInfo, pAllocator, pDevice);
if (res != VK_SUCCESS)
return res;
{
std::lock_guard<std::mutex> holder{globalLock};
auto *device = createLayerData(getDispatchKey(*pDevice), deviceData);
device->init(gpu, *pDevice, layer, fpGetDeviceProcAddr);
}
return VK_SUCCESS;
} | O2 | cpp | CreateDevice(VkPhysicalDevice_T*, VkDeviceCreateInfo const*, VkAllocationCallbacks const*, VkDevice_T**):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x30(%rbp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
callq 0xab3a9
movq %rax, %r15
movq %r13, %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0xaaf96
cmpl $0x30, (%rax)
jne 0xaaf82
cmpl $0x0, 0x10(%rax)
jne 0xaaf82
movq 0x18(%rax), %rcx
movq (%rcx), %rdx
movq 0x10(%rcx), %r14
movq 0x10(%r15), %r8
movq %rdx, 0x18(%rax)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq -0x30(%rbp), %r13
movq %r13, %rcx
callq *%r8
movl %eax, %r12d
testl %eax, %eax
jne 0xab091
movq %r14, -0x40(%rbp)
movq %r15, -0x48(%rbp)
leaq 0x50b972(%rip), %rdi # 0x5b6948
callq 0xa5b90
movq (%r13), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movl $0xb8, %edi
callq 0xa2f30
movq %rax, %r13
movq %rax, %r15
addq $0xb0, %r15
movl $0xa8, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0xa1780
movq %r15, 0x80(%r13)
movq $0x1, 0x88(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%r13)
movl $0x3f800000, 0xa0(%r13) # imm = 0x3F800000
movups %xmm0, 0xa8(%r13)
movq %r13, -0x38(%rbp)
leaq 0x50b8c9(%rip), %rdi # 0x5b6910
leaq -0x50(%rbp), %rsi
callq 0xaebd2
leaq -0x38(%rbp), %r14
andq $0x0, (%r14)
movq %rax, %rdi
movq %r13, %rsi
callq 0xaef68
movq %r14, %rdi
callq 0xae4f8
movq -0x30(%rbp), %rax
movq (%rax), %rdx
movq %r13, %rdi
movq %rbx, %rsi
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
callq 0xaab68
leaq 0x50b8bc(%rip), %rdi # 0x5b6948
callq 0xa2180
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0xae4f8
jmp 0xab0b4
movq %rax, %rbx
leaq 0x50b88d(%rip), %rdi # 0x5b6948
callq 0xa2180
movq %rbx, %rdi
callq 0xa55e0
| _ZL12CreateDeviceP18VkPhysicalDevice_TPK18VkDeviceCreateInfoPK21VkAllocationCallbacksPP10VkDevice_T:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_30], rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
call _ZL16getInstanceLayerP18VkPhysicalDevice_T; getInstanceLayer(VkPhysicalDevice_T *)
mov r15, rax
mov rax, r13
loc_AAF82:
mov rax, [rax+8]
test rax, rax
jz short loc_AAF96
cmp dword ptr [rax], 30h ; '0'
jnz short loc_AAF82
cmp dword ptr [rax+10h], 0
jnz short loc_AAF82
loc_AAF96:
mov rcx, [rax+18h]
mov rdx, [rcx]
mov r14, [rcx+10h]
mov r8, [r15+10h]
mov [rax+18h], rdx
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov r13, [rbp+var_30]
mov rcx, r13
call r8
mov r12d, eax
test eax, eax
jnz loc_AB091
mov [rbp+var_40], r14
mov [rbp+var_48], r15
lea rdi, _ZL10globalLock; this
call __ZNSt5mutex4lockEv; std::mutex::lock(void)
mov rax, [r13+0]
mov rax, [rax]
mov [rbp+var_50], rax
mov edi, 0B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov r15, rax
add r15, 0B0h
mov edx, 0A8h
mov rdi, rax
xor esi, esi
call _memset
mov [r13+80h], r15
mov qword ptr [r13+88h], 1
xorps xmm0, xmm0
movups xmmword ptr [r13+90h], xmm0
mov dword ptr [r13+0A0h], 3F800000h
movups xmmword ptr [r13+0A8h], xmm0
mov [rbp+var_38], r13
lea rdi, _ZL10deviceData; deviceData
lea rsi, [rbp+var_50]
call _ZNSt8__detail9_Map_baseIPvSt4pairIKS1_St10unique_ptrI6DeviceSt14default_deleteIS5_EEESaIS9_ENS_10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS3_; std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Device>>,std::allocator<std::pair<void * const,std::unique_ptr<Device>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](void * const&)
lea r14, [rbp+var_38]
and qword ptr [r14], 0
mov rdi, rax
mov rsi, r13
call _ZNSt15__uniq_ptr_implI6DeviceSt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<Device,std::default_delete<Device>>::reset(Device*)
mov rdi, r14
call _ZNSt10unique_ptrI6DeviceSt14default_deleteIS0_EED2Ev; std::unique_ptr<Device>::~unique_ptr()
mov rax, [rbp+var_30]
mov rdx, [rax]
mov rdi, r13
mov rsi, rbx
mov rcx, [rbp+var_48]
mov r8, [rbp+var_40]
call _ZN6Device4initEP18VkPhysicalDevice_TP10VkDevice_TP8InstancePFPFvvES3_PKcE; Device::init(VkPhysicalDevice_T *,VkDevice_T *,Instance *,void (*)(void) (*)(VkDevice_T *,char const*))
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
loc_AB091:
mov eax, r12d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rbp+var_38]
call _ZNSt10unique_ptrI6DeviceSt14default_deleteIS0_EED2Ev; std::unique_ptr<Device>::~unique_ptr()
jmp short loc_AB0B4
mov rbx, rax
loc_AB0B4:
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long CreateDevice(long long a1, long long a2, long long a3, long long *a4)
{
long long InstanceLayer; // r15
long long v6; // rax
_QWORD *v7; // rcx
long long v8; // r14
long long ( *v9)(long long, long long, long long, long long *); // r8
unsigned int v10; // r12d
long long v11; // r13
long long v12; // rax
long long v14; // [rsp+0h] [rbp-50h] BYREF
long long v15; // [rsp+8h] [rbp-48h]
long long v16; // [rsp+10h] [rbp-40h]
long long v17; // [rsp+18h] [rbp-38h] BYREF
long long *v18; // [rsp+20h] [rbp-30h]
v18 = a4;
InstanceLayer = getInstanceLayer();
v6 = a2;
do
v6 = *(_QWORD *)(v6 + 8);
while ( v6 && (*(_DWORD *)v6 != 48 || *(_DWORD *)(v6 + 16)) );
v7 = *(_QWORD **)(v6 + 24);
v8 = v7[2];
v9 = *(long long ( **)(long long, long long, long long, long long *))(InstanceLayer + 16);
*(_QWORD *)(v6 + 24) = *v7;
v10 = v9(a1, a2, a3, v18);
if ( !v10 )
{
v16 = v8;
v15 = InstanceLayer;
std::mutex::lock((std::mutex *)&globalLock);
v14 = *(_QWORD *)*v18;
v11 = operator new(0xB8uLL);
memset(v11, 0LL, 168LL);
*(_QWORD *)(v11 + 128) = v11 + 176;
*(_QWORD *)(v11 + 136) = 1LL;
*(_OWORD *)(v11 + 144) = 0LL;
*(_DWORD *)(v11 + 160) = 1065353216;
*(_OWORD *)(v11 + 168) = 0LL;
v17 = v11;
v12 = std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Device>>,std::allocator<std::pair<void * const,std::unique_ptr<Device>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
&deviceData,
&v14);
v17 = 0LL;
std::__uniq_ptr_impl<Device,std::default_delete<Device>>::reset(v12, v11);
std::unique_ptr<Device>::~unique_ptr(&v17);
Device::init((_QWORD *)v11, a1, *v18, v15, v16);
pthread_mutex_unlock(&globalLock);
}
return v10;
}
| CreateDevice:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x30],RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
CALL 0x001ab3a9
MOV R15,RAX
MOV RAX,R13
LAB_001aaf82:
MOV RAX,qword ptr [RAX + 0x8]
TEST RAX,RAX
JZ 0x001aaf96
CMP dword ptr [RAX],0x30
JNZ 0x001aaf82
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x001aaf82
LAB_001aaf96:
MOV RCX,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RCX]
MOV R14,qword ptr [RCX + 0x10]
MOV R8,qword ptr [R15 + 0x10]
MOV qword ptr [RAX + 0x18],RDX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV R13,qword ptr [RBP + -0x30]
MOV RCX,R13
CALL R8
MOV R12D,EAX
TEST EAX,EAX
JNZ 0x001ab091
MOV qword ptr [RBP + -0x40],R14
MOV qword ptr [RBP + -0x48],R15
LEA RDI,[0x6b6948]
CALL 0x001a5b90
MOV RAX,qword ptr [R13]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
LAB_001aafe6:
MOV EDI,0xb8
CALL 0x001a2f30
LAB_001aaff0:
MOV R13,RAX
MOV R15,RAX
ADD R15,0xb0
MOV EDX,0xa8
MOV RDI,RAX
XOR ESI,ESI
CALL 0x001a1780
MOV qword ptr [R13 + 0x80],R15
MOV qword ptr [R13 + 0x88],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x90],XMM0
MOV dword ptr [R13 + 0xa0],0x3f800000
MOVUPS xmmword ptr [R13 + 0xa8],XMM0
MOV qword ptr [RBP + -0x38],R13
LAB_001ab040:
LEA RDI,[0x6b6910]
LEA RSI,[RBP + -0x50]
CALL 0x001aebd2
LEA R14,[RBP + -0x38]
AND qword ptr [R14],0x0
MOV RDI,RAX
MOV RSI,R13
CALL 0x001aef68
MOV RDI,R14
CALL 0x001ae4f8
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX]
LAB_001ab072:
MOV RDI,R13
MOV RSI,RBX
MOV RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x40]
CALL 0x001aab68
LAB_001ab085:
LEA RDI,[0x6b6948]
CALL 0x001a2180
LAB_001ab091:
MOV EAX,R12D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CreateDevice(VkPhysicalDevice_T*, VkDeviceCreateInfo const*, VkAllocationCallbacks const*,
VkDevice_T**) */
int CreateDevice(VkPhysicalDevice_T *param_1,VkDeviceCreateInfo *param_2,
VkAllocationCallbacks *param_3,VkDevice_T **param_4)
{
_func_void *p_Var1;
code *pcVar2;
VkDevice_T **ppVVar3;
int iVar4;
VkDeviceCreateInfo *pVVar5;
Device *this;
__uniq_ptr_impl<Device,std::default_delete<Device>> *this_00;
void *local_58;
Instance *local_50;
_func_void *local_48;
Device *local_40;
VkDevice_T **local_38;
local_38 = param_4;
local_50 = (Instance *)getInstanceLayer(param_1);
ppVVar3 = local_38;
pVVar5 = param_2;
do {
pVVar5 = *(VkDeviceCreateInfo **)(pVVar5 + 8);
if (pVVar5 == (VkDeviceCreateInfo *)0x0) break;
} while ((*(int *)pVVar5 != 0x30) || (*(int *)(pVVar5 + 0x10) != 0));
p_Var1 = (_func_void *)(*(int8 **)(pVVar5 + 0x18))[2];
pcVar2 = *(code **)(local_50 + 0x10);
*(int8 *)(pVVar5 + 0x18) = **(int8 **)(pVVar5 + 0x18);
iVar4 = (*pcVar2)(param_1,param_2,param_3,local_38);
if (iVar4 == 0) {
local_48 = p_Var1;
std::mutex::lock((mutex *)globalLock);
local_58 = *(void **)*ppVVar3;
/* try { // try from 001aafe6 to 001aafef has its CatchHandler @ 001ab0b1 */
this = (Device *)operator_new(0xb8);
memset(this,0,0xa8);
*(Device **)(this + 0x80) = this + 0xb0;
*(int8 *)(this + 0x88) = 1;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
*(int4 *)(this + 0xa0) = 0x3f800000;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
/* try { // try from 001ab040 to 001ab04f has its CatchHandler @ 001ab0a3 */
local_40 = this;
this_00 = (__uniq_ptr_impl<Device,std::default_delete<Device>> *)
std::__detail::
_Map_base<void*,std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>,std::allocator<std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<void*,std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>,std::allocator<std::pair<void*const,std::unique_ptr<Device,std::default_delete<Device>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)deviceData,&local_58);
local_40 = (Device *)0x0;
std::__uniq_ptr_impl<Device,std::default_delete<Device>>::reset(this_00,this);
std::unique_ptr<Device,std::default_delete<Device>>::~unique_ptr
((unique_ptr<Device,std::default_delete<Device>> *)&local_40);
/* try { // try from 001ab072 to 001ab084 has its CatchHandler @ 001ab0b1 */
Device::init(this,param_1,*local_38,local_50,local_48);
pthread_mutex_unlock((pthread_mutex_t *)globalLock);
}
return iVar4;
}
| |
45,988 | mysql_stmt_store_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_store_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_store_result,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
} | O0 | c | mysql_stmt_store_result_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2c070
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_store_result_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_stmt_store_result
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_stmt_store_result_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
v2[2] = mysql_stmt_store_result(*a1);
result = v2;
*v2 = 0;
return result;
}
| mysql_stmt_store_result_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0012c070
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_store_result_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_store_result(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
45,989 | vec_zero | corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/vect.h | static inline void vec_zero(void *ret, size_t num)
{
volatile limb_t *rp = (volatile limb_t *)ret;
size_t i;
num /= sizeof(limb_t);
for (i = 0; i < num; i++)
rp[i] = 0;
#if defined(__GNUC__) || defined(__clang__)
__asm__ __volatile__("" : : "r"(ret) : "memory");
#endif
} | O2 | c | vec_zero:
shrq $0x3, %rsi
xorl %eax, %eax
cmpq %rax, %rsi
je 0x50ebe
movq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x50eac
pushq %rbp
movq %rsp, %rbp
popq %rbp
retq
| vec_zero:
shr rsi, 3
xor eax, eax
loc_50EAC:
cmp rsi, rax
jz short loc_50EBE
mov qword ptr [rdi+rax*8], 0
inc rax
jmp short loc_50EAC
loc_50EBE:
push rbp
mov rbp, rsp
pop rbp
retn
| long long vec_zero(long long a1, unsigned long long a2)
{
unsigned long long v2; // rsi
long long result; // rax
v2 = a2 >> 3;
for ( result = 0LL; v2 != result; ++result )
*(_QWORD *)(a1 + 8 * result) = 0LL;
return result;
}
| vec_zero:
SHR RSI,0x3
XOR EAX,EAX
LAB_00150eac:
CMP RSI,RAX
JZ 0x00150ebe
MOV qword ptr [RDI + RAX*0x8],0x0
INC RAX
JMP 0x00150eac
LAB_00150ebe:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
void vec_zero(long param_1,ulong param_2)
{
ulong uVar1;
for (uVar1 = 0; param_2 >> 3 != uVar1; uVar1 = uVar1 + 1) {
*(int8 *)(param_1 + uVar1 * 8) = 0;
}
return;
}
| |
45,990 | mthd_my_skip_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void mthd_my_skip_result(MYSQL *mysql)
{
ulong pkt_len;
do {
pkt_len= ma_net_safe_read(mysql);
if (pkt_len == packet_error)
break;
} while (pkt_len > 8 || mysql->net.read_pos[0] != 254);
return;
} | O3 | c | mthd_my_skip_result:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x18ed3
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq %r14, %rax
je 0x19b89
cmpq $0x8, %rax
ja 0x19b7f
movq 0x20(%rbx), %rax
cmpb $-0x2, (%rax)
je 0x19b89
movq %rbx, %rdi
callq 0x18ed3
jmp 0x19b6b
popq %rbx
popq %r14
popq %rbp
retq
| mthd_my_skip_result:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call ma_net_safe_read
mov r14d, 0FFFFFFFFh
loc_19B6B:
cmp rax, r14
jz short loc_19B89
cmp rax, 8
ja short loc_19B7F
mov rax, [rbx+20h]
cmp byte ptr [rax], 0FEh
jz short loc_19B89
loc_19B7F:
mov rdi, rbx
call ma_net_safe_read
jmp short loc_19B6B
loc_19B89:
pop rbx
pop r14
pop rbp
retn
| _BYTE * mthd_my_skip_result(long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6)
{
_BYTE *result; // rax
while ( 1 )
{
result = (_BYTE *)ma_net_safe_read(a1, a2, a3, a4, a5, a6);
if ( result == (_BYTE *)0xFFFFFFFFLL )
break;
if ( (unsigned long long)result <= 8 )
{
result = *(_BYTE **)(a1 + 32);
if ( *result == 0xFE )
break;
}
}
return result;
}
| mthd_my_skip_result:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00118ed3
MOV R14D,0xffffffff
LAB_00119b6b:
CMP RAX,R14
JZ 0x00119b89
CMP RAX,0x8
JA 0x00119b7f
MOV RAX,qword ptr [RBX + 0x20]
CMP byte ptr [RAX],0xfe
JZ 0x00119b89
LAB_00119b7f:
MOV RDI,RBX
CALL 0x00118ed3
JMP 0x00119b6b
LAB_00119b89:
POP RBX
POP R14
POP RBP
RET
|
void mthd_my_skip_result(long param_1)
{
ulong uVar1;
uVar1 = ma_net_safe_read();
while ((uVar1 != 0xffffffff && ((8 < uVar1 || (**(char **)(param_1 + 0x20) != -2))))) {
uVar1 = ma_net_safe_read(param_1);
}
return;
}
| |
45,991 | common_sampler_types_from_names(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<common_sampler_type> common_sampler_types_from_names(const std::vector<std::string> & names, bool allow_alt_names) {
std::unordered_map<std::string, common_sampler_type> sampler_canonical_name_map {
{ "dry", COMMON_SAMPLER_TYPE_DRY },
{ "top_k", COMMON_SAMPLER_TYPE_TOP_K },
{ "top_p", COMMON_SAMPLER_TYPE_TOP_P },
{ "typ_p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "min_p", COMMON_SAMPLER_TYPE_MIN_P },
{ "temperature", COMMON_SAMPLER_TYPE_TEMPERATURE },
{ "xtc", COMMON_SAMPLER_TYPE_XTC },
{ "infill", COMMON_SAMPLER_TYPE_INFILL },
{ "penalties", COMMON_SAMPLER_TYPE_PENALTIES },
};
// since samplers names are written multiple ways
// make it ready for both system names and input names
std::unordered_map<std::string, common_sampler_type> sampler_alt_name_map {
{ "top-k", COMMON_SAMPLER_TYPE_TOP_K },
{ "top-p", COMMON_SAMPLER_TYPE_TOP_P },
{ "nucleus", COMMON_SAMPLER_TYPE_TOP_P },
{ "typical-p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typical", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typ-p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typ", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "min-p", COMMON_SAMPLER_TYPE_MIN_P },
{ "temp", COMMON_SAMPLER_TYPE_TEMPERATURE },
};
std::vector<common_sampler_type> samplers;
samplers.reserve(names.size());
for (const auto & name : names) {
auto sampler = sampler_canonical_name_map.find(name);
if (sampler != sampler_canonical_name_map.end()) {
samplers.push_back(sampler->second);
} else {
if (allow_alt_names) {
sampler = sampler_alt_name_map.find(name);
if (sampler != sampler_alt_name_map.end()) {
samplers.push_back(sampler->second);
}
}
}
}
return samplers;
} | O2 | cpp | common_sampler_types_from_names(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x22706(%rip), %rsi # 0xd695b
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xb4b38
leaq 0x90(%rsp), %r12
leaq 0x2c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x226e3(%rip), %rsi # 0xd695f
movq %r12, %rdi
callq 0xb4b5a
leaq 0xb8(%rsp), %r12
leaq 0x28(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x226cd(%rip), %rsi # 0xd696b
movq %r12, %rdi
callq 0xb4b5a
leaq 0xe0(%rsp), %r12
leaq 0x24(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x226a5(%rip), %rsi # 0xd6965
movq %r12, %rdi
callq 0xb4b5a
leaq 0x108(%rsp), %r12
leaq 0x20(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x2268f(%rip), %rsi # 0xd6971
movq %r12, %rdi
callq 0xb4b5a
leaq 0x130(%rsp), %r12
leaq 0x1c(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x22673(%rip), %rsi # 0xd6977
movq %r12, %rdi
callq 0xb4b7c
leaq 0x158(%rsp), %r12
leaq 0x18(%rsp), %rdx
movl $0x8, (%rdx)
leaq 0x2265d(%rip), %rsi # 0xd6983
movq %r12, %rdi
callq 0xb4b38
leaq 0x180(%rsp), %r12
leaq 0x14(%rsp), %rdx
movl $0x9, (%rdx)
leaq 0x15c04(%rip), %rsi # 0xc9f4c
movq %r12, %rdi
callq 0xb4b9e
leaq 0x1a8(%rsp), %r12
leaq 0x10(%rsp), %rdx
movl $0xa, (%rdx)
leaq 0x2261d(%rip), %rsi # 0xd6987
movq %r12, %rdi
callq 0xb4bc0
leaq 0x1d0(%rsp), %rdx
leaq 0x9(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xc(%rsp), %r8
leaq 0xa(%rsp), %r9
xorl %ecx, %ecx
callq 0xb51cc
movl $0x140, %r15d # imm = 0x140
leaq (%rsp,%r15), %rdi
addq $0x68, %rdi
callq 0x27998
addq $-0x28, %r15
cmpq $-0x28, %r15
jne 0xb43a7
leaq 0x2c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x15d8f(%rip), %rsi # 0xca15f
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xb4b5a
leaq 0x90(%rsp), %r12
leaq 0x28(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x15d9b(%rip), %rsi # 0xca192
movq %r12, %rdi
callq 0xb4b5a
leaq 0xb8(%rsp), %r12
leaq 0x24(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x22578(%rip), %rsi # 0xd6991
movq %r12, %rdi
callq 0xb4be2
leaq 0xe0(%rsp), %r12
leaq 0x20(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x2255e(%rip), %rsi # 0xd6999
movq %r12, %rdi
callq 0xb4bc0
leaq 0x108(%rsp), %r12
leaq 0x1c(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x15e23(%rip), %rsi # 0xca280
movq %r12, %rdi
callq 0xb4be2
leaq 0x130(%rsp), %r12
leaq 0x18(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x22524(%rip), %rsi # 0xd69a3
movq %r12, %rdi
callq 0xb4b5a
leaq 0x158(%rsp), %r12
leaq 0x14(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x22508(%rip), %rsi # 0xd69a9
movq %r12, %rdi
callq 0xb4b38
leaq 0x180(%rsp), %r12
leaq 0x10(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x15d06(%rip), %rsi # 0xca1c9
movq %r12, %rdi
callq 0xb4b5a
leaq 0x1a8(%rsp), %r12
leaq 0xc(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x15c57(%rip), %rsi # 0xca13c
movq %r12, %rdi
callq 0xb4c04
leaq 0x1d0(%rsp), %rdx
leaq 0xb(%rsp), %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xa(%rsp), %r8
leaq 0x9(%rsp), %r9
xorl %ecx, %ecx
callq 0xb51cc
movl $0x140, %r15d # imm = 0x140
leaq (%rsp,%r15), %rdi
addq $0x68, %rdi
callq 0x27998
addq $-0x28, %r15
cmpq $-0x28, %r15
jne 0xb451f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0xb4c26
movq (%r14), %r15
movq 0x8(%r14), %r13
leaq 0x1d0(%rsp), %r14
leaq 0x30(%rsp), %r12
cmpq %r13, %r15
je 0xb45a9
movq %r14, %rdi
movq %r15, %rsi
callq 0xb5694
testq %rax, %rax
je 0xb458e
addq $0x28, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb4cbc
jmp 0xb45a3
testb %bpl, %bpl
je 0xb45a3
movq %r12, %rdi
movq %r15, %rsi
callq 0xb5694
testq %rax, %rax
jne 0xb457d
addq $0x20, %r15
jmp 0xb4568
leaq 0x30(%rsp), %rdi
callq 0xb4f40
leaq 0x1d0(%rsp), %rdi
callq 0xb4f40
movq %rbx, %rax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb469c
movq %rax, %r14
movl $0x140, %ebx # imm = 0x140
leaq (%rsp,%rbx), %rdi
addq $0x68, %rdi
callq 0x27998
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0xb45e2
movb $0x1, %al
jmp 0xb4610
jmp 0xb460b
jmp 0xb460b
jmp 0xb460b
jmp 0xb460b
jmp 0xb460b
jmp 0xb460b
jmp 0xb460b
movq %rax, %r14
xorl %eax, %eax
cmpq %r12, %r15
sete %cl
testb %al, %al
jne 0xb46b1
testb %cl, %cl
jne 0xb46b1
addq $-0x28, %r12
movq %r12, %rdi
callq 0x27998
cmpq %r15, %r12
jne 0xb4626
jmp 0xb46b1
movq %rax, %r14
jmp 0xb46b1
movq %rax, %r14
movl $0x140, %ebx # imm = 0x140
leaq (%rsp,%rbx), %rdi
addq $0x68, %rdi
callq 0x27998
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0xb4646
movb $0x1, %al
jmp 0xb4674
jmp 0xb466f
jmp 0xb466f
jmp 0xb466f
jmp 0xb466f
jmp 0xb466f
jmp 0xb466f
jmp 0xb466f
movq %rax, %r14
xorl %eax, %eax
cmpq %r12, %r15
sete %cl
testb %al, %al
jne 0xb46be
testb %cl, %cl
jne 0xb46be
addq $-0x28, %r12
movq %r12, %rdi
callq 0x27998
cmpq %r15, %r12
jne 0xb4682
jmp 0xb46be
movq %rax, %r14
jmp 0xb46be
jmp 0xb469c
movq %rax, %r14
movq %rbx, %rdi
callq 0x2b600
leaq 0x30(%rsp), %rdi
callq 0xb4f40
leaq 0x1d0(%rsp), %rdi
callq 0xb4f40
movq %r14, %rdi
callq 0x27660
| _Z31common_sampler_types_from_namesRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rdx, [rsp+238h+var_208]
mov dword ptr [rdx], 1
lea rsi, aDry; "dry"
lea r15, [rsp+238h+var_1D0]
mov rdi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_1A8]
lea rdx, [rsp+238h+var_20C]
mov dword ptr [rdx], 2
lea rsi, aTopK_0; "top_k"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_180]
lea rdx, [rsp+238h+var_210]
mov dword ptr [rdx], 3
lea rsi, aTopP_0; "top_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_158]
lea rdx, [rsp+238h+var_214]
mov dword ptr [rdx], 6
lea rsi, aTypP; "typ_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_130]
lea rdx, [rsp+238h+var_218]
mov dword ptr [rdx], 4
lea rsi, aMinP_0; "min_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_108]
lea rdx, [rsp+238h+var_21C]
mov dword ptr [rdx], 7
lea rsi, aTemperature; "temperature"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_E0]
lea rdx, [rsp+238h+var_220]
mov dword ptr [rdx], 8
lea rsi, aXtc; "xtc"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_B8]
lea rdx, [rsp+238h+var_224]
mov dword ptr [rdx], 9
lea rsi, aSpmInfill+6; "infill"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_90]
lea rdx, [rsp+238h+var_228]
mov dword ptr [rdx], 0Ah
lea rsi, aPenalties; "penalties"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea rdx, [rsp+238h+var_68]
lea rax, [rsp+238h+var_22F]
mov [rsp+238h+var_238], rax
lea rdi, [rsp+238h+var_68]
lea rsi, [rsp+238h+var_1D0]
lea r8, [rsp+238h+var_22C]
lea r9, [rsp+238h+var_22E]
xor ecx, ecx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>)
mov r15d, 140h
loc_B43A7:
lea rdi, [rsp+r15+238h+var_238]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r15, 0FFFFFFFFFFFFFFD8h
cmp r15, 0FFFFFFFFFFFFFFD8h
jnz short loc_B43A7
lea rdx, [rsp+238h+var_20C]
mov dword ptr [rdx], 2
lea rsi, aTopK+2; "top-k"
lea r15, [rsp+238h+var_1D0]
mov rdi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_1A8]
lea rdx, [rsp+238h+var_210]
mov dword ptr [rdx], 3
lea rsi, aTopP+2; "top-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_180]
lea rdx, [rsp+238h+var_214]
mov dword ptr [rdx], 3
lea rsi, aNucleus; "nucleus"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_158]
lea rdx, [rsp+238h+var_218]
mov dword ptr [rdx], 6
lea rsi, aTypicalP; "typical-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_130]
lea rdx, [rsp+238h+var_21C]
mov dword ptr [rdx], 6
lea rsi, aTypical+2; "typical"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_108]
lea rdx, [rsp+238h+var_220]
mov dword ptr [rdx], 6
lea rsi, aTypP_0; "typ-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_E0]
lea rdx, [rsp+238h+var_224]
mov dword ptr [rdx], 6
lea rsi, aTyp; "typ"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_B8]
lea rdx, [rsp+238h+var_228]
mov dword ptr [rdx], 4
lea rsi, aMinP+2; "min-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_90]
lea rdx, [rsp+238h+var_22C]
mov dword ptr [rdx], 7
lea rsi, aTemp+2; "temp"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea rdx, [rsp+238h+var_68]
lea rax, [rsp+238h+var_22D]
mov [rsp+238h+var_238], rax
lea rdi, [rsp+238h+var_208]
lea rsi, [rsp+238h+var_1D0]
lea r8, [rsp+238h+var_22E]
lea r9, [rsp+238h+var_22F]
xor ecx, ecx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>)
mov r15d, 140h
loc_B451F:
lea rdi, [rsp+r15+238h+var_238]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r15, 0FFFFFFFFFFFFFFD8h
cmp r15, 0FFFFFFFFFFFFFFD8h
jnz short loc_B451F
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
and qword ptr [rbx+10h], 0
mov rsi, [r14+8]
sub rsi, [r14]
sar rsi, 5
mov rdi, rbx
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong)
mov r15, [r14]
mov r13, [r14+8]
lea r14, [rsp+238h+var_68]
lea r12, [rsp+238h+var_208]
loc_B4568:
cmp r15, r13
jz short loc_B45A9
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_B458E
loc_B457D:
add rax, 28h ; '('
mov rdi, rbx
mov rsi, rax
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE9push_backERKS0_; std::vector<common_sampler_type>::push_back(common_sampler_type const&)
jmp short loc_B45A3
loc_B458E:
test bpl, bpl
jz short loc_B45A3
mov rdi, r12
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jnz short loc_B457D
loc_B45A3:
add r15, 20h ; ' '
jmp short loc_B4568
loc_B45A9:
lea rdi, [rsp+238h+var_208]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+238h+var_68]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rax, rbx
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_B469C
mov r14, rax
mov ebx, 140h
loc_B45E2:
lea rdi, [rsp+rbx+0]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbx, 0FFFFFFFFFFFFFFD8h
cmp rbx, 0FFFFFFFFFFFFFFD8h
jnz short loc_B45E2
mov al, 1
jmp short loc_B4610
jmp short loc_B460B
jmp short loc_B460B
jmp short loc_B460B
jmp short loc_B460B
jmp short loc_B460B
jmp short loc_B460B
jmp short $+2
loc_B460B:
mov r14, rax
xor eax, eax
loc_B4610:
cmp r15, r12
setz cl
test al, al
jnz loc_B46B1
test cl, cl
jnz loc_B46B1
loc_B4626:
add r12, 0FFFFFFFFFFFFFFD8h
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r12, r15
jnz short loc_B4626
jmp short loc_B46B1
mov r14, rax
jmp short loc_B46B1
mov r14, rax
mov ebx, 140h
loc_B4646:
lea rdi, [rsp+rbx+0]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbx, 0FFFFFFFFFFFFFFD8h
cmp rbx, 0FFFFFFFFFFFFFFD8h
jnz short loc_B4646
mov al, 1
jmp short loc_B4674
jmp short loc_B466F
jmp short loc_B466F
jmp short loc_B466F
jmp short loc_B466F
jmp short loc_B466F
jmp short loc_B466F
jmp short $+2
loc_B466F:
mov r14, rax
xor eax, eax
loc_B4674:
cmp r15, r12
setz cl
test al, al
jnz short loc_B46BE
test cl, cl
jnz short loc_B46BE
loc_B4682:
add r12, 0FFFFFFFFFFFFFFD8h
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r12, r15
jnz short loc_B4682
jmp short loc_B46BE
mov r14, rax
jmp short loc_B46BE
jmp short $+2
loc_B469C:
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseI19common_sampler_typeSaIS0_EED2Ev; std::_Vector_base<common_sampler_type>::~_Vector_base()
lea rdi, [rsp+arg_28]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
loc_B46B1:
lea rdi, [rsp+arg_1C8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
loc_B46BE:
mov rdi, r14
call __Unwind_Resume
| long long common_sampler_types_from_names(long long a1, long long *a2, char a3)
{
long long i; // r15
long long j; // r15
long long v6; // r15
long long v7; // r13
long long v8; // rax
char v10; // [rsp+9h] [rbp-22Fh] BYREF
char v11; // [rsp+Ah] [rbp-22Eh] BYREF
char v12; // [rsp+Bh] [rbp-22Dh] BYREF
int v13; // [rsp+Ch] [rbp-22Ch] BYREF
int v14; // [rsp+10h] [rbp-228h] BYREF
int v15; // [rsp+14h] [rbp-224h] BYREF
int v16; // [rsp+18h] [rbp-220h] BYREF
int v17; // [rsp+1Ch] [rbp-21Ch] BYREF
int v18; // [rsp+20h] [rbp-218h] BYREF
int v19; // [rsp+24h] [rbp-214h] BYREF
int v20; // [rsp+28h] [rbp-210h] BYREF
int v21; // [rsp+2Ch] [rbp-20Ch] BYREF
_DWORD v22[14]; // [rsp+30h] [rbp-208h] BYREF
_BYTE v23[40]; // [rsp+68h] [rbp-1D0h] BYREF
_BYTE v24[40]; // [rsp+90h] [rbp-1A8h] BYREF
_BYTE v25[40]; // [rsp+B8h] [rbp-180h] BYREF
_BYTE v26[40]; // [rsp+E0h] [rbp-158h] BYREF
_BYTE v27[40]; // [rsp+108h] [rbp-130h] BYREF
_BYTE v28[40]; // [rsp+130h] [rbp-108h] BYREF
_BYTE v29[40]; // [rsp+158h] [rbp-E0h] BYREF
_BYTE v30[40]; // [rsp+180h] [rbp-B8h] BYREF
_BYTE v31[40]; // [rsp+1A8h] [rbp-90h] BYREF
_BYTE v32[104]; // [rsp+1D0h] [rbp-68h] BYREF
v22[0] = 1;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v23,
"dry",
v22);
v21 = 2;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v24,
"top_k",
&v21);
v20 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v25,
"top_p",
&v20);
v19 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v26,
"typ_p",
&v19);
v18 = 4;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v27,
"min_p",
&v18);
v17 = 7;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v28,
"temperature",
&v17);
v16 = 8;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v29,
"xtc",
&v16);
v15 = 9;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v30,
"infill",
&v15);
v14 = 10;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v31,
"penalties",
&v14);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(
(unsigned int)v32,
(unsigned int)v23,
(unsigned int)v32,
0,
(unsigned int)&v13,
(unsigned int)&v11,
(long long)&v10);
for ( i = 320LL; i != -40; i -= 40LL )
std::string::~string(&v23[i]);
v21 = 2;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v23,
"top-k",
&v21);
v20 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v24,
"top-p",
&v20);
v19 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v25,
"nucleus",
&v19);
v18 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v26,
"typical-p",
&v18);
v17 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v27,
"typical",
&v17);
v16 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v28,
"typ-p",
&v16);
v15 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v29,
"typ",
&v15);
v14 = 4;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v30,
"min-p",
&v14);
v13 = 7;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v31,
"temp",
&v13);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(
(unsigned int)v22,
(unsigned int)v23,
(unsigned int)v32,
0,
(unsigned int)&v11,
(unsigned int)&v10,
(long long)&v12);
for ( j = 320LL; j != -40; j -= 40LL )
std::string::~string(&v23[j]);
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::vector<common_sampler_type>::reserve(a1, (a2[1] - *a2) >> 5);
v6 = *a2;
v7 = a2[1];
while ( v6 != v7 )
{
v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v32,
v6);
if ( v8
|| a3
&& (v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v22,
v6)) != 0 )
{
std::vector<common_sampler_type>::push_back(a1, v8 + 40);
}
v6 += 32LL;
}
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v22);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v32);
return a1;
}
| common_sampler_types_from_names:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RDX,[RSP + 0x30]
MOV dword ptr [RDX],0x1
LAB_001b424e:
LEA RSI,[0x1d695b]
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x001b4b38
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x2c]
MOV dword ptr [RDX],0x2
LAB_001b4275:
LEA RSI,[0x1d695f]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0xb8]
LEA RDX,[RSP + 0x28]
MOV dword ptr [RDX],0x3
LAB_001b4297:
LEA RSI,[0x1d696b]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0xe0]
LEA RDX,[RSP + 0x24]
MOV dword ptr [RDX],0x6
LAB_001b42b9:
LEA RSI,[0x1d6965]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0x108]
LEA RDX,[RSP + 0x20]
MOV dword ptr [RDX],0x4
LAB_001b42db:
LEA RSI,[0x1d6971]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0x130]
LEA RDX,[RSP + 0x1c]
MOV dword ptr [RDX],0x7
LAB_001b42fd:
LEA RSI,[0x1d6977]
MOV RDI,R12
CALL 0x001b4b7c
LEA R12,[RSP + 0x158]
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],0x8
LAB_001b431f:
LEA RSI,[0x1d6983]
MOV RDI,R12
CALL 0x001b4b38
LEA R12,[RSP + 0x180]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],0x9
LAB_001b4341:
LEA RSI,[0x1c9f4c]
MOV RDI,R12
CALL 0x001b4b9e
LEA R12,[RSP + 0x1a8]
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0xa
LAB_001b4363:
LEA RSI,[0x1d6987]
MOV RDI,R12
CALL 0x001b4bc0
LEA RDX,[RSP + 0x1d0]
LAB_001b437a:
LEA RAX,[RSP + 0x9]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x1d0]
LEA RSI,[RSP + 0x68]
LEA R8,[RSP + 0xc]
LEA R9,[RSP + 0xa]
XOR ECX,ECX
CALL 0x001b51cc
MOV R15D,0x140
LAB_001b43a7:
LEA RDI,[RSP + R15*0x1]
ADD RDI,0x68
CALL 0x00127998
ADD R15,-0x28
CMP R15,-0x28
JNZ 0x001b43a7
LEA RDX,[RSP + 0x2c]
MOV dword ptr [RDX],0x2
LAB_001b43c9:
LEA RSI,[0x1ca15f]
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x001b4b5a
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x28]
MOV dword ptr [RDX],0x3
LAB_001b43f0:
LEA RSI,[0x1ca192]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0xb8]
LEA RDX,[RSP + 0x24]
MOV dword ptr [RDX],0x3
LAB_001b4412:
LEA RSI,[0x1d6991]
MOV RDI,R12
CALL 0x001b4be2
LEA R12,[RSP + 0xe0]
LEA RDX,[RSP + 0x20]
MOV dword ptr [RDX],0x6
LAB_001b4434:
LEA RSI,[0x1d6999]
MOV RDI,R12
CALL 0x001b4bc0
LEA R12,[RSP + 0x108]
LEA RDX,[RSP + 0x1c]
MOV dword ptr [RDX],0x6
LAB_001b4456:
LEA RSI,[0x1ca280]
MOV RDI,R12
CALL 0x001b4be2
LEA R12,[RSP + 0x130]
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],0x6
LAB_001b4478:
LEA RSI,[0x1d69a3]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0x158]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],0x6
LAB_001b449a:
LEA RSI,[0x1d69a9]
MOV RDI,R12
CALL 0x001b4b38
LEA R12,[RSP + 0x180]
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0x4
LAB_001b44bc:
LEA RSI,[0x1ca1c9]
MOV RDI,R12
CALL 0x001b4b5a
LEA R12,[RSP + 0x1a8]
LEA RDX,[RSP + 0xc]
MOV dword ptr [RDX],0x7
LAB_001b44de:
LEA RSI,[0x1ca13c]
MOV RDI,R12
CALL 0x001b4c04
LEA RDX,[RSP + 0x1d0]
LAB_001b44f5:
LEA RAX,[RSP + 0xb]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x68]
LEA R8,[RSP + 0xa]
LEA R9,[RSP + 0x9]
XOR ECX,ECX
CALL 0x001b51cc
MOV R15D,0x140
LAB_001b451f:
LEA RDI,[RSP + R15*0x1]
ADD RDI,0x68
CALL 0x00127998
ADD R15,-0x28
CMP R15,-0x28
JNZ 0x001b451f
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [R14 + 0x8]
SUB RSI,qword ptr [R14]
SAR RSI,0x5
LAB_001b454c:
MOV RDI,RBX
CALL 0x001b4c26
MOV R15,qword ptr [R14]
MOV R13,qword ptr [R14 + 0x8]
LEA R14,[RSP + 0x1d0]
LEA R12,[RSP + 0x30]
LAB_001b4568:
CMP R15,R13
JZ 0x001b45a9
LAB_001b456d:
MOV RDI,R14
MOV RSI,R15
CALL 0x001b5694
TEST RAX,RAX
JZ 0x001b458e
LAB_001b457d:
ADD RAX,0x28
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001b4cbc
JMP 0x001b45a3
LAB_001b458e:
TEST BPL,BPL
JZ 0x001b45a3
LAB_001b4593:
MOV RDI,R12
MOV RSI,R15
CALL 0x001b5694
LAB_001b459e:
TEST RAX,RAX
JNZ 0x001b457d
LAB_001b45a3:
ADD R15,0x20
JMP 0x001b4568
LAB_001b45a9:
LEA RDI,[RSP + 0x30]
CALL 0x001b4f40
LEA RDI,[RSP + 0x1d0]
CALL 0x001b4f40
MOV RAX,RBX
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_sampler_types_from_names(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, bool) */
vector * common_sampler_types_from_names(vector *param_1,bool param_2)
{
string *psVar1;
char in_DL;
int7 in_register_00000031;
long *plVar2;
long lVar3;
string *psVar4;
int1 local_22f;
int1 local_22e;
int1 local_22d;
int4 local_22c;
int4 local_228;
int4 local_224;
int4 local_220;
int4 local_21c;
int4 local_218;
int4 local_214;
int4 local_210;
int4 local_20c;
int4 local_208 [14];
string local_1d0 [40];
int1 local_1a8 [40];
int1 local_180 [40];
int1 local_158 [40];
int1 local_130 [40];
int1 local_108 [40];
int1 local_e0 [40];
int1 local_b8 [40];
int1 local_90 [40];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_68 [56];
plVar2 = (long *)CONCAT71(in_register_00000031,param_2);
local_208[0] = 1;
/* try { // try from 001b424e to 001b4261 has its CatchHandler @ 001b4695 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1d0,&DAT_001d695b);
local_20c = 2;
/* try { // try from 001b4275 to 001b4283 has its CatchHandler @ 001b466f */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1a8,"top_k");
local_210 = 3;
/* try { // try from 001b4297 to 001b42a5 has its CatchHandler @ 001b466d */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_180,"top_p");
local_214 = 6;
/* try { // try from 001b42b9 to 001b42c7 has its CatchHandler @ 001b466b */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_158,"typ_p");
local_218 = 4;
/* try { // try from 001b42db to 001b42e9 has its CatchHandler @ 001b4669 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_130,"min_p");
local_21c = 7;
/* try { // try from 001b42fd to 001b430b has its CatchHandler @ 001b4667 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_108,"temperature");
local_220 = 8;
/* try { // try from 001b431f to 001b432d has its CatchHandler @ 001b4665 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_e0,&DAT_001d6983);
local_224 = 9;
/* try { // try from 001b4341 to 001b434f has its CatchHandler @ 001b4663 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_b8,"infill");
local_228 = 10;
/* try { // try from 001b4363 to 001b4371 has its CatchHandler @ 001b4661 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_90,"penalties");
/* try { // try from 001b437a to 001b43a0 has its CatchHandler @ 001b463e */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*>
(local_68,local_1d0,local_68,0,&local_22c,&local_22e,&local_22f);
lVar3 = 0x140;
do {
std::__cxx11::string::~string(local_1d0 + lVar3);
lVar3 = lVar3 + -0x28;
} while (lVar3 != -0x28);
local_20c = 2;
/* try { // try from 001b43c9 to 001b43dc has its CatchHandler @ 001b4639 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1d0,"top-k");
local_210 = 3;
/* try { // try from 001b43f0 to 001b43fe has its CatchHandler @ 001b460b */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1a8,"top-p");
local_214 = 3;
/* try { // try from 001b4412 to 001b4420 has its CatchHandler @ 001b4609 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_180,"nucleus");
local_218 = 6;
/* try { // try from 001b4434 to 001b4442 has its CatchHandler @ 001b4607 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_158,"typical-p");
local_21c = 6;
/* try { // try from 001b4456 to 001b4464 has its CatchHandler @ 001b4605 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_130,"typical");
local_220 = 6;
/* try { // try from 001b4478 to 001b4486 has its CatchHandler @ 001b4603 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_108,"typ-p");
local_224 = 6;
/* try { // try from 001b449a to 001b44a8 has its CatchHandler @ 001b4601 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_e0,&DAT_001d69a9);
local_228 = 4;
/* try { // try from 001b44bc to 001b44ca has its CatchHandler @ 001b45ff */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_b8,"min-p");
local_22c = 7;
/* try { // try from 001b44de to 001b44ec has its CatchHandler @ 001b45fd */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_90,"temp");
/* try { // try from 001b44f5 to 001b4518 has its CatchHandler @ 001b45da */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*>
(local_208,local_1d0,local_68,0,&local_22e,&local_22f,&local_22d);
lVar3 = 0x140;
do {
std::__cxx11::string::~string(local_1d0 + lVar3);
lVar3 = lVar3 + -0x28;
} while (lVar3 != -0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 001b454c to 001b4553 has its CatchHandler @ 001b45d5 */
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
plVar2[1] - *plVar2 >> 5);
psVar4 = (string *)*plVar2;
psVar1 = (string *)plVar2[1];
do {
if (psVar4 == psVar1) {
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)local_208);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_68);
return param_1;
}
/* try { // try from 001b456d to 001b458b has its CatchHandler @ 001b469c */
lVar3 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find(local_68,psVar4);
if (lVar3 == 0) {
if (in_DL != '\0') {
/* try { // try from 001b4593 to 001b459d has its CatchHandler @ 001b469a */
lVar3 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)local_208,psVar4);
if (lVar3 != 0) goto LAB_001b457d;
}
}
else {
LAB_001b457d:
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::push_back
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
(common_sampler_type *)(lVar3 + 0x28));
}
psVar4 = psVar4 + 0x20;
} while( true );
}
| |
45,992 | ma_log_suffix | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_log_suffix(MARIA_PAGE *ma_page, uint org_length, uint new_length)
{
LSN lsn;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 10 + 7 + 2], *log_pos;
uchar *buff= ma_page->buff;
int diff;
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
pgcache_page_no_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_suffix");
DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u",
(ulong) page, org_length, new_length));
DBUG_ASSERT(ma_page->size == new_length);
DBUG_ASSERT(ma_page->org_size == org_length);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
if ((diff= (int) (new_length - org_length)) < 0)
{
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, -diff);
log_pos+= 3;
translog_parts= 1;
extra_length= 0;
}
else
{
log_pos[0]= KEY_OP_ADD_SUFFIX;
int2store(log_pos+1, diff);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= buff + org_length;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (uint) diff;
translog_parts= 2;
extra_length= (uint) diff;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
} | O0 | c | ma_log_suffix:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xd8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xe0(%rbp)
jmp 0x70a65
jmp 0x70a67
jmp 0x70a69
jmp 0x70a6b
jmp 0x70a6d
leaq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rax
movl %eax, %ecx
movq -0xe8(%rbp), %rax
movl %ecx, (%rax)
movq -0xe0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xe8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0xb8(%rbp), %rax
addq $0x5, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xb8(%rbp)
movb $0xa, (%rax)
movq -0xc0(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq -0xb8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xb8(%rbp)
movb %cl, (%rax)
movl -0x40(%rbp), %eax
subl -0x3c(%rbp), %eax
movl %eax, -0xc4(%rbp)
cmpl $0x0, %eax
jge 0x70b80
movq -0xb8(%rbp), %rax
movb $0x7, (%rax)
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
xorl %eax, %eax
subl -0xc4(%rbp), %eax
movw %ax, %cx
movq -0xf0(%rbp), %rax
movw %cx, (%rax)
movq -0xb8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xb8(%rbp)
movl $0x1, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
jmp 0x70bf2
movq -0xb8(%rbp), %rax
movb $0x6, (%rax)
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
movl -0xc4(%rbp), %eax
movw %ax, %cx
movq -0xf8(%rbp), %rax
movw %cx, (%rax)
movq -0xb8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movl -0x3c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl -0xc4(%rbp), %eax
movq %rax, -0x78(%rbp)
movl $0x2, -0xc8(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0xcc(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xb8(%rbp), %rax
leaq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xd8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xd8(%rbp), %rcx
movq -0x88(%rbp), %rax
movl %eax, %r8d
addl -0xcc(%rbp), %r8d
movl -0xc8(%rbp), %r9d
addl $0x2, %r9d
leaq -0xb0(%rbp), %r10
leaq -0x30(%rbp), %rax
leaq -0x48(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x53ff0
movb %al, -0xf9(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x70ca5
movb -0xf9(%rbp), %al
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| _ma_log_suffix:
push rbp
mov rbp, rsp
sub rsp, 120h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_40], edx
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov [rbp+var_C0], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_D8], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov rcx, [rbp+var_D8]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_E0], rax
jmp short $+2
loc_70A65:
jmp short $+2
loc_70A67:
jmp short $+2
loc_70A69:
jmp short $+2
loc_70A6B:
jmp short $+2
loc_70A6D:
lea rax, [rbp+var_30]
add rax, 2
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov [rbp+var_E8], rax
mov rax, [rbp+var_E0]
mov ecx, eax
mov rax, [rbp+var_E8]
mov [rax], ecx
mov rax, [rbp+var_E0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_E8]
mov [rax+4], cl
mov rax, [rbp+var_B8]
add rax, 5
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov rcx, rax
add rcx, 1
mov [rbp+var_B8], rcx
mov byte ptr [rax], 0Ah
mov rax, [rbp+var_C0]
mov rcx, [rbp+var_D8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov cl, [rax+rcx]
mov rax, [rbp+var_B8]
mov rdx, rax
add rdx, 1
mov [rbp+var_B8], rdx
mov [rax], cl
mov eax, [rbp+var_40]
sub eax, [rbp+var_3C]
mov [rbp+var_C4], eax
cmp eax, 0
jge short loc_70B80
mov rax, [rbp+var_B8]
mov byte ptr [rax], 7
mov rax, [rbp+var_B8]
add rax, 1
mov [rbp+var_F0], rax
xor eax, eax
sub eax, [rbp+var_C4]
mov cx, ax
mov rax, [rbp+var_F0]
mov [rax], cx
mov rax, [rbp+var_B8]
add rax, 3
mov [rbp+var_B8], rax
mov [rbp+var_C8], 1
mov [rbp+var_CC], 0
jmp short loc_70BF2
loc_70B80:
mov rax, [rbp+var_B8]
mov byte ptr [rax], 6
mov rax, [rbp+var_B8]
add rax, 1
mov [rbp+var_F8], rax
mov eax, [rbp+var_C4]
mov cx, ax
mov rax, [rbp+var_F8]
mov [rax], cx
mov rax, [rbp+var_B8]
add rax, 3
mov [rbp+var_B8], rax
mov rax, [rbp+var_C0]
mov ecx, [rbp+var_3C]
add rax, rcx
mov [rbp+var_80], rax
mov eax, [rbp+var_C4]
mov [rbp+var_78], rax
mov [rbp+var_C8], 2
mov eax, [rbp+var_C4]
mov [rbp+var_CC], eax
loc_70BF2:
lea rax, [rbp+var_30]
mov [rbp+var_90], rax
mov rax, [rbp+var_B8]
lea rcx, [rbp+var_30]
sub rax, rcx
mov eax, eax
mov [rbp+var_88], rax
mov rax, [rbp+var_38]
mov ecx, [rax+20h]
mov rax, [rbp+var_38]
mov [rax+24h], ecx
mov rax, [rbp+var_D8]
mov rdx, [rax+8]
mov rcx, [rbp+var_D8]
mov rax, [rbp+var_88]
mov r8d, eax
add r8d, [rbp+var_CC]
mov r9d, [rbp+var_C8]
add r9d, 2
lea r10, [rbp+var_B0]
lea rax, [rbp+var_30]
lea rdi, [rbp+var_48]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+120h+var_120], r10
mov [rsp+120h+var_118], rax
mov [rsp+120h+var_110], 0
call translog_write_record
mov [rbp+var_F9], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_70CA5
mov al, [rbp+var_F9]
add rsp, 120h
pop rbp
retn
loc_70CA5:
call ___stack_chk_fail
| char ma_log_suffix(long long **a1, unsigned int a2, int a3)
{
unsigned long long v4; // [rsp+40h] [rbp-E0h]
long long *v5; // [rsp+48h] [rbp-D8h]
int v6; // [rsp+54h] [rbp-CCh]
int v7; // [rsp+58h] [rbp-C8h]
long long *v8; // [rsp+60h] [rbp-C0h]
_QWORD v9[5]; // [rsp+70h] [rbp-B0h] BYREF
long long v10; // [rsp+98h] [rbp-88h]
long long v11; // [rsp+A0h] [rbp-80h]
long long v12; // [rsp+A8h] [rbp-78h]
char v13[8]; // [rsp+D8h] [rbp-48h] BYREF
int v14; // [rsp+E0h] [rbp-40h]
unsigned int v15; // [rsp+E4h] [rbp-3Ch]
long long **v16; // [rsp+E8h] [rbp-38h]
__int16 v17; // [rsp+F0h] [rbp-30h] BYREF
int v18; // [rsp+F2h] [rbp-2Eh]
char v19; // [rsp+F6h] [rbp-2Ah]
char v20; // [rsp+F7h] [rbp-29h]
char v21; // [rsp+F8h] [rbp-28h]
char v22; // [rsp+F9h] [rbp-27h]
__int16 v23; // [rsp+FAh] [rbp-26h]
_BYTE v24[36]; // [rsp+FCh] [rbp-24h] BYREF
long long savedregs; // [rsp+120h] [rbp+0h] BYREF
*(_QWORD *)&v24[28] = __readfsqword(0x28u);
v16 = a1;
v15 = a2;
v14 = a3;
v8 = a1[2];
v5 = *a1;
v4 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980);
v18 = v4;
v19 = BYTE4(v4);
v20 = 10;
v21 = *((_BYTE *)v8 + (unsigned int)(*(_DWORD *)(*v5 + 1860) - 3));
if ( (int)(a3 - a2) >= 0 )
{
v22 = 6;
v23 = a3 - a2;
v11 = (long long)v8 + v15;
v12 = a3 - a2;
v7 = 2;
v6 = a3 - a2;
}
else
{
v22 = 7;
v23 = a2 - a3;
v7 = 1;
v6 = 0;
}
v9[4] = &v17;
v10 = (unsigned int)v24 - ((unsigned int)&savedregs - 48);
*((_DWORD *)v16 + 9) = *((_DWORD *)v16 + 8);
return translog_write_record((long long)v13, 0xCu, v5[1], v5, v6 + v10, v7 + 2, v9, &v17, 0LL);
}
| _ma_log_suffix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV dword ptr [RBP + -0x40],EDX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x00170a65
LAB_00170a65:
JMP 0x00170a67
LAB_00170a67:
JMP 0x00170a69
LAB_00170a69:
JMP 0x00170a6b
LAB_00170a6b:
JMP 0x00170a6d
LAB_00170a6d:
LEA RAX,[RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xe8],RAX
MOV RAX,qword ptr [RBP + -0xe0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xe8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xe0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xe8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0xb8]
ADD RAX,0x5
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xb8],RCX
MOV byte ptr [RAX],0xa
MOV RAX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0xb8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0xb8],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0xc4],EAX
CMP EAX,0x0
JGE 0x00170b80
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX],0x7
MOV RAX,qword ptr [RBP + -0xb8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xf0],RAX
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0xc4]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf0]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0xb8]
ADD RAX,0x3
MOV qword ptr [RBP + -0xb8],RAX
MOV dword ptr [RBP + -0xc8],0x1
MOV dword ptr [RBP + -0xcc],0x0
JMP 0x00170bf2
LAB_00170b80:
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RAX],0x6
MOV RAX,qword ptr [RBP + -0xb8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xf8],RAX
MOV EAX,dword ptr [RBP + -0xc4]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0xb8]
ADD RAX,0x3
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV ECX,dword ptr [RBP + -0x3c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0xc4]
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0xc8],0x2
MOV EAX,dword ptr [RBP + -0xc4]
MOV dword ptr [RBP + -0xcc],EAX
LAB_00170bf2:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0xb8]
LEA RCX,[RBP + -0x30]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0xd8]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xd8]
MOV RAX,qword ptr [RBP + -0x88]
MOV R8D,EAX
ADD R8D,dword ptr [RBP + -0xcc]
MOV R9D,dword ptr [RBP + -0xc8]
ADD R9D,0x2
LEA R10,[RBP + -0xb0]
LEA RAX,[RBP + -0x30]
LEA RDI,[RBP + -0x48]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00153ff0
MOV byte ptr [RBP + -0xf9],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00170ca5
MOV AL,byte ptr [RBP + -0xf9]
ADD RSP,0x120
POP RBP
RET
LAB_00170ca5:
CALL 0x0012a270
|
int8 _ma_log_suffix(long *param_1,uint param_2,int param_3)
{
long *plVar1;
int1 uVar2;
uint uVar3;
ulong uVar4;
long in_FS_OFFSET;
uint local_d4;
int local_d0;
int1 *local_c0;
int1 local_b8 [32];
int1 *local_98;
ulong local_90;
long local_88;
ulong local_80;
int1 local_50 [8];
int local_48;
uint local_44;
long *local_40;
int1 local_38 [2];
int4 local_36;
int1 local_32;
int1 local_31;
int1 local_30;
int1 local_2f;
short local_2e;
int1 auStack_2c [28];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_36 = (int4)uVar4;
local_32 = (int1)(uVar4 >> 0x20);
local_31 = 10;
local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
local_d4 = param_3 - param_2;
local_2e = (short)local_d4;
if ((int)local_d4 < 0) {
local_2f = 7;
local_2e = -local_2e;
local_d0 = 1;
local_d4 = 0;
}
else {
local_2f = 6;
local_88 = param_1[2] + (ulong)param_2;
local_80 = (ulong)local_d4;
local_d0 = 2;
}
local_c0 = auStack_2c;
local_98 = local_38;
uVar3 = (int)local_c0 - (int)local_38;
local_90 = (ulong)uVar3;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_48 = param_3;
local_44 = param_2;
local_40 = param_1;
uVar2 = translog_write_record
(local_50,0xc,plVar1[1],plVar1,uVar3 + local_d4,local_d0 + 2,local_b8,local_38,0
);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar2);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
45,993 | ma_log_suffix | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_log_suffix(MARIA_PAGE *ma_page, uint org_length, uint new_length)
{
LSN lsn;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 10 + 7 + 2], *log_pos;
uchar *buff= ma_page->buff;
int diff;
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
pgcache_page_no_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_suffix");
DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u",
(ulong) page, org_length, new_length));
DBUG_ASSERT(ma_page->size == new_length);
DBUG_ASSERT(ma_page->org_size == org_length);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
if ((diff= (int) (new_length - org_length)) < 0)
{
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, -diff);
log_pos+= 3;
translog_parts= 1;
extra_length= 0;
}
else
{
log_pos[0]= KEY_OP_ADD_SUFFIX;
int2store(log_pos+1, diff);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= buff + org_length;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (uint) diff;
translog_parts= 2;
extra_length= (uint) diff;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
} | O3 | c | ma_log_suffix:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
movl %edx, %r10d
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movq (%rdi), %rcx
movq 0x10(%rdi), %r9
movq 0x18(%rdi), %rax
movq (%rcx), %r11
movl 0x7bc(%r11), %ebx
xorl %r8d, %r8d
xorl %edx, %edx
divq %rbx
movl %eax, -0x2e(%rbp)
shrq $0x20, %rax
movb %al, -0x2a(%rbp)
movb $0xa, -0x29(%rbp)
movl 0x744(%r11), %eax
addl $-0x3, %eax
movb (%r9,%rax), %al
movb %al, -0x28(%rbp)
subl %esi, %r10d
js 0x59dd3
leaq -0x24(%rbp), %rax
movl %esi, %edx
addq %rdx, %r9
movq %r9, -0x70(%rbp)
movl %r10d, %edx
movq %rdx, -0x68(%rbp)
movl $0x4, %r9d
movb $0x6, %dl
movl %r10d, %r8d
jmp 0x59de2
negl %r10d
movl $0x3, %r9d
movb $0x7, %dl
leaq -0x24(%rbp), %rax
leaq -0x30(%rbp), %r11
movb %dl, 0x9(%r11)
movw %r10w, 0xa(%r11)
leaq -0xa0(%rbp), %r10
movq %r11, 0x20(%r10)
subq %r11, %rax
movl %eax, %edx
movq %rdx, 0x28(%r10)
movl 0x20(%rdi), %edx
movl %edx, 0x24(%rdi)
movq 0x8(%rcx), %rdx
addl %eax, %r8d
subq $0x8, %rsp
leaq -0x38(%rbp), %rdi
movl $0xc, %esi
pushq $0x0
pushq %r11
pushq %r10
callq 0x2a8ac
addq $0x20, %rsp
movq %fs:0x28, %rcx
cmpq -0x10(%rbp), %rcx
jne 0x59e45
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
callq 0x29270
| _ma_log_suffix:
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov r10d, edx
mov rax, fs:28h
mov [rbp+var_10], rax
mov rcx, [rdi]
mov r9, [rdi+10h]
mov rax, [rdi+18h]
mov r11, [rcx]
mov ebx, [r11+7BCh]
xor r8d, r8d
xor edx, edx
div rbx
mov [rbp+var_2E], eax
shr rax, 20h
mov [rbp+var_2A], al
mov [rbp+var_29], 0Ah
mov eax, [r11+744h]
add eax, 0FFFFFFFDh
mov al, [r9+rax]
mov [rbp+var_28], al
sub r10d, esi
js short loc_59DD3
lea rax, [rbp+var_24]
mov edx, esi
add r9, rdx
mov [rbp+var_70], r9
mov edx, r10d
mov [rbp+var_68], rdx
mov r9d, 4
mov dl, 6
mov r8d, r10d
jmp short loc_59DE2
loc_59DD3:
neg r10d
mov r9d, 3
mov dl, 7
lea rax, [rbp+var_24]
loc_59DE2:
lea r11, [rbp+var_30]
mov [r11+9], dl
mov [r11+0Ah], r10w
lea r10, [rbp+var_A0]
mov [r10+20h], r11
sub rax, r11
mov edx, eax
mov [r10+28h], rdx
mov edx, [rdi+20h]
mov [rdi+24h], edx
mov rdx, [rcx+8]
add r8d, eax
sub rsp, 8
lea rdi, [rbp+var_38]
mov esi, 0Ch
push 0
push r11
push r10
call translog_write_record
add rsp, 20h
mov rcx, fs:28h
cmp rcx, [rbp+var_10]
jnz short loc_59E45
add rsp, 98h
pop rbx
pop rbp
retn
loc_59E45:
call ___stack_chk_fail
| long long ma_log_suffix(long long **a1, unsigned int a2, int a3)
{
long long *v3; // rcx
long long *v4; // r9
long long v5; // r11
unsigned int v6; // r8d
unsigned long long v7; // rax
unsigned int v8; // r10d
int v9; // r9d
char v10; // dl
__int128 v12; // [rsp+0h] [rbp-A0h] BYREF
__int16 *v13; // [rsp+20h] [rbp-80h]
long long v14; // [rsp+28h] [rbp-78h]
long long v15; // [rsp+30h] [rbp-70h]
long long v16; // [rsp+38h] [rbp-68h]
_BYTE v17[8]; // [rsp+68h] [rbp-38h] BYREF
__int16 v18; // [rsp+70h] [rbp-30h] BYREF
int v19; // [rsp+72h] [rbp-2Eh]
char v20; // [rsp+76h] [rbp-2Ah]
char v21; // [rsp+77h] [rbp-29h]
char v22; // [rsp+78h] [rbp-28h]
char v23; // [rsp+79h] [rbp-27h]
__int16 v24; // [rsp+7Ah] [rbp-26h]
_BYTE v25[20]; // [rsp+7Ch] [rbp-24h] BYREF
unsigned long long v26; // [rsp+90h] [rbp-10h]
v26 = __readfsqword(0x28u);
v3 = *a1;
v4 = a1[2];
v5 = **a1;
v6 = 0;
v7 = (unsigned long long)a1[3] / *(unsigned int *)(v5 + 1980);
v19 = v7;
v20 = BYTE4(v7);
v21 = 10;
v22 = *((_BYTE *)v4 + (unsigned int)(*(_DWORD *)(v5 + 1860) - 3));
v8 = a3 - a2;
if ( (int)(a3 - a2) < 0 )
{
LOWORD(v8) = a2 - a3;
v9 = 3;
v10 = 7;
}
else
{
v15 = (long long)v4 + a2;
v16 = v8;
v9 = 4;
v10 = 6;
v6 = v8;
}
v23 = v10;
v24 = v8;
v13 = &v18;
v14 = (unsigned int)(v25 - (_BYTE *)&v18);
*((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8);
return translog_write_record(
(unsigned long long)v17,
&byte_9[3],
v3[1],
v3,
(unsigned int)(v25 - (_BYTE *)&v18) + v6,
v9,
&v12,
&v18,
0LL);
}
| _ma_log_suffix:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV R10D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV RCX,qword ptr [RDI]
MOV R9,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RDI + 0x18]
MOV R11,qword ptr [RCX]
MOV EBX,dword ptr [R11 + 0x7bc]
XOR R8D,R8D
XOR EDX,EDX
DIV RBX
MOV dword ptr [RBP + -0x2e],EAX
SHR RAX,0x20
MOV byte ptr [RBP + -0x2a],AL
MOV byte ptr [RBP + -0x29],0xa
MOV EAX,dword ptr [R11 + 0x744]
ADD EAX,-0x3
MOV AL,byte ptr [R9 + RAX*0x1]
MOV byte ptr [RBP + -0x28],AL
SUB R10D,ESI
JS 0x00159dd3
LEA RAX,[RBP + -0x24]
MOV EDX,ESI
ADD R9,RDX
MOV qword ptr [RBP + -0x70],R9
MOV EDX,R10D
MOV qword ptr [RBP + -0x68],RDX
MOV R9D,0x4
MOV DL,0x6
MOV R8D,R10D
JMP 0x00159de2
LAB_00159dd3:
NEG R10D
MOV R9D,0x3
MOV DL,0x7
LEA RAX,[RBP + -0x24]
LAB_00159de2:
LEA R11,[RBP + -0x30]
MOV byte ptr [R11 + 0x9],DL
MOV word ptr [R11 + 0xa],R10W
LEA R10,[RBP + -0xa0]
MOV qword ptr [R10 + 0x20],R11
SUB RAX,R11
MOV EDX,EAX
MOV qword ptr [R10 + 0x28],RDX
MOV EDX,dword ptr [RDI + 0x20]
MOV dword ptr [RDI + 0x24],EDX
MOV RDX,qword ptr [RCX + 0x8]
ADD R8D,EAX
SUB RSP,0x8
LEA RDI,[RBP + -0x38]
MOV ESI,0xc
PUSH 0x0
PUSH R11
PUSH R10
CALL 0x0012a8ac
ADD RSP,0x20
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x10]
JNZ 0x00159e45
ADD RSP,0x98
POP RBX
POP RBP
RET
LAB_00159e45:
CALL 0x00129270
|
void _ma_log_suffix(long *param_1,uint param_2,int param_3)
{
long *plVar1;
int1 auVar2 [16];
int iVar3;
uint uVar4;
int8 uVar5;
uint uVar6;
long in_FS_OFFSET;
int1 local_a8 [32];
int1 *local_88;
ulong local_80;
long local_78;
ulong local_70;
int1 local_40 [8];
int1 local_38 [2];
int4 local_36;
int1 local_32;
int1 local_31;
int1 local_30;
int1 local_2f;
int2 local_2e;
int1 local_2c [20];
long local_18;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
uVar4 = 0;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1[3];
auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc));
local_36 = auVar2._0_4_;
local_32 = auVar2[4];
local_31 = 10;
local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
uVar6 = param_3 - param_2;
if ((int)uVar6 < 0) {
uVar6 = -uVar6;
uVar5 = 3;
local_2f = 7;
iVar3 = (int)local_2c;
}
else {
iVar3 = (int)local_2c;
local_78 = param_1[2] + (ulong)param_2;
local_70 = (ulong)uVar6;
uVar5 = 4;
local_2f = 6;
uVar4 = uVar6;
}
local_88 = local_38;
local_2e = (int2)uVar6;
uVar6 = iVar3 - (int)local_88;
local_80 = (ulong)uVar6;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
translog_write_record(local_40,0xc,plVar1[1],plVar1,uVar4 + uVar6,uVar5,local_a8,local_88,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
45,994 | find_fk_open_table(THD*, char const*, unsigned long, char const*, unsigned long) | eloqsql/sql/sql_class.cc | TABLE *find_fk_open_table(THD *thd, const char *db, size_t db_len,
const char *table, size_t table_len)
{
for (TABLE *t= thd->open_tables; t; t= t->next)
{
if (t->s->db.length == db_len && t->s->table_name.length == table_len &&
!strcmp(t->s->db.str, db) && !strcmp(t->s->table_name.str, table) &&
t->pos_in_table_list->prelocking_placeholder == TABLE_LIST::PRELOCK_FK)
return t;
}
return NULL;
} | O3 | cpp | find_fk_open_table(THD*, char const*, unsigned long, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, -0x30(%rbp)
movq 0xf0(%rdi), %rbx
testq %rbx, %rbx
je 0x726123
movq %r8, %r14
movq %rdx, %r12
movq %rsi, %r13
movq (%rbx), %r15
cmpq %r12, 0x2a8(%r15)
jne 0x72611a
cmpq %r14, 0x2b8(%r15)
jne 0x72611a
movq 0x2a0(%r15), %rdi
movq %r13, %rsi
callq 0x61c760
testl %eax, %eax
jne 0x72611a
movq 0x2b0(%r15), %rdi
movq -0x30(%rbp), %rsi
callq 0x61c760
testl %eax, %eax
jne 0x72611a
movq 0xe8(%rbx), %rax
cmpl $0x2, 0x3bc(%rax)
je 0x726125
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x7260ce
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z18find_fk_open_tableP3THDPKcmS2_m:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rbp+var_30], rcx
mov rbx, [rdi+0F0h]
test rbx, rbx
jz short loc_726123
mov r14, r8
mov r12, rdx
mov r13, rsi
loc_7260CE:
mov r15, [rbx]
cmp [r15+2A8h], r12
jnz short loc_72611A
cmp [r15+2B8h], r14
jnz short loc_72611A
mov rdi, [r15+2A0h]
mov rsi, r13
call _strcmp
test eax, eax
jnz short loc_72611A
mov rdi, [r15+2B0h]
mov rsi, [rbp+var_30]
call _strcmp
test eax, eax
jnz short loc_72611A
mov rax, [rbx+0E8h]
cmp dword ptr [rax+3BCh], 2
jz short loc_726125
loc_72611A:
mov rbx, [rbx+10h]
test rbx, rbx
jnz short loc_7260CE
loc_726123:
xor ebx, ebx
loc_726125:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * find_fk_open_table(THD *a1, const char *a2, long long a3, const char *a4, long long a5)
{
_QWORD *v5; // rbx
_QWORD *v8; // r15
v5 = (_QWORD *)*((_QWORD *)a1 + 30);
if ( !v5 )
return 0LL;
while ( 1 )
{
v8 = (_QWORD *)*v5;
if ( *(_QWORD *)(*v5 + 680LL) == a3
&& v8[87] == a5
&& !(unsigned int)strcmp(v8[84], a2)
&& !(unsigned int)strcmp(v8[86], a4)
&& *(_DWORD *)(v5[29] + 956LL) == 2 )
{
break;
}
v5 = (_QWORD *)v5[2];
if ( !v5 )
return 0LL;
}
return v5;
}
| create_default_definer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15D,ESI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x28]
PUSH 0x28
POP RSI
CALL 0x00dbdbb3
TEST RAX,RAX
JZ 0x00726107
MOV RBX,RAX
MOVZX R15D,R15B
MOV RDI,R14
MOV RSI,RAX
MOV EDX,R15D
CALL 0x00827368
TEST R15B,R15B
JZ 0x007260f9
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x007260f9
XOR EBX,EBX
MOV EDI,0x5a6
XOR ESI,ESI
XOR EAX,EAX
CALL 0x00dbf683
LAB_007260f9:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00726107:
XOR EBX,EBX
JMP 0x007260f9
|
/* create_default_definer(THD*, bool) */
LEX_USER * create_default_definer(THD *param_1,bool param_2)
{
LEX_USER *pLVar1;
pLVar1 = (LEX_USER *)alloc_root(*(int8 *)(param_1 + 0x28),0x28);
if (pLVar1 == (LEX_USER *)0x0) {
pLVar1 = (LEX_USER *)0x0;
}
else {
THD::get_definer(param_1,pLVar1,param_2);
if ((param_2) && (*(long *)(pLVar1 + 8) == 0)) {
pLVar1 = (LEX_USER *)0x0;
my_error(0x5a6,0);
}
}
return pLVar1;
}
| |
45,995 | decodeUTF8 | untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c | static unsigned int decodeUTF8(const char** s)
{
unsigned int ch = 0, count = 0;
static const unsigned int offsets[] =
{
0x00000000u, 0x00003080u, 0x000e2080u,
0x03c82080u, 0xfa082080u, 0x82082080u
};
do
{
ch = (ch << 6) + (unsigned char) **s;
(*s)++;
count++;
} while ((**s & 0xc0) == 0x80);
assert(count <= 6);
return ch - offsets[count - 1];
} | O0 | c | decodeUTF8:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
shll $0x6, %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0x3617a
cmpl $0x6, -0x10(%rbp)
ja 0x361c4
jmp 0x361e3
leaq 0x84707(%rip), %rdi # 0xba8d2
leaq 0x8470b(%rip), %rsi # 0xba8dd
movl $0x1e0, %edx # imm = 0x1E0
leaq 0x84761(%rip), %rcx # 0xba93f
callq 0xc5a0
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0x84369(%rip), %rcx # 0xba560
subl (%rcx,%rdx,4), %eax
addq $0x10, %rsp
popq %rbp
retq
| decodeUTF8:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov [rbp+var_10], 0
loc_3617A:
mov eax, [rbp+var_C]
shl eax, 6
mov rcx, [rbp+var_8]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx]
add eax, ecx
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
mov rax, [rbp+var_8]
mov rax, [rax]
movsx eax, byte ptr [rax]
and eax, 0C0h
cmp eax, 80h
jz short loc_3617A
cmp [rbp+var_10], 6
ja short loc_361C4
jmp short loc_361E3
loc_361C4:
lea rdi, aCount6; "count <= 6"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
mov edx, 1E0h
lea rcx, aUnsignedIntDec; "unsigned int decodeUTF8(const char **)"
call ___assert_fail
loc_361E3:
mov eax, [rbp+var_C]
mov ecx, [rbp+var_10]
sub ecx, 1
mov ecx, ecx
mov edx, ecx
lea rcx, decodeUTF8_offsets
sub eax, [rcx+rdx*4]
add rsp, 10h
pop rbp
retn
| long long decodeUTF8(_QWORD *a1)
{
unsigned int v2; // [rsp+0h] [rbp-10h]
int v3; // [rsp+4h] [rbp-Ch]
v3 = 0;
v2 = 0;
do
{
v3 = *(unsigned __int8 *)(*a1)++ + (v3 << 6);
++v2;
}
while ( (*(_BYTE *)*a1 & 0xC0) == 0x80 );
if ( v2 > 6 )
__assert_fail(
"count <= 6",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c",
480LL,
"unsigned int decodeUTF8(const char **)");
return (unsigned int)(v3 - decodeUTF8_offsets[v2 - 1]);
}
| decodeUTF8:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x10],0x0
LAB_0013617a:
MOV EAX,dword ptr [RBP + -0xc]
SHL EAX,0x6
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX]
ADD EAX,ECX
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
AND EAX,0xc0
CMP EAX,0x80
JZ 0x0013617a
CMP dword ptr [RBP + -0x10],0x6
JA 0x001361c4
JMP 0x001361e3
LAB_001361c4:
LEA RDI,[0x1ba8d2]
LEA RSI,[0x1ba8dd]
MOV EDX,0x1e0
LEA RCX,[0x1ba93f]
CALL 0x0010c5a0
LAB_001361e3:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [RBP + -0x10]
SUB ECX,0x1
MOV ECX,ECX
MOV EDX,ECX
LEA RCX,[0x1ba560]
SUB EAX,dword ptr [RCX + RDX*0x4]
ADD RSP,0x10
POP RBP
RET
|
int decodeUTF8(long *param_1)
{
uint uVar1;
uint local_18;
int local_14;
local_14 = 0;
local_18 = 0;
uVar1 = local_18;
do {
local_18 = uVar1;
local_14 = local_14 * 0x40 + (uint)*(byte *)*param_1;
*param_1 = *param_1 + 1;
uVar1 = local_18 + 1;
} while (((int)*(char *)*param_1 & 0xc0U) == 0x80);
if (local_18 + 1 < 7) {
return local_14 - *(int *)(decodeUTF8_offsets + (ulong)local_18 * 4);
}
/* WARNING: Subroutine does not return */
__assert_fail("count <= 6",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c"
,0x1e0,"unsigned int decodeUTF8(const char **)");
}
| |
45,996 | my_hash_free | eloqsql/mysys/hash.c | void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
} | O0 | c | my_hash_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0xddf5e
movq -0x8(%rbp), %rdi
callq 0xddfa0
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0xdadd0
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0xddf8e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_free:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_DDF5E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call delete_dynamic
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
jmp short $+2
loc_DDF8E:
add rsp, 10h
pop rbp
retn
| long long my_hash_free(long long a1)
{
long long result; // rax
my_hash_free_elements(a1);
*(_QWORD *)(a1 + 96) = 0LL;
delete_dynamic(a1 + 40);
result = a1;
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
| my_hash_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x001ddf5e
LAB_001ddf5e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ddfa0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x001dadd0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
JMP 0x001ddf8e
LAB_001ddf8e:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_free(long param_1)
{
my_hash_free_elements(param_1);
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
| |
45,997 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7548a
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x7546f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x191a0
testl %eax, %eax
je 0x7546c
addq $0x30, %rbx
jmp 0x7544d
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x754e6
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x19380
movq %rax, %rbx
movq %r14, %rdi
callq 0x43512
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3e5a4(%rip), %rsi # 0xb3a52
movq %rsp, %rdi
callq 0x74331
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x432ba
xorl %ebp, %ebp
leaq 0x6ddf3(%rip), %rsi # 0xe32c8
leaq -0x23962(%rip), %rdx # 0x51b7a
movq %rbx, %rdi
callq 0x19bb0
jmp 0x7555f
movl $0x20, %edi
callq 0x19380
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x19320
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x2175a
leaq 0x3e565(%rip), %rsi # 0xb3a82
leaq 0x3e564(%rip), %rcx # 0xb3a88
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x7493a
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x74cb4
xorl %ebp, %ebp
leaq 0x6de60(%rip), %rsi # 0xe33b0
leaq -0x239dd(%rip), %rdx # 0x51b7a
movq %rbx, %rdi
callq 0x19bb0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75585
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196e0
jmp 0x75585
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x755be
movq 0x30(%rsp), %rsi
jmp 0x755ae
jmp 0x755b8
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x755be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196e0
jmp 0x755be
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x755cb
movq %rbx, %rdi
callq 0x19520
movq %r14, %rdi
callq 0x19c10
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7548A
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_7544D:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_7546F
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_7546C
add rbx, 30h ; '0'
jmp short loc_7544D
loc_7546C:
mov rax, rbx
loc_7546F:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_754E6
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7548A:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_7555F
loc_754E6:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7555F:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75585
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_75585
mov r14, rax
mov bpl, 1
loc_75585:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_755BE
mov rsi, [rsp+68h+var_38]
jmp short loc_755AE
jmp short loc_755B8
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_755BE
mov rsi, [rsp+68h+var_58]
loc_755AE:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_755BE
loc_755B8:
mov r14, rax
mov bpl, 1
loc_755BE:
test bpl, bpl
jz short loc_755CB
mov rdi, rbx; void *
call ___cxa_free_exception
loc_755CB:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long i; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v9,
(long long)"cannot use at() with ",
v10);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
for ( i = *v2; ; i += 48LL )
{
v4 = v2[1];
if ( i == v4 )
break;
if ( !(unsigned int)std::string::compare(i, a2) )
{
v4 = i;
break;
}
}
if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = &v11;
v8 = strlen(a2);
std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v9,
(long long)"key '",
v10,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017548a
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_0017544d:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0017546f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001191a0
TEST EAX,EAX
JZ 0x0017546c
ADD RBX,0x30
JMP 0x0017544d
LAB_0017546c:
MOV RAX,RBX
LAB_0017546f:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001754e6
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017548a:
MOV EDI,0x20
CALL 0x00119380
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143512
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001754a7:
LEA RSI,[0x1b3a52]
MOV RDI,RSP
CALL 0x00174331
MOV BPL,0x1
LAB_001754b9:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001432ba
XOR EBP,EBP
LEA RSI,[0x1e32c8]
LEA RDX,[0x151b7a]
MOV RDI,RBX
CALL 0x00119bb0
LAB_001754e6:
MOV EDI,0x20
CALL 0x00119380
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00119320
LEA RDX,[RAX + R15*0x1]
LAB_00175509:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x0012175a
LAB_00175516:
LEA RSI,[0x1b3a82]
LEA RCX,[0x1b3a88]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x0017493a
MOV BPL,0x1
LAB_00175534:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00174cb4
XOR EBP,EBP
LEA RSI,[0x1e33b0]
LEA RDX,[0x151b7a]
MOV RDI,RBX
CALL 0x00119bb0
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001754a7 to 001754b5 has its CatchHandler @ 001755b8 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001754b9 to 001754e3 has its CatchHandler @ 00175598 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 00175509 to 00175515 has its CatchHandler @ 00175596 */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 00175516 to 00175530 has its CatchHandler @ 0017557f */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 00175534 to 0017555e has its CatchHandler @ 0017555f */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
45,998 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x6be87
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x6be71
movq %rbx, %rdi
movq %r15, %rsi
callq 0x181a0
testl %eax, %eax
je 0x6be66
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x6be47
jmp 0x6be69
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x6bee5
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18380
movq %rax, %rbx
movq %r14, %rdi
callq 0x412e6
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x43b99(%rip), %rsi # 0xafa42
leaq 0x20(%rsp), %rdi
callq 0x71a41
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4108e
xorl %ebp, %ebp
leaq 0x733f4(%rip), %rsi # 0xdf2c8
leaq -0x1c92f(%rip), %rdx # 0x4f5ac
movq %rbx, %rdi
callq 0x18bb0
jmp 0x6bf5e
movl $0x20, %edi
callq 0x18380
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x18320
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x200f4
leaq 0x43b58(%rip), %rsi # 0xafa72
leaq 0x43b57(%rip), %rcx # 0xafa78
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7201e
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x72396
xorl %ebp, %ebp
leaq 0x73461(%rip), %rsi # 0xdf3b0
leaq -0x1c9aa(%rip), %rdx # 0x4f5ac
movq %rbx, %rdi
callq 0x18bb0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bf7c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6bfc7
movq 0x10(%rsp), %rsi
jmp 0x6bfbf
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6bfd1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x6bfd1
jmp 0x6bfce
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bfc7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
testb %bpl, %bpl
jne 0x6bfd1
jmp 0x6bfd9
movq %rax, %r14
movq %rbx, %rdi
callq 0x18520
movq %r14, %rdi
callq 0x18c10
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_6BE87
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_6BE71
loc_6BE47:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6BE66
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_6BE47
jmp short loc_6BE69
loc_6BE66:
mov rax, rbx
loc_6BE69:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_6BE71:
cmp rax, rbx
jz short loc_6BEE5
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6BE87:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_6BF5E
loc_6BEE5:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6BF5E:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6BF7C
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6BF7C:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_6BFC7
mov rsi, [rsp+68h+var_58]
jmp short loc_6BFBF
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_6BFD1
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6BFD1
jmp short loc_6BFCE
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6BFC7
mov rsi, [rsp+68h+var_38]
loc_6BFBF:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6BFC7:
test bpl, bpl
jnz short loc_6BFD1
jmp short loc_6BFD9
loc_6BFCE:
mov r14, rax
loc_6BFD1:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6BFD9:
mov rdi, r14
call __Unwind_Resume
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0016be87
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0016be71
LAB_0016be47:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001181a0
TEST EAX,EAX
JZ 0x0016be66
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x0016be47
JMP 0x0016be69
LAB_0016be66:
MOV RAX,RBX
LAB_0016be69:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_0016be71:
CMP RAX,RBX
JZ 0x0016bee5
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016be87:
MOV EDI,0x20
CALL 0x00118380
MOV RBX,RAX
MOV RDI,R14
CALL 0x001412e6
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_0016bea2:
LEA RSI,[0x1afa42]
LEA RDI,[RSP + 0x20]
CALL 0x00171a41
MOV BPL,0x1
LAB_0016beb6:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014108e
XOR EBP,EBP
LEA RSI,[0x1df2c8]
LEA RDX,[0x14f5ac]
MOV RDI,RBX
CALL 0x00118bb0
LAB_0016bee5:
MOV EDI,0x20
CALL 0x00118380
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00118320
LEA RDX,[RAX + R15*0x1]
LAB_0016bf08:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001200f4
LAB_0016bf13:
LEA RSI,[0x1afa72]
LEA RCX,[0x1afa78]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017201e
MOV BPL,0x1
LAB_0016bf31:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00172396
XOR EBP,EBP
LEA RSI,[0x1df3b0]
LEA RDX,[0x14f5ac]
MOV RDI,RBX
CALL 0x00118bb0
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0016bea2 to 0016beb2 has its CatchHandler @ 0016bfce */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 0016beb6 to 0016bee2 has its CatchHandler @ 0016bfa9 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 0016bf08 to 0016bf12 has its CatchHandler @ 0016bfa7 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 0016bf13 to 0016bf2d has its CatchHandler @ 0016bf8c */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 0016bf31 to 0016bf5d has its CatchHandler @ 0016bf5e */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| ||
45,999 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O3 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0xa5d2f
callq 0xa7ce0
callq 0xa7f1a
callq 0xa7e43
callq 0xa80a7
leaq 0xb69d0a(%rip), %rax # 0xc11c04
movl (%rax), %edi
callq 0x2a8e0
movq %rax, %rbx
movq %rax, %rdi
callq 0xa8169
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa81d3
| my_thread_global_reinit:
push rbp
mov rbp, rsp
push rbx
push rax
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
lea rax, THR_KEY_mysys
mov edi, [rax]
call _pthread_getspecific
mov rbx, rax
mov rdi, rax
call my_thread_destory_thr_mutex
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp my_thread_init_thr_mutex
| long long my_thread_global_reinit(long long a1)
{
long long v1; // rbx
my_init_mysys_psi_keys(a1);
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = pthread_getspecific(THR_KEY_mysys);
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CALL 0x001a5d2f
CALL 0x001a7ce0
CALL 0x001a7f1a
CALL 0x001a7e43
CALL 0x001a80a7
LEA RAX,[0xd11c04]
MOV EDI,dword ptr [RAX]
CALL 0x0012a8e0
MOV RBX,RAX
MOV RDI,RAX
CALL 0x001a8169
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001a81d3
|
void my_thread_global_reinit(void)
{
void *pvVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
pvVar1 = pthread_getspecific(THR_KEY_mysys);
my_thread_destory_thr_mutex(pvVar1);
my_thread_init_thr_mutex(pvVar1);
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.