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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
49,000 | zip_stream_openwitherror | 7CodeWizard[P]stablediffusion/thirdparty/zip.c | struct zip_t *zip_stream_openwitherror(const char *stream, size_t size,
int level, char mode, int *errnum) {
struct zip_t *zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t));
if (!zip) {
// out of memory
*errnum = ZIP_EOOMEM;
return NULL;
}
if (level < 0) {
level = MZ_DEFAULT_LEVEL;
}
if ((level & 0xF) > MZ_UBER_COMPRESSION) {
// Wrong compression level
*errnum = ZIP_EINVLVL;
goto cleanup;
}
zip->level = (mz_uint)level;
if ((stream != NULL) && (size > 0) && (mode == 'r')) {
if (!mz_zip_reader_init_mem(&(zip->archive), stream, size, 0)) {
*errnum = ZIP_ERINIT;
goto cleanup;
}
} else if ((stream == NULL) && (size == 0) && (mode == 'w')) {
// Create a new archive.
if (!mz_zip_writer_init_heap(&(zip->archive), 0, 1024)) {
// Cannot initialize zip_archive writer
*errnum = ZIP_EWINIT;
goto cleanup;
}
} else {
*errnum = ZIP_EINVMODE;
goto cleanup;
}
*errnum = 0;
return zip;
cleanup:
CLEANUP(zip);
return NULL;
} | O2 | c | zip_stream_openwitherror:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r12
pushq $0x1
popq %rdi
movl $0x4e078, %esi # imm = 0x4E078
callq 0xa390
testq %rax, %rax
je 0x66313
movq %rax, %rbx
testl %r13d, %r13d
pushq $0x6
popq %rax
cmovnsl %r13d, %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0xa, %ecx
jbe 0x6632e
pushq $-0x5
popq %rax
movl %eax, (%r14)
movq %rbx, %rdi
callq 0xa710
jmp 0x6631a
movl $0xffffffeb, (%r14) # imm = 0xFFFFFFEB
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, 0x70(%rbx)
testq %r12, %r12
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
cmpb $0x72, %bpl
setne %al
orb %cl, %al
jne 0x66362
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x5e4f7
testl %eax, %eax
jne 0x66386
pushq $-0x1e
jmp 0x66305
orq %r15, %r12
setne %al
cmpb $0x77, %bpl
setne %cl
orb %al, %cl
jne 0x6638c
movl $0x400, %edx # imm = 0x400
movq %rbx, %rdi
xorl %esi, %esi
callq 0x61025
testl %eax, %eax
je 0x66393
andl $0x0, (%r14)
jmp 0x6631c
pushq $-0x4
jmp 0x66305
pushq $-0x1f
jmp 0x66305
| zip_stream_openwitherror:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov ebp, ecx
mov r13d, edx
mov r15, rsi
mov r12, rdi
push 1
pop rdi
mov esi, 4E078h
call _calloc
test rax, rax
jz short loc_66313
mov rbx, rax
test r13d, r13d
push 6
pop rax
cmovns eax, r13d
mov ecx, eax
and ecx, 0Fh
cmp ecx, 0Ah
jbe short loc_6632E
push 0FFFFFFFFFFFFFFFBh
loc_66305:
pop rax
mov [r14], eax
mov rdi, rbx
call _free
jmp short loc_6631A
loc_66313:
mov dword ptr [r14], 0FFFFFFEBh
loc_6631A:
xor ebx, ebx
loc_6631C:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6632E:
mov [rbx+70h], eax
test r12, r12
setz al
test r15, r15
setz cl
or cl, al
cmp bpl, 72h ; 'r'
setnz al
or al, cl
jnz short loc_66362
mov rdi, rbx
mov rsi, r12
mov rdx, r15
xor ecx, ecx
call mz_zip_reader_init_mem
test eax, eax
jnz short loc_66386
push 0FFFFFFFFFFFFFFE2h
jmp short loc_66305
loc_66362:
or r12, r15
setnz al
cmp bpl, 77h ; 'w'
setnz cl
or cl, al
jnz short loc_6638C
mov edx, 400h
mov rdi, rbx
xor esi, esi
call mz_zip_writer_init_heap
test eax, eax
jz short loc_66393
loc_66386:
and dword ptr [r14], 0
jmp short loc_6631C
loc_6638C:
push 0FFFFFFFFFFFFFFFCh
jmp loc_66305
loc_66393:
push 0FFFFFFFFFFFFFFE1h
jmp loc_66305
| long long zip_stream_openwitherror(__int128 a1, int a2, char a3, int *a4)
{
long long v7; // rax
long long v8; // rbx
int v9; // eax
int v11; // [rsp-10h] [rbp-40h]
v7 = calloc(1LL, 319608LL);
if ( !v7 )
{
*a4 = -21;
return 0LL;
}
v8 = v7;
v9 = 6;
if ( a2 >= 0 )
v9 = a2;
if ( (v9 & 0xFu) <= 0xA )
{
*(_DWORD *)(v8 + 112) = v9;
if ( (_QWORD)a1 == 0LL || *((_QWORD *)&a1 + 1) == 0LL || a3 != 114 )
{
if ( a1 != 0 || a3 != 119 )
{
v11 = -4;
goto LABEL_6;
}
if ( !(unsigned int)mz_zip_writer_init_heap(v8, 0LL, 0x400uLL) )
{
v11 = -31;
goto LABEL_6;
}
}
else if ( !(unsigned int)mz_zip_reader_init_mem(v8, a1, *((unsigned long long *)&a1 + 1), 0) )
{
v11 = -30;
goto LABEL_6;
}
*a4 = 0;
return v8;
}
v11 = -5;
LABEL_6:
*a4 = v11;
free(v8);
return 0LL;
}
| zip_stream_openwitherror:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV EBP,ECX
MOV R13D,EDX
MOV R15,RSI
MOV R12,RDI
PUSH 0x1
POP RDI
MOV ESI,0x4e078
CALL 0x0010a390
TEST RAX,RAX
JZ 0x00166313
MOV RBX,RAX
TEST R13D,R13D
PUSH 0x6
POP RAX
CMOVNS EAX,R13D
MOV ECX,EAX
AND ECX,0xf
CMP ECX,0xa
JBE 0x0016632e
PUSH -0x5
LAB_00166305:
POP RAX
MOV dword ptr [R14],EAX
MOV RDI,RBX
CALL 0x0010a710
JMP 0x0016631a
LAB_00166313:
MOV dword ptr [R14],0xffffffeb
LAB_0016631a:
XOR EBX,EBX
LAB_0016631c:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016632e:
MOV dword ptr [RBX + 0x70],EAX
TEST R12,R12
SETZ AL
TEST R15,R15
SETZ CL
OR CL,AL
CMP BPL,0x72
SETNZ AL
OR AL,CL
JNZ 0x00166362
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
XOR ECX,ECX
CALL 0x0015e4f7
TEST EAX,EAX
JNZ 0x00166386
PUSH -0x1e
JMP 0x00166305
LAB_00166362:
OR R12,R15
SETNZ AL
CMP BPL,0x77
SETNZ CL
OR CL,AL
JNZ 0x0016638c
MOV EDX,0x400
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00161025
TEST EAX,EAX
JZ 0x00166393
LAB_00166386:
AND dword ptr [R14],0x0
JMP 0x0016631c
LAB_0016638c:
PUSH -0x4
JMP 0x00166305
LAB_00166393:
PUSH -0x1f
JMP 0x00166305
|
void * zip_stream_openwitherror
(long param_1,long param_2,uint param_3,char param_4,int4 *param_5)
{
int4 uVar1;
uint uVar2;
int iVar3;
void *__ptr;
__ptr = calloc(1,0x4e078);
if (__ptr == (void *)0x0) {
*param_5 = 0xffffffeb;
}
else {
uVar2 = 6;
if (-1 < (int)param_3) {
uVar2 = param_3;
}
if ((uVar2 & 0xf) < 0xb) {
*(uint *)((long)__ptr + 0x70) = uVar2;
if (param_4 == 'r' && (param_2 != 0 && param_1 != 0)) {
iVar3 = mz_zip_reader_init_mem(__ptr,param_1,param_2,0);
if (iVar3 != 0) {
LAB_00166386:
*param_5 = 0;
return __ptr;
}
uVar1 = 0xffffffe2;
}
else if (param_4 == 'w' && (param_1 == 0 && param_2 == 0)) {
iVar3 = mz_zip_writer_init_heap(__ptr,0,0x400);
if (iVar3 != 0) goto LAB_00166386;
uVar1 = 0xffffffe1;
}
else {
uVar1 = 0xfffffffc;
}
}
else {
uVar1 = 0xfffffffb;
}
*param_5 = uVar1;
free(__ptr);
}
return (void *)0x0;
}
| |
49,001 | zip_stream_openwitherror | 7CodeWizard[P]stablediffusion/thirdparty/zip.c | struct zip_t *zip_stream_openwitherror(const char *stream, size_t size,
int level, char mode, int *errnum) {
struct zip_t *zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t));
if (!zip) {
// out of memory
*errnum = ZIP_EOOMEM;
return NULL;
}
if (level < 0) {
level = MZ_DEFAULT_LEVEL;
}
if ((level & 0xF) > MZ_UBER_COMPRESSION) {
// Wrong compression level
*errnum = ZIP_EINVLVL;
goto cleanup;
}
zip->level = (mz_uint)level;
if ((stream != NULL) && (size > 0) && (mode == 'r')) {
if (!mz_zip_reader_init_mem(&(zip->archive), stream, size, 0)) {
*errnum = ZIP_ERINIT;
goto cleanup;
}
} else if ((stream == NULL) && (size == 0) && (mode == 'w')) {
// Create a new archive.
if (!mz_zip_writer_init_heap(&(zip->archive), 0, 1024)) {
// Cannot initialize zip_archive writer
*errnum = ZIP_EWINIT;
goto cleanup;
}
} else {
*errnum = ZIP_EINVMODE;
goto cleanup;
}
*errnum = 0;
return zip;
cleanup:
CLEANUP(zip);
return NULL;
} | O3 | c | zip_stream_openwitherror:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r12
movl $0x1, %edi
movl $0x4e078, %esi # imm = 0x4E078
callq 0xa380
testq %rax, %rax
je 0x8aeac
movq %rax, %rbx
testl %r13d, %r13d
movl $0x6, %ecx
cmovnsl %r13d, %ecx
movl %ecx, %edx
andl $0xf, %edx
movl $0xfffffffb, %eax # imm = 0xFFFFFFFB
cmpl $0xa, %edx
jbe 0x8aec7
movl %eax, (%r14)
movq %rbx, %rdi
callq 0xa6f0
jmp 0x8aeb3
movl $0xffffffeb, (%r14) # imm = 0xFFFFFFEB
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, 0x70(%rbx)
testq %r12, %r12
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
cmpb $0x72, %bpl
setne %al
orb %cl, %al
jne 0x8aefe
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x82dd9
testl %eax, %eax
jne 0x8af29
movl $0xffffffe2, %eax # imm = 0xFFFFFFE2
jmp 0x8ae9f
orq %r15, %r12
setne %cl
cmpb $0x77, %bpl
setne %dl
movl $0xfffffffc, %eax # imm = 0xFFFFFFFC
orb %cl, %dl
jne 0x8ae9f
movl $0x400, %edx # imm = 0x400
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x856e3
testl %eax, %eax
je 0x8af32
movl $0x0, (%r14)
jmp 0x8aeb5
movl $0xffffffe1, %eax # imm = 0xFFFFFFE1
jmp 0x8ae9f
| zip_stream_openwitherror:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov ebp, ecx
mov r13d, edx
mov r15, rsi
mov r12, rdi
mov edi, 1
mov esi, 4E078h
call _calloc
test rax, rax
jz short loc_8AEAC
mov rbx, rax
test r13d, r13d
mov ecx, 6
cmovns ecx, r13d
mov edx, ecx
and edx, 0Fh
mov eax, 0FFFFFFFBh
cmp edx, 0Ah
jbe short loc_8AEC7
loc_8AE9F:
mov [r14], eax
mov rdi, rbx
call _free
jmp short loc_8AEB3
loc_8AEAC:
mov dword ptr [r14], 0FFFFFFEBh
loc_8AEB3:
xor ebx, ebx
loc_8AEB5:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8AEC7:
mov [rbx+70h], ecx
test r12, r12
setz al
test r15, r15
setz cl
or cl, al
cmp bpl, 72h ; 'r'
setnz al
or al, cl
jnz short loc_8AEFE
mov rdi, rbx
mov rsi, r12
mov rdx, r15
xor ecx, ecx
call mz_zip_reader_init_mem
test eax, eax
jnz short loc_8AF29
mov eax, 0FFFFFFE2h
jmp short loc_8AE9F
loc_8AEFE:
or r12, r15
setnz cl
cmp bpl, 77h ; 'w'
setnz dl
mov eax, 0FFFFFFFCh
or dl, cl
jnz short loc_8AE9F
mov edx, 400h
mov rdi, rbx
xor esi, esi
xor ecx, ecx
call mz_zip_writer_init_heap_v2
test eax, eax
jz short loc_8AF32
loc_8AF29:
mov dword ptr [r14], 0
jmp short loc_8AEB5
loc_8AF32:
mov eax, 0FFFFFFE1h
jmp loc_8AE9F
| long long zip_stream_openwitherror(__int128 a1, int a2, char a3, int *a4)
{
long long v7; // rax
long long v8; // rbx
int v9; // ecx
int v10; // eax
v7 = calloc(1LL, 319608LL);
if ( !v7 )
{
*a4 = -21;
return 0LL;
}
v8 = v7;
v9 = 6;
if ( a2 >= 0 )
v9 = a2;
v10 = -5;
if ( (v9 & 0xFu) <= 0xA )
{
*(_DWORD *)(v8 + 112) = v9;
if ( (_QWORD)a1 == 0LL || *((_QWORD *)&a1 + 1) == 0LL || a3 != 114 )
{
v10 = -4;
if ( a1 != 0 || a3 != 119 )
goto LABEL_5;
if ( !(unsigned int)mz_zip_writer_init_heap_v2(v8, 0LL, 0x400uLL, 0) )
{
v10 = -31;
goto LABEL_5;
}
}
else if ( !(unsigned int)mz_zip_reader_init_mem(v8, a1, *((unsigned long long *)&a1 + 1), 0) )
{
v10 = -30;
goto LABEL_5;
}
*a4 = 0;
return v8;
}
LABEL_5:
*a4 = v10;
free(v8);
return 0LL;
}
| |||
49,002 | my_open_parent_dir_nosymlinks | eloqsql/mysys/my_symlink.c | const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd)
{
char buf[FN_REFLEN + 1];
char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf));
int fd, dfd= -1;
if (*end)
{
errno= ENAMETOOLONG;
return NULL;
}
if (*s != '/') /* not an absolute path */
{
errno= ENOENT;
return NULL;
}
for (;;)
{
if (*e == '/') /* '//' in the path */
{
errno= ENOENT;
goto err;
}
while (*e && *e != '/')
e++;
*e= 0;
if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3))
{
errno= ENOENT;
goto err;
}
if (++e >= end)
{
*pdfd= dfd;
return pathname + (s - buf);
}
fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC);
if (fd < 0)
goto err;
if (dfd >= 0)
close(dfd);
dfd= fd;
s= e;
}
err:
if (dfd >= 0)
close(dfd);
return NULL;
} | O3 | c | my_open_parent_dir_nosymlinks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x240(%rbp), %r15
movl $0x201, %edx # imm = 0x201
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5df38
cmpb $0x0, (%rax)
je 0x2fe7b
callq 0x24050
movl $0x24, (%rax)
jmp 0x2ff52
cmpb $0x2f, -0x240(%rbp)
jne 0x2ff27
movq %rax, %r12
movq %r14, -0x248(%rbp)
movb -0x23f(%rbp), %al
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpb $0x2f, %al
je 0x2ff37
leaq -0x23f(%rbp), %rcx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq %r15, %rsi
incq %rcx
movq %rcx, %r15
testb %al, %al
je 0x2fed0
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x2fed0
movb (%r15), %al
incq %r15
jmp 0x2febc
movb $0x0, -0x1(%r15)
cmpw $0x2e, (%rsi)
je 0x2ff34
movzwl (%rsi), %eax
xorl $0x2e2e, %eax # imm = 0x2E2E
movzbl 0x2(%rsi), %ecx
orw %ax, %cx
je 0x2ff34
cmpq %r12, %r15
jae 0x2ff78
movl %r14d, %edi
movl $0x2a0000, %edx # imm = 0x2A0000
xorl %eax, %eax
callq 0x242d0
testl %eax, %eax
js 0x2ff45
movl %eax, %r13d
testl %r14d, %r14d
js 0x2ff18
movl %r14d, %edi
callq 0x246a0
movb (%r15), %al
movl %r13d, %r14d
movq %r15, %rcx
cmpb $0x2f, %al
jne 0x2feb3
jmp 0x2ff37
callq 0x24050
movl $0x2, (%rax)
jmp 0x2ff52
movl %r14d, %r13d
callq 0x24050
movl $0x2, (%rax)
movl %r13d, %r14d
testl %r14d, %r14d
js 0x2ff52
movl %r14d, %edi
callq 0x246a0
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2ff91
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x248(%rbp), %rax
movl %r14d, (%rax)
leaq -0x240(%rbp), %rax
subq %rax, %rsi
addq %rsi, %rbx
jmp 0x2ff54
callq 0x24370
nop
| my_open_parent_dir_nosymlinks:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_240]
mov edx, 201h
mov rdi, r15
mov rsi, rbx
call strnmov
cmp byte ptr [rax], 0
jz short loc_2FE7B
call ___errno_location
mov dword ptr [rax], 24h ; '$'
jmp loc_2FF52
loc_2FE7B:
cmp [rbp+var_240], 2Fh ; '/'
jnz loc_2FF27
mov r12, rax
mov [rbp+var_248], r14
mov al, [rbp+var_23F]
mov r13d, 0FFFFFFFFh
cmp al, 2Fh ; '/'
jz loc_2FF37
lea rcx, [rbp+var_23F]
mov r14d, 0FFFFFFFFh
loc_2FEB3:
mov rsi, r15
inc rcx
mov r15, rcx
loc_2FEBC:
test al, al
jz short loc_2FED0
movzx eax, al
cmp eax, 2Fh ; '/'
jz short loc_2FED0
mov al, [r15]
inc r15
jmp short loc_2FEBC
loc_2FED0:
mov byte ptr [r15-1], 0
cmp word ptr [rsi], 2Eh ; '.'
jz short loc_2FF34
movzx eax, word ptr [rsi]
xor eax, 2E2Eh
movzx ecx, byte ptr [rsi+2]
or cx, ax
jz short loc_2FF34
cmp r15, r12
jnb loc_2FF78
mov edi, r14d
mov edx, offset unk_2A0000
xor eax, eax
call _openat64
test eax, eax
js short loc_2FF45
mov r13d, eax
test r14d, r14d
js short loc_2FF18
mov edi, r14d
call _close
loc_2FF18:
mov al, [r15]
mov r14d, r13d
mov rcx, r15
cmp al, 2Fh ; '/'
jnz short loc_2FEB3
jmp short loc_2FF37
loc_2FF27:
call ___errno_location
mov dword ptr [rax], 2
jmp short loc_2FF52
loc_2FF34:
mov r13d, r14d
loc_2FF37:
call ___errno_location
mov dword ptr [rax], 2
mov r14d, r13d
loc_2FF45:
test r14d, r14d
js short loc_2FF52
mov edi, r14d
call _close
loc_2FF52:
xor ebx, ebx
loc_2FF54:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_2FF91
mov rax, rbx
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2FF78:
mov rax, [rbp+var_248]
mov [rax], r14d
lea rax, [rbp+var_240]
sub rsi, rax
add rbx, rsi
jmp short loc_2FF54
loc_2FF91:
call ___stack_chk_fail
| long long my_open_parent_dir_nosymlinks(long long a1, unsigned int *a2)
{
char *v3; // r15
char *v4; // rdi
char *v5; // rax
char *v6; // r12
char v7; // al
int v8; // r13d
char *v9; // rcx
unsigned int v10; // r14d
char *v11; // rsi
long long v12; // rcx
int v13; // eax
unsigned int *v16; // [rsp+8h] [rbp-248h]
char v17; // [rsp+10h] [rbp-240h] BYREF
char v18; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v19; // [rsp+220h] [rbp-30h]
v19 = __readfsqword(0x28u);
v3 = &v17;
v4 = &v17;
v5 = (char *)strnmov(&v17, a1, 513LL);
if ( *v5 )
{
*(_DWORD *)__errno_location(&v17) = 36;
return 0LL;
}
if ( v17 != 47 )
{
*(_DWORD *)__errno_location(&v17) = 2;
return 0LL;
}
v6 = v5;
v16 = a2;
v7 = v18;
v8 = -1;
if ( v18 == 47 )
{
LABEL_20:
*(_DWORD *)__errno_location(v4) = 2;
v10 = v8;
LABEL_21:
if ( (v10 & 0x80000000) == 0 )
close(v10);
return 0LL;
}
v9 = &v18;
v10 = -1;
while ( 1 )
{
v11 = v3;
v3 = v9 + 1;
while ( v7 && v7 != 47 )
v7 = *v3++;
*(v3 - 1) = 0;
if ( *(_WORD *)v11 == 46 || (v12 = (unsigned __int8)v11[2], LOWORD(v12) = *(_WORD *)v11 ^ 0x2E2E | v12, !(_WORD)v12) )
{
v8 = v10;
goto LABEL_20;
}
if ( v3 >= v6 )
break;
v4 = (char *)v10;
v13 = openat64(v10, v11, &unk_2A0000, v12);
if ( v13 < 0 )
goto LABEL_21;
v8 = v13;
if ( (v10 & 0x80000000) == 0 )
{
v4 = (char *)v10;
close(v10);
}
v7 = *v3;
v10 = v8;
v9 = v3;
if ( *v3 == 47 )
goto LABEL_20;
}
*v16 = v10;
return v11 - &v17 + a1;
}
| my_open_parent_dir_nosymlinks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x240]
MOV EDX,0x201
MOV RDI,R15
MOV RSI,RBX
CALL 0x0015df38
CMP byte ptr [RAX],0x0
JZ 0x0012fe7b
CALL 0x00124050
MOV dword ptr [RAX],0x24
JMP 0x0012ff52
LAB_0012fe7b:
CMP byte ptr [RBP + -0x240],0x2f
JNZ 0x0012ff27
MOV R12,RAX
MOV qword ptr [RBP + -0x248],R14
MOV AL,byte ptr [RBP + -0x23f]
MOV R13D,0xffffffff
CMP AL,0x2f
JZ 0x0012ff37
LEA RCX,[RBP + -0x23f]
MOV R14D,0xffffffff
LAB_0012feb3:
MOV RSI,R15
INC RCX
MOV R15,RCX
LAB_0012febc:
TEST AL,AL
JZ 0x0012fed0
MOVZX EAX,AL
CMP EAX,0x2f
JZ 0x0012fed0
MOV AL,byte ptr [R15]
INC R15
JMP 0x0012febc
LAB_0012fed0:
MOV byte ptr [R15 + -0x1],0x0
CMP word ptr [RSI],0x2e
JZ 0x0012ff34
MOVZX EAX,word ptr [RSI]
XOR EAX,0x2e2e
MOVZX ECX,byte ptr [RSI + 0x2]
OR CX,AX
JZ 0x0012ff34
CMP R15,R12
JNC 0x0012ff78
MOV EDI,R14D
MOV EDX,0x2a0000
XOR EAX,EAX
CALL 0x001242d0
TEST EAX,EAX
JS 0x0012ff45
MOV R13D,EAX
TEST R14D,R14D
JS 0x0012ff18
MOV EDI,R14D
CALL 0x001246a0
LAB_0012ff18:
MOV AL,byte ptr [R15]
MOV R14D,R13D
MOV RCX,R15
CMP AL,0x2f
JNZ 0x0012feb3
JMP 0x0012ff37
LAB_0012ff27:
CALL 0x00124050
MOV dword ptr [RAX],0x2
JMP 0x0012ff52
LAB_0012ff34:
MOV R13D,R14D
LAB_0012ff37:
CALL 0x00124050
MOV dword ptr [RAX],0x2
MOV R14D,R13D
LAB_0012ff45:
TEST R14D,R14D
JS 0x0012ff52
MOV EDI,R14D
CALL 0x001246a0
LAB_0012ff52:
XOR EBX,EBX
LAB_0012ff54:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012ff91
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012ff78:
MOV RAX,qword ptr [RBP + -0x248]
MOV dword ptr [RAX],R14D
LEA RAX,[RBP + -0x240]
SUB RSI,RAX
ADD RBX,RSI
JMP 0x0012ff54
LAB_0012ff91:
CALL 0x00124370
|
long my_open_parent_dir_nosymlinks(long param_1,int *param_2)
{
short *psVar1;
int iVar2;
short *psVar3;
int *piVar4;
long lVar5;
int __fd;
short *psVar6;
short *__file;
long in_FS_OFFSET;
int1 local_248 [2];
int1 local_246 [526];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
psVar3 = (short *)strnmov(local_248,param_1,0x201);
if ((char)*psVar3 == '\0') {
if (local_248[0] == '/') {
__fd = -1;
if (local_248[1] != '/') {
psVar1 = (short *)(local_248 + 1);
__file = (short *)local_248;
__fd = -1;
do {
while ((psVar6 = (short *)((long)psVar1 + 1), local_248[1] != '\0' &&
(local_248[1] != '/'))) {
psVar1 = psVar6;
local_248[1] = *(char *)psVar6;
}
*(char *)psVar1 = '\0';
if ((*__file == 0x2e) || ((char)__file[1] == '\0' && *__file == 0x2e2e)) break;
if (psVar3 <= psVar6) {
*param_2 = __fd;
lVar5 = (long)__file + (param_1 - (long)local_248);
goto LAB_0012ff54;
}
iVar2 = openat64(__fd,(char *)__file,0x2a0000);
if (iVar2 < 0) goto LAB_0012ff45;
if (-1 < __fd) {
close(__fd);
}
local_248[1] = *(char *)psVar6;
__fd = iVar2;
psVar1 = psVar6;
__file = psVar6;
} while (local_248[1] != '/');
}
piVar4 = __errno_location();
*piVar4 = 2;
LAB_0012ff45:
if (-1 < __fd) {
close(__fd);
}
}
else {
piVar4 = __errno_location();
*piVar4 = 2;
}
}
else {
piVar4 = __errno_location();
*piVar4 = 0x24;
}
lVar5 = 0;
LAB_0012ff54:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar5;
}
| |
49,003 | run_command | eloqsql/client/mysql_plugin.c | static int run_command(char* cmd, const char *mode)
{
char buf[512]= {0};
FILE *res_file;
int error;
if (!(res_file= popen(cmd, mode)))
return -1;
if (opt_verbose)
{
while (fgets(buf, sizeof(buf), res_file))
{
fprintf(stdout, "%s", buf);
}
}
error= pclose(res_file);
return error;
} | O3 | c | run_command:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x241e0
leaq 0x3bfd3(%rip), %rsi # 0x62adc
movq %rbx, %rdi
callq 0x240e0
testq %rax, %rax
je 0x26b85
movq %rax, %rbx
cmpl $0x0, 0x346960(%rip) # 0x36d480
je 0x26b7b
leaq -0x230(%rbp), %rdi
movl $0x200, %esi # imm = 0x200
movq %rbx, %rdx
callq 0x24610
testq %rax, %rax
je 0x26b7b
movq 0x2cf466(%rip), %r12 # 0x2f5fa8
leaq 0x3eae0(%rip), %r14 # 0x65629
leaq -0x230(%rbp), %r15
movq (%r12), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x24660
movq %r15, %rdi
movl $0x200, %esi # imm = 0x200
movq %rbx, %rdx
callq 0x24610
testq %rax, %rax
jne 0x26b50
movq %rbx, %rdi
callq 0x24520
jmp 0x26b8a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x26ba9
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x24400
| run_command:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 210h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea rdi, [rbp+var_230]
mov edx, 200h
xor esi, esi
call _memset
lea rsi, aKoi8r+4; "r"
mov rdi, rbx
call _popen
test rax, rax
jz short loc_26B85
mov rbx, rax
cmp cs:opt_verbose, 0
jz short loc_26B7B
lea rdi, [rbp+var_230]
mov esi, 200h
mov rdx, rbx
call _fgets
test rax, rax
jz short loc_26B7B
mov r12, cs:stdout_ptr
lea r14, aAtLineDPosDS+13h; "%s"
lea r15, [rbp+var_230]
loc_26B50:
mov rdi, [r12]
mov esi, 1
mov rdx, r14
mov rcx, r15
xor eax, eax
call ___fprintf_chk
mov rdi, r15
mov esi, 200h
mov rdx, rbx
call _fgets
test rax, rax
jnz short loc_26B50
loc_26B7B:
mov rdi, rbx
call _pclose
jmp short loc_26B8A
loc_26B85:
mov eax, 0FFFFFFFFh
loc_26B8A:
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_26BA9
add rsp, 210h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_26BA9:
call ___stack_chk_fail
| long long run_command(long long a1)
{
long long v1; // rax
long long v2; // rbx
char v4[520]; // [rsp+0h] [rbp-230h] BYREF
unsigned long long v5; // [rsp+208h] [rbp-28h]
v5 = __readfsqword(0x28u);
memset(v4, 0LL, 512LL);
v1 = popen(a1, "r");
if ( !v1 )
return 0xFFFFFFFFLL;
v2 = v1;
if ( opt_verbose && fgets(v4, 512LL, v1) )
{
do
__fprintf_chk(stdout, 1LL, "%s", v4);
while ( fgets(v4, 512LL, v2) );
}
return pclose(v2);
}
| run_command:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[RBP + -0x230]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x001241e0
LEA RSI,[0x162adc]
MOV RDI,RBX
CALL 0x001240e0
TEST RAX,RAX
JZ 0x00126b85
MOV RBX,RAX
CMP dword ptr [0x0046d480],0x0
JZ 0x00126b7b
LEA RDI,[RBP + -0x230]
MOV ESI,0x200
MOV RDX,RBX
CALL 0x00124610
TEST RAX,RAX
JZ 0x00126b7b
MOV R12,qword ptr [0x003f5fa8]
LEA R14,[0x165629]
LEA R15,[RBP + -0x230]
LAB_00126b50:
MOV RDI,qword ptr [R12]
MOV ESI,0x1
MOV RDX,R14
MOV RCX,R15
XOR EAX,EAX
CALL 0x00124660
MOV RDI,R15
MOV ESI,0x200
MOV RDX,RBX
CALL 0x00124610
TEST RAX,RAX
JNZ 0x00126b50
LAB_00126b7b:
MOV RDI,RBX
CALL 0x00124520
JMP 0x00126b8a
LAB_00126b85:
MOV EAX,0xffffffff
LAB_00126b8a:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00126ba9
ADD RSP,0x210
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00126ba9:
CALL 0x00124400
|
int run_command(char *param_1)
{
int *puVar1;
int iVar2;
FILE *__stream;
char *pcVar3;
long in_FS_OFFSET;
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
memset(local_238,0,0x200);
__stream = popen(param_1,"r");
if (__stream == (FILE *)0x0) {
iVar2 = -1;
}
else {
if (opt_verbose != 0) {
pcVar3 = fgets(local_238,0x200,__stream);
puVar1 = PTR_stdout_003f5fa8;
if (pcVar3 != (char *)0x0) {
do {
__fprintf_chk(*(int8 *)puVar1,1,"%s",local_238);
pcVar3 = fgets(local_238,0x200,__stream);
} while (pcVar3 != (char *)0x0);
}
}
iVar2 = pclose(__stream);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return iVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
49,004 | my_print_default_files | eloqsql/mysys/my_default.c | void my_print_default_files(const char *conf_file)
{
const char *empty_list[]= { "", 0 };
my_bool have_ext= fn_ext(conf_file)[0] != 0;
const char **exts_to_use= have_ext ? empty_list : f_extensions;
char name[FN_REFLEN], **ext;
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file)
{
puts(my_defaults_file);
return;
}
if (dirname_length(conf_file))
fputs(conf_file,stdout);
else
{
const char **dirs;
MEM_ROOT alloc;
init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
{
fputs("Internal error initializing default directories list", stdout);
}
else
{
for ( ; *dirs; dirs++)
{
for (ext= (char**) exts_to_use; *ext; ext++)
{
const char *pos;
char *end;
if (**dirs)
pos= *dirs;
else if (my_defaults_extra_file)
{
pos= my_defaults_extra_file;
fputs(pos, stdout);
fputs(" ", stdout);
continue;
}
else
continue;
end= convert_dirname(name, pos, NullS);
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
*end++= '.';
strxmov(end, conf_file, *ext, " ", NullS);
fputs(name, stdout);
}
}
}
free_root(&alloc, MYF(0));
}
puts("");
} | O3 | c | my_print_default_files:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x34830
cmpb $0x0, (%rax)
leaq 0x2bdad2(%rip), %rax # 0x2f1d20
leaq 0x2bdadb(%rip), %rbx # 0x2f1d30
cmoveq %rax, %rbx
leaq 0x31062(%rip), %rdi # 0x652c2
callq 0x245c0
leaq 0x345a7c(%rip), %rax # 0x379ce8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3429d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x34419
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x245c0
movq %r15, %rdi
callq 0x2a654
testq %rax, %rax
je 0x342c1
movq 0x2c5cef(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
movq %r15, %rdi
callq 0x24400
jmp 0x343ee
leaq 0x3456f0(%rip), %rax # 0x3799b8
movl (%rax), %edi
leaq -0x280(%rbp), %r14
movl $0x200, %edx # imm = 0x200
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x35fe8
movq %r14, %rdi
callq 0x3410b
testq %rax, %rax
je 0x343ca
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x343e0
movq (%rbx), %rax
movq %rax, -0x238(%rbp)
addq $0x8, %rbx
movq %rbx, -0x240(%rbp)
leaq -0x230(%rbp), %r12
cmpq $0x0, -0x238(%rbp)
je 0x343b9
movq -0x240(%rbp), %rbx
movq -0x238(%rbp), %r13
movq (%r14), %rsi
cmpb $0x0, (%rsi)
je 0x34379
movq %r12, %rdi
xorl %edx, %edx
callq 0x2a6cf
cmpb $0x7e, -0x230(%rbp)
jne 0x3435a
movb $0x2e, (%rax)
incq %rax
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x3060f(%rip), %rcx # 0x64979
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x6322c
movq %r12, %rdi
jmp 0x3439e
leaq 0x345978(%rip), %rax # 0x379cf8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x343ad
movq 0x2c5c11(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
callq 0x24400
leaq 0x305db(%rip), %rdi # 0x64979
movq 0x2c5bfb(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
callq 0x24400
movq (%rbx), %r13
addq $0x8, %rbx
testq %r13, %r13
jne 0x34339
cmpq $0x0, 0x8(%r14)
leaq 0x8(%r14), %r14
jne 0x3431d
jmp 0x343e0
movq 0x2c5bcf(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
leaq 0x30f2e(%rip), %rdi # 0x65309
callq 0x24400
leaq -0x280(%rbp), %rdi
xorl %esi, %esi
callq 0x363b7
movl $0xa, %edi
callq 0x244c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x34419
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
| my_print_default_files:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call fn_ext
cmp byte ptr [rax], 0
lea rax, f_extensions
lea rbx, off_2F1D30; ""
cmovz rbx, rax
lea rdi, aDefaultOptions; "\nDefault options are read from the fol"...
call _puts
lea rax, my_defaults_file
mov rdi, [rax]
test rdi, rdi
jz short loc_3429D
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_34419
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
loc_3429D:
mov rdi, r15
call dirname_length
test rax, rax
jz short loc_342C1
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r15
call _fputs
jmp loc_343EE
loc_342C1:
lea rax, key_memory_defaults
mov edi, [rax]
lea r14, [rbp+var_280]
mov edx, 200h
mov rsi, r14
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rdi, r14
call init_default_directories
test rax, rax
jz loc_343CA
mov r14, rax
cmp qword ptr [rax], 0
jz loc_343E0
mov rax, [rbx]
mov [rbp+var_238], rax
add rbx, 8
mov [rbp+var_240], rbx
lea r12, [rbp+var_230]
loc_3431D:
cmp [rbp+var_238], 0
jz loc_343B9
mov rbx, [rbp+var_240]
mov r13, [rbp+var_238]
loc_34339:
mov rsi, [r14]
cmp byte ptr [rsi], 0
jz short loc_34379
mov rdi, r12
xor edx, edx
call convert_dirname
cmp [rbp+var_230], 7Eh ; '~'
jnz short loc_3435A
mov byte ptr [rax], 2Eh ; '.'
inc rax
loc_3435A:
mov rdi, rax
mov rsi, r15
mov rdx, r13
lea rcx, asc_64978+1; " "
xor r8d, r8d
xor eax, eax
call strxmov
mov rdi, r12
jmp short loc_3439E
loc_34379:
lea rax, my_defaults_extra_file
mov rdi, [rax]
test rdi, rdi
jz short loc_343AD
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
lea rdi, asc_64978+1; " "
loc_3439E:
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
loc_343AD:
mov r13, [rbx]
add rbx, 8
test r13, r13
jnz short loc_34339
loc_343B9:
cmp qword ptr [r14+8], 0
lea r14, [r14+8]
jnz loc_3431D
jmp short loc_343E0
loc_343CA:
mov rax, cs:stdout_ptr
mov rsi, [rax]
lea rdi, aInternalErrorI; "Internal error initializing default dir"...
call _fputs
loc_343E0:
lea rdi, [rbp+var_280]
xor esi, esi
call free_root
loc_343EE:
mov edi, 0Ah
call _putchar
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_34419
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_34419:
call ___stack_chk_fail
| long long my_print_default_files(_BYTE *a1)
{
int v1; // r15d
char **v2; // rbx
long long *inited; // rax
long long *v5; // r14
char **v6; // rbx
long long v7; // r13
_WORD *v8; // rax
int v9; // r9d
char *v10; // rdi
bool v11; // zf
_BYTE v12[64]; // [rsp+0h] [rbp-280h] BYREF
char **v13; // [rsp+40h] [rbp-240h]
char *v14; // [rsp+48h] [rbp-238h]
_WORD v15[256]; // [rsp+50h] [rbp-230h] BYREF
unsigned long long v16; // [rsp+250h] [rbp-30h]
v1 = (int)a1;
v16 = __readfsqword(0x28u);
v2 = (char **)&off_2F1D30;
if ( !*(_BYTE *)fn_ext() )
v2 = &f_extensions;
puts("\nDefault options are read from the following files in the given order:");
if ( my_defaults_file )
return puts(my_defaults_file);
if ( !dirname_length(a1) )
{
init_alloc_root(key_memory_defaults, v12, 512LL, 0LL, 0LL);
inited = (long long *)init_default_directories((long long)v12);
if ( inited )
{
v5 = inited;
if ( *inited )
{
v14 = *v2;
v13 = v2 + 1;
while ( !v14 )
{
LABEL_20:
v11 = v5[1] == 0;
++v5;
if ( v11 )
goto LABEL_23;
}
v6 = v13;
LODWORD(v7) = (_DWORD)v14;
while ( !*(_BYTE *)*v5 )
{
if ( my_defaults_extra_file )
{
fputs(my_defaults_extra_file, stdout);
v10 = " ";
LABEL_18:
fputs(v10, stdout);
}
v7 = (long long)*v6++;
if ( !v7 )
goto LABEL_20;
}
v8 = convert_dirname(v15, *v5, 0LL);
if ( LOBYTE(v15[0]) == 126 )
{
*(_BYTE *)v8 = 46;
LODWORD(v8) = (_DWORD)v8 + 1;
}
strxmov((_DWORD)v8, v1, v7, (unsigned int)" ", 0, v9);
v10 = (char *)v15;
goto LABEL_18;
}
}
else
{
fputs("Internal error initializing default directories list", stdout);
}
LABEL_23:
free_root(v12, 0LL);
goto LABEL_24;
}
fputs(a1, stdout);
LABEL_24:
putchar(10LL);
return __readfsqword(0x28u);
}
| my_print_default_files:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00134830
CMP byte ptr [RAX],0x0
LEA RAX,[0x3f1d20]
LEA RBX,[0x3f1d30]
CMOVZ RBX,RAX
LEA RDI,[0x1652c2]
CALL 0x001245c0
LEA RAX,[0x479ce8]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0013429d
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00134419
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001245c0
LAB_0013429d:
MOV RDI,R15
CALL 0x0012a654
TEST RAX,RAX
JZ 0x001342c1
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
MOV RDI,R15
CALL 0x00124400
JMP 0x001343ee
LAB_001342c1:
LEA RAX,[0x4799b8]
MOV EDI,dword ptr [RAX]
LEA R14,[RBP + -0x280]
MOV EDX,0x200
MOV RSI,R14
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00135fe8
MOV RDI,R14
CALL 0x0013410b
TEST RAX,RAX
JZ 0x001343ca
MOV R14,RAX
CMP qword ptr [RAX],0x0
JZ 0x001343e0
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBP + -0x238],RAX
ADD RBX,0x8
MOV qword ptr [RBP + -0x240],RBX
LEA R12,[RBP + -0x230]
LAB_0013431d:
CMP qword ptr [RBP + -0x238],0x0
JZ 0x001343b9
MOV RBX,qword ptr [RBP + -0x240]
MOV R13,qword ptr [RBP + -0x238]
LAB_00134339:
MOV RSI,qword ptr [R14]
CMP byte ptr [RSI],0x0
JZ 0x00134379
MOV RDI,R12
XOR EDX,EDX
CALL 0x0012a6cf
CMP byte ptr [RBP + -0x230],0x7e
JNZ 0x0013435a
MOV byte ptr [RAX],0x2e
INC RAX
LAB_0013435a:
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R13
LEA RCX,[0x164979]
XOR R8D,R8D
XOR EAX,EAX
CALL 0x0016322c
MOV RDI,R12
JMP 0x0013439e
LAB_00134379:
LEA RAX,[0x479cf8]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x001343ad
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
CALL 0x00124400
LEA RDI,[0x164979]
LAB_0013439e:
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
CALL 0x00124400
LAB_001343ad:
MOV R13,qword ptr [RBX]
ADD RBX,0x8
TEST R13,R13
JNZ 0x00134339
LAB_001343b9:
CMP qword ptr [R14 + 0x8],0x0
LEA R14,[R14 + 0x8]
JNZ 0x0013431d
JMP 0x001343e0
LAB_001343ca:
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x165309]
CALL 0x00124400
LAB_001343e0:
LEA RDI,[RBP + -0x280]
XOR ESI,ESI
CALL 0x001363b7
LAB_001343ee:
MOV EDI,0xa
CALL 0x001244c0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00134419
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00134419:
CALL 0x001243e0
|
void my_print_default_files(char *param_1)
{
long *plVar1;
int *puVar2;
char *pcVar3;
long lVar4;
long *plVar5;
int1 *puVar6;
int **ppuVar7;
long in_FS_OFFSET;
int1 local_288 [64];
int **local_248;
int *local_240;
char local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = (char *)fn_ext();
ppuVar7 = &PTR_DAT_003f1d30;
if (*pcVar3 == '\0') {
ppuVar7 = (int **)f_extensions;
}
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file == (char *)0x0) {
lVar4 = dirname_length(param_1);
if (lVar4 == 0) {
init_alloc_root(key_memory_defaults,local_288,0x200,0,0);
plVar5 = (long *)init_default_directories(local_288);
if (plVar5 == (long *)0x0) {
fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_003f9fa0);
}
else if (*plVar5 != 0) {
local_240 = *ppuVar7;
local_248 = ppuVar7 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
do {
while (puVar2 != (int *)0x0) {
if (*(char *)*plVar5 == '\0') {
if (my_defaults_extra_file != (char *)0x0) {
fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_003f9fa0);
pcVar3 = " ";
goto LAB_0013439e;
}
}
else {
puVar6 = (int1 *)convert_dirname(local_238,(char *)*plVar5,0);
if (local_238[0] == '~') {
*puVar6 = 0x2e;
puVar6 = puVar6 + 1;
}
strxmov(puVar6,param_1,puVar2,&DAT_00164979,0);
pcVar3 = local_238;
LAB_0013439e:
fputs(pcVar3,*(FILE **)PTR_stdout_003f9fa0);
}
puVar2 = *ppuVar7;
ppuVar7 = ppuVar7 + 1;
}
plVar1 = plVar5 + 1;
plVar5 = plVar5 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
} while (*plVar1 != 0);
}
free_root(local_288,0);
}
else {
fputs(param_1,*(FILE **)PTR_stdout_003f9fa0);
}
putchar(10);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
else if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
puts(my_defaults_file);
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
49,005 | SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _resolve_ref(const std::string & ref) {
std::string ref_name = ref.substr(ref.find_last_of('/') + 1);
if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) {
_refs_being_resolved.insert(ref);
json resolved = _refs[ref];
ref_name = visit(resolved, ref_name);
_refs_being_resolved.erase(ref);
}
return ref_name;
} | O0 | cpp | SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xf8, %rsp
movq %rdi, 0x58(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x50(%rsp)
movb $0x0, 0xdf(%rsp)
movq 0xe0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movl $0x2f, %esi
movq $-0x1, %rdx
movq %rdx, 0x48(%rsp)
callq 0x5b4b0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
movq 0x58(%rsp), %rdi
movq %rax, %rdx
incq %rdx
callq 0x5c340
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
addq $0x28, %rdi
callq 0x1b02f0
movq %rax, 0x60(%rsp)
jmp 0x1b3e08
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0xd0(%rsp)
addq $0x28, %rdi
callq 0x1aad10
movq %rax, 0xb8(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x1aacf0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x37(%rsp)
jne 0x1b3e4f
jmp 0x1b3eae
movq 0x50(%rsp), %rdi
addq $0x90, %rdi
movq 0xe0(%rsp), %rsi
callq 0x1b6950
movq %rax, 0x28(%rsp)
jmp 0x1b3e6f
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0xb0(%rsp)
addq $0x90, %rdi
callq 0x1b6980
movq %rax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x1b6ac0
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x1b3ebb
jmp 0x1b3fc7
movq 0x50(%rsp), %rdi
addq $0x90, %rdi
movq 0xe0(%rsp), %rsi
callq 0xfe5f0
movb %dl, 0x1f(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x1b3edf
movq 0x50(%rsp), %rdi
movb 0x1f(%rsp), %al
movq 0x20(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movb %al, 0xa0(%rsp)
addq $0x58, %rdi
movq 0xe0(%rsp), %rsi
callq 0x1b6ae0
movq %rax, 0x10(%rsp)
jmp 0x1b3f14
movq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xb7050
jmp 0x1b3f28
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rsi
leaq 0x68(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x1b0860
jmp 0x1b3f46
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x5ba60
movq 0x8(%rsp), %rdi
callq 0x5c7f8
movq 0x50(%rsp), %rdi
addq $0x90, %rdi
movq 0xe0(%rsp), %rsi
callq 0x1b6b10
jmp 0x1b3f7f
leaq 0x88(%rsp), %rdi
callq 0xa68f0
jmp 0x1b3fc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x1b3ff0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xa68f0
jmp 0x1b3ff0
movb $0x1, 0xdf(%rsp)
testb $0x1, 0xdf(%rsp)
jne 0x1b3fe3
movq 0x58(%rsp), %rdi
callq 0x5c7f8
movq 0x38(%rsp), %rax
addq $0xf8, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x5c7f8
movq 0xc8(%rsp), %rdi
callq 0x5bd10
nopw (%rax,%rax)
| _ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0F8h
mov [rsp+0F8h+var_A0], rdi
mov rax, rdi
mov [rsp+0F8h+var_C0], rax
mov [rsp+0F8h+var_8], rdi
mov [rsp+0F8h+var_10], rsi
mov [rsp+0F8h+var_18], rdx
mov rax, [rsp+0F8h+var_10]
mov [rsp+0F8h+var_A8], rax
mov [rsp+0F8h+var_19], 0
mov rdi, [rsp+0F8h+var_18]
mov [rsp+0F8h+var_B8], rdi
mov esi, 2Fh ; '/'
mov rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+0F8h+var_B0], rdx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong)
mov rsi, [rsp+0F8h+var_B8]
mov rcx, [rsp+0F8h+var_B0]
mov rdi, [rsp+0F8h+var_A0]
mov rdx, rax
inc rdx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+0F8h+var_A8]
mov rsi, [rsp+0F8h+var_A0]
add rdi, 28h ; '('
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE4findERS9_; std::map<std::string,std::string>::find(std::string const&)
mov [rsp+0F8h+var_98], rax
jmp short $+2
loc_1B3E08:
mov rdi, [rsp+0F8h+var_A8]
mov rax, [rsp+0F8h+var_98]
mov [rsp+0F8h+var_28], rax
add rdi, 28h ; '('
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void)
mov [rsp+0F8h+var_40], rax
lea rdi, [rsp+0F8h+var_28]
lea rsi, [rsp+0F8h+var_40]
call _ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator==(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&)
mov cl, al
xor eax, eax
test cl, 1
mov [rsp+0F8h+var_C1], al
jnz short loc_1B3E4F
jmp short loc_1B3EAE
loc_1B3E4F:
mov rdi, [rsp+0F8h+var_A8]
add rdi, 90h
mov rsi, [rsp+0F8h+var_18]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE4findERKS5_; std::unordered_set<std::string>::find(std::string const&)
mov [rsp+0F8h+var_D0], rax
jmp short $+2
loc_1B3E6F:
mov rdi, [rsp+0F8h+var_A8]
mov rax, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_48], rax
add rdi, 90h
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE3endEv; std::unordered_set<std::string>::end(void)
mov [rsp+0F8h+var_50], rax
lea rdi, [rsp+0F8h+var_48]
lea rsi, [rsp+0F8h+var_50]
call _ZNSt8__detaileqERKNS_19_Node_iterator_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1EEES9_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::string,true> const&,std::__detail::_Node_iterator_base<std::string,true> const&)
mov [rsp+0F8h+var_C1], al
loc_1B3EAE:
mov al, [rsp+0F8h+var_C1]
test al, 1
jnz short loc_1B3EBB
jmp loc_1B3FC7
loc_1B3EBB:
mov rdi, [rsp+0F8h+var_A8]
add rdi, 90h
mov rsi, [rsp+0F8h+var_18]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertERKS5_; std::unordered_set<std::string>::insert(std::string const&)
mov [rsp+0F8h+var_D9], dl
mov [rsp+0F8h+var_D8], rax
jmp short $+2
loc_1B3EDF:
mov rdi, [rsp+0F8h+var_A8]
mov al, [rsp+0F8h+var_D9]
mov rcx, [rsp+0F8h+var_D8]
mov [rsp+0F8h+var_60], rcx
mov [rsp+0F8h+var_58], al
add rdi, 58h ; 'X'
mov rsi, [rsp+0F8h+var_18]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS7_11ordered_mapESt6vectorS5_blmdSaNS7_14adl_serializerESA_IhSaIhEEvEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SE_EEEixERSK_; std::unordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](std::string const&)
mov [rsp+0F8h+var_E8], rax
jmp short $+2
loc_1B3F14:
mov rsi, [rsp+0F8h+var_E8]
lea rdi, [rsp+0F8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short $+2
loc_1B3F28:
mov rcx, [rsp+0F8h+var_A0]
mov rsi, [rsp+0F8h+var_A8]
lea rdi, [rsp+0F8h+var_90]
lea rdx, [rsp+0F8h+var_70]
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&)
jmp short $+2
loc_1B3F46:
mov rdi, [rsp+0F8h+var_A0]
lea rsi, [rsp+0F8h+var_90]
mov [rsp+0F8h+var_F0], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0F8h+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+0F8h+var_A8]
add rdi, 90h
mov rsi, [rsp+0F8h+var_18]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5eraseERKS5_; std::unordered_set<std::string>::erase(std::string const&)
jmp short $+2
loc_1B3F7F:
lea rdi, [rsp+0F8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_1B3FC7
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_1B3FF0
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
lea rdi, [rsp+arg_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_1B3FF0
loc_1B3FC7:
mov [rsp+0F8h+var_19], 1
test [rsp+0F8h+var_19], 1
jnz short loc_1B3FE3
mov rdi, [rsp+0F8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1B3FE3:
mov rax, [rsp+0F8h+var_C0]
add rsp, 0F8h
retn
loc_1B3FF0:
mov rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_C0]
call __Unwind_Resume
| long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3)
{
long long last_of; // rax
char v4; // dl
long long v6; // [rsp+10h] [rbp-E8h]
char v7; // [rsp+37h] [rbp-C1h]
_BYTE v9[32]; // [rsp+68h] [rbp-90h] BYREF
_BYTE v10[16]; // [rsp+88h] [rbp-70h] BYREF
long long v11; // [rsp+98h] [rbp-60h]
char v12; // [rsp+A0h] [rbp-58h]
long long v13; // [rsp+A8h] [rbp-50h] BYREF
long long v14; // [rsp+B0h] [rbp-48h] BYREF
long long v15[3]; // [rsp+B8h] [rbp-40h] BYREF
long long v16; // [rsp+D0h] [rbp-28h] BYREF
char v17; // [rsp+DFh] [rbp-19h]
long long v18; // [rsp+E0h] [rbp-18h]
long long v19; // [rsp+E8h] [rbp-10h]
long long v20; // [rsp+F0h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = 0;
last_of = std::string::find_last_of(a3, 47LL);
std::string::substr(a1, a3, last_of + 1, -1LL);
v16 = std::map<std::string,std::string>::find(a2 + 40, a1);
v15[0] = std::map<std::string,std::string>::end(a2 + 40);
v7 = 0;
if ( std::operator==(&v16, v15) )
{
v14 = std::unordered_set<std::string>::find(a2 + 144, v18);
v13 = std::unordered_set<std::string>::end(a2 + 144);
v7 = std::__detail::operator==(&v14, &v13);
}
if ( (v7 & 1) != 0 )
{
v11 = std::unordered_set<std::string>::insert(a2 + 144, v18);
v12 = v4;
v6 = std::unordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[](
a2 + 88,
v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v10,
v6);
SchemaConverter::visit((long long)v9, a2, (long long)v10, a1);
std::string::operator=(a1, v9);
std::string::~string(v9);
std::unordered_set<std::string>::erase(a2 + 144, v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v10);
}
return a1;
}
| |||
49,006 | SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _resolve_ref(const std::string & ref) {
std::string ref_name = ref.substr(ref.find_last_of('/') + 1);
if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) {
_refs_being_resolved.insert(ref);
json resolved = _refs[ref];
ref_name = visit(resolved, ref_name);
_refs_being_resolved.erase(ref);
}
return ref_name;
} | O2 | cpp | SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x2f
popq %rsi
pushq $-0x1
popq %r12
movq %rdx, %rdi
movq %r12, %rdx
callq 0x25400
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0x24ab0
leaq 0x28(%r15), %rdi
movq %rbx, %rsi
callq 0x91186
leaq 0x30(%r15), %rcx
cmpq %rcx, %rax
jne 0x9311c
leaq 0x90(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x94402
testq %rax, %rax
jne 0x9311c
movq %r12, %rdi
movq %r14, %rsi
callq 0x8b8fe
leaq 0x58(%r15), %rdi
movq %r14, %rsi
callq 0x94430
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x44a72
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x9130c
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24c70
movq %r15, %rdi
callq 0x25478
movq %r12, %rdi
movq %r14, %rsi
callq 0x9482e
leaq 0x8(%rsp), %rdi
callq 0x3fdb6
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x9312d
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3fdb6
jmp 0x93145
jmp 0x93142
jmp 0x93142
jmp 0x93142
movq %rax, %r14
movq %rbx, %rdi
callq 0x25478
movq %r14, %rdi
callq 0x251e0
nop
| _ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
push 2Fh ; '/'
pop rsi
push 0FFFFFFFFFFFFFFFFh
pop r12
mov rdi, rdx
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
lea rdx, [rax+1]
mov rdi, rbx
mov rsi, r14
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [r15+28h]
mov rsi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; 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>>>::find(std::string const&)
lea rcx, [r15+30h]
cmp rax, rcx
jnz short loc_9311C
lea r12, [r15+90h]
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&)
test rax, rax
jnz short loc_9311C
mov rdi, r12
mov rsi, r14
call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(std::string const&)
lea rdi, [r15+58h]
mov rsi, r14
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,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>,true>::operator[](std::string const&)
lea rdi, [rsp+58h+var_50]
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rdi, [rsp+58h+var_40]
lea rdx, [rsp+58h+var_50]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&)
lea r15, [rsp+58h+var_40]
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(std::integral_constant<bool,true>,std::string const&)
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_9311C:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_9312D:
mov r14, rax
lea rdi, [rsp+arg_0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_93145
jmp short loc_93142
jmp short loc_93142
jmp short $+2
loc_93142:
mov r14, rax
loc_93145:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4)
{
long long v5; // rax
long long v6; // rdx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
unsigned __int8 *v14; // rax
unsigned __int8 v16[16]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v17[8]; // [rsp+18h] [rbp-40h] BYREF
v5 = std::string::rfind(a3, 47LL, -1LL);
std::string::substr(a1, a3, v5 + 1, -1LL);
if ( 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>>>::find(
a2 + 40,
a1) == a2 + 48
&& !std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(
a2 + 144,
a3) )
{
std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(
a2 + 144,
a3,
v6,
v7,
v8,
v9);
v14 = (unsigned __int8 *)std::__detail::_Map_base<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,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>,true>::operator[](
(int)a2 + 88,
a3,
v10,
v11,
v12,
v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v16,
v14);
SchemaConverter::visit(v17, a2, v16, a1, a4);
std::string::operator=(a1, v17);
std::string::~string(v17);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(
a2 + 144,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v16);
}
return a1;
}
| _resolve_ref:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
PUSH 0x2f
POP RSI
PUSH -0x1
POP R12
MOV RDI,RDX
MOV RDX,R12
CALL 0x00125400
LEA RDX,[RAX + 0x1]
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R12
CALL 0x00124ab0
LEA RDI,[R15 + 0x28]
LAB_0019308e:
MOV RSI,RBX
CALL 0x00191186
LEA RCX,[R15 + 0x30]
CMP RAX,RCX
JNZ 0x0019311c
LEA R12,[R15 + 0x90]
LAB_001930a6:
MOV RDI,R12
MOV RSI,R14
CALL 0x00194402
TEST RAX,RAX
JNZ 0x0019311c
LAB_001930b6:
MOV RDI,R12
MOV RSI,R14
CALL 0x0018b8fe
LEA RDI,[R15 + 0x58]
LAB_001930c5:
MOV RSI,R14
CALL 0x00194430
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00144a72
LAB_001930da:
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x0019130c
LEA R15,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
CALL 0x00124c70
MOV RDI,R15
CALL 0x00125478
LAB_00193107:
MOV RDI,R12
MOV RSI,R14
CALL 0x0019482e
LAB_00193112:
LEA RDI,[RSP + 0x8]
CALL 0x0013fdb6
LAB_0019311c:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */
string * SchemaConverter::_resolve_ref(string *param_1)
{
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*this;
string *psVar1;
long lVar2;
basic_json *pbVar3;
string *in_RDX;
string *in_RSI;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_50 [16];
string local_40 [32];
std::__cxx11::string::rfind((char)in_RDX,0x2f);
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX);
/* try { // try from 0019308e to 00193095 has its CatchHandler @ 00193142 */
psVar1 = (string *)
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>>>
::find((_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>>>
*)(in_RSI + 0x28),param_1);
if (psVar1 == in_RSI + 0x30) {
this = (_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(in_RSI + 0x90);
/* try { // try from 001930a6 to 001930b0 has its CatchHandler @ 00193140 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::find(this,in_RDX);
if (lVar2 == 0) {
/* try { // try from 001930b6 to 001930c0 has its CatchHandler @ 0019313c */
std::__detail::
_Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::insert((string *)this);
/* try { // try from 001930c5 to 001930d9 has its CatchHandler @ 0019313e */
pbVar3 = (basic_json *)
std::__detail::
_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,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>,true>
::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,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>,true>
*)(in_RSI + 0x58),in_RDX);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_50,pbVar3);
/* try { // try from 001930da to 001930ee has its CatchHandler @ 0019312d */
visit(local_40,in_RSI);
std::__cxx11::string::operator=(param_1,local_40);
std::__cxx11::string::~string(local_40);
/* try { // try from 00193107 to 00193111 has its CatchHandler @ 0019312b */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_erase(this);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_50);
}
}
return param_1;
}
| |
49,007 | SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _resolve_ref(const std::string & ref) {
std::string ref_name = ref.substr(ref.find_last_of('/') + 1);
if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) {
_refs_being_resolved.insert(ref);
json resolved = _refs[ref];
ref_name = visit(resolved, ref_name);
_refs_being_resolved.erase(ref);
}
return ref_name;
} | O3 | cpp | SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x1c3d0
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x1ba80
leaq 0x28(%r15), %rdi
movq %rbx, %rsi
callq 0xc35c8
leaq 0x30(%r15), %rcx
cmpq %rcx, %rax
jne 0xc6441
leaq 0x90(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc8662
testq %rax, %rax
jne 0xc6441
leaq 0x18(%rsp), %rdx
movq %r12, (%rdx)
movq %r12, %rdi
movq %r14, %rsi
callq 0xbb8de
leaq 0x58(%r15), %rdi
movq %r14, %rsi
callq 0xc869c
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x6046c
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0xc374a
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bc30
movq (%r15), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xc641f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq %r12, %rdi
movq %r14, %rsi
callq 0xc8af2
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5b4ca
movq %r14, %rdi
callq 0x60938
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xc6452
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x5b4ca
movq %r15, %rdi
callq 0x60938
jmp 0xc6477
jmp 0xc6474
jmp 0xc6474
jmp 0xc6474
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0xc648e
movq (%rbx), %rsi
incq %rsi
callq 0x1ba20
movq %r14, %rdi
callq 0x1c1e0
| _ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rdx
mov esi, 2Fh ; '/'
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
lea rdx, [rax+1]
mov rdi, rbx
mov rsi, r14
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [r15+28h]
mov rsi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; 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>>>::find(std::string const&)
lea rcx, [r15+30h]
cmp rax, rcx
jnz loc_C6441
lea r12, [r15+90h]
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&)
test rax, rax
jnz loc_C6441
lea rdx, [rsp+58h+var_40]
mov [rdx], r12
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>)
lea rdi, [r15+58h]
mov rsi, r14
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,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>,true>::operator[](std::string const&)
lea rdi, [rsp+58h+var_50]
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rdi, [rsp+58h+var_40]
lea rdx, [rsp+58h+var_50]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&)
lea r15, [rsp+58h+var_40]
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; void *
lea rax, [rsp+58h+var_30]
cmp rdi, rax
jz short loc_C641F
mov rsi, [rsp+58h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C641F:
mov rdi, r12
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(std::integral_constant<bool,true>,std::string const&)
lea r14, [rsp+58h+var_50]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_C6441:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_C6452:
mov r14, rax
lea r15, [rsp+arg_0]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_C6477
jmp short loc_C6474
jmp short loc_C6474
jmp short $+2
loc_C6474:
mov r14, rax
loc_C6477:
mov rdi, [rbx]; void *
add rbx, 10h
cmp rdi, rbx
jz short loc_C648E
mov rsi, [rbx]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C648E:
mov rdi, r14
call __Unwind_Resume
| long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4)
{
long long v5; // rax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
unsigned __int8 *v10; // rax
unsigned __int8 v12[16]; // [rsp+8h] [rbp-50h] BYREF
void *v13[2]; // [rsp+18h] [rbp-40h] BYREF
long long v14; // [rsp+28h] [rbp-30h] BYREF
v5 = std::string::rfind(a3, 47LL, -1LL);
std::string::substr(a1, a3, v5 + 1, -1LL);
if ( 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>>>::find(
a2 + 40,
a1) == a2 + 48
&& !std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(
a2 + 144,
a3) )
{
v13[0] = (void *)(a2 + 144);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(
a2 + 144,
a3,
v13);
v10 = (unsigned __int8 *)std::__detail::_Map_base<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,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>,true>::operator[](
(int)a2 + 88,
a3,
v6,
v7,
v8,
v9);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v12,
v10);
SchemaConverter::visit(v13, a2, (long long)v12, a1, a4);
std::string::operator=(a1, v13);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(
a2 + 144,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v12);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v12);
}
return a1;
}
| _resolve_ref:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RDX
MOV ESI,0x2f
MOV RDX,-0x1
CALL 0x0011c3d0
LEA RDX,[RAX + 0x1]
MOV RDI,RBX
MOV RSI,R14
MOV RCX,-0x1
CALL 0x0011ba80
LEA RDI,[R15 + 0x28]
LAB_001c6384:
MOV RSI,RBX
CALL 0x001c35c8
LEA RCX,[R15 + 0x30]
CMP RAX,RCX
JNZ 0x001c6441
LEA R12,[R15 + 0x90]
LAB_001c63a0:
MOV RDI,R12
MOV RSI,R14
CALL 0x001c8662
TEST RAX,RAX
JNZ 0x001c6441
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX],R12
LAB_001c63bc:
MOV RDI,R12
MOV RSI,R14
CALL 0x001bb8de
LEA RDI,[R15 + 0x58]
LAB_001c63cb:
MOV RSI,R14
CALL 0x001c869c
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x0016046c
LAB_001c63e0:
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x001c374a
LEA R15,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011bc30
MOV RDI,qword ptr [R15]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
JZ 0x001c641f
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011ba20
LAB_001c641f:
MOV RDI,R12
MOV RSI,R14
CALL 0x001c8af2
LAB_001c642a:
LEA R14,[RSP + 0x8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015b4ca
MOV RDI,R14
CALL 0x00160938
LAB_001c6441:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */
string * SchemaConverter::_resolve_ref(string *param_1)
{
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*this;
string *psVar1;
long lVar2;
basic_json *pbVar3;
string *in_RDX;
string *in_RSI;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_50 [16];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*local_40 [2];
long local_30 [2];
std::__cxx11::string::rfind((char)in_RDX,0x2f);
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX);
/* try { // try from 001c6384 to 001c638b has its CatchHandler @ 001c6474 */
psVar1 = (string *)
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>>>
::find((_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>>>
*)(in_RSI + 0x28),param_1);
if (psVar1 == in_RSI + 0x30) {
this = (_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(in_RSI + 0x90);
/* try { // try from 001c63a0 to 001c63aa has its CatchHandler @ 001c6472 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::find(this,in_RDX);
if (lVar2 == 0) {
local_40[0] = this;
/* try { // try from 001c63bc to 001c63c6 has its CatchHandler @ 001c646e */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::
_M_insert<std::__cxx11::string_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::__cxx11::string,true>>>>
(this);
/* try { // try from 001c63cb to 001c63df has its CatchHandler @ 001c6470 */
pbVar3 = (basic_json *)
std::__detail::
_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,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>,true>
::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,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>,true>
*)(in_RSI + 0x58),in_RDX);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_50,pbVar3);
/* try { // try from 001c63e0 to 001c63f4 has its CatchHandler @ 001c6452 */
visit((basic_json *)local_40,in_RSI);
std::__cxx11::string::operator=(param_1,(string *)local_40);
if (local_40[0] !=
(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
/* try { // try from 001c641f to 001c6429 has its CatchHandler @ 001c6450 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_erase(this);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_50,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_50);
}
}
return param_1;
}
| |
49,008 | HA_ERR(int) | eloqsql/sql/log_event_server.cc | static const char *HA_ERR(int i)
{
/*
This function should only be called in case of an error
was detected
*/
DBUG_ASSERT(i != 0);
switch (i) {
case HA_ERR_KEY_NOT_FOUND: return "HA_ERR_KEY_NOT_FOUND";
case HA_ERR_FOUND_DUPP_KEY: return "HA_ERR_FOUND_DUPP_KEY";
case HA_ERR_RECORD_CHANGED: return "HA_ERR_RECORD_CHANGED";
case HA_ERR_WRONG_INDEX: return "HA_ERR_WRONG_INDEX";
case HA_ERR_CRASHED: return "HA_ERR_CRASHED";
case HA_ERR_WRONG_IN_RECORD: return "HA_ERR_WRONG_IN_RECORD";
case HA_ERR_OUT_OF_MEM: return "HA_ERR_OUT_OF_MEM";
case HA_ERR_NOT_A_TABLE: return "HA_ERR_NOT_A_TABLE";
case HA_ERR_WRONG_COMMAND: return "HA_ERR_WRONG_COMMAND";
case HA_ERR_OLD_FILE: return "HA_ERR_OLD_FILE";
case HA_ERR_NO_ACTIVE_RECORD: return "HA_ERR_NO_ACTIVE_RECORD";
case HA_ERR_RECORD_DELETED: return "HA_ERR_RECORD_DELETED";
case HA_ERR_RECORD_FILE_FULL: return "HA_ERR_RECORD_FILE_FULL";
case HA_ERR_INDEX_FILE_FULL: return "HA_ERR_INDEX_FILE_FULL";
case HA_ERR_END_OF_FILE: return "HA_ERR_END_OF_FILE";
case HA_ERR_UNSUPPORTED: return "HA_ERR_UNSUPPORTED";
case HA_ERR_TO_BIG_ROW: return "HA_ERR_TO_BIG_ROW";
case HA_WRONG_CREATE_OPTION: return "HA_WRONG_CREATE_OPTION";
case HA_ERR_FOUND_DUPP_UNIQUE: return "HA_ERR_FOUND_DUPP_UNIQUE";
case HA_ERR_UNKNOWN_CHARSET: return "HA_ERR_UNKNOWN_CHARSET";
case HA_ERR_WRONG_MRG_TABLE_DEF: return "HA_ERR_WRONG_MRG_TABLE_DEF";
case HA_ERR_CRASHED_ON_REPAIR: return "HA_ERR_CRASHED_ON_REPAIR";
case HA_ERR_CRASHED_ON_USAGE: return "HA_ERR_CRASHED_ON_USAGE";
case HA_ERR_LOCK_WAIT_TIMEOUT: return "HA_ERR_LOCK_WAIT_TIMEOUT";
case HA_ERR_LOCK_TABLE_FULL: return "HA_ERR_LOCK_TABLE_FULL";
case HA_ERR_READ_ONLY_TRANSACTION: return "HA_ERR_READ_ONLY_TRANSACTION";
case HA_ERR_LOCK_DEADLOCK: return "HA_ERR_LOCK_DEADLOCK";
case HA_ERR_CANNOT_ADD_FOREIGN: return "HA_ERR_CANNOT_ADD_FOREIGN";
case HA_ERR_NO_REFERENCED_ROW: return "HA_ERR_NO_REFERENCED_ROW";
case HA_ERR_ROW_IS_REFERENCED: return "HA_ERR_ROW_IS_REFERENCED";
case HA_ERR_NO_SAVEPOINT: return "HA_ERR_NO_SAVEPOINT";
case HA_ERR_NON_UNIQUE_BLOCK_SIZE: return "HA_ERR_NON_UNIQUE_BLOCK_SIZE";
case HA_ERR_NO_SUCH_TABLE: return "HA_ERR_NO_SUCH_TABLE";
case HA_ERR_TABLE_EXIST: return "HA_ERR_TABLE_EXIST";
case HA_ERR_NO_CONNECTION: return "HA_ERR_NO_CONNECTION";
case HA_ERR_NULL_IN_SPATIAL: return "HA_ERR_NULL_IN_SPATIAL";
case HA_ERR_TABLE_DEF_CHANGED: return "HA_ERR_TABLE_DEF_CHANGED";
case HA_ERR_NO_PARTITION_FOUND: return "HA_ERR_NO_PARTITION_FOUND";
case HA_ERR_RBR_LOGGING_FAILED: return "HA_ERR_RBR_LOGGING_FAILED";
case HA_ERR_DROP_INDEX_FK: return "HA_ERR_DROP_INDEX_FK";
case HA_ERR_FOREIGN_DUPLICATE_KEY: return "HA_ERR_FOREIGN_DUPLICATE_KEY";
case HA_ERR_TABLE_NEEDS_UPGRADE: return "HA_ERR_TABLE_NEEDS_UPGRADE";
case HA_ERR_TABLE_READONLY: return "HA_ERR_TABLE_READONLY";
case HA_ERR_AUTOINC_READ_FAILED: return "HA_ERR_AUTOINC_READ_FAILED";
case HA_ERR_AUTOINC_ERANGE: return "HA_ERR_AUTOINC_ERANGE";
case HA_ERR_GENERIC: return "HA_ERR_GENERIC";
case HA_ERR_RECORD_IS_THE_SAME: return "HA_ERR_RECORD_IS_THE_SAME";
case HA_ERR_LOGGING_IMPOSSIBLE: return "HA_ERR_LOGGING_IMPOSSIBLE";
case HA_ERR_CORRUPT_EVENT: return "HA_ERR_CORRUPT_EVENT";
case HA_ERR_ROWS_EVENT_APPLY : return "HA_ERR_ROWS_EVENT_APPLY";
case HA_ERR_PARTITION_LIST : return "HA_ERR_PARTITION_LIST";
}
return "No Error!";
} | O0 | cpp | HA_ERR(int):
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
jmp 0x87d879
movl -0xc(%rbp), %eax
addl $-0x78, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4e, %eax
ja 0x87dbb7
movq -0x18(%rbp), %rax
leaq 0xc2efff(%rip), %rcx # 0x14ac898
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb8e638(%rip), %rax # 0x140bee1
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e63d(%rip), %rax # 0x140bef6
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e643(%rip), %rax # 0x140bf0c
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e649(%rip), %rax # 0x140bf22
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e64c(%rip), %rax # 0x140bf35
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e64b(%rip), %rax # 0x140bf44
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e652(%rip), %rax # 0x140bf5b
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e654(%rip), %rax # 0x140bf6d
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e657(%rip), %rax # 0x140bf80
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e65c(%rip), %rax # 0x140bf95
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e65c(%rip), %rax # 0x140bfa5
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e664(%rip), %rax # 0x140bfbd
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e66a(%rip), %rax # 0x140bfd3
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e672(%rip), %rax # 0x140bfeb
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e679(%rip), %rax # 0x140c002
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e67c(%rip), %rax # 0x140c015
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e67f(%rip), %rax # 0x140c028
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e681(%rip), %rax # 0x140c03a
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e688(%rip), %rax # 0x140c051
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e691(%rip), %rax # 0x140c06a
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e698(%rip), %rax # 0x140c081
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6a3(%rip), %rax # 0x140c09c
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6ac(%rip), %rax # 0x140c0b5
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6b4(%rip), %rax # 0x140c0cd
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6bd(%rip), %rax # 0x140c0e6
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6c4(%rip), %rax # 0x140c0fd
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6d1(%rip), %rax # 0x140c11a
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6d6(%rip), %rax # 0x140c12f
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6e0(%rip), %rax # 0x140c149
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6e9(%rip), %rax # 0x140c162
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6f2(%rip), %rax # 0x140c17b
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e6f6(%rip), %rax # 0x140c18f
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e703(%rip), %rax # 0x140c1ac
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e708(%rip), %rax # 0x140c1c1
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e70b(%rip), %rax # 0x140c1d4
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e710(%rip), %rax # 0x140c1e9
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e717(%rip), %rax # 0x140c200
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e720(%rip), %rax # 0x140c219
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e72a(%rip), %rax # 0x140c233
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e734(%rip), %rax # 0x140c24d
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e739(%rip), %rax # 0x140c262
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e746(%rip), %rax # 0x140c27f
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e751(%rip), %rax # 0x140c29a
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e75a(%rip), %rax # 0x140c2b0
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e768(%rip), %rax # 0x140c2cb
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e771(%rip), %rax # 0x140c2e1
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e773(%rip), %rax # 0x140c2f0
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e780(%rip), %rax # 0x140c30a
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e78d(%rip), %rax # 0x140c324
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e795(%rip), %rax # 0x140c339
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e7a0(%rip), %rax # 0x140c351
movq %rax, -0x8(%rbp)
jmp 0x87dbc2
leaq 0xb8e7a9(%rip), %rax # 0x140c367
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| _ZL6HA_ERRi:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
jmp short $+2
loc_87D879:
mov eax, [rbp+var_C]
add eax, 0FFFFFF88h; switch 79 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 4Eh
ja def_87D8A0; jumptable 000000000087D8A0 default case, cases 122,125,129,172,174-197
mov rax, [rbp+var_18]
lea rcx, jpt_87D8A0
movsxd rax, ds:(jpt_87D8A0 - 14AC898h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_87D8A2:
lea rax, aHaErrKeyNotFou; jumptable 000000000087D8A0 case 120
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D8B2:
lea rax, aHaErrFoundDupp; jumptable 000000000087D8A0 case 121
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D8C2:
lea rax, aHaErrRecordCha; jumptable 000000000087D8A0 case 123
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D8D2:
lea rax, aHaErrWrongInde; jumptable 000000000087D8A0 case 124
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D8E2:
lea rax, aHaErrCrashed; jumptable 000000000087D8A0 case 126
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D8F2:
lea rax, aHaErrWrongInRe; jumptable 000000000087D8A0 case 127
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D902:
lea rax, aHaErrOutOfMem; jumptable 000000000087D8A0 case 128
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D912:
lea rax, aHaErrNotATable; jumptable 000000000087D8A0 case 130
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D922:
lea rax, aHaErrWrongComm; jumptable 000000000087D8A0 case 131
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D932:
lea rax, aHaErrOldFile; jumptable 000000000087D8A0 case 132
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D942:
lea rax, aHaErrNoActiveR; jumptable 000000000087D8A0 case 133
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D952:
lea rax, aHaErrRecordDel; jumptable 000000000087D8A0 case 134
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D962:
lea rax, aHaErrRecordFil; jumptable 000000000087D8A0 case 135
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D972:
lea rax, aHaErrIndexFile; jumptable 000000000087D8A0 case 136
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D982:
lea rax, aHaErrEndOfFile; jumptable 000000000087D8A0 case 137
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D992:
lea rax, aHaErrUnsupport; jumptable 000000000087D8A0 case 138
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D9A2:
lea rax, aHaErrToBigRow; jumptable 000000000087D8A0 case 139
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D9B2:
lea rax, aHaWrongCreateO; jumptable 000000000087D8A0 case 140
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D9C2:
lea rax, aHaErrFoundDupp_0; jumptable 000000000087D8A0 case 141
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D9D2:
lea rax, aHaErrUnknownCh; jumptable 000000000087D8A0 case 142
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D9E2:
lea rax, aHaErrWrongMrgT; jumptable 000000000087D8A0 case 143
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87D9F2:
lea rax, aHaErrCrashedOn; jumptable 000000000087D8A0 case 144
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA02:
lea rax, aHaErrCrashedOn_0; jumptable 000000000087D8A0 case 145
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA12:
lea rax, aHaErrLockWaitT; jumptable 000000000087D8A0 case 146
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA22:
lea rax, aHaErrLockTable; jumptable 000000000087D8A0 case 147
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA32:
lea rax, aHaErrReadOnlyT; jumptable 000000000087D8A0 case 148
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA42:
lea rax, aHaErrLockDeadl; jumptable 000000000087D8A0 case 149
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA52:
lea rax, aHaErrCannotAdd; jumptable 000000000087D8A0 case 150
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA62:
lea rax, aHaErrNoReferen; jumptable 000000000087D8A0 case 151
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA72:
lea rax, aHaErrRowIsRefe; jumptable 000000000087D8A0 case 152
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA82:
lea rax, aHaErrNoSavepoi; jumptable 000000000087D8A0 case 153
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DA92:
lea rax, aHaErrNonUnique; jumptable 000000000087D8A0 case 154
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DAA2:
lea rax, aHaErrNoSuchTab; jumptable 000000000087D8A0 case 155
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DAB2:
lea rax, aHaErrTableExis; jumptable 000000000087D8A0 case 156
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DAC2:
lea rax, aHaErrNoConnect; jumptable 000000000087D8A0 case 157
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DAD2:
lea rax, aHaErrNullInSpa; jumptable 000000000087D8A0 case 158
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DAE2:
lea rax, aHaErrTableDefC; jumptable 000000000087D8A0 case 159
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DAF2:
lea rax, aHaErrNoPartiti; jumptable 000000000087D8A0 case 160
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DB02:
lea rax, aHaErrRbrLoggin; jumptable 000000000087D8A0 case 161
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DB12:
lea rax, aHaErrDropIndex; jumptable 000000000087D8A0 case 162
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DB22:
lea rax, aHaErrForeignDu; jumptable 000000000087D8A0 case 163
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DB32:
lea rax, aHaErrTableNeed; jumptable 000000000087D8A0 case 164
mov [rbp+var_8], rax
jmp loc_87DBC2
loc_87DB42:
lea rax, aHaErrTableRead; jumptable 000000000087D8A0 case 165
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB4F:
lea rax, aHaErrAutoincRe; jumptable 000000000087D8A0 case 166
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB5C:
lea rax, aHaErrAutoincEr; jumptable 000000000087D8A0 case 167
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB69:
lea rax, aHaErrGeneric; jumptable 000000000087D8A0 case 168
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB76:
lea rax, aHaErrRecordIsT; jumptable 000000000087D8A0 case 169
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB83:
lea rax, aHaErrLoggingIm; jumptable 000000000087D8A0 case 170
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB90:
lea rax, aHaErrCorruptEv; jumptable 000000000087D8A0 case 171
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DB9D:
lea rax, aHaErrRowsEvent; jumptable 000000000087D8A0 case 173
mov [rbp+var_8], rax
jmp short loc_87DBC2
loc_87DBAA:
lea rax, aHaErrPartition; jumptable 000000000087D8A0 case 198
mov [rbp+var_8], rax
jmp short loc_87DBC2
def_87D8A0:
lea rax, aNoError_0; jumptable 000000000087D8A0 default case, cases 122,125,129,172,174-197
mov [rbp+var_8], rax
loc_87DBC2:
mov rax, [rbp+var_8]
pop rbp
retn
| const char * HA_ERR(int a1)
{
const char *v2; // [rsp+10h] [rbp-8h]
switch ( a1 )
{
case 120:
v2 = "HA_ERR_KEY_NOT_FOUND";
break;
case 121:
v2 = "HA_ERR_FOUND_DUPP_KEY";
break;
case 123:
v2 = "HA_ERR_RECORD_CHANGED";
break;
case 124:
v2 = "HA_ERR_WRONG_INDEX";
break;
case 126:
v2 = "HA_ERR_CRASHED";
break;
case 127:
v2 = "HA_ERR_WRONG_IN_RECORD";
break;
case 128:
v2 = "HA_ERR_OUT_OF_MEM";
break;
case 130:
v2 = "HA_ERR_NOT_A_TABLE";
break;
case 131:
v2 = "HA_ERR_WRONG_COMMAND";
break;
case 132:
v2 = "HA_ERR_OLD_FILE";
break;
case 133:
v2 = "HA_ERR_NO_ACTIVE_RECORD";
break;
case 134:
v2 = "HA_ERR_RECORD_DELETED";
break;
case 135:
v2 = "HA_ERR_RECORD_FILE_FULL";
break;
case 136:
v2 = "HA_ERR_INDEX_FILE_FULL";
break;
case 137:
v2 = "HA_ERR_END_OF_FILE";
break;
case 138:
v2 = "HA_ERR_UNSUPPORTED";
break;
case 139:
v2 = "HA_ERR_TO_BIG_ROW";
break;
case 140:
v2 = "HA_WRONG_CREATE_OPTION";
break;
case 141:
v2 = "HA_ERR_FOUND_DUPP_UNIQUE";
break;
case 142:
v2 = "HA_ERR_UNKNOWN_CHARSET";
break;
case 143:
v2 = "HA_ERR_WRONG_MRG_TABLE_DEF";
break;
case 144:
v2 = "HA_ERR_CRASHED_ON_REPAIR";
break;
case 145:
v2 = "HA_ERR_CRASHED_ON_USAGE";
break;
case 146:
v2 = "HA_ERR_LOCK_WAIT_TIMEOUT";
break;
case 147:
v2 = "HA_ERR_LOCK_TABLE_FULL";
break;
case 148:
v2 = "HA_ERR_READ_ONLY_TRANSACTION";
break;
case 149:
v2 = "HA_ERR_LOCK_DEADLOCK";
break;
case 150:
v2 = "HA_ERR_CANNOT_ADD_FOREIGN";
break;
case 151:
v2 = "HA_ERR_NO_REFERENCED_ROW";
break;
case 152:
v2 = "HA_ERR_ROW_IS_REFERENCED";
break;
case 153:
v2 = "HA_ERR_NO_SAVEPOINT";
break;
case 154:
v2 = "HA_ERR_NON_UNIQUE_BLOCK_SIZE";
break;
case 155:
v2 = "HA_ERR_NO_SUCH_TABLE";
break;
case 156:
v2 = "HA_ERR_TABLE_EXIST";
break;
case 157:
v2 = "HA_ERR_NO_CONNECTION";
break;
case 158:
v2 = "HA_ERR_NULL_IN_SPATIAL";
break;
case 159:
v2 = "HA_ERR_TABLE_DEF_CHANGED";
break;
case 160:
v2 = "HA_ERR_NO_PARTITION_FOUND";
break;
case 161:
v2 = "HA_ERR_RBR_LOGGING_FAILED";
break;
case 162:
v2 = "HA_ERR_DROP_INDEX_FK";
break;
case 163:
v2 = "HA_ERR_FOREIGN_DUPLICATE_KEY";
break;
case 164:
v2 = "HA_ERR_TABLE_NEEDS_UPGRADE";
break;
case 165:
v2 = "HA_ERR_TABLE_READONLY";
break;
case 166:
v2 = "HA_ERR_AUTOINC_READ_FAILED";
break;
case 167:
v2 = "HA_ERR_AUTOINC_ERANGE";
break;
case 168:
v2 = "HA_ERR_GENERIC";
break;
case 169:
v2 = "HA_ERR_RECORD_IS_THE_SAME";
break;
case 170:
v2 = "HA_ERR_LOGGING_IMPOSSIBLE";
break;
case 171:
v2 = "HA_ERR_CORRUPT_EVENT";
break;
case 173:
v2 = "HA_ERR_ROWS_EVENT_APPLY";
break;
case 198:
v2 = "HA_ERR_PARTITION_LIST";
break;
default:
v2 = "No Error!";
break;
}
return v2;
}
| __cxx_global_var_init.10:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x1e4e558]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x008fd550
POP RBP
RET
|
void __cxx_global_var_init_10(void)
{
time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_NONE,0);
return;
}
| |
49,009 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>) | llama.cpp/common/json.hpp | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
cmpq %rdx, %rsi
je 0xeb025
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rax
subq %r14, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
leaq (%r15,%rbp), %r12
cmpq 0x8(%rbx), %r12
je 0xeafe4
leaq (%r14,%rbp), %r13
addq $0x50, %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r13, %rdi
callq 0x89918
leaq (%r14,%rbp), %rdi
addq $0x48, %rdi
callq 0x70882
leaq (%r14,%rbp), %rdi
addq $0x38, %rdi
callq 0x70882
leaq (%r14,%rbp), %r13
addq $0x28, %r13
movq %r13, %rdi
callq 0x70882
movq -0x10(%r13), %rdi
testq %rdi, %rdi
je 0xeafba
movq 0x7a003(%rip), %rax # 0x164f98
cmpb $0x0, (%rax)
je 0xeafa5
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xeafaf
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xeafba
movq (%rdi), %rax
callq *0x18(%rax)
leaq (%r14,%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r13, %rdi
callq 0x89918
movq %r13, %rdi
movq %r12, %rsi
callq 0xeb038
addq $0x60, %rbp
jmp 0xeaf33
movq %r14, %r15
subq 0x8(%rsp), %r15
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x5, %rsi
addq %r14, %rsi
subq (%rbx), %rsi
addq %rbp, %rsi
sarq $0x5, %rsi
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
subq %rax, %rsi
movq %rbx, %rdi
callq 0xeb0c4
addq (%rbx), %r15
movq %r15, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
cmp rsi, rdx
jz loc_EB025
mov r15, rdx
mov rbx, rdi
mov rax, rdx
sub rax, r14
sar rax, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
xor ebp, ebp
loc_EAF33:
lea r12, [r15+rbp]
cmp r12, [rbx+8]
jz loc_EAFE4
lea r13, [r14+rbp]
add r13, 50h ; 'P'
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [r14+rbp]
add rdi, 48h ; 'H'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [r14+rbp]
add rdi, 38h ; '8'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [r14+rbp]
add r13, 28h ; '('
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r13-10h]
test rdi, rdi
jz short loc_EAFBA
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EAFA5
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EAFAF
loc_EAFA5:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EAFAF:
cmp eax, 1
jnz short loc_EAFBA
mov rax, [rdi]
call qword ptr [rax+18h]
loc_EAFBA:
lea r13, [r14+rbp]
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r13
mov rsi, r12
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&)
add rbp, 60h ; '`'
jmp loc_EAF33
loc_EAFE4:
mov r15, r14
sub r15, [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
lea rsi, [rax+rax*2]
shl rsi, 5
add rsi, r14
sub rsi, [rbx]
add rsi, rbp
sar rsi, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rsi, rcx
sub rsi, rax
mov rdi, rbx
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong)
add r15, [rbx]
mov r14, r15
loc_EB025:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // r14
long long i; // rbp
volatile signed __int32 *v7; // rdi
signed __int32 v8; // eax
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5);
v10 = *a1;
for ( i = 0LL; a3 + i != a1[1]; i += 96LL )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + i + 80));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a2 + i + 80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 72));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 56));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 40));
v7 = *(volatile signed __int32 **)(a2 + i + 24);
if ( v7 )
{
if ( _libc_single_threaded )
{
v8 = *((_DWORD *)v7 + 3);
*((_DWORD *)v7 + 3) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd(v7 + 3, 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + i));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a2 + i);
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair(
a2 + i,
a3 + i);
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * ((long long)(i + a2 + 96 * v11 - *a1) >> 5) - v11);
return *a1 + a2 - v10;
}
return v3;
}
| erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
CMP RSI,RDX
JZ 0x001eb025
MOV R15,RDX
MOV RBX,RDI
MOV RAX,RDX
SUB RAX,R14
SAR RAX,0x5
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
XOR EBP,EBP
LAB_001eaf33:
LEA R12,[R15 + RBP*0x1]
CMP R12,qword ptr [RBX + 0x8]
JZ 0x001eafe4
LEA R13,[R14 + RBP*0x1]
ADD R13,0x50
MOV RDI,R13
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R13
CALL 0x00189918
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x48
CALL 0x00170882
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x38
CALL 0x00170882
LEA R13,[R14 + RBP*0x1]
ADD R13,0x28
MOV RDI,R13
CALL 0x00170882
MOV RDI,qword ptr [R13 + -0x10]
TEST RDI,RDI
JZ 0x001eafba
MOV RAX,qword ptr [0x00264f98]
CMP byte ptr [RAX],0x0
JZ 0x001eafa5
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001eafaf
LAB_001eafa5:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001eafaf:
CMP EAX,0x1
JNZ 0x001eafba
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001eafba:
LEA R13,[R14 + RBP*0x1]
MOV RDI,R13
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R13
CALL 0x00189918
MOV RDI,R13
MOV RSI,R12
CALL 0x001eb038
ADD RBP,0x60
JMP 0x001eaf33
LAB_001eafe4:
MOV R15,R14
SUB R15,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[RAX + RAX*0x2]
SHL RSI,0x5
ADD RSI,R14
SUB RSI,qword ptr [RBX]
ADD RSI,RBP
SAR RSI,0x5
MOV RCX,-0x5555555555555555
IMUL RSI,RCX
SUB RSI,RAX
MOV RDI,RBX
CALL 0x001eb0c4
ADD R15,qword ptr [RBX]
MOV R14,R15
LAB_001eb025:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,long param_2,long param_3)
{
int *piVar1;
long lVar2;
long *plVar3;
int iVar4;
long lVar5;
long lVar6;
data *pdVar7;
if (param_2 != param_3) {
lVar5 = param_3 - param_2 >> 5;
lVar2 = *(long *)this;
for (lVar6 = 0; (pair *)(param_3 + lVar6) != *(pair **)(this + 8); lVar6 = lVar6 + 0x60) {
pdVar7 = (data *)(param_2 + lVar6 + 0x50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x48));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x38));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x28));
plVar3 = *(long **)(param_2 + lVar6 + 0x18);
if (plVar3 != (long *)0x0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar3 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)plVar3 + 0xc);
*(int *)((long)plVar3 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*plVar3 + 0x18))();
}
}
pdVar7 = (data *)(param_2 + lVar6);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)pdVar7,(pair *)(param_3 + lVar6));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,(((lVar5 * 0x20 + param_2) - *(long *)this) + lVar6 >> 5) * -0x5555555555555555
+ lVar5 * 0x5555555555555555);
param_2 = (param_2 - lVar2) + *(long *)this;
}
return param_2;
}
| |
49,010 | thr_unlock | eloqsql/mysys/thr_lock.c | void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags)
{
THR_LOCK *lock=data->lock;
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: %p thread: %lu lock: %p",
data, (ulong) data->owner->thread_id,
lock));
mysql_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock", lock_type, 0);
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else if (lock_type <= TL_READ_NO_INSERT)
lock->read.last=data->prev;
else if (lock_type == TL_WRITE_DELAYED && data->cond)
{
/*
This only happens in extreme circumstances when a
write delayed lock that is waiting for a lock
*/
lock->write_wait.last=data->prev; /* Put it on wait queue */
}
else
lock->write.last=data->prev;
if (unlock_flags & THR_UNLOCK_UPDATE_STATUS)
{
/* External lock was not called; Update or restore status */
if (lock_type >= TL_WRITE_CONCURRENT_INSERT)
{
if (lock->update_status)
(*lock->update_status)(data->status_param);
}
else
{
if (lock->restore_status)
(*lock->restore_status)(data->status_param);
}
}
if (lock_type == TL_READ_NO_INSERT)
lock->read_no_write_count--;
data->type=TL_UNLOCK; /* Mark unlocked */
wake_up_waiters(lock);
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O3 | c | thr_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r15
movq 0x18(%rdi), %r14
movl 0x40(%rdi), %r13d
leaq 0x18(%r14), %rbx
cmpq $0x0, 0x58(%r14)
jne 0xa57b6
movq %rbx, %rdi
callq 0x291d0
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0xa570d
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rax)
jmp 0xa5748
cmpl $0x5, %r13d
jg 0xa571d
movq 0x10(%r15), %rax
movq %rax, 0x78(%r14)
jmp 0xa5748
cmpl $0x9, %r13d
jne 0xa573d
cmpq $0x0, 0x20(%r15)
je 0xa573d
movq 0x10(%r15), %rax
movq %rax, 0x88(%r14)
testb $0x1, %r12b
jne 0xa5754
jmp 0xa5787
movq 0x10(%r15), %rax
movq %rax, 0x98(%r14)
testb $0x1, %r12b
je 0xa577a
cmpl $0x8, %r13d
jl 0xa5768
movq 0xc0(%r14), %rax
testq %rax, %rax
je 0xa5787
movq 0x28(%r15), %rdi
callq *%rax
jmp 0xa5787
movq 0xc8(%r14), %rax
testq %rax, %rax
je 0xa577a
movq 0x28(%r15), %rdi
callq *%rax
cmpl $0x5, %r13d
jne 0xa5787
decl 0xa8(%r14)
movl $0x0, 0x40(%r15)
movq %r14, %rdi
callq 0xa57e1
movq 0x58(%r14), %rdi
testq %rdi, %rdi
jne 0xa57cf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291a0
leaq 0x390b8(%rip), %rsi # 0xde875
movq %rbx, %rdi
movl $0x3c0, %edx # imm = 0x3C0
callq 0x2ee0b
jmp 0xa56f3
leaq 0x2e387a(%rip), %rax # 0x389050
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa57a0
| thr_unlock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, esi
mov r15, rdi
mov r14, [rdi+18h]
mov r13d, [rdi+40h]
lea rbx, [r14+18h]
cmp qword ptr [r14+58h], 0
jnz loc_A57B6
mov rdi, rbx
call _pthread_mutex_lock
loc_A56F3:
mov rax, [r15+8]
mov rcx, [r15+10h]
mov [rcx], rax
test rax, rax
jz short loc_A570D
mov rcx, [r15+10h]
mov [rax+10h], rcx
jmp short loc_A5748
loc_A570D:
cmp r13d, 5
jg short loc_A571D
mov rax, [r15+10h]
mov [r14+78h], rax
jmp short loc_A5748
loc_A571D:
cmp r13d, 9
jnz short loc_A573D
cmp qword ptr [r15+20h], 0
jz short loc_A573D
mov rax, [r15+10h]
mov [r14+88h], rax
test r12b, 1
jnz short loc_A5754
jmp short loc_A5787
loc_A573D:
mov rax, [r15+10h]
mov [r14+98h], rax
loc_A5748:
test r12b, 1
jz short loc_A577A
cmp r13d, 8
jl short loc_A5768
loc_A5754:
mov rax, [r14+0C0h]
test rax, rax
jz short loc_A5787
mov rdi, [r15+28h]
call rax
jmp short loc_A5787
loc_A5768:
mov rax, [r14+0C8h]
test rax, rax
jz short loc_A577A
mov rdi, [r15+28h]
call rax
loc_A577A:
cmp r13d, 5
jnz short loc_A5787
dec dword ptr [r14+0A8h]
loc_A5787:
mov dword ptr [r15+40h], 0
mov rdi, r14
call wake_up_waiters
mov rdi, [r14+58h]
test rdi, rdi
jnz short loc_A57CF
loc_A57A0:
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_A57B6:
lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 3C0h
call psi_mutex_lock
jmp loc_A56F3
loc_A57CF:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A57A0
| long long thr_unlock(long long a1, char a2)
{
long long v2; // r14
int v3; // r13d
long long v4; // rax
void ( *v5)(_QWORD); // rax
void ( *v6)(_QWORD); // rax
long long v7; // rdi
v2 = *(_QWORD *)(a1 + 24);
v3 = *(_DWORD *)(a1 + 64);
if ( *(_QWORD *)(v2 + 88) )
psi_mutex_lock(v2 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x3C0u);
else
pthread_mutex_lock(v2 + 24);
v4 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v4;
if ( v4 )
{
*(_QWORD *)(v4 + 16) = *(_QWORD *)(a1 + 16);
}
else if ( v3 > 5 )
{
if ( v3 == 9 && *(_QWORD *)(a1 + 32) )
{
*(_QWORD *)(v2 + 136) = *(_QWORD *)(a1 + 16);
if ( (a2 & 1) == 0 )
goto LABEL_20;
goto LABEL_14;
}
*(_QWORD *)(v2 + 152) = *(_QWORD *)(a1 + 16);
}
else
{
*(_QWORD *)(v2 + 120) = *(_QWORD *)(a1 + 16);
}
if ( (a2 & 1) != 0 )
{
if ( v3 >= 8 )
{
LABEL_14:
v5 = *(void ( **)(_QWORD))(v2 + 192);
if ( v5 )
v5(*(_QWORD *)(a1 + 40));
goto LABEL_20;
}
v6 = *(void ( **)(_QWORD))(v2 + 200);
if ( v6 )
v6(*(_QWORD *)(a1 + 40));
}
if ( v3 == 5 )
--*(_DWORD *)(v2 + 168);
LABEL_20:
*(_DWORD *)(a1 + 64) = 0;
wake_up_waiters(v2);
v7 = *(_QWORD *)(v2 + 88);
if ( v7 )
((void ( *)(long long))PSI_server[44])(v7);
return pthread_mutex_unlock(v2 + 24);
}
| thr_unlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,ESI
MOV R15,RDI
MOV R14,qword ptr [RDI + 0x18]
MOV R13D,dword ptr [RDI + 0x40]
LEA RBX,[R14 + 0x18]
CMP qword ptr [R14 + 0x58],0x0
JNZ 0x001a57b6
MOV RDI,RBX
CALL 0x001291d0
LAB_001a56f3:
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,qword ptr [R15 + 0x10]
MOV qword ptr [RCX],RAX
TEST RAX,RAX
JZ 0x001a570d
MOV RCX,qword ptr [R15 + 0x10]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001a5748
LAB_001a570d:
CMP R13D,0x5
JG 0x001a571d
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x78],RAX
JMP 0x001a5748
LAB_001a571d:
CMP R13D,0x9
JNZ 0x001a573d
CMP qword ptr [R15 + 0x20],0x0
JZ 0x001a573d
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x88],RAX
TEST R12B,0x1
JNZ 0x001a5754
JMP 0x001a5787
LAB_001a573d:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x98],RAX
LAB_001a5748:
TEST R12B,0x1
JZ 0x001a577a
CMP R13D,0x8
JL 0x001a5768
LAB_001a5754:
MOV RAX,qword ptr [R14 + 0xc0]
TEST RAX,RAX
JZ 0x001a5787
MOV RDI,qword ptr [R15 + 0x28]
CALL RAX
JMP 0x001a5787
LAB_001a5768:
MOV RAX,qword ptr [R14 + 0xc8]
TEST RAX,RAX
JZ 0x001a577a
MOV RDI,qword ptr [R15 + 0x28]
CALL RAX
LAB_001a577a:
CMP R13D,0x5
JNZ 0x001a5787
DEC dword ptr [R14 + 0xa8]
LAB_001a5787:
MOV dword ptr [R15 + 0x40],0x0
MOV RDI,R14
CALL 0x001a57e1
MOV RDI,qword ptr [R14 + 0x58]
TEST RDI,RDI
JNZ 0x001a57cf
LAB_001a57a0:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291a0
LAB_001a57b6:
LEA RSI,[0x1de875]
MOV RDI,RBX
MOV EDX,0x3c0
CALL 0x0012ee0b
JMP 0x001a56f3
LAB_001a57cf:
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a57a0
|
void thr_unlock(long param_1,uint param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(param_1 + 0x18);
iVar1 = *(int *)(param_1 + 0x40);
__mutex = (pthread_mutex_t *)(lVar2 + 0x18);
if (*(long *)(lVar2 + 0x58) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x3c0);
}
lVar3 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar3;
if (lVar3 == 0) {
if (iVar1 < 6) {
*(int8 *)(lVar2 + 0x78) = *(int8 *)(param_1 + 0x10);
goto LAB_001a5748;
}
if ((iVar1 != 9) || (*(long *)(param_1 + 0x20) == 0)) {
*(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10);
goto LAB_001a5748;
}
*(int8 *)(lVar2 + 0x88) = *(int8 *)(param_1 + 0x10);
if ((param_2 & 1) == 0) goto LAB_001a5787;
LAB_001a5754:
if (*(code **)(lVar2 + 0xc0) != (code *)0x0) {
(**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28));
}
}
else {
*(int8 *)(lVar3 + 0x10) = *(int8 *)(param_1 + 0x10);
LAB_001a5748:
if ((param_2 & 1) != 0) {
if (7 < iVar1) goto LAB_001a5754;
if (*(code **)(lVar2 + 200) != (code *)0x0) {
(**(code **)(lVar2 + 200))(*(int8 *)(param_1 + 0x28));
}
}
if (iVar1 == 5) {
*(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + -1;
}
}
LAB_001a5787:
*(int4 *)(param_1 + 0x40) = 0;
wake_up_waiters(lVar2);
if (*(long *)(lVar2 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
| |
49,011 | ma_log_key_middle | eloqsql/storage/maria/ma_write.c | static my_bool _ma_log_key_middle(MARIA_PAGE *ma_page,
uint new_length,
uint data_added_first,
uint data_changed_first,
uint data_deleted_last,
const uchar *key_pos,
uint key_length, int move_length)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 2 + 3+5+3+3+3 + 7];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
uint key_offset;
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_key_middle");
DBUG_PRINT("enter", ("page: %lu", (ulong) page));
DBUG_ASSERT(ma_page->size == new_length);
/* new place of key after changes */
key_pos+= data_added_first;
key_offset= (uint) (key_pos - ma_page->buff);
if (key_offset < new_length)
{
/* key is on page; Calculate how much of the key is there */
uint max_key_length= new_length - key_offset;
if (max_key_length < key_length)
{
/* Key is last on page */
key_length= max_key_length;
move_length= 0;
}
/*
Take into account that new data was added as part of original key
that also needs to be removed from page
*/
data_deleted_last+= move_length;
}
/* First log changes to page */
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
*log_pos++= KEY_OP_DEBUG;
*log_pos++= KEY_OP_DEBUG_LOG_MIDDLE;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, ma_page->buff);
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, data_deleted_last);
log_pos+= 3;
log_pos[0]= KEY_OP_ADD_PREFIX;
int2store(log_pos+1, data_added_first);
int2store(log_pos+3, data_changed_first);
log_pos+= 5;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= (ma_page->buff +
info->s->keypage_header);
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= data_changed_first;
translog_parts= 2;
extra_length= data_changed_first;
/* If changed key is on page, log those changes too */
if (key_offset < new_length)
{
uchar *start_log_pos= log_pos;
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, key_offset);
log_pos+= 3;
if (move_length)
{
log_pos[0]= KEY_OP_SHIFT;
int2store(log_pos+1, move_length);
log_pos+= 3;
}
log_pos[0]= KEY_OP_CHANGE;
int2store(log_pos+1, key_length);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 2].str= start_log_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 2].length= (uint) (log_pos -
start_log_pos);
log_array[TRANSLOG_INTERNAL_PARTS + 3].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 3].length= key_length;
translog_parts+=2;
extra_length+= (uint) (log_array[TRANSLOG_INTERNAL_PARTS + 2].length +
key_length);
}
_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_key_middle:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movl %r8d, -0x48(%rbp)
movq %r9, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x100(%rbp)
jmp 0x6d7c7
jmp 0x6d7c9
jmp 0x6d7cb
movl -0x40(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x6d82e
movl -0x3c(%rbp), %eax
subl -0xe4(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
cmpl 0x10(%rbp), %eax
jae 0x6d825
movl -0x104(%rbp), %eax
movl %eax, 0x10(%rbp)
movl $0x0, 0x18(%rbp)
movl 0x18(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x100(%rbp), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, (%rax)
movq -0x100(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0x110(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x60(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0xa, (%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x60(%rbp), %rax
movb $0x7, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x118(%rbp)
movl -0x48(%rbp), %eax
movw %ax, %cx
movq -0x118(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movb $0x4, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x120(%rbp)
movl -0x40(%rbp), %eax
movw %ax, %cx
movq -0x120(%rbp), %rax
movw %cx, (%rax)
jmp 0x6d91a
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x128(%rbp)
movl -0x44(%rbp), %eax
movw %ax, %cx
movq -0x128(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x60(%rbp), %rax
leaq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movl -0x44(%rbp), %eax
movq %rax, -0xa8(%rbp)
movl $0x2, -0xe8(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0xec(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x6dabe
movq -0x60(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x60(%rbp), %rax
movb $0x1, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138(%rbp)
movl -0xe4(%rbp), %eax
movw %ax, %cx
movq -0x138(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, 0x18(%rbp)
je 0x6da2a
movq -0x60(%rbp), %rax
movb $0x2, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
movl 0x18(%rbp), %eax
movw %ax, %cx
movq -0x140(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movb $0x3, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x148(%rbp)
movl 0x10(%rbp), %eax
movw %ax, %cx
movq -0x148(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x60(%rbp), %rax
movq -0x130(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movl 0x10(%rbp), %eax
movq %rax, -0x88(%rbp)
movl -0xe8(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xe8(%rbp)
movq -0x98(%rbp), %rax
movl 0x10(%rbp), %ecx
addq %rcx, %rax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xf8(%rbp), %rcx
movq -0xb8(%rbp), %rax
movl -0xec(%rbp), %esi
addq %rsi, %rax
movl %eax, %r8d
movl -0xe8(%rbp), %r9d
addl $0x2, %r9d
leaq -0xe0(%rbp), %r10
leaq -0x30(%rbp), %rax
leaq -0x58(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x33810
movb %al, -0x149(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6db51
movb -0x149(%rbp), %al
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| _ma_log_key_middle:
push rbp
mov rbp, rsp
sub rsp, 170h
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
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 [rbp+var_44], ecx
mov [rbp+var_48], r8d
mov [rbp+var_50], r9
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_F8], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov rcx, [rbp+var_F8]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_100], rax
jmp short $+2
loc_6D7C7:
jmp short $+2
loc_6D7C9:
jmp short $+2
loc_6D7CB:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
mov rcx, [rcx+10h]
sub rax, rcx
mov [rbp+var_E4], eax
mov eax, [rbp+var_E4]
cmp eax, [rbp+var_3C]
jnb short loc_6D82E
mov eax, [rbp+var_3C]
sub eax, [rbp+var_E4]
mov [rbp+var_104], eax
mov eax, [rbp+var_104]
cmp eax, [rbp+arg_0]
jnb short loc_6D825
mov eax, [rbp+var_104]
mov [rbp+arg_0], eax
mov [rbp+arg_8], 0
loc_6D825:
mov eax, [rbp+arg_8]
add eax, [rbp+var_48]
mov [rbp+var_48], eax
loc_6D82E:
lea rax, [rbp+var_30]
add rax, 2
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov [rbp+var_110], rax
mov rax, [rbp+var_100]
mov ecx, eax
mov rax, [rbp+var_110]
mov [rax], ecx
mov rax, [rbp+var_100]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_110]
mov [rax+4], cl
mov rax, [rbp+var_60]
add rax, 5
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 0Ah
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rcx, [rbp+var_F8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov cl, [rax+rcx]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
mov rax, [rbp+var_60]
mov byte ptr [rax], 7
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_118], rax
mov eax, [rbp+var_48]
mov cx, ax
mov rax, [rbp+var_118]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov byte ptr [rax], 4
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_120], rax
mov eax, [rbp+var_40]
mov cx, ax
mov rax, [rbp+var_120]
mov [rax], cx
jmp short $+2
loc_6D91A:
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_128], rax
mov eax, [rbp+var_44]
mov cx, ax
mov rax, [rbp+var_128]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 5
mov [rbp+var_60], rax
lea rax, [rbp+var_30]
mov [rbp+var_C0], rax
mov rax, [rbp+var_60]
lea rcx, [rbp+var_30]
sub rax, rcx
mov eax, eax
mov [rbp+var_B8], rax
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rcx, [rbp+var_F8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov [rbp+var_B0], rax
mov eax, [rbp+var_44]
mov [rbp+var_A8], rax
mov [rbp+var_E8], 2
mov eax, [rbp+var_44]
mov [rbp+var_EC], eax
mov eax, [rbp+var_E4]
cmp eax, [rbp+var_3C]
jnb loc_6DABE
mov rax, [rbp+var_60]
mov [rbp+var_130], rax
mov rax, [rbp+var_60]
mov byte ptr [rax], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_138], rax
mov eax, [rbp+var_E4]
mov cx, ax
mov rax, [rbp+var_138]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
cmp [rbp+arg_8], 0
jz short loc_6DA2A
mov rax, [rbp+var_60]
mov byte ptr [rax], 2
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_140], rax
mov eax, [rbp+arg_8]
mov cx, ax
mov rax, [rbp+var_140]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
loc_6DA2A:
mov rax, [rbp+var_60]
mov byte ptr [rax], 3
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_148], rax
mov eax, [rbp+arg_0]
mov cx, ax
mov rax, [rbp+var_148]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
mov rax, [rbp+var_130]
mov [rbp+var_A0], rax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_130]
sub rax, rcx
mov eax, eax
mov [rbp+var_98], rax
mov rax, [rbp+var_50]
mov [rbp+var_90], rax
mov eax, [rbp+arg_0]
mov [rbp+var_88], rax
mov eax, [rbp+var_E8]
add eax, 2
mov [rbp+var_E8], eax
mov rax, [rbp+var_98]
mov ecx, [rbp+arg_0]
add rax, rcx
add eax, [rbp+var_EC]
mov [rbp+var_EC], eax
loc_6DABE:
mov rax, [rbp+var_38]
mov ecx, [rax+20h]
mov rax, [rbp+var_38]
mov [rax+24h], ecx
mov rax, [rbp+var_F8]
mov rdx, [rax+8]
mov rcx, [rbp+var_F8]
mov rax, [rbp+var_B8]
mov esi, [rbp+var_EC]
add rax, rsi
mov r8d, eax
mov r9d, [rbp+var_E8]
add r9d, 2
lea r10, [rbp+var_E0]
lea rax, [rbp+var_30]
lea rdi, [rbp+var_58]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+170h+var_170], r10
mov [rsp+170h+var_168], rax
mov [rsp+170h+var_160], 0
call translog_write_record
mov [rbp+var_149], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6DB51
mov al, [rbp+var_149]
add rsp, 170h
pop rbp
retn
loc_6DB51:
call ___stack_chk_fail
| char ma_log_key_middle(
long long **a1,
unsigned int a2,
unsigned int a3,
unsigned int a4,
int a5,
long long a6,
unsigned int a7,
int a8)
{
_BYTE *v9; // [rsp+40h] [rbp-130h]
unsigned long long v10; // [rsp+70h] [rbp-100h]
long long *v11; // [rsp+78h] [rbp-F8h]
unsigned int v12; // [rsp+84h] [rbp-ECh]
int v13; // [rsp+88h] [rbp-E8h]
unsigned int v14; // [rsp+8Ch] [rbp-E4h]
_QWORD v15[5]; // [rsp+90h] [rbp-E0h] BYREF
long long v16; // [rsp+B8h] [rbp-B8h]
char *v17; // [rsp+C0h] [rbp-B0h]
long long v18; // [rsp+C8h] [rbp-A8h]
_BYTE *v19; // [rsp+D0h] [rbp-A0h]
long long v20; // [rsp+D8h] [rbp-98h]
long long v21; // [rsp+E0h] [rbp-90h]
long long v22; // [rsp+E8h] [rbp-88h]
_BYTE *v23; // [rsp+110h] [rbp-60h]
char v24[8]; // [rsp+118h] [rbp-58h] BYREF
long long v25; // [rsp+120h] [rbp-50h]
int v26; // [rsp+128h] [rbp-48h]
unsigned int v27; // [rsp+12Ch] [rbp-44h]
unsigned int v28; // [rsp+130h] [rbp-40h]
unsigned int v29; // [rsp+134h] [rbp-3Ch]
long long **v30; // [rsp+138h] [rbp-38h]
__int16 v31; // [rsp+140h] [rbp-30h] BYREF
int v32; // [rsp+142h] [rbp-2Eh]
char v33; // [rsp+146h] [rbp-2Ah]
char v34; // [rsp+147h] [rbp-29h]
_BYTE v35[2]; // [rsp+148h] [rbp-28h] BYREF
__int16 v36; // [rsp+14Ah] [rbp-26h]
char v37; // [rsp+14Ch] [rbp-24h]
__int16 v38; // [rsp+14Dh] [rbp-23h]
__int16 v39; // [rsp+14Fh] [rbp-21h]
_BYTE v40[31]; // [rsp+151h] [rbp-1Fh] BYREF
long long savedregs; // [rsp+170h] [rbp+0h] BYREF
*(_QWORD *)&v40[23] = __readfsqword(0x28u);
v30 = a1;
v29 = a2;
v28 = a3;
v27 = a4;
v26 = a5;
v25 = a6;
v11 = *a1;
v10 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980);
v25 = a3 + a6;
v14 = v25 - (unsigned int)a1[2];
if ( v14 < a2 )
{
if ( v29 - v14 < a7 )
{
a7 = v29 - v14;
a8 = 0;
}
v26 += a8;
}
v32 = v10;
v33 = BYTE4(v10);
v23 = v35;
v34 = 10;
v35[0] = *((_BYTE *)v30[2] + (unsigned int)(*(_DWORD *)(*v11 + 1860) - 3));
v35[1] = 7;
v36 = v26;
v37 = 4;
v38 = v28;
v39 = v27;
v23 = v40;
v15[4] = &v31;
v16 = (unsigned int)v40 - ((unsigned int)&savedregs - 48);
v17 = (char *)v30[2] + *(unsigned int *)(*v11 + 1860);
v18 = v27;
v13 = 2;
v12 = v27;
if ( v14 < v29 )
{
v9 = v23;
*v23 = 1;
*(_WORD *)(v23 + 1) = v14;
v23 += 3;
if ( a8 )
{
*v23 = 2;
*(_WORD *)(v23 + 1) = a8;
v23 += 3;
}
*v23 = 3;
*(_WORD *)(v23 + 1) = a7;
v23 += 3;
v19 = v9;
v20 = (unsigned int)((_DWORD)v23 - (_DWORD)v9);
v21 = v25;
v22 = a7;
v13 = 4;
v12 += a7 + (_DWORD)v23 - (_DWORD)v9;
}
*((_DWORD *)v30 + 9) = *((_DWORD *)v30 + 8);
return translog_write_record((long long)v24, 0xCu, v11[1], v11, v12 + v16, v13 + 2, v15, &v31, 0LL);
}
| _ma_log_key_middle:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
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 dword ptr [RBP + -0x44],ECX
MOV dword ptr [RBP + -0x48],R8D
MOV qword ptr [RBP + -0x50],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x100],RAX
JMP 0x0016d7c7
LAB_0016d7c7:
JMP 0x0016d7c9
LAB_0016d7c9:
JMP 0x0016d7cb
LAB_0016d7cb:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0xe4],EAX
MOV EAX,dword ptr [RBP + -0xe4]
CMP EAX,dword ptr [RBP + -0x3c]
JNC 0x0016d82e
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,dword ptr [RBP + -0xe4]
MOV dword ptr [RBP + -0x104],EAX
MOV EAX,dword ptr [RBP + -0x104]
CMP EAX,dword ptr [RBP + 0x10]
JNC 0x0016d825
MOV EAX,dword ptr [RBP + -0x104]
MOV dword ptr [RBP + 0x10],EAX
MOV dword ptr [RBP + 0x18],0x0
LAB_0016d825:
MOV EAX,dword ptr [RBP + 0x18]
ADD EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
LAB_0016d82e:
LEA RAX,[RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x100]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x110]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x100]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x110]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x5
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOV byte ptr [RAX],0xa
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0xf8]
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 + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x7
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x118],RAX
MOV EAX,dword ptr [RBP + -0x48]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x118]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x4
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x120]
MOV word ptr [RAX],CX
JMP 0x0016d91a
LAB_0016d91a:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x128],RAX
MOV EAX,dword ptr [RBP + -0x44]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x128]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x5
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[RBP + -0x30]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV qword ptr [RBP + -0xb0],RAX
MOV EAX,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0xa8],RAX
MOV dword ptr [RBP + -0xe8],0x2
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0xec],EAX
MOV EAX,dword ptr [RBP + -0xe4]
CMP EAX,dword ptr [RBP + -0x3c]
JNC 0x0016dabe
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x130],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0xe4]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x138]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
CMP dword ptr [RBP + 0x18],0x0
JZ 0x0016da2a
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x140],RAX
MOV EAX,dword ptr [RBP + 0x18]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x140]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
LAB_0016da2a:
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x3
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x148],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x148]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x130]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x90],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RBP + -0xe8]
ADD EAX,0x2
MOV dword ptr [RBP + -0xe8],EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,dword ptr [RBP + 0x10]
ADD RAX,RCX
ADD EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0xec],EAX
LAB_0016dabe:
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 + -0xf8]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RBP + -0xb8]
MOV ESI,dword ptr [RBP + -0xec]
ADD RAX,RSI
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0xe8]
ADD R9D,0x2
LEA R10,[RBP + -0xe0]
LEA RAX,[RBP + -0x30]
LEA RDI,[RBP + -0x58]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00133810
MOV byte ptr [RBP + -0x149],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016db51
MOV AL,byte ptr [RBP + -0x149]
ADD RSP,0x170
POP RBP
RET
LAB_0016db51:
CALL 0x0012a250
|
int8
_ma_log_key_middle(long *param_1,uint param_2,uint param_3,uint param_4,int param_5,long param_6,
uint param_7,int param_8)
{
long *plVar1;
int iVar2;
int1 uVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
long in_FS_OFFSET;
uint local_f4;
int local_f0;
int1 local_e8 [32];
int1 *local_c8;
ulong local_c0;
long local_b8;
ulong local_b0;
int1 *local_a8;
ulong local_a0;
long local_98;
ulong local_90;
int1 *local_68;
int1 local_60 [8];
long local_58;
int local_50;
uint local_4c;
uint 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;
int2 local_2e;
int1 local_2c;
int2 local_2b;
int2 local_29;
int1 local_27;
int2 local_26;
int1 local_24;
int2 local_23;
int1 local_21 [17];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
uVar6 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_58 = param_6 + (ulong)param_3;
uVar4 = (int)local_58 - (int)param_1[2];
local_50 = param_5;
if (uVar4 < param_2) {
if (param_2 - uVar4 < param_7) {
param_8 = 0;
param_7 = param_2 - uVar4;
}
local_50 = param_8 + param_5;
}
local_36 = (int4)uVar6;
local_32 = (int1)(uVar6 >> 0x20);
local_31 = 10;
local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
local_2f = 7;
local_2e = (int2)local_50;
local_2c = 4;
local_2b = (int2)param_3;
local_29 = (int2)param_4;
local_c8 = local_38;
iVar2 = (int)&local_27;
uVar5 = iVar2 - (int)local_38;
local_c0 = (ulong)uVar5;
local_b8 = param_1[2] + (ulong)*(uint *)(*plVar1 + 0x744);
local_b0 = (ulong)param_4;
local_f0 = 2;
local_f4 = param_4;
local_68 = &local_27;
if (uVar4 < param_2) {
local_27 = 1;
local_26 = (int2)uVar4;
local_68 = &local_24;
if (param_8 != 0) {
local_24 = 2;
local_23 = (int2)param_8;
local_68 = local_21;
}
*local_68 = 3;
*(short *)(local_68 + 1) = (short)param_7;
local_68 = local_68 + 3;
uVar4 = (int)local_68 - iVar2;
local_a0 = (ulong)uVar4;
local_90 = (ulong)param_7;
local_f0 = 4;
local_f4 = uVar4 + param_7 + param_4;
local_a8 = &local_27;
local_98 = local_58;
}
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_4c = param_4;
local_48 = param_3;
local_44 = param_2;
local_40 = param_1;
uVar3 = translog_write_record
(local_60,0xc,plVar1[1],plVar1,uVar5 + local_f4,local_f0 + 2,local_e8,local_38,0
);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar3);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
49,012 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&) | monkey531[P]llama/common/./json.hpp | void push_back(basic_json&& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (move semantics)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(std::move(val));
set_parent(m_data.m_value.array->back(), old_capacity);
// if val is moved from, basic_json move constructor marks it null, so we do not call the destructor
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x54911
movb $0x2, (%r14)
callq 0x3ede0
movq %rax, 0x8(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3eca6
jmp 0x54916
cmpl $0x2, %eax
jne 0x5492a
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3fb46
pushq $0x20
popq %rdi
callq 0x28580
movq %rax, %rbx
movq %r14, %rdi
callq 0x4f280
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x9e4d8(%rip), %rsi # 0xf2e24
leaq 0x10(%rsp), %rdi
callq 0x54a9b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x549ae
xorl %ebp, %ebp
leaq 0x110039(%rip), %rsi # 0x1649b0
leaq 0x1b508(%rip), %rdx # 0x6fe86
movq %rbx, %rdi
callq 0x29320
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x29678
testb %bpl, %bpl
jne 0x5499d
jmp 0x549a5
movq %rax, %r14
movq %rbx, %rdi
callq 0x28830
movq %r14, %rdi
callq 0x293c0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_54911
mov byte ptr [r14], 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>()
mov [r14+8], rax
push 1
pop rsi
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_54916
loc_54911:
cmp eax, 2
jnz short loc_5492A
loc_54916:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
loc_5492A:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_5499D
jmp short loc_549A5
mov r14, rax
loc_5499D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_549A5:
mov rdi, r14
call __Unwind_Resume
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x00154911
MOV byte ptr [R14],0x2
CALL 0x0013ede0
MOV qword ptr [R14 + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0013eca6
JMP 0x00154916
LAB_00154911:
CMP EAX,0x2
JNZ 0x0015492a
LAB_00154916:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0013fb46
LAB_0015492a:
PUSH 0x20
POP RDI
CALL 0x00128580
MOV RBX,RAX
MOV RDI,R14
CALL 0x0014f280
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00154945:
LEA RSI,[0x1f2e24]
LEA RDI,[RSP + 0x10]
CALL 0x00154a9b
MOV BPL,0x1
LAB_00154959:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x001549ae
XOR EBP,EBP
LEA RSI,[0x2649b0]
LEA RDX,[0x16fe86]
MOV RDI,RBX
CALL 0x00129320
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
vector *pvVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
pvVar1 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector **)(this + 8) = pvVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00154945 to 00154955 has its CatchHandler @ 0015499a */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 00154959 to 00154985 has its CatchHandler @ 00154986 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
| ||
49,013 | str2int | eloqsql/strings/str2int.c | char *str2int(register const char *src, register int radix, long int lower,
long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
long limit; /* "largest" possible valid input */
long scale; /* the amount to multiply next digit by */
long sofar; /* the running value */
register int d; /* (negative of) next digit */
char *start;
int digits[32]; /* Room for numbers */
/* Make sure *val is sensible in case of error */
*val = 0;
/* Check that the radix is in the range 2..36 */
#ifndef DBUG_OFF
if (radix < 2 || radix > 36) {
errno=EDOM;
return NullS;
}
#endif
/* The basic problem is: how do we handle the conversion of
a number without resorting to machine-specific code to
check for overflow? Obviously, we have to ensure that
no calculation can overflow. We are guaranteed that the
"lower" and "upper" arguments are valid machine integers.
On sign-and-magnitude, twos-complement, and ones-complement
machines all, if +|n| is representable, so is -|n|, but on
twos complement machines the converse is not true. So the
"maximum" representable number has a negative representative.
Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest"
number we are concerned with. */
/* Calculate Limit using Scale as a scratch variable */
if ((limit = lower) > 0) limit = -limit;
if ((scale = upper) > 0) scale = -scale;
if (scale < limit) limit = scale;
/* Skip leading spaces and check for a sign.
Note: because on a 2s complement machine MinLong is a valid
integer but |MinLong| is not, we have to keep the current
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
/* Skip leading zeros so that we never compute a power of radix
in scale that we won't have a need for. Otherwise sticking
enough 0s in front of a number could cause the multiplication
to overflow when it neededn't.
*/
start=(char*) src;
while (*src == '0') src++;
/* Move over the remaining digits. We have to convert from left
to left in order to avoid overflow. Answer is after last digit.
*/
for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ;
/* Check that there is at least one digit */
if (start == src) {
errno=EDOM;
return NullS;
}
/* The invariant we want to maintain is that src is just
to the right of n digits, we've converted k digits to
sofar, scale = -radix**k, and scale < sofar < 0. Now
if the final number is to be within the original
Limit, we must have (to the left)*scale+sofar >= Limit,
or (to the left)*scale >= Limit-sofar, i.e. the digits
to the left of src must form an integer <= (Limit-sofar)/(scale).
In particular, this is true of the next digit. In our
incremental calculation of Limit,
IT IS VITAL that (-|N|)/(-|D|) = |N|/|D|
*/
for (sofar = 0, scale = -1; --n >= 1;)
{
if ((long) -(d=digits[n]) < limit) {
errno=ERANGE;
return NullS;
}
limit = (limit+d)/radix, sofar += d*scale; scale *= radix;
}
if (n == 0)
{
if ((long) -(d=digits[n]) < limit) /* get last digit */
{
errno=ERANGE;
return NullS;
}
sofar+=d*scale;
}
/* Now it might still happen that sofar = -32768 or its equivalent,
so we can't just multiply by the sign and check that the result
is in the range lower..upper. All of this caution is a right
pain in the neck. If only there were a standard routine which
says generate thus and such a signal on integer overflow...
But not enough machines can do it *SIGH*.
*/
if (sign < 0)
{
if (sofar < -LONG_MAX || (sofar= -sofar) > upper)
{
errno=ERANGE;
return NullS;
}
}
else if (sofar < lower)
{
errno=ERANGE;
return NullS;
}
*val = sofar;
errno=0; /* indicate that all went well */
return (char*) src;
} | O0 | c | str2int:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jle 0x762c1
xorl %eax, %eax
subq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jle 0x762d9
xorl %eax, %eax
subq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x762eb
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x762ed
leaq 0x1fc46c(%rip), %rax # 0x272760
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x7631a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x762ed
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x7633b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7635c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7635a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x7635c
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x7637e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x76364
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x763af
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x763af
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, -0xe4(%rbp)
jmp 0x7642e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x41, %eax
jl 0x763dc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5a, %eax
jg 0x763dc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0xe8(%rbp)
jmp 0x76422
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jl 0x76409
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7a, %eax
jg 0x76409
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, -0xec(%rbp)
jmp 0x76416
movl $0x7f, %eax
movl %eax, -0xec(%rbp)
jmp 0x76416
movl -0xec(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %ecx
movslq -0x38(%rbp), %rax
movl %ecx, -0xe0(%rbp,%rax,4)
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0xed(%rbp)
jge 0x76459
cmpl $0x14, -0x38(%rbp)
setl %al
movb %al, -0xed(%rbp)
movb -0xed(%rbp), %al
testb $0x1, %al
jne 0x76465
jmp 0x76481
jmp 0x76467
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x76385
movq -0x60(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x764a3
callq 0x24040
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x765f0
movq $0x0, -0x50(%rbp)
movq $-0x1, -0x48(%rbp)
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
cmpl $0x1, %eax
jl 0x7652b
movslq -0x38(%rbp), %rax
movl -0xe0(%rbp,%rax,4), %ecx
movl %ecx, -0x54(%rbp)
xorl %eax, %eax
subl %ecx, %eax
cltq
cmpq -0x40(%rbp), %rax
jge 0x764f3
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x765f0
movq -0x40(%rbp), %rax
movslq -0x54(%rbp), %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cqto
idivq %rcx
movq %rax, -0x40(%rbp)
movslq -0x54(%rbp), %rax
imulq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x14(%rbp), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x764b3
cmpl $0x0, -0x38(%rbp)
jne 0x76574
movslq -0x38(%rbp), %rax
movl -0xe0(%rbp,%rax,4), %ecx
movl %ecx, -0x54(%rbp)
xorl %eax, %eax
subl %ecx, %eax
cltq
cmpq -0x40(%rbp), %rax
jge 0x76563
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x765f0
movslq -0x54(%rbp), %rax
imulq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x765b1
movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001
cmpq %rax, -0x50(%rbp)
jl 0x7659a
xorl %eax, %eax
subq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq -0x28(%rbp), %rax
jle 0x765af
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x765f0
jmp 0x765d2
movq -0x50(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x765d0
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x765f0
jmp 0x765d2
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
callq 0x24040
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
| str2int:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
cmp rax, 0
jle short loc_762C1
xor eax, eax
sub rax, [rbp+var_40]
mov [rbp+var_40], rax
loc_762C1:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
cmp rax, 0
jle short loc_762D9
xor eax, eax
sub rax, [rbp+var_48]
mov [rbp+var_48], rax
loc_762D9:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_40]
jge short loc_762EB
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
loc_762EB:
jmp short $+2
loc_762ED:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_7631A
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_762ED
loc_7631A:
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_7633B
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_7635C
loc_7633B:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_7635A
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_34], 1
loc_7635A:
jmp short $+2
loc_7635C:
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
loc_76364:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jnz short loc_7637E
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_76364
loc_7637E:
mov [rbp+var_38], 0
loc_76385:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_763AF
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jg short loc_763AF
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
mov [rbp+var_E4], eax
jmp short loc_7642E
loc_763AF:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 41h ; 'A'
jl short loc_763DC
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ah ; 'Z'
jg short loc_763DC
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_E8], eax
jmp short loc_76422
loc_763DC:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 61h ; 'a'
jl short loc_76409
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Ah ; 'z'
jg short loc_76409
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_EC], eax
jmp short loc_76416
loc_76409:
mov eax, 7Fh
mov [rbp+var_EC], eax
jmp short $+2
loc_76416:
mov eax, [rbp+var_EC]
mov [rbp+var_E8], eax
loc_76422:
mov eax, [rbp+var_E8]
mov [rbp+var_E4], eax
loc_7642E:
mov ecx, [rbp+var_E4]
movsxd rax, [rbp+var_38]
mov [rbp+rax*4+var_E0], ecx
xor eax, eax
cmp ecx, [rbp+var_14]
mov [rbp+var_ED], al
jge short loc_76459
cmp [rbp+var_38], 14h
setl al
mov [rbp+var_ED], al
loc_76459:
mov al, [rbp+var_ED]
test al, 1
jnz short loc_76465
jmp short loc_76481
loc_76465:
jmp short $+2
loc_76467:
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_76385
loc_76481:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_10]
jnz short loc_764A3
call ___errno_location
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp loc_765F0
loc_764A3:
mov [rbp+var_50], 0
mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh
loc_764B3:
mov eax, [rbp+var_38]
add eax, 0FFFFFFFFh
mov [rbp+var_38], eax
cmp eax, 1
jl short loc_7652B
movsxd rax, [rbp+var_38]
mov ecx, [rbp+rax*4+var_E0]
mov [rbp+var_54], ecx
xor eax, eax
sub eax, ecx
cdqe
cmp rax, [rbp+var_40]
jge short loc_764F3
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp loc_765F0
loc_764F3:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_54]
add rax, rcx
movsxd rcx, [rbp+var_14]
cqo
idiv rcx
mov [rbp+var_40], rax
movsxd rax, [rbp+var_54]
imul rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_50], rax
movsxd rax, [rbp+var_14]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp short loc_764B3
loc_7652B:
cmp [rbp+var_38], 0
jnz short loc_76574
movsxd rax, [rbp+var_38]
mov ecx, [rbp+rax*4+var_E0]
mov [rbp+var_54], ecx
xor eax, eax
sub eax, ecx
cdqe
cmp rax, [rbp+var_40]
jge short loc_76563
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp loc_765F0
loc_76563:
movsxd rax, [rbp+var_54]
imul rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_50], rax
loc_76574:
cmp [rbp+var_34], 0
jge short loc_765B1
mov rax, 8000000000000001h
cmp [rbp+var_50], rax
jl short loc_7659A
xor eax, eax
sub rax, [rbp+var_50]
mov [rbp+var_50], rax
cmp rax, [rbp+var_28]
jle short loc_765AF
loc_7659A:
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp short loc_765F0
loc_765AF:
jmp short loc_765D2
loc_765B1:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_20]
jge short loc_765D0
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp short loc_765F0
loc_765D0:
jmp short $+2
loc_765D2:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_30]
mov [rax], rcx
call ___errno_location
mov dword ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_765F0:
mov rax, [rbp+var_8]
add rsp, 0F0h
pop rbp
retn
| _BYTE * str2int(_BYTE *a1, int a2, long long a3, long long a4, long long *a5)
{
bool v6; // [rsp+3h] [rbp-EDh]
int v7; // [rsp+4h] [rbp-ECh]
int v8; // [rsp+8h] [rbp-E8h]
int v9; // [rsp+Ch] [rbp-E4h]
_DWORD v10[32]; // [rsp+10h] [rbp-E0h]
_BYTE *v11; // [rsp+90h] [rbp-60h]
int v12; // [rsp+9Ch] [rbp-54h]
long long v13; // [rsp+A0h] [rbp-50h]
long long i; // [rsp+A8h] [rbp-48h]
long long v15; // [rsp+B0h] [rbp-40h]
int v16; // [rsp+B8h] [rbp-38h]
int v17; // [rsp+BCh] [rbp-34h]
long long *v18; // [rsp+C0h] [rbp-30h]
long long v19; // [rsp+C8h] [rbp-28h]
long long v20; // [rsp+D0h] [rbp-20h]
int v21; // [rsp+DCh] [rbp-14h]
_BYTE *v22; // [rsp+E0h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
*a5 = 0LL;
v15 = v20;
if ( v20 > 0 )
v15 = -v15;
i = v19;
if ( v19 > 0 )
i = -i;
if ( i < v15 )
v15 = i;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + (unsigned __int8)*v22 + 1LL) & 8) != 0 )
++v22;
v17 = -1;
if ( *v22 == 43 )
{
++v22;
}
else if ( *v22 == 45 )
{
++v22;
v17 = 1;
}
v11 = v22;
while ( *v22 == 48 )
++v22;
v16 = 0;
while ( 1 )
{
if ( (char)*v22 < 48 || (char)*v22 > 57 )
{
if ( (char)*v22 < 65 || (char)*v22 > 90 )
{
v7 = (char)*v22 < 97 || (char)*v22 > 122 ? 127 : (char)*v22 - 97 + 10;
v8 = v7;
}
else
{
v8 = (char)*v22 - 65 + 10;
}
v9 = v8;
}
else
{
v9 = (char)*v22 - 48;
}
v10[v16] = v9;
v6 = 0;
if ( v9 < v21 )
v6 = v16 < 20;
if ( !v6 )
break;
++v16;
++v22;
}
if ( v11 != v22 )
{
v13 = 0LL;
for ( i = -1LL; --v16 >= 1; i *= v21 )
{
v12 = v10[v16];
if ( -v12 < v15 )
goto LABEL_49;
v15 = (v12 + v15) / v21;
v13 += i * v12;
}
if ( !v16 )
{
v12 = v10[0];
if ( -v10[0] < v15 )
goto LABEL_49;
v13 += i * v12;
}
if ( v17 < 0 )
{
if ( v13 == 0x8000000000000000LL )
goto LABEL_49;
v13 = -v13;
if ( v13 > v19 )
goto LABEL_49;
LABEL_50:
*v18 = v13;
*(_DWORD *)__errno_location() = 0;
return v22;
}
if ( v13 >= v20 )
goto LABEL_50;
LABEL_49:
*(_DWORD *)__errno_location() = 34;
return 0LL;
}
*(_DWORD *)__errno_location() = 33;
return 0LL;
}
| str2int:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JLE 0x001762c1
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
LAB_001762c1:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,0x0
JLE 0x001762d9
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
LAB_001762d9:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x001762eb
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
LAB_001762eb:
JMP 0x001762ed
LAB_001762ed:
LEA RAX,[0x372760]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0017631a
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001762ed
LAB_0017631a:
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x0017633b
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017635c
LAB_0017633b:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x0017635a
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x34],0x1
LAB_0017635a:
JMP 0x0017635c
LAB_0017635c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x60],RAX
LAB_00176364:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JNZ 0x0017637e
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00176364
LAB_0017637e:
MOV dword ptr [RBP + -0x38],0x0
LAB_00176385:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x001763af
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JG 0x001763af
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
MOV dword ptr [RBP + -0xe4],EAX
JMP 0x0017642e
LAB_001763af:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x41
JL 0x001763dc
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5a
JG 0x001763dc
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x41
ADD EAX,0xa
MOV dword ptr [RBP + -0xe8],EAX
JMP 0x00176422
LAB_001763dc:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x61
JL 0x00176409
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7a
JG 0x00176409
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x61
ADD EAX,0xa
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00176416
LAB_00176409:
MOV EAX,0x7f
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00176416
LAB_00176416:
MOV EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0xe8],EAX
LAB_00176422:
MOV EAX,dword ptr [RBP + -0xe8]
MOV dword ptr [RBP + -0xe4],EAX
LAB_0017642e:
MOV ECX,dword ptr [RBP + -0xe4]
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + RAX*0x4 + -0xe0],ECX
XOR EAX,EAX
CMP ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RBP + -0xed],AL
JGE 0x00176459
CMP dword ptr [RBP + -0x38],0x14
SETL AL
MOV byte ptr [RBP + -0xed],AL
LAB_00176459:
MOV AL,byte ptr [RBP + -0xed]
TEST AL,0x1
JNZ 0x00176465
JMP 0x00176481
LAB_00176465:
JMP 0x00176467
LAB_00176467:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00176385
LAB_00176481:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001764a3
CALL 0x00124040
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001765f0
LAB_001764a3:
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],-0x1
LAB_001764b3:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x1
JL 0x0017652b
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + RAX*0x4 + -0xe0]
MOV dword ptr [RBP + -0x54],ECX
XOR EAX,EAX
SUB EAX,ECX
CDQE
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x001764f3
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001765f0
LAB_001764f3:
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x54]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0x14]
CQO
IDIV RCX
MOV qword ptr [RBP + -0x40],RAX
MOVSXD RAX,dword ptr [RBP + -0x54]
IMUL RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOVSXD RAX,dword ptr [RBP + -0x14]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001764b3
LAB_0017652b:
CMP dword ptr [RBP + -0x38],0x0
JNZ 0x00176574
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + RAX*0x4 + -0xe0]
MOV dword ptr [RBP + -0x54],ECX
XOR EAX,EAX
SUB EAX,ECX
CDQE
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x00176563
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001765f0
LAB_00176563:
MOVSXD RAX,dword ptr [RBP + -0x54]
IMUL RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
LAB_00176574:
CMP dword ptr [RBP + -0x34],0x0
JGE 0x001765b1
MOV RAX,-0x7fffffffffffffff
CMP qword ptr [RBP + -0x50],RAX
JL 0x0017659a
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,qword ptr [RBP + -0x28]
JLE 0x001765af
LAB_0017659a:
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001765f0
LAB_001765af:
JMP 0x001765d2
LAB_001765b1:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x20]
JGE 0x001765d0
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001765f0
LAB_001765d0:
JMP 0x001765d2
LAB_001765d2:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
CALL 0x00124040
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_001765f0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xf0
POP RBP
RET
|
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5)
{
int *piVar1;
int local_f4;
int local_f0;
int local_ec;
int aiStack_e8 [32];
byte *local_68;
int local_5c;
long local_58;
long local_50;
long local_48;
int local_40;
int local_3c;
long *local_38;
long local_30;
long local_28;
int local_1c;
byte *local_18;
byte *local_10;
*param_5 = 0;
local_48 = param_3;
if (0 < param_3) {
local_48 = -param_3;
}
local_50 = param_4;
if (0 < param_4) {
local_50 = -param_4;
}
local_18 = param_1;
if (local_50 < local_48) {
local_48 = local_50;
}
while ((PTR_ctype_latin1_003727a0[(ulong)*local_18 + 1] & 8) != 0) {
local_18 = local_18 + 1;
}
local_3c = -1;
if (*local_18 == 0x2b) {
local_18 = local_18 + 1;
}
else if (*local_18 == 0x2d) {
local_18 = local_18 + 1;
local_3c = 1;
}
local_68 = local_18;
for (; *local_18 == 0x30; local_18 = local_18 + 1) {
}
local_40 = 0;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
while( true ) {
if (((char)*local_18 < '0') || ('9' < (char)*local_18)) {
if (((char)*local_18 < 'A') || ('Z' < (char)*local_18)) {
if (((char)*local_18 < 'a') || ('z' < (char)*local_18)) {
local_f4 = 0x7f;
}
else {
local_f4 = (char)*local_18 + -0x57;
}
local_f0 = local_f4;
}
else {
local_f0 = (char)*local_18 + -0x37;
}
local_ec = local_f0;
}
else {
local_ec = (char)*local_18 + -0x30;
}
aiStack_e8[local_40] = local_ec;
if (local_1c <= local_ec || 0x13 < local_40) break;
local_40 = local_40 + 1;
local_18 = local_18 + 1;
}
if (local_68 == local_18) {
piVar1 = __errno_location();
*piVar1 = 0x21;
local_10 = (byte *)0x0;
}
else {
local_58 = 0;
local_50 = -1;
while (local_40 = local_40 + -1, 0 < local_40) {
local_5c = aiStack_e8[local_40];
if (-local_5c < local_48) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
local_48 = (local_48 + local_5c) / (long)local_1c;
local_58 = local_5c * local_50 + local_58;
local_50 = local_1c * local_50;
}
if (local_40 == 0) {
local_5c = aiStack_e8[0];
if (-aiStack_e8[0] < local_48) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
local_58 = aiStack_e8[0] * local_50 + local_58;
}
if (local_3c < 0) {
if ((local_58 < -0x7fffffffffffffff) || (local_58 = -local_58, local_30 < local_58)) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
}
else if (local_58 < local_28) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
*local_38 = local_58;
piVar1 = __errno_location();
*piVar1 = 0;
local_10 = local_18;
}
return local_10;
}
| |
49,014 | str2int | eloqsql/strings/str2int.c | char *str2int(register const char *src, register int radix, long int lower,
long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
long limit; /* "largest" possible valid input */
long scale; /* the amount to multiply next digit by */
long sofar; /* the running value */
register int d; /* (negative of) next digit */
char *start;
int digits[32]; /* Room for numbers */
/* Make sure *val is sensible in case of error */
*val = 0;
/* Check that the radix is in the range 2..36 */
#ifndef DBUG_OFF
if (radix < 2 || radix > 36) {
errno=EDOM;
return NullS;
}
#endif
/* The basic problem is: how do we handle the conversion of
a number without resorting to machine-specific code to
check for overflow? Obviously, we have to ensure that
no calculation can overflow. We are guaranteed that the
"lower" and "upper" arguments are valid machine integers.
On sign-and-magnitude, twos-complement, and ones-complement
machines all, if +|n| is representable, so is -|n|, but on
twos complement machines the converse is not true. So the
"maximum" representable number has a negative representative.
Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest"
number we are concerned with. */
/* Calculate Limit using Scale as a scratch variable */
if ((limit = lower) > 0) limit = -limit;
if ((scale = upper) > 0) scale = -scale;
if (scale < limit) limit = scale;
/* Skip leading spaces and check for a sign.
Note: because on a 2s complement machine MinLong is a valid
integer but |MinLong| is not, we have to keep the current
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
/* Skip leading zeros so that we never compute a power of radix
in scale that we won't have a need for. Otherwise sticking
enough 0s in front of a number could cause the multiplication
to overflow when it neededn't.
*/
start=(char*) src;
while (*src == '0') src++;
/* Move over the remaining digits. We have to convert from left
to left in order to avoid overflow. Answer is after last digit.
*/
for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ;
/* Check that there is at least one digit */
if (start == src) {
errno=EDOM;
return NullS;
}
/* The invariant we want to maintain is that src is just
to the right of n digits, we've converted k digits to
sofar, scale = -radix**k, and scale < sofar < 0. Now
if the final number is to be within the original
Limit, we must have (to the left)*scale+sofar >= Limit,
or (to the left)*scale >= Limit-sofar, i.e. the digits
to the left of src must form an integer <= (Limit-sofar)/(scale).
In particular, this is true of the next digit. In our
incremental calculation of Limit,
IT IS VITAL that (-|N|)/(-|D|) = |N|/|D|
*/
for (sofar = 0, scale = -1; --n >= 1;)
{
if ((long) -(d=digits[n]) < limit) {
errno=ERANGE;
return NullS;
}
limit = (limit+d)/radix, sofar += d*scale; scale *= radix;
}
if (n == 0)
{
if ((long) -(d=digits[n]) < limit) /* get last digit */
{
errno=ERANGE;
return NullS;
}
sofar+=d*scale;
}
/* Now it might still happen that sofar = -32768 or its equivalent,
so we can't just multiply by the sign and check that the result
is in the range lower..upper. All of this caution is a right
pain in the neck. If only there were a standard routine which
says generate thus and such a signal on integer overflow...
But not enough machines can do it *SIGH*.
*/
if (sign < 0)
{
if (sofar < -LONG_MAX || (sofar= -sofar) > upper)
{
errno=ERANGE;
return NullS;
}
}
else if (sofar < lower)
{
errno=ERANGE;
return NullS;
}
*val = sofar;
errno=0; /* indicate that all went well */
return (char*) src;
} | O3 | c | str2int:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r9
movq $0x0, (%r8)
movq %rdx, %rax
negq %rax
cmovsq %rdx, %rax
movq %rcx, %rdx
negq %rdx
cmovnsq %rcx, %rdx
leaq 0x2baf7d(%rip), %r10 # 0x314760
movq 0x40(%r10), %r11
movzbl (%rdi), %r10d
incq %rdi
testb $0x8, 0x1(%r11,%r10)
jne 0x597e7
negq %rax
cmpq %rax, %rdx
cmovlq %rdx, %rax
cmpl $0x2b, %r10d
je 0x59814
cmpl $0x2d, %r10d
jne 0x59811
xorl %r10d, %r10d
jmp 0x59817
decq %rdi
movb $0x1, %r10b
leaq -0x1(%rdi), %rbx
movb 0x1(%rbx), %r14b
incq %rbx
cmpb $0x30, %r14b
je 0x5981b
xorl %r11d, %r11d
xorl %edx, %edx
leal -0x30(%r14), %r15d
cmpb $0x9, %r15b
ja 0x5983d
movzbl %r15b, %r15d
jmp 0x59869
leal -0x41(%r14), %r15d
cmpb $0x19, %r15b
ja 0x59851
movzbl %r14b, %r15d
addl $-0x37, %r15d
jmp 0x59869
leal -0x61(%r14), %r12d
movl $0x7f, %r15d
cmpb $0x19, %r12b
ja 0x59869
movzbl %r14b, %r15d
addl $-0x57, %r15d
movl %r15d, -0xa0(%rbp,%rdx,4)
cmpl %esi, %r15d
jge 0x5988b
cmpq $0x13, %rdx
ja 0x5988b
incq %rdx
movb 0x1(%rbx), %r14b
incq %rbx
incl %r11d
jmp 0x5982d
cmpq %rdi, %rbx
je 0x598d3
cmpq $0x2, %rdx
jb 0x598db
movslq %esi, %r14
movq $-0x1, %rdi
xorl %esi, %esi
decl %r11d
movslq -0xa0(%rbp,%r11,4), %r15
movq %r15, %rdx
negq %rdx
cmpq %rdx, %rax
jg 0x59916
addq %r15, %rax
cqto
idivq %r14
imulq %rdi, %r15
addq %r15, %rsi
imulq %r14, %rdi
cmpl $0x1, %r11d
jg 0x598a2
jmp 0x598e8
movl $0x21, %r14d
jmp 0x5991c
xorl %esi, %esi
decl %edx
jne 0x59901
movq $-0x1, %rdi
movslq -0xa0(%rbp), %rdx
movq %rdx, %r11
negq %r11
cmpq %r11, %rax
jg 0x59916
imulq %rdx, %rdi
addq %rdi, %rsi
testb %r10b, %r10b
je 0x59939
negq %rsi
seto %al
cmpq %rcx, %rsi
setg %cl
orb %al, %cl
je 0x5993e
movl $0x22, %r14d
xorl %ebx, %ebx
callq 0x24050
movl %r14d, (%rax)
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq %r9, %rsi
jl 0x59916
movq %rsi, (%r8)
xorl %r14d, %r14d
jmp 0x5991e
nop
| str2int:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov r9, rdx
mov qword ptr [r8], 0
mov rax, rdx
neg rax
cmovs rax, rdx
mov rdx, rcx
neg rdx
cmovns rdx, rcx
lea r10, my_charset_latin1
mov r11, [r10+40h]
loc_597E7:
movzx r10d, byte ptr [rdi]
inc rdi
test byte ptr [r11+r10+1], 8
jnz short loc_597E7
neg rax
cmp rdx, rax
cmovl rax, rdx
cmp r10d, 2Bh ; '+'
jz short loc_59814
cmp r10d, 2Dh ; '-'
jnz short loc_59811
xor r10d, r10d
jmp short loc_59817
loc_59811:
dec rdi
loc_59814:
mov r10b, 1
loc_59817:
lea rbx, [rdi-1]
loc_5981B:
mov r14b, [rbx+1]
inc rbx
cmp r14b, 30h ; '0'
jz short loc_5981B
xor r11d, r11d
xor edx, edx
loc_5982D:
lea r15d, [r14-30h]
cmp r15b, 9
ja short loc_5983D
movzx r15d, r15b
jmp short loc_59869
loc_5983D:
lea r15d, [r14-41h]
cmp r15b, 19h
ja short loc_59851
movzx r15d, r14b
add r15d, 0FFFFFFC9h
jmp short loc_59869
loc_59851:
lea r12d, [r14-61h]
mov r15d, 7Fh
cmp r12b, 19h
ja short loc_59869
movzx r15d, r14b
add r15d, 0FFFFFFA9h
loc_59869:
mov [rbp+rdx*4+var_A0], r15d
cmp r15d, esi
jge short loc_5988B
cmp rdx, 13h
ja short loc_5988B
inc rdx
mov r14b, [rbx+1]
inc rbx
inc r11d
jmp short loc_5982D
loc_5988B:
cmp rbx, rdi
jz short loc_598D3
cmp rdx, 2
jb short loc_598DB
movsxd r14, esi
mov rdi, 0FFFFFFFFFFFFFFFFh
xor esi, esi
loc_598A2:
dec r11d
movsxd r15, [rbp+r11*4+var_A0]
mov rdx, r15
neg rdx
cmp rax, rdx
jg short loc_59916
add rax, r15
cqo
idiv r14
imul r15, rdi
add rsi, r15
imul rdi, r14
cmp r11d, 1
jg short loc_598A2
jmp short loc_598E8
loc_598D3:
mov r14d, 21h ; '!'
jmp short loc_5991C
loc_598DB:
xor esi, esi
dec edx
jnz short loc_59901
mov rdi, 0FFFFFFFFFFFFFFFFh
loc_598E8:
movsxd rdx, [rbp+var_A0]
mov r11, rdx
neg r11
cmp rax, r11
jg short loc_59916
imul rdi, rdx
add rsi, rdi
loc_59901:
test r10b, r10b
jz short loc_59939
neg rsi
seto al
cmp rsi, rcx
setnle cl
or cl, al
jz short loc_5993E
loc_59916:
mov r14d, 22h ; '"'
loc_5991C:
xor ebx, ebx
loc_5991E:
call ___errno_location
mov [rax], r14d
mov rax, rbx
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_59939:
cmp rsi, r9
jl short loc_59916
loc_5993E:
mov [r8], rsi
xor r14d, r14d
jmp short loc_5991E
| long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5)
{
long long v6; // rax
long long v7; // rdx
long long v8; // r10
long long v9; // rax
char v10; // r10
long long v11; // rbx
unsigned __int8 v12; // r14
long long v13; // r11
unsigned long long i; // rdx
int v15; // r15d
long long v16; // r14
long long v17; // rsi
long long v18; // r15
int v19; // r14d
_DWORD v21[40]; // [rsp+0h] [rbp-A0h]
*a5 = 0LL;
v6 = -a3;
if ( a3 > 0 )
v6 = a3;
v7 = -a4;
if ( a4 <= 0 )
v7 = a4;
do
v8 = *(unsigned __int8 *)a1++;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 );
v9 = -v6;
if ( v7 < v9 )
v9 = v7;
if ( (_DWORD)v8 != 43 )
{
if ( (_DWORD)v8 == 45 )
{
v10 = 0;
goto LABEL_13;
}
--a1;
}
v10 = 1;
LABEL_13:
v11 = a1 - 1;
do
v12 = *(_BYTE *)++v11;
while ( v12 == 48 );
LODWORD(v13) = 0;
for ( i = 0LL; ; ++i )
{
LOBYTE(v15) = v12 - 48;
if ( (unsigned __int8)(v12 - 48) > 9u )
{
if ( (unsigned __int8)(v12 - 65) > 0x19u )
{
v15 = 127;
if ( (unsigned __int8)(v12 - 97) <= 0x19u )
v15 = v12 - 87;
}
else
{
v15 = v12 - 55;
}
}
else
{
v15 = (unsigned __int8)v15;
}
v21[i] = v15;
if ( v15 >= a2 || i > 0x13 )
break;
v12 = *(_BYTE *)++v11;
LODWORD(v13) = v13 + 1;
}
if ( v11 != a1 )
{
if ( i >= 2 )
{
v16 = a2;
a1 = -1LL;
v17 = 0LL;
while ( 1 )
{
v13 = (unsigned int)(v13 - 1);
v18 = (int)v21[v13];
if ( v9 > -v18 )
goto LABEL_38;
v9 = (v18 + v9) / v16;
v17 += a1 * v18;
a1 *= v16;
if ( (int)v13 <= 1 )
goto LABEL_34;
}
}
v17 = 0LL;
if ( (_DWORD)i == 1 )
{
a1 = -1LL;
LABEL_34:
if ( v9 > -(long long)v21[0] )
goto LABEL_38;
a1 *= v21[0];
v17 += a1;
}
if ( v10 )
{
v17 = -v17;
if ( __OFSUB__(v17, 1LL) || v17 > a4 )
{
LABEL_38:
v19 = 34;
goto LABEL_39;
}
}
else if ( v17 < a3 )
{
goto LABEL_38;
}
*a5 = v17;
v19 = 0;
goto LABEL_40;
}
v19 = 33;
LABEL_39:
v11 = 0LL;
LABEL_40:
*(_DWORD *)__errno_location(a1) = v19;
return v11;
}
| str2int:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x80
MOV R9,RDX
MOV qword ptr [R8],0x0
MOV RAX,RDX
NEG RAX
CMOVS RAX,RDX
MOV RDX,RCX
NEG RDX
CMOVNS RDX,RCX
LEA R10,[0x414760]
MOV R11,qword ptr [R10 + 0x40]
LAB_001597e7:
MOVZX R10D,byte ptr [RDI]
INC RDI
TEST byte ptr [R11 + R10*0x1 + 0x1],0x8
JNZ 0x001597e7
NEG RAX
CMP RDX,RAX
CMOVL RAX,RDX
CMP R10D,0x2b
JZ 0x00159814
CMP R10D,0x2d
JNZ 0x00159811
XOR R10D,R10D
JMP 0x00159817
LAB_00159811:
DEC RDI
LAB_00159814:
MOV R10B,0x1
LAB_00159817:
LEA RBX,[RDI + -0x1]
LAB_0015981b:
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
CMP R14B,0x30
JZ 0x0015981b
XOR R11D,R11D
XOR EDX,EDX
LAB_0015982d:
LEA R15D,[R14 + -0x30]
CMP R15B,0x9
JA 0x0015983d
MOVZX R15D,R15B
JMP 0x00159869
LAB_0015983d:
LEA R15D,[R14 + -0x41]
CMP R15B,0x19
JA 0x00159851
MOVZX R15D,R14B
ADD R15D,-0x37
JMP 0x00159869
LAB_00159851:
LEA R12D,[R14 + -0x61]
MOV R15D,0x7f
CMP R12B,0x19
JA 0x00159869
MOVZX R15D,R14B
ADD R15D,-0x57
LAB_00159869:
MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D
CMP R15D,ESI
JGE 0x0015988b
CMP RDX,0x13
JA 0x0015988b
INC RDX
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
INC R11D
JMP 0x0015982d
LAB_0015988b:
CMP RBX,RDI
JZ 0x001598d3
CMP RDX,0x2
JC 0x001598db
MOVSXD R14,ESI
MOV RDI,-0x1
XOR ESI,ESI
LAB_001598a2:
DEC R11D
MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0]
MOV RDX,R15
NEG RDX
CMP RAX,RDX
JG 0x00159916
ADD RAX,R15
CQO
IDIV R14
IMUL R15,RDI
ADD RSI,R15
IMUL RDI,R14
CMP R11D,0x1
JG 0x001598a2
JMP 0x001598e8
LAB_001598d3:
MOV R14D,0x21
JMP 0x0015991c
LAB_001598db:
XOR ESI,ESI
DEC EDX
JNZ 0x00159901
MOV RDI,-0x1
LAB_001598e8:
MOVSXD RDX,dword ptr [RBP + -0xa0]
MOV R11,RDX
NEG R11
CMP RAX,R11
JG 0x00159916
IMUL RDI,RDX
ADD RSI,RDI
LAB_00159901:
TEST R10B,R10B
JZ 0x00159939
NEG RSI
SETO AL
CMP RSI,RCX
SETG CL
OR CL,AL
JZ 0x0015993e
LAB_00159916:
MOV R14D,0x22
LAB_0015991c:
XOR EBX,EBX
LAB_0015991e:
CALL 0x00124050
MOV dword ptr [RAX],R14D
MOV RAX,RBX
ADD RSP,0x80
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00159939:
CMP RSI,R9
JL 0x00159916
LAB_0015993e:
MOV qword ptr [R8],RSI
XOR R14D,R14D
JMP 0x0015991e
|
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5)
{
long lVar1;
int *piVar2;
ulong uVar3;
byte *pbVar4;
long lVar5;
byte *pbVar6;
long lVar7;
ulong uVar8;
byte bVar9;
int iVar10;
uint uVar11;
long lVar12;
bool bVar13;
uint local_a8 [32];
*param_5 = 0;
lVar5 = -param_3;
if (0 < param_3) {
lVar5 = param_3;
}
lVar7 = -param_4;
if (param_4 < 1) {
lVar7 = param_4;
}
do {
pbVar4 = param_1;
bVar9 = *pbVar4;
param_1 = pbVar4 + 1;
} while ((PTR_ctype_latin1_004147a0[(ulong)bVar9 + 1] & 8) != 0);
lVar1 = -lVar5;
if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) {
lVar1 = lVar7;
}
pbVar6 = param_1;
if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) {
bVar13 = true;
}
else {
bVar13 = false;
pbVar6 = param_1;
}
pbVar4 = pbVar6 + -1;
do {
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
} while (bVar9 == 0x30);
uVar8 = 0;
uVar3 = 0;
while( true ) {
if ((byte)(bVar9 - 0x30) < 10) {
uVar11 = (uint)(byte)(bVar9 - 0x30);
}
else if ((byte)(bVar9 + 0xbf) < 0x1a) {
uVar11 = bVar9 - 0x37;
}
else {
uVar11 = 0x7f;
if ((byte)(bVar9 + 0x9f) < 0x1a) {
uVar11 = bVar9 - 0x57;
}
}
local_a8[uVar3] = uVar11;
if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break;
uVar3 = uVar3 + 1;
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
uVar8 = (ulong)((int)uVar8 + 1);
}
if (pbVar4 == pbVar6) {
iVar10 = 0x21;
}
else {
if (uVar3 < 2) {
lVar5 = 0;
if ((int)uVar3 == 1) {
lVar7 = -1;
goto LAB_001598e8;
}
LAB_00159901:
if (bVar13) {
lVar7 = -lVar5;
bVar13 = -param_4 == lVar5;
lVar5 = lVar7;
if (bVar13 || lVar7 < param_4) {
LAB_0015993e:
*param_5 = lVar5;
iVar10 = 0;
goto LAB_0015991e;
}
}
else if (param_3 <= lVar5) goto LAB_0015993e;
}
else {
lVar7 = -1;
lVar5 = 0;
do {
uVar11 = (int)uVar8 - 1;
uVar8 = (ulong)uVar11;
lVar12 = (long)(int)local_a8[uVar8];
if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_00159916;
lVar1 = (lVar1 + lVar12) / (long)param_2;
lVar5 = lVar5 + lVar12 * lVar7;
lVar7 = lVar7 * param_2;
} while (1 < (int)uVar11);
LAB_001598e8:
lVar12 = (long)(int)local_a8[0];
if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) {
lVar5 = lVar5 + lVar7 * lVar12;
goto LAB_00159901;
}
}
LAB_00159916:
iVar10 = 0x22;
}
pbVar4 = (byte *)0x0;
LAB_0015991e:
piVar2 = __errno_location();
*piVar2 = iVar10;
return pbVar4;
}
| |
49,015 | my_open_parent_dir_nosymlinks | eloqsql/mysys/my_symlink.c | const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd)
{
char buf[FN_REFLEN + 1];
char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf));
int fd, dfd= -1;
if (*end)
{
errno= ENAMETOOLONG;
return NULL;
}
if (*s != '/') /* not an absolute path */
{
errno= ENOENT;
return NULL;
}
for (;;)
{
if (*e == '/') /* '//' in the path */
{
errno= ENOENT;
goto err;
}
while (*e && *e != '/')
e++;
*e= 0;
if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3))
{
errno= ENOENT;
goto err;
}
if (++e >= end)
{
*pdfd= dfd;
return pathname + (s - buf);
}
fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC);
if (fd < 0)
goto err;
if (dfd >= 0)
close(dfd);
dfd= fd;
s= e;
}
err:
if (dfd >= 0)
close(dfd);
return NULL;
} | O3 | c | my_open_parent_dir_nosymlinks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x240(%rbp), %r15
movl $0x201, %edx # imm = 0x201
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5a55c
cmpb $0x0, (%rax)
je 0x2bf2f
callq 0x24050
movl $0x24, (%rax)
jmp 0x2c006
cmpb $0x2f, -0x240(%rbp)
jne 0x2bfdb
movq %rax, %r12
movq %r14, -0x248(%rbp)
movb -0x23f(%rbp), %al
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpb $0x2f, %al
je 0x2bfeb
leaq -0x23f(%rbp), %rcx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq %r15, %rsi
incq %rcx
movq %rcx, %r15
testb %al, %al
je 0x2bf84
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x2bf84
movb (%r15), %al
incq %r15
jmp 0x2bf70
movb $0x0, -0x1(%r15)
cmpw $0x2e, (%rsi)
je 0x2bfe8
movzwl (%rsi), %eax
xorl $0x2e2e, %eax # imm = 0x2E2E
movzbl 0x2(%rsi), %ecx
orw %ax, %cx
je 0x2bfe8
cmpq %r12, %r15
jae 0x2c02c
movl %r14d, %edi
movl $0x2a0000, %edx # imm = 0x2A0000
xorl %eax, %eax
callq 0x242c0
testl %eax, %eax
js 0x2bff9
movl %eax, %r13d
testl %r14d, %r14d
js 0x2bfcc
movl %r14d, %edi
callq 0x245e0
movb (%r15), %al
movl %r13d, %r14d
movq %r15, %rcx
cmpb $0x2f, %al
jne 0x2bf67
jmp 0x2bfeb
callq 0x24050
movl $0x2, (%rax)
jmp 0x2c006
movl %r14d, %r13d
callq 0x24050
movl $0x2, (%rax)
movl %r13d, %r14d
testl %r14d, %r14d
js 0x2c006
movl %r14d, %edi
callq 0x245e0
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2c045
movq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x248(%rbp), %rax
movl %r14d, (%rax)
leaq -0x240(%rbp), %rax
subq %rax, %rsi
addq %rsi, %rbx
jmp 0x2c008
callq 0x24320
nop
| my_open_parent_dir_nosymlinks:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_240]
mov edx, 201h
mov rdi, r15
mov rsi, rbx
call strnmov
cmp byte ptr [rax], 0
jz short loc_2BF2F
call ___errno_location
mov dword ptr [rax], 24h ; '$'
jmp loc_2C006
loc_2BF2F:
cmp [rbp+var_240], 2Fh ; '/'
jnz loc_2BFDB
mov r12, rax
mov [rbp+var_248], r14
mov al, [rbp+var_23F]
mov r13d, 0FFFFFFFFh
cmp al, 2Fh ; '/'
jz loc_2BFEB
lea rcx, [rbp+var_23F]
mov r14d, 0FFFFFFFFh
loc_2BF67:
mov rsi, r15
inc rcx
mov r15, rcx
loc_2BF70:
test al, al
jz short loc_2BF84
movzx eax, al
cmp eax, 2Fh ; '/'
jz short loc_2BF84
mov al, [r15]
inc r15
jmp short loc_2BF70
loc_2BF84:
mov byte ptr [r15-1], 0
cmp word ptr [rsi], 2Eh ; '.'
jz short loc_2BFE8
movzx eax, word ptr [rsi]
xor eax, 2E2Eh
movzx ecx, byte ptr [rsi+2]
or cx, ax
jz short loc_2BFE8
cmp r15, r12
jnb loc_2C02C
mov edi, r14d
mov edx, offset unk_2A0000
xor eax, eax
call _openat64
test eax, eax
js short loc_2BFF9
mov r13d, eax
test r14d, r14d
js short loc_2BFCC
mov edi, r14d
call _close
loc_2BFCC:
mov al, [r15]
mov r14d, r13d
mov rcx, r15
cmp al, 2Fh ; '/'
jnz short loc_2BF67
jmp short loc_2BFEB
loc_2BFDB:
call ___errno_location
mov dword ptr [rax], 2
jmp short loc_2C006
loc_2BFE8:
mov r13d, r14d
loc_2BFEB:
call ___errno_location
mov dword ptr [rax], 2
mov r14d, r13d
loc_2BFF9:
test r14d, r14d
js short loc_2C006
mov edi, r14d
call _close
loc_2C006:
xor ebx, ebx
loc_2C008:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_2C045
mov rax, rbx
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2C02C:
mov rax, [rbp+var_248]
mov [rax], r14d
lea rax, [rbp+var_240]
sub rsi, rax
add rbx, rsi
jmp short loc_2C008
loc_2C045:
call ___stack_chk_fail
| char * my_open_parent_dir_nosymlinks(char *a1, unsigned int *a2)
{
char *v4; // r15
char *v5; // rdi
char *v6; // rsi
char *v7; // rax
char *v8; // r12
char v9; // al
int v10; // r13d
char *v11; // rcx
unsigned int v12; // r14d
long long v13; // rcx
int v14; // eax
unsigned int *v17; // [rsp+8h] [rbp-248h]
char v18; // [rsp+10h] [rbp-240h] BYREF
char v19; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v20; // [rsp+220h] [rbp-30h]
v20 = __readfsqword(0x28u);
v4 = &v18;
v5 = &v18;
v6 = a1;
v7 = (char *)strnmov(&v18, a1, 513LL);
if ( *v7 )
{
*(_DWORD *)__errno_location(&v18, a1) = 36;
return 0LL;
}
if ( v18 != 47 )
{
*(_DWORD *)__errno_location(&v18, a1) = 2;
return 0LL;
}
v8 = v7;
v17 = a2;
v9 = v19;
v10 = -1;
if ( v19 == 47 )
{
LABEL_20:
*(_DWORD *)__errno_location(v5, v6) = 2;
v12 = v10;
LABEL_21:
if ( (v12 & 0x80000000) == 0 )
close(v12);
return 0LL;
}
v11 = &v19;
v12 = -1;
while ( 1 )
{
v6 = v4;
v4 = v11 + 1;
while ( v9 && v9 != 47 )
v9 = *v4++;
*(v4 - 1) = 0;
if ( *(_WORD *)v6 == 46 || (v13 = (unsigned __int8)v6[2], LOWORD(v13) = *(_WORD *)v6 ^ 0x2E2E | v13, !(_WORD)v13) )
{
v10 = v12;
goto LABEL_20;
}
if ( v4 >= v8 )
break;
v5 = (char *)v12;
v14 = openat64(v12, v6, &unk_2A0000, v13);
if ( v14 < 0 )
goto LABEL_21;
v10 = v14;
if ( (v12 & 0x80000000) == 0 )
{
v5 = (char *)v12;
close(v12);
}
v9 = *v4;
v12 = v10;
v11 = v4;
if ( *v4 == 47 )
goto LABEL_20;
}
*v17 = v12;
return &a1[v6 - &v18];
}
| my_open_parent_dir_nosymlinks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x240]
MOV EDX,0x201
MOV RDI,R15
MOV RSI,RBX
CALL 0x0015a55c
CMP byte ptr [RAX],0x0
JZ 0x0012bf2f
CALL 0x00124050
MOV dword ptr [RAX],0x24
JMP 0x0012c006
LAB_0012bf2f:
CMP byte ptr [RBP + -0x240],0x2f
JNZ 0x0012bfdb
MOV R12,RAX
MOV qword ptr [RBP + -0x248],R14
MOV AL,byte ptr [RBP + -0x23f]
MOV R13D,0xffffffff
CMP AL,0x2f
JZ 0x0012bfeb
LEA RCX,[RBP + -0x23f]
MOV R14D,0xffffffff
LAB_0012bf67:
MOV RSI,R15
INC RCX
MOV R15,RCX
LAB_0012bf70:
TEST AL,AL
JZ 0x0012bf84
MOVZX EAX,AL
CMP EAX,0x2f
JZ 0x0012bf84
MOV AL,byte ptr [R15]
INC R15
JMP 0x0012bf70
LAB_0012bf84:
MOV byte ptr [R15 + -0x1],0x0
CMP word ptr [RSI],0x2e
JZ 0x0012bfe8
MOVZX EAX,word ptr [RSI]
XOR EAX,0x2e2e
MOVZX ECX,byte ptr [RSI + 0x2]
OR CX,AX
JZ 0x0012bfe8
CMP R15,R12
JNC 0x0012c02c
MOV EDI,R14D
MOV EDX,0x2a0000
XOR EAX,EAX
CALL 0x001242c0
TEST EAX,EAX
JS 0x0012bff9
MOV R13D,EAX
TEST R14D,R14D
JS 0x0012bfcc
MOV EDI,R14D
CALL 0x001245e0
LAB_0012bfcc:
MOV AL,byte ptr [R15]
MOV R14D,R13D
MOV RCX,R15
CMP AL,0x2f
JNZ 0x0012bf67
JMP 0x0012bfeb
LAB_0012bfdb:
CALL 0x00124050
MOV dword ptr [RAX],0x2
JMP 0x0012c006
LAB_0012bfe8:
MOV R13D,R14D
LAB_0012bfeb:
CALL 0x00124050
MOV dword ptr [RAX],0x2
MOV R14D,R13D
LAB_0012bff9:
TEST R14D,R14D
JS 0x0012c006
MOV EDI,R14D
CALL 0x001245e0
LAB_0012c006:
XOR EBX,EBX
LAB_0012c008:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012c045
MOV RAX,RBX
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012c02c:
MOV RAX,qword ptr [RBP + -0x248]
MOV dword ptr [RAX],R14D
LEA RAX,[RBP + -0x240]
SUB RSI,RAX
ADD RBX,RSI
JMP 0x0012c008
LAB_0012c045:
CALL 0x00124320
|
long my_open_parent_dir_nosymlinks(long param_1,int *param_2)
{
short *psVar1;
int iVar2;
short *psVar3;
int *piVar4;
long lVar5;
int __fd;
short *psVar6;
short *__file;
long in_FS_OFFSET;
int1 local_248 [2];
int1 local_246 [526];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
psVar3 = (short *)strnmov(local_248,param_1,0x201);
if ((char)*psVar3 == '\0') {
if (local_248[0] == '/') {
__fd = -1;
if (local_248[1] != '/') {
psVar1 = (short *)(local_248 + 1);
__file = (short *)local_248;
__fd = -1;
do {
while ((psVar6 = (short *)((long)psVar1 + 1), local_248[1] != '\0' &&
(local_248[1] != '/'))) {
psVar1 = psVar6;
local_248[1] = *(char *)psVar6;
}
*(char *)psVar1 = '\0';
if ((*__file == 0x2e) || ((char)__file[1] == '\0' && *__file == 0x2e2e)) break;
if (psVar3 <= psVar6) {
*param_2 = __fd;
lVar5 = (long)__file + (param_1 - (long)local_248);
goto LAB_0012c008;
}
iVar2 = openat64(__fd,(char *)__file,0x2a0000);
if (iVar2 < 0) goto LAB_0012bff9;
if (-1 < __fd) {
close(__fd);
}
local_248[1] = *(char *)psVar6;
__fd = iVar2;
psVar1 = psVar6;
__file = psVar6;
} while (local_248[1] != '/');
}
piVar4 = __errno_location();
*piVar4 = 2;
LAB_0012bff9:
if (-1 < __fd) {
close(__fd);
}
}
else {
piVar4 = __errno_location();
*piVar4 = 2;
}
}
else {
piVar4 = __errno_location();
*piVar4 = 0x24;
}
lVar5 = 0;
LAB_0012c008:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar5;
}
| |
49,016 | Catch::XmlWriter::writeAttribute(Catch::StringRef, Catch::StringRef) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | XmlWriter& XmlWriter::writeAttribute( StringRef name,
StringRef attribute ) {
if( !name.empty() && !attribute.empty() )
m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"';
return *this;
} | O3 | cpp | Catch::XmlWriter::writeAttribute(Catch::StringRef, Catch::StringRef):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdi, %rbx
testq %rdx, %rdx
sete %al
testq %r8, %r8
sete %cl
orb %al, %cl
jne 0x6451f
movq %r8, %r14
movq %rdx, %r12
movq %rsi, %r13
movq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
callq 0x17be0
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x17580
movq %rax, %r12
leaq 0x79a6a(%rip), %rsi # 0xddf44
movl $0x2, %edx
movq %rax, %rdi
callq 0x17be0
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x63f88
movq %r13, %rdi
movq %r12, %rsi
callq 0x63f94
leaq 0x7(%rsp), %rsi
movb $0x22, (%rsi)
movl $0x1, %edx
movq %r12, %rdi
callq 0x17be0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN5Catch9XmlWriter14writeAttributeENS_9StringRefES1_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r15, rcx
mov rbx, rdi
test rdx, rdx
setz al
test r8, r8
setz cl
or cl, al
jnz short loc_6451F
mov r14, r8
mov r12, rdx
mov r13, rsi
mov rdi, [rbx+40h]
lea rsi, [rsp+48h+var_40]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rax; this
mov rsi, r13; char *
mov rdx, r12; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
mov r12, rax
lea rsi, aXmlStylesheetT+25h; "=\""
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea r13, [rsp+48h+var_40]
mov rdi, r13
mov rsi, r15
mov rdx, r14
mov ecx, 1
call _ZN5Catch9XmlEncodeC2ENS_9StringRefENS0_7ForWhatE; Catch::XmlEncode::XmlEncode(Catch::StringRef,Catch::XmlEncode::ForWhat)
mov rdi, r13; this
mov rsi, r12; std::ostream *
call _ZNK5Catch9XmlEncode8encodeToERSo; Catch::XmlEncode::encodeTo(std::ostream &)
lea rsi, [rsp+48h+var_41]
mov byte ptr [rsi], 22h ; '"'
mov edx, 1
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_6451F:
mov rax, rbx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long Catch::XmlWriter::writeAttribute(long long a1, const char *a2, long long a3, long long a4, long long a5)
{
long long v9; // rdi
std::ostream *v10; // rax
std::ostream *v11; // r12
char v13; // [rsp+7h] [rbp-41h] BYREF
_BYTE v14[64]; // [rsp+8h] [rbp-40h] BYREF
if ( a3 != 0 && a5 != 0 )
{
v9 = *(_QWORD *)(a1 + 64);
v14[0] = 32;
v10 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v9, v14, 1LL);
v11 = (std::ostream *)std::ostream::write(v10, a2, a3);
std::__ostream_insert<char,std::char_traits<char>>(v11, "=\"", 2LL);
Catch::XmlEncode::XmlEncode((long long)v14, a4, a5, 1);
Catch::XmlEncode::encodeTo((Catch::XmlEncode *)v14, v11);
v13 = 34;
std::__ostream_insert<char,std::char_traits<char>>(v11, &v13, 1LL);
}
return a1;
}
| writeAttribute:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R15,RCX
MOV RBX,RDI
TEST RDX,RDX
SETZ AL
TEST R8,R8
SETZ CL
OR CL,AL
JNZ 0x0016451f
MOV R14,R8
MOV R12,RDX
MOV R13,RSI
MOV RDI,qword ptr [RBX + 0x40]
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
CALL 0x00117be0
MOV RDI,RAX
MOV RSI,R13
MOV RDX,R12
CALL 0x00117580
MOV R12,RAX
LEA RSI,[0x1ddf44]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00117be0
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x1
CALL 0x00163f88
MOV RDI,R13
MOV RSI,R12
CALL 0x00163f94
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x22
MOV EDX,0x1
MOV RDI,R12
CALL 0x00117be0
LAB_0016451f:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* Catch::XmlWriter::writeAttribute(Catch::StringRef, Catch::StringRef) */
long Catch::XmlWriter::writeAttribute
(long param_1,long param_2,long param_3,int8 param_4,long param_5)
{
ostream *poVar1;
char local_41;
XmlEncode local_40 [24];
if (param_5 != 0 && param_3 != 0) {
local_40[0] = (XmlEncode)0x20;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(*(ostream **)(param_1 + 0x40),(char *)local_40,1);
poVar1 = (ostream *)std::ostream::write((char *)poVar1,param_2);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"=\"",2);
XmlEncode::XmlEncode(local_40,param_4,param_5,1);
XmlEncode::encodeTo(local_40,poVar1);
local_41 = '\"';
std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_41,1);
}
return param_1;
}
| |
49,017 | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/./minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
} | O3 | cpp | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x57095
cmpq $0x0, 0x30(%r15)
je 0x570b3
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x3d5f2
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x56fe1
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4ed98
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x57248
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x571dc
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x56f71
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x56f99
callq 0x2f80e
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x56fab
callq 0x2f80e
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x56fbd
callq 0x2f80e
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5700a
movq 0x98fcf(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x56ff5
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x56fff
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x57332
jmp 0x5700a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x5700a
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x5702f
callq 0x2f80e
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x5703e
callq 0x2f80e
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5704d
callq 0x2f80e
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x57083
movq 0x98f42(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x5706e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x57078
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x57083
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %r14
leaq 0x64319(%rip), %rsi # 0xbb3c2
movq %rax, %rdi
callq 0x18270
jmp 0x570cf
movl $0x10, %edi
callq 0x18360
movq %rax, %r14
leaq 0x64315(%rip), %rsi # 0xbb3dc
movq %rax, %rdi
callq 0x18270
movq 0x98f1a(%rip), %rsi # 0xefff0
movq 0x98ea3(%rip), %rdx # 0xeff80
movq %r14, %rdi
callq 0x18b30
jmp 0x57130
jmp 0x57116
jmp 0x570eb
movq %rax, %rbx
movq %r14, %rdi
callq 0x18500
jmp 0x5713d
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x57121
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x57121
movq %rax, %rdi
callq 0x2ad73
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x572a6
jmp 0x57133
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3d8e4
movq %rbx, %rdi
callq 0x18b90
nop
| _ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_57095
cmp qword ptr [r15+30h], 0
jz loc_570B3
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz loc_56FE1
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_56F71
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_56F71:
lea r14, [rsp+108h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_56F99
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56F99:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_56FAB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56FAB:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_56FBD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56FBD:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_5700A
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_56FF5
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_56FFF
loc_56FE1:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short loc_5700A
loc_56FF5:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_56FFF:
cmp eax, 1
jnz short loc_5700A
mov rax, [rdi]
call qword ptr [rax+18h]
loc_5700A:
lea r14, [rsp+108h+var_90]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_5702F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5702F:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_5703E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5703E:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_5704D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5704D:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_57083
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_5706E
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_57078
loc_5706E:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_57078:
cmp eax, 1
jnz short loc_57083
mov rax, [rdi]
call qword ptr [rax+18h]
loc_57083:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_57095:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_570CF
loc_570B3:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_570CF:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_57130
jmp short loc_57116
jmp short $+2
loc_570EB:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_5713D
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_57121
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_57121
loc_57116:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_57121:
lea rdi, [rsp+108h+var_80]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_57133
loc_57130:
mov rbx, rax
loc_57133:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5713D:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdi
signed __int32 v12; // eax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r14
__int128 v17; // [rsp+8h] [rbp-100h]
_BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF
void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h]
_BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF
long long v21; // [rsp+40h] [rbp-C8h]
volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h]
volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h]
long long v24; // [rsp+68h] [rbp-A0h]
volatile signed __int32 *v25; // [rsp+70h] [rbp-98h]
void **v26[2]; // [rsp+78h] [rbp-90h] BYREF
_BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF
long long v28; // [rsp+90h] [rbp-78h]
volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h]
volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h]
volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h]
void **v32[2]; // [rsp+C8h] [rbp-40h] BYREF
__int128 v33; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_34;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_34:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v20, v4);
*(_QWORD *)&v17 = a2;
*((_QWORD *)&v17 + 1) = a3;
if ( v24 )
{
minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20);
v33 = v17;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18);
minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10);
if ( v19 )
v19(v18, v18, 3LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v32);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32);
if ( v31 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31);
if ( v30 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v29 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29);
v11 = v28;
if ( v28 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v28 + 12);
*(_DWORD *)(v28 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v26);
if ( v25 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v22 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22);
v13 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
return this;
}
| do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x00157095
CMP qword ptr [R15 + 0x30],0x0
JZ 0x001570b3
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x0013d5f2
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00156fe1
LAB_00156f1e:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0014ed98
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_00156f41:
LEA RDI,[RSP + 0x18]
CALL 0x00157248
LAB_00156f4b:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x001571dc
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x00156f71
LAB_00156f62:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00156f71:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00156f99
CALL 0x0012f80e
LAB_00156f99:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x00156fab
CALL 0x0012f80e
LAB_00156fab:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x00156fbd
CALL 0x0012f80e
LAB_00156fbd:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x0015700a
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x00156ff5
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00156fff
LAB_00156fe1:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x00157332
LAB_00156ff3:
JMP 0x0015700a
LAB_00156ff5:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00156fff:
CMP EAX,0x1
JNZ 0x0015700a
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0015700a:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0015702f
CALL 0x0012f80e
LAB_0015702f:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x0015703e
CALL 0x0012f80e
LAB_0015703e:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0015704d
CALL 0x0012f80e
LAB_0015704d:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00157083
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x0015706e
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00157078
LAB_0015706e:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00157078:
CMP EAX,0x1
JNZ 0x00157083
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00157083:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00157095:
MOV EDI,0x10
CALL 0x00118360
MOV R14,RAX
LAB_001570a2:
LEA RSI,[0x1bb3c2]
MOV RDI,RAX
CALL 0x00118270
LAB_001570b1:
JMP 0x001570cf
LAB_001570b3:
MOV EDI,0x10
CALL 0x00118360
MOV R14,RAX
LAB_001570c0:
LEA RSI,[0x1bb3dc]
MOV RDI,RAX
CALL 0x00118270
LAB_001570cf:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R14
CALL 0x00118b30
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
int iVar2;
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16];
code *local_e0;
Expression local_d0 [8];
long *local_c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
data local_90 [16];
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001570a2 to 001570b0 has its CatchHandler @ 001570eb */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 00156fe1 to 00156ff2 has its CatchHandler @ 001570e5 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 00156f1e to 00156f2f has its CatchHandler @ 00157130 */
local_100 = in_RSI;
uStack_f8 = in_RDX;
minja::Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 00156f41 to 00156f4a has its CatchHandler @ 0015711e */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 00156f4b to 00156f57 has its CatchHandler @ 001570f8 */
minja::Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 00156f62 to 00156f70 has its CatchHandler @ 001570e7 */
(*local_e0)(local_f0,local_f0,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8);
}
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001570c0 to 001570ce has its CatchHandler @ 001570e9 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
| |
49,018 | mi_rec_pos | eloqsql/storage/myisam/mi_search.c | my_off_t _mi_rec_pos(MYISAM_SHARE *s, uchar *ptr)
{
my_off_t pos;
switch (s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8:
pos= (my_off_t) mi_uint8korr(ptr);
if (pos == HA_OFFSET_ERROR)
return HA_OFFSET_ERROR; /* end of list */
break;
case 7:
pos= (my_off_t) mi_uint7korr(ptr);
if (pos == (((my_off_t) 1) << 56) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 6:
pos= (my_off_t) mi_uint6korr(ptr);
if (pos == (((my_off_t) 1) << 48) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 5:
pos= (my_off_t) mi_uint5korr(ptr);
if (pos == (((my_off_t) 1) << 40) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
#else
case 8:
case 7:
case 6:
case 5:
ptr+= (s->rec_reflength-4);
/* fall through */
#endif
case 4:
pos= (my_off_t) mi_uint4korr(ptr);
if (pos == (my_off_t) (uint32) ~0L)
return HA_OFFSET_ERROR;
break;
case 3:
pos= (my_off_t) mi_uint3korr(ptr);
if (pos == (my_off_t) (1 << 24) -1)
return HA_OFFSET_ERROR;
break;
case 2:
pos= (my_off_t) mi_uint2korr(ptr);
if (pos == (my_off_t) (1 << 16) -1)
return HA_OFFSET_ERROR;
break;
default: abort(); /* Impossible */
}
return ((s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos :
pos*s->base.pack_reclength);
} | O3 | c | mi_rec_pos:
movl 0x338(%rdi), %eax
addl $-0x2, %eax
cmpl $0x6, %eax
ja 0x853ba
leaq 0x5c6a3(%rip), %rcx # 0xe1948
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl (%rsi), %ecx
rolw $0x8, %cx
movq $-0x1, %rax
cmpw $-0x1, %cx
je 0x85308
movzwl %cx, %ecx
jmp 0x8539d
movl (%rsi), %ecx
movzwl 0x4(%rsi), %eax
shlq $0x30, %rax
shlq $0x10, %rcx
orq %rax, %rcx
bswapq %rcx
movq $-0x1, %rax
movabsq $0xffffffffffff, %rdx # imm = 0xFFFFFFFFFFFF
jmp 0x85386
movl (%rsi), %ecx
bswapl %ecx
movq $-0x1, %rax
cmpl $-0x1, %ecx
jne 0x8539d
retq
movl (%rsi), %ecx
movzbl 0x4(%rsi), %eax
shlq $0x38, %rax
shlq $0x18, %rcx
orq %rax, %rcx
bswapq %rcx
movq $-0x1, %rax
movabsq $0xffffffffff, %rdx # imm = 0xFFFFFFFFFF
jmp 0x85386
movzwl 0x1(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl (%rsi), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq $-0x1, %rax
cmpq $0xffffff, %rcx # imm = 0xFFFFFF
je 0x85308
jmp 0x8539d
movl (%rsi), %ecx
movzwl 0x4(%rsi), %eax
movzbl 0x6(%rsi), %edx
shlq $0x38, %rdx
shlq $0x28, %rax
shlq $0x8, %rcx
orq %rax, %rcx
orq %rdx, %rcx
bswapq %rcx
movq $-0x1, %rax
movabsq $0xffffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFFF
cmpq %rdx, %rcx
je 0x85308
jmp 0x8539d
movq (%rsi), %rcx
bswapq %rcx
cmpq $-0x1, %rcx
je 0x853b2
testb $0x5, 0x318(%rdi)
jne 0x853ae
imulq 0x148(%rdi), %rcx
movq %rcx, %rax
retq
movq $-0x1, %rax
retq
pushq %rbp
movq %rsp, %rbp
callq 0x29610
| _mi_rec_pos:
mov eax, [rdi+338h]
add eax, 0FFFFFFFEh; switch 7 cases
cmp eax, 6
ja def_852AC; jumptable 00000000000852AC default case
lea rcx, jpt_852AC
movsxd rax, ds:(jpt_852AC - 0E1948h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_852AE:
movzx ecx, word ptr [rsi]; jumptable 00000000000852AC case 2
rol cx, 8
mov rax, 0FFFFFFFFFFFFFFFFh
cmp cx, 0FFFFh
jz short locret_85308
movzx ecx, cx
jmp loc_8539D
loc_852CA:
mov ecx, [rsi]; jumptable 00000000000852AC case 6
movzx eax, word ptr [rsi+4]
shl rax, 30h
shl rcx, 10h
or rcx, rax
bswap rcx
mov rax, 0FFFFFFFFFFFFFFFFh
mov rdx, 0FFFFFFFFFFFFh
jmp loc_85386
loc_852F4:
mov ecx, [rsi]; jumptable 00000000000852AC case 4
bswap ecx
mov rax, 0FFFFFFFFFFFFFFFFh
cmp ecx, 0FFFFFFFFh
jnz loc_8539D
locret_85308:
retn
loc_85309:
mov ecx, [rsi]; jumptable 00000000000852AC case 5
movzx eax, byte ptr [rsi+4]
shl rax, 38h
shl rcx, 18h
or rcx, rax
bswap rcx
mov rax, 0FFFFFFFFFFFFFFFFh
mov rdx, 0FFFFFFFFFFh
jmp short loc_85386
loc_85330:
movzx eax, word ptr [rsi+1]; jumptable 00000000000852AC case 3
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rsi]
shl ecx, 10h
or rcx, rax
mov rax, 0FFFFFFFFFFFFFFFFh
cmp rcx, 0FFFFFFh
jz short locret_85308
jmp short loc_8539D
loc_85356:
mov ecx, [rsi]; jumptable 00000000000852AC case 7
movzx eax, word ptr [rsi+4]
movzx edx, byte ptr [rsi+6]
shl rdx, 38h
shl rax, 28h
shl rcx, 8
or rcx, rax
or rcx, rdx
bswap rcx
mov rax, 0FFFFFFFFFFFFFFFFh
mov rdx, 0FFFFFFFFFFFFFFh
loc_85386:
cmp rcx, rdx
jz locret_85308
jmp short loc_8539D
loc_85391:
mov rcx, [rsi]; jumptable 00000000000852AC case 8
bswap rcx
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_853B2
loc_8539D:
test byte ptr [rdi+318h], 5
jnz short loc_853AE
imul rcx, [rdi+148h]
loc_853AE:
mov rax, rcx
retn
loc_853B2:
mov rax, 0FFFFFFFFFFFFFFFFh
retn
def_852AC:
push rbp; jumptable 00000000000852AC default case
mov rbp, rsp
call _abort
| long long mi_rec_pos(long long a1, _WORD *a2, long long a3)
{
unsigned long long v3; // rcx
long long result; // rax
long long v5; // rdx
switch ( *(_DWORD *)(a1 + 824) )
{
case 2:
LOWORD(v3) = __ROL2__(*a2, 8);
result = -1LL;
if ( (_WORD)v3 == 0xFFFF )
return result;
v3 = (unsigned __int16)v3;
goto LABEL_14;
case 3:
v3 = (unsigned __int16)__ROL2__(*(_WORD *)((char *)a2 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)a2 << 16);
result = -1LL;
if ( v3 != 0xFFFFFF )
goto LABEL_14;
return result;
case 4:
v3 = _byteswap_ulong(*(_DWORD *)a2);
result = -1LL;
if ( (_DWORD)v3 == -1 )
return result;
goto LABEL_14;
case 5:
v3 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 4) << 56) | ((unsigned long long)*(unsigned int *)a2 << 24));
result = -1LL;
v5 = 0xFFFFFFFFFFLL;
goto LABEL_11;
case 6:
v3 = _byteswap_uint64(((unsigned long long)(unsigned __int16)a2[2] << 48) | ((unsigned long long)*(unsigned int *)a2 << 16));
result = -1LL;
v5 = 0xFFFFFFFFFFFFLL;
goto LABEL_11;
case 7:
v3 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 6) << 56) | ((unsigned long long)(unsigned __int16)a2[2] << 40) | ((unsigned long long)*(unsigned int *)a2 << 8));
result = -1LL;
v5 = 0xFFFFFFFFFFFFFFLL;
LABEL_11:
if ( v3 != v5 )
goto LABEL_14;
return result;
case 8:
v3 = _byteswap_uint64(*(_QWORD *)a2);
if ( v3 == -1LL )
return -1LL;
LABEL_14:
if ( (*(_BYTE *)(a1 + 792) & 5) == 0 )
v3 *= *(_QWORD *)(a1 + 328);
return v3;
default:
abort(a1, a2, a3);
}
}
| _mi_rec_pos:
MOV EAX,dword ptr [RDI + 0x338]
ADD EAX,-0x2
CMP EAX,0x6
JA 0x001853ba
LEA RCX,[0x1e1948]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOVZX ECX,word ptr [RSI]
ROL CX,0x8
MOV RAX,-0x1
CMP CX,-0x1
JZ 0x00185308
MOVZX ECX,CX
JMP 0x0018539d
caseD_6:
MOV ECX,dword ptr [RSI]
MOVZX EAX,word ptr [RSI + 0x4]
SHL RAX,0x30
SHL RCX,0x10
OR RCX,RAX
BSWAP RCX
MOV RAX,-0x1
MOV RDX,0xffffffffffff
JMP 0x00185386
caseD_4:
MOV ECX,dword ptr [RSI]
BSWAP ECX
MOV RAX,-0x1
CMP ECX,-0x1
JNZ 0x0018539d
LAB_00185308:
RET
caseD_5:
MOV ECX,dword ptr [RSI]
MOVZX EAX,byte ptr [RSI + 0x4]
SHL RAX,0x38
SHL RCX,0x18
OR RCX,RAX
BSWAP RCX
MOV RAX,-0x1
MOV RDX,0xffffffffff
JMP 0x00185386
caseD_3:
MOVZX EAX,word ptr [RSI + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RSI]
SHL ECX,0x10
OR RCX,RAX
MOV RAX,-0x1
CMP RCX,0xffffff
JZ 0x00185308
JMP 0x0018539d
caseD_7:
MOV ECX,dword ptr [RSI]
MOVZX EAX,word ptr [RSI + 0x4]
MOVZX EDX,byte ptr [RSI + 0x6]
SHL RDX,0x38
SHL RAX,0x28
SHL RCX,0x8
OR RCX,RAX
OR RCX,RDX
BSWAP RCX
MOV RAX,-0x1
MOV RDX,0xffffffffffffff
LAB_00185386:
CMP RCX,RDX
JZ 0x00185308
JMP 0x0018539d
caseD_8:
MOV RCX,qword ptr [RSI]
BSWAP RCX
CMP RCX,-0x1
JZ 0x001853b2
LAB_0018539d:
TEST byte ptr [RDI + 0x318],0x5
JNZ 0x001853ae
IMUL RCX,qword ptr [RDI + 0x148]
LAB_001853ae:
MOV RAX,RCX
RET
LAB_001853b2:
MOV RAX,-0x1
RET
default:
PUSH RBP
MOV RBP,RSP
CALL 0x00129610
|
ulong _mi_rec_pos(long param_1,ulong *param_2)
{
ushort uVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
switch(*(int4 *)(param_1 + 0x338)) {
case 2:
uVar1 = (ushort)*param_2 << 8 | (ushort)*param_2 >> 8;
if (uVar1 == 0xffff) {
return 0xffffffffffffffff;
}
uVar4 = (ulong)uVar1;
break;
case 3:
uVar4 = (ulong)CONCAT12((char)*param_2,
*(ushort *)((long)param_2 + 1) << 8 |
*(ushort *)((long)param_2 + 1) >> 8);
if (uVar4 == 0xffffff) {
return 0xffffffffffffffff;
}
break;
case 4:
uVar2 = (uint)*param_2;
uVar2 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
uVar4 = (ulong)uVar2;
if (uVar2 == 0xffffffff) {
return 0xffffffffffffffff;
}
break;
case 5:
uVar4 = (ulong)(uint)*param_2 << 0x18;
uVar4 = (ulong)*(byte *)((long)param_2 + 4) | (uVar4 & 0xff000000000000) >> 0x28 |
(uVar4 & 0xff0000000000) >> 0x18 | (uVar4 & 0xff00000000) >> 8 |
(uVar4 & 0xff000000) << 8;
uVar3 = 0xffffffffff;
goto LAB_00185386;
case 6:
uVar4 = (ulong)*(ushort *)((long)param_2 + 4) << 0x30;
uVar3 = (ulong)(uint)*param_2 << 0x10;
uVar4 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar3 & 0xff0000000000) >> 0x18 |
(uVar3 & 0xff00000000) >> 8 | (uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18;
uVar3 = 0xffffffffffff;
goto LAB_00185386;
case 7:
uVar4 = (ulong)*(ushort *)((long)param_2 + 4) << 0x28;
uVar3 = (ulong)(uint)*param_2 << 8;
uVar4 = (ulong)*(byte *)((long)param_2 + 6) | (uVar4 & 0xff000000000000) >> 0x28 |
(uVar4 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 |
(uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18 | (uVar3 & 0xff00) << 0x28;
uVar3 = 0xffffffffffffff;
LAB_00185386:
if (uVar4 == uVar3) {
return 0xffffffffffffffff;
}
break;
case 8:
uVar4 = *param_2;
uVar4 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18 |
(uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8 | (uVar4 & 0xff0000) << 0x18 |
(uVar4 & 0xff00) << 0x28 | uVar4 << 0x38;
if (uVar4 == 0xffffffffffffffff) {
return 0xffffffffffffffff;
}
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
if ((*(byte *)(param_1 + 0x318) & 5) == 0) {
uVar4 = uVar4 * *(long *)(param_1 + 0x148);
}
return uVar4;
}
| |
49,019 | POINTonE2_Uncompress_Z | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c | static BLST_ERROR POINTonE2_Uncompress_Z(POINTonE2_affine *out,
const unsigned char in[96])
{
unsigned char in0 = in[0];
limb_t sgn0_pty;
if ((in0 & 0x80) == 0) /* compressed bit */
return BLST_BAD_ENCODING;
if (in0 & 0x40) { /* infinity bit */
if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 95)) {
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
} else {
return BLST_BAD_ENCODING;
}
}
sgn0_pty = POINTonE2_Uncompress_BE(out, in);
if (sgn0_pty > 3)
return (BLST_ERROR)(0 - sgn0_pty); /* POINT_NOT_ON_CURVE */
sgn0_pty >>= 1; /* skip over parity bit */
sgn0_pty ^= (in0 & 0x20) >> 5;
cneg_fp2(out->Y, out->Y, sgn0_pty);
return BLST_SUCCESS;
} | O1 | c | POINTonE2_Uncompress_Z:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movzbl (%rsi), %r14d
movl $0x1, %r12d
testb %r14b, %r14b
jns 0x1ca86
movq %rdi, %rbx
testb $0x40, %r14b
jne 0x1c9f0
leaq -0xb8(%rbp), %r15
movl $0x2f, %eax
xorl %ecx, %ecx
movq %rsi, %rdx
shlq $0x8, %rcx
movzbl (%rdx), %edi
incq %rdx
orq %rdi, %rcx
movq %rax, %rdi
andq $-0x8, %rdi
movq %rcx, -0xb8(%rbp,%rdi)
addq $-0x1, %rax
jb 0x1c840
addq $0x30, %rsi
movl $0x2f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl (%rsi), %edx
incq %rsi
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0xe8(%rbp,%rdx)
addq $-0x1, %rax
jb 0x1c86d
andb $0x1f, -0x89(%rbp)
leaq 0x232eb(%rip), %rdx # 0x3fb88
leaq 0x2327c(%rip), %rcx # 0x3fb20
leaq -0x120(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f380
movl $0x30, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x306c0
movq $-0x1, %r12
testq %rax, %rax
je 0x1ca39
leaq 0x232ab(%rip), %rdx # 0x3fb88
leaq 0x2323c(%rip), %rcx # 0x3fb20
leaq -0x120(%rbp), %r13
leaq -0xe8(%rbp), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x2f380
movl $0x30, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x306c0
testq %rax, %rax
je 0x1ca39
movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD
leaq 0x23479(%rip), %rdx # 0x3fda0
leaq 0x231f2(%rip), %r13 # 0x3fb20
leaq -0xe8(%rbp), %r12
movq %r12, %rdi
movq %r12, %rsi
movq %r13, %rcx
movq %r15, %r8
callq 0x34be0
leaq -0xb8(%rbp), %rdi
movq %rdi, %rsi
leaq 0x23449(%rip), %rdx # 0x3fda0
movq %r13, %rcx
movq %r15, %r8
callq 0x34be0
leaq -0x88(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
callq 0x33a20
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r13, %rcx
movq %r12, %r8
callq 0x338e0
leaq 0x2409a(%rip), %rdx # 0x40a40
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x2f460
movq %r15, %rdi
movq %r15, %rsi
callq 0x2216c
testq %rax, %rax
je 0x1ca32
leaq -0xe8(%rbp), %rsi
movl $0xc0, %edx
movq %rbx, %rdi
callq 0x5060
leaq 0x60(%rbx), %rdi
leaq 0x2313d(%rip), %rsi # 0x3fb20
movq %r12, %rdx
callq 0x34aa0
movq %rax, %r12
jmp 0x1ca39
andl $0x3f, %r14d
decq %r14
shrq $0x3f, %r14
movl $0x1, %ecx
xorl %eax, %eax
orb (%rsi,%rcx), %al
incq %rcx
cmpq $0x60, %rcx
jne 0x1ca02
movzbl %al, %eax
decq %rax
shrq $0x3f, %rax
testq %r14, %rax
je 0x1ca86
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0x18, %rax
jne 0x1ca1f
jmp 0x1ca83
movq $-0x2, %r12
cmpq $0x4, %r12
jb 0x1ca44
negl %r12d
jmp 0x1ca86
shrq %r12
shrl $0x5, %r14d
andl $0x1, %r14d
xorq %r12, %r14
leaq 0x60(%rbx), %rdi
leaq 0x230c3(%rip), %r15 # 0x3fb20
movq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2fa00
addq $0x90, %rbx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2fa00
xorl %r12d, %r12d
movl %r12d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| POINTonE2_Uncompress_Z:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
movzx r14d, byte ptr [rsi]
mov r12d, 1
test r14b, r14b
jns loc_1CA86
mov rbx, rdi
test r14b, 40h
jnz loc_1C9F0
lea r15, [rbp+var_B8]
mov eax, 2Fh ; '/'
xor ecx, ecx
mov rdx, rsi
loc_1C840:
shl rcx, 8
movzx edi, byte ptr [rdx]
inc rdx
or rcx, rdi
mov rdi, rax
and rdi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdi+var_B8], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_1C840
add rsi, 30h ; '0'
mov eax, 2Fh ; '/'
xor ecx, ecx
loc_1C86D:
shl rcx, 8
movzx edx, byte ptr [rsi]
inc rsi
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx+var_E8], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_1C86D
and [rbp+var_89], 1Fh
lea rdx, unk_3FB88
lea rcx, BLS12_381_P
lea r12, [rbp+var_120]
mov rdi, r12
mov rsi, r15
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r12
mov rsi, r15
call vec_is_equal_16x
mov r12, 0FFFFFFFFFFFFFFFFh
test rax, rax
jz loc_1CA39
lea rdx, unk_3FB88
lea rcx, BLS12_381_P
lea r13, [rbp+var_120]
lea r15, [rbp+var_E8]
mov rdi, r13
mov rsi, r15
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r13
mov rsi, r15
call vec_is_equal_16x
test rax, rax
jz loc_1CA39
mov r15, 89F3FFFCFFFCFFFDh
lea rdx, BLS12_381_RR
lea r13, BLS12_381_P
lea r12, [rbp+var_E8]
mov rdi, r12
mov rsi, r12
mov rcx, r13
mov r8, r15
call mul_mont_384
lea rdi, [rbp+var_B8]
mov rsi, rdi
lea rdx, BLS12_381_RR
mov rcx, r13
mov r8, r15
call mul_mont_384
lea r15, [rbp+var_88]
mov rdi, r15
mov rsi, r12
mov rdx, r13
mov rcx, 89F3FFFCFFFCFFFDh
call sqr_mont_384x
mov rdi, r15
mov rsi, r15
mov rdx, r12
mov r12, 89F3FFFCFFFCFFFDh
mov rcx, r13
mov r8, r12
call mul_mont_384x
lea rdx, B_E2
mov rdi, r15
mov rsi, r15
mov rcx, r13
call add_mod_384x
mov rdi, r15
mov rsi, r15
call sqrt_fp2
test rax, rax
jz short loc_1CA32
lea rsi, [rbp+var_E8]
mov edx, 0C0h
mov rdi, rbx
call _memcpy
lea rdi, [rbx+60h]
lea rsi, BLS12_381_P
mov rdx, r12
call sgn0_pty_mont_384x
mov r12, rax
jmp short loc_1CA39
loc_1C9F0:
and r14d, 3Fh
dec r14
shr r14, 3Fh
mov ecx, 1
xor eax, eax
loc_1CA02:
or al, [rsi+rcx]
inc rcx
cmp rcx, 60h ; '`'
jnz short loc_1CA02
movzx eax, al
dec rax
shr rax, 3Fh
test rax, r14
jz short loc_1CA86
xor eax, eax
loc_1CA1F:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 18h
jnz short loc_1CA1F
jmp short loc_1CA83
loc_1CA32:
mov r12, 0FFFFFFFFFFFFFFFEh
loc_1CA39:
cmp r12, 4
jb short loc_1CA44
neg r12d
jmp short loc_1CA86
loc_1CA44:
shr r12, 1
shr r14d, 5
and r14d, 1
xor r14, r12
lea rdi, [rbx+60h]
lea r15, BLS12_381_P
mov rsi, rdi
mov rdx, r14
mov rcx, r15
call cneg_mod_384
add rbx, 90h
mov rdi, rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r15
call cneg_mod_384
loc_1CA83:
xor r12d, r12d
loc_1CA86:
mov eax, r12d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long POINTonE2_Uncompress_Z(long long a1, unsigned __int8 *a2)
{
unsigned int v2; // r14d
unsigned int v3; // r12d
long long v5; // rax
long long v6; // rcx
unsigned __int8 *v7; // rdx
long long v8; // rdi
bool v9; // cf
unsigned __int8 *v10; // rsi
long long v11; // rax
long long v12; // rcx
long long v13; // rdx
unsigned long long v14; // r12
unsigned long long v15; // r14
long long v16; // rcx
unsigned __int8 v17; // al
long long i; // rax
unsigned long long v19; // r14
_BYTE v21[56]; // [rsp+0h] [rbp-120h] BYREF
_QWORD v22[6]; // [rsp+38h] [rbp-E8h] BYREF
_QWORD v23[5]; // [rsp+68h] [rbp-B8h] BYREF
char v24; // [rsp+97h] [rbp-89h]
_BYTE v25[136]; // [rsp+98h] [rbp-88h] BYREF
v2 = *a2;
v3 = 1;
if ( (v2 & 0x80u) != 0 )
{
if ( (v2 & 0x40) == 0 )
{
v5 = 47LL;
v6 = 0LL;
v7 = a2;
do
{
v8 = *v7++;
v6 = v8 | (v6 << 8);
*(_QWORD *)((char *)v23 + (v5 & 0xFFFFFFFFFFFFFFF8LL)) = v6;
v9 = v5-- != 0;
}
while ( v9 );
v10 = a2 + 48;
v11 = 47LL;
v12 = 0LL;
do
{
v13 = *v10++;
v12 = v13 | (v12 << 8);
*(_QWORD *)((char *)v22 + (v11 & 0xFFFFFFFFFFFFFFF8LL)) = v12;
v9 = v11-- != 0;
}
while ( v9 );
v24 &= 0x1Fu;
add_mod_384(v21, v23, &unk_3FB88, &BLS12_381_P);
v14 = -1LL;
if ( vec_is_equal_16x(v21, v23, 48LL) )
{
add_mod_384(v21, v22, &unk_3FB88, &BLS12_381_P);
if ( vec_is_equal_16x(v21, v22, 48LL) )
{
mul_mont_384(v22, v22, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v23, v23, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384x(v25, v22, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v25, v25, v22, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384x(v25, v25, &B_E2, &BLS12_381_P);
if ( sqrt_fp2(v25, v25) )
{
memcpy(a1, v22, 192LL);
v14 = sgn0_pty_mont_384x(a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
}
else
{
v14 = -2LL;
}
}
}
if ( v14 >= 4 )
return (unsigned int)-(int)v14;
v19 = (v14 >> 1) ^ (v2 >> 5) & 1;
cneg_mod_384(a1 + 96, a1 + 96, v19, &BLS12_381_P);
cneg_mod_384(a1 + 144, a1 + 144, v19, &BLS12_381_P);
return 0;
}
v15 = ((unsigned long long)(v2 & 0x3F) - 1) >> 63;
v16 = 1LL;
v17 = 0;
do
v17 |= a2[v16++];
while ( v16 != 96 );
if ( (v15 & (((unsigned long long)v17 - 1) >> 63)) != 0 )
{
for ( i = 0LL; i != 24; ++i )
*(_QWORD *)(a1 + 8 * i) = 0LL;
return 0;
}
}
return v3;
}
| POINTonE2_Uncompress_Z:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOVZX R14D,byte ptr [RSI]
MOV R12D,0x1
TEST R14B,R14B
JNS 0x0011ca86
MOV RBX,RDI
TEST R14B,0x40
JNZ 0x0011c9f0
LEA R15,[RBP + -0xb8]
MOV EAX,0x2f
XOR ECX,ECX
MOV RDX,RSI
LAB_0011c840:
SHL RCX,0x8
MOVZX EDI,byte ptr [RDX]
INC RDX
OR RCX,RDI
MOV RDI,RAX
AND RDI,-0x8
MOV qword ptr [RBP + RDI*0x1 + -0xb8],RCX
ADD RAX,-0x1
JC 0x0011c840
ADD RSI,0x30
MOV EAX,0x2f
XOR ECX,ECX
LAB_0011c86d:
SHL RCX,0x8
MOVZX EDX,byte ptr [RSI]
INC RSI
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0xe8],RCX
ADD RAX,-0x1
JC 0x0011c86d
AND byte ptr [RBP + -0x89],0x1f
LEA RDX,[0x13fb88]
LEA RCX,[0x13fb20]
LEA R12,[RBP + -0x120]
MOV RDI,R12
MOV RSI,R15
CALL 0x0012f380
MOV EDX,0x30
MOV RDI,R12
MOV RSI,R15
CALL 0x001306c0
MOV R12,-0x1
TEST RAX,RAX
JZ 0x0011ca39
LEA RDX,[0x13fb88]
LEA RCX,[0x13fb20]
LEA R13,[RBP + -0x120]
LEA R15,[RBP + -0xe8]
MOV RDI,R13
MOV RSI,R15
CALL 0x0012f380
MOV EDX,0x30
MOV RDI,R13
MOV RSI,R15
CALL 0x001306c0
TEST RAX,RAX
JZ 0x0011ca39
MOV R15,-0x760c000300030003
LEA RDX,[0x13fda0]
LEA R13,[0x13fb20]
LEA R12,[RBP + -0xe8]
MOV RDI,R12
MOV RSI,R12
MOV RCX,R13
MOV R8,R15
CALL 0x00134be0
LEA RDI,[RBP + -0xb8]
MOV RSI,RDI
LEA RDX,[0x13fda0]
MOV RCX,R13
MOV R8,R15
CALL 0x00134be0
LEA R15,[RBP + -0x88]
MOV RDI,R15
MOV RSI,R12
MOV RDX,R13
MOV RCX,-0x760c000300030003
CALL 0x00133a20
MOV RDI,R15
MOV RSI,R15
MOV RDX,R12
MOV R12,-0x760c000300030003
MOV RCX,R13
MOV R8,R12
CALL 0x001338e0
LEA RDX,[0x140a40]
MOV RDI,R15
MOV RSI,R15
MOV RCX,R13
CALL 0x0012f460
MOV RDI,R15
MOV RSI,R15
CALL 0x0012216c
TEST RAX,RAX
JZ 0x0011ca32
LEA RSI,[RBP + -0xe8]
MOV EDX,0xc0
MOV RDI,RBX
CALL 0x00105060
LEA RDI,[RBX + 0x60]
LEA RSI,[0x13fb20]
MOV RDX,R12
CALL 0x00134aa0
MOV R12,RAX
JMP 0x0011ca39
LAB_0011c9f0:
AND R14D,0x3f
DEC R14
SHR R14,0x3f
MOV ECX,0x1
XOR EAX,EAX
LAB_0011ca02:
OR AL,byte ptr [RSI + RCX*0x1]
INC RCX
CMP RCX,0x60
JNZ 0x0011ca02
MOVZX EAX,AL
DEC RAX
SHR RAX,0x3f
TEST RAX,R14
JZ 0x0011ca86
XOR EAX,EAX
LAB_0011ca1f:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0x18
JNZ 0x0011ca1f
JMP 0x0011ca83
LAB_0011ca32:
MOV R12,-0x2
LAB_0011ca39:
CMP R12,0x4
JC 0x0011ca44
NEG R12D
JMP 0x0011ca86
LAB_0011ca44:
SHR R12,0x1
SHR R14D,0x5
AND R14D,0x1
XOR R14,R12
LEA RDI,[RBX + 0x60]
LEA R15,[0x13fb20]
MOV RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x0012fa00
ADD RBX,0x90
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R15
CALL 0x0012fa00
LAB_0011ca83:
XOR R12D,R12D
LAB_0011ca86:
MOV EAX,R12D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int POINTonE2_Uncompress_Z(void *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
byte *pbVar6;
int iVar7;
bool bVar8;
int1 local_128 [56];
ulong local_f0 [6];
ulong local_c0 [5];
byte local_91;
int1 local_90 [96];
bVar1 = *param_2;
iVar7 = 1;
if ((char)bVar1 < '\0') {
if ((bVar1 & 0x40) == 0) {
uVar3 = 0x2f;
uVar5 = 0;
pbVar6 = param_2;
do {
bVar2 = *pbVar6;
pbVar6 = pbVar6 + 1;
uVar5 = uVar5 << 8 | (ulong)bVar2;
*(ulong *)((long)local_c0 + (uVar3 & 0xfffffffffffffff8)) = uVar5;
bVar8 = uVar3 != 0;
uVar3 = uVar3 - 1;
} while (bVar8);
param_2 = param_2 + 0x30;
uVar3 = 0x2f;
uVar5 = 0;
do {
bVar2 = *param_2;
param_2 = param_2 + 1;
uVar5 = uVar5 << 8 | (ulong)bVar2;
*(ulong *)((long)local_f0 + (uVar3 & 0xfffffffffffffff8)) = uVar5;
bVar8 = uVar3 != 0;
uVar3 = uVar3 - 1;
} while (bVar8);
local_91 = local_91 & 0x1f;
add_mod_384(local_128,local_c0,&DAT_0013fb88,BLS12_381_P);
lVar4 = vec_is_equal_16x(local_128,local_c0,0x30);
uVar3 = 0xffffffffffffffff;
if (lVar4 != 0) {
add_mod_384(local_128,local_f0,&DAT_0013fb88,BLS12_381_P);
lVar4 = vec_is_equal_16x(local_128,local_f0,0x30);
if (lVar4 != 0) {
mul_mont_384(local_f0,local_f0,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_c0,local_c0,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384x(local_90,local_f0,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_90,local_90,local_f0,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384x(local_90,local_90,B_E2,BLS12_381_P);
lVar4 = sqrt_fp2(local_90,local_90);
if (lVar4 == 0) {
uVar3 = 0xfffffffffffffffe;
}
else {
memcpy(param_1,local_f0,0xc0);
uVar3 = sgn0_pty_mont_384x((long)param_1 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd);
}
}
}
if (3 < uVar3) {
return -(int)uVar3;
}
uVar3 = (ulong)(bVar1 >> 5 & 1) ^ uVar3 >> 1;
cneg_mod_384((long)param_1 + 0x60,(long)param_1 + 0x60,uVar3,BLS12_381_P);
cneg_mod_384((long)param_1 + 0x90,(long)param_1 + 0x90,uVar3,BLS12_381_P);
}
else {
lVar4 = 1;
bVar2 = 0;
do {
bVar2 = bVar2 | param_2[lVar4];
lVar4 = lVar4 + 1;
} while (lVar4 != 0x60);
if (-1 < (long)((ulong)bVar2 - 1 & (ulong)(bVar1 & 0x3f) - 1)) {
return 1;
}
lVar4 = 0;
do {
*(int8 *)((long)param_1 + lVar4 * 8) = 0;
lVar4 = lVar4 + 1;
} while (lVar4 != 0x18);
}
iVar7 = 0;
}
return iVar7;
}
| |
49,020 | http_get_status | bluesky950520[P]quickjs/quickjs-libc.c | static int http_get_status(const char *buf)
{
const char *p = buf;
while (*p != ' ' && *p != '\0')
p++;
if (*p != ' ')
return 0;
while (*p == ' ')
p++;
return atoi(p);
} | O0 | c | http_get_status:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, 0xf(%rsp)
je 0x1caa8
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1cab2
jmp 0x1cac2
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1ca83
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0x1cad9
movl $0x0, 0x24(%rsp)
jmp 0x1cb06
jmp 0x1cadb
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0x1caf8
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1cadb
movq 0x10(%rsp), %rdi
callq 0xe8e0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
| http_get_status:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_18], rax
loc_1CA83:
mov rax, [rsp+28h+var_18]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 20h ; ' '
mov [rsp+28h+var_19], al
jz short loc_1CAA8
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rsp+28h+var_19], al
loc_1CAA8:
mov al, [rsp+28h+var_19]
test al, 1
jnz short loc_1CAB2
jmp short loc_1CAC2
loc_1CAB2:
mov rax, [rsp+28h+var_18]
add rax, 1
mov [rsp+28h+var_18], rax
jmp short loc_1CA83
loc_1CAC2:
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_1CAD9
mov [rsp+28h+var_4], 0
jmp short loc_1CB06
loc_1CAD9:
jmp short $+2
loc_1CADB:
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jnz short loc_1CAF8
mov rax, [rsp+28h+var_18]
add rax, 1
mov [rsp+28h+var_18], rax
jmp short loc_1CADB
loc_1CAF8:
mov rdi, [rsp+28h+var_18]
call _atoi
mov [rsp+28h+var_4], eax
loc_1CB06:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long http_get_status(_BYTE *a1)
{
bool v2; // [rsp+Fh] [rbp-19h]
while ( 1 )
{
v2 = 0;
if ( *a1 != 32 )
v2 = *a1 != 0;
if ( !v2 )
break;
++a1;
}
if ( *a1 == 32 )
{
while ( *a1 == 32 )
++a1;
return (unsigned int)atoi(a1);
}
else
{
return 0;
}
}
| http_get_status:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
LAB_0011ca83:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x20
MOV byte ptr [RSP + 0xf],AL
JZ 0x0011caa8
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_0011caa8:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x0011cab2
JMP 0x0011cac2
LAB_0011cab2:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0011ca83
LAB_0011cac2:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0011cad9
MOV dword ptr [RSP + 0x24],0x0
JMP 0x0011cb06
LAB_0011cad9:
JMP 0x0011cadb
LAB_0011cadb:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JNZ 0x0011caf8
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0011cadb
LAB_0011caf8:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010e8e0
MOV dword ptr [RSP + 0x24],EAX
LAB_0011cb06:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int http_get_status(char *param_1)
{
bool bVar1;
char *local_18;
int local_4;
local_18 = param_1;
while( true ) {
bVar1 = false;
if (*local_18 != ' ') {
bVar1 = *local_18 != '\0';
}
if (!bVar1) break;
local_18 = local_18 + 1;
}
if (*local_18 == ' ') {
for (; *local_18 == ' '; local_18 = local_18 + 1) {
}
local_4 = atoi(local_18);
}
else {
local_4 = 0;
}
return local_4;
}
| |
49,021 | rgGetCurrentTime | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rgestures.h | static double rgGetCurrentTime(void)
{
double time = 0;
#if !defined(RGESTURES_STANDALONE)
time = GetTime();
#else
#if defined(_WIN32)
unsigned long long int clockFrequency, currentTime;
QueryPerformanceFrequency(&clockFrequency); // BE CAREFUL: Costly operation!
QueryPerformanceCounter(¤tTime);
time = (double)currentTime/clockFrequency; // Time in seconds
#endif
#if defined(__linux__)
// NOTE: Only for Linux-based systems
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
unsigned long long int nowTime = (unsigned long long int)now.tv_sec*1000000000LLU + (unsigned long long int)now.tv_nsec; // Time in nanoseconds
time = ((double)nowTime*1e-9); // Time in seconds
#endif
#if defined(__APPLE__)
//#define CLOCK_REALTIME CALENDAR_CLOCK // returns UTC time since 1970-01-01
//#define CLOCK_MONOTONIC SYSTEM_CLOCK // returns the time since boot time
clock_serv_t cclock;
mach_timespec_t now;
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
// NOTE: OS X does not have clock_gettime(), using clock_get_time()
clock_get_time(cclock, &now);
mach_port_deallocate(mach_task_self(), cclock);
unsigned long long int nowTime = (unsigned long long int)now.tv_sec*1000000000LLU + (unsigned long long int)now.tv_nsec; // Time in nanoseconds
time = ((double)nowTime*1e-9); // Time in seconds
#endif
#endif
return time;
} | O0 | c | rgGetCurrentTime:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
callq 0xca7a0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rgGetCurrentTime:
push rbp
mov rbp, rsp
sub rsp, 10h
xorps xmm0, xmm0
movsd [rbp+var_8], xmm0
call GetTime
movsd [rbp+var_8], xmm0
movsd xmm0, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| void rgGetCurrentTime()
{
GetTime();
}
| rgGetCurrentTime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x8],XMM0
CALL 0x001ca7a0
MOVSD qword ptr [RBP + -0x8],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
int8 rgGetCurrentTime(void)
{
int8 uVar1;
uVar1 = GetTime();
return uVar1;
}
| |
49,022 | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("UnaryOpExpr.expr is null");
auto e = expr->evaluate(context);
switch (op) {
case Op::Plus: return e;
case Op::Minus: return -e;
case Op::LogicalNot: return !e.to_bool();
case Op::Expansion:
case Op::ExpansionDict:
throw std::runtime_error("Expansion operator is only supported in function calls and collections");
}
throw std::runtime_error("Unknown unary operator");
} | O1 | cpp | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x6c21e
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6c37a
movl 0x30(%r14), %eax
cmpq $0x4, %rax
ja 0x6c26e
leaq 0x50b0d(%rip), %rcx # 0xbcbe0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
xorl %r12d, %r12d
movq %r12, 0x18(%rbx)
leaq 0x48(%rsp), %r15
movups -0x30(%r15), %xmm0
movq %r12, -0x28(%r15)
movups %xmm0, 0x10(%rbx)
movq %r12, -0x30(%r15)
movq %r12, 0x28(%rbx)
movups -0x20(%r15), %xmm0
movq %r12, -0x18(%r15)
movups %xmm0, 0x20(%rbx)
movq %r12, -0x20(%r15)
movq %r12, 0x38(%rbx)
movups -0x10(%r15), %xmm0
movq %r12, -0x8(%r15)
movups %xmm0, 0x30(%rbx)
movq %r12, -0x10(%r15)
leaq 0x40(%rbx), %r14
movups (%r15), %xmm0
movups %xmm0, 0x40(%rbx)
movq %r15, %rdi
xorl %esi, %esi
callq 0x28fd0
movb $0x0, (%r15)
movq %r12, 0x8(%r15)
jmp 0x6c17a
leaq 0x8(%rsp), %rdi
callq 0x6c57c
xorb $0x1, %al
leaq 0x40(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0x308d0
movq %r14, %rdi
movl $0x1, %esi
callq 0x28fd0
jmp 0x6c196
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6c4f8
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x28fd0
movq %r14, %rdi
callq 0x2e790
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x6c1bb
callq 0x42d00
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x6c1ca
callq 0x42d00
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6c1d9
callq 0x42d00
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6c20f
movq 0x82da6(%rip), %rax # 0xeef90
cmpb $0x0, (%rax)
je 0x6c1fa
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x6c204
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x6c20f
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x19370
movq %rax, %r14
leaq 0x51c11(%rip), %rsi # 0xbde43
movq %rax, %rdi
callq 0x19270
movq 0x82da7(%rip), %rsi # 0xeefe8
movq 0x82d20(%rip), %rdx # 0xeef68
movq %r14, %rdi
callq 0x19b70
movl $0x10, %edi
callq 0x19370
movq %rax, %r14
leaq 0x51bf8(%rip), %rsi # 0xbde5c
movq %rax, %rdi
callq 0x19270
jmp 0x6c28a
movl $0x10, %edi
callq 0x19370
movq %rax, %r14
leaq 0x51c21(%rip), %rsi # 0xbdea3
movq %rax, %rdi
callq 0x19270
movq 0x82d57(%rip), %rsi # 0xeefe8
movq 0x82cd0(%rip), %rdx # 0xeef68
movq %r14, %rdi
callq 0x19b70
jmp 0x6c2a4
jmp 0x6c2be
movq %rax, %rbx
movq %r14, %rdi
callq 0x19510
jmp 0x6c2c1
movq %rax, %rbx
movq %r14, %rdi
callq 0x19510
jmp 0x6c2cb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6c670
movq %rbx, %rdi
callq 0x19be0
nop
| _ZNK5minja11UnaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_6C21E
mov rbx, rdi
lea rdi, [rsp+78h+var_70]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov eax, [r14+30h]
cmp rax, 4; switch 5 cases
ja def_6C0DA; jumptable 000000000006C0DA default case
lea rcx, jpt_6C0DA
movsxd rax, ds:(jpt_6C0DA - 0BCBE0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6C0DC:
xorps xmm0, xmm0; jumptable 000000000006C0DA case 0
movups xmmword ptr [rbx], xmm0
xor r12d, r12d
mov [rbx+18h], r12
lea r15, [rsp+78h+var_30]
movups xmm0, xmmword ptr [r15-30h]
mov [r15-28h], r12
movups xmmword ptr [rbx+10h], xmm0
mov [r15-30h], r12
mov [rbx+28h], r12
movups xmm0, xmmword ptr [r15-20h]
mov [r15-18h], r12
movups xmmword ptr [rbx+20h], xmm0
mov [r15-20h], r12
mov [rbx+38h], r12
movups xmm0, xmmword ptr [r15-10h]
mov [r15-8], r12
movups xmmword ptr [rbx+30h], xmm0
mov [r15-10h], r12
lea r14, [rbx+40h]
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rbx+40h], xmm0
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15], 0
mov [r15+8], r12
jmp short loc_6C17A
loc_6C149:
lea rdi, [rsp+78h+var_70]; jumptable 000000000006C0DA case 2
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
xor al, 1
lea r14, [rbx+40h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+40h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
movzx esi, al
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t)
loc_6C17A:
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_6C196
loc_6C189:
lea rsi, [rsp+78h+var_70]; jumptable 000000000006C0DA case 1
mov rdi, rbx
call _ZNK5minja5ValuengEv; minja::Value::operator-(void)
loc_6C196:
lea r14, [rsp+78h+var_30]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_6C1BB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6C1BB:
mov rdi, [rsp+78h+var_48]
test rdi, rdi
jz short loc_6C1CA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6C1CA:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_6C1D9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6C1D9:
mov rdi, [rsp+78h+var_68]
test rdi, rdi
jz short loc_6C20F
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_6C1FA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_6C204
loc_6C1FA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_6C204:
cmp eax, 1
jnz short loc_6C20F
mov rax, [rdi]
call qword ptr [rax+18h]
loc_6C20F:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_6C21E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnaryopexprExp; "UnaryOpExpr.expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6C250:
mov edi, 10h; jumptable 000000000006C0DA cases 3,4
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpansionOpera; "Expansion operator is only supported in"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6C28A
def_6C0DA:
mov edi, 10h; jumptable 000000000006C0DA default case
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownUnaryOp; "Unknown unary operator"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6C28A:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6C2A4
jmp short loc_6C2BE
loc_6C2A4:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6C2C1
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6C2CB
loc_6C2BE:
mov rbx, rax
loc_6C2C1:
lea rdi, [rsp+78h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6C2CB:
mov rdi, rbx
call __Unwind_Resume
| do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0016c21e
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
CALL 0x0016c37a
MOV EAX,dword ptr [R14 + 0x30]
CMP RAX,0x4
JA 0x0016c26e
LEA RCX,[0x1bcbe0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
XOR R12D,R12D
MOV qword ptr [RBX + 0x18],R12
LEA R15,[RSP + 0x48]
MOVUPS XMM0,xmmword ptr [R15 + -0x30]
MOV qword ptr [R15 + -0x28],R12
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV qword ptr [R15 + -0x30],R12
MOV qword ptr [RBX + 0x28],R12
MOVUPS XMM0,xmmword ptr [R15 + -0x20]
MOV qword ptr [R15 + -0x18],R12
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [R15 + -0x20],R12
MOV qword ptr [RBX + 0x38],R12
MOVUPS XMM0,xmmword ptr [R15 + -0x10]
MOV qword ptr [R15 + -0x8],R12
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [R15 + -0x10],R12
LEA R14,[RBX + 0x40]
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R15
XOR ESI,ESI
CALL 0x00128fd0
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],R12
JMP 0x0016c17a
caseD_2:
LEA RDI,[RSP + 0x8]
CALL 0x0016c57c
XOR AL,0x1
LEA R14,[RBX + 0x40]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVZX ESI,AL
MOV RDI,R14
CALL 0x001308d0
LAB_0016c17a:
MOV RDI,R14
MOV ESI,0x1
CALL 0x00128fd0
JMP 0x0016c196
caseD_1:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0016c4f8
LAB_0016c196:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00128fd0
MOV RDI,R14
CALL 0x0012e790
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0016c1bb
CALL 0x00142d00
LAB_0016c1bb:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0016c1ca
CALL 0x00142d00
LAB_0016c1ca:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0016c1d9
CALL 0x00142d00
LAB_0016c1d9:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0016c20f
MOV RAX,qword ptr [0x001eef90]
CMP byte ptr [RAX],0x0
JZ 0x0016c1fa
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0016c204
LAB_0016c1fa:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0016c204:
CMP EAX,0x1
JNZ 0x0016c20f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0016c20f:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0016c21e:
MOV EDI,0x10
CALL 0x00119370
MOV R14,RAX
LAB_0016c22b:
LEA RSI,[0x1bde43]
MOV RDI,RAX
CALL 0x00119270
LAB_0016c23a:
MOV RSI,qword ptr [0x001eefe8]
MOV RDX,qword ptr [0x001eef68]
MOV RDI,R14
CALL 0x00119b70
caseD_3:
MOV EDI,0x10
CALL 0x00119370
MOV R14,RAX
LAB_0016c25d:
LEA RSI,[0x1bde5c]
MOV RDI,RAX
CALL 0x00119270
LAB_0016c26c:
JMP 0x0016c28a
default:
MOV EDI,0x10
CALL 0x00119370
MOV R14,RAX
LAB_0016c27b:
LEA RSI,[0x1bdea3]
MOV RDI,RAX
CALL 0x00119270
LAB_0016c28a:
MOV RSI,qword ptr [0x001eefe8]
MOV RDX,qword ptr [0x001eef68]
MOV RDI,R14
CALL 0x00119b70
|
/* minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
UnaryOpExpr * __thiscall minja::UnaryOpExpr::do_evaluate(UnaryOpExpr *this,shared_ptr *param_1)
{
int *piVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var3;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var4;
byte bVar5;
int iVar6;
runtime_error *prVar7;
Expression local_70 [8];
long *local_68;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_58;
int8 local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_48;
int8 local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_38;
data local_30;
int7 uStack_2f;
int8 uStack_28;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016c22b to 0016c239 has its CatchHandler @ 0016c2b1 */
std::runtime_error::runtime_error(prVar7,"UnaryOpExpr.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68);
}
Expression::evaluate(local_70,*(shared_ptr **)(param_1 + 0x20));
p_Var4 = p_Stack_38;
p_Var3 = p_Stack_48;
p_Var2 = p_Stack_58;
switch(*(int4 *)(param_1 + 0x30)) {
case 0:
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x18) = 0;
p_Stack_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(int8 *)(this + 0x10) = local_60;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) = p_Var2;
local_60 = 0;
*(int8 *)(this + 0x28) = 0;
p_Stack_48 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(int8 *)(this + 0x20) = local_50;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) = p_Var3;
local_50 = 0;
*(int8 *)(this + 0x38) = 0;
p_Stack_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(int8 *)(this + 0x30) = local_40;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) = p_Var4;
local_40 = 0;
*(ulong *)(this + 0x40) = CONCAT71(uStack_2f,local_30);
*(int8 *)(this + 0x48) = uStack_28;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_30,0));
local_30 = (data)0x0;
uStack_28 = 0;
break;
case 1:
/* try { // try from 0016c189 to 0016c195 has its CatchHandler @ 0016c2be */
Value::operator-((Value *)this);
goto LAB_0016c196;
case 2:
/* try { // try from 0016c149 to 0016c152 has its CatchHandler @ 0016c2a2 */
bVar5 = Value::to_bool((Value *)local_70);
*(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;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,bVar5 ^ 1);
break;
case 3:
case 4:
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016c25d to 0016c26b has its CatchHandler @ 0016c2a4 */
std::runtime_error::runtime_error
(prVar7,"Expansion operator is only supported in function calls and collections");
goto LAB_0016c28a;
default:
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016c27b to 0016c289 has its CatchHandler @ 0016c2a0 */
std::runtime_error::runtime_error(prVar7,"Unknown unary operator");
LAB_0016c28a:
/* try { // try from 0016c28a to 0016c29f has its CatchHandler @ 0016c2be */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
LAB_0016c196:
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_30,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(&local_30);
if (p_Stack_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_38);
}
if (p_Stack_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_48);
}
if (p_Stack_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_58);
}
if (local_68 != (long *)0x0) {
if (*PTR___libc_single_threaded_001eef90 == '\0') {
LOCK();
piVar1 = (int *)((long)local_68 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)local_68 + 0xc);
*(int *)((long)local_68 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*local_68 + 0x18))();
}
}
return this;
}
| ||
49,023 | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("UnaryOpExpr.expr is null");
auto e = expr->evaluate(context);
switch (op) {
case Op::Plus: return e;
case Op::Minus: return -e;
case Op::LogicalNot: return !e.to_bool();
case Op::Expansion:
case Op::ExpansionDict:
throw std::runtime_error("Expansion operator is only supported in function calls and collections");
}
throw std::runtime_error("Unknown unary operator");
} | O2 | cpp | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x5f944
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5fa48
movl 0x30(%r14), %eax
cmpq $0x4, %rax
ja 0x5f990
leaq 0x3c333(%rip), %rcx # 0x9bc20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5fb72
jmp 0x5f92f
leaq 0x8(%rsp), %rdi
callq 0x5fc1e
xorb $0x1, %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movq %rbx, %rdi
callq 0x5fcba
jmp 0x5f92f
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5fbca
leaq 0x8(%rsp), %rdi
callq 0x5fcd8
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x213a0
movq %rax, %r14
leaq 0x3d52d(%rip), %rsi # 0x9ce83
movq %rax, %rdi
callq 0x21280
movq 0x7c683(%rip), %rsi # 0xdbfe8
movq 0x7c5fc(%rip), %rdx # 0xdbf68
movq %r14, %rdi
callq 0x21b70
pushq $0x10
popq %rdi
callq 0x213a0
movq %rax, %r14
leaq 0x3d516(%rip), %rsi # 0x9ce9c
movq %rax, %rdi
callq 0x21280
jmp 0x5f9aa
pushq $0x10
popq %rdi
callq 0x213a0
movq %rax, %r14
leaq 0x3d541(%rip), %rsi # 0x9cee3
movq %rax, %rdi
callq 0x21280
movq 0x7c637(%rip), %rsi # 0xdbfe8
movq 0x7c5b0(%rip), %rdx # 0xdbf68
movq %r14, %rdi
callq 0x21b70
jmp 0x5f9c4
jmp 0x5f9de
movq %rax, %rbx
movq %r14, %rdi
callq 0x21530
jmp 0x5f9e1
movq %rax, %rbx
movq %r14, %rdi
callq 0x21530
jmp 0x5f9eb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5fcd8
movq %rbx, %rdi
callq 0x21be0
nop
| _ZNK5minja11UnaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r14
push rbx
sub rsp, 58h
mov r14, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz short loc_5F944
mov rbx, rdi
lea rdi, [rsp+68h+var_60]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov eax, [r14+30h]
cmp rax, 4; switch 5 cases
ja def_5F8F4; jumptable 000000000005F8F4 default case
lea rcx, jpt_5F8F4
movsxd rax, ds:(jpt_5F8F4 - 9BC20h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5F8F6:
lea rsi, [rsp+68h+var_60]; jumptable 000000000005F8F4 case 0
mov rdi, rbx
call _ZN5minja5ValueC2EOS0_; minja::Value::Value(minja::Value&&)
jmp short loc_5F92F
loc_5F905:
lea rdi, [rsp+68h+var_60]; jumptable 000000000005F8F4 case 2
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
xor al, 1
lea rsi, [rsp+68h+var_61]; bool *
mov [rsi], al
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKb; minja::Value::Value(bool const&)
jmp short loc_5F92F
loc_5F922:
lea rsi, [rsp+68h+var_60]; jumptable 000000000005F8F4 case 1
mov rdi, rbx
call _ZNK5minja5ValuengEv; minja::Value::operator-(void)
loc_5F92F:
lea rdi, [rsp+68h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, rbx
add rsp, 58h
pop rbx
pop r14
retn
loc_5F944:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnaryopexprExp; "UnaryOpExpr.expr is null"
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, r14; void *
call ___cxa_throw
loc_5F974:
push 10h; jumptable 000000000005F8F4 cases 3,4
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpansionOpera; "Expansion operator is only supported in"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_5F9AA
def_5F8F4:
push 10h; jumptable 000000000005F8F4 default case
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownUnaryOp; "Unknown unary operator"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_5F9AA:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_5F9C4
jmp short loc_5F9DE
loc_5F9C4:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_5F9E1
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_5F9EB
loc_5F9DE:
mov rbx, rax
loc_5F9E1:
lea rdi, [rsp+68h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5F9EB:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::UnaryOpExpr::do_evaluate(
minja::Value *this,
long long a2,
int a3,
int a4,
int a5,
int a6)
{
long long v7; // rsi
std::runtime_error *exception; // r14
std::runtime_error *v10; // r14
bool v11; // [rsp+7h] [rbp-61h] BYREF
_BYTE v12[96]; // [rsp+8h] [rbp-60h] BYREF
v7 = *(_QWORD *)(a2 + 32);
if ( !v7 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "UnaryOpExpr.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((unsigned int)v12, v7, a3, a4, a5, a6);
switch ( *(_DWORD *)(a2 + 48) )
{
case 0:
minja::Value::Value(this, v12);
goto LABEL_6;
case 1:
minja::Value::operator-(this);
goto LABEL_6;
case 2:
v11 = minja::Value::to_bool((minja::Value *)v12) ^ 1;
minja::Value::Value(this, &v11);
LABEL_6:
minja::Value::~Value((minja::Value *)v12);
return this;
case 3:
case 4:
v10 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v10, "Expansion operator is only supported in function calls and collections");
break;
default:
v10 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v10, "Unknown unary operator");
break;
}
__cxa_throw(
v10,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
| do_evaluate:
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0015f944
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
CALL 0x0015fa48
MOV EAX,dword ptr [R14 + 0x30]
CMP RAX,0x4
JA 0x0015f990
LEA RCX,[0x19bc20]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0015fb72
JMP 0x0015f92f
caseD_2:
LEA RDI,[RSP + 0x8]
CALL 0x0015fc1e
XOR AL,0x1
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
MOV RDI,RBX
CALL 0x0015fcba
JMP 0x0015f92f
caseD_1:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0015fbca
LAB_0015f92f:
LEA RDI,[RSP + 0x8]
CALL 0x0015fcd8
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R14
RET
LAB_0015f944:
PUSH 0x10
POP RDI
CALL 0x001213a0
MOV R14,RAX
LAB_0015f94f:
LEA RSI,[0x19ce83]
MOV RDI,RAX
CALL 0x00121280
LAB_0015f95e:
MOV RSI,qword ptr [0x001dbfe8]
MOV RDX,qword ptr [0x001dbf68]
MOV RDI,R14
CALL 0x00121b70
caseD_3:
PUSH 0x10
POP RDI
CALL 0x001213a0
MOV R14,RAX
LAB_0015f97f:
LEA RSI,[0x19ce9c]
MOV RDI,RAX
CALL 0x00121280
LAB_0015f98e:
JMP 0x0015f9aa
default:
PUSH 0x10
POP RDI
CALL 0x001213a0
MOV R14,RAX
LAB_0015f99b:
LEA RSI,[0x19cee3]
MOV RDI,RAX
CALL 0x00121280
LAB_0015f9aa:
MOV RSI,qword ptr [0x001dbfe8]
MOV RDX,qword ptr [0x001dbf68]
MOV RDI,R14
CALL 0x00121b70
|
/* minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
UnaryOpExpr * __thiscall minja::UnaryOpExpr::do_evaluate(UnaryOpExpr *this,shared_ptr *param_1)
{
runtime_error *prVar1;
bool local_61;
Expression local_60 [80];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015f94f to 0015f95d has its CatchHandler @ 0015f9d1 */
std::runtime_error::runtime_error(prVar1,"UnaryOpExpr.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001dbfe8,PTR__runtime_error_001dbf68);
}
Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20));
switch(*(int4 *)(param_1 + 0x30)) {
case 0:
Value::Value((Value *)this,(Value *)local_60);
break;
case 1:
/* try { // try from 0015f922 to 0015f92e has its CatchHandler @ 0015f9de */
Value::operator-((Value *)this);
break;
case 2:
/* try { // try from 0015f905 to 0015f90e has its CatchHandler @ 0015f9c2 */
local_61 = (bool)Value::to_bool((Value *)local_60);
local_61 = (bool)(local_61 ^ 1);
Value::Value((Value *)this,&local_61);
break;
case 3:
case 4:
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015f97f to 0015f98d has its CatchHandler @ 0015f9c4 */
std::runtime_error::runtime_error
(prVar1,"Expansion operator is only supported in function calls and collections");
goto LAB_0015f9aa;
default:
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015f99b to 0015f9a9 has its CatchHandler @ 0015f9c0 */
std::runtime_error::runtime_error(prVar1,"Unknown unary operator");
LAB_0015f9aa:
/* try { // try from 0015f9aa to 0015f9bf has its CatchHandler @ 0015f9de */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001dbfe8,PTR__runtime_error_001dbf68);
}
Value::~Value((Value *)local_60);
return this;
}
| |
49,024 | js_dataview_get_byteLength | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dataview_get_byteLength(JSContext *ctx, JSValue this_val)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
JSObject *p;
p = get_dataview(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (dataview_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
ta = p->u.typed_array;
if (ta->track_rab) {
abuf = ta->buffer->u.array_buffer;
return js_uint32(abuf->byte_length - ta->offset);
}
return js_uint32(ta->length);
} | O0 | c | js_dataview_get_byteLength:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xe4fe0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xe44ea
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xe4571
movq 0x8(%rsp), %rdi
callq 0xe5060
cmpl $0x0, %eax
je 0xe450f
movq 0x20(%rsp), %rdi
callq 0x58ae0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0xe4571
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x28(%rax)
je 0xe455a
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl (%rax), %edi
movq 0x10(%rsp), %rax
subl 0x20(%rax), %edi
callq 0x33b60
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0xe4571
movq 0x10(%rsp), %rax
movl 0x24(%rax), %edi
callq 0x33b60
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
| js_dataview_get_byteLength:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_20]
mov rdx, [rsp+48h+var_18]
call get_dataview
mov [rsp+48h+var_40], rax
cmp [rsp+48h+var_40], 0
jnz short loc_E44EA
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp loc_E4571
loc_E44EA:
mov rdi, [rsp+48h+var_40]
call dataview_is_oob
cmp eax, 0
jz short loc_E450F
mov rdi, [rsp+48h+var_28]
call JS_ThrowTypeErrorArrayBufferOOB
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_E4571
loc_E450F:
mov rax, [rsp+48h+var_40]
mov rax, [rax+30h]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
cmp dword ptr [rax+28h], 0
jz short loc_E455A
mov rax, [rsp+48h+var_38]
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_30]
mov edi, [rax]
mov rax, [rsp+48h+var_38]
sub edi, [rax+20h]
call js_uint32
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_E4571
loc_E455A:
mov rax, [rsp+48h+var_38]
mov edi, [rax+24h]
call js_uint32
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_E4571:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
| long long js_dataview_get_byteLength(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
long long dataview; // [rsp+8h] [rbp-40h]
long long v19; // [rsp+10h] [rbp-38h]
long long v20; // [rsp+38h] [rbp-10h]
dataview = get_dataview(a1, a2, a3);
if ( dataview )
{
if ( (unsigned int)dataview_is_oob(dataview) )
{
return JS_ThrowTypeErrorArrayBufferOOB(a1, a4, a5, a6, a7, v15, v16, a10, a11, a2, v11, v12, v13, v14);
}
else
{
v19 = *(_QWORD *)(dataview + 48);
if ( *(_DWORD *)(v19 + 40) )
return js_uint32(**(_DWORD **)(*(_QWORD *)(v19 + 24) + 48LL) - *(_DWORD *)(v19 + 32));
else
return js_uint32(*(_DWORD *)(v19 + 36));
}
}
else
{
LODWORD(v20) = 0;
}
return v20;
}
| js_dataview_get_byteLength:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x001e4fe0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001e44ea
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001e4571
LAB_001e44ea:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e5060
CMP EAX,0x0
JZ 0x001e450f
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00158ae0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x001e4571
LAB_001e450f:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x001e455a
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x10]
SUB EDI,dword ptr [RAX + 0x20]
CALL 0x00133b60
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x001e4571
LAB_001e455a:
MOV RAX,qword ptr [RSP + 0x10]
MOV EDI,dword ptr [RAX + 0x24]
CALL 0x00133b60
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_001e4571:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16]
js_dataview_get_byteLength(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
long lVar2;
int1 auVar3 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
lVar2 = get_dataview(param_1,param_2,param_3);
if (lVar2 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
iVar1 = dataview_is_oob(lVar2);
if (iVar1 == 0) {
lVar2 = *(long *)(lVar2 + 0x30);
if (*(int *)(lVar2 + 0x28) == 0) {
auVar3 = js_uint32(*(int4 *)(lVar2 + 0x24));
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else {
auVar3 = js_uint32(**(int **)(*(long *)(lVar2 + 0x18) + 0x30) - *(int *)(lVar2 + 0x20));
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
}
else {
auVar3 = JS_ThrowTypeErrorArrayBufferOOB(param_1);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
49,025 | js_dataview_get_byteLength | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dataview_get_byteLength(JSContext *ctx, JSValue this_val)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
JSObject *p;
p = get_dataview(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (dataview_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
ta = p->u.typed_array;
if (ta->track_rab) {
abuf = ta->buffer->u.array_buffer;
return js_uint32(abuf->byte_length - ta->offset);
}
return js_uint32(ta->length);
} | O1 | c | js_dataview_get_byteLength:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x83964
movq 0x8(%rsp), %r15
cmpw $0x21, 0x6(%r15)
je 0x83978
leaq 0x1edde(%rip), %rsi # 0xa2749
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %ebx
testq %r15, %r15
je 0x839a4
movq %r15, %rdi
callq 0x83fb1
testl %eax, %eax
je 0x839ab
leaq 0x1ea8d(%rip), %rsi # 0xa2422
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x839a7
xorl %r15d, %r15d
xorl %ecx, %ecx
jmp 0x83a0c
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
movq 0x30(%r15), %rax
cmpl $0x0, 0x28(%rax)
je 0x839e7
movq 0x18(%rax), %rdx
movq 0x30(%rdx), %rdx
movl (%rdx), %edx
xorl %esi, %esi
subl 0x20(%rax), %edx
cvtsi2sd %rdx, %xmm0
movq %xmm0, %r15
cmovnsq %rdx, %r15
movl $0x7, %ebx
cmovnsq %rsi, %rbx
jmp 0x83a09
movslq 0x24(%rax), %rax
xorl %edx, %edx
movl %eax, %esi
cvtsi2sd %rsi, %xmm0
testq %rax, %rax
movq %xmm0, %r15
cmovnsq %rax, %r15
movl $0x7, %ebx
cmovnsq %rdx, %rbx
andq %r15, %rcx
movl %r15d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| js_dataview_get_byteLength:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdi
mov [rsp+28h+var_20], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_83964
mov r15, [rsp+28h+var_20]
cmp word ptr [r15+6], 21h ; '!'
jz short loc_83978
loc_83964:
lea rsi, aNotADataview; "not a DataView"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
loc_83978:
mov ebx, 6
test r15, r15
jz short loc_839A4
mov rdi, r15
call dataview_is_oob
test eax, eax
jz short loc_839AB
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_839A7
loc_839A4:
xor r15d, r15d
loc_839A7:
xor ecx, ecx
jmp short loc_83A0C
loc_839AB:
mov rcx, 7FFFFFFF00000000h
mov rax, [r15+30h]
cmp dword ptr [rax+28h], 0
jz short loc_839E7
mov rdx, [rax+18h]
mov rdx, [rdx+30h]
mov edx, [rdx]
xor esi, esi
sub edx, [rax+20h]
cvtsi2sd xmm0, rdx
movq r15, xmm0
cmovns r15, rdx
mov ebx, 7
cmovns rbx, rsi
jmp short loc_83A09
loc_839E7:
movsxd rax, dword ptr [rax+24h]
xor edx, edx
mov esi, eax
cvtsi2sd xmm0, rsi
test rax, rax
movq r15, xmm0
cmovns r15, rax
mov ebx, 7
cmovns rbx, rdx
loc_83A09:
and rcx, r15
loc_83A0C:
mov eax, r15d
or rax, rcx
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long js_dataview_get_byteLength(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // r15
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
double v21; // r15
long long v22; // rcx
long long v23; // rax
int v24; // edx
long long v25; // rax
char v27; // [rsp+0h] [rbp-28h]
if ( (_DWORD)a3 != -1 || (v14 = a2, *(_WORD *)(a2 + 6) != 33) )
{
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a DataView", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v27);
}
if ( !v14 )
{
LODWORD(v21) = 0;
goto LABEL_8;
}
if ( (unsigned int)dataview_is_oob(v14) )
{
LODWORD(v21) = 0;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v15,
v16,
v17,
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14,
v27);
LABEL_8:
v22 = 0LL;
return v22 | LODWORD(v21);
}
v23 = *(_QWORD *)(v14 + 48);
if ( *(_DWORD *)(v23 + 40) )
{
v24 = **(_DWORD **)(*(_QWORD *)(v23 + 24) + 48LL) - *(_DWORD *)(v23 + 32);
v21 = (double)v24;
if ( v24 >= 0 )
*(_QWORD *)&v21 = (unsigned int)v24;
}
else
{
v25 = *(int *)(v23 + 36);
v21 = (double)(int)v25;
if ( v25 >= 0 )
v21 = *(double *)&v25;
}
v22 = *(_QWORD *)&v21 & 0x7FFFFFFF00000000LL;
return v22 | LODWORD(v21);
}
| |||
49,026 | POINTonE1_times_minus_z | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/map_to_g1.c | static void POINTonE1_times_minus_z(POINTonE1 *out, const POINTonE1 *in)
{
POINTonE1_double(out, in); /* 1: 0x2 */
POINTonE1_add_n_dbl(out, in, 2); /* 2..4: 0x3..0xc */
POINTonE1_add_n_dbl(out, in, 3); /* 5..8: 0xd..0x68 */
POINTonE1_add_n_dbl(out, in, 9); /* 9..18: 0x69..0xd200 */
POINTonE1_add_n_dbl(out, in, 32); /* 19..51: ..0xd20100000000 */
POINTonE1_add_n_dbl(out, in, 16); /* 52..68: ..0xd201000000010000 */
} | O0 | c | POINTonE1_times_minus_z:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xaa570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2, %edx
callq 0xbb500
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0xbb500
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x9, %edx
callq 0xbb500
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x20, %edx
callq 0xbb500
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0xbb500
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| POINTonE1_times_minus_z:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call POINTonE1_double
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, 2
call POINTonE1_add_n_dbl
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, 3
call POINTonE1_add_n_dbl
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, 9
call POINTonE1_add_n_dbl
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, 20h ; ' '
call POINTonE1_add_n_dbl
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, 10h
call POINTonE1_add_n_dbl
add rsp, 10h
pop rbp
retn
| long long POINTonE1_times_minus_z(long long a1, long long a2)
{
POINTonE1_double(a1, a2);
POINTonE1_add_n_dbl(a1, a2, 2LL);
POINTonE1_add_n_dbl(a1, a2, 3LL);
POINTonE1_add_n_dbl(a1, a2, 9LL);
POINTonE1_add_n_dbl(a1, a2, 32LL);
return POINTonE1_add_n_dbl(a1, a2, 16LL);
}
| POINTonE1_times_minus_z:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001aa570
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x2
CALL 0x001bb500
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x3
CALL 0x001bb500
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x9
CALL 0x001bb500
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x20
CALL 0x001bb500
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x10
CALL 0x001bb500
ADD RSP,0x10
POP RBP
RET
|
void POINTonE1_times_minus_z(int8 param_1,int8 param_2)
{
POINTonE1_double(param_1,param_2);
POINTonE1_add_n_dbl(param_1,param_2,2);
POINTonE1_add_n_dbl(param_1,param_2,3);
POINTonE1_add_n_dbl(param_1,param_2,9);
POINTonE1_add_n_dbl(param_1,param_2,0x20);
POINTonE1_add_n_dbl(param_1,param_2,0x10);
return;
}
| |
49,027 | rb_insert | eloqsql/mysys/tree.c | static void rb_insert(TREE *tree, TREE_ELEMENT ***parent, TREE_ELEMENT *leaf)
{
TREE_ELEMENT *y,*par,*par2;
leaf->colour=RED;
while (leaf != tree->root && (par=parent[-1][0])->colour == RED)
{
if (par == (par2=parent[-2][0])->left)
{
y= par2->right;
if (y->colour == RED)
{
par->colour=BLACK;
y->colour=BLACK;
leaf=par2;
parent-=2;
leaf->colour=RED; /* And the loop continues */
}
else
{
if (leaf == par->right)
{
left_rotate(parent[-1],par);
par=leaf; /* leaf is now parent to old leaf */
}
par->colour=BLACK;
par2->colour=RED;
right_rotate(parent[-2],par2);
break;
}
}
else
{
y= par2->left;
if (y->colour == RED)
{
par->colour=BLACK;
y->colour=BLACK;
leaf=par2;
parent-=2;
leaf->colour=RED; /* And the loop continues */
}
else
{
if (leaf == par->left)
{
right_rotate(parent[-1],par);
par=leaf;
}
par->colour=BLACK;
par2->colour=RED;
left_rotate(parent[-2],par2);
break;
}
}
}
tree->root->colour=BLACK;
} | O0 | c | rb_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x31(%rbp)
je 0xfacc7
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xfacd3
jmp 0xfaea2
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x10(%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, -0x30(%rbp)
cmpq (%rcx), %rax
jne 0xfadca
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0xfad5f
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
jmp 0xfadc5
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xfad86
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xfc210
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq -0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xfc250
jmp 0xfaea2
jmp 0xfae9d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0xfae39
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
jmp 0xfae9b
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xfae5f
movq -0x10(%rbp), %rax
movq -0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xfc250
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq -0x10(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xfc210
jmp 0xfaea2
jmp 0xfae9d
jmp 0xfac97
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
orl $0x80000000, %ecx # imm = 0x80000000
movl %ecx, 0x10(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rb_insert:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
loc_FAC97:
mov rcx, [rbp+var_18]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx]
mov [rbp+var_31], al
jz short loc_FACC7
mov rax, [rbp+var_10]
mov rax, [rax-8]
mov rax, [rax]
mov [rbp+var_28], rax
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 0
setz al
mov [rbp+var_31], al
loc_FACC7:
mov al, [rbp+var_31]
test al, 1
jnz short loc_FACD3
jmp loc_FAEA2
loc_FACD3:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov rcx, [rcx-10h]
mov rcx, [rcx]
mov [rbp+var_30], rcx
cmp rax, [rcx]
jnz loc_FADCA
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 0
jnz short loc_FAD5F
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
jmp short loc_FADC5
loc_FAD5F:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
cmp rax, [rcx+8]
jnz short loc_FAD86
mov rax, [rbp+var_10]
mov rdi, [rax-8]
mov rsi, [rbp+var_28]
call left_rotate
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
loc_FAD86:
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_30]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rdi, [rax-10h]
mov rsi, [rbp+var_30]
call right_rotate
jmp loc_FAEA2
loc_FADC5:
jmp loc_FAE9D
loc_FADCA:
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+10h]
shr eax, 1Fh
cmp eax, 0
jnz short loc_FAE39
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_20]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
jmp short loc_FAE9B
loc_FAE39:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
cmp rax, [rcx]
jnz short loc_FAE5F
mov rax, [rbp+var_10]
mov rdi, [rax-8]
mov rsi, [rbp+var_28]
call right_rotate
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
loc_FAE5F:
mov rax, [rbp+var_28]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
mov rax, [rbp+var_30]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 0
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rdi, [rax-10h]
mov rsi, [rbp+var_30]
call left_rotate
jmp short loc_FAEA2
loc_FAE9B:
jmp short $+2
loc_FAE9D:
jmp loc_FAC97
loc_FAEA2:
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rax+10h]
and ecx, 7FFFFFFFh
or ecx, 80000000h
mov [rax+10h], ecx
add rsp, 40h
pop rbp
retn
| long long * rb_insert(long long **a1, long long a2, long long *a3)
{
long long *result; // rax
bool v4; // [rsp+Fh] [rbp-31h]
long long *v5; // [rsp+10h] [rbp-30h]
long long *v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
long long *v8; // [rsp+28h] [rbp-18h]
v8 = a3;
*((_DWORD *)a3 + 4) &= ~0x80000000;
while ( 1 )
{
v4 = 0;
if ( v8 != *a1 )
{
v6 = **(long long ***)(a2 - 8);
v4 = *((_DWORD *)v6 + 4) >> 31 == 0;
}
if ( !v4 )
break;
v5 = **(long long ***)(a2 - 16);
if ( v6 == (long long *)*v5 )
{
v7 = v5[1];
if ( *(int *)(v7 + 16) < 0 )
{
if ( v8 == (long long *)v6[1] )
{
left_rotate(*(_QWORD *)(a2 - 8), v6);
v6 = v8;
}
*((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000;
*((_DWORD *)v5 + 4) &= ~0x80000000;
right_rotate(*(_QWORD *)(a2 - 16), v5);
break;
}
}
else
{
v7 = *v5;
if ( *(int *)(*v5 + 16) < 0 )
{
if ( v8 == (long long *)*v6 )
{
right_rotate(*(_QWORD *)(a2 - 8), v6);
v6 = v8;
}
*((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000;
*((_DWORD *)v5 + 4) &= ~0x80000000;
left_rotate(*(_QWORD *)(a2 - 16), v5);
break;
}
}
*((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000;
*(_DWORD *)(v7 + 16) = *(_DWORD *)(v7 + 16) & 0x7FFFFFFF | 0x80000000;
v8 = v5;
a2 -= 16LL;
*((_DWORD *)v5 + 4) &= ~0x80000000;
}
result = *a1;
*((_DWORD *)*a1 + 4) = (*a1)[2] & 0x7FFFFFFF | 0x80000000;
return result;
}
| rb_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
LAB_001fac97:
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX]
MOV byte ptr [RBP + -0x31],AL
JZ 0x001facc7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001facc7:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001facd3
JMP 0x001faea2
LAB_001facd3:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + -0x10]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RBP + -0x30],RCX
CMP RAX,qword ptr [RCX]
JNZ 0x001fadca
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x0
JNZ 0x001fad5f
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
JMP 0x001fadc5
LAB_001fad5f:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x001fad86
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001fc210
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_001fad86:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001fc250
JMP 0x001faea2
LAB_001fadc5:
JMP 0x001fae9d
LAB_001fadca:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x10]
SHR EAX,0x1f
CMP EAX,0x0
JNZ 0x001fae39
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
JMP 0x001fae9b
LAB_001fae39:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX]
JNZ 0x001fae5f
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001fc250
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_001fae5f:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x0
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001fc210
JMP 0x001faea2
LAB_001fae9b:
JMP 0x001fae9d
LAB_001fae9d:
JMP 0x001fac97
LAB_001faea2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x10]
AND ECX,0x7fffffff
OR ECX,0x80000000
MOV dword ptr [RAX + 0x10],ECX
ADD RSP,0x40
POP RBP
RET
|
void rb_insert(long *param_1,long param_2,long *param_3)
{
long *plVar1;
long lVar2;
bool bVar3;
long *local_30;
long *local_20;
long local_18;
*(uint *)(param_3 + 2) = *(uint *)(param_3 + 2) & 0x7fffffff;
local_20 = param_3;
local_18 = param_2;
do {
bVar3 = false;
if (local_20 != (long *)*param_1) {
local_30 = (long *)**(long **)(local_18 + -8);
bVar3 = -1 < (int)local_30[2];
}
if (!bVar3) goto LAB_001faea2;
plVar1 = (long *)**(long **)(local_18 + -0x10);
if (local_30 == (long *)*plVar1) {
lVar2 = plVar1[1];
if (*(int *)(lVar2 + 0x10) < 0) {
if (local_20 == (long *)local_30[1]) {
left_rotate(*(int8 *)(local_18 + -8),local_30);
local_30 = local_20;
}
*(uint *)(local_30 + 2) = *(uint *)(local_30 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff;
right_rotate(*(int8 *)(local_18 + -0x10),plVar1);
LAB_001faea2:
*(uint *)(*param_1 + 0x10) = *(uint *)(*param_1 + 0x10) & 0x7fffffff | 0x80000000;
return;
}
*(uint *)(local_30 + 2) = *(uint *)(local_30 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(lVar2 + 0x10) = *(uint *)(lVar2 + 0x10) & 0x7fffffff | 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff;
}
else {
lVar2 = *plVar1;
if (*(int *)(lVar2 + 0x10) < 0) {
if (local_20 == (long *)*local_30) {
right_rotate(*(int8 *)(local_18 + -8),local_30);
local_30 = local_20;
}
*(uint *)(local_30 + 2) = *(uint *)(local_30 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff;
left_rotate(*(int8 *)(local_18 + -0x10),plVar1);
goto LAB_001faea2;
}
*(uint *)(local_30 + 2) = *(uint *)(local_30 + 2) & 0x7fffffff | 0x80000000;
*(uint *)(lVar2 + 0x10) = *(uint *)(lVar2 + 0x10) & 0x7fffffff | 0x80000000;
*(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff;
}
local_18 = local_18 + -0x10;
local_20 = plVar1;
} while( true );
}
| |
49,028 | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
} | O3 | cpp | minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x9a8d3
cmpq $0x0, 0x30(%r15)
je 0x9a8f1
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x8aca0
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x9a81f
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x9263e
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x9aa96
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x9aa2a
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x9a7af
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5d774
movq %r14, %rdi
callq 0x62bf0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x9a7d7
callq 0x725dc
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x9a7e9
callq 0x725dc
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x9a7fb
callq 0x725dc
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x9a848
movq 0x96771(%rip), %rax # 0x130f80
cmpb $0x0, (%rax)
je 0x9a833
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x9a83d
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x9ab80
jmp 0x9a848
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9a848
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5d774
movq %r14, %rdi
callq 0x62bf0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x9a86d
callq 0x725dc
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x9a87c
callq 0x725dc
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x9a88b
callq 0x725dc
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9a8c1
movq 0x966e4(%rip), %rax # 0x130f80
cmpb $0x0, (%rax)
je 0x9a8ac
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x9a8b6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9a8c1
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1b460
movq %rax, %r14
leaq 0x5a45f(%rip), %rsi # 0xf4d46
movq %rax, %rdi
callq 0x1b340
jmp 0x9a90d
movl $0x10, %edi
callq 0x1b460
movq %rax, %r14
leaq 0x5a45b(%rip), %rsi # 0xf4d60
movq %rax, %rdi
callq 0x1b340
movq 0x966d4(%rip), %rsi # 0x130fe8
movq 0x9663d(%rip), %rdx # 0x130f58
movq %r14, %rdi
callq 0x1bfb0
jmp 0x9a96e
jmp 0x9a954
jmp 0x9a929
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b6a0
jmp 0x9a97b
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x9a95f
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x9a95f
movq %rax, %rdi
callq 0x24da9
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x9aaf4
jmp 0x9a971
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8af92
movq %rbx, %rdi
callq 0x1c030
nop
| _ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_9A8D3
cmp qword ptr [r15+30h], 0
jz loc_9A8F1
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz loc_9A81F
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_9A7AF
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_9A7AF:
lea r14, [rsp+108h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_9A7D7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A7D7:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_9A7E9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A7E9:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_9A7FB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A7FB:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_9A848
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9A833
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_9A83D
loc_9A81F:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short loc_9A848
loc_9A833:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_9A83D:
cmp eax, 1
jnz short loc_9A848
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9A848:
lea r14, [rsp+108h+var_90]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_9A86D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A86D:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_9A87C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A87C:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_9A88B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A88B:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_9A8C1
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9A8AC
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_9A8B6
loc_9A8AC:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_9A8B6:
cmp eax, 1
jnz short loc_9A8C1
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9A8C1:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_9A8D3:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_9A90D
loc_9A8F1:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_9A90D:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_9A96E
jmp short loc_9A954
jmp short $+2
loc_9A929:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_9A97B
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_9A95F
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_9A95F
loc_9A954:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_9A95F:
lea rdi, [rsp+108h+var_80]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_9A971
loc_9A96E:
mov rbx, rax
loc_9A971:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_9A97B:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdi
signed __int32 v12; // eax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r14
__int128 v17; // [rsp+8h] [rbp-100h]
_BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF
void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h]
_BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF
long long v21; // [rsp+40h] [rbp-C8h]
volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h]
volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h]
long long v24; // [rsp+68h] [rbp-A0h]
volatile signed __int32 *v25; // [rsp+70h] [rbp-98h]
char v26[16]; // [rsp+78h] [rbp-90h] BYREF
_BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF
long long v28; // [rsp+90h] [rbp-78h]
volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h]
volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h]
volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h]
char v32[16]; // [rsp+C8h] [rbp-40h] BYREF
__int128 v33; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_34;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_34:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v20, v4);
*(_QWORD *)&v17 = a2;
*((_QWORD *)&v17 + 1) = a3;
if ( v24 )
{
minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20);
v33 = v17;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18);
minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10);
if ( v19 )
v19(v18, v18, 3LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v32);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32);
if ( v31 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31);
if ( v30 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v29 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29);
v11 = v28;
if ( v28 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v28 + 12);
*(_DWORD *)(v28 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v26);
if ( v25 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v22 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22);
v13 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
return this;
}
| do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0019a8d3
CMP qword ptr [R15 + 0x30],0x0
JZ 0x0019a8f1
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x0018aca0
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0019a81f
LAB_0019a75c:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0019263e
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_0019a77f:
LEA RDI,[RSP + 0x18]
CALL 0x0019aa96
LAB_0019a789:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0019aa2a
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0019a7af
LAB_0019a7a0:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019a7af:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015d774
MOV RDI,R14
CALL 0x00162bf0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0019a7d7
CALL 0x001725dc
LAB_0019a7d7:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x0019a7e9
CALL 0x001725dc
LAB_0019a7e9:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x0019a7fb
CALL 0x001725dc
LAB_0019a7fb:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x0019a848
MOV RAX,qword ptr [0x00230f80]
CMP byte ptr [RAX],0x0
JZ 0x0019a833
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0019a83d
LAB_0019a81f:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0019ab80
LAB_0019a831:
JMP 0x0019a848
LAB_0019a833:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0019a83d:
CMP EAX,0x1
JNZ 0x0019a848
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019a848:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015d774
MOV RDI,R14
CALL 0x00162bf0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0019a86d
CALL 0x001725dc
LAB_0019a86d:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x0019a87c
CALL 0x001725dc
LAB_0019a87c:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0019a88b
CALL 0x001725dc
LAB_0019a88b:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0019a8c1
MOV RAX,qword ptr [0x00230f80]
CMP byte ptr [RAX],0x0
JZ 0x0019a8ac
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0019a8b6
LAB_0019a8ac:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0019a8b6:
CMP EAX,0x1
JNZ 0x0019a8c1
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019a8c1:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0019a8d3:
MOV EDI,0x10
CALL 0x0011b460
MOV R14,RAX
LAB_0019a8e0:
LEA RSI,[0x1f4d46]
MOV RDI,RAX
CALL 0x0011b340
LAB_0019a8ef:
JMP 0x0019a90d
LAB_0019a8f1:
MOV EDI,0x10
CALL 0x0011b460
MOV R14,RAX
LAB_0019a8fe:
LEA RSI,[0x1f4d60]
MOV RDI,RAX
CALL 0x0011b340
LAB_0019a90d:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,R14
CALL 0x0011bfb0
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
int iVar2;
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16];
code *local_e0;
Expression local_d0 [8];
long *local_c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
data local_90 [16];
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019a8e0 to 0019a8ee has its CatchHandler @ 0019a929 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 0019a81f to 0019a830 has its CatchHandler @ 0019a923 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 0019a75c to 0019a76d has its CatchHandler @ 0019a96e */
local_100 = in_RSI;
uStack_f8 = in_RDX;
Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 0019a77f to 0019a788 has its CatchHandler @ 0019a95c */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 0019a789 to 0019a795 has its CatchHandler @ 0019a936 */
Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 0019a7a0 to 0019a7ae has its CatchHandler @ 0019a925 */
(*local_e0)(local_f0,local_f0,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8);
}
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019a8fe to 0019a90c has its CatchHandler @ 0019a927 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
| |
49,029 | mysql_stmt_next_result | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
{
int rc= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_EXECUTED)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!mysql_stmt_more_results(stmt))
return(-1);
if (stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE)
madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA);
stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE;
if (mysql_next_result(stmt->mysql))
{
stmt->state= MYSQL_STMT_FETCH_DONE;
SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate,
stmt->mysql->net.last_error);
return(1);
}
if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT)
stmt->mysql->status= MYSQL_STATUS_STMT_RESULT;
if (stmt->mysql->field_count)
rc= madb_alloc_stmt_fields(stmt);
else
{
stmt->upsert_status.affected_rows= stmt->mysql->affected_rows;
stmt->upsert_status.last_insert_id= stmt->mysql->insert_id;
stmt->upsert_status.server_status= stmt->mysql->server_status;
stmt->upsert_status.warning_count= stmt->mysql->warning_count;
}
stmt->field_count= stmt->mysql->field_count;
stmt->result.rows= 0;
return(rc);
} | O0 | c | mysql_stmt_next_result:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x309ef
jmp 0x30980
movq -0x10(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x34890(%rip), %rax # 0x65230
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x34876(%rip), %rax # 0x65240
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x30cea
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jae 0x30ae7
jmp 0x309ff
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x34809(%rip), %rax # 0x65230
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x347e7(%rip), %rax # 0x65240
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
jmp 0x30a78
movq -0x10(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x34798(%rip), %rax # 0x65230
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x3477e(%rip), %rax # 0x65240
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x30cea
movq -0x10(%rbp), %rdi
callq 0x30320
cmpb $0x0, %al
jne 0x30b00
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x30cea
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jbe 0x30b22
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jae 0x30b22
movq -0x10(%rbp), %rdi
movl $0xb, %esi
callq 0x2dde0
movq -0x10(%rbp), %rax
movl $0x3, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x213b0
cmpl $0x0, %eax
je 0x30c1a
movq -0x10(%rbp), %rax
movl $0x6, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x30bcb
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x28(%rbp)
jmp 0x30bf1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x34657(%rip), %rax # 0x65240
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x30cea
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x1, 0x488(%rax)
jne 0x30c3d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x8, 0x488(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x0, 0x37c(%rax)
je 0x30c5c
movq -0x10(%rbp), %rdi
callq 0x30d00
movl %eax, -0x14(%rbp)
jmp 0x30cc0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x338(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf8(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x340(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x100(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x380(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf4(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x388(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x37c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_stmt_next_result:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jnz short loc_309EF
jmp short $+2
loc_30980:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_30CEA
loc_309EF:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jnb loc_30AE7
jmp short $+2
loc_309FF:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7DEh
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_30A78:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_30CEA
loc_30AE7:
mov rdi, [rbp+var_10]
call mysql_stmt_more_results
cmp al, 0
jnz short loc_30B00
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_30CEA
loc_30B00:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jbe short loc_30B22
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnb short loc_30B22
mov rdi, [rbp+var_10]
mov esi, 0Bh
call madb_reset_stmt
loc_30B22:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 3
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call mysql_next_result
cmp eax, 0
jz loc_30C1A
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 6
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_10]
mov [rax+108h], ecx
mov rdi, [rbp+var_10]
add rdi, 30Dh
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_10]
add rax, 10Ch
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_30BCB
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_28], rax
jmp short loc_30BF1
loc_30BCB:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
loc_30BF1:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_30CEA
loc_30C1A:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+488h], 1
jnz short loc_30C3D
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 8
loc_30C3D:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+37Ch], 0
jz short loc_30C5C
mov rdi, [rbp+var_10]
call madb_alloc_stmt_fields
mov [rbp+var_14], eax
jmp short loc_30CC0
loc_30C5C:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+338h]
mov rax, [rbp+var_10]
mov [rax+0F8h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+340h]
mov rax, [rbp+var_10]
mov [rax+100h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+380h]
mov rax, [rbp+var_10]
mov [rax+0F4h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+388h]
mov rax, [rbp+var_10]
mov [rax+0F0h], ecx
loc_30CC0:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+37Ch]
mov rax, [rbp+var_10]
mov [rax+60h], ecx
mov rax, [rbp+var_10]
mov qword ptr [rax+0C8h], 0
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_30CEA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_stmt_next_result(long long a1)
{
char *v1; // rax
unsigned int v3; // [rsp+1Ch] [rbp-14h]
v3 = 0;
if ( *(_QWORD *)(a1 + 56) )
{
if ( *(_DWORD *)(a1 + 80) >= 2u )
{
if ( mysql_stmt_more_results(a1) )
{
if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(a1 + 80) < 6u )
madb_reset_stmt(a1, 11);
*(_DWORD *)(a1 + 80) = 3;
if ( (unsigned int)mysql_next_result(*(_QWORD *)(a1 + 56)) )
{
*(_DWORD *)(a1 + 80) = 6;
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v1 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v1 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v1, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) == 1 )
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 8;
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL) )
{
v3 = madb_alloc_stmt_fields(a1);
}
else
{
*(_QWORD *)(a1 + 248) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 824LL);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 832LL);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL);
}
*(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL);
*(_QWORD *)(a1 + 200) = 0LL;
return v3;
}
}
else
{
return (unsigned int)-1;
}
}
else
{
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 2014;
strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
else
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[13], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
| mysql_stmt_next_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x001309ef
JMP 0x00130980
LAB_00130980:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x165230]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x165240]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00130cea
LAB_001309ef:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JNC 0x00130ae7
JMP 0x001309ff
LAB_001309ff:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7de
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x165230]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x165240]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x00130a78
LAB_00130a78:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x165230]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x165240]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00130cea
LAB_00130ae7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00130320
CMP AL,0x0
JNZ 0x00130b00
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00130cea
LAB_00130b00:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JBE 0x00130b22
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNC 0x00130b22
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xb
CALL 0x0012dde0
LAB_00130b22:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x3
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001213b0
CMP EAX,0x0
JZ 0x00130c1a
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x00130bcb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00130bf1
LAB_00130bcb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x165240]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_00130bf1:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00130cea
LAB_00130c1a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x488],0x1
JNZ 0x00130c3d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x8
LAB_00130c3d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x37c],0x0
JZ 0x00130c5c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00130d00
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00130cc0
LAB_00130c5c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x338]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xf8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x340]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x100],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x380]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x388]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf0],ECX
LAB_00130cc0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x37c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_00130cea:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_next_result(long param_1)
{
char cVar1;
int iVar2;
char *local_30;
int4 local_1c;
int4 local_c;
local_1c = 0;
if (*(long *)(param_1 + 0x38) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_001652a8,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else if (*(uint *)(param_1 + 0x50) < 2) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_001652b0,0x1ff);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_001652b0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else {
cVar1 = mysql_stmt_more_results(param_1);
if (cVar1 == '\0') {
local_c = 0xffffffff;
}
else {
if ((2 < *(uint *)(param_1 + 0x50)) && (*(uint *)(param_1 + 0x50) < 6)) {
madb_reset_stmt(param_1,0xb);
}
*(int4 *)(param_1 + 0x50) = 3;
iVar2 = mysql_next_result(*(int8 *)(param_1 + 0x38));
if (iVar2 == 0) {
if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 1) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 8;
}
if (*(int *)(*(long *)(param_1 + 0x38) + 0x37c) == 0) {
*(int8 *)(param_1 + 0xf8) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x388);
}
else {
local_1c = madb_alloc_stmt_fields(param_1);
}
*(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c);
*(int8 *)(param_1 + 200) = 0;
local_c = local_1c;
}
else {
*(int4 *)(param_1 + 0x50) = 6;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_30 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_30 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_30,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
}
}
return local_c;
}
| |
49,030 | mysql_stmt_next_result | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
{
int rc= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_EXECUTED)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!mysql_stmt_more_results(stmt))
return(-1);
if (stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE)
madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA);
stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE;
if (mysql_next_result(stmt->mysql))
{
stmt->state= MYSQL_STMT_FETCH_DONE;
SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate,
stmt->mysql->net.last_error);
return(1);
}
if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT)
stmt->mysql->status= MYSQL_STATUS_STMT_RESULT;
if (stmt->mysql->field_count)
rc= madb_alloc_stmt_fields(stmt);
else
{
stmt->upsert_status.affected_rows= stmt->mysql->affected_rows;
stmt->upsert_status.last_insert_id= stmt->mysql->insert_id;
stmt->upsert_status.server_status= stmt->mysql->server_status;
stmt->upsert_status.warning_count= stmt->mysql->warning_count;
}
stmt->field_count= stmt->mysql->field_count;
stmt->result.rows= 0;
return(rc);
} | O3 | c | mysql_stmt_next_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x25027
movl 0x50(%rbx), %eax
cmpl $0x1, %eax
ja 0x2506d
movl $0x7de, %r15d # imm = 0x7DE
movl %r15d, 0x90(%rdi)
movl $0x297, %edi # imm = 0x297
addq 0x38(%rbx), %rdi
leaq 0x28dd1(%rip), %r12 # 0x4dd80
movq (%r12), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%rbx), %rax
xorl %r14d, %r14d
movb %r14b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%rbx), %rdi
leaq 0x28db5(%rip), %r13 # 0x4dd90
movq 0x70(%r13), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%rbx), %rax
movb %r14b, 0x296(%rax)
movl %r15d, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
movq (%r12), %rsi
movl $0x5, %edx
callq 0x13220
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movq 0x70(%r13), %rsi
jmp 0x250fa
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x28d41(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28d2c(%rip), %rax # 0x4dd90
movq 0x68(%rax), %rsi
jmp 0x250fa
movzwl 0x380(%rdi), %ecx
testl $0x1008, %ecx # imm = 0x1008
je 0x25123
cmpl $0x2, %eax
sete %cl
cmpl $0x6, %eax
setae %al
orb %cl, %al
jne 0x250a1
movq %rbx, %rdi
movl $0xb, %esi
callq 0x23660
movq 0x38(%rbx), %rdi
movl $0x3, 0x50(%rbx)
callq 0x1c7a5
testl %eax, %eax
je 0x2512b
movl $0x6, 0x50(%rbx)
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x25111
movq 0x38(%rbx), %r15
cmpl $0x1, 0x488(%r15)
jne 0x25148
movl $0x8, 0x488(%r15)
movq 0x38(%rbx), %r15
movl 0x37c(%r15), %eax
testl %eax, %eax
je 0x251b7
movq 0x340(%rbx), %r14
movl %eax, 0x60(%rbx)
cmpq $0x0, 0x2f8(%r15)
je 0x2524c
movq %r14, %rdi
xorl %esi, %esi
callq 0x20b87
movq 0x2f8(%r15), %rdi
movl 0x37c(%r15), %esi
movq %r14, %rdx
callq 0x1dc46
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x251f2
movl 0x60(%rbx), %eax
imulq $0x70, %rax, %rsi
movq %r14, %rdi
callq 0x20a6f
movq %rax, 0x78(%rbx)
testq %rax, %rax
je 0x251f2
movq %rax, %rdi
movl 0x60(%rbx), %eax
jmp 0x25250
movq 0x338(%r15), %rax
movq %rax, 0xf8(%rbx)
movq 0x340(%r15), %rax
movq %rax, 0x100(%rbx)
movl 0x380(%r15), %eax
movl %eax, 0xf4(%rbx)
movl 0x388(%r15), %eax
movl %eax, 0xf0(%rbx)
xorl %r14d, %r14d
jmp 0x25267
movl $0x7d8, 0x108(%rbx) # imm = 0x7D8
leaq 0x30d(%rbx), %rdi
leaq 0x28b76(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28b61(%rip), %rax # 0x4dd90
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %r14d
jmp 0x25267
movq 0x78(%rbx), %rdi
movl %eax, %eax
imulq $0x70, %rax, %rdx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x13260
movb $0x0, 0xe8(%rbx)
movq 0x38(%rbx), %rax
movl 0x37c(%rax), %eax
movl %eax, 0x60(%rbx)
movq $0x0, 0xc8(%rbx)
jmp 0x25111
| mysql_stmt_next_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+38h]
test rdi, rdi
jz loc_25027
mov eax, [rbx+50h]
cmp eax, 1
ja loc_2506D
mov r15d, 7DEh
mov [rdi+90h], r15d
mov edi, 297h
add rdi, [rbx+38h]
lea r12, SQLSTATE_UNKNOWN
mov rsi, [r12]
mov edx, 5
call _strncpy
mov rax, [rbx+38h]
xor r14d, r14d
mov [rax+29Ch], r14b
mov edi, 97h
add rdi, [rbx+38h]
lea r13, client_errors
mov rsi, [r13+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbx+38h]
mov [rax+296h], r14b
mov [rbx+108h], r15d
lea rdi, [rbx+30Dh]
mov rsi, [r12]
mov edx, 5
call _strncpy
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov rsi, [r13+70h]
jmp loc_250FA
loc_25027:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
jmp loc_250FA
loc_2506D:
movzx ecx, word ptr [rdi+380h]
test ecx, 1008h
jz loc_25123
cmp eax, 2
setz cl
cmp eax, 6
setnb al
or al, cl
jnz short loc_250A1
mov rdi, rbx
mov esi, 0Bh
call madb_reset_stmt
mov rdi, [rbx+38h]
loc_250A1:
mov dword ptr [rbx+50h], 3
call mysql_next_result
test eax, eax
jz short loc_2512B
mov dword ptr [rbx+50h], 6
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
loc_250FA:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14d, 1
loc_25111:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25123:
mov r14d, 0FFFFFFFFh
jmp short loc_25111
loc_2512B:
mov r15, [rbx+38h]
cmp dword ptr [r15+488h], 1
jnz short loc_25148
mov dword ptr [r15+488h], 8
mov r15, [rbx+38h]
loc_25148:
mov eax, [r15+37Ch]
test eax, eax
jz short loc_251B7
mov r14, [rbx+340h]
mov [rbx+60h], eax
cmp qword ptr [r15+2F8h], 0
jz loc_2524C
mov rdi, r14
xor esi, esi
call ma_free_root
mov rdi, [r15+2F8h]
mov esi, [r15+37Ch]
mov rdx, r14
call ma_duplicate_resultset_metadata
mov [rbx+58h], rax
test rax, rax
jz short loc_251F2
mov eax, [rbx+60h]
imul rsi, rax, 70h ; 'p'
mov rdi, r14
call ma_alloc_root
mov [rbx+78h], rax
test rax, rax
jz short loc_251F2
mov rdi, rax
mov eax, [rbx+60h]
jmp loc_25250
loc_251B7:
mov rax, [r15+338h]
mov [rbx+0F8h], rax
mov rax, [r15+340h]
mov [rbx+100h], rax
mov eax, [r15+380h]
mov [rbx+0F4h], eax
mov eax, [r15+388h]
mov [rbx+0F0h], eax
xor r14d, r14d
jmp short loc_25267
loc_251F2:
mov dword ptr [rbx+108h], 7D8h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14d, 1
jmp short loc_25267
loc_2524C:
mov rdi, [rbx+78h]
loc_25250:
mov eax, eax
imul rdx, rax, 70h ; 'p'
xor r14d, r14d
xor esi, esi
call _memset
mov byte ptr [rbx+0E8h], 0
loc_25267:
mov rax, [rbx+38h]
mov eax, [rax+37Ch]
mov [rbx+60h], eax
mov qword ptr [rbx+0C8h], 0
jmp loc_25111
| long long mysql_stmt_next_result(long long a1)
{
long long v2; // rdi
unsigned int v3; // eax
long long v4; // rdi
char *v5; // rsi
long long v6; // rsi
unsigned int v7; // r14d
long long v9; // r15
unsigned int v10; // eax
long long v11; // r14
long long v12; // rax
char *v13; // rax
char *v14; // rdi
v2 = *(_QWORD *)(a1 + 56);
if ( !v2 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = client_errors[13];
goto LABEL_10;
}
v3 = *(_DWORD *)(a1 + 80);
if ( v3 > 1 )
{
if ( (*(_WORD *)(v2 + 896) & 0x1008) == 0 )
return (unsigned int)-1;
if ( v3 != 2 && v3 < 6 )
{
madb_reset_stmt(a1, 11);
v2 = *(_QWORD *)(a1 + 56);
}
*(_DWORD *)(a1 + 80) = 3;
if ( (unsigned int)mysql_next_result(v2) )
{
*(_DWORD *)(a1 + 80) = 6;
v6 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v6 + 144);
strncpy(a1 + 781, v6 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
goto LABEL_10;
}
v9 = *(_QWORD *)(a1 + 56);
if ( *(_DWORD *)(v9 + 1160) == 1 )
{
*(_DWORD *)(v9 + 1160) = 8;
v9 = *(_QWORD *)(a1 + 56);
}
v10 = *(_DWORD *)(v9 + 892);
if ( v10 )
{
v11 = *(_QWORD *)(a1 + 832);
*(_DWORD *)(a1 + 96) = v10;
if ( !*(_QWORD *)(v9 + 760) )
{
v14 = *(char **)(a1 + 120);
goto LABEL_23;
}
ma_free_root(v11, 0);
v12 = ma_duplicate_resultset_metadata(*(_QWORD *)(v9 + 760), *(unsigned int *)(v9 + 892), v11);
*(_QWORD *)(a1 + 88) = v12;
if ( v12 )
{
v13 = ma_alloc_root(v11, 112LL * *(unsigned int *)(a1 + 96));
*(_QWORD *)(a1 + 120) = v13;
if ( v13 )
{
v14 = v13;
v10 = *(_DWORD *)(a1 + 96);
LABEL_23:
v7 = 0;
memset(v14, 0LL, 112LL * v10);
*(_BYTE *)(a1 + 232) = 0;
goto LABEL_24;
}
}
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[8], 512LL);
*(_BYTE *)(a1 + 779) = 0;
v7 = 1;
}
else
{
*(_QWORD *)(a1 + 248) = *(_QWORD *)(v9 + 824);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(v9 + 832);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(v9 + 896);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(v9 + 904);
v7 = 0;
}
LABEL_24:
*(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL);
*(_QWORD *)(a1 + 200) = 0LL;
return v7;
}
*(_DWORD *)(v2 + 144) = 2014;
strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = client_errors[14];
LABEL_10:
strncpy(v4, v5, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
| mysql_stmt_next_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00125027
MOV EAX,dword ptr [RBX + 0x50]
CMP EAX,0x1
JA 0x0012506d
MOV R15D,0x7de
MOV dword ptr [RDI + 0x90],R15D
MOV EDI,0x297
ADD RDI,qword ptr [RBX + 0x38]
LEA R12,[0x14dd80]
MOV RSI,qword ptr [R12]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBX + 0x38]
XOR R14D,R14D
MOV byte ptr [RAX + 0x29c],R14B
MOV EDI,0x97
ADD RDI,qword ptr [RBX + 0x38]
LEA R13,[0x14dd90]
MOV RSI,qword ptr [R13 + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [RBX + 0x38]
MOV byte ptr [RAX + 0x296],R14B
MOV dword ptr [RBX + 0x108],R15D
LEA RDI,[RBX + 0x30d]
MOV RSI,qword ptr [R12]
MOV EDX,0x5
CALL 0x00113220
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV RSI,qword ptr [R13 + 0x70]
JMP 0x001250fa
LAB_00125027:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0x68]
JMP 0x001250fa
LAB_0012506d:
MOVZX ECX,word ptr [RDI + 0x380]
TEST ECX,0x1008
JZ 0x00125123
CMP EAX,0x2
SETZ CL
CMP EAX,0x6
SETNC AL
OR AL,CL
JNZ 0x001250a1
MOV RDI,RBX
MOV ESI,0xb
CALL 0x00123660
MOV RDI,qword ptr [RBX + 0x38]
LAB_001250a1:
MOV dword ptr [RBX + 0x50],0x3
CALL 0x0011c7a5
TEST EAX,EAX
JZ 0x0012512b
MOV dword ptr [RBX + 0x50],0x6
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
LAB_001250fa:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R14D,0x1
LAB_00125111:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125123:
MOV R14D,0xffffffff
JMP 0x00125111
LAB_0012512b:
MOV R15,qword ptr [RBX + 0x38]
CMP dword ptr [R15 + 0x488],0x1
JNZ 0x00125148
MOV dword ptr [R15 + 0x488],0x8
MOV R15,qword ptr [RBX + 0x38]
LAB_00125148:
MOV EAX,dword ptr [R15 + 0x37c]
TEST EAX,EAX
JZ 0x001251b7
MOV R14,qword ptr [RBX + 0x340]
MOV dword ptr [RBX + 0x60],EAX
CMP qword ptr [R15 + 0x2f8],0x0
JZ 0x0012524c
MOV RDI,R14
XOR ESI,ESI
CALL 0x00120b87
MOV RDI,qword ptr [R15 + 0x2f8]
MOV ESI,dword ptr [R15 + 0x37c]
MOV RDX,R14
CALL 0x0011dc46
MOV qword ptr [RBX + 0x58],RAX
TEST RAX,RAX
JZ 0x001251f2
MOV EAX,dword ptr [RBX + 0x60]
IMUL RSI,RAX,0x70
MOV RDI,R14
CALL 0x00120a6f
MOV qword ptr [RBX + 0x78],RAX
TEST RAX,RAX
JZ 0x001251f2
MOV RDI,RAX
MOV EAX,dword ptr [RBX + 0x60]
JMP 0x00125250
LAB_001251b7:
MOV RAX,qword ptr [R15 + 0x338]
MOV qword ptr [RBX + 0xf8],RAX
MOV RAX,qword ptr [R15 + 0x340]
MOV qword ptr [RBX + 0x100],RAX
MOV EAX,dword ptr [R15 + 0x380]
MOV dword ptr [RBX + 0xf4],EAX
MOV EAX,dword ptr [R15 + 0x388]
MOV dword ptr [RBX + 0xf0],EAX
XOR R14D,R14D
JMP 0x00125267
LAB_001251f2:
MOV dword ptr [RBX + 0x108],0x7d8
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R14D,0x1
JMP 0x00125267
LAB_0012524c:
MOV RDI,qword ptr [RBX + 0x78]
LAB_00125250:
MOV EAX,EAX
IMUL RDX,RAX,0x70
XOR R14D,R14D
XOR ESI,ESI
CALL 0x00113260
MOV byte ptr [RBX + 0xe8],0x0
LAB_00125267:
MOV RAX,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RAX + 0x37c]
MOV dword ptr [RBX + 0x60],EAX
MOV qword ptr [RBX + 0xc8],0x0
JMP 0x00125111
|
int8 mysql_stmt_next_result(long param_1)
{
int iVar1;
uint uVar2;
long lVar3;
void *__s;
char *__src;
int8 uVar4;
lVar3 = *(long *)(param_1 + 0x38);
if (lVar3 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_0014ddf8;
LAB_001250fa:
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
uVar2 = *(uint *)(param_1 + 0x50);
if (uVar2 < 2) {
*(int4 *)(lVar3 + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0014de00,0x1ff);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Commands_out_of_sync__you_can_t_r_0014de00;
goto LAB_001250fa;
}
if ((*(ushort *)(lVar3 + 0x380) & 0x1008) == 0) {
return 0xffffffff;
}
if (uVar2 < 6 && uVar2 != 2) {
madb_reset_stmt(param_1);
lVar3 = *(long *)(param_1 + 0x38);
}
*(int4 *)(param_1 + 0x50) = 3;
iVar1 = mysql_next_result(lVar3);
if (iVar1 != 0) {
*(int4 *)(param_1 + 0x50) = 6;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
__src = (char *)(*(long *)(param_1 + 0x38) + 0x97);
goto LAB_001250fa;
}
lVar3 = *(long *)(param_1 + 0x38);
if (*(int *)(lVar3 + 0x488) == 1) {
*(int4 *)(lVar3 + 0x488) = 8;
lVar3 = *(long *)(param_1 + 0x38);
}
uVar2 = *(uint *)(lVar3 + 0x37c);
if (uVar2 == 0) {
*(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar3 + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(lVar3 + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar3 + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar3 + 0x388);
uVar4 = 0;
goto LAB_00125267;
}
uVar4 = *(int8 *)(param_1 + 0x340);
*(uint *)(param_1 + 0x60) = uVar2;
if (*(long *)(lVar3 + 0x2f8) == 0) {
__s = *(void **)(param_1 + 0x78);
LAB_00125250:
uVar4 = 0;
memset(__s,0,(ulong)uVar2 * 0x70);
*(int1 *)(param_1 + 0xe8) = 0;
}
else {
ma_free_root(uVar4,0);
lVar3 = ma_duplicate_resultset_metadata
(*(int8 *)(lVar3 + 0x2f8),*(int4 *)(lVar3 + 0x37c),uVar4);
*(long *)(param_1 + 0x58) = lVar3;
if (lVar3 != 0) {
__s = (void *)ma_alloc_root(uVar4);
*(void **)(param_1 + 0x78) = __s;
if (__s != (void *)0x0) {
uVar2 = *(uint *)(param_1 + 0x60);
goto LAB_00125250;
}
}
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_0014ddd0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar4 = 1;
}
LAB_00125267:
*(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c);
*(int8 *)(param_1 + 200) = 0;
return uVar4;
}
| |
49,031 | testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc | explicit PositiveAndNegativeUnitTestFilter(const std::string& filter) {
std::vector<std::string> positive_and_negative_filters;
// NOTE: `SplitString` always returns a non-empty container.
SplitString(filter, '-', &positive_and_negative_filters);
const auto& positive_filter = positive_and_negative_filters.front();
if (positive_and_negative_filters.size() > 1) {
positive_filter_ = UnitTestFilter(
positive_filter.empty() ? kUniversalFilter : positive_filter);
// TODO(b/214626361): Fail on multiple '-' characters
// For the moment to preserve old behavior we concatenate the rest of the
// string parts with `-` as separator to generate the negative filter.
auto negative_filter_string = positive_and_negative_filters[1];
for (std::size_t i = 2; i < positive_and_negative_filters.size(); i++)
negative_filter_string =
negative_filter_string + '-' + positive_and_negative_filters[i];
negative_filter_ = UnitTestFilter(negative_filter_string);
} else {
// In case we don't have a negative filter and positive filter is ""
// we do not use kUniversalFilter by design as opposed to when we have a
// negative filter.
positive_filter_ = UnitTestFilter(positive_filter);
}
} | O3 | cpp | testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
leaq 0x18(%rdi), %r14
leaq 0x48(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movl $0x1, %ecx
movq %rcx, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
movl $0x3f800000, %edx # imm = 0x3F800000
movl %edx, 0x38(%rdi)
leaq 0x68(%rdi), %r15
leaq 0x98(%rdi), %rsi
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movq %rax, 0x60(%rdi)
movq %rsi, 0x68(%rdi)
movq %rcx, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
movl %edx, 0x88(%rdi)
movups %xmm0, 0x90(%rdi)
leaq 0x30(%rsp), %rdx
movq %rax, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x3defa(%rip), %rdi # 0x596a8
movl $0x2d, %esi
callq 0x14885
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
subq %rsi, %rax
cmpq $0x21, %rax
jb 0x1b7fa
movq 0x8(%rsi), %rdx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
testq %rdx, %rdx
movq %r14, 0x28(%rsp)
movq %r15, 0x20(%rsp)
je 0x1b864
movq (%rsi), %rsi
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x391b4
jmp 0x1b87a
leaq 0x70(%rsp), %rdi
callq 0x1b436
movq 0x10(%rbx), %rax
leaq 0x88(%rsp), %r15
movaps -0x18(%r15), %xmm0
movq -0x8(%r15), %rcx
movq %rcx, 0x10(%rbx)
movups (%rbx), %xmm1
movups %xmm0, (%rbx)
movq %rsp, %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%r15)
movq $0x0, -0x8(%r15)
callq 0x31f9e
movq %r14, %rdi
movq %r15, %rsi
callq 0x8ada
movq %r15, %rdi
callq 0x36ada
leaq 0x70(%rsp), %rdi
callq 0x31f9e
jmp 0x1babe
leaq 0x255f9(%rip), %rsi # 0x40e64
leaq 0x255f3(%rip), %rdx # 0x40e65
movq %rsp, %rdi
callq 0x3911e
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x1b436
movq 0x10(%rbx), %rax
leaq 0x88(%rsp), %r12
movaps -0x18(%r12), %xmm0
movq -0x8(%r12), %rcx
movq %rcx, 0x10(%rbx)
movups (%rbx), %xmm1
movups %xmm0, (%rbx)
leaq 0x50(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%r12)
movq $0x0, -0x8(%r12)
callq 0x31f9e
movq %r14, %rdi
movq %r12, %rsi
callq 0x8ada
movq %r12, %rdi
callq 0x36ada
leaq 0x70(%rsp), %rdi
callq 0x31f9e
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1b8fe
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x30(%rsp), %rax
movq %rsp, %rdi
movq %r13, (%rdi)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
callq 0x391b4
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq $0x41, %rax
jb 0x1ba35
leaq 0x60(%rsp), %r15
movl $0x2, %r14d
movl $0x48, %r13d
leaq 0x80(%rsp), %rbp
leaq 0x50(%rsp), %r12
movq %r15, 0x50(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x391b4
movq 0x58(%rsp), %rsi
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
movl $0x2d, %r8d
callq 0x8a30
movq 0x30(%rsp), %rax
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %r12, %rdi
callq 0x8170
movq %rbp, 0x70(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b9ba
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x1b9c1
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x70(%rsp), %rsi
callq 0x8670
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1ba00
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ba17
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
incq %r14
sarq $0x5, %rax
addq $0x20, %r13
cmpq %rax, %r14
jb 0x1b94b
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x1b436
movq 0x60(%rbx), %rax
leaq 0x88(%rsp), %r14
movaps -0x18(%r14), %xmm0
movq -0x8(%r14), %rcx
movq %rcx, 0x60(%rbx)
movups 0x50(%rbx), %xmm1
movups %xmm0, 0x50(%rbx)
leaq 0x50(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%r14)
movq $0x0, -0x8(%r14)
callq 0x31f9e
movq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x8ada
leaq 0x10(%rsp), %rbx
movq %r14, %rdi
callq 0x36ada
leaq 0x70(%rsp), %rdi
callq 0x31f9e
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1babe
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x30(%rsp), %rdi
callq 0x31f9e
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1baf0
jmp 0x1bb0b
jmp 0x1bb06
jmp 0x1baf0
movq %rax, %r12
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x1bb3a
jmp 0x1bb47
movq %rax, %rdi
callq 0x321df
jmp 0x1bb06
jmp 0x1bafc
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rax, %r12
jmp 0x1bb47
movq %rax, %r12
jmp 0x1bb2c
jmp 0x1bb12
movq %rax, %r12
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1bb2c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x84e0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1bb47
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x50(%rbx), %r13
leaq 0x30(%rsp), %rdi
callq 0x31f9e
movq 0x20(%rsp), %rdi
callq 0x36ada
movq %r13, %rdi
callq 0x31f9e
movq 0x28(%rsp), %rdi
callq 0x36ada
movq %rbx, %rdi
callq 0x31f9e
movq %r12, %rdi
callq 0x8990
nop
| _ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor eax, eax
mov [rdi+10h], rax
lea r14, [rdi+18h]
lea rcx, [rdi+48h]
mov [rdi+18h], rcx
mov ecx, 1
mov [rdi+20h], rcx
movups xmmword ptr [rdi+28h], xmm0
mov edx, 3F800000h
mov [rdi+38h], edx
lea r15, [rdi+68h]
lea rsi, [rdi+98h]
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
mov [rdi+60h], rax
mov [rdi+68h], rsi
mov [rdi+70h], rcx
movups xmmword ptr [rdi+78h], xmm0
mov [rdi+88h], edx
movups xmmword ptr [rdi+90h], xmm0
lea rdx, [rsp+0F8h+var_C8]
mov [rdx+10h], rax
movaps xmmword ptr [rdx], xmm0
lea rdi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
mov esi, 2Dh ; '-'
call _ZN7testing8internal11SplitStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcPSt6vectorIS6_SaIS6_EE; testing::internal::SplitString(std::string const&,char,std::vector<std::string> *)
mov rsi, [rsp+0F8h+var_C8]
mov rax, [rsp+0F8h+var_C0]
sub rax, rsi
cmp rax, 21h ; '!'
jb short loc_1B7FA
mov rdx, [rsi+8]
lea r13, [rsp+0F8h+var_E8]
mov [r13-10h], r13
test rdx, rdx
mov [rsp+0F8h+var_D0], r14
mov [rsp+0F8h+var_D8], r15
jz short loc_1B864
mov rsi, [rsi]
add rdx, rsi
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp loc_1B87A
loc_1B7FA:
lea rdi, [rsp+0F8h+var_88]
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
mov rax, [rbx+10h]
lea r15, [rsp+0F8h+var_70]
movaps xmm0, xmmword ptr [r15-18h]
mov rcx, [r15-8]
mov [rbx+10h], rcx
movups xmm1, xmmword ptr [rbx]
movups xmmword ptr [rbx], xmm0
mov rdi, rsp; void *
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r15-18h], xmm0
mov qword ptr [r15-8], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE14_M_move_assignEOSI_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>&&,std::integral_constant<bool,true>)
mov rdi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp loc_1BABE
loc_1B864:
lea rsi, _ZN7testingL16kUniversalFilterE; "*"
lea rdx, _ZN7testingL16kUniversalFilterE+1; ""
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)
loc_1B87A:
lea rdi, [rsp+0F8h+var_88]
mov rsi, rsp
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
mov rax, [rbx+10h]
lea r12, [rsp+0F8h+var_70]
movaps xmm0, xmmword ptr [r12-18h]
mov rcx, [r12-8]
mov [rbx+10h], rcx
movups xmm1, xmmword ptr [rbx]
movups xmmword ptr [rbx], xmm0
lea rdi, [rsp+0F8h+var_A8]; void *
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r12-18h], xmm0
mov qword ptr [r12-8], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
mov rsi, r12
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE14_M_move_assignEOSI_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>&&,std::integral_constant<bool,true>)
mov rdi, r12
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_F8]; void *
cmp rdi, r13
jz short loc_1B8FE
mov rsi, [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1B8FE:
mov rax, [rsp+0F8h+var_C8]
mov rdi, rsp
mov [rdi], r13
mov rsi, [rax+20h]
mov rdx, [rax+28h]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0F8h+var_C0]
sub rax, [rsp+0F8h+var_C8]
cmp rax, 41h ; 'A'
jb loc_1BA35
lea r15, [rsp+0F8h+var_98]
mov r14d, 2
mov r13d, 48h ; 'H'
lea rbp, [rsp+0F8h+var_78]
lea r12, [rsp+0F8h+var_A8]
loc_1B94B:
mov [rsp+0F8h+var_A8], r15
mov rsi, [rsp+0F8h+var_F8]
mov rdx, [rsp+0F8h+var_F0]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rsi, [rsp+0F8h+var_A0]
mov ecx, 1
mov rdi, r12
xor edx, edx
mov r8d, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char)
mov rax, [rsp+0F8h+var_C8]
mov rsi, [rax+r13-8]
mov rdx, [rax+r13]
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov [rsp+0F8h+var_88], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_1B9BA
mov [rsp+0F8h+var_88], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_78], rdx
jmp short loc_1B9C1
loc_1B9BA:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_1B9C1:
mov rdx, [rax+8]
mov [rsp+0F8h+var_80], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rsp
lea rsi, [rsp+0F8h+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0F8h+var_88]; void *
cmp rdi, rbp
jz short loc_1BA00
mov rsi, [rsp+0F8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BA00:
mov rdi, [rsp+0F8h+var_A8]; void *
cmp rdi, r15
jz short loc_1BA17
mov rsi, [rsp+0F8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BA17:
mov rax, [rsp+0F8h+var_C0]
sub rax, [rsp+0F8h+var_C8]
inc r14
sar rax, 5
add r13, 20h ; ' '
cmp r14, rax
jb loc_1B94B
loc_1BA35:
lea rdi, [rsp+0F8h+var_88]
mov rsi, rsp
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
mov rax, [rbx+60h]
lea r14, [rsp+0F8h+var_70]
movaps xmm0, xmmword ptr [r14-18h]
mov rcx, [r14-8]
mov [rbx+60h], rcx
movups xmm1, xmmword ptr [rbx+50h]
movups xmmword ptr [rbx+50h], xmm0
lea rdi, [rsp+0F8h+var_A8]; void *
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r14-18h], xmm0
mov qword ptr [r14-8], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_D8]
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE14_M_move_assignEOSI_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>&&,std::integral_constant<bool,true>)
lea rbx, [rsp+0F8h+var_E8]
mov rdi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_F8]; void *
cmp rdi, rbx
jz short loc_1BABE
mov rsi, [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BABE:
lea rdi, [rsp+0F8h+var_C8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_1BAF0
jmp short loc_1BB0B
jmp short loc_1BB06
jmp short loc_1BAF0
mov r12, rax
mov rdi, [rsp+0F8h+var_F8]
cmp rdi, r13
jnz short loc_1BB3A
jmp short loc_1BB47
loc_1BAF0:
mov rdi, rax
call __clang_call_terminate
jmp short loc_1BB06
jmp short $+2
loc_1BAFC:
mov [rsp+0F8h+var_D8], r15
mov [rsp+0F8h+var_D0], r14
loc_1BB06:
mov r12, rax
jmp short loc_1BB47
loc_1BB0B:
mov r12, rax
jmp short loc_1BB2C
jmp short $+2
loc_1BB12:
mov r12, rax
mov rdi, [rsp+0F8h+var_A8]; void *
cmp rdi, r15
jz short loc_1BB2C
mov rsi, [rsp+0F8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BB2C:
mov rdi, [rsp+0F8h+var_F8]; void *
lea rax, [rsp+0F8h+var_E8]
cmp rdi, rax
jz short loc_1BB47
loc_1BB3A:
mov rsi, [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BB47:
lea r13, [rbx+50h]
lea rdi, [rsp+0F8h+var_C8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_D8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, r13; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_D0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, rbx; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r12
call __Unwind_Resume
| void testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(
__int128 *a1)
{
long long v1; // r14
long long v2; // rdx
long long v3; // rax
__int128 v4; // xmm0
__int128 v5; // xmm1
long long v6; // rax
__int128 v7; // xmm0
__int128 v8; // xmm1
unsigned long long v9; // r14
long long v10; // r13
long long v11; // rax
_OWORD *v12; // rcx
long long v13; // rax
__int128 v14; // xmm0
__int128 v15; // xmm1
__int128 v16; // [rsp+0h] [rbp-F8h] BYREF
_QWORD v17[2]; // [rsp+10h] [rbp-E8h] BYREF
long long v18; // [rsp+20h] [rbp-D8h]
long long v19; // [rsp+28h] [rbp-D0h]
__int128 v20; // [rsp+30h] [rbp-C8h] BYREF
long long v21; // [rsp+40h] [rbp-B8h]
__int128 v22; // [rsp+50h] [rbp-A8h] BYREF
_QWORD v23[2]; // [rsp+60h] [rbp-98h] BYREF
__int128 v24; // [rsp+70h] [rbp-88h] BYREF
_OWORD v25[7]; // [rsp+80h] [rbp-78h] BYREF
*a1 = 0LL;
*((_QWORD *)a1 + 2) = 0LL;
v1 = (long long)a1 + 24;
*((_QWORD *)a1 + 3) = (char *)a1 + 72;
*((_QWORD *)a1 + 4) = 1LL;
*(__int128 *)((char *)a1 + 40) = 0LL;
*((_DWORD *)a1 + 14) = 1065353216;
a1[4] = 0LL;
a1[5] = 0LL;
*((_QWORD *)a1 + 12) = 0LL;
*((_QWORD *)a1 + 13) = (char *)a1 + 152;
*((_QWORD *)a1 + 14) = 1LL;
*(__int128 *)((char *)a1 + 120) = 0LL;
*((_DWORD *)a1 + 34) = 1065353216;
a1[9] = 0LL;
v21 = 0LL;
v20 = 0LL;
testing::internal::SplitString((long long)&testing::FLAGS_gtest_filter[abi:cxx11], 45LL, (long long)&v20);
if ( *((_QWORD *)&v20 + 1) - (_QWORD)v20 < 0x21uLL )
{
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)&v24, v20);
v3 = *((_QWORD *)a1 + 2);
v4 = v24;
*((_QWORD *)a1 + 2) = *(_QWORD *)&v25[0];
v5 = *a1;
*a1 = v4;
v16 = v5;
v17[0] = v3;
v24 = 0LL;
*(_QWORD *)&v25[0] = 0LL;
std::vector<std::string>::~vector(&v16);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(
v1,
(long long *)v25 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)v25 + 8);
std::vector<std::string>::~vector(&v24);
}
else
{
v2 = *(_QWORD *)(v20 + 8);
*(_QWORD *)&v16 = v17;
v19 = (long long)a1 + 24;
v18 = (long long)a1 + 104;
if ( v2 )
std::string::_M_construct<char *>(&v16, *(_QWORD *)v20, *(_QWORD *)v20 + v2);
else
std::string::_M_construct<char const*>(&v16, "*", "");
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)&v24, (long long)&v16);
v6 = *((_QWORD *)a1 + 2);
v7 = v24;
*((_QWORD *)a1 + 2) = *(_QWORD *)&v25[0];
v8 = *a1;
*a1 = v7;
v22 = v8;
v23[0] = v6;
v24 = 0LL;
*(_QWORD *)&v25[0] = 0LL;
std::vector<std::string>::~vector(&v22);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(
v1,
(long long *)v25 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)v25 + 8);
std::vector<std::string>::~vector(&v24);
if ( (_QWORD *)v16 != v17 )
operator delete((void *)v16, v17[0] + 1LL);
*(_QWORD *)&v16 = v17;
std::string::_M_construct<char *>(&v16, *(_QWORD *)(v20 + 32), *(_QWORD *)(v20 + 32) + *(_QWORD *)(v20 + 40));
if ( *((_QWORD *)&v20 + 1) - (_QWORD)v20 >= 0x41uLL )
{
v9 = 2LL;
v10 = 72LL;
do
{
*(_QWORD *)&v22 = v23;
std::string::_M_construct<char *>(&v22, v16, v16 + *((_QWORD *)&v16 + 1));
std::string::_M_replace_aux(&v22, *((_QWORD *)&v22 + 1), 0LL, 1LL, 45LL);
v11 = std::string::_M_append(&v22, *(_QWORD *)(v20 + v10 - 8));
*(_QWORD *)&v24 = v25;
v12 = (_OWORD *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
v25[0] = *v12;
}
else
{
*(_QWORD *)&v24 = *(_QWORD *)v11;
*(_QWORD *)&v25[0] = *(_QWORD *)v12;
}
*((_QWORD *)&v24 + 1) = *(_QWORD *)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
std::string::operator=(&v16, &v24);
if ( (_OWORD *)v24 != v25 )
operator delete((void *)v24, *(_QWORD *)&v25[0] + 1LL);
if ( (_QWORD *)v22 != v23 )
operator delete((void *)v22, v23[0] + 1LL);
++v9;
v10 += 32LL;
}
while ( v9 < (long long)(*((_QWORD *)&v20 + 1) - v20) >> 5 );
}
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)&v24, (long long)&v16);
v13 = *((_QWORD *)a1 + 12);
v14 = v24;
*((_QWORD *)a1 + 12) = *(_QWORD *)&v25[0];
v15 = a1[5];
a1[5] = v14;
v22 = v15;
v23[0] = v13;
v24 = 0LL;
*(_QWORD *)&v25[0] = 0LL;
std::vector<std::string>::~vector(&v22);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(
v18,
(long long *)v25 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)v25 + 8);
std::vector<std::string>::~vector(&v24);
if ( (_QWORD *)v16 != v17 )
operator delete((void *)v16, v17[0] + 1LL);
}
std::vector<std::string>::~vector(&v20);
}
| PositiveAndNegativeUnitTestFilter:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
LEA R14,[RDI + 0x18]
LEA RCX,[RDI + 0x48]
MOV qword ptr [RDI + 0x18],RCX
MOV ECX,0x1
MOV qword ptr [RDI + 0x20],RCX
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV EDX,0x3f800000
MOV dword ptr [RDI + 0x38],EDX
LEA R15,[RDI + 0x68]
LEA RSI,[RDI + 0x98]
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOV qword ptr [RDI + 0x60],RAX
MOV qword ptr [RDI + 0x68],RSI
MOV qword ptr [RDI + 0x70],RCX
MOVUPS xmmword ptr [RDI + 0x78],XMM0
MOV dword ptr [RDI + 0x88],EDX
MOVUPS xmmword ptr [RDI + 0x90],XMM0
LEA RDX,[RSP + 0x30]
MOV qword ptr [RDX + 0x10],RAX
MOVAPS xmmword ptr [RDX],XMM0
LAB_0011b7a7:
LEA RDI,[0x1596a8]
MOV ESI,0x2d
CALL 0x00114885
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,RSI
CMP RAX,0x21
JC 0x0011b7fa
MOV RDX,qword ptr [RSI + 0x8]
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
TEST RDX,RDX
MOV qword ptr [RSP + 0x28],R14
MOV qword ptr [RSP + 0x20],R15
JZ 0x0011b864
MOV RSI,qword ptr [RSI]
ADD RDX,RSI
LAB_0011b7ed:
MOV RDI,RSP
CALL 0x001391b4
JMP 0x0011b87a
LAB_0011b7fa:
LEA RDI,[RSP + 0x70]
CALL 0x0011b436
MOV RAX,qword ptr [RBX + 0x10]
LEA R15,[RSP + 0x88]
MOVAPS XMM0,xmmword ptr [R15 + -0x18]
MOV RCX,qword ptr [R15 + -0x8]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM1,xmmword ptr [RBX]
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R15 + -0x18],XMM0
MOV qword ptr [R15 + -0x8],0x0
CALL 0x00131f9e
LAB_0011b842:
MOV RDI,R14
MOV RSI,R15
CALL 0x00108ada
MOV RDI,R15
CALL 0x00136ada
LEA RDI,[RSP + 0x70]
CALL 0x00131f9e
JMP 0x0011babe
LAB_0011b864:
LEA RSI,[0x140e64]
LEA RDX,[0x140e65]
MOV RDI,RSP
CALL 0x0013911e
LAB_0011b87a:
LEA RDI,[RSP + 0x70]
MOV RSI,RSP
CALL 0x0011b436
MOV RAX,qword ptr [RBX + 0x10]
LEA R12,[RSP + 0x88]
MOVAPS XMM0,xmmword ptr [R12 + -0x18]
MOV RCX,qword ptr [R12 + -0x8]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM1,xmmword ptr [RBX]
MOVUPS xmmword ptr [RBX],XMM0
LEA RDI,[RSP + 0x50]
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R12 + -0x18],XMM0
MOV qword ptr [R12 + -0x8],0x0
CALL 0x00131f9e
LAB_0011b8cb:
MOV RDI,R14
MOV RSI,R12
CALL 0x00108ada
MOV RDI,R12
CALL 0x00136ada
LEA RDI,[RSP + 0x70]
CALL 0x00131f9e
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x0011b8fe
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_0011b8fe:
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,RSP
MOV qword ptr [RDI],R13
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RAX + 0x28]
ADD RDX,RSI
LAB_0011b914:
CALL 0x001391b4
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr [RSP + 0x30]
CMP RAX,0x41
JC 0x0011ba35
LEA R15,[RSP + 0x60]
MOV R14D,0x2
MOV R13D,0x48
LEA RBP,[RSP + 0x80]
LEA R12,[RSP + 0x50]
LAB_0011b94b:
MOV qword ptr [RSP + 0x50],R15
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,RSI
LAB_0011b95c:
MOV RDI,R12
CALL 0x001391b4
MOV RSI,qword ptr [RSP + 0x58]
LAB_0011b969:
MOV ECX,0x1
MOV RDI,R12
XOR EDX,EDX
MOV R8D,0x2d
CALL 0x00108a30
MOV RAX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RAX + R13*0x1 + -0x8]
MOV RDX,qword ptr [RAX + R13*0x1]
LAB_0011b98c:
MOV RDI,R12
CALL 0x00108170
MOV qword ptr [RSP + 0x70],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0011b9ba
MOV qword ptr [RSP + 0x70],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x80],RDX
JMP 0x0011b9c1
LAB_0011b9ba:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_0011b9c1:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x78],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,RSP
LEA RSI,[RSP + 0x70]
CALL 0x00108670
MOV RDI,qword ptr [RSP + 0x70]
CMP RDI,RBP
JZ 0x0011ba00
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x001084e0
LAB_0011ba00:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R15
JZ 0x0011ba17
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001084e0
LAB_0011ba17:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr [RSP + 0x30]
INC R14
SAR RAX,0x5
ADD R13,0x20
CMP R14,RAX
JC 0x0011b94b
LAB_0011ba35:
LEA RDI,[RSP + 0x70]
MOV RSI,RSP
CALL 0x0011b436
MOV RAX,qword ptr [RBX + 0x60]
LEA R14,[RSP + 0x88]
MOVAPS XMM0,xmmword ptr [R14 + -0x18]
MOV RCX,qword ptr [R14 + -0x8]
MOV qword ptr [RBX + 0x60],RCX
MOVUPS XMM1,xmmword ptr [RBX + 0x50]
MOVUPS xmmword ptr [RBX + 0x50],XMM0
LEA RDI,[RSP + 0x50]
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x18],XMM0
MOV qword ptr [R14 + -0x8],0x0
CALL 0x00131f9e
LAB_0011ba84:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,R14
CALL 0x00108ada
LAB_0011ba91:
LEA RBX,[RSP + 0x10]
MOV RDI,R14
CALL 0x00136ada
LEA RDI,[RSP + 0x70]
CALL 0x00131f9e
MOV RDI,qword ptr [RSP]
CMP RDI,RBX
JZ 0x0011babe
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_0011babe:
LEA RDI,[RSP + 0x30]
CALL 0x00131f9e
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::(anonymous
namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::string
const&) */
void __thiscall
testing::internal::(anonymous_namespace)::PositiveAndNegativeUnitTestFilter::
PositiveAndNegativeUnitTestFilter(PositiveAndNegativeUnitTestFilter *this,string *param_1)
{
PositiveAndNegativeUnitTestFilter *pPVar1;
long *plVar2;
long *plVar3;
long lVar4;
ulong uVar5;
long *local_f8;
long lStack_f0;
long local_e8 [2];
PositiveAndNegativeUnitTestFilter *local_d8;
PositiveAndNegativeUnitTestFilter *local_d0;
string *local_c8;
long lStack_c0;
int8 local_b8;
long *local_a8;
ulong uStack_a0;
long local_98 [2];
long *local_88;
long lStack_80;
long local_78;
long alStack_70 [8];
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
pPVar1 = this + 0x18;
*(PositiveAndNegativeUnitTestFilter **)(this + 0x18) = this + 0x48;
*(int8 *)(this + 0x20) = 1;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int4 *)(this + 0x38) = 0x3f800000;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(PositiveAndNegativeUnitTestFilter **)(this + 0x68) = this + 0x98;
*(int8 *)(this + 0x70) = 1;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int4 *)(this + 0x88) = 0x3f800000;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
local_b8 = 0;
local_c8 = (string *)0x0;
lStack_c0 = 0;
/* try { // try from 0011b7a7 to 0011b7b7 has its CatchHandler @ 0011bafc */
SplitString((string *)&FLAGS_gtest_filter_abi_cxx11_,'-',(vector *)&local_c8);
if ((ulong)(lStack_c0 - (long)local_c8) < 0x21) {
/* try { // try from 0011b7fa to 0011b803 has its CatchHandler @ 0011bafa */
UnitTestFilter::UnitTestFilter((UnitTestFilter *)&local_88,local_c8);
local_e8[0] = *(long *)(this + 0x10);
*(long *)(this + 0x10) = local_78;
local_f8 = *(long **)this;
lStack_f0 = *(long *)(this + 8);
*(long **)this = local_88;
*(long *)(this + 8) = lStack_80;
local_88 = (long *)0x0;
lStack_80 = 0;
local_78 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_f8);
/* try { // try from 0011b842 to 0011b84c has its CatchHandler @ 0011baf0 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_move_assign(pPVar1,(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
}
else {
local_f8 = local_e8;
local_d8 = this + 0x68;
local_d0 = pPVar1;
if (*(long *)(local_c8 + 8) == 0) {
/* try { // try from 0011b864 to 0011b879 has its CatchHandler @ 0011baf8 */
std::__cxx11::string::_M_construct<char_const*>(&local_f8,&kUniversalFilter,0x140e65);
}
else {
/* try { // try from 0011b7ed to 0011b7f4 has its CatchHandler @ 0011baf8 */
std::__cxx11::string::_M_construct<char*>
(&local_f8,*(long *)local_c8,*(long *)(local_c8 + 8) + *(long *)local_c8);
}
/* try { // try from 0011b87a to 0011b886 has its CatchHandler @ 0011bae2 */
UnitTestFilter::UnitTestFilter((UnitTestFilter *)&local_88,(string *)&local_f8);
local_98[0] = *(long *)(this + 0x10);
*(long *)(this + 0x10) = local_78;
local_a8 = *(long **)this;
uStack_a0 = *(ulong *)(this + 8);
*(long **)this = local_88;
*(long *)(this + 8) = lStack_80;
local_88 = (long *)0x0;
lStack_80 = 0;
local_78 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_a8);
/* try { // try from 0011b8cb to 0011b8d5 has its CatchHandler @ 0011bae0 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_move_assign(pPVar1,(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
local_f8 = local_e8;
/* try { // try from 0011b914 to 0011b918 has its CatchHandler @ 0011bade */
std::__cxx11::string::_M_construct<char*>
(&local_f8,*(long *)(local_c8 + 0x20),
*(long *)(local_c8 + 0x28) + *(long *)(local_c8 + 0x20));
if (0x40 < (ulong)(lStack_c0 - (long)local_c8)) {
uVar5 = 2;
lVar4 = 0x48;
do {
local_a8 = local_98;
/* try { // try from 0011b95c to 0011b963 has its CatchHandler @ 0011bb0b */
std::__cxx11::string::_M_construct<char*>(&local_a8,local_f8,lStack_f0 + (long)local_f8);
/* try { // try from 0011b969 to 0011b97d has its CatchHandler @ 0011bb10 */
std::__cxx11::string::_M_replace_aux((ulong)&local_a8,uStack_a0,0,'\x01');
/* try { // try from 0011b98c to 0011b993 has its CatchHandler @ 0011bb12 */
plVar2 = (long *)std::__cxx11::string::_M_append
((char *)&local_a8,*(ulong *)(local_c8 + lVar4 + -8));
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_78 = *plVar3;
alStack_70[0] = plVar2[3];
local_88 = &local_78;
}
else {
local_78 = *plVar3;
local_88 = (long *)*plVar2;
}
lStack_80 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_f8,(string *)&local_88);
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
uVar5 = uVar5 + 1;
lVar4 = lVar4 + 0x20;
} while (uVar5 < (ulong)(lStack_c0 - (long)local_c8 >> 5));
}
/* try { // try from 0011ba35 to 0011ba41 has its CatchHandler @ 0011badc */
UnitTestFilter::UnitTestFilter((UnitTestFilter *)&local_88,(string *)&local_f8);
local_98[0] = *(long *)(this + 0x60);
*(long *)(this + 0x60) = local_78;
local_a8 = *(long **)(this + 0x50);
uStack_a0 = *(ulong *)(this + 0x58);
*(long **)(this + 0x50) = local_88;
*(long *)(this + 0x58) = lStack_80;
local_88 = (long *)0x0;
lStack_80 = 0;
local_78 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_a8);
/* try { // try from 0011ba84 to 0011ba90 has its CatchHandler @ 0011bada */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_move_assign(local_d8,(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8);
return;
}
| |
49,032 | stbi__gif_parse_colortable | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp)
{
int i;
for (i=0; i < num_entries; ++i) {
pal[i][2] = stbi__get8(s);
pal[i][1] = stbi__get8(s);
pal[i][0] = stbi__get8(s);
pal[i][3] = transp == i ? 0 : 255;
}
} | O1 | c | stbi__gif_parse_colortable:
testl %edx, %edx
jle 0x16c56
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl %ecx, %r15d
movl %edx, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x15736
movb %al, 0x2(%rbx,%r13,4)
movq %r14, %rdi
callq 0x15736
movb %al, 0x1(%rbx,%r13,4)
movq %r14, %rdi
callq 0x15736
movb %al, (%rbx,%r13,4)
cmpq %r13, %r15
setne %al
negb %al
movb %al, 0x3(%rbx,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x16c12
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| stbi__gif_parse_colortable:
test edx, edx
jle short locret_16C56
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
mov r15d, ecx
mov r12d, edx
xor r13d, r13d
loc_16C12:
mov rdi, r14
call stbi__get8
mov [rbx+r13*4+2], al
mov rdi, r14
call stbi__get8
mov [rbx+r13*4+1], al
mov rdi, r14
call stbi__get8
mov [rbx+r13*4], al
cmp r15, r13
setnz al
neg al
mov [rbx+r13*4+3], al
inc r13
cmp r12, r13
jnz short loc_16C12
pop rbx
pop r12
pop r13
pop r14
pop r15
locret_16C56:
retn
| void stbi__gif_parse_colortable(long long a1, long long a2, int a3, unsigned int a4)
{
long long v4; // r15
long long v5; // r12
long long i; // r13
if ( a3 > 0 )
{
v4 = a4;
v5 = (unsigned int)a3;
for ( i = 0LL; i != v5; ++i )
{
*(_BYTE *)(a2 + 4 * i + 2) = stbi__get8(a1);
*(_BYTE *)(a2 + 4 * i + 1) = stbi__get8(a1);
*(_BYTE *)(a2 + 4 * i) = stbi__get8(a1);
*(_BYTE *)(a2 + 4 * i + 3) = -(v4 != i);
}
}
}
| stbi__gif_parse_colortable:
TEST EDX,EDX
JLE 0x00116c56
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV R15D,ECX
MOV R12D,EDX
XOR R13D,R13D
LAB_00116c12:
MOV RDI,R14
CALL 0x00115736
MOV byte ptr [RBX + R13*0x4 + 0x2],AL
MOV RDI,R14
CALL 0x00115736
MOV byte ptr [RBX + R13*0x4 + 0x1],AL
MOV RDI,R14
CALL 0x00115736
MOV byte ptr [RBX + R13*0x4],AL
CMP R15,R13
SETNZ AL
NEG AL
MOV byte ptr [RBX + R13*0x4 + 0x3],AL
INC R13
CMP R12,R13
JNZ 0x00116c12
POP RBX
POP R12
POP R13
POP R14
POP R15
LAB_00116c56:
RET
|
void stbi__gif_parse_colortable(int8 param_1,long param_2,uint param_3,uint param_4)
{
int1 uVar1;
ulong uVar2;
if (0 < (int)param_3) {
uVar2 = 0;
do {
uVar1 = stbi__get8(param_1);
*(int1 *)(param_2 + 2 + uVar2 * 4) = uVar1;
uVar1 = stbi__get8(param_1);
*(int1 *)(param_2 + 1 + uVar2 * 4) = uVar1;
uVar1 = stbi__get8(param_1);
*(int1 *)(param_2 + uVar2 * 4) = uVar1;
*(char *)(param_2 + 3 + uVar2 * 4) = -(param_4 != uVar2);
uVar2 = uVar2 + 1;
} while (param_3 != uVar2);
}
return;
}
| |
49,033 | stbi__gif_parse_colortable | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp)
{
int i;
for (i=0; i < num_entries; ++i) {
pal[i][2] = stbi__get8(s);
pal[i][1] = stbi__get8(s);
pal[i][0] = stbi__get8(s);
pal[i][3] = transp == i ? 0 : 255;
}
} | O2 | c | stbi__gif_parse_colortable:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %ecx, %r12d
xorl %r13d, %r13d
testl %edx, %edx
cmovlel %r13d, %ebx
cmpq %r13, %rbx
je 0x1330a
movq %r15, %rdi
callq 0x1202a
movb %al, 0x2(%r14,%r13,4)
movq %r15, %rdi
callq 0x1202a
movb %al, 0x1(%r14,%r13,4)
movq %r15, %rdi
callq 0x1202a
movb %al, (%r14,%r13,4)
cmpq %r13, %r12
setne %al
negb %al
movb %al, 0x3(%r14,%r13,4)
incq %r13
jmp 0x132cd
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| stbi__gif_parse_colortable:
push r15
push r14
push r13
push r12
push rbx
mov ebx, edx
mov r14, rsi
mov r15, rdi
mov r12d, ecx
xor r13d, r13d
test edx, edx
cmovle ebx, r13d
loc_132CD:
cmp rbx, r13
jz short loc_1330A
mov rdi, r15
call stbi__get8
mov [r14+r13*4+2], al
mov rdi, r15
call stbi__get8
mov [r14+r13*4+1], al
mov rdi, r15
call stbi__get8
mov [r14+r13*4], al
cmp r12, r13
setnz al
neg al
mov [r14+r13*4+3], al
inc r13
jmp short loc_132CD
loc_1330A:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| void stbi__gif_parse_colortable(long long a1, long long a2, int a3, unsigned int a4)
{
long long v4; // rbx
long long v5; // r12
long long v6; // r13
v4 = (unsigned int)a3;
v5 = a4;
v6 = 0LL;
if ( a3 <= 0 )
v4 = 0LL;
while ( v4 != v6 )
{
*(_BYTE *)(a2 + 4 * v6 + 2) = stbi__get8(a1);
*(_BYTE *)(a2 + 4 * v6 + 1) = stbi__get8(a1);
*(_BYTE *)(a2 + 4 * v6) = stbi__get8(a1);
*(_BYTE *)(a2 + 4 * v6 + 3) = -(v5 != v6);
++v6;
}
}
| stbi__gif_parse_colortable:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV EBX,EDX
MOV R14,RSI
MOV R15,RDI
MOV R12D,ECX
XOR R13D,R13D
TEST EDX,EDX
CMOVLE EBX,R13D
LAB_001132cd:
CMP RBX,R13
JZ 0x0011330a
MOV RDI,R15
CALL 0x0011202a
MOV byte ptr [R14 + R13*0x4 + 0x2],AL
MOV RDI,R15
CALL 0x0011202a
MOV byte ptr [R14 + R13*0x4 + 0x1],AL
MOV RDI,R15
CALL 0x0011202a
MOV byte ptr [R14 + R13*0x4],AL
CMP R12,R13
SETNZ AL
NEG AL
MOV byte ptr [R14 + R13*0x4 + 0x3],AL
INC R13
JMP 0x001132cd
LAB_0011330a:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void stbi__gif_parse_colortable(int8 param_1,long param_2,uint param_3,uint param_4)
{
int1 uVar1;
ulong uVar2;
ulong uVar3;
uVar3 = 0;
uVar2 = (ulong)param_3;
if ((int)param_3 < 1) {
uVar2 = uVar3;
}
for (; uVar2 != uVar3; uVar3 = uVar3 + 1) {
uVar1 = stbi__get8(param_1);
*(int1 *)(param_2 + 2 + uVar3 * 4) = uVar1;
uVar1 = stbi__get8(param_1);
*(int1 *)(param_2 + 1 + uVar3 * 4) = uVar1;
uVar1 = stbi__get8(param_1);
*(int1 *)(param_2 + uVar3 * 4) = uVar1;
*(char *)(param_2 + 3 + uVar3 * 4) = -(param_4 != uVar3);
}
return;
}
| |
49,034 | bf_add_si | bluesky950520[P]quickjs/libbf.c | int bf_add_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec,
bf_flags_t flags)
{
bf_t b;
int ret;
bf_init(r->ctx, &b);
ret = bf_set_si(&b, b1);
ret |= bf_add(r, a, &b, prec, flags);
bf_delete(&b);
return ret;
} | O1 | c | bf_add_si:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rax
movq %rsp, %r13
movq %rax, (%r13)
movl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movq %r13, %rdi
movq %rdx, %rsi
callq 0x88c39
movl %eax, %ebx
leaq 0xc1e(%rip), %r9 # 0x8bc30
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x8bb96
movl %eax, %ebp
movq (%r13), %rax
testq %rax, %rax
je 0x8b043
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x8b043
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
orl %ebx, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_add_si:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rsi
mov r12, rdi
mov rax, [rdi]
mov r13, rsp
mov [r13+0], rax
mov dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov rdi, r13
mov rsi, rdx
call bf_set_si
mov ebx, eax
lea r9, __bf_add
mov rdi, r12
mov rsi, r15
mov rdx, r13
mov rcx, r14
mov r8d, ebp
call bf_op2
mov ebp, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8B043
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_8B043
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8B043:
or ebp, ebx
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_add_si(long long *a1, long long a2, signed long long a3, long long a4, unsigned int a5)
{
int v7; // ebx
unsigned int v8; // ebp
long long v10; // [rsp+0h] [rbp-58h] BYREF
int v11; // [rsp+8h] [rbp-50h]
unsigned long long v12; // [rsp+10h] [rbp-48h]
__int128 v13; // [rsp+18h] [rbp-40h]
v10 = *a1;
v11 = 0;
v12 = 0x8000000000000000LL;
v13 = 0LL;
v7 = bf_set_si((long long)&v10, a3);
v8 = bf_op2(a1, a2, &v10, a4, a5, _bf_add);
if ( v10 && *((_QWORD *)&v13 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v10 + 8))(*(_QWORD *)v10, *((_QWORD *)&v13 + 1), 0LL);
return v7 | v8;
}
| bf_add_si:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R14,RCX
MOV R15,RSI
MOV R12,RDI
MOV RAX,qword ptr [RDI]
MOV R13,RSP
MOV qword ptr [R13],RAX
MOV dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV RDI,R13
MOV RSI,RDX
CALL 0x00188c39
MOV EBX,EAX
LEA R9,[0x18bc30]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
MOV RCX,R14
MOV R8D,EBP
CALL 0x0018bb96
MOV EBP,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0018b043
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x0018b043
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018b043:
OR EBP,EBX
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint bf_add_si(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5)
{
uint uVar1;
uint uVar2;
int8 *local_58;
int4 local_50;
int8 local_48;
int8 local_40;
long lStack_38;
local_58 = (int8 *)*param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
uVar1 = bf_set_si(&local_58,param_3);
uVar2 = bf_op2(param_1,param_2,&local_58,param_4,param_5,__bf_add);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
return uVar2 | uVar1;
}
| |
49,035 | bf_add_si | bluesky950520[P]quickjs/libbf.c | int bf_add_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec,
bf_flags_t flags)
{
bf_t b;
int ret;
bf_init(r->ctx, &b);
ret = bf_set_si(&b, b1);
ret |= bf_add(r, a, &b, prec, flags);
bf_delete(&b);
return ret;
} | O2 | c | bf_add_si:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rax
movq %rsp, %r13
movq %rax, (%r13)
andl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movq %r13, %rdi
movq %rdx, %rsi
callq 0x7319c
movl %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x757f9
movl %eax, %ebx
orl %ebp, %ebx
movq %r13, %rdi
callq 0x7500e
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_add_si:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r8d
mov r14, rcx
mov r15, rsi
mov r12, rdi
mov rax, [rdi]
mov r13, rsp
mov [r13+0], rax
and dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov rdi, r13
mov rsi, rdx
call bf_set_si
mov ebp, eax
mov rdi, r12
mov rsi, r15
mov rdx, r13
mov rcx, r14
mov r8d, ebx
call bf_add
mov ebx, eax
or ebx, ebp
mov rdi, r13
call bf_delete_0
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_add_si(long long *a1, long long a2, signed long long a3, long long a4, unsigned int a5)
{
int v7; // ebp
unsigned int v8; // ebx
long long v10; // [rsp+0h] [rbp-58h] BYREF
int v11; // [rsp+8h] [rbp-50h]
unsigned long long v12; // [rsp+10h] [rbp-48h]
__int128 v13; // [rsp+18h] [rbp-40h]
v10 = *a1;
v11 = 0;
v12 = 0x8000000000000000LL;
v13 = 0LL;
v7 = bf_set_si((long long)&v10, a3);
v8 = v7 | bf_add(a1, a2, &v10, a4, a5);
bf_delete_0(&v10);
return v8;
}
| bf_add_si:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R8D
MOV R14,RCX
MOV R15,RSI
MOV R12,RDI
MOV RAX,qword ptr [RDI]
MOV R13,RSP
MOV qword ptr [R13],RAX
AND dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV RDI,R13
MOV RSI,RDX
CALL 0x0017319c
MOV EBP,EAX
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
MOV RCX,R14
MOV R8D,EBX
CALL 0x001757f9
MOV EBX,EAX
OR EBX,EBP
MOV RDI,R13
CALL 0x0017500e
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint bf_add_si(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5)
{
uint uVar1;
uint uVar2;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
local_58 = *param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
uVar1 = bf_set_si(&local_58,param_3);
uVar2 = bf_add(param_1,param_2,&local_58,param_4,param_5);
bf_delete(&local_58);
return uVar2 | uVar1;
}
| |
49,036 | test_path_parsing | eloqsql/unittest/json_lib/json_lib-t.c | static void
test_path_parsing()
{
json_path_t p;
if (json_path_setup(&p, ci, s_e(p0)))
return;
ok(p.last_step - p.steps == 4 &&
p.steps[0].type == JSON_PATH_ARRAY_WILD &&
p.steps[1].type == JSON_PATH_KEY &&
p.steps[2].type == JSON_PATH_ARRAY && p.steps[2].n_item == 12 &&
p.steps[3].type == JSON_PATH_KEY_WILD &&
p.steps[4].type == JSON_PATH_ARRAY_WILD,
"path");
} | O0 | c | test_path_parsing:
pushq %rbp
movq %rsp, %rbp
subq $0x460, %rsp # imm = 0x460
movq 0x365206(%rip), %rax # 0x38ab98
movq %rax, -0x450(%rbp)
movq 0x1ac690(%rip), %rax # 0x1d2030
movq %rax, -0x448(%rbp)
movq 0x1ac682(%rip), %rax # 0x1d2030
movq %rax, -0x458(%rbp)
movq 0x1ac674(%rip), %rdi # 0x1d2030
callq 0x25120
movq -0x458(%rbp), %rcx
movq -0x450(%rbp), %rsi
movq -0x448(%rbp), %rdx
addq %rax, %rcx
leaq -0x440(%rbp), %rdi
callq 0x32250
cmpl $0x0, %eax
je 0x259ef
jmp 0x25a91
movq -0x10(%rbp), %rcx
leaq -0x440(%rbp), %rax
addq $0x30, %rax
subq %rax, %rcx
sarq $0x5, %rcx
xorl %eax, %eax
cmpq $0x4, %rcx
movb %al, -0x459(%rbp)
jne 0x25a78
xorl %eax, %eax
cmpl $0x6, -0x410(%rbp)
movb %al, -0x459(%rbp)
jne 0x25a78
xorl %eax, %eax
cmpl $0x1, -0x3f0(%rbp)
movb %al, -0x459(%rbp)
jne 0x25a78
xorl %eax, %eax
cmpl $0x2, -0x3d0(%rbp)
movb %al, -0x459(%rbp)
jne 0x25a78
xorl %eax, %eax
cmpl $0xc, -0x3b8(%rbp)
movb %al, -0x459(%rbp)
jne 0x25a78
xorl %eax, %eax
cmpl $0x5, -0x3b0(%rbp)
movb %al, -0x459(%rbp)
jne 0x25a78
cmpl $0x6, -0x390(%rbp)
sete %al
movb %al, -0x459(%rbp)
movb -0x459(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x5762b(%rip), %rsi # 0x7d0b5
movb $0x0, %al
callq 0x26010
addq $0x460, %rsp # imm = 0x460
popq %rbp
retq
nopw (%rax,%rax)
| test_path_parsing:
push rbp
mov rbp, rsp
sub rsp, 460h
mov rax, cs:ci
mov [rbp+var_450], rax
mov rax, cs:p0
mov [rbp+var_448], rax
mov rax, cs:p0
mov [rbp+var_458], rax
mov rdi, cs:p0
call _strlen
mov rcx, [rbp+var_458]
mov rsi, [rbp+var_450]
mov rdx, [rbp+var_448]
add rcx, rax
lea rdi, [rbp+var_440]
call json_path_setup
cmp eax, 0
jz short loc_259EF
jmp loc_25A91
loc_259EF:
mov rcx, [rbp+var_10]
lea rax, [rbp+var_440]
add rax, 30h ; '0'
sub rcx, rax
sar rcx, 5
xor eax, eax
cmp rcx, 4
mov [rbp+var_459], al
jnz short loc_25A78
xor eax, eax
cmp [rbp+var_410], 6
mov [rbp+var_459], al
jnz short loc_25A78
xor eax, eax
cmp [rbp+var_3F0], 1
mov [rbp+var_459], al
jnz short loc_25A78
xor eax, eax
cmp [rbp+var_3D0], 2
mov [rbp+var_459], al
jnz short loc_25A78
xor eax, eax
cmp [rbp+var_3B8], 0Ch
mov [rbp+var_459], al
jnz short loc_25A78
xor eax, eax
cmp [rbp+var_3B0], 5
mov [rbp+var_459], al
jnz short loc_25A78
cmp [rbp+var_390], 6
setz al
mov [rbp+var_459], al
loc_25A78:
mov al, [rbp+var_459]
and al, 1
movzx edi, al
lea rsi, aPath; "path"
mov al, 0
call ok
loc_25A91:
add rsp, 460h
pop rbp
retn
| long long test_path_parsing()
{
long long v0; // rax
long long result; // rax
int v2; // edx
int v3; // r8d
int v4; // r9d
long long v5; // rcx
bool v6; // [rsp+7h] [rbp-459h]
char *v7; // [rsp+8h] [rbp-458h]
long long v8; // [rsp+10h] [rbp-450h]
char *v9; // [rsp+18h] [rbp-448h]
_BYTE v10[48]; // [rsp+20h] [rbp-440h] BYREF
_DWORD v11[256]; // [rsp+50h] [rbp-410h] BYREF
long long v12; // [rsp+450h] [rbp-10h]
v8 = ci;
v9 = p0[0];
v7 = p0[0];
v0 = strlen(p0[0]);
result = json_path_setup(v10, v8, v9, &v7[v0]);
if ( !(_DWORD)result )
{
v5 = (v12 - (long long)v11) >> 5;
v6 = 0;
if ( v5 == 4 )
{
v6 = 0;
if ( v11[0] == 6 )
{
v6 = 0;
if ( v11[8] == 1 )
{
v6 = 0;
if ( v11[16] == 2 )
{
v6 = 0;
if ( v11[22] == 12 )
{
v6 = 0;
if ( v11[24] == 5 )
v6 = v11[32] == 6;
}
}
}
}
}
return ok(v6, (unsigned int)"path", v2, v5, v3, v4);
}
return result;
}
| test_path_parsing:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x460
MOV RAX,qword ptr [0x0048ab98]
MOV qword ptr [RBP + -0x450],RAX
MOV RAX,qword ptr [0x002d2030]
MOV qword ptr [RBP + -0x448],RAX
MOV RAX,qword ptr [0x002d2030]
MOV qword ptr [RBP + -0x458],RAX
MOV RDI,qword ptr [0x002d2030]
CALL 0x00125120
MOV RCX,qword ptr [RBP + -0x458]
MOV RSI,qword ptr [RBP + -0x450]
MOV RDX,qword ptr [RBP + -0x448]
ADD RCX,RAX
LEA RDI,[RBP + -0x440]
CALL 0x00132250
CMP EAX,0x0
JZ 0x001259ef
JMP 0x00125a91
LAB_001259ef:
MOV RCX,qword ptr [RBP + -0x10]
LEA RAX,[RBP + -0x440]
ADD RAX,0x30
SUB RCX,RAX
SAR RCX,0x5
XOR EAX,EAX
CMP RCX,0x4
MOV byte ptr [RBP + -0x459],AL
JNZ 0x00125a78
XOR EAX,EAX
CMP dword ptr [RBP + -0x410],0x6
MOV byte ptr [RBP + -0x459],AL
JNZ 0x00125a78
XOR EAX,EAX
CMP dword ptr [RBP + -0x3f0],0x1
MOV byte ptr [RBP + -0x459],AL
JNZ 0x00125a78
XOR EAX,EAX
CMP dword ptr [RBP + -0x3d0],0x2
MOV byte ptr [RBP + -0x459],AL
JNZ 0x00125a78
XOR EAX,EAX
CMP dword ptr [RBP + -0x3b8],0xc
MOV byte ptr [RBP + -0x459],AL
JNZ 0x00125a78
XOR EAX,EAX
CMP dword ptr [RBP + -0x3b0],0x5
MOV byte ptr [RBP + -0x459],AL
JNZ 0x00125a78
CMP dword ptr [RBP + -0x390],0x6
SETZ AL
MOV byte ptr [RBP + -0x459],AL
LAB_00125a78:
MOV AL,byte ptr [RBP + -0x459]
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x17d0b5]
MOV AL,0x0
CALL 0x00126010
LAB_00125a91:
ADD RSP,0x460
POP RBP
RET
|
void test_path_parsing(void)
{
int *puVar1;
int8 uVar2;
int iVar3;
size_t sVar4;
bool local_461;
int1 local_448 [48];
int local_418 [8];
int local_3f8;
int local_3d8;
int local_3c0;
int local_3b8;
int local_398;
long local_18;
uVar2 = ci;
puVar1 = p0;
sVar4 = strlen(p0);
iVar3 = json_path_setup(local_448,uVar2,puVar1,puVar1 + sVar4);
if (iVar3 == 0) {
local_461 = false;
if ((((local_18 - (long)local_418 >> 5 == 4) && (local_461 = false, local_418[0] == 6)) &&
(local_461 = false, local_3f8 == 1)) &&
(((local_461 = false, local_3d8 == 2 && (local_461 = false, local_3c0 == 0xc)) &&
(local_461 = false, local_3b8 == 5)))) {
local_461 = local_398 == 6;
}
ok(local_461,&DAT_0017d0b5);
}
return;
}
| |
49,037 | my_snprintf_8bit | eloqsql/strings/ctype-simple.c | size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n __attribute__((unused)),
const char* fmt, ...)
{
va_list args;
size_t result;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
} | O3 | c | my_snprintf_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rsi, %rdi
leaq -0xd0(%rbp), %rsi
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xbdbc5
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), %rax
movq %rsi, 0x10(%rax)
leaq 0x10(%rbp), %rsi
movq %rsi, 0x8(%rax)
movabsq $0x3000000020, %rsi # imm = 0x3000000020
movq %rsi, (%rax)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xdf879
addq $0xd0, %rsp
popq %rbp
retq
| my_snprintf_8bit:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rdi, rsi
lea rsi, [rbp+var_D0]
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_BDBC5
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_BDBC5:
lea rax, [rbp+var_20]
mov [rax+10h], rsi
lea rsi, [rbp+arg_0]
mov [rax+8], rsi
mov rsi, 3000000020h
mov [rax], rsi
mov rsi, rdx
mov rdx, rcx
mov rcx, rax
call my_vsnprintf
add rsp, 0D0h
pop rbp
retn
| long long my_snprintf_8bit(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
char a15)
{
char v16; // [rsp+0h] [rbp-D0h] BYREF
long long v17; // [rsp+20h] [rbp-B0h]
long long v18; // [rsp+28h] [rbp-A8h]
__m128 v19; // [rsp+30h] [rbp-A0h]
__m128 v20; // [rsp+40h] [rbp-90h]
__m128 v21; // [rsp+50h] [rbp-80h]
__m128 v22; // [rsp+60h] [rbp-70h]
__m128 v23; // [rsp+70h] [rbp-60h]
__m128 v24; // [rsp+80h] [rbp-50h]
__m128 v25; // [rsp+90h] [rbp-40h]
__m128 v26; // [rsp+A0h] [rbp-30h]
long long v27; // [rsp+B0h] [rbp-20h]
char *v28; // [rsp+B8h] [rbp-18h]
char *v29; // [rsp+C0h] [rbp-10h]
v19 = a1;
v20 = a2;
v21 = a3;
v22 = a4;
v23 = a5;
v24 = a6;
v25 = a7;
v26 = a8;
v17 = a13;
v18 = a14;
v29 = &v16;
v28 = &a15;
v27 = 0x3000000020LL;
return my_vsnprintf(a10, a11, a12);
}
| my_snprintf_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RDI,RSI
LEA RSI,[RBP + -0xd0]
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x001bdbc5
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_001bdbc5:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RAX + 0x10],RSI
LEA RSI,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RSI
MOV RSI,0x3000000020
MOV qword ptr [RAX],RSI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,RAX
CALL 0x001df879
ADD RSP,0xd0
POP RBP
RET
|
void my_snprintf_8bit(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 [32];
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 = 0x3000000020;
local_b8 = param_13;
local_b0 = param_14;
my_vsnprintf(param_10,param_11,param_12,&local_28);
return;
}
| |
49,038 | inline_mysql_file_sync | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_sync(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File fd, myf flags)
{
int result= 0;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_sync(fd, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_sync(fd, flags);
return result;
} | O0 | c | inline_mysql_file_sync:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x212ac1(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x10, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb5605
leaq 0x212a7e(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xfd790
movl %eax, -0x24(%rbp)
leaq 0x212a4f(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb561a
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xfd790
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_sync_6:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 10h
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_B5605
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_30]
xor ecx, ecx
mov esi, ecx
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_B561A
loc_B5605:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_B561A:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_sync_6(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v7 = 0;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL);
if ( v6 )
{
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10);
v7 = my_sync(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL);
}
else
{
return (unsigned int)my_sync(v9, v8);
}
return v7;
}
| inline_mysql_file_sync:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x10
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001b5605
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001fd790
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x30]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b561a
LAB_001b5605:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001fd790
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001b561a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_2c = 0;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10);
if (local_38 == 0) {
local_c = my_sync(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c);
local_2c = my_sync(local_20,local_28);
(**(code **)(PSI_server + 0x218))(local_38,0);
local_c = local_2c;
}
return local_c;
}
| |
49,039 | inline_mysql_file_sync | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_sync(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File fd, myf flags)
{
int result= 0;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_sync(fd, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_sync(fd, flags);
return result;
} | O3 | c | inline_mysql_file_sync:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r12d
leaq 0x353b5e(%rip), %r13 # 0x38d070
movq (%r13), %rax
leaq -0x70(%rbp), %rdi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x39548
movl %r14d, %edi
movq %rbx, %rsi
callq 0xa75a4
movl %eax, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r13), %rax
leaq 0xa5cf7(%rip), %rdx # 0xdf24d
movq %r15, %rdi
xorl %esi, %esi
movl %r12d, %ecx
callq *0x210(%rax)
movl %r14d, %edi
movq %rbx, %rsi
callq 0xa75a4
movl %eax, %ebx
movq (%r13), %rax
movq %r15, %rdi
xorl %esi, %esi
callq *0x218(%rax)
jmp 0x39537
| inline_mysql_file_sync:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r14d, esi
mov r12d, edi
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_70]
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz short loc_39548
mov edi, r14d
mov rsi, rbx
call my_sync
mov ebx, eax
loc_39537:
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_39548:
mov r15, rax
mov rax, [r13+0]
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
xor esi, esi
mov ecx, r12d
call qword ptr [rax+210h]
mov edi, r14d
mov rsi, rbx
call my_sync
mov ebx, eax
mov rax, [r13+0]
mov rdi, r15
xor esi, esi
call qword ptr [rax+218h]
jmp short loc_39537
| long long inline_mysql_file_sync(unsigned int a1, long long a2, long long a3)
{
long long v4; // rax
unsigned int v5; // ebx
long long v7; // r15
_BYTE v8[112]; // [rsp+0h] [rbp-70h] BYREF
v4 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v8, a2, 16LL);
if ( v4 )
{
v7 = v4;
((void ( *)(long long, _QWORD, const char *, _QWORD))PSI_server[66])(
v4,
0LL,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c",
a1);
v5 = my_sync((unsigned int)a2, a3);
((void ( *)(long long, _QWORD))PSI_server[67])(v7, 0LL);
}
else
{
return (unsigned int)my_sync((unsigned int)a2, a3);
}
return v5;
}
| inline_mysql_file_sync:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R14D,ESI
MOV R12D,EDI
LEA R13,[0x48d070]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x70]
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00139548
MOV EDI,R14D
MOV RSI,RBX
CALL 0x001a75a4
MOV EBX,EAX
LAB_00139537:
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00139548:
MOV R15,RAX
MOV RAX,qword ptr [R13]
LEA RDX,[0x1df24d]
MOV RDI,R15
XOR ESI,ESI
MOV ECX,R12D
CALL qword ptr [RAX + 0x210]
MOV EDI,R14D
MOV RSI,RBX
CALL 0x001a75a4
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,R15
XOR ESI,ESI
CALL qword ptr [RAX + 0x218]
JMP 0x00139537
|
int4 inline_mysql_file_sync(int4 param_1,ulong param_2,int8 param_3)
{
int4 uVar1;
long lVar2;
int1 local_78 [72];
lVar2 = (**(code **)(PSI_server + 0x158))(local_78,param_2,0x10);
if (lVar2 == 0) {
uVar1 = my_sync(param_2 & 0xffffffff,param_3);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar2,0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c",param_1);
uVar1 = my_sync(param_2 & 0xffffffff,param_3);
(**(code **)(PSI_server + 0x218))(lVar2,0);
}
return uVar1;
}
| |
49,040 | find_collation_data_inheritance_source | eloqsql/mysys/charset.c | static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs, myf flags)
{
const char *beg, *end;
if (cs->tailoring &&
!strncmp(cs->tailoring, "[import ", 8) &&
(end= strchr(cs->tailoring + 8, ']')) &&
(beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end)
{
char name[MY_CS_NAME_SIZE + 1];
memcpy(name, beg, end - beg);
name[end - beg]= '\0';
return inheritance_source_by_id(cs, get_collation_number(name,MYF(flags)));
}
return NULL;
} | O0 | c | find_collation_data_inheritance_source:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x6f256
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
leaq 0x6e20b(%rip), %rsi # 0xdd3c6
movl $0x8, %edx
callq 0x28190
cmpl $0x0, %eax
jne 0x6f256
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x8, %rdi
movl $0x5d, %esi
callq 0x28120
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x6f256
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
addq $0x20, %rax
cmpq -0x58(%rbp), %rax
jbe 0x6f256
leaq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rax
subq %rax, %rdx
callq 0x282b0
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movb $0x0, -0x30(%rbp,%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x6cf90
movq -0x60(%rbp), %rdi
movl %eax, %esi
callq 0x6f3d0
movq %rax, -0x38(%rbp)
jmp 0x6f25e
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6f282
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
callq 0x283c0
nopw (%rax,%rax)
| find_collation_data_inheritance_source:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov rax, [rbp+var_40]
cmp qword ptr [rax+38h], 0
jz loc_6F256
mov rax, [rbp+var_40]
mov rdi, [rax+38h]
lea rsi, aImport; "[import "
mov edx, 8
call _strncmp
cmp eax, 0
jnz loc_6F256
mov rax, [rbp+var_40]
mov rdi, [rax+38h]
add rdi, 8
mov esi, 5Dh ; ']'
call _strchr
mov [rbp+var_58], rax
cmp rax, 0
jz short loc_6F256
mov rax, [rbp+var_40]
mov rax, [rax+38h]
add rax, 8
mov [rbp+var_50], rax
add rax, 20h ; ' '
cmp rax, [rbp+var_58]
jbe short loc_6F256
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_58]
mov rax, [rbp+var_50]
sub rdx, rax
call _memcpy
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+rax+var_30], 0
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_48]
call get_collation_number
mov rdi, [rbp+var_60]
mov esi, eax
call inheritance_source_by_id
mov [rbp+var_38], rax
jmp short loc_6F25E
loc_6F256:
mov [rbp+var_38], 0
loc_6F25E:
mov rax, [rbp+var_38]
mov [rbp+var_68], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6F282
mov rax, [rbp+var_68]
add rsp, 70h
pop rbp
retn
loc_6F282:
call ___stack_chk_fail
| long long find_collation_data_inheritance_source(long long a1, long long a2)
{
unsigned int collation_number; // eax
unsigned long long v4; // [rsp+18h] [rbp-58h]
long long v5; // [rsp+20h] [rbp-50h]
_BYTE v7[40]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-8h]
v8 = __readfsqword(0x28u);
if ( !*(_QWORD *)(a1 + 56) )
return 0LL;
if ( (unsigned int)strncmp(*(_QWORD *)(a1 + 56), "[import ", 8LL) )
return 0LL;
v4 = strchr(*(_QWORD *)(a1 + 56) + 8LL, 93LL);
if ( !v4 )
return 0LL;
v5 = *(_QWORD *)(a1 + 56) + 8LL;
if ( *(_QWORD *)(a1 + 56) + 40LL <= v4 )
return 0LL;
memcpy(v7, v5, v4 - v5);
v7[v4 - v5] = 0;
collation_number = get_collation_number((long long)v7, a2);
return inheritance_source_by_id(a1, collation_number);
}
| find_collation_data_inheritance_source:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],RSI
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0016f256
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x38]
LEA RSI,[0x1dd3c6]
MOV EDX,0x8
CALL 0x00128190
CMP EAX,0x0
JNZ 0x0016f256
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x8
MOV ESI,0x5d
CALL 0x00128120
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JZ 0x0016f256
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x8
MOV qword ptr [RBP + -0x50],RAX
ADD RAX,0x20
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0016f256
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x50]
SUB RDX,RAX
CALL 0x001282b0
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x0016cf90
MOV RDI,qword ptr [RBP + -0x60]
MOV ESI,EAX
CALL 0x0016f3d0
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0016f25e
LAB_0016f256:
MOV qword ptr [RBP + -0x38],0x0
LAB_0016f25e:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016f282
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x70
POP RBP
RET
LAB_0016f282:
CALL 0x001283c0
|
int8 find_collation_data_inheritance_source(long param_1,int8 param_2)
{
int iVar1;
int4 uVar2;
char *pcVar3;
void *__src;
long in_FS_OFFSET;
int8 local_40;
char local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (*(long *)(param_1 + 0x38) != 0) {
iVar1 = strncmp(*(char **)(param_1 + 0x38),"[import ",8);
if (iVar1 == 0) {
pcVar3 = strchr((char *)(*(long *)(param_1 + 0x38) + 8),0x5d);
if ((pcVar3 != (char *)0x0) &&
(__src = (void *)(*(long *)(param_1 + 0x38) + 8),
pcVar3 < (char *)(*(long *)(param_1 + 0x38) + 0x28))) {
memcpy(local_38,__src,(long)pcVar3 - (long)__src);
pcVar3[(long)(local_38 + -(long)__src)] = '\0';
uVar2 = get_collation_number(local_38,param_2);
local_40 = inheritance_source_by_id(param_1,uVar2);
goto LAB_0016f25e;
}
}
}
local_40 = 0;
LAB_0016f25e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_40;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
49,041 | strlength | eloqsql/mysys/mf_format.c | size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
} | O0 | c | strlength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x6d7e3
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x6d7bc
jmp 0x6d76f
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x6d79c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x6d7a5
jmp 0x6d7a7
jmp 0x6d76f
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x6d7ba
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x6d7e3
jmp 0x6d7bc
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x6d7de
jmp 0x6d7c4
jmp 0x6d754
jmp 0x6d7e5
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
| strlength:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov [rbp+var_10], rax
loc_6D754:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz loc_6D7E3
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_6D7BC
jmp short $+2
loc_6D76F:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx ecx, byte ptr [rax+1]
xor eax, eax
cmp ecx, 0
mov [rbp+var_19], al
jz short loc_6D79C
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setnz al
mov [rbp+var_19], al
loc_6D79C:
mov al, [rbp+var_19]
test al, 1
jnz short loc_6D7A5
jmp short loc_6D7A7
loc_6D7A5:
jmp short loc_6D76F
loc_6D7A7:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_6D7BA
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
jmp short loc_6D7E3
loc_6D7BA:
jmp short $+2
loc_6D7BC:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_6D7C4:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx eax, byte ptr [rax+1]
cmp eax, 20h ; ' '
jnz short loc_6D7DE
jmp short loc_6D7C4
loc_6D7DE:
jmp loc_6D754
loc_6D7E3:
jmp short $+2
loc_6D7E5:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
sub rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
pop rbp
retn
| long long strlength(_BYTE *a1)
{
_BYTE *v1; // rax
_BYTE *v2; // rax
bool v4; // [rsp+Fh] [rbp-19h]
_BYTE *v5; // [rsp+10h] [rbp-18h]
_BYTE *v6; // [rsp+18h] [rbp-10h]
v5 = a1;
v6 = a1;
while ( *v6 )
{
if ( *v6 != 32 )
{
do
{
v1 = v6++;
v4 = 0;
if ( v1[1] )
v4 = *v6 != 32;
}
while ( v4 );
if ( !*v6 )
{
v5 = v6;
return v5 - a1;
}
}
v5 = v6;
do
v2 = v6++;
while ( v2[1] == 32 );
}
return v5 - a1;
}
| strlength:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x10],RAX
LAB_0016d754:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0016d7e3
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0016d7bc
JMP 0x0016d76f
LAB_0016d76f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX ECX,byte ptr [RAX + 0x1]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0016d79c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0016d79c:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0016d7a5
JMP 0x0016d7a7
LAB_0016d7a5:
JMP 0x0016d76f
LAB_0016d7a7:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x0016d7ba
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016d7e3
LAB_0016d7ba:
JMP 0x0016d7bc
LAB_0016d7bc:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_0016d7c4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x20
JNZ 0x0016d7de
JMP 0x0016d7c4
LAB_0016d7de:
JMP 0x0016d754
LAB_0016d7e3:
JMP 0x0016d7e5
LAB_0016d7e5:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
bool bVar3;
char *local_20;
char *local_18;
local_20 = param_1;
local_18 = param_1;
while (*local_18 != '\0') {
if (*local_18 != ' ') {
do {
local_20 = local_18 + 1;
bVar3 = false;
if (local_18[1] != '\0') {
bVar3 = *local_20 != ' ';
}
local_18 = local_20;
} while (bVar3);
if (*local_20 == '\0') break;
}
local_20 = local_18;
do {
pcVar2 = local_18 + 1;
pcVar1 = local_18 + 1;
local_18 = pcVar2;
} while (*pcVar1 == ' ');
}
return (long)local_20 - (long)param_1;
}
| |
49,042 | my_uca_coll_init_utf8mb3 | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb3,
&my_uca_package_no_contractions_utf8mb3);
return FALSE;
} | O0 | c | my_uca_coll_init_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x47500
cmpb $0x0, %al
je 0x48997
movb $0x1, -0x1(%rbp)
jmp 0x489bf
movq -0x10(%rbp), %rdi
callq 0x534f0
cmpb $0x0, %al
je 0x489bb
movq -0x10(%rbp), %rdi
leaq 0x274cd1(%rip), %rsi # 0x2bd680
leaq 0x274cea(%rip), %rdx # 0x2bd6a0
callq 0x53550
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_uca_coll_init_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_coll_init_uca
cmp al, 0
jz short loc_48997
mov [rbp+var_1], 1
jmp short loc_489BF
loc_48997:
mov rdi, [rbp+var_10]
call my_uca_collation_can_optimize_no_contractions
cmp al, 0
jz short loc_489BB
mov rdi, [rbp+var_10]
lea rsi, my_uca_package_utf8mb3
lea rdx, my_uca_package_no_contractions_utf8mb3
call my_uca_handler_map
loc_489BB:
mov [rbp+var_1], 0
loc_489BF:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_uca_coll_init_utf8mb3(long long a1, long long a2)
{
if ( (unsigned __int8)my_coll_init_uca(a1, a2) )
return 1;
if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) )
my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3);
return 0;
}
| my_uca_coll_init_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00147500
CMP AL,0x0
JZ 0x00148997
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001489bf
LAB_00148997:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001534f0
CMP AL,0x0
JZ 0x001489bb
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x3bd680]
LEA RDX,[0x3bd6a0]
CALL 0x00153550
LAB_001489bb:
MOV byte ptr [RBP + -0x1],0x0
LAB_001489bf:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2)
{
char cVar1;
int1 local_9;
cVar1 = my_coll_init_uca(param_1,param_2);
if (cVar1 == '\0') {
cVar1 = my_uca_collation_can_optimize_no_contractions(param_1);
if (cVar1 != '\0') {
my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
| |
49,043 | get_current_logfile | eloqsql/storage/maria/ma_loghandler.c | static TRANSLOG_FILE *get_current_logfile()
{
TRANSLOG_FILE *file;
DBUG_ENTER("get_current_logfile");
mysql_rwlock_rdlock(&log_descriptor.open_files_lock);
DBUG_PRINT("info", ("max_file: %lu min_file: %lu open_files: %lu",
(ulong) log_descriptor.max_file,
(ulong) log_descriptor.min_file,
(ulong) log_descriptor.open_files.elements));
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
file= *dynamic_element(&log_descriptor.open_files, 0, TRANSLOG_FILE **);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
DBUG_RETURN(file);
} | O0 | c | get_current_logfile:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x41c581(%rip), %rdi # 0x4793c0
addq $0x258, %rdi # imm = 0x258
leaq 0xf4e8a(%rip), %rsi # 0x151cd7
movl $0x43f, %edx # imm = 0x43F
callq 0x58a70
jmp 0x5ce59
jmp 0x5ce5b
jmp 0x5ce5d
movq 0x41c784(%rip), %rax # 0x4795e8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
leaq 0x41c54e(%rip), %rdi # 0x4793c0
addq $0x258, %rdi # imm = 0x258
callq 0x57900
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
| get_current_logfile:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rdi, log_descriptor
add rdi, 258h
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 43Fh
call inline_mysql_rwlock_rdlock_0
jmp short $+2
loc_5CE59:
jmp short $+2
loc_5CE5B:
jmp short $+2
loc_5CE5D:
mov rax, cs:qword_4795E8
mov rax, [rax]
mov [rbp+var_8], rax
lea rdi, log_descriptor
add rdi, 258h
call inline_mysql_rwlock_unlock_1
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| long long get_current_logfile()
{
long long v1; // [rsp+8h] [rbp-8h]
inline_mysql_rwlock_rdlock_0(
(long long)&log_descriptor[75],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x43Fu);
v1 = *(_QWORD *)qword_4795E8;
inline_mysql_rwlock_unlock_1((long long)&log_descriptor[75]);
return v1;
}
| get_current_logfile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RDI,[0x5793c0]
ADD RDI,0x258
LEA RSI,[0x251cd7]
MOV EDX,0x43f
CALL 0x00158a70
JMP 0x0015ce59
LAB_0015ce59:
JMP 0x0015ce5b
LAB_0015ce5b:
JMP 0x0015ce5d
LAB_0015ce5d:
MOV RAX,qword ptr [0x005795e8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x5793c0]
ADD RDI,0x258
CALL 0x00157900
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
int8 get_current_logfile(void)
{
int8 uVar1;
inline_mysql_rwlock_rdlock
(&DAT_00579618,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x43f);
uVar1 = *DAT_005795e8;
inline_mysql_rwlock_unlock(&DAT_00579618);
return uVar1;
}
| |
49,044 | get_current_logfile | eloqsql/storage/maria/ma_loghandler.c | static TRANSLOG_FILE *get_current_logfile()
{
TRANSLOG_FILE *file;
DBUG_ENTER("get_current_logfile");
mysql_rwlock_rdlock(&log_descriptor.open_files_lock);
DBUG_PRINT("info", ("max_file: %lu min_file: %lu open_files: %lu",
(ulong) log_descriptor.max_file,
(ulong) log_descriptor.min_file,
(ulong) log_descriptor.open_files.elements));
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
file= *dynamic_element(&log_descriptor.open_files, 0, TRANSLOG_FILE **);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
DBUG_RETURN(file);
} | O3 | c | get_current_logfile:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x3ae742(%rip) # 0x3feaa8
jne 0x503a0
leaq 0x3ae6a9(%rip), %rdi # 0x3fea18
callq 0xa43b8
movq 0x3ae66d(%rip), %rax # 0x3fe9e8
movq (%rax), %rbx
movq 0x3ae723(%rip), %rdi # 0x3feaa8
testq %rdi, %rdi
jne 0x503a7
leaq 0x3ae687(%rip), %rdi # 0x3fea18
callq 0xa44e6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2cf42
jmp 0x50374
leaq 0x335c62(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x5038a
nopl (%rax)
| get_current_logfile:
push rbp
mov rbp, rsp
push rbx
push rax
cmp cs:qword_3FEAA8, 0
jnz short loc_503A0
lea rdi, unk_3FEA18
call my_rw_rdlock
loc_50374:
mov rax, cs:qword_3FE9E8
mov rbx, [rax]
mov rdi, cs:qword_3FEAA8
test rdi, rdi
jnz short loc_503A7
loc_5038A:
lea rdi, unk_3FEA18
call my_rw_unlock
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
loc_503A0:
call get_current_logfile_cold_1
jmp short loc_50374
loc_503A7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp short loc_5038A
| long long get_current_logfile(long long a1)
{
long long v1; // rbx
if ( qword_3FEAA8 )
get_current_logfile_cold_1(a1);
else
my_rw_rdlock(&unk_3FEA18);
v1 = *(_QWORD *)qword_3FE9E8;
if ( qword_3FEAA8 )
((void ( *)(long long))PSI_server[45])(qword_3FEAA8);
my_rw_unlock(&unk_3FEA18);
return v1;
}
| get_current_logfile:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [0x004feaa8],0x0
JNZ 0x001503a0
LEA RDI,[0x4fea18]
CALL 0x001a43b8
LAB_00150374:
MOV RAX,qword ptr [0x004fe9e8]
MOV RBX,qword ptr [RAX]
MOV RDI,qword ptr [0x004feaa8]
TEST RDI,RDI
JNZ 0x001503a7
LAB_0015038a:
LEA RDI,[0x4fea18]
CALL 0x001a44e6
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_001503a0:
CALL 0x0012cf42
JMP 0x00150374
LAB_001503a7:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0015038a
|
int8 get_current_logfile(void)
{
int8 uVar1;
if (DAT_004feaa8 == 0) {
my_rw_rdlock(&DAT_004fea18);
}
else {
get_current_logfile_cold_1();
}
uVar1 = *DAT_004fe9e8;
if (DAT_004feaa8 != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(&DAT_004fea18);
return uVar1;
}
| |
49,045 | int fmt::v8::detail::snprintf_float<double>(double, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format-inl.h | int snprintf_float(T value, int precision, float_specs specs,
buffer<char>& buf) {
// Buffer capacity must be non-zero, otherwise MSVC's vsnprintf_s will fail.
FMT_ASSERT(buf.capacity() > buf.size(), "empty buffer");
static_assert(!std::is_same<T, float>::value, "");
// Subtract 1 to account for the difference in precision since we use %e for
// both general and exponent format.
if (specs.format == float_format::general ||
specs.format == float_format::exp)
precision = (precision >= 0 ? precision : 6) - 1;
// Build the format string.
enum { max_format_size = 7 }; // The longest format is "%#.*Le".
char format[max_format_size];
char* format_ptr = format;
*format_ptr++ = '%';
if (specs.showpoint && specs.format == float_format::hex) *format_ptr++ = '#';
if (precision >= 0) {
*format_ptr++ = '.';
*format_ptr++ = '*';
}
if (std::is_same<T, long double>()) *format_ptr++ = 'L';
*format_ptr++ = specs.format != float_format::hex
? (specs.format == float_format::fixed ? 'f' : 'e')
: (specs.upper ? 'A' : 'a');
*format_ptr = '\0';
// Format using snprintf.
auto offset = buf.size();
for (;;) {
auto begin = buf.data() + offset;
auto capacity = buf.capacity() - offset;
#ifdef FMT_FUZZ
if (precision > 100000)
throw std::runtime_error(
"fuzz mode - avoid large allocation inside snprintf");
#endif
// Suppress the warning about a nonliteral format string.
// Cannot use auto because of a bug in MinGW (#1532).
int (*snprintf_ptr)(char*, size_t, const char*, ...) = FMT_SNPRINTF;
int result = precision >= 0
? snprintf_ptr(begin, capacity, format, precision, value)
: snprintf_ptr(begin, capacity, format, value);
if (result < 0) {
// The buffer will grow exponentially.
buf.try_reserve(buf.capacity() + 1);
continue;
}
auto size = to_unsigned(result);
// Size equal to capacity means that the last character was truncated.
if (size >= capacity) {
buf.try_reserve(size + offset + 1); // Add 1 for the terminating '\0'.
continue;
}
auto is_digit = [](char c) { return c >= '0' && c <= '9'; };
if (specs.format == float_format::fixed) {
if (precision == 0) {
buf.try_resize(size);
return 0;
}
// Find and remove the decimal point.
auto end = begin + size, p = end;
do {
--p;
} while (is_digit(*p));
int fraction_size = static_cast<int>(end - p - 1);
std::memmove(p, p + 1, to_unsigned(fraction_size));
buf.try_resize(size - 1);
return -fraction_size;
}
if (specs.format == float_format::hex) {
buf.try_resize(size + offset);
return 0;
}
// Find and parse the exponent.
auto end = begin + size, exp_pos = end;
do {
--exp_pos;
} while (*exp_pos != 'e');
char sign = exp_pos[1];
FMT_ASSERT(sign == '+' || sign == '-', "");
int exp = 0;
auto p = exp_pos + 2; // Skip 'e' and sign.
do {
FMT_ASSERT(is_digit(*p), "");
exp = exp * 10 + (*p++ - '0');
} while (p != end);
if (sign == '-') exp = -exp;
int fraction_size = 0;
if (exp_pos != begin + 1) {
// Remove trailing zeros.
auto fraction_end = exp_pos - 1;
while (*fraction_end == '0') --fraction_end;
// Move the fractional part left to get rid of the decimal point.
fraction_size = static_cast<int>(fraction_end - begin - 1);
std::memmove(begin + 1, begin + 2, to_unsigned(fraction_size));
}
buf.try_resize(to_unsigned(fraction_size) + offset + 1);
return exp - fraction_size;
}
} | O3 | c | int fmt::v8::detail::snprintf_float<double>(double, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
fldt 0x80(%rsp)
fstpt 0x2c(%rsp)
shrq $0x20, %rsi
leal -0x1(%rdi), %eax
testl %edi, %edi
movl $0x5, %r12d
cmovnsl %eax, %r12d
cmpb $0x2, %sil
movq %rdi, 0x38(%rsp)
cmovael %edi, %r12d
movb $0x25, 0x19(%rsp)
btl $0x14, %esi
setae %al
cmpb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x458fe
leaq 0x1b(%rsp), %rax
movb $0x23, -0x1(%rax)
jmp 0x45903
leaq 0x1a(%rsp), %rax
testl %r12d, %r12d
js 0x45911
movw $0x2a2e, (%rax) # imm = 0x2A2E
addq $0x2, %rax
movb $0x4c, (%rax)
cmpb $0x3, %sil
movq %rsi, 0x40(%rsp)
jne 0x4592e
btl $0x10, %esi
setae %cl
shlb $0x5, %cl
orb $0x41, %cl
jmp 0x45938
cmpb $0x2, %sil
sete %cl
addb $0x65, %cl
movb %cl, 0x1(%rax)
movb $0x0, 0x2(%rax)
movq 0x10(%rbx), %r13
leaq 0x1(%r13), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rbx), %rbp
movq 0x8(%rbx), %r15
addq %r13, %r15
subq %r13, %rbp
testl %r12d, %r12d
js 0x4597d
fldt 0x2c(%rsp)
fstpt (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x19(%rsp), %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0xb2f0
jmp 0x45996
fldt 0x2c(%rsp)
fstpt (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x19(%rsp), %rdx
xorl %eax, %eax
callq 0xb2f0
movl %eax, %r14d
testl %eax, %eax
js 0x459bc
movl %r12d, %ecx
movl %r14d, %r12d
cmpq %r12, %rbp
ja 0x459d6
movq 0x20(%rsp), %rax
leaq (%rax,%r12), %rsi
cmpq %rsi, 0x18(%rbx)
movl %ecx, %r12d
jae 0x4594c
jmp 0x459c9
movq 0x18(%rbx), %rsi
cmpq $-0x1, %rsi
je 0x4594c
incq %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
jmp 0x4594c
movq 0x40(%rsp), %rax
cmpb $0x2, %al
je 0x45a16
movzbl %al, %eax
cmpl $0x3, %eax
jne 0x45a7a
addq %r12, %r13
movq 0x18(%rbx), %rax
cmpq %r13, %rax
jae 0x45a06
movq (%rbx), %rax
movq %rbx, %rdi
movq %r13, %rsi
callq *(%rax)
movq 0x18(%rbx), %rax
cmpq %r13, %rax
cmovbq %rax, %r13
movq %r13, 0x10(%rbx)
jmp 0x45b0a
cmpl $0x0, 0x38(%rsp)
je 0x45ae7
addq %r12, %r15
movl $0x1, %r12d
movb -0x2(%r15,%r12), %al
addb $-0x30, %al
decq %r12
cmpb $0xa, %al
jb 0x45a2a
movl %r12d, %edx
negl %edx
leaq (%r15,%r12), %rdi
decq %rdi
addq %r12, %r15
movq %r15, %rsi
callq 0xaa40
decl %r14d
movq 0x18(%rbx), %rax
cmpq %r14, %rax
jae 0x45a6a
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *(%rax)
movq 0x18(%rbx), %rax
cmpq %r14, %rax
cmovbq %rax, %r14
movq %r14, 0x10(%rbx)
jmp 0x45b43
movq %r12, %r14
decq %r14
movq $-0x2, %rax
incq %rax
cmpb $0x65, (%r15,%r14)
leaq -0x1(%r14), %r14
jne 0x45a87
leaq (%r15,%r12), %rdx
movb 0x2(%r14,%r15), %cl
negq %rax
xorl %esi, %esi
movsbl (%rdx,%rax), %edi
leal (%rsi,%rsi,4), %esi
leal (%rdi,%rsi,2), %esi
addl $-0x30, %esi
incq %rax
jne 0x45aa3
movl %esi, %r12d
negl %r12d
cmpb $0x2d, %cl
cmovnel %esi, %r12d
testq %r14, %r14
je 0x45b0f
leaq 0x1(%r15), %rdi
cmpb $0x30, (%r15,%r14)
leaq -0x1(%r14), %r14
je 0x45acb
addq $0x2, %r15
movl %r14d, %edx
movq %r15, %rsi
callq 0xaa40
jmp 0x45b12
movq 0x18(%rbx), %rax
cmpq %r12, %rax
jae 0x45aff
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *(%rax)
movq 0x18(%rbx), %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
jmp 0x45b43
xorl %r14d, %r14d
movl %r14d, %eax
movq 0x20(%rsp), %r15
addq %rax, %r15
movq 0x18(%rbx), %rax
cmpq %r15, %rax
jae 0x45b35
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *(%rax)
movq 0x18(%rbx), %rax
cmpq %r15, %rax
cmovbq %rax, %r15
movq %r15, 0x10(%rbx)
subl %r14d, %r12d
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN3fmt2v86detail14snprintf_floatIeEEiT_iNS1_11float_specsERNS1_6bufferIcEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
fld [rsp+78h+arg_0]
fstp [rsp+78h+var_4C]
shr rsi, 20h
lea eax, [rdi-1]
test edi, edi
mov r12d, 5
cmovns r12d, eax
cmp sil, 2
mov [rsp+78h+var_40], rdi
cmovnb r12d, edi
mov [rsp+78h+var_5F], 25h ; '%'
bt esi, 14h
setnb al
cmp sil, 3
setnz cl
or cl, al
jnz short loc_458FE
lea rax, [rsp+78h+var_5D]
mov byte ptr [rax-1], 23h ; '#'
jmp short loc_45903
loc_458FE:
lea rax, [rsp+78h+var_5E]
loc_45903:
test r12d, r12d
js short loc_45911
mov word ptr [rax], 2A2Eh
add rax, 2
loc_45911:
mov byte ptr [rax], 4Ch ; 'L'
cmp sil, 3
mov [rsp+78h+var_38], rsi
jnz short loc_4592E
bt esi, 10h
setnb cl
shl cl, 5
or cl, 41h
jmp short loc_45938
loc_4592E:
cmp sil, 2
setz cl
add cl, 65h ; 'e'
loc_45938:
mov [rax+1], cl
mov byte ptr [rax+2], 0
mov r13, [rbx+10h]
lea rax, [r13+1]
mov [rsp+78h+var_58], rax
loc_4594C:
mov rbp, [rbx+18h]
mov r15, [rbx+8]
add r15, r13
sub rbp, r13
test r12d, r12d
js short loc_4597D
fld [rsp+78h+var_4C]
fstp [rsp+78h+var_78]
mov rdi, r15
mov rsi, rbp
lea rdx, [rsp+78h+var_5F]
mov ecx, r12d
xor eax, eax
call _snprintf
jmp short loc_45996
loc_4597D:
fld [rsp+78h+var_4C]
fstp [rsp+78h+var_78]
mov rdi, r15
mov rsi, rbp
lea rdx, [rsp+78h+var_5F]
xor eax, eax
call _snprintf
loc_45996:
mov r14d, eax
test eax, eax
js short loc_459BC
mov ecx, r12d
mov r12d, r14d
cmp rbp, r12
ja short loc_459D6
mov rax, [rsp+78h+var_58]
lea rsi, [rax+r12]
cmp [rbx+18h], rsi
mov r12d, ecx
jnb short loc_4594C
jmp short loc_459C9
loc_459BC:
mov rsi, [rbx+18h]
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz short loc_4594C
inc rsi
loc_459C9:
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
jmp loc_4594C
loc_459D6:
mov rax, [rsp+78h+var_38]
cmp al, 2
jz short loc_45A16
movzx eax, al
cmp eax, 3
jnz loc_45A7A
add r13, r12
mov rax, [rbx+18h]
cmp rax, r13
jnb short loc_45A06
mov rax, [rbx]
mov rdi, rbx
mov rsi, r13
call qword ptr [rax]
mov rax, [rbx+18h]
loc_45A06:
cmp rax, r13
cmovb r13, rax
mov [rbx+10h], r13
jmp loc_45B0A
loc_45A16:
cmp dword ptr [rsp+78h+var_40], 0
jz loc_45AE7
add r15, r12
mov r12d, 1
loc_45A2A:
mov al, [r15+r12-2]
add al, 0D0h
dec r12
cmp al, 0Ah
jb short loc_45A2A
mov edx, r12d
neg edx
lea rdi, [r15+r12]
dec rdi
add r15, r12
mov rsi, r15
call _memmove
dec r14d
mov rax, [rbx+18h]
cmp rax, r14
jnb short loc_45A6A
mov rax, [rbx]
mov rdi, rbx
mov rsi, r14
call qword ptr [rax]
mov rax, [rbx+18h]
loc_45A6A:
cmp rax, r14
cmovb r14, rax
mov [rbx+10h], r14
jmp loc_45B43
loc_45A7A:
mov r14, r12
dec r14
mov rax, 0FFFFFFFFFFFFFFFEh
loc_45A87:
inc rax
cmp byte ptr [r15+r14], 65h ; 'e'
lea r14, [r14-1]
jnz short loc_45A87
lea rdx, [r15+r12]
mov cl, [r14+r15+2]
neg rax
xor esi, esi
loc_45AA3:
movsx edi, byte ptr [rdx+rax]
lea esi, [rsi+rsi*4]
lea esi, [rdi+rsi*2]
add esi, 0FFFFFFD0h
inc rax
jnz short loc_45AA3
mov r12d, esi
neg r12d
cmp cl, 2Dh ; '-'
cmovnz r12d, esi
test r14, r14
jz short loc_45B0F
lea rdi, [r15+1]
loc_45ACB:
cmp byte ptr [r15+r14], 30h ; '0'
lea r14, [r14-1]
jz short loc_45ACB
add r15, 2
mov edx, r14d
mov rsi, r15
call _memmove
jmp short loc_45B12
loc_45AE7:
mov rax, [rbx+18h]
cmp rax, r12
jnb short loc_45AFF
mov rax, [rbx]
mov rdi, rbx
mov rsi, r12
call qword ptr [rax]
mov rax, [rbx+18h]
loc_45AFF:
cmp rax, r12
cmovnb rax, r12
mov [rbx+10h], rax
loc_45B0A:
xor r12d, r12d
jmp short loc_45B43
loc_45B0F:
xor r14d, r14d
loc_45B12:
mov eax, r14d
mov r15, [rsp+78h+var_58]
add r15, rax
mov rax, [rbx+18h]
cmp rax, r15
jnb short loc_45B35
mov rax, [rbx]
mov rdi, rbx
mov rsi, r15
call qword ptr [rax]
mov rax, [rbx+18h]
loc_45B35:
cmp rax, r15
cmovb r15, rax
mov [rbx+10h], r15
sub r12d, r14d
loc_45B43:
mov eax, r12d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long fmt::v8::detail::snprintf_float<long double>(
long long a1,
unsigned long long a2,
long long a3,
double a4,
long double a5)
{
unsigned long long v9; // rsi
int v10; // r12d
char *v11; // rax
char v12; // cl
long long v13; // r13
long long v14; // r15
unsigned long long v15; // rbp
unsigned int v16; // eax
long long v17; // rdx
unsigned int v18; // r14d
long long v19; // rcx
long long v20; // r12
unsigned long long v21; // r13
unsigned long long v22; // rax
long long v23; // r15
long long v24; // r12
unsigned __int8 v25; // al
unsigned long long v26; // r14
unsigned long long v27; // rax
long long v28; // r14
long long v29; // rax
bool v30; // zf
long long v31; // rax
int v32; // esi
int v33; // r12d
unsigned long long v34; // rax
unsigned long long v35; // r15
unsigned long long v36; // rax
char v38; // [rsp+19h] [rbp-5Fh] BYREF
char v39; // [rsp+1Ah] [rbp-5Eh] BYREF
char v40; // [rsp+1Bh] [rbp-5Dh] BYREF
long long v41; // [rsp+20h] [rbp-58h]
_BYTE v42[20]; // [rsp+2Ch] [rbp-4Ch]
unsigned long long v43; // [rsp+40h] [rbp-38h]
*(long double *)v42 = a5;
v9 = HIDWORD(a2);
v10 = 5;
if ( (int)a1 >= 0 )
v10 = a1 - 1;
*(_QWORD *)&v42[12] = a1;
if ( (unsigned __int8)v9 >= 2u )
v10 = a1;
v38 = 37;
if ( (v9 & 0x100000) == 0 || (_BYTE)v9 != 3 )
{
v11 = &v39;
}
else
{
v11 = &v40;
v39 = 35;
}
if ( v10 >= 0 )
{
*(_WORD *)v11 = 10798;
v11 += 2;
}
*v11 = 76;
v43 = v9;
if ( (_BYTE)v9 == 3 )
v12 = (32 * ((v9 & 0x10000) == 0)) | 0x41;
else
v12 = ((_BYTE)v9 == 2) + 101;
v11[1] = v12;
v11[2] = 0;
v13 = *(_QWORD *)(a3 + 16);
v41 = v13 + 1;
while ( 1 )
{
while ( 1 )
{
v14 = v13 + *(_QWORD *)(a3 + 8);
v15 = *(_QWORD *)(a3 + 24) - v13;
v16 = snprintf(v14, v15, &v38, a4);
v18 = v16;
if ( (v16 & 0x80000000) == 0 )
break;
if ( *(_QWORD *)(a3 + 24) != -1LL )
goto LABEL_19;
}
v19 = (unsigned int)v10;
v20 = v16;
if ( v15 > v16 )
break;
v10 = v19;
if ( *(_QWORD *)(a3 + 24) < v41 + (unsigned long long)v16 )
LABEL_19:
(**(void ( ***)(long long))a3)(a3);
}
if ( (_BYTE)v43 == 2 )
{
if ( *(_DWORD *)&v42[12] )
{
v23 = v16 + v14;
v24 = 1LL;
do
v25 = *(_BYTE *)(v23 + v24-- - 2) - 48;
while ( v25 < 0xAu );
memmove(v23 + v24 - 1, v24 + v23, (unsigned int)-(int)v24);
v26 = v18 - 1;
v27 = *(_QWORD *)(a3 + 24);
if ( v27 < v26 )
{
(**(void ( ***)(long long, unsigned long long))a3)(a3, v26);
v27 = *(_QWORD *)(a3 + 24);
}
if ( v27 < v26 )
v26 = v27;
*(_QWORD *)(a3 + 16) = v26;
}
else
{
v34 = *(_QWORD *)(a3 + 24);
if ( v34 < v18 )
{
(**(void ( ***)(long long, _QWORD, long long, long long))a3)(a3, v18, v17, v19);
v34 = *(_QWORD *)(a3 + 24);
}
if ( v34 >= v18 )
v34 = v18;
*(_QWORD *)(a3 + 16) = v34;
LABEL_49:
LODWORD(v24) = 0;
}
}
else
{
if ( (unsigned __int8)v43 == 3 )
{
v21 = v16 + v13;
v22 = *(_QWORD *)(a3 + 24);
if ( v22 < v21 )
{
(**(void ( ***)(long long, unsigned long long, long long, long long))a3)(a3, v21, v17, v19);
v22 = *(_QWORD *)(a3 + 24);
}
if ( v22 < v21 )
v21 = v22;
*(_QWORD *)(a3 + 16) = v21;
goto LABEL_49;
}
v28 = v16 - 1LL;
v29 = -2LL;
do
{
++v29;
v30 = *(_BYTE *)(v14 + v28--) == 101;
}
while ( !v30 );
v31 = -v29;
v32 = 0;
do
v32 = *(char *)(v14 + v20 + v31++) + 10 * v32 - 48;
while ( v31 );
v33 = -v32;
if ( *(_BYTE *)(v28 + v14 + 2) != 45 )
v33 = v32;
if ( v28 )
{
do
v30 = *(_BYTE *)(v14 + v28--) == 48;
while ( v30 );
memmove(v14 + 1, v14 + 2, (unsigned int)v28);
}
else
{
LODWORD(v28) = 0;
}
v35 = (unsigned int)v28 + v41;
v36 = *(_QWORD *)(a3 + 24);
if ( v36 < v35 )
{
(**(void ( ***)(long long, long long))a3)(a3, (unsigned int)v28 + v41);
v36 = *(_QWORD *)(a3 + 24);
}
if ( v36 < v35 )
v35 = v36;
*(_QWORD *)(a3 + 16) = v35;
LODWORD(v24) = v33 - v28;
}
return (unsigned int)v24;
}
| snprintf_float<long_double>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
FLD tword ptr [RSP + 0x80]
FSTP tword ptr [RSP + 0x2c]
SHR RSI,0x20
LEA EAX,[RDI + -0x1]
TEST EDI,EDI
MOV R12D,0x5
CMOVNS R12D,EAX
CMP SIL,0x2
MOV qword ptr [RSP + 0x38],RDI
CMOVNC R12D,EDI
MOV byte ptr [RSP + 0x19],0x25
BT ESI,0x14
SETNC AL
CMP SIL,0x3
SETNZ CL
OR CL,AL
JNZ 0x001458fe
LEA RAX,[RSP + 0x1b]
MOV byte ptr [RAX + -0x1],0x23
JMP 0x00145903
LAB_001458fe:
LEA RAX,[RSP + 0x1a]
LAB_00145903:
TEST R12D,R12D
JS 0x00145911
MOV word ptr [RAX],0x2a2e
ADD RAX,0x2
LAB_00145911:
MOV byte ptr [RAX],0x4c
CMP SIL,0x3
MOV qword ptr [RSP + 0x40],RSI
JNZ 0x0014592e
BT ESI,0x10
SETNC CL
SHL CL,0x5
OR CL,0x41
JMP 0x00145938
LAB_0014592e:
CMP SIL,0x2
SETZ CL
ADD CL,0x65
LAB_00145938:
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],0x0
MOV R13,qword ptr [RBX + 0x10]
LEA RAX,[R13 + 0x1]
MOV qword ptr [RSP + 0x20],RAX
LAB_0014594c:
MOV RBP,qword ptr [RBX + 0x18]
MOV R15,qword ptr [RBX + 0x8]
ADD R15,R13
SUB RBP,R13
TEST R12D,R12D
JS 0x0014597d
FLD tword ptr [RSP + 0x2c]
FSTP tword ptr [RSP]
MOV RDI,R15
MOV RSI,RBP
LEA RDX,[RSP + 0x19]
MOV ECX,R12D
XOR EAX,EAX
CALL 0x0010b2f0
JMP 0x00145996
LAB_0014597d:
FLD tword ptr [RSP + 0x2c]
FSTP tword ptr [RSP]
MOV RDI,R15
MOV RSI,RBP
LEA RDX,[RSP + 0x19]
XOR EAX,EAX
CALL 0x0010b2f0
LAB_00145996:
MOV R14D,EAX
TEST EAX,EAX
JS 0x001459bc
MOV ECX,R12D
MOV R12D,R14D
CMP RBP,R12
JA 0x001459d6
MOV RAX,qword ptr [RSP + 0x20]
LEA RSI,[RAX + R12*0x1]
CMP qword ptr [RBX + 0x18],RSI
MOV R12D,ECX
JNC 0x0014594c
JMP 0x001459c9
LAB_001459bc:
MOV RSI,qword ptr [RBX + 0x18]
CMP RSI,-0x1
JZ 0x0014594c
INC RSI
LAB_001459c9:
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
JMP 0x0014594c
LAB_001459d6:
MOV RAX,qword ptr [RSP + 0x40]
CMP AL,0x2
JZ 0x00145a16
MOVZX EAX,AL
CMP EAX,0x3
JNZ 0x00145a7a
ADD R13,R12
MOV RAX,qword ptr [RBX + 0x18]
CMP RAX,R13
JNC 0x00145a06
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R13
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x18]
LAB_00145a06:
CMP RAX,R13
CMOVC R13,RAX
MOV qword ptr [RBX + 0x10],R13
JMP 0x00145b0a
LAB_00145a16:
CMP dword ptr [RSP + 0x38],0x0
JZ 0x00145ae7
ADD R15,R12
MOV R12D,0x1
LAB_00145a2a:
MOV AL,byte ptr [R15 + R12*0x1 + -0x2]
ADD AL,0xd0
DEC R12
CMP AL,0xa
JC 0x00145a2a
MOV EDX,R12D
NEG EDX
LEA RDI,[R15 + R12*0x1]
DEC RDI
ADD R15,R12
MOV RSI,R15
CALL 0x0010aa40
DEC R14D
MOV RAX,qword ptr [RBX + 0x18]
CMP RAX,R14
JNC 0x00145a6a
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x18]
LAB_00145a6a:
CMP RAX,R14
CMOVC R14,RAX
MOV qword ptr [RBX + 0x10],R14
JMP 0x00145b43
LAB_00145a7a:
MOV R14,R12
DEC R14
MOV RAX,-0x2
LAB_00145a87:
INC RAX
CMP byte ptr [R15 + R14*0x1],0x65
LEA R14,[R14 + -0x1]
JNZ 0x00145a87
LEA RDX,[R15 + R12*0x1]
MOV CL,byte ptr [R14 + R15*0x1 + 0x2]
NEG RAX
XOR ESI,ESI
LAB_00145aa3:
MOVSX EDI,byte ptr [RDX + RAX*0x1]
LEA ESI,[RSI + RSI*0x4]
LEA ESI,[RDI + RSI*0x2]
ADD ESI,-0x30
INC RAX
JNZ 0x00145aa3
MOV R12D,ESI
NEG R12D
CMP CL,0x2d
CMOVNZ R12D,ESI
TEST R14,R14
JZ 0x00145b0f
LEA RDI,[R15 + 0x1]
LAB_00145acb:
CMP byte ptr [R15 + R14*0x1],0x30
LEA R14,[R14 + -0x1]
JZ 0x00145acb
ADD R15,0x2
MOV EDX,R14D
MOV RSI,R15
CALL 0x0010aa40
JMP 0x00145b12
LAB_00145ae7:
MOV RAX,qword ptr [RBX + 0x18]
CMP RAX,R12
JNC 0x00145aff
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R12
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x18]
LAB_00145aff:
CMP RAX,R12
CMOVNC RAX,R12
MOV qword ptr [RBX + 0x10],RAX
LAB_00145b0a:
XOR R12D,R12D
JMP 0x00145b43
LAB_00145b0f:
XOR R14D,R14D
LAB_00145b12:
MOV EAX,R14D
MOV R15,qword ptr [RSP + 0x20]
ADD R15,RAX
MOV RAX,qword ptr [RBX + 0x18]
CMP RAX,R15
JNC 0x00145b35
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R15
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x18]
LAB_00145b35:
CMP RAX,R15
CMOVC R15,RAX
MOV qword ptr [RBX + 0x10],R15
SUB R12D,R14D
LAB_00145b43:
MOV EAX,R12D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* int fmt::v8::detail::snprintf_float<long double>(long double, int, fmt::v8::detail::float_specs,
fmt::v8::detail::buffer<char>&) */
int fmt::v8::detail::snprintf_float<long_double>
(ulong param_1_00,ulong param_2,int8 *param_3,int8 param_4,
int8 param_5,int8 param_6,unkbyte10 param_1)
{
char *pcVar1;
int iVar2;
uint uVar3;
int2 *puVar4;
long lVar5;
byte bVar6;
ulong uVar7;
int iVar8;
ulong uVar9;
ulong uVar10;
char *__s;
char local_5f;
int1 local_5e [2];
int1 auStack_5c [4];
long local_58;
unkbyte10 local_4c;
ulong local_40;
ulong local_38;
local_4c = param_1;
local_38 = param_2 >> 0x20;
uVar3 = 5;
if (-1 < (int)param_1_00) {
uVar3 = (int)param_1_00 - 1;
}
bVar6 = (byte)(param_2 >> 0x20);
uVar9 = (ulong)uVar3;
if (1 < bVar6) {
uVar9 = param_1_00 & 0xffffffff;
}
local_5f = '%';
uVar3 = (uint)(param_2 >> 0x20);
if (bVar6 == 3 && (uVar3 >> 0x14 & 1) != 0) {
puVar4 = (int2 *)(local_5e + 1);
local_5e[0] = 0x23;
}
else {
puVar4 = (int2 *)local_5e;
}
if (-1 < (int)uVar9) {
*puVar4 = 0x2a2e;
puVar4 = puVar4 + 1;
}
*(int1 *)puVar4 = 0x4c;
if (bVar6 == 3) {
bVar6 = ((uVar3 >> 0x10 & 1) == 0) << 5 | 0x41;
}
else {
bVar6 = (bVar6 == 2) + 0x65;
}
*(byte *)((long)puVar4 + 1) = bVar6;
*(int1 *)(puVar4 + 1) = 0;
lVar5 = param_3[2];
local_58 = lVar5 + 1;
local_40 = param_1_00;
LAB_0014594c:
while( true ) {
__s = (char *)(param_3[1] + lVar5);
uVar7 = param_3[3] - lVar5;
if ((int)uVar9 < 0) {
uVar3 = snprintf(__s,uVar7,&local_5f);
}
else {
uVar3 = snprintf(__s,uVar7,&local_5f,uVar9,param_5,param_6,local_4c);
}
uVar10 = (ulong)uVar3;
if ((int)uVar3 < 0) goto LAB_001459bc;
if (uVar10 < uVar7) break;
uVar10 = local_58 + uVar10;
if ((ulong)param_3[3] < uVar10) goto LAB_001459c9;
}
if ((char)local_38 == '\x02') {
if ((int)local_40 != 0) {
uVar9 = 1;
do {
lVar5 = uVar9 + (uVar10 - 2);
uVar9 = uVar9 - 1;
} while ((byte)(__s[lVar5] - 0x30U) < 10);
memmove(__s + uVar9 + uVar10 + -1,__s + uVar9 + uVar10,(ulong)(uint)-(int)uVar9);
uVar10 = (ulong)(uVar3 - 1);
uVar7 = param_3[3];
if (uVar7 < uVar10) {
(**(code **)*param_3)(param_3,uVar10);
uVar7 = param_3[3];
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
param_3[2] = uVar10;
goto LAB_00145b43;
}
uVar9 = param_3[3];
if (uVar9 < uVar10) {
(**(code **)*param_3)(param_3,uVar10);
uVar9 = param_3[3];
}
if (uVar10 <= uVar9) {
uVar9 = uVar10;
}
param_3[2] = uVar9;
}
else {
if (((uint)local_38 & 0xff) != 3) {
lVar5 = -2;
uVar9 = uVar10 - 1;
do {
uVar7 = uVar9;
lVar5 = lVar5 + 1;
uVar9 = uVar7 - 1;
} while (__s[uVar7] != 'e');
lVar5 = -lVar5;
iVar8 = 0;
do {
iVar8 = (int)__s[lVar5 + uVar10] + iVar8 * 10 + -0x30;
lVar5 = lVar5 + 1;
} while (lVar5 != 0);
iVar2 = -iVar8;
if (__s[uVar7 + 1] != '-') {
iVar2 = iVar8;
}
if (uVar9 == 0) {
uVar9 = 0;
}
else {
do {
pcVar1 = __s + uVar9;
uVar9 = uVar9 - 1;
} while (*pcVar1 == '0');
memmove(__s + 1,__s + 2,uVar9 & 0xffffffff);
}
uVar10 = local_58 + (uVar9 & 0xffffffff);
uVar7 = param_3[3];
if (uVar7 < uVar10) {
(**(code **)*param_3)(param_3,uVar10);
uVar7 = param_3[3];
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
param_3[2] = uVar10;
uVar9 = (ulong)(uint)(iVar2 - (int)uVar9);
goto LAB_00145b43;
}
uVar10 = lVar5 + uVar10;
uVar9 = param_3[3];
if (uVar9 < uVar10) {
(**(code **)*param_3)(param_3,uVar10);
uVar9 = param_3[3];
}
if (uVar9 < uVar10) {
uVar10 = uVar9;
}
param_3[2] = uVar10;
}
uVar9 = 0;
LAB_00145b43:
return (int)uVar9;
LAB_001459bc:
if (param_3[3] != -1) {
uVar10 = param_3[3] + 1;
LAB_001459c9:
(**(code **)*param_3)(param_3,uVar10);
}
goto LAB_0014594c;
}
| |
49,046 | my_suspend_hook | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void
my_suspend_hook(my_bool suspend, void *data)
{
struct my_hook_data *hook_data= (struct my_hook_data *)data;
if (suspend)
{
hook_data->orig_pvio= hook_data->orig_mysql->net.pvio;
hook_data->orig_mysql->net.pvio= hook_data->new_mysql->net.pvio;
}
else
hook_data->orig_mysql->net.pvio= hook_data->orig_pvio;
} | O3 | c | my_suspend_hook:
pushq %rbp
movq %rsp, %rbp
testb %dil, %dil
je 0x1a52f
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq (%rax), %rdx
movq %rdx, 0x10(%rsi)
movq (%rcx), %rcx
jmp 0x1a536
movq (%rsi), %rax
movq 0x10(%rsi), %rcx
movq %rcx, (%rax)
popq %rbp
retq
| my_suspend_hook:
push rbp
mov rbp, rsp
test dil, dil
jz short loc_1A52F
mov rax, [rsi]
mov rcx, [rsi+8]
mov rdx, [rax]
mov [rsi+10h], rdx
mov rcx, [rcx]
jmp short loc_1A536
loc_1A52F:
mov rax, [rsi]
mov rcx, [rsi+10h]
loc_1A536:
mov [rax], rcx
pop rbp
retn
| _QWORD * my_suspend_hook(char a1, long long a2)
{
_QWORD *result; // rax
long long *v3; // rcx
long long v4; // rcx
result = *(_QWORD **)a2;
if ( a1 )
{
v3 = *(long long **)(a2 + 8);
*(_QWORD *)(a2 + 16) = **(_QWORD **)a2;
v4 = *v3;
}
else
{
v4 = *(_QWORD *)(a2 + 16);
}
*result = v4;
return result;
}
| my_suspend_hook:
PUSH RBP
MOV RBP,RSP
TEST DIL,DIL
JZ 0x0011a52f
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSI + 0x10],RDX
MOV RCX,qword ptr [RCX]
JMP 0x0011a536
LAB_0011a52f:
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x10]
LAB_0011a536:
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void my_suspend_hook(char param_1,int8 *param_2)
{
int8 *puVar1;
int8 uVar2;
if (param_1 == '\0') {
puVar1 = (int8 *)*param_2;
uVar2 = param_2[2];
}
else {
puVar1 = (int8 *)*param_2;
param_2[2] = *puVar1;
uVar2 = *(int8 *)param_2[1];
}
*puVar1 = uVar2;
return;
}
| |
49,047 | matrix_f_mul_scalar | tsotchke[P]eshkol/src/core/utils/vector.c | MatrixF* matrix_f_mul_scalar(Arena* arena, const MatrixF* mat, float scalar) {
assert(arena != NULL);
assert(mat != NULL);
MatrixF* result = matrix_f_create(arena, mat->rows, mat->cols);
if (!result) {
return NULL;
}
// Multiply the matrix by the scalar
for (size_t i = 0; i < mat->rows; i++) {
for (size_t j = 0; j < mat->cols; j++) {
result->data[i][j] = mat->data[i][j] * scalar;
}
}
return result;
} | O0 | c | matrix_f_mul_scalar:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x612e
jmp 0x614d
leaq 0x6345(%rip), %rdi # 0xc47a
leaq 0x7284(%rip), %rsi # 0xd3c0
movl $0x3a3, %edx # imm = 0x3A3
leaq 0x787d(%rip), %rcx # 0xd9c5
callq 0x10b0
cmpq $0x0, -0x18(%rbp)
je 0x6156
jmp 0x6175
leaq 0x7720(%rip), %rdi # 0xd87d
leaq 0x725c(%rip), %rsi # 0xd3c0
movl $0x3a4, %edx # imm = 0x3A4
leaq 0x7855(%rip), %rcx # 0xd9c5
callq 0x10b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdx
callq 0x5720
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x61a6
movq $0x0, -0x8(%rbp)
jmp 0x622d
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6225
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x6215
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x1c(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x61c4
jmp 0x6217
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x61ae
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| matrix_f_mul_scalar:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
movss [rbp+var_1C], xmm0
cmp [rbp+var_10], 0
jz short loc_612E
jmp short loc_614D
loc_612E:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3A3h
lea rcx, aMatrixfMatrixF_3; "MatrixF *matrix_f_mul_scalar(Arena *, c"...
call ___assert_fail
loc_614D:
cmp [rbp+var_18], 0
jz short loc_6156
jmp short loc_6175
loc_6156:
lea rdi, aMatNull; "mat != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3A4h
lea rcx, aMatrixfMatrixF_3; "MatrixF *matrix_f_mul_scalar(Arena *, c"...
call ___assert_fail
loc_6175:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov rax, [rbp+var_18]
mov rdx, [rax+48h]
call matrix_f_create
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_61A6
mov [rbp+var_8], 0
jmp loc_622D
loc_61A6:
mov [rbp+var_30], 0
loc_61AE:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+40h]
jnb short loc_6225
mov [rbp+var_38], 0
loc_61C4:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
cmp rax, [rcx+48h]
jnb short loc_6215
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_38]
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_1C]
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_38]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_61C4
loc_6215:
jmp short $+2
loc_6217:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_61AE
loc_6225:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_622D:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long matrix_f_mul_scalar(_QWORD *a1, long long a2, float a3)
{
unsigned long long j; // [rsp+8h] [rbp-38h]
unsigned long long i; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
931LL,
"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
if ( !a2 )
__assert_fail(
"mat != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
932LL,
"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
v6 = matrix_f_create(a1, *(_QWORD *)(a2 + 64), *(_QWORD *)(a2 + 72));
if ( !v6 )
return 0LL;
for ( i = 0LL; i < *(_QWORD *)(a2 + 64); ++i )
{
for ( j = 0LL; j < *(_QWORD *)(a2 + 72); ++j )
*(float *)(16 * i + v6 + 4 * j) = *(float *)(16 * i + a2 + 4 * j) * a3;
}
return v6;
}
| matrix_f_mul_scalar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOVSS dword ptr [RBP + -0x1c],XMM0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010612e
JMP 0x0010614d
LAB_0010612e:
LEA RDI,[0x10c468]
LEA RSI,[0x10d398]
MOV EDX,0x3a3
LEA RCX,[0x10d98b]
CALL 0x001010b0
LAB_0010614d:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00106156
JMP 0x00106175
LAB_00106156:
LEA RDI,[0x10d843]
LEA RSI,[0x10d398]
MOV EDX,0x3a4
LEA RCX,[0x10d98b]
CALL 0x001010b0
LAB_00106175:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0x48]
CALL 0x00105720
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001061a6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010622d
LAB_001061a6:
MOV qword ptr [RBP + -0x30],0x0
LAB_001061ae:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x00106225
MOV qword ptr [RBP + -0x38],0x0
LAB_001061c4:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x48]
JNC 0x00106215
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001061c4
LAB_00106215:
JMP 0x00106217
LAB_00106217:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001061ae
LAB_00106225:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010622d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long matrix_f_mul_scalar(float param_1,long param_2,long param_3)
{
ulong local_40;
ulong local_38;
long local_10;
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x3a3,"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("mat != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x3a4,"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
}
local_10 = matrix_f_create(param_2,*(int8 *)(param_3 + 0x40),*(int8 *)(param_3 + 0x48)
);
if (local_10 == 0) {
local_10 = 0;
}
else {
for (local_38 = 0; local_38 < *(ulong *)(param_3 + 0x40); local_38 = local_38 + 1) {
for (local_40 = 0; local_40 < *(ulong *)(param_3 + 0x48); local_40 = local_40 + 1) {
*(float *)(local_10 + local_38 * 0x10 + local_40 * 4) =
*(float *)(param_3 + local_38 * 0x10 + local_40 * 4) * param_1;
}
}
}
return local_10;
}
| |
49,048 | my_casedn_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->casedn_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
/*
In rare cases lower string can be shorter than
the original string, for example:
"U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE"
(which is 0xC4B0 in utf8mb3, i.e. two bytes)
is converted into
"U+0069 LATIN SMALL LETTER I"
(which is 0x69 in utf8mb3, i.e. one byte)
So, we need to put '\0' terminator after converting.
*/
*dst= '\0';
return (size_t) (dst - dst0);
} | O0 | c | my_casedn_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x79a0e
jmp 0x79a10
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x79a3e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0x7a7a0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x79a47
jmp 0x79a96
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x7aa60
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x7a960
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0x79a6f
jmp 0x79a96
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x79a10
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_casedn_str_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short $+2
loc_79A0E:
jmp short $+2
loc_79A10:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_79A3E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_utf8mb3_uni_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_79A3E:
mov al, [rbp+var_39]
test al, 1
jnz short loc_79A47
jmp short loc_79A96
loc_79A47:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_tolower_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_uni_utf8mb3_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_79A6F
jmp short loc_79A96
loc_79A6F:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_79A10
loc_79A96:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| _BYTE * my_casedn_str_utf8mb3(long long a1, _BYTE *a2)
{
bool v3; // [rsp+7h] [rbp-39h]
long long v4; // [rsp+8h] [rbp-38h]
_BYTE *v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h] BYREF
_BYTE *v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v9 = a2;
v5 = a2;
v4 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v3 = 0;
if ( *v9 )
{
v7 = my_utf8mb3_uni_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_tolower_utf8mb3(v4, &v8);
v6 = my_uni_utf8mb3_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
| my_casedn_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00179a0e
LAB_00179a0e:
JMP 0x00179a10
LAB_00179a10:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x00179a3e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x0017a7a0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_00179a3e:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x00179a47
JMP 0x00179a96
LAB_00179a47:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x0017aa60
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0017a960
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x00179a6f
JMP 0x00179a96
LAB_00179a6f:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00179a10
LAB_00179a96:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_casedn_str_utf8mb3(long param_1,char *param_2)
{
int8 uVar1;
bool bVar2;
int iVar3;
char *local_30;
int local_24;
int8 local_20;
char *local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_2;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_18 != '\0') {
local_24 = my_utf8mb3_uni_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_tolower_utf8mb3(uVar1,&local_20);
iVar3 = my_uni_utf8mb3_no_range(local_10,local_20,local_30);
if (iVar3 < 1) break;
local_18 = local_18 + local_24;
local_30 = local_30 + iVar3;
}
*local_30 = '\0';
return (long)local_30 - (long)param_2;
}
| |
49,049 | diag | eloqsql/libmariadb/unittest/mytap/tap.c | void
diag(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "# ");
vfprintf(tapout, fmt, ap);
emit_endl();
va_end(ap);
} | O3 | c | diag:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x16f7a
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0x30(%rbp), %r14
movq %rdi, 0x10(%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax # imm = 0x3000000008
movq %rax, (%r14)
movq 0x33012(%rip), %r15 # 0x49fb0
movq (%r15), %rdi
leaq 0x202a4(%rip), %rdx # 0x3724c
movl $0x1, %esi
xorl %eax, %eax
callq 0x13740
movq (%r15), %rdi
movl $0x1, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x13150
movq (%r15), %rdi
leaq 0x1f8cd(%rip), %rdx # 0x3689e
movl $0x1, %esi
xorl %eax, %eax
callq 0x13740
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| diag:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov rbx, rdi
lea rdi, [rbp+var_E0]
mov [rdi+8], rsi
mov [rdi+10h], rdx
mov [rdi+18h], rcx
mov [rdi+20h], r8
mov [rdi+28h], r9
test al, al
jz short loc_16F7A
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_16F7A:
lea r14, [rbp+var_30]
mov [r14+10h], rdi
lea rax, [rbp+arg_0]
mov [r14+8], rax
mov rax, 3000000008h
mov [r14], rax
mov r15, cs:stdout_ptr
mov rdi, [r15]
lea rdx, asc_3724C; "# "
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [r15]
mov esi, 1
mov rdx, rbx
mov rcx, r14
call ___vfprintf_chk
mov rdi, [r15]
lea rdx, aExecuteTestWit+28h; "\n"
mov esi, 1
xor eax, eax
call ___fprintf_chk
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long diag(
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 v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+8h] [rbp-D8h]
long long v18; // [rsp+10h] [rbp-D0h]
long long v19; // [rsp+18h] [rbp-C8h]
long long v20; // [rsp+20h] [rbp-C0h]
long long v21; // [rsp+28h] [rbp-B8h]
__m128 v22; // [rsp+30h] [rbp-B0h]
__m128 v23; // [rsp+40h] [rbp-A0h]
__m128 v24; // [rsp+50h] [rbp-90h]
__m128 v25; // [rsp+60h] [rbp-80h]
__m128 v26; // [rsp+70h] [rbp-70h]
__m128 v27; // [rsp+80h] [rbp-60h]
__m128 v28; // [rsp+90h] [rbp-50h]
__m128 v29; // [rsp+A0h] [rbp-40h]
_QWORD v30[6]; // [rsp+B0h] [rbp-30h] BYREF
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v17 = a2;
v18 = a3;
v19 = a4;
v20 = a5;
v21 = a6;
v30[2] = &v16;
v30[1] = &a15;
v30[0] = 0x3000000008LL;
__fprintf_chk(stdout, 1LL, "# ");
__vfprintf_chk(stdout, 1LL, a1, v30);
return __fprintf_chk(stdout, 1LL, "\n");
}
| diag:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDI
LEA RDI,[RBP + -0xe0]
MOV qword ptr [RDI + 0x8],RSI
MOV qword ptr [RDI + 0x10],RDX
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],R8
MOV qword ptr [RDI + 0x28],R9
TEST AL,AL
JZ 0x00116f7a
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00116f7a:
LEA R14,[RBP + -0x30]
MOV qword ptr [R14 + 0x10],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x3000000008
MOV qword ptr [R14],RAX
MOV R15,qword ptr [0x00149fb0]
MOV RDI,qword ptr [R15]
LEA RDX,[0x13724c]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00113740
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,RBX
MOV RCX,R14
CALL 0x00113150
MOV RDI,qword ptr [R15]
LEA RDX,[0x13689e]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00113740
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void diag(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)
{
int *puVar1;
char in_AL;
int1 local_e8 [8];
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int1 *local_30;
int1 *local_28;
puVar1 = PTR_stdout_00149fb0;
local_28 = local_e8;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_30 = &stack0x00000008;
local_38 = 0x3000000008;
local_e0 = param_10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
__fprintf_chk(*(int8 *)PTR_stdout_00149fb0,1,&DAT_0013724c);
__vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38);
__fprintf_chk(*(int8 *)puVar1,1,"\n");
return;
}
| |
49,050 | my_xml_attr_ensure_space | eloqsql/strings/xml.c | static int my_xml_attr_ensure_space(MY_XML_PARSER *st, size_t len)
{
size_t ofs= st->attr.end - st->attr.start;
len++; // Add terminating zero.
if (ofs + len > st->attr.buffer_size)
{
st->attr.buffer_size= (SIZE_T_MAX - len) / 2 > st->attr.buffer_size ?
st->attr.buffer_size * 2 + len : SIZE_T_MAX;
if (!st->attr.buffer)
{
st->attr.buffer= (char *) my_malloc(PSI_INSTRUMENT_ME, st->attr.buffer_size, MYF(0));
if (st->attr.buffer)
memcpy(st->attr.buffer, st->attr.static_buffer, ofs + 1 /*term. zero */);
}
else
st->attr.buffer= (char *) my_realloc(PSI_INSTRUMENT_ME, st->attr.buffer,
st->attr.buffer_size, MYF(0));
st->attr.start= st->attr.buffer;
st->attr.end= st->attr.start + ofs;
return st->attr.buffer ? MY_XML_OK : MY_XML_ERROR;
}
return MY_XML_OK;
} | O0 | c | my_xml_attr_ensure_space:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xe2d53
movq $-0x1, %rax
subq -0x18(%rbp), %rax
shrq %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xe2c55
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
shlq %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xe2c62
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xe2c62
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
jne 0xe2cd6
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x8a930
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0xe2cd4
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x88, %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
callq 0x292d0
jmp 0xe2d05
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x8ab00
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xe2d5a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_xml_attr_ensure_space:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+118h]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe loc_E2D53
mov rax, 0FFFFFFFFFFFFFFFFh
sub rax, [rbp+var_18]
shr rax, 1
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe short loc_E2C55
mov rax, [rbp+var_10]
mov rax, [rax+110h]
shl rax, 1
add rax, [rbp+var_18]
mov [rbp+var_28], rax
jmp short loc_E2C62
loc_E2C55:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp short $+2
loc_E2C62:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+110h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jnz short loc_E2CD6
mov rax, [rbp+var_10]
mov rsi, [rax+110h]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jz short loc_E2CD4
mov rax, [rbp+var_10]
mov rdi, [rax+108h]
mov rsi, [rbp+var_10]
add rsi, 88h
mov rdx, [rbp+var_20]
add rdx, 1
call _memcpy
loc_E2CD4:
jmp short loc_E2D05
loc_E2CD6:
mov rax, [rbp+var_10]
mov rsi, [rax+108h]
mov rax, [rbp+var_10]
mov rdx, [rax+110h]
xor edi, edi
xor eax, eax
mov ecx, eax
call my_realloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
loc_E2D05:
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov rax, [rbp+var_10]
mov [rax+118h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+118h]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+120h], rcx
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov eax, 1
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_E2D5A
loc_E2D53:
mov [rbp+var_4], 0
loc_E2D5A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| _BOOL8 my_xml_attr_ensure_space(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = *(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280);
v5 = a2 + 1;
if ( (unsigned long long)(a2 + 1 + v4) <= *(_QWORD *)(a1 + 272) )
{
return 0;
}
else
{
if ( (unsigned long long)(-1 - v5) >> 1 <= *(_QWORD *)(a1 + 272) )
v3 = -1LL;
else
v3 = v5 + 2LL * *(_QWORD *)(a1 + 272);
*(_QWORD *)(a1 + 272) = v3;
if ( *(_QWORD *)(a1 + 264) )
{
*(_QWORD *)(a1 + 264) = my_realloc(0, *(_QWORD *)(a1 + 264), *(const char **)(a1 + 272), 0);
}
else
{
*(_QWORD *)(a1 + 264) = my_malloc(0, *(const char **)(a1 + 272), 0);
if ( *(_QWORD *)(a1 + 264) )
memcpy(*(_QWORD *)(a1 + 264), a1 + 136, v4 + 1);
}
*(_QWORD *)(a1 + 280) = *(_QWORD *)(a1 + 264);
*(_QWORD *)(a1 + 288) = v4 + *(_QWORD *)(a1 + 280);
return *(_QWORD *)(a1 + 264) == 0LL;
}
}
| my_xml_attr_ensure_space:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x118]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001e2d53
MOV RAX,-0x1
SUB RAX,qword ptr [RBP + -0x18]
SHR RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001e2c55
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x110]
SHL RAX,0x1
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001e2c62
LAB_001e2c55:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001e2c62
LAB_001e2c62:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x110],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JNZ 0x001e2cd6
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0018a930
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JZ 0x001e2cd4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x108]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x88
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x1
CALL 0x001292d0
LAB_001e2cd4:
JMP 0x001e2d05
LAB_001e2cd6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0018ab00
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
LAB_001e2d05:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x118],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x118]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV EAX,0x1
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001e2d5a
LAB_001e2d53:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e2d5a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
bool my_xml_attr_ensure_space(long param_1,long param_2)
{
long lVar1;
int8 uVar2;
bool bVar3;
long local_30;
lVar1 = *(long *)(param_1 + 0x120) - *(long *)(param_1 + 0x118);
param_2 = param_2 + 1;
if (*(ulong *)(param_1 + 0x110) < (ulong)(lVar1 + param_2)) {
if (*(ulong *)(param_1 + 0x110) < -param_2 - 1U >> 1) {
local_30 = *(long *)(param_1 + 0x110) * 2 + param_2;
}
else {
local_30 = -1;
}
*(long *)(param_1 + 0x110) = local_30;
if (*(long *)(param_1 + 0x108) == 0) {
uVar2 = my_malloc(0,*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
if (*(long *)(param_1 + 0x108) != 0) {
memcpy(*(void **)(param_1 + 0x108),(void *)(param_1 + 0x88),lVar1 + 1);
}
}
else {
uVar2 = my_realloc(0,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
}
*(int8 *)(param_1 + 0x118) = *(int8 *)(param_1 + 0x108);
*(long *)(param_1 + 0x120) = *(long *)(param_1 + 0x118) + lVar1;
bVar3 = *(long *)(param_1 + 0x108) == 0;
}
else {
bVar3 = false;
}
return bVar3;
}
| |
49,051 | maria_ft_simple_get_word | eloqsql/storage/maria/ma_ft_parser.c | uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start,
const uchar *end, FT_WORD *word,
my_bool skip_stopwords)
{
uchar *doc= *start;
uint mwc, length;
int ctype, mbl;
DBUG_ENTER("maria_ft_simple_get_word");
do
{
for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
if (doc >= end)
DBUG_RETURN(0);
mbl= my_ci_ctype(cs, &ctype, doc, end);
if (true_word_char(ctype, *doc))
break;
}
mwc= length= 0;
for (word->pos= doc; doc < end; length++,
doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
mbl= my_ci_ctype(cs, &ctype, doc, end);
if (true_word_char(ctype, *doc))
mwc= 0;
else if (!misc_word_char(*doc) || mwc)
break;
else
mwc++;
}
word->len= (uint)(doc-word->pos) - mwc;
if (skip_stopwords == FALSE ||
(length >= ft_min_word_len && length < ft_max_word_len &&
!is_stopword((char *) word->pos, word->len)))
{
*start= doc;
DBUG_RETURN(1);
}
} while (doc < end);
DBUG_RETURN(0);
} | O3 | c | maria_ft_simple_get_word:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %rdx, %r12
movq %rdi, %r13
movq %rsi, -0x40(%rbp)
movq (%rsi), %r15
leaq -0x2c(%rbp), %rbx
movl $0x1, %r14d
cmpq %r12, %r15
jae 0x4263a
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq *0x38(%rax)
testb $0x7, -0x2c(%rbp)
jne 0x42590
cmpb $0x5f, (%r15)
je 0x42590
movl %eax, %ecx
negl %ecx
testl %eax, %eax
cmovel %r14d, %ecx
cmovgl %eax, %ecx
addq %rcx, %r15
jmp 0x42553
movq -0x38(%rbp), %rcx
movq %r15, (%rcx)
xorl %r14d, %r14d
cmpq %r12, %r15
jae 0x425e1
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq *0x38(%rax)
testb $0x7, -0x2c(%rbp)
jne 0x425c1
cmpb $0x5f, (%r15)
jne 0x425e8
incl %r14d
movl %eax, %ecx
negl %ecx
testl %eax, %eax
movl $0x1, %edx
cmovel %edx, %ecx
cmovgl %eax, %ecx
addq %rcx, %r15
cmpq %r12, %r15
jb 0x4259f
xorl %edx, %edx
jmp 0x425ea
movq %r15, %rdi
xorl %edx, %edx
jmp 0x425f4
movb $0x1, %dl
movq -0x38(%rbp), %rcx
movq (%rcx), %rdi
movl %r14d, %r14d
movq %r15, %rax
subq %rdi, %rax
movl %eax, 0x8(%rcx)
cmpb $0x0, -0x30(%rbp)
je 0x4264b
leaq 0x340bd6(%rip), %rcx # 0x3831e0
cmpq %r14, (%rcx)
ja 0x4262c
leaq 0x340bd2(%rip), %rcx # 0x3831e8
cmpq %r14, (%rcx)
jbe 0x4262c
movl %eax, %esi
movq %rdx, %r14
callq 0x71171
movq %r14, %rdx
testl %eax, %eax
je 0x4264b
testb %dl, %dl
movl $0x1, %r14d
jne 0x42553
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rax
movq %r15, (%rax)
movb $0x1, %al
jmp 0x4263c
| maria_ft_simple_get_word:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], r8d
mov [rbp+var_38], rcx
mov r12, rdx
mov r13, rdi
mov [rbp+var_40], rsi
mov r15, [rsi]
lea rbx, [rbp+var_2C]
mov r14d, 1
loc_42553:
cmp r15, r12
jnb loc_4263A
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, rbx
mov rdx, r15
mov rcx, r12
call qword ptr [rax+38h]
test [rbp+var_2C], 7
jnz short loc_42590
cmp byte ptr [r15], 5Fh ; '_'
jz short loc_42590
mov ecx, eax
neg ecx
test eax, eax
cmovz ecx, r14d
cmovg ecx, eax
add r15, rcx
jmp short loc_42553
loc_42590:
mov rcx, [rbp+var_38]
mov [rcx], r15
xor r14d, r14d
cmp r15, r12
jnb short loc_425E1
loc_4259F:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, rbx
mov rdx, r15
mov rcx, r12
call qword ptr [rax+38h]
test [rbp+var_2C], 7
jnz short loc_425C1
cmp byte ptr [r15], 5Fh ; '_'
jnz short loc_425E8
loc_425C1:
inc r14d
mov ecx, eax
neg ecx
test eax, eax
mov edx, 1
cmovz ecx, edx
cmovg ecx, eax
add r15, rcx
cmp r15, r12
jb short loc_4259F
xor edx, edx
jmp short loc_425EA
loc_425E1:
mov rdi, r15
xor edx, edx
jmp short loc_425F4
loc_425E8:
mov dl, 1
loc_425EA:
mov rcx, [rbp+var_38]
mov rdi, [rcx]
mov r14d, r14d
loc_425F4:
mov rax, r15
sub rax, rdi
mov [rcx+8], eax
cmp byte ptr [rbp+var_30], 0
jz short loc_4264B
lea rcx, ft_min_word_len
cmp [rcx], r14
ja short loc_4262C
lea rcx, ft_max_word_len
cmp [rcx], r14
jbe short loc_4262C
mov esi, eax
mov r14, rdx
call is_stopword
mov rdx, r14
test eax, eax
jz short loc_4264B
loc_4262C:
test dl, dl
mov r14d, 1
jnz loc_42553
loc_4263A:
xor eax, eax
loc_4263C:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4264B:
mov rax, [rbp+var_40]
mov [rax], r15
mov al, 1
jmp short loc_4263C
| char maria_ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, _QWORD *a4, char a5)
{
_BYTE *v7; // r15
int v8; // eax
long long v9; // rcx
_QWORD *v10; // rcx
unsigned long long v11; // r14
int v12; // eax
long long v13; // rcx
char v14; // dl
_BYTE *v15; // rdi
char v16; // r14
int v17; // eax
_BYTE v21[44]; // [rsp+14h] [rbp-2Ch] BYREF
v7 = *a2;
while ( 1 )
{
while ( 1 )
{
if ( (unsigned long long)v7 >= a3 )
return 0;
v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))(
a1,
v21,
v7,
a3);
if ( (v21[0] & 7) != 0 || *v7 == 95 )
break;
v9 = (unsigned int)-v8;
if ( !v8 )
v9 = 1LL;
if ( v8 > 0 )
v9 = (unsigned int)v8;
v7 += v9;
}
v10 = a4;
*a4 = v7;
v11 = 0LL;
if ( (unsigned long long)v7 >= a3 )
{
v15 = v7;
v14 = 0;
}
else
{
while ( 1 )
{
v12 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))(
a1,
v21,
v7,
a3);
if ( (v21[0] & 7) == 0 && *v7 != 95 )
break;
LODWORD(v11) = v11 + 1;
v13 = (unsigned int)-v12;
if ( !v12 )
v13 = 1LL;
if ( v12 > 0 )
v13 = (unsigned int)v12;
v7 += v13;
if ( (unsigned long long)v7 >= a3 )
{
v14 = 0;
goto LABEL_21;
}
}
v14 = 1;
LABEL_21:
v10 = a4;
v15 = (_BYTE *)*a4;
v11 = (unsigned int)v11;
}
*((_DWORD *)v10 + 2) = (_DWORD)v7 - (_DWORD)v15;
if ( !a5 )
break;
if ( ft_min_word_len <= v11 && ft_max_word_len > v11 )
{
v16 = v14;
v17 = is_stopword(v15, (unsigned int)((_DWORD)v7 - (_DWORD)v15));
v14 = v16;
if ( !v17 )
break;
}
if ( !v14 )
return 0;
}
*a2 = v7;
return 1;
}
| maria_ft_simple_get_word:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x38],RCX
MOV R12,RDX
MOV R13,RDI
MOV qword ptr [RBP + -0x40],RSI
MOV R15,qword ptr [RSI]
LEA RBX,[RBP + -0x2c]
MOV R14D,0x1
LAB_00142553:
CMP R15,R12
JNC 0x0014263a
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R12
CALL qword ptr [RAX + 0x38]
TEST byte ptr [RBP + -0x2c],0x7
JNZ 0x00142590
CMP byte ptr [R15],0x5f
JZ 0x00142590
MOV ECX,EAX
NEG ECX
TEST EAX,EAX
CMOVZ ECX,R14D
CMOVG ECX,EAX
ADD R15,RCX
JMP 0x00142553
LAB_00142590:
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX],R15
XOR R14D,R14D
CMP R15,R12
JNC 0x001425e1
LAB_0014259f:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R12
CALL qword ptr [RAX + 0x38]
TEST byte ptr [RBP + -0x2c],0x7
JNZ 0x001425c1
CMP byte ptr [R15],0x5f
JNZ 0x001425e8
LAB_001425c1:
INC R14D
MOV ECX,EAX
NEG ECX
TEST EAX,EAX
MOV EDX,0x1
CMOVZ ECX,EDX
CMOVG ECX,EAX
ADD R15,RCX
CMP R15,R12
JC 0x0014259f
XOR EDX,EDX
JMP 0x001425ea
LAB_001425e1:
MOV RDI,R15
XOR EDX,EDX
JMP 0x001425f4
LAB_001425e8:
MOV DL,0x1
LAB_001425ea:
MOV RCX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RCX]
MOV R14D,R14D
LAB_001425f4:
MOV RAX,R15
SUB RAX,RDI
MOV dword ptr [RCX + 0x8],EAX
CMP byte ptr [RBP + -0x30],0x0
JZ 0x0014264b
LEA RCX,[0x4831e0]
CMP qword ptr [RCX],R14
JA 0x0014262c
LEA RCX,[0x4831e8]
CMP qword ptr [RCX],R14
JBE 0x0014262c
MOV ESI,EAX
MOV R14,RDX
CALL 0x00171171
MOV RDX,R14
TEST EAX,EAX
JZ 0x0014264b
LAB_0014262c:
TEST DL,DL
MOV R14D,0x1
JNZ 0x00142553
LAB_0014263a:
XOR EAX,EAX
LAB_0014263c:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014264b:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R15
MOV AL,0x1
JMP 0x0014263c
|
int8
maria_ft_simple_get_word
(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5)
{
bool bVar1;
uint uVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
char *pcVar7;
char *pcVar8;
byte local_34 [4];
pcVar7 = (char *)*param_2;
do {
while( true ) {
if (param_3 <= pcVar7) {
return 0;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7,param_3);
if (((local_34[0] & 7) != 0) || (*pcVar7 == '_')) break;
uVar4 = (ulong)-uVar2;
if (uVar2 == 0) {
uVar4 = 1;
}
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
pcVar7 = pcVar7 + uVar4;
}
*param_4 = pcVar7;
uVar4 = 0;
if (pcVar7 < param_3) {
do {
uVar6 = (uint)uVar4;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7,param_3);
if (((local_34[0] & 7) == 0) && (*pcVar7 != '_')) {
bVar1 = true;
pcVar8 = pcVar7;
goto LAB_001425ea;
}
uVar6 = uVar6 + 1;
uVar4 = (ulong)uVar6;
uVar5 = (ulong)-uVar2;
if (uVar2 == 0) {
uVar5 = 1;
}
if (0 < (int)uVar2) {
uVar5 = (ulong)uVar2;
}
pcVar7 = pcVar7 + uVar5;
} while (pcVar7 < param_3);
bVar1 = false;
pcVar8 = pcVar7;
LAB_001425ea:
pcVar7 = (char *)*param_4;
uVar4 = (ulong)uVar6;
}
else {
bVar1 = false;
pcVar8 = pcVar7;
}
*(int *)(param_4 + 1) = (int)((long)pcVar8 - (long)pcVar7);
if ((param_5 == '\0') ||
(((ft_min_word_len <= uVar4 && (uVar4 < ft_max_word_len)) &&
(iVar3 = is_stopword(pcVar7,(long)pcVar8 - (long)pcVar7 & 0xffffffff), iVar3 == 0)))) {
*param_2 = pcVar8;
return 1;
}
pcVar7 = pcVar8;
if (!bVar1) {
return 0;
}
} while( true );
}
| |
49,052 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&) | llama.cpp/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0xc2baa
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x20680
movq %rax, %rbx
movq %r14, %rdi
callq 0x8e128
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x601c5(%rip), %rsi # 0x122d93
leaq 0x10(%rsp), %rdi
callq 0xc2c40
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0xbfb0c
xorl %ebp, %ebp
leaq 0xa1447(%rip), %rsi # 0x164040
leaq -0x48c08(%rip), %rdx # 0x79ff8
movq %rbx, %rdi
callq 0x20ab0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2c26
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xc2c30
jmp 0xc2c38
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f60
movq %r14, %rdi
callq 0x20b50
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_C2BAA
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_C2BAA:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2C26
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2C26:
test bpl, bpl
jnz short loc_C2C30
jmp short loc_C2C38
mov r14, rax
loc_C2C30:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C2C38:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
result = a1[8];
*a2 = result;
return result;
}
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x001c2baa
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001c2baa:
MOV EDI,0x20
CALL 0x00120680
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018e128
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001c2bc7:
LEA RSI,[0x222d93]
LEA RDI,[RSP + 0x10]
CALL 0x001c2c40
MOV BPL,0x1
LAB_001c2bdb:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001bfb0c
XOR EBP,EBP
LEA RSI,[0x264040]
LEA RDX,[0x179ff8]
MOV RDI,RBX
CALL 0x00120ab0
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001c2bc7 to 001c2bd7 has its CatchHandler @ 001c2c2d */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 001c2bdb to 001c2c07 has its CatchHandler @ 001c2c08 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
| |
49,053 | mcp::server::set_server_info(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&) | hkr04[P]cpp-mcp/src/mcp_server.cpp | void server::set_server_info(const std::string& name, const std::string& version) {
std::lock_guard<std::mutex> lock(mutex_);
name_ = name;
version_ = version;
} | O2 | cpp | mcp::server::set_server_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x298(%rdi), %rbx
movq %rbx, %rdi
callq 0x19f50
leaq 0x28(%r15), %rdi
movq %r12, %rsi
callq 0xa3a0
addq $0x48, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xa3a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa550
movq %rax, %r14
movq %rbx, %rdi
callq 0xa550
movq %r14, %rdi
callq 0xaac0
nop
| _ZN3mcp6server15set_server_infoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r12, rsi
mov r15, rdi
lea rbx, [rdi+298h]
mov rdi, rbx; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea rdi, [r15+28h]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
add r15, 48h ; 'H'
mov rdi, r15
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _pthread_mutex_unlock
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long mcp::server::set_server_info(long long a1, long long a2, long long a3)
{
std::mutex::lock((std::mutex *)(a1 + 664));
std::string::_M_assign(a1 + 40, a2);
std::string::_M_assign(a1 + 72, a3);
return pthread_mutex_unlock(a1 + 664);
}
| set_server_info:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
LEA RBX,[RDI + 0x298]
MOV RDI,RBX
CALL 0x00119f50
LEA RDI,[R15 + 0x28]
LAB_001109d4:
MOV RSI,R12
CALL 0x0010a3a0
ADD R15,0x48
MOV RDI,R15
MOV RSI,R14
CALL 0x0010a3a0
LAB_001109eb:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0010a550
|
/* mcp::server::set_server_info(std::__cxx11::string const&, std::__cxx11::string const&) */
void mcp::server::set_server_info(string *param_1,string *param_2)
{
std::mutex::lock((mutex *)&((pthread_mutex_t *)(param_1 + 0x298))->__data);
/* try { // try from 001109d4 to 001109ea has its CatchHandler @ 001109fe */
std::__cxx11::string::_M_assign(param_1 + 0x28);
std::__cxx11::string::_M_assign(param_1 + 0x48);
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x298));
return;
}
| |
49,054 | mcp::server::set_server_info(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&) | hkr04[P]cpp-mcp/src/mcp_server.cpp | void server::set_server_info(const std::string& name, const std::string& version) {
std::lock_guard<std::mutex> lock(mutex_);
name_ = name;
version_ = version;
} | O3 | cpp | mcp::server::set_server_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x298(%rdi), %rbx
movq %rbx, %rdi
callq 0xa8d0
testl %eax, %eax
jne 0x12a30
leaq 0x28(%r15), %rdi
movq %r12, %rsi
callq 0xa350
addq $0x48, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xa350
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa4f0
movl %eax, %edi
callq 0xa410
movq %rax, %r14
movq %rbx, %rdi
callq 0xa4f0
movq %r14, %rdi
callq 0xaa50
| _ZN3mcp6server15set_server_infoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r12, rsi
mov r15, rdi
lea rbx, [rdi+298h]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_12A30
lea rdi, [r15+28h]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
add r15, 48h ; 'H'
mov rdi, r15
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _pthread_mutex_unlock
loc_12A30:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long mcp::server::set_server_info(long long a1, long long a2, long long a3)
{
int v4; // eax
v4 = pthread_mutex_lock(a1 + 664);
if ( v4 )
std::__throw_system_error(v4);
std::string::_M_assign(a1 + 40, a2);
std::string::_M_assign(a1 + 72, a3);
return pthread_mutex_unlock(a1 + 664);
}
| set_server_info:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
LEA RBX,[RDI + 0x298]
MOV RDI,RBX
CALL 0x0010a8d0
TEST EAX,EAX
JNZ 0x00112a30
LEA RDI,[R15 + 0x28]
LAB_00112a06:
MOV RSI,R12
CALL 0x0010a350
ADD R15,0x48
MOV RDI,R15
MOV RSI,R14
CALL 0x0010a350
LAB_00112a1d:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0010a4f0
LAB_00112a30:
MOV EDI,EAX
CALL 0x0010a410
|
/* mcp::server::set_server_info(std::__cxx11::string const&, std::__cxx11::string const&) */
void mcp::server::set_server_info(string *param_1,string *param_2)
{
int iVar1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x298));
if (iVar1 == 0) {
/* try { // try from 00112a06 to 00112a1c has its CatchHandler @ 00112a37 */
std::__cxx11::string::_M_assign(param_1 + 0x28);
std::__cxx11::string::_M_assign(param_1 + 0x48);
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x298));
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
| |
49,055 | make_empty_page | eloqsql/storage/maria/ma_blockrec.c | static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
} | O3 | c | make_empty_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x7bc(%rax), %r13d
movl 0xc18(%rax), %edx
addl $0xc, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x2a2a0
cmpl $0x3, %r12d
je 0x4e87f
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
leaq (%rbx,%rax), %rdi
movl %r13d, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movb %r12b, 0x7(%rbx)
movb %r15b, 0x8(%rbx)
movb $-0x1, 0x9(%rbx)
testb %r15b, %r15b
je 0x4e8ad
addl $-0x8, %r13d
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, (%rbx,%r13)
movw $0x0, 0x2(%rbx,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| make_empty_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi]
mov r13d, [rax+7BCh]
mov edx, [rax+0C18h]
add edx, 0Ch
mov rdi, rsi
xor esi, esi
call _memset
cmp r12d, 3
jz short loc_4E87F
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
lea rdi, [rbx+rax]
mov edx, r13d
sub edx, eax
xor esi, esi
call _memset
loc_4E87F:
mov [rbx+7], r12b
mov [rbx+8], r15b
mov byte ptr [rbx+9], 0FFh
test r15b, r15b
jz short loc_4E8AD
add r13d, 0FFFFFFF8h
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
mov [rbx+r13], ax
mov word ptr [rbx+r13+2], 0
loc_4E8AD:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
int v6; // r13d
long long result; // rax
long long v8; // rax
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
result = memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
{
v8 = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
result = memset(&a2[v8], 0LL, (unsigned int)(v6 - v8));
}
a2[7] = a3;
a2[8] = a4;
a2[9] = -1;
if ( a4 )
{
result = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
*(_DWORD *)&a2[v6 - 8] = (unsigned __int16)(*(_WORD *)(*(_QWORD *)a1 + 3096LL) + 12);
}
return result;
}
| make_empty_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV R13D,dword ptr [RAX + 0x7bc]
MOV EDX,dword ptr [RAX + 0xc18]
ADD EDX,0xc
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0012a2a0
CMP R12D,0x3
JZ 0x0014e87f
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
LEA RDI,[RBX + RAX*0x1]
MOV EDX,R13D
SUB EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
LAB_0014e87f:
MOV byte ptr [RBX + 0x7],R12B
MOV byte ptr [RBX + 0x8],R15B
MOV byte ptr [RBX + 0x9],0xff
TEST R15B,R15B
JZ 0x0014e8ad
ADD R13D,-0x8
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV word ptr [RBX + R13*0x1],AX
MOV word ptr [RBX + R13*0x1 + 0x2],0x0
LAB_0014e8ad:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
uint uVar2;
ulong uVar3;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
uVar2 = *(int *)(*param_1 + 0xc18) + 0xc;
memset((void *)((long)param_2 + (ulong)uVar2),0,(ulong)(iVar1 - uVar2));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
uVar3 = (ulong)(iVar1 - 8);
*(short *)((long)param_2 + uVar3) = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
*(int2 *)((long)param_2 + uVar3 + 2) = 0;
}
return;
}
| |
49,056 | CLI::Formatter::make_groups[abi:cxx11](CLI::App const*, CLI::AppFormatMode) const | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp | CLI11_INLINE std::string Formatter::make_groups(const App *app, AppFormatMode mode) const {
std::stringstream out;
std::vector<std::string> groups = app->get_groups();
// Options
for(const std::string &group : groups) {
std::vector<const Option *> opts = app->get_options([app, mode, &group](const Option *opt) {
return opt->get_group() == group // Must be in the right group
&& opt->nonpositional() // Must not be a positional
&& (mode != AppFormatMode::Sub // If mode is Sub, then
|| (app->get_help_ptr() != opt // Ignore help pointer
&& app->get_help_all_ptr() != opt)); // Ignore help all pointer
});
if(!group.empty() && !opts.empty()) {
out << make_group(group, false, opts);
if(group != groups.back())
out << "\n";
}
}
return out.str();
} | O1 | cpp | CLI::Formatter::make_groups[abi:cxx11](CLI::App const*, CLI::AppFormatMode) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, 0xb0(%rsp)
movq %rdi, %r13
leaq 0xd0(%rsp), %rdi
callq 0x72d0
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0xd8(%r14), %r15
movq 0xe0(%r14), %r12
cmpq %r12, %r15
je 0x2c3bc
leaq 0x20(%rsp), %rbx
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%r15), %rdx
callq 0x12f61
cmpq 0x28(%rsp), %rax
jne 0x2c3b3
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x12a9c
addq $0x8, %r15
cmpq %r12, %r15
jne 0x2c38f
movq %r13, 0xa8(%rsp)
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %r13
cmpq %r13, %r15
je 0x2c5f0
leaq 0x40(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movl $0x18, %edi
callq 0x7420
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rax, 0x40(%rsp)
leaq 0x3d1(%rip), %rax # 0x2c7da
movq %rax, 0x58(%rsp)
leaq 0x3cd(%rip), %rax # 0x2c7e2
movq %rax, 0x50(%rsp)
movq 0xe0(%r14), %rsi
subq 0xd8(%r14), %rsi
sarq $0x3, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x130c0
movq 0xd8(%r14), %rax
movq 0xe0(%r14), %rcx
cmpq %rcx, %rax
je 0x2c469
movq 0x8(%rsp), %rdx
movq (%rax), %rsi
movq %rsi, (%rdx)
addq $0x8, %rax
addq $0x8, %rdx
cmpq %rcx, %rax
jne 0x2c456
cmpq $0x0, 0x50(%rsp)
je 0x2c48f
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x13165
cmpq 0x10(%rsp), %rax
je 0x2c48f
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x2c4a6
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
cmpq $0x0, 0x8(%r15)
je 0x2c5cc
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x2c5cc
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x178c0
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2c75a
movq 0xb0(%rsp), %rsi
movq (%rsi), %rax
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq *0x18(%rax)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x74b0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2c556
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x2c573
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x7430
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x2c58f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x28(%rsp), %rax
movq 0x8(%r15), %rdx
cmpq -0x18(%rax), %rdx
jne 0x2c5b3
testq %rdx, %rdx
je 0x2c5cc
movq -0x20(%rax), %rsi
movq (%r15), %rdi
callq 0x7450
testl %eax, %eax
je 0x2c5cc
movl $0x1, %edx
leaq 0xe0(%rsp), %rdi
leaq 0xb7bc(%rip), %rsi # 0x37d83
callq 0x74b0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2c5e3
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x7430
addq $0x20, %r15
cmpq %r13, %r15
jne 0x2c3dc
leaq 0xe8(%rsp), %rsi
movq 0xa8(%rsp), %rbx
movq %rbx, %rdi
callq 0x7680
leaq 0x20(%rsp), %rdi
callq 0xaf62
movq 0x1d92f(%rip), %rsi # 0x49f48
leaq 0xd0(%rsp), %rdi
callq 0x7330
leaq 0x150(%rsp), %rdi
callq 0x7150
movq %rbx, %rax
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c723
jmp 0x2c65e
jmp 0x2c723
movq %rax, %rbx
jmp 0x2c68b
movq %rax, %rbx
jmp 0x2c6a8
movq %rax, %rbx
jmp 0x2c6c4
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2c68b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x2c6a8
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x7430
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x2c6c4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2c726
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x7430
jmp 0x2c726
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2c700
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x7430
jmp 0x2c700
jmp 0x2c71b
jmp 0x2c723
movq %rax, %rbx
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x2c726
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2c726
movq %rax, %rdi
callq 0xc892
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xaf62
movq 0x1d811(%rip), %rsi # 0x49f48
leaq 0xd0(%rsp), %rdi
callq 0x7330
leaq 0x150(%rsp), %rdi
callq 0x7150
movq %rbx, %rdi
callq 0x7780
nop
| _ZNK3CLI9Formatter11make_groupsB5cxx11EPKNS_3AppENS_13AppFormatModeE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov ebp, ecx
mov r14, rdx
mov [rsp+288h+var_1D8], rsi
mov r13, rdi
lea rdi, [rsp+288h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
xorps xmm0, xmm0
movaps [rsp+288h+var_268], xmm0
mov [rsp+288h+var_258], 0
mov r15, [r14+0D8h]
mov r12, [r14+0E0h]
cmp r15, r12
jz short loc_2C3BC
lea rbx, [rsp+288h+var_268]
loc_2C38F:
mov rdi, qword ptr [rsp+288h+var_268]
mov rsi, qword ptr [rsp+288h+var_268+8]
mov rdx, [r15]
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops16_Iter_equals_valIKS7_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>,std::random_access_iterator_tag)
cmp rax, qword ptr [rsp+288h+var_268+8]
jnz short loc_2C3B3
mov rsi, [r15]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
loc_2C3B3:
add r15, 8
cmp r15, r12
jnz short loc_2C38F
loc_2C3BC:
mov [rsp+288h+var_1E0], r13
mov r15, qword ptr [rsp+288h+var_268]
mov r13, qword ptr [rsp+288h+var_268+8]
cmp r15, r13
jz loc_2C5F0
lea r12, [rsp+288h+var_248]
loc_2C3DC:
xorps xmm0, xmm0
movaps [rsp+288h+var_248], xmm0
movaps [rsp+288h+var_238], xmm0
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r14
mov [rax+8], ebp
mov [rax+10h], r15
mov qword ptr [rsp+288h+var_248], rax
lea rax, _ZNSt17_Function_handlerIFbPKN3CLI6OptionEEZNKS0_9Formatter11make_groupsB5cxx11EPKNS0_3AppENS0_13AppFormatModeEEUlS3_E_E9_M_invokeERKSt9_Any_dataOS3_; std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_groups(CLI::App const*,CLI::AppFormatMode)::{lambda(CLI::Option const*)#1}>::_M_invoke(std::_Any_data const&,CLI::Option const*&&)
mov qword ptr [rsp+288h+var_238+8], rax
lea rax, _ZNSt17_Function_handlerIFbPKN3CLI6OptionEEZNKS0_9Formatter11make_groupsB5cxx11EPKNS0_3AppENS0_13AppFormatModeEEUlS3_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation; std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_groups(CLI::App const*,CLI::AppFormatMode)::{lambda(CLI::Option const*)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+288h+var_238], rax
mov rsi, [r14+0E0h]
sub rsi, [r14+0D8h]
sar rsi, 3
lea rdi, [rsp+288h+var_280]
lea rdx, [rsp+288h+var_200]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EEC2EmRKS4_; std::vector<CLI::Option const*>::vector(ulong,std::allocator<CLI::Option const*> const&)
mov rax, [r14+0D8h]
mov rcx, [r14+0E0h]
cmp rax, rcx
jz short loc_2C469
mov rdx, [rsp+288h+var_280]
loc_2C456:
mov rsi, [rax]
mov [rdx], rsi
add rax, 8
add rdx, 8
cmp rax, rcx
jnz short loc_2C456
loc_2C469:
cmp qword ptr [rsp+288h+var_238], 0
jz short loc_2C48F
mov rdi, [rsp+288h+var_280]
mov rsi, [rsp+288h+var_278]
mov rdx, r12
call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPKN3CLI6OptionESt6vectorIS5_SaIS5_EEEENS0_5__ops10_Iter_predIZNKS2_3App11get_optionsESt8functionIFbS5_EEEUlS5_E_EEET_SJ_SJ_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>>(__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>)
cmp rax, [rsp+288h+var_278]
jz short loc_2C48F
mov [rsp+288h+var_278], rax
loc_2C48F:
mov rax, qword ptr [rsp+288h+var_238]
test rax, rax
jz short loc_2C4A6
mov rdi, r12
mov rsi, r12
mov edx, 3
call rax
loc_2C4A6:
cmp qword ptr [r15+8], 0
jz loc_2C5CC
mov rax, [rsp+288h+var_280]
cmp rax, [rsp+288h+var_278]
jz loc_2C5CC
lea rax, [rsp+288h+var_210]
mov [rsp+288h+var_220], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
lea rdi, [rsp+288h+var_220]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rbx, [rsp+288h+var_1D0]
mov rdi, rbx
lea rsi, [rsp+288h+var_280]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EEC2ERKS5_; std::vector<CLI::Option const*>::vector(std::vector<CLI::Option const*> const&)
mov rsi, [rsp+288h+var_1D8]
mov rax, [rsi]
lea rdi, [rsp+288h+var_200]
lea rdx, [rsp+288h+var_220]
xor ecx, ecx
mov r8, rbx
call qword ptr [rax+18h]
mov rsi, [rsp+288h+var_200]
mov rdx, [rsp+288h+var_1F8]
lea rdi, [rsp+288h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+288h+var_200]; void *
lea rax, [rsp+288h+var_1F0]
cmp rdi, rax
jz short loc_2C556
mov rsi, [rsp+288h+var_1F0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C556:
mov rdi, [rsp+288h+var_1D0]; void *
test rdi, rdi
jz short loc_2C573
mov rsi, [rsp+288h+var_1C0]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C573:
mov rdi, [rsp+288h+var_220]; void *
lea rax, [rsp+288h+var_210]
cmp rdi, rax
jz short loc_2C58F
mov rsi, [rsp+288h+var_210]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C58F:
mov rax, qword ptr [rsp+288h+var_268+8]
mov rdx, [r15+8]
cmp rdx, [rax-18h]
jnz short loc_2C5B3
test rdx, rdx
jz short loc_2C5CC
mov rsi, [rax-20h]
mov rdi, [r15]
call _bcmp
test eax, eax
jz short loc_2C5CC
loc_2C5B3:
mov edx, 1
lea rdi, [rsp+288h+var_1A8]
lea rsi, asc_37D82+1; "\n"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_2C5CC:
mov rdi, [rsp+288h+var_280]; void *
test rdi, rdi
jz short loc_2C5E3
mov rsi, [rsp+288h+var_270]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C5E3:
add r15, 20h ; ' '
cmp r15, r13
jnz loc_2C3DC
loc_2C5F0:
lea rsi, [rsp+288h+var_1A0]
mov rbx, [rsp+288h+var_1E0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+288h+var_268]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+288h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+288h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_2C723
jmp short loc_2C65E
jmp loc_2C723
mov rbx, rax
jmp short loc_2C68B
mov rbx, rax
jmp short loc_2C6A8
loc_2C65E:
mov rbx, rax
jmp short loc_2C6C4
mov rbx, rax
mov rdi, [rsp+288h+var_200]; void *
lea rax, [rsp+288h+var_1F0]
cmp rdi, rax
jz short loc_2C68B
mov rsi, [rsp+288h+var_1F0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C68B:
mov rdi, [rsp+288h+var_1D0]; void *
test rdi, rdi
jz short loc_2C6A8
mov rsi, [rsp+288h+var_1C0]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C6A8:
mov rdi, [rsp+288h+var_220]; void *
lea rax, [rsp+288h+var_210]
cmp rdi, rax
jz short loc_2C6C4
mov rsi, [rsp+288h+var_210]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C6C4:
mov rdi, [rsp+288h+var_280]; void *
test rdi, rdi
jz short loc_2C726
mov rsi, [rsp+288h+var_270]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2C726
mov rbx, rax
mov rdi, [rsp+288h+var_280]; void *
test rdi, rdi
jz short loc_2C700
mov rsi, [rsp+288h+var_270]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2C700
jmp short loc_2C71B
jmp short loc_2C723
mov rbx, rax
loc_2C700:
mov rax, qword ptr [rsp+288h+var_238]
test rax, rax
jz short loc_2C726
lea rdi, [rsp+288h+var_248]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_2C726
loc_2C71B:
mov rdi, rax
call __clang_call_terminate
loc_2C723:
mov rbx, rax
loc_2C726:
lea rdi, [rsp+288h+var_268]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+288h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+288h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long CLI::Formatter::make_groups[abi:cxx11](long long a1, long long a2, long long a3, int a4)
{
long long *v6; // r15
long long *i; // r12
long long v8; // rax
_QWORD *v9; // r13
_QWORD *j; // r15
long long v11; // rax
_QWORD *v12; // rax
_QWORD *v13; // rcx
_QWORD *v14; // rdx
_QWORD *v15; // rax
long long v16; // rdx
long long v17; // rbx
void *v19; // [rsp+8h] [rbp-280h] BYREF
_QWORD *v20; // [rsp+10h] [rbp-278h]
long long v21; // [rsp+18h] [rbp-270h]
__int128 v22; // [rsp+20h] [rbp-268h] BYREF
long long v23; // [rsp+30h] [rbp-258h]
__int128 v24; // [rsp+40h] [rbp-248h] BYREF
__int128 v25; // [rsp+50h] [rbp-238h]
void *v26[2]; // [rsp+68h] [rbp-220h] BYREF
_QWORD v27[2]; // [rsp+78h] [rbp-210h] BYREF
void *v28[2]; // [rsp+88h] [rbp-200h] BYREF
long long v29; // [rsp+98h] [rbp-1F0h] BYREF
long long v30; // [rsp+A8h] [rbp-1E0h]
long long v31; // [rsp+B0h] [rbp-1D8h]
void *v32[3]; // [rsp+B8h] [rbp-1D0h] BYREF
_BYTE v33[16]; // [rsp+D0h] [rbp-1B8h] BYREF
_BYTE v34[8]; // [rsp+E0h] [rbp-1A8h] BYREF
_BYTE v35[104]; // [rsp+E8h] [rbp-1A0h] BYREF
_BYTE v36[312]; // [rsp+150h] [rbp-138h] BYREF
v31 = a2;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v33);
v22 = 0LL;
v23 = 0LL;
v6 = *(long long **)(a3 + 216);
for ( i = *(long long **)(a3 + 224); v6 != i; ++v6 )
{
v8 = std::__find_if<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(
v22,
*((long long *)&v22 + 1),
*v6);
if ( v8 == *((_QWORD *)&v22 + 1) )
std::vector<std::string>::push_back((long long)&v22, (_QWORD *)*v6);
}
v30 = a1;
v9 = (_QWORD *)*((_QWORD *)&v22 + 1);
for ( j = (_QWORD *)v22; j != v9; j += 4 )
{
v24 = 0LL;
v25 = 0LL;
v11 = operator new(0x18uLL);
*(_QWORD *)v11 = a3;
*(_DWORD *)(v11 + 8) = a4;
*(_QWORD *)(v11 + 16) = j;
*(_QWORD *)&v24 = v11;
*((_QWORD *)&v25 + 1) = std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_groups[abi:cxx11](CLI::App const*,CLI::AppFormatMode)::{lambda(CLI::Option const*)#1}>::_M_invoke;
*(_QWORD *)&v25 = std::_Function_handler<bool ()(CLI::Option const*),CLI::Formatter::make_groups[abi:cxx11](CLI::App const*,CLI::AppFormatMode)::{lambda(CLI::Option const*)#1}>::_M_manager;
std::vector<CLI::Option const*>::vector(
(long long)&v19,
(long long)(*(_QWORD *)(a3 + 224) - *(_QWORD *)(a3 + 216)) >> 3);
v12 = *(_QWORD **)(a3 + 216);
v13 = *(_QWORD **)(a3 + 224);
if ( v12 != v13 )
{
v14 = v19;
do
*v14++ = *v12++;
while ( v12 != v13 );
}
if ( (_QWORD)v25 )
{
v15 = std::__remove_if<__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>>(
(long long)v19,
v20,
(long long)&v24);
if ( v15 != v20 )
v20 = v15;
}
if ( (_QWORD)v25 )
((void ( *)(__int128 *, __int128 *, long long))v25)(&v24, &v24, 3LL);
if ( j[1] && v19 != v20 )
{
v26[0] = v27;
std::string::_M_construct<char *>(v26, (_BYTE *)*j, *j + j[1]);
std::vector<CLI::Option const*>::vector(v32, &v19);
(*(void ( **)(void **, long long, void **, _QWORD, void **))(*(_QWORD *)v31 + 24LL))(
v28,
v31,
v26,
0LL,
v32);
std::__ostream_insert<char,std::char_traits<char>>(v34, v28[0], v28[1]);
if ( v28[0] != &v29 )
operator delete(v28[0], v29 + 1);
if ( v32[0] )
operator delete(v32[0], (char *)v32[2] - (char *)v32[0]);
if ( v26[0] != v27 )
operator delete(v26[0], v27[0] + 1LL);
v16 = j[1];
if ( v16 != *(_QWORD *)(*((_QWORD *)&v22 + 1) - 24LL)
|| v16 && (unsigned int)bcmp(*j, *(_QWORD *)(*((_QWORD *)&v22 + 1) - 32LL)) )
{
std::__ostream_insert<char,std::char_traits<char>>(v34, "\n", 1LL);
}
}
if ( v19 )
operator delete(v19, v21 - (_QWORD)v19);
}
v17 = v30;
std::stringbuf::str(v30, v35);
std::vector<std::string>::~vector(&v22);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v33,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v36);
return v17;
}
| make_groups[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV EBP,ECX
MOV R14,RDX
MOV qword ptr [RSP + 0xb0],RSI
MOV R13,RDI
LEA RDI,[RSP + 0xd0]
CALL 0x001072d0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOV R15,qword ptr [R14 + 0xd8]
MOV R12,qword ptr [R14 + 0xe0]
CMP R15,R12
JZ 0x0012c3bc
LEA RBX,[RSP + 0x20]
LAB_0012c38f:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [R15]
LAB_0012c39c:
CALL 0x00112f61
CMP RAX,qword ptr [RSP + 0x28]
JNZ 0x0012c3b3
MOV RSI,qword ptr [R15]
LAB_0012c3ab:
MOV RDI,RBX
CALL 0x00112a9c
LAB_0012c3b3:
ADD R15,0x8
CMP R15,R12
JNZ 0x0012c38f
LAB_0012c3bc:
MOV qword ptr [RSP + 0xa8],R13
MOV R15,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x28]
CMP R15,R13
JZ 0x0012c5f0
LEA R12,[RSP + 0x40]
LAB_0012c3dc:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
LAB_0012c3e9:
MOV EDI,0x18
CALL 0x00107420
MOV qword ptr [RAX],R14
MOV dword ptr [RAX + 0x8],EBP
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RSP + 0x40],RAX
LEA RAX,[0x12c7da]
MOV qword ptr [RSP + 0x58],RAX
LEA RAX,[0x12c7e2]
MOV qword ptr [RSP + 0x50],RAX
MOV RSI,qword ptr [R14 + 0xe0]
SUB RSI,qword ptr [R14 + 0xd8]
SAR RSI,0x3
LAB_0012c42c:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x88]
CALL 0x001130c0
MOV RAX,qword ptr [R14 + 0xd8]
MOV RCX,qword ptr [R14 + 0xe0]
CMP RAX,RCX
JZ 0x0012c469
MOV RDX,qword ptr [RSP + 0x8]
LAB_0012c456:
MOV RSI,qword ptr [RAX]
MOV qword ptr [RDX],RSI
ADD RAX,0x8
ADD RDX,0x8
CMP RAX,RCX
JNZ 0x0012c456
LAB_0012c469:
CMP qword ptr [RSP + 0x50],0x0
JZ 0x0012c48f
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LAB_0012c47b:
MOV RDX,R12
CALL 0x00113165
CMP RAX,qword ptr [RSP + 0x10]
JZ 0x0012c48f
MOV qword ptr [RSP + 0x10],RAX
LAB_0012c48f:
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x0012c4a6
LAB_0012c499:
MOV RDI,R12
MOV RSI,R12
MOV EDX,0x3
CALL RAX
LAB_0012c4a6:
CMP qword ptr [R15 + 0x8],0x0
JZ 0x0012c5cc
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x10]
JZ 0x0012c5cc
LEA RAX,[RSP + 0x78]
MOV qword ptr [RSP + 0x68],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_0012c4d5:
LEA RDI,[RSP + 0x68]
CALL 0x001178c0
LAB_0012c4df:
LEA RBX,[RSP + 0xb8]
MOV RDI,RBX
LEA RSI,[RSP + 0x8]
CALL 0x0012c75a
MOV RSI,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSI]
LAB_0012c4ff:
LEA RDI,[RSP + 0x88]
LEA RDX,[RSP + 0x68]
XOR ECX,ECX
MOV R8,RBX
CALL qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
LAB_0012c524:
LEA RDI,[RSP + 0xe0]
CALL 0x001074b0
MOV RDI,qword ptr [RSP + 0x88]
LEA RAX,[RSP + 0x98]
CMP RDI,RAX
JZ 0x0012c556
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x00107430
LAB_0012c556:
MOV RDI,qword ptr [RSP + 0xb8]
TEST RDI,RDI
JZ 0x0012c573
MOV RSI,qword ptr [RSP + 0xc8]
SUB RSI,RDI
CALL 0x00107430
LAB_0012c573:
MOV RDI,qword ptr [RSP + 0x68]
LEA RAX,[RSP + 0x78]
CMP RDI,RAX
JZ 0x0012c58f
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00107430
LAB_0012c58f:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [R15 + 0x8]
CMP RDX,qword ptr [RAX + -0x18]
JNZ 0x0012c5b3
TEST RDX,RDX
JZ 0x0012c5cc
MOV RSI,qword ptr [RAX + -0x20]
MOV RDI,qword ptr [R15]
CALL 0x00107450
TEST EAX,EAX
JZ 0x0012c5cc
LAB_0012c5b3:
MOV EDX,0x1
LEA RDI,[RSP + 0xe0]
LEA RSI,[0x137d83]
CALL 0x001074b0
LAB_0012c5cc:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012c5e3
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,RDI
CALL 0x00107430
LAB_0012c5e3:
ADD R15,0x20
CMP R15,R13
JNZ 0x0012c3dc
LAB_0012c5f0:
LEA RSI,[RSP + 0xe8]
LAB_0012c5f8:
MOV RBX,qword ptr [RSP + 0xa8]
MOV RDI,RBX
CALL 0x00107680
LEA RDI,[RSP + 0x20]
CALL 0x0010af62
MOV RSI,qword ptr [0x00149f48]
LEA RDI,[RSP + 0xd0]
CALL 0x00107330
LEA RDI,[RSP + 0x150]
CALL 0x00107150
MOV RAX,RBX
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CLI::Formatter::make_groups[abi:cxx11](CLI::App const*, CLI::AppFormatMode) const */
int8
CLI::Formatter::make_groups_abi_cxx11_
(int8 param_1,long *param_2,long param_3,int4 param_4)
{
int8 *puVar1;
size_t __n;
int8 uVar2;
int iVar3;
long *plVar4;
int8 *puVar5;
int8 *puVar6;
long *plVar7;
int8 *local_280;
int8 *local_278;
long local_270;
long *local_268;
long *plStack_260;
int8 local_258;
long *local_248;
int8 uStack_240;
code *local_238;
code *pcStack_230;
long *local_220 [2];
long local_210 [2];
long *local_200;
long local_1f8;
long local_1f0 [2];
int8 local_1e0;
long *local_1d8;
void *local_1d0 [2];
long local_1c0;
stringstream local_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
local_1d8 = param_2;
std::__cxx11::stringstream::stringstream(local_1b8);
local_268 = (long *)0x0;
plStack_260 = (long *)0x0;
local_258 = 0;
puVar5 = *(int8 **)(param_3 + 0xd8);
puVar1 = *(int8 **)(param_3 + 0xe0);
if (puVar5 != puVar1) {
do {
/* try { // try from 0012c39c to 0012c3a0 has its CatchHandler @ 0012c723 */
plVar4 = (long *)std::
__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>>
(local_268,plStack_260,*puVar5);
if (plVar4 == plStack_260) {
/* try { // try from 0012c3ab to 0012c3b2 has its CatchHandler @ 0012c64f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_268,
(string *)*puVar5);
}
puVar5 = puVar5 + 1;
} while (puVar5 != puVar1);
}
plVar4 = plStack_260;
local_1e0 = param_1;
if (local_268 != plStack_260) {
plVar7 = local_268;
do {
local_248 = (long *)0x0;
uStack_240 = 0;
local_238 = (code *)0x0;
pcStack_230 = (code *)0x0;
/* try { // try from 0012c3e9 to 0012c3f2 has its CatchHandler @ 0012c6fb */
local_248 = (long *)operator_new(0x18);
*local_248 = param_3;
*(int4 *)(local_248 + 1) = param_4;
local_248[2] = (long)plVar7;
pcStack_230 = std::
_Function_handler<bool(CLI::Option_const*),CLI::Formatter::make_groups[abi:cxx11](CLI::App_const*,CLI::AppFormatMode)const::{lambda(CLI::Option_const*)#1}>
::_M_invoke;
local_238 = std::
_Function_handler<bool(CLI::Option_const*),CLI::Formatter::make_groups[abi:cxx11](CLI::App_const*,CLI::AppFormatMode)const::{lambda(CLI::Option_const*)#1}>
::_M_manager;
/* try { // try from 0012c42c to 0012c43d has its CatchHandler @ 0012c6fd */
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::vector
((ulong)&local_280,
(allocator *)(*(long *)(param_3 + 0xe0) - *(long *)(param_3 + 0xd8) >> 3));
puVar1 = *(int8 **)(param_3 + 0xe0);
puVar6 = local_280;
for (puVar5 = *(int8 **)(param_3 + 0xd8); puVar5 != puVar1; puVar5 = puVar5 + 1) {
*puVar6 = *puVar5;
puVar6 = puVar6 + 1;
}
/* try { // try from 0012c47b to 0012c482 has its CatchHandler @ 0012c6dd */
if ((local_238 != (code *)0x0) &&
(puVar5 = (int8 *)
std::
__remove_if<__gnu_cxx::__normal_iterator<CLI::Option_const**,std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool(CLI::Option_const*)>)const::_lambda(CLI::Option_const*)_1_>>
(local_280,local_278,&local_248), puVar5 != local_278)) {
local_278 = puVar5;
}
if (local_238 != (code *)0x0) {
/* try { // try from 0012c499 to 0012c4a5 has its CatchHandler @ 0012c6f9 */
(*local_238)(&local_248,&local_248,3);
}
if ((plVar7[1] != 0) && (local_280 != local_278)) {
local_220[0] = local_210;
/* try { // try from 0012c4d5 to 0012c4de has its CatchHandler @ 0012c65e */
std::__cxx11::string::_M_construct<char*>(local_220,*plVar7,plVar7[1] + *plVar7);
/* try { // try from 0012c4df to 0012c4f3 has its CatchHandler @ 0012c659 */
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::vector
((vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> *)local_1d0,
(vector *)&local_280);
/* try { // try from 0012c4ff to 0012c513 has its CatchHandler @ 0012c654 */
(**(code **)(*local_1d8 + 0x18))
(&local_200,local_1d8,local_220,0,
(vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> *)local_1d0);
/* try { // try from 0012c524 to 0012c530 has its CatchHandler @ 0012c663 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_200,local_1f8);
if (local_200 != local_1f0) {
operator_delete(local_200,local_1f0[0] + 1);
}
if (local_1d0[0] != (void *)0x0) {
operator_delete(local_1d0[0],local_1c0 - (long)local_1d0[0]);
}
if (local_220[0] != local_210) {
operator_delete(local_220[0],local_210[0] + 1);
}
__n = plVar7[1];
if ((__n != plStack_260[-3]) ||
((__n != 0 && (iVar3 = bcmp((void *)*plVar7,(void *)plStack_260[-4],__n), iVar3 != 0))))
{
/* try { // try from 0012c5b3 to 0012c5cb has its CatchHandler @ 0012c64d */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"\n",1);
}
}
if (local_280 != (int8 *)0x0) {
operator_delete(local_280,local_270 - (long)local_280);
}
plVar7 = plVar7 + 4;
} while (plVar7 != plVar4);
}
uVar2 = local_1e0;
/* try { // try from 0012c5f8 to 0012c607 has its CatchHandler @ 0012c648 */
std::__cxx11::stringbuf::str();
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_268);
std::__cxx11::stringstream::~stringstream(local_1b8);
std::ios_base::~ios_base(local_138);
return uVar2;
}
| |
49,057 | testing::internal::posix::FOpen(char const*, char const*) | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h | inline FILE* FOpen(const char* path, const char* mode) {
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
std::wstring_convert<wchar_codecvt> converter;
std::wstring wide_path = converter.from_bytes(path);
std::wstring wide_mode = converter.from_bytes(mode);
return _wfopen(wide_path.c_str(), wide_mode.c_str());
#else // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
return fopen(path, mode);
#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
} | O0 | c | testing::internal::posix::FOpen(char const*, char const*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x14820
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN7testing8internal5posix5FOpenEPKcS3_:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _fopen
add rsp, 18h
retn
| long long testing::internal::posix::FOpen(testing::internal::posix *this, const char *a2, const char *a3)
{
return fopen(this, a2);
}
| FOpen:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00114820
ADD RSP,0x18
RET
|
/* testing::internal::posix::FOpen(char const*, char const*) */
void testing::internal::posix::FOpen(char *param_1,char *param_2)
{
fopen(param_1,param_2);
return;
}
| |
49,058 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O0 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x558f0
movq %rax, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x68524
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x56140
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x684d9
movq 0x28(%rsp), %rax
addq $0x1, %rax
cmpq 0x38(%rsp), %rax
jae 0x684d9
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
incq %rsi
movq %rsi, 0x28(%rsp)
callq 0x56140
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x22, %eax
je 0x6837f
jmp 0x682a2
movl 0xc(%rsp), %eax
subl $0x27, %eax
je 0x6835c
jmp 0x682b1
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0x683a2
jmp 0x682c0
movl 0xc(%rsp), %eax
subl $0x6e, %eax
je 0x682f3
jmp 0x682cb
movl 0xc(%rsp), %eax
subl $0x72, %eax
je 0x68316
jmp 0x682d6
movl 0xc(%rsp), %eax
subl $0x74, %eax
je 0x68339
jmp 0x682e1
movl 0xc(%rsp), %eax
subl $0x78, %eax
je 0x683c5
jmp 0x68483
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0xa, (%rax)
jmp 0x684d7
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0xd, (%rax)
jmp 0x684d7
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0x9, (%rax)
jmp 0x684d7
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0x27, (%rax)
jmp 0x684d7
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0x22, (%rax)
jmp 0x684d7
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0x5c, (%rax)
jmp 0x684d7
movq 0x28(%rsp), %rax
addq $0x2, %rax
cmpq 0x38(%rsp), %rax
jae 0x68481
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x1, %rsi
callq 0x56140
movb (%rax), %al
movb %al, 0x25(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x2, %rsi
callq 0x56140
movb (%rax), %al
movb %al, 0x26(%rsp)
movb $0x0, 0x27(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x25(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl $0x10, %edx
callq 0x562b0
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
leaq 0x25(%rsp), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0x6847f
movq 0x28(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movb %al, 0xb(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb 0xb(%rsp), %cl
movb %cl, (%rax)
jmp 0x684d7
jmp 0x68481
jmp 0x68483
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb $0x5c, (%rax)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x56140
movb (%rax), %al
movb %al, 0xa(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb 0xa(%rsp), %cl
movb %cl, (%rax)
jmp 0x6850f
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x56140
movb (%rax), %al
movb %al, 0x9(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x56140
movb 0x9(%rsp), %cl
movb %cl, (%rax)
jmp 0x68511
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x6823a
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x55630
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rdi, [rsp+48h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_18], 0
mov [rsp+48h+var_20], 0
loc_6823A:
mov rax, [rsp+48h+var_20]
cmp rax, [rsp+48h+var_10]
jnb loc_68524
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_684D9
mov rax, [rsp+48h+var_20]
add rax, 1
cmp rax, [rsp+48h+var_10]
jnb loc_684D9
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
inc rsi
mov [rsp+48h+var_20], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
mov [rsp+48h+var_3C], eax
sub eax, 22h ; '"'
jz loc_6837F
jmp short $+2
loc_682A2:
mov eax, [rsp+48h+var_3C]
sub eax, 27h ; '''
jz loc_6835C
jmp short $+2
loc_682B1:
mov eax, [rsp+48h+var_3C]
sub eax, 5Ch ; '\'
jz loc_683A2
jmp short $+2
loc_682C0:
mov eax, [rsp+48h+var_3C]
sub eax, 6Eh ; 'n'
jz short loc_682F3
jmp short $+2
loc_682CB:
mov eax, [rsp+48h+var_3C]
sub eax, 72h ; 'r'
jz short loc_68316
jmp short $+2
loc_682D6:
mov eax, [rsp+48h+var_3C]
sub eax, 74h ; 't'
jz short loc_68339
jmp short $+2
loc_682E1:
mov eax, [rsp+48h+var_3C]
sub eax, 78h ; 'x'
jz loc_683C5
jmp loc_68483
loc_682F3:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 0Ah
jmp loc_684D7
loc_68316:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 0Dh
jmp loc_684D7
loc_68339:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 9
jmp loc_684D7
loc_6835C:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 27h ; '''
jmp loc_684D7
loc_6837F:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 22h ; '"'
jmp loc_684D7
loc_683A2:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 5Ch ; '\'
jmp loc_684D7
loc_683C5:
mov rax, [rsp+48h+var_20]
add rax, 2
cmp rax, [rsp+48h+var_10]
jnb loc_68481
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
add rsi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_23], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
add rsi, 2
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_22], al
mov [rsp+48h+var_21], 0
mov [rsp+48h+var_30], 0
lea rdi, [rsp+48h+var_23]
lea rsi, [rsp+48h+var_30]
mov edx, 10h
call strtol
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_30]
lea rcx, [rsp+48h+var_23]
add rcx, 2
cmp rax, rcx
jnz short loc_6847F
mov rax, [rsp+48h+var_20]
add rax, 2
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_3D], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3D]
mov [rax], cl
jmp short loc_684D7
loc_6847F:
jmp short $+2
loc_68481:
jmp short $+2
loc_68483:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 5Ch ; '\'
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_3E], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3E]
mov [rax], cl
loc_684D7:
jmp short loc_6850F
loc_684D9:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_3F], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3F]
mov [rax], cl
loc_6850F:
jmp short $+2
loc_68511:
mov rax, [rsp+48h+var_20]
add rax, 1
mov [rsp+48h+var_20], rax
jmp loc_6823A
loc_68524:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
add rsp, 48h
retn
| long long string_process_escapes(long long a1)
{
long long v1; // rsi
long long v2; // rsi
long long v3; // rsi
long long v4; // rsi
long long v5; // rsi
long long v6; // rsi
long long v7; // rsi
long long v8; // rsi
long long v9; // rsi
long long v10; // rsi
char v12; // [rsp+9h] [rbp-3Fh]
char v13; // [rsp+Ah] [rbp-3Eh]
int v14; // [rsp+Ch] [rbp-3Ch]
char v15; // [rsp+10h] [rbp-38h]
char *v16; // [rsp+18h] [rbp-30h] BYREF
_BYTE v17[2]; // [rsp+25h] [rbp-23h] BYREF
char v18; // [rsp+27h] [rbp-21h] BYREF
unsigned long long i; // [rsp+28h] [rbp-20h]
long long v20; // [rsp+30h] [rbp-18h]
unsigned long long v21; // [rsp+38h] [rbp-10h]
long long v22; // [rsp+40h] [rbp-8h]
v22 = a1;
v21 = std::string::length(a1);
v20 = 0LL;
for ( i = 0LL; i < v21; ++i )
{
if ( *(_BYTE *)std::string::operator[](v22, i) == 92 && i + 1 < v21 )
{
v14 = *(char *)std::string::operator[](v22, ++i);
switch ( v14 )
{
case '"':
v5 = v20++;
*(_BYTE *)std::string::operator[](v22, v5) = 34;
break;
case '\'':
v4 = v20++;
*(_BYTE *)std::string::operator[](v22, v4) = 39;
break;
case '\\':
v6 = v20++;
*(_BYTE *)std::string::operator[](v22, v6) = 92;
break;
case 'n':
v1 = v20++;
*(_BYTE *)std::string::operator[](v22, v1) = 10;
break;
case 'r':
v2 = v20++;
*(_BYTE *)std::string::operator[](v22, v2) = 13;
break;
case 't':
v3 = v20++;
*(_BYTE *)std::string::operator[](v22, v3) = 9;
break;
default:
if ( v14 == 120
&& i + 2 < v21
&& (v17[0] = *(_BYTE *)std::string::operator[](v22, i + 1),
v17[1] = *(_BYTE *)std::string::operator[](v22, i + 2),
v18 = 0,
v16 = 0LL,
v15 = strtol(v17, &v16, 16LL),
v16 == &v18) )
{
i += 2LL;
v7 = v20++;
*(_BYTE *)std::string::operator[](v22, v7) = v15;
}
else
{
v8 = v20++;
*(_BYTE *)std::string::operator[](v22, v8) = 92;
v13 = *(_BYTE *)std::string::operator[](v22, i);
v9 = v20++;
*(_BYTE *)std::string::operator[](v22, v9) = v13;
}
break;
}
}
else
{
v12 = *(_BYTE *)std::string::operator[](v22, i);
v10 = v20++;
*(_BYTE *)std::string::operator[](v22, v10) = v12;
}
}
return std::string::resize(v22, v20);
}
| string_process_escapes:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001558f0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x28],0x0
LAB_0016823a:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x00168524
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00156140
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x001684d9
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001684d9
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
MOV qword ptr [RSP + 0x28],RSI
CALL 0x00156140
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x22
JZ 0x0016837f
JMP 0x001682a2
LAB_001682a2:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x27
JZ 0x0016835c
JMP 0x001682b1
LAB_001682b1:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5c
JZ 0x001683a2
JMP 0x001682c0
LAB_001682c0:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x6e
JZ 0x001682f3
JMP 0x001682cb
LAB_001682cb:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x72
JZ 0x00168316
JMP 0x001682d6
LAB_001682d6:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x74
JZ 0x00168339
JMP 0x001682e1
LAB_001682e1:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x78
JZ 0x001683c5
JMP 0x00168483
LAB_001682f3:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0xa
JMP 0x001684d7
LAB_00168316:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0xd
JMP 0x001684d7
LAB_00168339:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0x9
JMP 0x001684d7
LAB_0016835c:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0x27
JMP 0x001684d7
LAB_0016837f:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0x22
JMP 0x001684d7
LAB_001683a2:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0x5c
JMP 0x001684d7
LAB_001683c5:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x2
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x00168481
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x1
CALL 0x00156140
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x25],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x2
CALL 0x00156140
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x26],AL
MOV byte ptr [RSP + 0x27],0x0
MOV qword ptr [RSP + 0x18],0x0
LEA RDI,[RSP + 0x25]
LEA RSI,[RSP + 0x18]
MOV EDX,0x10
CALL 0x001562b0
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x25]
ADD RCX,0x2
CMP RAX,RCX
JNZ 0x0016847f
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x2
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0xb],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV CL,byte ptr [RSP + 0xb]
MOV byte ptr [RAX],CL
JMP 0x001684d7
LAB_0016847f:
JMP 0x00168481
LAB_00168481:
JMP 0x00168483
LAB_00168483:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV byte ptr [RAX],0x5c
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00156140
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0xa],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV CL,byte ptr [RSP + 0xa]
MOV byte ptr [RAX],CL
LAB_001684d7:
JMP 0x0016850f
LAB_001684d9:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00156140
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x9],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00156140
MOV CL,byte ptr [RSP + 0x9]
MOV byte ptr [RAX],CL
LAB_0016850f:
JMP 0x00168511
LAB_00168511:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0016823a
LAB_00168524:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00155630
ADD RSP,0x48
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
int1 uVar1;
char cVar2;
char *pcVar3;
long lVar4;
int1 *puVar5;
char *local_30;
char local_23;
int1 local_22;
char local_21;
ulong local_20;
long local_18;
ulong local_10;
string *local_8;
local_8 = param_1;
local_10 = std::__cxx11::string::length();
local_18 = 0;
local_20 = 0;
do {
if (local_10 <= local_20) {
std::__cxx11::string::resize((ulong)local_8);
return;
}
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
if ((*pcVar3 == '\\') && (local_20 + 1 < local_10)) {
local_20 = local_20 + 1;
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
cVar2 = *pcVar3;
if (cVar2 == '\"') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x22;
}
else if (cVar2 == '\'') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x27;
}
else if (cVar2 == '\\') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x5c;
}
else if (cVar2 == 'n') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 10;
}
else if (cVar2 == 'r') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0xd;
}
else if (cVar2 == 't') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 9;
}
else {
if ((cVar2 == 'x') && (local_20 + 2 < local_10)) {
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
local_23 = *pcVar3;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
local_22 = *puVar5;
local_21 = '\0';
local_30 = (char *)0x0;
lVar4 = strtol(&local_23,&local_30,0x10);
if (local_30 == &local_21) {
local_20 = local_20 + 2;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = (char)lVar4;
goto LAB_0016850f;
}
}
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x5c;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
uVar1 = *puVar5;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = uVar1;
}
}
else {
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
uVar1 = *puVar5;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = uVar1;
}
LAB_0016850f:
local_20 = local_20 + 1;
} while( true );
}
| |
49,059 | parse_number | corpus-core[P]colibri-stateless/src/util/json.c | static json_t parse_number(const char* start) {
json_t json = json(JSON_TYPE_NUMBER, start, 0);
for (; *start; start++) {
if (isdigit(*start) || *start == '.' || *start == '-' || *start == 'e' || *start == 'E')
json.len++;
else
break;
}
return json;
} | O0 | c | parse_number:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, %rax
movq %rax, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movl $0x2, 0x10(%rdi)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0xa40da
callq 0x23250
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax # imm = 0x800
cmpl $0x0, %eax
jne 0xa40b6
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0xa40b6
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0xa40b6
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
je 0xa40b6
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
jne 0xa40c8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0xa40ca
jmp 0xa40da
jmp 0xa40cc
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xa405d
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| parse_number:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov rax, rdi
mov [rbp+var_10], rax
mov [rbp+var_8], rsi
mov rax, [rbp+var_8]
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov dword ptr [rdi+10h], 2
loc_A405D:
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_A40DA
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_8]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 800h
cmp eax, 0
jnz short loc_A40B6
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jz short loc_A40B6
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jz short loc_A40B6
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 65h ; 'e'
jz short loc_A40B6
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 45h ; 'E'
jnz short loc_A40C8
loc_A40B6:
mov rax, [rbp+var_18]
mov rcx, [rax+8]
add rcx, 1
mov [rax+8], rcx
jmp short loc_A40CA
loc_A40C8:
jmp short loc_A40DA
loc_A40CA:
jmp short $+2
loc_A40CC:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_A405D
loc_A40DA:
mov rax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long parse_number(long long a1, _BYTE *a2)
{
_BYTE *v3; // [rsp+18h] [rbp-8h]
v3 = a2;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 2;
while ( *v3
&& ((*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * (char)*v3) & 0x800) != 0
|| *v3 == 46
|| *v3 == 45
|| *v3 == 101
|| *v3 == 69) )
{
++*(_QWORD *)(a1 + 8);
++v3;
}
return a1;
}
| parse_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV dword ptr [RDI + 0x10],0x2
LAB_001a405d:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001a40da
CALL 0x00123250
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x800
CMP EAX,0x0
JNZ 0x001a40b6
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JZ 0x001a40b6
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JZ 0x001a40b6
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x65
JZ 0x001a40b6
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x45
JNZ 0x001a40c8
LAB_001a40b6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x1
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001a40ca
LAB_001a40c8:
JMP 0x001a40da
LAB_001a40ca:
JMP 0x001a40cc
LAB_001a40cc:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a405d
LAB_001a40da:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
int8 * parse_number(int8 *param_1,char *param_2)
{
ushort **ppuVar1;
char *local_10;
*param_1 = param_2;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 2;
for (local_10 = param_2;
(*local_10 != '\0' &&
((((ppuVar1 = __ctype_b_loc(), ((*ppuVar1)[(int)*local_10] & 0x800) != 0 || (*local_10 == '.')
) || (*local_10 == '-')) || ((*local_10 == 'e' || (*local_10 == 'E'))))));
local_10 = local_10 + 1) {
param_1[1] = param_1[1] + 1;
}
return param_1;
}
| |
49,060 | my_realpath | eloqsql/mysys/my_symlink.c | int my_realpath(char *to, const char *filename, myf MyFlags)
{
#if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH)
int result=0;
char buff[BUFF_LEN];
char *ptr;
DBUG_ENTER("my_realpath");
DBUG_PRINT("info",("executing realpath"));
if ((ptr=realpath(filename,buff)))
strmake(to, ptr, FN_REFLEN-1);
else
{
/*
Realpath didn't work; Use my_load_path() which is a poor substitute
original name but will at least be able to resolve paths that starts
with '.'.
*/
if (MyFlags)
DBUG_PRINT("error",("realpath failed with errno: %d", errno));
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
my_load_path(to, filename, NullS);
if (my_errno == ENOENT)
result= 1;
else
result= -1;
}
DBUG_RETURN(result);
#elif defined(_WIN32)
int ret= GetFullPathName(filename,FN_REFLEN, to, NULL);
if (ret == 0 || ret > FN_REFLEN)
{
my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError();
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
/*
GetFullPathName didn't work : use my_load_path() which is a poor
substitute original name but will at least be able to resolve
paths that starts with '.'.
*/
my_load_path(to, filename, NullS);
return -1;
}
#else
my_load_path(to, filename, NullS);
#endif
return 0;
} | O0 | c | my_realpath:
pushq %rbp
movq %rsp, %rbp
subq $0x1060, %rsp # imm = 0x1060
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x1020(%rbp)
movq %rsi, -0x1028(%rbp)
movq %rdx, -0x1030(%rbp)
movl $0x0, -0x1034(%rbp)
jmp 0x7e389
movq -0x1028(%rbp), %rdi
leaq -0x1010(%rbp), %rsi
callq 0x36570
movq %rax, -0x1040(%rbp)
cmpq $0x0, %rax
je 0x7e3c6
movq -0x1020(%rbp), %rdi
movq -0x1040(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0xc6df0
jmp 0x7e466
cmpq $0x0, -0x1030(%rbp)
je 0x7e3d6
jmp 0x7e3d2
jmp 0x7e3d4
jmp 0x7e3d6
callq 0x36990
movl (%rax), %eax
movl %eax, -0x1044(%rbp)
callq 0x7ed00
movl -0x1044(%rbp), %ecx
movl %ecx, (%rax)
movq -0x1030(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x7e42d
movq -0x1028(%rbp), %rax
movq %rax, -0x1050(%rbp)
callq 0x7ed00
movq -0x1050(%rbp), %rdx
movl (%rax), %ecx
movl $0x1a, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x779f0
movq -0x1020(%rbp), %rdi
movq -0x1028(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x81fe0
callq 0x7ed00
cmpl $0x2, (%rax)
jne 0x7e45a
movl $0x1, -0x1034(%rbp)
jmp 0x7e464
movl $0xffffffff, -0x1034(%rbp) # imm = 0xFFFFFFFF
jmp 0x7e466
jmp 0x7e468
movl -0x1034(%rbp), %eax
movl %eax, -0x1014(%rbp)
movl -0x1014(%rbp), %eax
movl %eax, -0x1054(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7e4a1
movl -0x1054(%rbp), %eax
addq $0x1060, %rsp # imm = 0x1060
popq %rbp
retq
callq 0x362a0
nopw %cs:(%rax,%rax)
| my_realpath:
push rbp
mov rbp, rsp
sub rsp, 1060h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_1020], rdi
mov [rbp+var_1028], rsi
mov [rbp+var_1030], rdx
mov [rbp+var_1034], 0
jmp short $+2
loc_7E389:
mov rdi, [rbp+var_1028]
lea rsi, [rbp+var_1010]
call _realpath
mov [rbp+var_1040], rax
cmp rax, 0
jz short loc_7E3C6
mov rdi, [rbp+var_1020]
mov rsi, [rbp+var_1040]
mov edx, 1FFh
call strmake
jmp loc_7E466
loc_7E3C6:
cmp [rbp+var_1030], 0
jz short loc_7E3D6
jmp short $+2
loc_7E3D2:
jmp short $+2
loc_7E3D4:
jmp short $+2
loc_7E3D6:
call ___errno_location
mov eax, [rax]
mov [rbp+var_1044], eax
call _my_thread_var
mov ecx, [rbp+var_1044]
mov [rax], ecx
mov rax, [rbp+var_1030]
and rax, 10h
cmp rax, 0
jz short loc_7E42D
mov rax, [rbp+var_1028]
mov [rbp+var_1050], rax
call _my_thread_var
mov rdx, [rbp+var_1050]
mov ecx, [rax]
mov edi, 1Ah
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_7E42D:
mov rdi, [rbp+var_1020]
mov rsi, [rbp+var_1028]
xor eax, eax
mov edx, eax
call my_load_path
call _my_thread_var
cmp dword ptr [rax], 2
jnz short loc_7E45A
mov [rbp+var_1034], 1
jmp short loc_7E464
loc_7E45A:
mov [rbp+var_1034], 0FFFFFFFFh
loc_7E464:
jmp short $+2
loc_7E466:
jmp short $+2
loc_7E468:
mov eax, [rbp+var_1034]
mov [rbp+var_1014], eax
mov eax, [rbp+var_1014]
mov [rbp+var_1054], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7E4A1
mov eax, [rbp+var_1054]
add rsp, 1060h
pop rbp
retn
loc_7E4A1:
call ___stack_chk_fail
| long long my_realpath(long long a1, long long a2, char a3)
{
unsigned int *v3; // rax
long long v5; // [rsp+1Ch] [rbp-1044h]
long long v6; // [rsp+20h] [rbp-1040h]
unsigned int v7; // [rsp+2Ch] [rbp-1034h]
_BYTE v9[4104]; // [rsp+50h] [rbp-1010h] BYREF
unsigned long long v10; // [rsp+1058h] [rbp-8h]
v10 = __readfsqword(0x28u);
v7 = 0;
v6 = realpath(a2, v9);
if ( v6 )
{
strmake(a1, v6, 511LL);
}
else
{
v5 = *(unsigned int *)__errno_location(a2);
*(_DWORD *)my_thread_var() = v5;
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)my_thread_var();
my_error(0x1Au, 0LL, a2, *v3);
}
my_load_path(a1, a2, 0LL);
if ( *(_DWORD *)my_thread_var() == 2 )
return 1;
else
return (unsigned int)-1;
}
return v7;
}
| my_realpath:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1060
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x1020],RDI
MOV qword ptr [RBP + -0x1028],RSI
MOV qword ptr [RBP + -0x1030],RDX
MOV dword ptr [RBP + -0x1034],0x0
JMP 0x0017e389
LAB_0017e389:
MOV RDI,qword ptr [RBP + -0x1028]
LEA RSI,[RBP + -0x1010]
CALL 0x00136570
MOV qword ptr [RBP + -0x1040],RAX
CMP RAX,0x0
JZ 0x0017e3c6
MOV RDI,qword ptr [RBP + -0x1020]
MOV RSI,qword ptr [RBP + -0x1040]
MOV EDX,0x1ff
CALL 0x001c6df0
JMP 0x0017e466
LAB_0017e3c6:
CMP qword ptr [RBP + -0x1030],0x0
JZ 0x0017e3d6
JMP 0x0017e3d2
LAB_0017e3d2:
JMP 0x0017e3d4
LAB_0017e3d4:
JMP 0x0017e3d6
LAB_0017e3d6:
CALL 0x00136990
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1044],EAX
CALL 0x0017ed00
MOV ECX,dword ptr [RBP + -0x1044]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x1030]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0017e42d
MOV RAX,qword ptr [RBP + -0x1028]
MOV qword ptr [RBP + -0x1050],RAX
CALL 0x0017ed00
MOV RDX,qword ptr [RBP + -0x1050]
MOV ECX,dword ptr [RAX]
MOV EDI,0x1a
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001779f0
LAB_0017e42d:
MOV RDI,qword ptr [RBP + -0x1020]
MOV RSI,qword ptr [RBP + -0x1028]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00181fe0
CALL 0x0017ed00
CMP dword ptr [RAX],0x2
JNZ 0x0017e45a
MOV dword ptr [RBP + -0x1034],0x1
JMP 0x0017e464
LAB_0017e45a:
MOV dword ptr [RBP + -0x1034],0xffffffff
LAB_0017e464:
JMP 0x0017e466
LAB_0017e466:
JMP 0x0017e468
LAB_0017e468:
MOV EAX,dword ptr [RBP + -0x1034]
MOV dword ptr [RBP + -0x1014],EAX
MOV EAX,dword ptr [RBP + -0x1014]
MOV dword ptr [RBP + -0x1054],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017e4a1
MOV EAX,dword ptr [RBP + -0x1054]
ADD RSP,0x1060
POP RBP
RET
LAB_0017e4a1:
CALL 0x001362a0
|
int4 my_realpath(int8 param_1,char *param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int4 *puVar4;
long in_FS_OFFSET;
int4 local_103c;
char local_1018 [4104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_103c = 0;
pcVar2 = realpath(param_2,local_1018);
if (pcVar2 == (char *)0x0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_3 & 0x10) != 0) {
puVar4 = (int4 *)_my_thread_var();
my_error(0x1a,0,param_2,*puVar4);
}
my_load_path(param_1,param_2,0);
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 2) {
local_103c = 1;
}
else {
local_103c = 0xffffffff;
}
}
else {
strmake(param_1,pcVar2,0x1ff);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_103c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
49,061 | testing::internal::FilePath::FileOrDirectoryExists() const | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-filepath.cc | bool FilePath::FileOrDirectoryExists() const {
#ifdef GTEST_OS_WINDOWS_MOBILE
LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());
const DWORD attributes = GetFileAttributes(unicode);
delete[] unicode;
return attributes != kInvalidFileAttributes;
#else
posix::StatStruct file_stat{};
return posix::Stat(pathname_.c_str(), &file_stat) == 0;
#endif // GTEST_OS_WINDOWS_MOBILE
} | O3 | cpp | testing::internal::FilePath::FileOrDirectoryExists() const:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x82b0
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x8440
testl %eax, %eax
sete %al
addq $0x98, %rsp
popq %rbx
popq %r14
retq
| _ZNK7testing8internal8FilePath21FileOrDirectoryExistsEv:
push r14
push rbx
sub rsp, 98h
mov rbx, rdi
lea r14, [rsp+0A8h+var_A0]
mov edx, 90h
mov rdi, r14
xor esi, esi
call _memset
mov rdi, [rbx]
mov rsi, r14
call _stat
test eax, eax
setz al
add rsp, 98h
pop rbx
pop r14
retn
| bool testing::internal::FilePath::FileOrDirectoryExists(testing::internal::FilePath *this)
{
_BYTE v2[160]; // [rsp+8h] [rbp-A0h] BYREF
memset(v2, 0LL, 144LL);
return (unsigned int)stat(*(_QWORD *)this, v2) == 0;
}
| FileOrDirectoryExists:
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV EDX,0x90
MOV RDI,R14
XOR ESI,ESI
CALL 0x001082b0
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x00108440
TEST EAX,EAX
SETZ AL
ADD RSP,0x98
POP RBX
POP R14
RET
|
/* testing::internal::FilePath::FileOrDirectoryExists() const */
int8 __thiscall testing::internal::FilePath::FileOrDirectoryExists(FilePath *this)
{
int iVar1;
int4 extraout_var;
stat local_a0;
memset(&local_a0,0,0x90);
iVar1 = stat(*(char **)this,&local_a0);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),iVar1 == 0);
}
| |
49,062 | my_strtoll10_utf32 | eloqsql/strings/ctype-ucs2.c | static longlong
my_strtoll10_utf32(CHARSET_INFO *cs __attribute__((unused)),
const char *nptr, char **endptr, int *error)
{
const char *s, *end, *start, *n_end, *true_end;
uchar c;
unsigned long i, j, k;
ulonglong li;
int negative;
ulong cutoff, cutoff2, cutoff3;
s= nptr;
/* If fixed length string */
if (endptr)
{
/* Make sure string length is even */
end= s + ((*endptr - s) / 4) * 4;
while (s < end && !s[0] && !s[1] && !s[2] &&
(s[3] == ' ' || s[3] == '\t'))
s+= 4;
if (s == end)
goto no_conv;
}
else
{
/* We don't support null terminated strings in UCS2 */
goto no_conv;
}
/* Check for a sign. */
negative= 0;
if (!s[0] && !s[1] && !s[2] && s[3] == '-')
{
*error= -1; /* Mark as negative number */
negative= 1;
s+= 4;
if (s == end)
goto no_conv;
cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2;
cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100;
cutoff3= MAX_NEGATIVE_NUMBER % 100;
}
else
{
*error= 0;
if (!s[0] && !s[1] && !s[2] && s[3] == '+')
{
s+= 4;
if (s == end)
goto no_conv;
}
cutoff= ULONGLONG_MAX / LFACTOR2;
cutoff2= ULONGLONG_MAX % LFACTOR2 / 100;
cutoff3= ULONGLONG_MAX % 100;
}
/* Handle case where we have a lot of pre-zero */
if (!s[0] && !s[1] && !s[2] && s[3] == '0')
{
i= 0;
do
{
s+= 4;
if (s == end)
goto end_i; /* Return 0 */
}
while (!s[0] && !s[1] && !s[2] && s[3] == '0');
n_end= s + 4 * INIT_CNT;
}
else
{
/* Read first digit to check that it's a valid number */
if (s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9)
goto no_conv;
i= c;
s+= 4;
n_end= s + 4 * (INIT_CNT-1);
}
/* Handle first 9 digits and store them in i */
if (n_end > end)
n_end= end;
for (; s != n_end ; s+= 4)
{
if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9)
goto end_i;
i= i * 10 + c;
}
if (s == end)
goto end_i;
/* Handle next 9 digits and store them in j */
j= 0;
start= s; /* Used to know how much to shift i */
n_end= true_end= s + 4 * INIT_CNT;
if (n_end > end)
n_end= end;
do
{
if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9)
goto end_i_and_j;
j= j * 10 + c;
s+= 4;
} while (s != n_end);
if (s == end)
{
if (s != true_end)
goto end_i_and_j;
goto end3;
}
if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9)
goto end3;
/* Handle the next 1 or 2 digits and store them in k */
k=c;
s+= 4;
if (s == end || s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9)
goto end4;
k= k * 10 + c;
s+= 4;
*endptr= (char*) s;
/* number string should have ended here */
if (s != end && !s[0] && !s[1] && !s[2] && (c= (s[3] - '0')) <= 9)
goto overflow;
/* Check that we didn't get an overflow with the last digit */
if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) &&
k > cutoff3)))
goto overflow;
li= i * LFACTOR2+ (ulonglong) j * 100 + k;
return (longlong) li;
overflow: /* *endptr is set here */
*error= MY_ERRNO_ERANGE;
return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX;
end_i:
*endptr= (char*) s;
return (negative ? ((longlong) -(long) i) : (longlong) i);
end_i_and_j:
li= (ulonglong) i * lfactor[(size_t) (s-start) / 4] + j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end3:
li= (ulonglong) i*LFACTOR+ (ulonglong) j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end4:
li= (ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k;
*endptr= (char*) s;
if (negative)
{
if (li > MAX_NEGATIVE_NUMBER)
goto overflow;
return -((longlong) li);
}
return (longlong) li;
no_conv:
/* There was no number to convert. */
*error= MY_ERRNO_EDOM;
*endptr= (char *) nptr;
return 0;
} | O3 | c | my_strtoll10_utf32:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x47026
movq (%rdx), %rdi
subq %rsi, %rdi
leaq 0x3(%rdi), %rax
testq %rdi, %rdi
cmovnsq %rdi, %rax
andq $-0x4, %rax
addq %rsi, %rax
movq %rsi, %r11
cmpq $0x4, %rdi
jl 0x46f30
movq %rsi, %r11
cmpb $0x0, (%r11)
jne 0x46f30
cmpb $0x0, 0x1(%r11)
jne 0x46f30
cmpb $0x0, 0x2(%r11)
jne 0x46f30
movzbl 0x3(%r11), %edi
cmpl $0x20, %edi
je 0x46f27
cmpl $0x9, %edi
jne 0x46f30
addq $0x4, %r11
cmpq %rax, %r11
jb 0x46f04
cmpq %rax, %r11
je 0x47026
cmpb $0x0, (%r11)
jne 0x46f7d
cmpb $0x0, 0x1(%r11)
jne 0x46f7d
cmpb $0x0, 0x2(%r11)
jne 0x46f7d
cmpb $0x2d, 0x3(%r11)
jne 0x46f7d
movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF
addq $0x4, %r11
cmpq %rax, %r11
je 0x47026
movl $0x8, %r8d
movl $0x15f797ae, %r9d # imm = 0x15F797AE
movl $0x57f5ff8, %r10d # imm = 0x57F5FF8
xorl %edi, %edi
jmp 0x46fc0
movl $0x0, (%rcx)
cmpb $0x0, (%r11)
jne 0x47026
movl $0xf, %r8d
movl $0x2bef2f5c, %r9d # imm = 0x2BEF2F5C
movl $0xafebff0, %r10d # imm = 0xAFEBFF0
movb $0x1, %dil
cmpb $0x0, 0x1(%r11)
jne 0x46fc0
cmpb $0x0, 0x2(%r11)
jne 0x46fc0
cmpb $0x2b, 0x3(%r11)
jne 0x46fc0
addq $0x4, %r11
cmpq %rax, %r11
je 0x47026
cmpb $0x0, (%r11)
jne 0x47026
cmpb $0x0, 0x1(%r11)
jne 0x47026
cmpb $0x0, 0x2(%r11)
jne 0x47013
cmpb $0x30, 0x3(%r11)
jne 0x47013
addq $0x28, %r11
xorl %esi, %esi
leaq -0x24(%r11), %rbx
cmpq %rax, %rbx
je 0x471c9
movq %r11, %r14
cmpb $0x0, (%rbx)
jne 0x4700f
cmpb $0x0, -0x23(%r14)
jne 0x4700f
cmpb $0x0, -0x22(%r14)
jne 0x4700f
leaq 0x4(%r14), %r11
cmpb $0x30, -0x21(%r14)
je 0x46fe1
xorl %esi, %esi
jmp 0x4704a
cmpb $0x0, 0x2(%r11)
jne 0x47026
movb 0x3(%r11), %bl
addb $-0x30, %bl
cmpb $0x9, %bl
jbe 0x4703c
movl $0x21, (%rcx)
movq %rsi, (%rdx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %bl, %esi
leaq 0x4(%r11), %rbx
addq $0x24, %r11
movq %r11, %r14
cmpq %rax, %r14
cmovaq %rax, %r14
cmpq %r14, %rbx
je 0x47097
cmpb $0x0, (%rbx)
jne 0x471c6
cmpb $0x0, 0x1(%rbx)
jne 0x471c6
cmpb $0x0, 0x2(%rbx)
jne 0x471c6
movb 0x3(%rbx), %r11b
addb $-0x30, %r11b
cmpb $0x9, %r11b
ja 0x471c6
leaq (%rsi,%rsi,4), %rsi
movzbl %r11b, %r11d
leaq (%r11,%rsi,2), %rsi
addq $0x4, %rbx
jmp 0x47051
cmpq %rax, %rbx
je 0x471c6
leaq 0x24(%rbx), %r12
cmpq %rax, %r12
cmovaq %rax, %r12
leaq 0x8(%rbx), %r14
movl $0x24, %r13d
xorl %r11d, %r11d
cmpb $0x0, -0x8(%r14)
jne 0x471ce
cmpb $0x0, -0x7(%r14)
jne 0x471ce
cmpb $0x0, -0x6(%r14)
jne 0x471ce
movb -0x5(%r14), %r15b
addb $-0x30, %r15b
cmpb $0x9, %r15b
ja 0x471ce
leaq (%r11,%r11,4), %r11
movzbl %r15b, %r15d
leaq (%r15,%r11,2), %r11
leaq 0x4(%r14), %r15
addq $-0x4, %r14
addq $-0x4, %r13
cmpq %r12, %r14
movq %r15, %r14
jne 0x470b8
leaq -0x8(%r15), %r14
cmpq %rax, %r12
je 0x47200
cmpb $0x0, (%r14)
jne 0x47205
cmpb $0x0, -0x7(%r15)
jne 0x47205
cmpb $0x0, -0x6(%r15)
jne 0x47205
movb -0x5(%r15), %bl
addb $-0x30, %bl
cmpb $0x9, %bl
ja 0x47205
movzbl %bl, %ebx
leaq -0x4(%r15), %r12
cmpq %rax, %r12
je 0x4717b
cmpb $0x0, -0x4(%r15)
jne 0x4717b
cmpb $0x0, -0x3(%r15)
jne 0x4717b
cmpb $0x0, -0x2(%r15)
jne 0x4717b
movb -0x1(%r15), %r14b
addb $-0x30, %r14b
cmpb $0x9, %r14b
jbe 0x4722c
movabsq $0x2540be400, %rax # imm = 0x2540BE400
imulq %rax, %rsi
leaq (%r11,%r11,4), %rax
leaq (%rsi,%rax,2), %rax
addq %rbx, %rax
movq %r12, (%rdx)
testb %dil, %dil
jne 0x47031
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
cmpq %rdx, %rax
jbe 0x47224
movl $0x22, (%rcx)
movzbl %dil, %eax
negq %rax
btsq $0x3f, %rax
jmp 0x47031
movq %rbx, %rax
movq %rax, (%rdx)
jmp 0x471ee
addq $-0x8, %r14
movq %r14, %rax
subq %rbx, %rax
andq $-0x4, %rax
leaq 0x20b47d(%rip), %rcx # 0x252660
imulq (%rcx,%rax,2), %rsi
addq %r11, %rsi
movq %r14, (%rdx)
movq %rsi, %rax
negq %rax
testb %dil, %dil
cmovneq %rsi, %rax
jmp 0x47031
testq %r13, %r13
jne 0x471d2
imulq $0x3b9aca00, %rsi, %rax # imm = 0x3B9ACA00
addq %rax, %r11
movq %r14, (%rdx)
movq %r11, %rax
negq %rax
testb %dil, %dil
cmovneq %r11, %rax
jmp 0x47031
negq %rax
jmp 0x47031
movq %r15, (%rdx)
cmpq %rax, %r15
je 0x47256
cmpb $0x0, (%r15)
jne 0x47256
cmpb $0x0, 0x1(%r15)
jne 0x47256
cmpb $0x0, 0x2(%r15)
jne 0x47256
movb 0x3(%r15), %al
addb $-0x30, %al
cmpb $0xa, %al
jb 0x471af
cmpq %r10, %rsi
ja 0x471af
leaq (%rbx,%rbx,4), %rax
movzbl %r14b, %edx
leaq (%rdx,%rax,2), %rax
cmpq %r10, %rsi
jne 0x4727e
cmpq %r9, %r11
jb 0x4727e
cmpl %r8d, %eax
ja 0x471af
movabsq $0x174876e800, %rcx # imm = 0x174876E800
imulq %rcx, %rsi
imulq $0x64, %r11, %rcx
addq %rax, %rsi
addq %rcx, %rsi
movq %rsi, %rax
jmp 0x47031
| my_strtoll10_utf32:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
test rdx, rdx
jz loc_47026
mov rdi, [rdx]
sub rdi, rsi
lea rax, [rdi+3]
test rdi, rdi
cmovns rax, rdi
and rax, 0FFFFFFFFFFFFFFFCh
add rax, rsi
mov r11, rsi
cmp rdi, 4
jl short loc_46F30
mov r11, rsi
loc_46F04:
cmp byte ptr [r11], 0
jnz short loc_46F30
cmp byte ptr [r11+1], 0
jnz short loc_46F30
cmp byte ptr [r11+2], 0
jnz short loc_46F30
movzx edi, byte ptr [r11+3]
cmp edi, 20h ; ' '
jz short loc_46F27
cmp edi, 9
jnz short loc_46F30
loc_46F27:
add r11, 4
cmp r11, rax
jb short loc_46F04
loc_46F30:
cmp r11, rax
jz loc_47026
cmp byte ptr [r11], 0
jnz short loc_46F7D
cmp byte ptr [r11+1], 0
jnz short loc_46F7D
cmp byte ptr [r11+2], 0
jnz short loc_46F7D
cmp byte ptr [r11+3], 2Dh ; '-'
jnz short loc_46F7D
mov dword ptr [rcx], 0FFFFFFFFh
add r11, 4
cmp r11, rax
jz loc_47026
mov r8d, 8
mov r9d, 15F797AEh
mov r10d, 57F5FF8h
xor edi, edi
jmp short loc_46FC0
loc_46F7D:
mov dword ptr [rcx], 0
cmp byte ptr [r11], 0
jnz loc_47026
mov r8d, 0Fh
mov r9d, 2BEF2F5Ch
mov r10d, 0AFEBFF0h
mov dil, 1
cmp byte ptr [r11+1], 0
jnz short loc_46FC0
cmp byte ptr [r11+2], 0
jnz short loc_46FC0
cmp byte ptr [r11+3], 2Bh ; '+'
jnz short loc_46FC0
add r11, 4
cmp r11, rax
jz short loc_47026
loc_46FC0:
cmp byte ptr [r11], 0
jnz short loc_47026
cmp byte ptr [r11+1], 0
jnz short loc_47026
cmp byte ptr [r11+2], 0
jnz short loc_47013
cmp byte ptr [r11+3], 30h ; '0'
jnz short loc_47013
add r11, 28h ; '('
xor esi, esi
loc_46FE1:
lea rbx, [r11-24h]
cmp rbx, rax
jz loc_471C9
mov r14, r11
cmp byte ptr [rbx], 0
jnz short loc_4700F
cmp byte ptr [r14-23h], 0
jnz short loc_4700F
cmp byte ptr [r14-22h], 0
jnz short loc_4700F
lea r11, [r14+4]
cmp byte ptr [r14-21h], 30h ; '0'
jz short loc_46FE1
loc_4700F:
xor esi, esi
jmp short loc_4704A
loc_47013:
cmp byte ptr [r11+2], 0
jnz short loc_47026
mov bl, [r11+3]
add bl, 0D0h
cmp bl, 9
jbe short loc_4703C
loc_47026:
mov dword ptr [rcx], 21h ; '!'
mov [rdx], rsi
xor eax, eax
loc_47031:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4703C:
movzx esi, bl
lea rbx, [r11+4]
add r11, 24h ; '$'
mov r14, r11
loc_4704A:
cmp r14, rax
cmova r14, rax
loc_47051:
cmp rbx, r14
jz short loc_47097
cmp byte ptr [rbx], 0
jnz loc_471C6
cmp byte ptr [rbx+1], 0
jnz loc_471C6
cmp byte ptr [rbx+2], 0
jnz loc_471C6
mov r11b, [rbx+3]
add r11b, 0D0h
cmp r11b, 9
ja loc_471C6
lea rsi, [rsi+rsi*4]
movzx r11d, r11b
lea rsi, [r11+rsi*2]
add rbx, 4
jmp short loc_47051
loc_47097:
cmp rbx, rax
jz loc_471C6
lea r12, [rbx+24h]
cmp r12, rax
cmova r12, rax
lea r14, [rbx+8]
mov r13d, 24h ; '$'
xor r11d, r11d
loc_470B8:
cmp byte ptr [r14-8], 0
jnz loc_471CE
cmp byte ptr [r14-7], 0
jnz loc_471CE
cmp byte ptr [r14-6], 0
jnz loc_471CE
mov r15b, [r14-5]
add r15b, 0D0h
cmp r15b, 9
ja loc_471CE
lea r11, [r11+r11*4]
movzx r15d, r15b
lea r11, [r15+r11*2]
lea r15, [r14+4]
add r14, 0FFFFFFFFFFFFFFFCh
add r13, 0FFFFFFFFFFFFFFFCh
cmp r14, r12
mov r14, r15
jnz short loc_470B8
lea r14, [r15-8]
cmp r12, rax
jz loc_47200
cmp byte ptr [r14], 0
jnz loc_47205
cmp byte ptr [r15-7], 0
jnz loc_47205
cmp byte ptr [r15-6], 0
jnz loc_47205
mov bl, [r15-5]
add bl, 0D0h
cmp bl, 9
ja loc_47205
movzx ebx, bl
lea r12, [r15-4]
cmp r12, rax
jz short loc_4717B
cmp byte ptr [r15-4], 0
jnz short loc_4717B
cmp byte ptr [r15-3], 0
jnz short loc_4717B
cmp byte ptr [r15-2], 0
jnz short loc_4717B
mov r14b, [r15-1]
add r14b, 0D0h
cmp r14b, 9
jbe loc_4722C
loc_4717B:
mov rax, 2540BE400h
imul rsi, rax
lea rax, [r11+r11*4]
lea rax, [rsi+rax*2]
add rax, rbx
mov [rdx], r12
test dil, dil
jnz loc_47031
mov rdx, 8000000000000000h
cmp rax, rdx
jbe short loc_47224
loc_471AF:
mov dword ptr [rcx], 22h ; '"'
movzx eax, dil
neg rax
bts rax, 3Fh ; '?'
jmp loc_47031
loc_471C6:
mov rax, rbx
loc_471C9:
mov [rdx], rax
jmp short loc_471EE
loc_471CE:
add r14, 0FFFFFFFFFFFFFFF8h
loc_471D2:
mov rax, r14
sub rax, rbx
and rax, 0FFFFFFFFFFFFFFFCh
lea rcx, lfactor
imul rsi, [rcx+rax*2]
add rsi, r11
mov [rdx], r14
loc_471EE:
mov rax, rsi
neg rax
test dil, dil
cmovnz rax, rsi
jmp loc_47031
loc_47200:
test r13, r13
jnz short loc_471D2
loc_47205:
imul rax, rsi, 3B9ACA00h
add r11, rax
mov [rdx], r14
mov rax, r11
neg rax
test dil, dil
cmovnz rax, r11
jmp loc_47031
loc_47224:
neg rax
jmp loc_47031
loc_4722C:
mov [rdx], r15
cmp r15, rax
jz short loc_47256
cmp byte ptr [r15], 0
jnz short loc_47256
cmp byte ptr [r15+1], 0
jnz short loc_47256
cmp byte ptr [r15+2], 0
jnz short loc_47256
mov al, [r15+3]
add al, 0D0h
cmp al, 0Ah
jb loc_471AF
loc_47256:
cmp rsi, r10
ja loc_471AF
lea rax, [rbx+rbx*4]
movzx edx, r14b
lea rax, [rdx+rax*2]
cmp rsi, r10
jnz short loc_4727E
cmp r11, r9
jb short loc_4727E
cmp eax, r8d
ja loc_471AF
loc_4727E:
mov rcx, 174876E800h
imul rsi, rcx
imul rcx, r11, 64h ; 'd'
add rsi, rax
add rsi, rcx
mov rax, rsi
jmp loc_47031
| unsigned long long my_strtoll10_utf32(long long a1, _BYTE *a2, unsigned long long *a3, _DWORD *a4)
{
long long v4; // rdi
long long v5; // rax
unsigned long long v6; // rax
_BYTE *v7; // r11
int v8; // edi
unsigned int v9; // r8d
unsigned long long v10; // r9
unsigned long long v11; // r10
unsigned __int8 v12; // di
_BYTE *v13; // r11
unsigned long long v14; // rsi
_BYTE *v15; // rbx
_BYTE *v16; // r14
unsigned __int8 v17; // bl
unsigned long long result; // rax
unsigned __int8 v19; // r11
_BYTE *v20; // r12
_BYTE *v21; // r14
long long v22; // r13
unsigned long long v23; // r11
unsigned __int8 v24; // r15
_BYTE *v25; // r15
bool v26; // zf
_BYTE *v27; // r14
unsigned __int8 v28; // bl
unsigned __int8 v29; // r14
unsigned long long v30; // r11
long long v31; // rax
if ( !a3 )
goto LABEL_37;
v4 = *a3 - (_QWORD)a2;
v5 = v4 + 3;
if ( v4 >= 0 )
v5 = *a3 - (_QWORD)a2;
v6 = (unsigned long long)&a2[v5 & 0xFFFFFFFFFFFFFFFCLL];
v7 = a2;
if ( v4 >= 4 )
{
v7 = a2;
do
{
if ( *v7 )
break;
if ( v7[1] )
break;
if ( v7[2] )
break;
v8 = (unsigned __int8)v7[3];
if ( v8 != 32 && v8 != 9 )
break;
v7 += 4;
}
while ( (unsigned long long)v7 < v6 );
}
if ( v7 == (_BYTE *)v6 )
goto LABEL_37;
if ( *v7 || v7[1] || v7[2] || v7[3] != 45 )
{
*a4 = 0;
if ( *v7 )
goto LABEL_37;
v9 = 15;
v10 = 737095516LL;
v11 = 184467440LL;
v12 = 1;
if ( !v7[1] && !v7[2] && v7[3] == 43 )
{
v7 += 4;
if ( v7 == (_BYTE *)v6 )
goto LABEL_37;
}
}
else
{
*a4 = -1;
v7 += 4;
if ( v7 == (_BYTE *)v6 )
goto LABEL_37;
v9 = 8;
v10 = 368547758LL;
v11 = 92233720LL;
v12 = 0;
}
if ( *v7 || v7[1] )
goto LABEL_37;
if ( !v7[2] && v7[3] == 48 )
{
v13 = v7 + 40;
v14 = 0LL;
while ( 1 )
{
v15 = v13 - 36;
if ( v13 - 36 == (_BYTE *)v6 )
goto LABEL_71;
v16 = v13;
if ( !*v15 && !*(v13 - 35) && !*(v13 - 34) )
{
v13 += 4;
if ( *(v16 - 33) == 48 )
continue;
}
v14 = 0LL;
goto LABEL_40;
}
}
if ( v7[2] || (v17 = v7[3] - 48, v17 > 9u) )
{
LABEL_37:
*a4 = 33;
*a3 = (unsigned long long)a2;
return 0LL;
}
v14 = v17;
v15 = v7 + 4;
v16 = v7 + 36;
LABEL_40:
if ( (unsigned long long)v16 > v6 )
v16 = (_BYTE *)v6;
while ( v15 != v16 )
{
if ( *v15 )
goto LABEL_70;
if ( v15[1] )
goto LABEL_70;
if ( v15[2] )
goto LABEL_70;
v19 = v15[3] - 48;
if ( v19 > 9u )
goto LABEL_70;
v14 = v19 + 10 * v14;
v15 += 4;
}
if ( v15 != (_BYTE *)v6 )
{
v20 = v15 + 36;
if ( (unsigned long long)(v15 + 36) > v6 )
v20 = (_BYTE *)v6;
v21 = v15 + 8;
v22 = 36LL;
v23 = 0LL;
while ( !*(v21 - 8) )
{
if ( *(v21 - 7) )
break;
if ( *(v21 - 6) )
break;
v24 = *(v21 - 5) - 48;
if ( v24 > 9u )
break;
v23 = v24 + 10 * v23;
v25 = v21 + 4;
v22 -= 4LL;
v26 = v21 - 4 == v20;
v21 += 4;
if ( v26 )
{
v27 = v25 - 8;
if ( v20 != (_BYTE *)v6 )
{
if ( !*v27 && !*(v25 - 7) && !*(v25 - 6) )
{
v28 = *(v25 - 5) - 48;
if ( v28 <= 9u )
{
if ( v25 - 4 == (_BYTE *)v6 || *(v25 - 4) || *(v25 - 3) || *(v25 - 2) || (v29 = *(v25 - 1) - 48, v29 > 9u) )
{
result = v28 + 10000000000LL * v14 + 10 * v23;
*a3 = (unsigned long long)(v25 - 4);
if ( v12 )
return result;
if ( result > 0x8000000000000000LL )
goto LABEL_69;
return -(long long)result;
}
else
{
*a3 = (unsigned long long)v25;
if ( v25 != (_BYTE *)v6 && !*v25 && !v25[1] && !v25[2] && (unsigned __int8)(v25[3] - 48) < 0xAu
|| v14 > v11
|| (v31 = v29 + 10LL * v28, v14 == v11) && v23 >= v10 && (unsigned int)v31 > v9 )
{
LABEL_69:
*a4 = 34;
return -(long long)v12 | 0x8000000000000000LL;
}
return 100 * v23 + v31 + 100000000000LL * v14;
}
}
}
LABEL_78:
v30 = 1000000000 * v14 + v23;
*a3 = (unsigned long long)v27;
result = -(long long)v30;
if ( v12 )
return v30;
return result;
}
if ( !v22 )
goto LABEL_78;
LABEL_73:
v14 = v23 + *(_QWORD *)((char *)&lfactor + 2 * ((v27 - v15) & 0xFFFFFFFFFFFFFFFCLL)) * v14;
*a3 = (unsigned long long)v27;
goto LABEL_74;
}
}
v27 = v21 - 8;
goto LABEL_73;
}
LABEL_70:
v6 = (unsigned long long)v15;
LABEL_71:
*a3 = v6;
LABEL_74:
result = -(long long)v14;
if ( v12 )
return v14;
return result;
}
| my_strtoll10_utf32:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
TEST RDX,RDX
JZ 0x00147026
MOV RDI,qword ptr [RDX]
SUB RDI,RSI
LEA RAX,[RDI + 0x3]
TEST RDI,RDI
CMOVNS RAX,RDI
AND RAX,-0x4
ADD RAX,RSI
MOV R11,RSI
CMP RDI,0x4
JL 0x00146f30
MOV R11,RSI
LAB_00146f04:
CMP byte ptr [R11],0x0
JNZ 0x00146f30
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146f30
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146f30
MOVZX EDI,byte ptr [R11 + 0x3]
CMP EDI,0x20
JZ 0x00146f27
CMP EDI,0x9
JNZ 0x00146f30
LAB_00146f27:
ADD R11,0x4
CMP R11,RAX
JC 0x00146f04
LAB_00146f30:
CMP R11,RAX
JZ 0x00147026
CMP byte ptr [R11],0x0
JNZ 0x00146f7d
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146f7d
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146f7d
CMP byte ptr [R11 + 0x3],0x2d
JNZ 0x00146f7d
MOV dword ptr [RCX],0xffffffff
ADD R11,0x4
CMP R11,RAX
JZ 0x00147026
MOV R8D,0x8
MOV R9D,0x15f797ae
MOV R10D,0x57f5ff8
XOR EDI,EDI
JMP 0x00146fc0
LAB_00146f7d:
MOV dword ptr [RCX],0x0
CMP byte ptr [R11],0x0
JNZ 0x00147026
MOV R8D,0xf
MOV R9D,0x2bef2f5c
MOV R10D,0xafebff0
MOV DIL,0x1
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146fc0
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146fc0
CMP byte ptr [R11 + 0x3],0x2b
JNZ 0x00146fc0
ADD R11,0x4
CMP R11,RAX
JZ 0x00147026
LAB_00146fc0:
CMP byte ptr [R11],0x0
JNZ 0x00147026
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00147026
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00147013
CMP byte ptr [R11 + 0x3],0x30
JNZ 0x00147013
ADD R11,0x28
XOR ESI,ESI
LAB_00146fe1:
LEA RBX,[R11 + -0x24]
CMP RBX,RAX
JZ 0x001471c9
MOV R14,R11
CMP byte ptr [RBX],0x0
JNZ 0x0014700f
CMP byte ptr [R14 + -0x23],0x0
JNZ 0x0014700f
CMP byte ptr [R14 + -0x22],0x0
JNZ 0x0014700f
LEA R11,[R14 + 0x4]
CMP byte ptr [R14 + -0x21],0x30
JZ 0x00146fe1
LAB_0014700f:
XOR ESI,ESI
JMP 0x0014704a
LAB_00147013:
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00147026
MOV BL,byte ptr [R11 + 0x3]
ADD BL,0xd0
CMP BL,0x9
JBE 0x0014703c
LAB_00147026:
MOV dword ptr [RCX],0x21
MOV qword ptr [RDX],RSI
XOR EAX,EAX
LAB_00147031:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014703c:
MOVZX ESI,BL
LEA RBX,[R11 + 0x4]
ADD R11,0x24
MOV R14,R11
LAB_0014704a:
CMP R14,RAX
CMOVA R14,RAX
LAB_00147051:
CMP RBX,R14
JZ 0x00147097
CMP byte ptr [RBX],0x0
JNZ 0x001471c6
CMP byte ptr [RBX + 0x1],0x0
JNZ 0x001471c6
CMP byte ptr [RBX + 0x2],0x0
JNZ 0x001471c6
MOV R11B,byte ptr [RBX + 0x3]
ADD R11B,0xd0
CMP R11B,0x9
JA 0x001471c6
LEA RSI,[RSI + RSI*0x4]
MOVZX R11D,R11B
LEA RSI,[R11 + RSI*0x2]
ADD RBX,0x4
JMP 0x00147051
LAB_00147097:
CMP RBX,RAX
JZ 0x001471c6
LEA R12,[RBX + 0x24]
CMP R12,RAX
CMOVA R12,RAX
LEA R14,[RBX + 0x8]
MOV R13D,0x24
XOR R11D,R11D
LAB_001470b8:
CMP byte ptr [R14 + -0x8],0x0
JNZ 0x001471ce
CMP byte ptr [R14 + -0x7],0x0
JNZ 0x001471ce
CMP byte ptr [R14 + -0x6],0x0
JNZ 0x001471ce
MOV R15B,byte ptr [R14 + -0x5]
ADD R15B,0xd0
CMP R15B,0x9
JA 0x001471ce
LEA R11,[R11 + R11*0x4]
MOVZX R15D,R15B
LEA R11,[R15 + R11*0x2]
LEA R15,[R14 + 0x4]
ADD R14,-0x4
ADD R13,-0x4
CMP R14,R12
MOV R14,R15
JNZ 0x001470b8
LEA R14,[R15 + -0x8]
CMP R12,RAX
JZ 0x00147200
CMP byte ptr [R14],0x0
JNZ 0x00147205
CMP byte ptr [R15 + -0x7],0x0
JNZ 0x00147205
CMP byte ptr [R15 + -0x6],0x0
JNZ 0x00147205
MOV BL,byte ptr [R15 + -0x5]
ADD BL,0xd0
CMP BL,0x9
JA 0x00147205
MOVZX EBX,BL
LEA R12,[R15 + -0x4]
CMP R12,RAX
JZ 0x0014717b
CMP byte ptr [R15 + -0x4],0x0
JNZ 0x0014717b
CMP byte ptr [R15 + -0x3],0x0
JNZ 0x0014717b
CMP byte ptr [R15 + -0x2],0x0
JNZ 0x0014717b
MOV R14B,byte ptr [R15 + -0x1]
ADD R14B,0xd0
CMP R14B,0x9
JBE 0x0014722c
LAB_0014717b:
MOV RAX,0x2540be400
IMUL RSI,RAX
LEA RAX,[R11 + R11*0x4]
LEA RAX,[RSI + RAX*0x2]
ADD RAX,RBX
MOV qword ptr [RDX],R12
TEST DIL,DIL
JNZ 0x00147031
MOV RDX,-0x8000000000000000
CMP RAX,RDX
JBE 0x00147224
LAB_001471af:
MOV dword ptr [RCX],0x22
MOVZX EAX,DIL
NEG RAX
BTS RAX,0x3f
JMP 0x00147031
LAB_001471c6:
MOV RAX,RBX
LAB_001471c9:
MOV qword ptr [RDX],RAX
JMP 0x001471ee
LAB_001471ce:
ADD R14,-0x8
LAB_001471d2:
MOV RAX,R14
SUB RAX,RBX
AND RAX,-0x4
LEA RCX,[0x352660]
IMUL RSI,qword ptr [RCX + RAX*0x2]
ADD RSI,R11
MOV qword ptr [RDX],R14
LAB_001471ee:
MOV RAX,RSI
NEG RAX
TEST DIL,DIL
CMOVNZ RAX,RSI
JMP 0x00147031
LAB_00147200:
TEST R13,R13
JNZ 0x001471d2
LAB_00147205:
IMUL RAX,RSI,0x3b9aca00
ADD R11,RAX
MOV qword ptr [RDX],R14
MOV RAX,R11
NEG RAX
TEST DIL,DIL
CMOVNZ RAX,R11
JMP 0x00147031
LAB_00147224:
NEG RAX
JMP 0x00147031
LAB_0014722c:
MOV qword ptr [RDX],R15
CMP R15,RAX
JZ 0x00147256
CMP byte ptr [R15],0x0
JNZ 0x00147256
CMP byte ptr [R15 + 0x1],0x0
JNZ 0x00147256
CMP byte ptr [R15 + 0x2],0x0
JNZ 0x00147256
MOV AL,byte ptr [R15 + 0x3]
ADD AL,0xd0
CMP AL,0xa
JC 0x001471af
LAB_00147256:
CMP RSI,R10
JA 0x001471af
LEA RAX,[RBX + RBX*0x4]
MOVZX EDX,R14B
LEA RAX,[RDX + RAX*0x2]
CMP RSI,R10
JNZ 0x0014727e
CMP R11,R9
JC 0x0014727e
CMP EAX,R8D
JA 0x001471af
LAB_0014727e:
MOV RCX,0x174876e800
IMUL RSI,RCX
IMUL RCX,R11,0x64
ADD RSI,RAX
ADD RSI,RCX
MOV RAX,RSI
JMP 0x00147031
|
ulong my_strtoll10_utf32(int8 param_1,char *param_2,long *param_3,int4 *param_4)
{
char *pcVar1;
char cVar2;
char *pcVar3;
byte bVar4;
char *pcVar5;
ulong uVar6;
byte bVar7;
ulong uVar8;
uint uVar9;
ulong uVar10;
char *pcVar11;
ulong uVar12;
long lVar13;
char *pcVar14;
char *pcVar15;
if (param_3 != (long *)0x0) {
uVar8 = *param_3 - (long)param_2;
uVar10 = uVar8 + 3;
if (-1 < (long)uVar8) {
uVar10 = uVar8;
}
pcVar3 = param_2 + (uVar10 & 0xfffffffffffffffc);
pcVar11 = param_2;
if (3 < (long)uVar8) {
do {
if ((((*pcVar11 != '\0') || (pcVar11[1] != '\0')) || (pcVar11[2] != '\0')) ||
((pcVar11[3] != ' ' && (pcVar11[3] != '\t')))) break;
pcVar11 = pcVar11 + 4;
} while (pcVar11 < pcVar3);
}
if (pcVar11 != pcVar3) {
if (((*pcVar11 == '\0') && (pcVar11[1] == '\0')) &&
((pcVar11[2] == '\0' && (pcVar11[3] == '-')))) {
*param_4 = 0xffffffff;
pcVar11 = pcVar11 + 4;
if (pcVar11 == pcVar3) goto LAB_00147026;
uVar9 = 8;
uVar10 = 0x15f797ae;
uVar8 = 0x57f5ff8;
bVar7 = 0;
}
else {
*param_4 = 0;
if (*pcVar11 != '\0') goto LAB_00147026;
uVar9 = 0xf;
uVar10 = 0x2bef2f5c;
uVar8 = 0xafebff0;
bVar7 = 1;
if ((((pcVar11[1] == '\0') && (pcVar11[2] == '\0')) && (pcVar11[3] == '+')) &&
(pcVar11 = pcVar11 + 4, pcVar11 == pcVar3)) goto LAB_00147026;
}
if ((*pcVar11 == '\0') && (pcVar11[1] == '\0')) {
if ((pcVar11[2] == '\0') && (pcVar11[3] == '0')) {
uVar6 = 0;
pcVar5 = pcVar11 + 0x28;
do {
pcVar11 = pcVar5;
pcVar1 = pcVar11 + -0x24;
pcVar5 = pcVar3;
if (pcVar1 == pcVar3) goto LAB_001471c9;
} while ((((*pcVar1 == '\0') && (pcVar11[-0x23] == '\0')) && (pcVar11[-0x22] == '\0')) &&
(pcVar5 = pcVar11 + 4, pcVar11[-0x21] == '0'));
uVar6 = 0;
pcVar5 = pcVar1;
}
else {
if ((pcVar11[2] != '\0') || (9 < (byte)(pcVar11[3] - 0x30U))) goto LAB_00147026;
uVar6 = (ulong)(byte)(pcVar11[3] - 0x30U);
pcVar5 = pcVar11 + 4;
pcVar11 = pcVar11 + 0x24;
}
if (pcVar3 < pcVar11) {
pcVar11 = pcVar3;
}
for (; pcVar5 != pcVar11; pcVar5 = pcVar5 + 4) {
if (((*pcVar5 != '\0') || (pcVar5[1] != '\0')) ||
((pcVar5[2] != '\0' || (9 < (byte)(pcVar5[3] - 0x30U))))) goto LAB_001471c9;
uVar6 = (ulong)(byte)(pcVar5[3] - 0x30U) + uVar6 * 10;
}
if (pcVar5 != pcVar3) {
pcVar11 = pcVar5 + 0x24;
if (pcVar3 < pcVar5 + 0x24) {
pcVar11 = pcVar3;
}
lVar13 = 0x24;
uVar12 = 0;
pcVar1 = pcVar5 + 8;
do {
pcVar14 = pcVar1;
if (((pcVar14[-8] != '\0') || (pcVar14[-7] != '\0')) ||
((pcVar14[-6] != '\0' || (9 < (byte)(pcVar14[-5] - 0x30U))))) {
pcVar15 = pcVar14 + -8;
goto LAB_001471d2;
}
uVar12 = (ulong)(byte)(pcVar14[-5] - 0x30U) + uVar12 * 10;
pcVar1 = pcVar14 + 4;
lVar13 = lVar13 + -4;
} while (pcVar14 + -4 != pcVar11);
pcVar15 = pcVar14 + -4;
if (pcVar11 == pcVar3) {
if (lVar13 != 0) {
LAB_001471d2:
uVar6 = uVar6 * *(long *)((long)&lfactor +
((long)pcVar15 - (long)pcVar5 & 0xfffffffffffffffcU) * 2) +
uVar12;
*param_3 = (long)pcVar15;
goto LAB_001471ee;
}
}
else if ((((*pcVar15 == '\0') && (pcVar14[-3] == '\0')) && (pcVar14[-2] == '\0')) &&
(bVar4 = pcVar14[-1] - 0x30, bVar4 < 10)) {
if (((pcVar14 == pcVar3) || (*pcVar14 != '\0')) ||
((pcVar14[1] != '\0' ||
((pcVar14[2] != '\0' || (cVar2 = pcVar14[3], 9 < (byte)(cVar2 - 0x30U))))))) {
uVar10 = uVar6 * 10000000000 + uVar12 * 10 + (ulong)bVar4;
*param_3 = (long)pcVar14;
if (bVar7 != 0) {
return uVar10;
}
if (uVar10 < 0x8000000000000001) {
return -uVar10;
}
}
else {
*param_3 = (long)pcVar1;
if ((((((pcVar1 == pcVar3) || (*pcVar1 != '\0')) || (pcVar14[5] != '\0')) ||
((pcVar14[6] != '\0' || (9 < (byte)(pcVar14[7] - 0x30U))))) && (uVar6 <= uVar8))
&& (((lVar13 = (ulong)(byte)(cVar2 - 0x30U) + (ulong)bVar4 * 10, uVar6 != uVar8 ||
(uVar12 < uVar10)) || ((uint)lVar13 <= uVar9)))) {
return uVar6 * 100000000000 + lVar13 + uVar12 * 100;
}
}
*param_4 = 0x22;
return -(ulong)bVar7 | 0x8000000000000000;
}
uVar12 = uVar12 + uVar6 * 1000000000;
*param_3 = (long)pcVar15;
if (bVar7 == 0) {
return -uVar12;
}
return uVar12;
}
LAB_001471c9:
*param_3 = (long)pcVar5;
LAB_001471ee:
if (bVar7 == 0) {
return -uVar6;
}
return uVar6;
}
}
}
LAB_00147026:
*param_4 = 0x21;
*param_3 = (long)param_2;
return 0;
}
| |
49,063 | ma_write_static_record | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_write_static_record(MARIA_HA *info, const uchar *record)
{
uchar temp[8]; /* max pointer length */
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
my_off_t filepos=info->s->state.dellink;
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength,
info->s->state.dellink+1,
MYF(MY_NABP)))
goto err;
info->s->state.dellink= _ma_rec_pos(info->s, temp);
info->state->del--;
info->state->empty-=info->s->base.pack_reclength;
if (info->s->file_write(info, record, info->s->base.reclength,
filepos, MYF(MY_NABP)))
goto err;
}
else
{
if (info->state->data_file_length > info->s->base.max_data_file_length-
info->s->base.pack_reclength)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
return(2);
}
if (info->opt_flag & WRITE_CACHE_USED)
{ /* Cash in use */
if (my_b_write(&info->rec_cache, record,
info->s->base.reclength))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (my_b_write(&info->rec_cache, temp,length))
goto err;
}
}
else
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_write(info, record, info->s->base.reclength,
info->state->data_file_length,
info->s->write_flag))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (info->s->file_write(info, temp,length,
info->state->data_file_length+
info->s->base.reclength,
info->s->write_flag))
goto err;
}
}
info->state->data_file_length+=info->s->base.pack_reclength;
info->s->state.split++;
}
return 0;
err:
return 1;
} | O0 | c | ma_write_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0xc8(%rax)
je 0x732f3
movq -0x20(%rbp), %rax
cmpb $0x0, 0x681(%rax)
jne 0x732f3
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movl 0x3e0(%rcx), %ecx
movl %ecx, %edx
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0xc8(%rcx), %rcx
addq $0x1, %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x7325d
jmp 0x73521
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x6b270
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xc8(%rax)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x30(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x732ee
jmp 0x73521
jmp 0x7351b
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x368(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq (%rdx), %rdx
subq 0x3a0(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x73334
callq 0xf60c0
movl $0x87, (%rax)
movb $0x2, -0x11(%rbp)
jmp 0x73525
movq -0x20(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x733ed
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x398(%rax), %rdx
callq 0x73550
cmpl $0x0, %eax
je 0x73376
jmp 0x73521
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x398(%rcx), %rax
je 0x733e8
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0x398(%rcx), %rax
movl %eax, -0x34(%rbp)
leaq -0x10(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
leaq -0x10(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, %edx
callq 0x73550
cmpl $0x0, %eax
je 0x733e6
jmp 0x73521
jmp 0x733e8
jmp 0x734e4
movq -0x20(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
movq 0x7c8(%r8), %r8
callq *%rax
cmpq $0x0, %rax
je 0x73446
jmp 0x73521
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x398(%rcx), %rax
je 0x734e2
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0x398(%rcx), %rax
movl %eax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl -0x38(%rbp), %ecx
movl %ecx, %edx
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
addq 0x398(%r8), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
movq 0x7c8(%r8), %r8
callq *%rax
cmpq $0x0, %rax
je 0x734e0
jmp 0x73521
jmp 0x734e2
jmp 0x734e4
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0xc0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc0(%rax)
movb $0x0, -0x11(%rbp)
jmp 0x73525
movb $0x1, -0x11(%rbp)
movb -0x11(%rbp), %al
movb %al, -0x39(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x73546
movb -0x39(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax,%rax)
| _ma_write_static_record:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+0C8h], 0FFFFFFFFFFFFFFFFh
jz loc_732F3
mov rax, [rbp+var_20]
cmp byte ptr [rax+681h], 0
jnz loc_732F3
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+0C8h]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov ecx, [rcx+3E0h]
mov edx, ecx
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rcx, [rcx+0C8h]
add rcx, 1
mov r8d, 4
call rax
cmp rax, 0
jz short loc_7325D
jmp loc_73521
loc_7325D:
mov rax, [rbp+var_20]
mov rdi, [rax]
lea rsi, [rbp+var_10]
call _ma_rec_pos
mov rcx, rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rax+0C8h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+20h]
mov rcx, [rax+8]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_20]
mov rax, [rax+20h]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_30]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_732EE
jmp loc_73521
loc_732EE:
jmp loc_7351B
loc_732F3:
mov rax, [rbp+var_20]
mov rax, [rax+20h]
mov rax, [rax+28h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rcx, [rcx+368h]
mov rdx, [rbp+var_20]
mov rdx, [rdx]
sub rcx, [rdx+3A0h]
cmp rax, rcx
jbe short loc_73334
call _my_thread_var
mov dword ptr [rax], 87h
mov [rbp+var_11], 2
jmp loc_73525
loc_73334:
mov rax, [rbp+var_20]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz loc_733ED
mov rdi, [rbp+var_20]
add rdi, 4B8h
mov rsi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+398h]
call my_b_write_0
cmp eax, 0
jz short loc_73376
jmp loc_73521
loc_73376:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+398h]
jz short loc_733E8
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+398h]
mov [rbp+var_34], eax
lea rdi, [rbp+var_10]
mov eax, [rbp+var_34]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
add rdi, 4B8h
lea rsi, [rbp+var_10]
mov eax, [rbp+var_34]
mov edx, eax
call my_b_write_0
cmp eax, 0
jz short loc_733E6
jmp loc_73521
loc_733E6:
jmp short $+2
loc_733E8:
jmp loc_734E4
loc_733ED:
mov rax, [rbp+var_20]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_20]
mov rcx, [rcx+20h]
mov rcx, [rcx+28h]
mov r8, [rbp+var_20]
mov r8, [r8]
mov r8, [r8+7C8h]
call rax
cmp rax, 0
jz short loc_73446
jmp loc_73521
loc_73446:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+398h]
jz short loc_734E2
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+398h]
mov [rbp+var_38], eax
lea rdi, [rbp+var_10]
mov eax, [rbp+var_38]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov ecx, [rbp+var_38]
mov edx, ecx
mov rcx, [rbp+var_20]
mov rcx, [rcx+20h]
mov rcx, [rcx+28h]
mov r8, [rbp+var_20]
mov r8, [r8]
add rcx, [r8+398h]
mov r8, [rbp+var_20]
mov r8, [r8]
mov r8, [r8+7C8h]
call rax
cmp rax, 0
jz short loc_734E0
jmp short loc_73521
loc_734E0:
jmp short $+2
loc_734E2:
jmp short $+2
loc_734E4:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rax+3A0h]
mov rax, [rbp+var_20]
mov rax, [rax+20h]
add rcx, [rax+28h]
mov [rax+28h], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rax+0C0h]
add rcx, 1
mov [rax+0C0h], rcx
loc_7351B:
mov [rbp+var_11], 0
jmp short loc_73525
loc_73521:
mov [rbp+var_11], 1
loc_73525:
mov al, [rbp+var_11]
mov [rbp+var_39], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_73546
mov al, [rbp+var_39]
add rsp, 40h
pop rbp
retn
loc_73546:
call ___stack_chk_fail
| char ma_write_static_record(_DWORD *a1, const char *a2)
{
long long v2; // rdx
unsigned int v4; // [rsp+8h] [rbp-38h]
unsigned int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+30h] [rbp-10h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
if ( *(_QWORD *)(*(_QWORD *)a1 + 200LL) != -1LL && !*((_BYTE *)a1 + 1665) )
{
v6 = *(_QWORD *)(*(_QWORD *)a1 + 200LL);
a1[358] = 1;
if ( !(*(long long ( **)(_DWORD *, unsigned int *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
&v8,
*(unsigned int *)(*(_QWORD *)a1 + 992LL),
*(_QWORD *)(*(_QWORD *)a1 + 200LL) + 1LL,
4LL) )
{
*(_QWORD *)(*(_QWORD *)a1 + 200LL) = ma_rec_pos(*(_QWORD *)a1, &v8, v2);
--*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL);
*(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 928LL);
if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
v6,
4LL) )
return 0;
}
return 1;
}
if ( *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) <= *(_QWORD *)(*(_QWORD *)a1 + 872LL)
- *(_QWORD *)(*(_QWORD *)a1 + 928LL) )
{
if ( (a1[391] & 0x10) != 0 )
{
if ( (unsigned int)my_b_write_0(a1 + 302, a2, *(_QWORD *)(*(_QWORD *)a1 + 920LL)) )
return 1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 928LL) != *(_QWORD *)(*(_QWORD *)a1 + 920LL) )
{
v5 = *(_DWORD *)(*(_QWORD *)a1 + 928LL) - *(_DWORD *)(*(_QWORD *)a1 + 920LL);
memset(&v8, 0LL, v5);
if ( (unsigned int)my_b_write_0(a1 + 302, &v8, v5) )
return 1;
}
}
else
{
a1[358] = 1;
if ( (*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 1768LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL),
*(_QWORD *)(*(_QWORD *)a1 + 1992LL)) )
{
return 1;
}
if ( *(_QWORD *)(*(_QWORD *)a1 + 928LL) != *(_QWORD *)(*(_QWORD *)a1 + 920LL) )
{
v4 = *(_DWORD *)(*(_QWORD *)a1 + 928LL) - *(_DWORD *)(*(_QWORD *)a1 + 920LL);
memset(&v8, 0LL, v4);
if ( (*(long long ( **)(_DWORD *, unsigned int *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 1768LL))(
a1,
&v8,
v4,
*(_QWORD *)(*(_QWORD *)a1 + 920LL) + *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL),
*(_QWORD *)(*(_QWORD *)a1 + 1992LL)) )
{
return 1;
}
}
}
*(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 928LL);
++*(_QWORD *)(*(_QWORD *)a1 + 192LL);
return 0;
}
*(_DWORD *)my_thread_var(a1, a2) = 135;
return 2;
}
| _ma_write_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0xc8],-0x1
JZ 0x001732f3
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x681],0x0
JNZ 0x001732f3
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xc8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x3e0]
MOV EDX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0xc8]
ADD RCX,0x1
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x0017325d
JMP 0x00173521
LAB_0017325d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0x10]
CALL 0x0016b270
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xc8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x001732ee
JMP 0x00173521
LAB_001732ee:
JMP 0x0017351b
LAB_001732f3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x368]
MOV RDX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RDX]
SUB RCX,qword ptr [RDX + 0x3a0]
CMP RAX,RCX
JBE 0x00173334
CALL 0x001f60c0
MOV dword ptr [RAX],0x87
MOV byte ptr [RBP + -0x11],0x2
JMP 0x00173525
LAB_00173334:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001733ed
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x398]
CALL 0x00173550
CMP EAX,0x0
JZ 0x00173376
JMP 0x00173521
LAB_00173376:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x398]
JZ 0x001733e8
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0x398]
MOV dword ptr [RBP + -0x34],EAX
LEA RDI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
LEA RSI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
CALL 0x00173550
CMP EAX,0x0
JZ 0x001733e6
JMP 0x00173521
LAB_001733e6:
JMP 0x001733e8
LAB_001733e8:
JMP 0x001734e4
LAB_001733ed:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x7c8]
CALL RAX
CMP RAX,0x0
JZ 0x00173446
JMP 0x00173521
LAB_00173446:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x398]
JZ 0x001734e2
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0x398]
MOV dword ptr [RBP + -0x38],EAX
LEA RDI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x38]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x38]
MOV EDX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
ADD RCX,qword ptr [R8 + 0x398]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x7c8]
CALL RAX
CMP RAX,0x0
JZ 0x001734e0
JMP 0x00173521
LAB_001734e0:
JMP 0x001734e2
LAB_001734e2:
JMP 0x001734e4
LAB_001734e4:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
ADD RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0xc0]
ADD RCX,0x1
MOV qword ptr [RAX + 0xc0],RCX
LAB_0017351b:
MOV byte ptr [RBP + -0x11],0x0
JMP 0x00173525
LAB_00173521:
MOV byte ptr [RBP + -0x11],0x1
LAB_00173525:
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00173546
MOV AL,byte ptr [RBP + -0x39]
ADD RSP,0x40
POP RBP
RET
LAB_00173546:
CALL 0x0012a270
|
int8 _ma_write_static_record(long *param_1,int8 param_2)
{
int8 uVar1;
int iVar2;
uint uVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
long in_FS_OFFSET;
int1 local_19;
int1 local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
if ((ulong)(*(long *)(*param_1 + 0x368) - *(long *)(*param_1 + 0x3a0)) <
*(ulong *)(param_1[4] + 0x28)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x87;
local_19 = 2;
goto LAB_00173525;
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x10) == 0) {
*(int4 *)(param_1 + 0xb3) = 1;
lVar4 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),
*(int8 *)(param_1[4] + 0x28),*(int8 *)(*param_1 + 0x7c8));
if (lVar4 == 0) {
if (*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) {
uVar3 = (int)*(int8 *)(*param_1 + 0x3a0) - (int)*(int8 *)(*param_1 + 0x398);
memset(local_18,0,(ulong)uVar3);
lVar4 = (**(code **)(*param_1 + 0x6e8))
(param_1,local_18,uVar3,
*(long *)(param_1[4] + 0x28) + *(long *)(*param_1 + 0x398),
*(int8 *)(*param_1 + 0x7c8));
if (lVar4 != 0) goto LAB_00173521;
}
goto LAB_001734e4;
}
}
else {
iVar2 = my_b_write(param_1 + 0x97,param_2,*(int8 *)(*param_1 + 0x398));
if (iVar2 == 0) {
if (*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) {
uVar3 = (int)*(int8 *)(*param_1 + 0x3a0) - (int)*(int8 *)(*param_1 + 0x398);
memset(local_18,0,(ulong)uVar3);
iVar2 = my_b_write(param_1 + 0x97,local_18,uVar3);
if (iVar2 != 0) goto LAB_00173521;
}
LAB_001734e4:
*(long *)(param_1[4] + 0x28) = *(long *)(*param_1 + 0x3a0) + *(long *)(param_1[4] + 0x28);
*(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1;
goto LAB_0017351b;
}
}
}
else {
uVar1 = *(int8 *)(*param_1 + 200);
*(int4 *)(param_1 + 0xb3) = 1;
lVar4 = (**(code **)(*param_1 + 0x6e0))
(param_1,local_18,*(int4 *)(*param_1 + 0x3e0),
*(long *)(*param_1 + 200) + 1,4);
if (lVar4 == 0) {
uVar5 = _ma_rec_pos(*param_1,local_18);
*(int8 *)(*param_1 + 200) = uVar5;
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(*param_1 + 0x3a0);
lVar4 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),uVar1,4);
if (lVar4 == 0) {
LAB_0017351b:
local_19 = 0;
goto LAB_00173525;
}
}
}
LAB_00173521:
local_19 = 1;
LAB_00173525:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_19);
}
| |
49,064 | s2b | eloqsql/strings/dtoa.c | static Bigint *s2b(const char *s, int nd0, int nd, ULong y9, Stack_alloc *alloc)
{
Bigint *b;
int i, k;
Long x, y;
x= (nd + 8) / 9;
for (k= 0, y= 1; x > y; y <<= 1, k++) ;
b= Balloc(k, alloc);
b->p.x[0]= y9;
b->wds= 1;
i= 9;
if (9 < nd0)
{
s+= 9;
do
b= multadd(b, 10, *s++ - '0', alloc);
while (++i < nd0);
s++; /* skip '.' */
}
else
s+= 10;
/* now do the fractional part */
for(; i < nd; i++)
b= multadd(b, 10, *s++ - '0', alloc);
return b;
} | O0 | c | s2b:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x1, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jle 0xa6e05
jmp 0xa6df2
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa6de8
movl -0x30(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xa6ef0
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x9, -0x2c(%rbp)
movl $0x9, %eax
cmpl -0xc(%rbp), %eax
jge 0xa6e90
movq -0x8(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x20(%rbp), %rcx
movl $0xa, %esi
callq 0xa7b80
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl -0xc(%rbp), %eax
jl 0xa6e49
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xa6e9c
movq -0x8(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0xa6e9e
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xa6edc
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x20(%rbp), %rcx
movl $0xa, %esi
callq 0xa7b80
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa6e9e
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| s2b:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov [rbp+var_20], r8
mov eax, [rbp+var_10]
add eax, 8
mov ecx, 9
cdq
idiv ecx
mov [rbp+var_34], eax
mov [rbp+var_30], 0
mov [rbp+var_38], 1
loc_A6DE8:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_38]
jle short loc_A6E05
jmp short $+2
loc_A6DF2:
mov eax, [rbp+var_38]
shl eax, 1
mov [rbp+var_38], eax
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_A6DE8
loc_A6E05:
mov edi, [rbp+var_30]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rax], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov [rbp+var_2C], 9
mov eax, 9
cmp eax, [rbp+var_C]
jge short loc_A6E90
mov rax, [rbp+var_8]
add rax, 9
mov [rbp+var_8], rax
loc_A6E49:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movsx edx, byte ptr [rax]
sub edx, 30h ; '0'
mov rcx, [rbp+var_20]
mov esi, 0Ah
call multadd
mov [rbp+var_28], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
cmp eax, [rbp+var_C]
jl short loc_A6E49
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_A6E9C
loc_A6E90:
mov rax, [rbp+var_8]
add rax, 0Ah
mov [rbp+var_8], rax
loc_A6E9C:
jmp short $+2
loc_A6E9E:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_10]
jge short loc_A6EDC
mov rdi, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movsx edx, byte ptr [rax]
sub edx, 30h ; '0'
mov rcx, [rbp+var_20]
mov esi, 0Ah
call multadd
mov [rbp+var_28], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_A6E9E
loc_A6EDC:
mov rax, [rbp+var_28]
add rsp, 40h
pop rbp
retn
| long long s2b(long long a1, int a2, int a3, int a4, long long a5)
{
char *v5; // rax
char *v6; // rax
int i; // [rsp+8h] [rbp-38h]
unsigned int v9; // [rsp+10h] [rbp-30h]
int v10; // [rsp+14h] [rbp-2Ch]
long long v11; // [rsp+18h] [rbp-28h]
char *v15; // [rsp+38h] [rbp-8h]
char *v16; // [rsp+38h] [rbp-8h]
v9 = 0;
for ( i = 1; (a3 + 8) / 9 > i; i *= 2 )
++v9;
v11 = Balloc(v9, a5);
**(_DWORD **)v11 = a4;
*(_DWORD *)(v11 + 20) = 1;
v10 = 9;
if ( a2 <= 9 )
{
v16 = (char *)(a1 + 10);
}
else
{
v15 = (char *)(a1 + 9);
do
{
v5 = v15++;
v11 = multadd(v11, 10LL, (unsigned int)(*v5 - 48), a5);
++v10;
}
while ( v10 < a2 );
v16 = v15 + 1;
}
while ( v10 < a3 )
{
v6 = v16++;
v11 = multadd(v11, 10LL, (unsigned int)(*v6 - 48), a5);
++v10;
}
return v11;
}
| s2b:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV qword ptr [RBP + -0x20],R8
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x8
MOV ECX,0x9
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x38],0x1
LAB_001a6de8:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x38]
JLE 0x001a6e05
JMP 0x001a6df2
LAB_001a6df2:
MOV EAX,dword ptr [RBP + -0x38]
SHL EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001a6de8
LAB_001a6e05:
MOV EDI,dword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a6ef0
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV dword ptr [RBP + -0x2c],0x9
MOV EAX,0x9
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x001a6e90
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x9
MOV qword ptr [RBP + -0x8],RAX
LAB_001a6e49:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVSX EDX,byte ptr [RAX]
SUB EDX,0x30
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0xa
CALL 0x001a7b80
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,dword ptr [RBP + -0xc]
JL 0x001a6e49
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a6e9c
LAB_001a6e90:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
LAB_001a6e9c:
JMP 0x001a6e9e
LAB_001a6e9e:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x001a6edc
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVSX EDX,byte ptr [RAX]
SUB EDX,0x30
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0xa
CALL 0x001a7b80
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001a6e9e
LAB_001a6edc:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x40
POP RBP
RET
|
int8 * s2b(long param_1,int param_2,int param_3,int4 param_4,int8 param_5)
{
char *pcVar1;
int local_40;
int local_38;
int local_34;
int8 *local_30;
char *local_10;
local_38 = 0;
for (local_40 = 1; local_40 < (param_3 + 8) / 9; local_40 = local_40 << 1) {
local_38 = local_38 + 1;
}
local_30 = (int8 *)Balloc(local_38,param_5,(long)(param_3 + 8) % 9 & 0xffffffff);
*(int4 *)*local_30 = param_4;
*(int4 *)((long)local_30 + 0x14) = 1;
local_34 = 9;
if (param_2 < 10) {
local_10 = (char *)(param_1 + 10);
}
else {
pcVar1 = (char *)(param_1 + 9);
do {
local_10 = pcVar1;
local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5);
local_34 = local_34 + 1;
pcVar1 = local_10 + 1;
} while (local_34 < param_2);
local_10 = local_10 + 2;
}
for (; local_34 < param_3; local_34 = local_34 + 1) {
local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5);
local_10 = local_10 + 1;
}
return local_30;
}
| |
49,065 | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | llama.cpp/common/minja/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
for (const auto& branch : cascade) {
auto enter_branch = true;
if (branch.first) {
enter_branch = branch.first->evaluate(context).to_bool();
}
if (enter_branch) {
if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null");
branch.second->render(out, context);
return;
}
}
} | O3 | cpp | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, (%rsp)
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %rbp
cmpq %rbp, %r13
je 0xefaf4
movq %rdx, %rbx
leaq 0x48(%rsp), %r15
leaq 0x8(%rsp), %r14
movq (%r13), %rsi
testq %rsi, %rsi
je 0xefadf
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe0d24
movq %r14, %rdi
callq 0xbe790
movl %eax, %r12d
movq %r15, %rdi
xorl %esi, %esi
callq 0x84be0
movq %r15, %rdi
callq 0x892fa
leaq 0x40(%rsp), %rdi
callq 0x70264
leaq 0x30(%rsp), %rdi
callq 0x70264
leaq 0x20(%rsp), %rdi
callq 0x70264
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xefacb
movq 0x734f2(%rip), %rax # 0x162f98
cmpb $0x0, (%rax)
je 0xefab6
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xefac0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xefacb
movq (%rdi), %rax
callq *0x18(%rax)
testb %r12b, %r12b
jne 0xefadf
addq $0x20, %r13
cmpq %rbp, %r13
jne 0xefa42
jmp 0xefaf4
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0xefb03
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0xcd1b6
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
leaq 0x32963(%rip), %rsi # 0x12247a
movq %rax, %rdi
callq 0x20430
movq 0x7349a(%rip), %rsi # 0x162fc0
movq 0x73453(%rip), %rdx # 0x162f80
movq %rbx, %rdi
callq 0x20a60
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f00
jmp 0xefb4f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xb5b04
movq %r14, %rdi
callq 0x20b00
nop
| _ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_88], rsi
mov r13, [rdi+20h]
mov rbp, [rdi+28h]
cmp r13, rbp
jz loc_EFAF4
mov rbx, rdx
lea r15, [rsp+88h+var_40]
lea r14, [rsp+88h+var_80]
loc_EFA42:
mov rsi, [r13+0]
test rsi, rsi
jz loc_EFADF
mov rdi, r14
mov rdx, rbx
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r14; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov r12d, eax
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_EFACB
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EFAB6
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EFAC0
loc_EFAB6:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EFAC0:
cmp eax, 1
jnz short loc_EFACB
mov rax, [rdi]
call qword ptr [rax+18h]
loc_EFACB:
test r12b, r12b
jnz short loc_EFADF
add r13, 20h ; ' '
cmp r13, rbp
jnz loc_EFA42
jmp short loc_EFAF4
loc_EFADF:
mov rdi, [r13+10h]
test rdi, rdi
jz short loc_EFB03
mov rsi, [rsp+88h+var_88]
mov rdx, rbx
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
loc_EFAF4:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EFB03:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIfnodeCascadeS; "IfNode.cascade.second 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, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_EFB4F
mov r14, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_EFB4F:
mov rdi, r14
call __Unwind_Resume
| void minja::IfNode::do_render(long long a1)
{
long long v1; // r13
long long v2; // rbp
char v3; // r12
long long v4; // rdi
signed __int32 v5; // eax
long long ( ***v6)(_QWORD); // rdi
std::runtime_error *exception; // rbx
_BYTE v8[8]; // [rsp+8h] [rbp-80h] BYREF
long long v9; // [rsp+10h] [rbp-78h]
volatile signed __int32 *v10; // [rsp+20h] [rbp-68h] BYREF
volatile signed __int32 *v11; // [rsp+30h] [rbp-58h] BYREF
volatile signed __int32 *v12; // [rsp+40h] [rbp-48h] BYREF
char v13[64]; // [rsp+48h] [rbp-40h] BYREF
v1 = *(_QWORD *)(a1 + 32);
v2 = *(_QWORD *)(a1 + 40);
if ( v1 != v2 )
{
while ( *(_QWORD *)v1 )
{
minja::Expression::evaluate((long long)v8, *(void (****)(void))v1);
v3 = minja::Value::to_bool((minja::Value *)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
v4 = v9;
if ( v9 )
{
if ( _libc_single_threaded )
{
v5 = *(_DWORD *)(v9 + 12);
*(_DWORD *)(v9 + 12) = v5 - 1;
}
else
{
v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v9 + 12), 0xFFFFFFFF);
}
if ( v5 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL);
}
if ( v3 )
break;
v1 += 32LL;
if ( v1 == v2 )
return;
}
v6 = *(long long ( ****)(_QWORD))(v1 + 16);
if ( !v6 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfNode.cascade.second is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render(v6);
}
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP],RSI
MOV R13,qword ptr [RDI + 0x20]
MOV RBP,qword ptr [RDI + 0x28]
CMP R13,RBP
JZ 0x001efaf4
MOV RBX,RDX
LEA R15,[RSP + 0x48]
LEA R14,[RSP + 0x8]
LAB_001efa42:
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x001efadf
MOV RDI,R14
MOV RDX,RBX
CALL 0x001e0d24
LAB_001efa5a:
MOV RDI,R14
CALL 0x001be790
LAB_001efa62:
MOV R12D,EAX
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,R15
CALL 0x001892fa
LEA RDI,[RSP + 0x40]
CALL 0x00170264
LEA RDI,[RSP + 0x30]
CALL 0x00170264
LEA RDI,[RSP + 0x20]
CALL 0x00170264
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001efacb
MOV RAX,qword ptr [0x00262f98]
CMP byte ptr [RAX],0x0
JZ 0x001efab6
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001efac0
LAB_001efab6:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001efac0:
CMP EAX,0x1
JNZ 0x001efacb
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001efacb:
TEST R12B,R12B
JNZ 0x001efadf
ADD R13,0x20
CMP R13,RBP
JNZ 0x001efa42
JMP 0x001efaf4
LAB_001efadf:
MOV RDI,qword ptr [R13 + 0x10]
TEST RDI,RDI
JZ 0x001efb03
MOV RSI,qword ptr [RSP]
MOV RDX,RBX
CALL 0x001cd1b6
LAB_001efaf4:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001efb03:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_001efb10:
LEA RSI,[0x22247a]
MOV RDI,RAX
CALL 0x00120430
LAB_001efb1f:
MOV RSI,qword ptr [0x00262fc0]
MOV RDX,qword ptr [0x00262f80]
MOV RDI,RBX
CALL 0x00120a60
|
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int8 *puVar2;
char cVar3;
int iVar4;
runtime_error *this;
int8 *puVar5;
Expression local_80 [8];
long *local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
data local_40 [16];
puVar5 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar5 != puVar2) {
do {
if ((shared_ptr *)*puVar5 == (shared_ptr *)0x0) {
LAB_001efadf:
if ((ostringstream *)puVar5[2] != (ostringstream *)0x0) {
TemplateNode::render((ostringstream *)puVar5[2],param_2);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001efb10 to 001efb1e has its CatchHandler @ 001efb35 */
std::runtime_error::runtime_error(this,"IfNode.cascade.second is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00262fc0,PTR__runtime_error_00262f80);
}
Expression::evaluate(local_80,(shared_ptr *)*puVar5);
/* try { // try from 001efa5a to 001efa61 has its CatchHandler @ 001efb42 */
cVar3 = Value::to_bool((Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00262f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
if (cVar3 != '\0') goto LAB_001efadf;
puVar5 = puVar5 + 4;
} while (puVar5 != puVar2);
}
return;
}
| |
49,066 | minja::Value::pop(minja::Value const&) | llama.cpp/common/minja/minja.hpp | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
} | O3 | cpp | minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0xa478f
movq 0x8(%rax), %rsi
cmpq %rsi, (%rax)
je 0xa489d
cmpq $0x0, 0x20(%rbx)
movb 0x40(%rbx), %al
jne 0xa47f4
cmpq $0x0, 0x10(%rbx)
jne 0xa47f4
testb %al, %al
jne 0xa47f4
cmpq $0x0, 0x30(%rbx)
jne 0xa47f4
addq $-0x50, %rsi
movq %rbp, %rdi
callq 0x63080
movq 0x10(%r15), %rdi
movq 0x8(%rdi), %rsi
addq $-0x50, %rsi
movq %rsi, 0x8(%rdi)
callq 0x63742
jmp 0xa488b
movq 0x20(%r15), %r14
testq %r14, %r14
je 0xa492f
cmpq $0x0, 0x10(%rbx)
jne 0xa498f
cmpq $0x0, 0x20(%rbx)
jne 0xa498f
cmpq $0x0, 0x30(%rbx)
jne 0xa498f
movq (%r14), %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
je 0xa4864
movq %rbp, 0x40(%rsp)
leaq 0x40(%rbx), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x6081e
testb %al, %al
jne 0xa4854
addq $0x60, %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
jne 0xa47d6
jmp 0xa4857
addb $-0x5, %al
cmpb $0x2, %al
jae 0xa4a4c
movq %rbx, %rdi
callq 0x6d6e4
testl %eax, %eax
js 0xa48cf
movq 0x10(%r15), %rcx
movq (%rcx), %r12
movq 0x8(%rcx), %rcx
subq %r12, %rcx
shrq $0x4, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %ecx, %eax
jge 0xa48cf
movl %eax, %eax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq %rax, %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x63080
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xa55fe
jmp 0xa488b
movq %r13, %r12
movq 0x20(%r15), %rax
movq 0x8(%rax), %r13
movq 0x40(%rsp), %rbp
cmpq %r13, %r12
je 0xa49ef
leaq 0x10(%r12), %rsi
movq %rbp, %rdi
callq 0x63080
movq 0x20(%r15), %rdi
leaq 0x60(%r12), %rdx
movq %r12, %rsi
callq 0xa5764
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1d520
movq %rax, %r14
leaq 0x3104e(%rip), %rsi # 0xd58ff
movq %rax, %rdi
callq 0x1d330
movq 0x666f8(%rip), %rsi # 0x10afb8
movq 0x666a9(%rip), %rdx # 0x10af70
movq %r14, %rdi
callq 0x1d890
movl $0x10, %edi
callq 0x1d520
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x5a4a4
leaq 0x3103d(%rip), %rsi # 0xd5932
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x53e90
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1d380
xorl %ebp, %ebp
movq 0x6669d(%rip), %rsi # 0x10afb8
movq 0x6664e(%rip), %rdx # 0x10af70
movq %r14, %rdi
callq 0x1d890
jmp 0xa4aa7
movl $0x10, %edi
callq 0x1d520
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x5a4a4
leaq 0x2e2ff(%rip), %rsi # 0xd2c54
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x53e90
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1d380
xorl %ebp, %ebp
movq 0x6663d(%rip), %rsi # 0x10afb8
movq 0x665ee(%rip), %rdx # 0x10af70
movq %r14, %rdi
callq 0x1d890
jmp 0xa4aa7
movl $0x10, %edi
callq 0x1d520
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x5a4a4
leaq 0x2e24c(%rip), %rsi # 0xd2c01
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x53e90
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1d380
xorl %ebp, %ebp
movq 0x665dd(%rip), %rsi # 0x10afb8
movq 0x6658e(%rip), %rdx # 0x10af70
movq %r14, %rdi
callq 0x1d890
jmp 0xa4aa7
movl $0x10, %edi
callq 0x1d520
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x5a4a4
leaq 0x30f36(%rip), %rsi # 0xd594b
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x53e90
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1d380
xorl %ebp, %ebp
movq 0x6657d(%rip), %rsi # 0x10afb8
movq 0x6652e(%rip), %rdx # 0x10af70
movq %r14, %rdi
callq 0x1d890
jmp 0xa4aa7
movl $0x10, %edi
callq 0x1d520
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x5a4a4
leaq 0x30ea1(%rip), %rsi # 0xd5913
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x53e90
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1d380
xorl %ebp, %ebp
movq 0x66520(%rip), %rsi # 0x10afb8
movq 0x664d1(%rip), %rdx # 0x10af70
movq %r14, %rdi
callq 0x1d890
jmp 0xa4ab7
jmp 0xa4af7
jmp 0xa4ab7
jmp 0xa4af7
jmp 0xa4ab7
jmp 0xa4af7
jmp 0xa4ab7
jmp 0xa4af7
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4ad5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1d160
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4af0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1d160
testb %bpl, %bpl
jne 0xa4b26
jmp 0xa4b3b
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4b26
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1d160
jmp 0xa4b26
jmp 0xa4b23
jmp 0xa4b23
jmp 0xa4b23
jmp 0xa4b23
jmp 0xa4b30
jmp 0xa4b23
movq %rax, %rbx
movq %r14, %rdi
callq 0x1dc90
jmp 0xa4b3b
movq %rax, %rbx
movq %rbp, %rdi
callq 0x5a540
movq %rbx, %rdi
callq 0x1d8e0
nop
| _ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov rbp, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_A478F
mov rsi, [rax+8]
cmp [rax], rsi
jz loc_A489D
cmp qword ptr [rbx+20h], 0
mov al, [rbx+40h]
jnz loc_A47F4
cmp qword ptr [rbx+10h], 0
jnz loc_A47F4
test al, al
jnz loc_A47F4
cmp qword ptr [rbx+30h], 0
jnz loc_A47F4
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, [rdi+8]
add rsi, 0FFFFFFFFFFFFFFB0h
mov [rdi+8], rsi
call _ZNSt15__new_allocatorIN5minja5ValueEE7destroyIS1_EEvPT_; std::__new_allocator<minja::Value>::destroy<minja::Value>(minja::Value *)
jmp loc_A488B
loc_A478F:
mov r14, [r15+20h]
test r14, r14
jz loc_A492F
cmp qword ptr [rbx+10h], 0
jnz loc_A498F
cmp qword ptr [rbx+20h], 0
jnz loc_A498F
cmp qword ptr [rbx+30h], 0
jnz loc_A498F
mov r13, [r14]
mov r12, [r14+8]
cmp r13, r12
jz loc_A4864
mov [rsp+78h+var_38], rbp
lea rbp, [rbx+40h]
loc_A47D6:
mov rdi, r13
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_A4854
add r13, 60h ; '`'
mov r12, [r14+8]
cmp r13, r12
jnz short loc_A47D6
jmp short loc_A4857
loc_A47F4:
add al, 0FBh
cmp al, 2
jnb loc_A4A4C
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js loc_A48CF
mov rcx, [r15+10h]
mov r12, [rcx]
mov rcx, [rcx+8]
sub rcx, r12
shr rcx, 4
imul ecx, 0CCCCCCCDh
cmp eax, ecx
jge loc_A48CF
mov eax, eax
lea rax, [rax+rax*4]
shl rax, 4
add r12, rax
mov rdi, rbp; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE; std::vector<minja::Value>::_M_erase(__gnu_cxx::__normal_iterator<minja::Value*,std::vector<minja::Value>>)
jmp short loc_A488B
loc_A4854:
mov r12, r13
loc_A4857:
mov rax, [r15+20h]
mov r13, [rax+8]
mov rbp, [rsp+78h+var_38]
loc_A4864:
cmp r12, r13
jz loc_A49EF
lea rsi, [r12+10h]; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
lea rdx, [r12+60h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
loc_A488B:
mov rax, rbp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A489D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
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, r14; void *
call ___cxa_throw
loc_A48CF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_A4AA7
loc_A492F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array or object: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_A4AA7
loc_A498F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_A4AA7
loc_A49EF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_A4AA7
loc_A4A4C:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_A4AA7:
jmp short loc_A4AB7
jmp short loc_A4AF7
jmp short loc_A4AB7
jmp short loc_A4AF7
jmp short loc_A4AB7
jmp short loc_A4AF7
jmp short loc_A4AB7
jmp short loc_A4AF7
loc_A4AB7:
mov rbx, rax
lea rax, [rsp+78h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4AD5
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4AD5:
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4AF0
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4AF0:
test bpl, bpl
jnz short loc_A4B26
jmp short loc_A4B3B
loc_A4AF7:
mov rbx, rax
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4B26
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A4B26
jmp short loc_A4B23
jmp short loc_A4B23
jmp short loc_A4B23
jmp short loc_A4B23
jmp short loc_A4B30
jmp short $+2
loc_A4B23:
mov rbx, rax
loc_A4B26:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_A4B3B
loc_A4B30:
mov rbx, rax
mov rdi, rbp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A4B3B:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
minja::Value *v6; // rbp
_QWORD *v7; // rax
long long v8; // rsi
char v9; // al
long long v10; // rdi
long long v11; // rsi
unsigned __int8 **v12; // r14
unsigned __int8 *v13; // r13
unsigned __int8 *v14; // r12
int v15; // eax
_QWORD *v16; // rcx
const minja::Value *v17; // r12
std::runtime_error *exception; // r14
void *v20; // r14
void *v21; // r14
void *v22; // r14
void *v23; // r14
void *v24; // r14
_BYTE v25[16]; // [rsp+0h] [rbp-78h] BYREF
_QWORD v26[2]; // [rsp+20h] [rbp-58h] BYREF
minja::Value *v27; // [rsp+40h] [rbp-38h]
v6 = this;
v7 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v7 )
{
v8 = v7[1];
if ( *v7 == v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *(_BYTE *)(a3 + 64);
if ( *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 16) || v9 || *(_QWORD *)(a3 + 48) )
{
if ( (unsigned __int8)(v9 - 5) >= 2u )
{
v24 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"pop index must be an integer: ", (long long)v25);
std::runtime_error::runtime_error(v24, v26);
__cxa_throw(
v24,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = minja::Value::get<int>((_QWORD *)a3);
if ( v15 < 0 || (v16 = (_QWORD *)*((_QWORD *)a2 + 2), v15 >= (int)(-858993459 * ((v16[1] - *v16) >> 4))) )
{
v20 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"pop index out of range: ", (long long)v25);
std::runtime_error::runtime_error(v20, v26);
__cxa_throw(
v20,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = (const minja::Value *)(80LL * (unsigned int)v15 + *v16);
minja::Value::Value(this, v17);
std::vector<minja::Value>::_M_erase(*((_QWORD *)a2 + 2), v17);
}
else
{
minja::Value::Value(this, (const minja::Value *)(v8 - 80));
v10 = *((_QWORD *)a2 + 2);
v11 = *(_QWORD *)(v10 + 8) - 80LL;
*(_QWORD *)(v10 + 8) = v11;
std::__new_allocator<minja::Value>::destroy<minja::Value>(v10, v11);
}
}
else
{
v12 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v12 )
{
v21 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"Value is not an array or object: ", (long long)v25);
std::runtime_error::runtime_error(v21, v26);
__cxa_throw(
v21,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
v22 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"Unashable type: ", (long long)v25);
std::runtime_error::runtime_error(v22, v26);
__cxa_throw(
v22,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = *v12;
v14 = v12[1];
if ( *v12 != v14 )
{
v27 = this;
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v13, (unsigned __int8 *)(a3 + 64), a4) )
{
v13 += 96;
v14 = v12[1];
if ( v13 == v14 )
goto LABEL_22;
}
v14 = v13;
LABEL_22:
v13 = *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL);
v6 = v27;
}
if ( v14 == v13 )
{
v23 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"Key not found: ", (long long)v25);
std::runtime_error::runtime_error(v23, v26);
__cxa_throw(
v23,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::Value(v6, (const minja::Value *)(v14 + 16));
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
*((_QWORD *)a2 + 4),
v14,
v14 + 96);
}
return v6;
}
| pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x001a478f
MOV RSI,qword ptr [RAX + 0x8]
CMP qword ptr [RAX],RSI
JZ 0x001a489d
CMP qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RBX + 0x40]
JNZ 0x001a47f4
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001a47f4
TEST AL,AL
JNZ 0x001a47f4
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001a47f4
ADD RSI,-0x50
MOV RDI,RBP
CALL 0x00163080
MOV RDI,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,-0x50
MOV qword ptr [RDI + 0x8],RSI
CALL 0x00163742
JMP 0x001a488b
LAB_001a478f:
MOV R14,qword ptr [R15 + 0x20]
TEST R14,R14
JZ 0x001a492f
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001a498f
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001a498f
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001a498f
MOV R13,qword ptr [R14]
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JZ 0x001a4864
MOV qword ptr [RSP + 0x40],RBP
LEA RBP,[RBX + 0x40]
LAB_001a47d6:
MOV RDI,R13
MOV RSI,RBP
CALL 0x0016081e
TEST AL,AL
JNZ 0x001a4854
ADD R13,0x60
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JNZ 0x001a47d6
JMP 0x001a4857
LAB_001a47f4:
ADD AL,0xfb
CMP AL,0x2
JNC 0x001a4a4c
MOV RDI,RBX
CALL 0x0016d6e4
TEST EAX,EAX
JS 0x001a48cf
MOV RCX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R12
SHR RCX,0x4
IMUL ECX,ECX,-0x33333333
CMP EAX,ECX
JGE 0x001a48cf
MOV EAX,EAX
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD R12,RAX
MOV RDI,RBP
MOV RSI,R12
CALL 0x00163080
MOV RDI,qword ptr [R15 + 0x10]
LAB_001a484a:
MOV RSI,R12
CALL 0x001a55fe
LAB_001a4852:
JMP 0x001a488b
LAB_001a4854:
MOV R12,R13
LAB_001a4857:
MOV RAX,qword ptr [R15 + 0x20]
MOV R13,qword ptr [RAX + 0x8]
MOV RBP,qword ptr [RSP + 0x40]
LAB_001a4864:
CMP R12,R13
JZ 0x001a49ef
LEA RSI,[R12 + 0x10]
MOV RDI,RBP
CALL 0x00163080
MOV RDI,qword ptr [R15 + 0x20]
LEA RDX,[R12 + 0x60]
LAB_001a4883:
MOV RSI,R12
CALL 0x001a5764
LAB_001a488b:
MOV RAX,RBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a489d:
MOV EDI,0x10
CALL 0x0011d520
MOV R14,RAX
LAB_001a48aa:
LEA RSI,[0x1d58ff]
MOV RDI,RAX
CALL 0x0011d330
LAB_001a48b9:
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R14
CALL 0x0011d890
LAB_001a48cf:
MOV EDI,0x10
CALL 0x0011d520
MOV R14,RAX
LAB_001a48dc:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0015a4a4
LAB_001a48ee:
LEA RSI,[0x1d5932]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00153e90
MOV BPL,0x1
LAB_001a4905:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011d380
XOR EBP,EBP
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R14
CALL 0x0011d890
LAB_001a492f:
MOV EDI,0x10
CALL 0x0011d520
MOV R14,RAX
LAB_001a493c:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0015a4a4
LAB_001a494e:
LEA RSI,[0x1d2c54]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00153e90
MOV BPL,0x1
LAB_001a4965:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011d380
XOR EBP,EBP
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R14
CALL 0x0011d890
LAB_001a498f:
MOV EDI,0x10
CALL 0x0011d520
MOV R14,RAX
LAB_001a499c:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0015a4a4
LAB_001a49ae:
LEA RSI,[0x1d2c01]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00153e90
MOV BPL,0x1
LAB_001a49c5:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011d380
XOR EBP,EBP
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R14
CALL 0x0011d890
LAB_001a49ef:
MOV EDI,0x10
CALL 0x0011d520
MOV R14,RAX
LAB_001a49fc:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0015a4a4
LAB_001a4a0e:
LEA RSI,[0x1d594b]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00153e90
MOV BPL,0x1
LAB_001a4a25:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011d380
XOR EBP,EBP
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R14
CALL 0x0011d890
LAB_001a4a4c:
MOV EDI,0x10
CALL 0x0011d520
MOV R14,RAX
LAB_001a4a59:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0015a4a4
LAB_001a4a6b:
LEA RSI,[0x1d5913]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00153e90
MOV BPL,0x1
LAB_001a4a82:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011d380
XOR EBP,EBP
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R14
CALL 0x0011d890
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
__new_allocator<minja::Value> *this;
long lVar2;
char cVar3;
uint uVar4;
runtime_error *prVar5;
int iVar6;
Value *in_RDX;
bool bVar7;
long in_RSI;
int iVar8;
Value *pVVar9;
basic_json *pbVar10;
basic_json *pbVar11;
int1 auStack_78 [32];
string local_58 [32];
Value *local_38;
plVar1 = *(long **)(in_RSI + 0x10);
bVar7 = SUB81(in_RDX,0);
iVar8 = (int)auStack_78;
if (plVar1 == (long *)0x0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a493c to 001a494d has its CatchHandler @ 001a4b1d */
dump_abi_cxx11_(iVar8,SUB81(in_RSI,0));
/* try { // try from 001a494e to 001a4961 has its CatchHandler @ 001a4ab5 */
std::operator+((char *)local_58,(string *)"Value is not an array or object: ");
/* try { // try from 001a4965 to 001a4989 has its CatchHandler @ 001a4ab3 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a499c to 001a49ad has its CatchHandler @ 001a4b1b */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001a49ae to 001a49c1 has its CatchHandler @ 001a4ab1 */
std::operator+((char *)local_58,(string *)"Unashable type: ");
/* try { // try from 001a49c5 to 001a49e9 has its CatchHandler @ 001a4aaf */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
pbVar11 = (basic_json *)*plVar1;
pbVar10 = (basic_json *)plVar1[1];
if (pbVar11 != pbVar10) {
local_38 = param_1;
do {
pbVar10 = pbVar11;
cVar3 = nlohmann::json_abi_v3_11_3::operator==(pbVar10,(basic_json *)(in_RDX + 0x40));
if (cVar3 != '\0') break;
pbVar11 = pbVar10 + 0x60;
pbVar10 = (basic_json *)plVar1[1];
} while (pbVar11 != pbVar10);
pbVar11 = *(basic_json **)(*(long *)(in_RSI + 0x20) + 8);
param_1 = local_38;
}
if (pbVar10 == pbVar11) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a49fc to 001a4a0d has its CatchHandler @ 001a4b19 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001a4a0e to 001a4a21 has its CatchHandler @ 001a4aad */
std::operator+((char *)local_58,(string *)"Key not found: ");
/* try { // try from 001a4a25 to 001a4a49 has its CatchHandler @ 001a4aab */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
Value(param_1,(Value *)(pbVar10 + 0x10));
/* try { // try from 001a4883 to 001a488a has its CatchHandler @ 001a4b30 */
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),pbVar10,pbVar10 + 0x60);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a48aa to 001a48b8 has its CatchHandler @ 001a4b23 */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
if (((*(long *)(in_RDX + 0x20) == 0) && (*(long *)(in_RDX + 0x10) == 0)) &&
((in_RDX[0x40] == (Value)0x0 && (*(long *)(in_RDX + 0x30) == 0)))) {
Value(param_1,(Value *)(plVar1[1] + -0x50));
this = *(__new_allocator<minja::Value> **)(in_RSI + 0x10);
lVar2 = *(long *)(this + 8);
*(Value **)(this + 8) = (Value *)(lVar2 + -0x50);
std::__new_allocator<minja::Value>::destroy<minja::Value>(this,(Value *)(lVar2 + -0x50));
}
else {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a4a59 to 001a4a6a has its CatchHandler @ 001a4b17 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001a4a6b to 001a4a7e has its CatchHandler @ 001a4aa9 */
std::operator+((char *)local_58,(string *)"pop index must be an integer: ");
/* try { // try from 001a4a82 to 001a4aa6 has its CatchHandler @ 001a4aa7 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
uVar4 = get<int>(in_RDX);
if (((int)uVar4 < 0) ||
(lVar2 = **(long **)(in_RSI + 0x10),
iVar6 = (int)((ulong)((*(long **)(in_RSI + 0x10))[1] - lVar2) >> 4),
SBORROW4(uVar4,iVar6 * -0x33333333) == (int)(uVar4 + iVar6 * 0x33333333) < 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a48dc to 001a48ed has its CatchHandler @ 001a4b21 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001a48ee to 001a4901 has its CatchHandler @ 001a4af7 */
std::operator+((char *)local_58,(string *)"pop index out of range: ");
/* try { // try from 001a4905 to 001a4929 has its CatchHandler @ 001a4ab7 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
pVVar9 = (Value *)(lVar2 + (ulong)uVar4 * 0x50);
Value(param_1,pVVar9);
/* try { // try from 001a484a to 001a4851 has its CatchHandler @ 001a4b1f */
std::vector<minja::Value,std::allocator<minja::Value>>::_M_erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar9);
}
}
return param_1;
}
| |
49,067 | translog_first_theoretical_lsn | eloqsql/storage/maria/ma_loghandler.c | LSN translog_first_theoretical_lsn()
{
TRANSLOG_ADDRESS addr= translog_get_horizon();
TRANSLOG_PAGE_SIZE_BUFF psize_buff;
uchar *page;
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_first_theoretical_lsn");
DBUG_PRINT("info", ("Horizon: " LSN_FMT, LSN_IN_PARTS(addr)));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
if (!translog_is_file(1))
DBUG_RETURN(LSN_IMPOSSIBLE);
if (addr == MAKE_LSN(1, TRANSLOG_PAGE_SIZE))
{
/* log has no records yet */
DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE +
log_descriptor.page_overhead));
}
addr= MAKE_LSN(1, TRANSLOG_PAGE_SIZE); /* the first page of the file */
data.addr= &addr;
if ((page= translog_get_page(&data, psize_buff.buffer, NULL)) == NULL)
DBUG_RETURN(LSN_ERROR);
DBUG_RETURN(MAKE_LSN(1, TRANSLOG_PAGE_SIZE +
page_overhead[page[TRANSLOG_PAGE_FLAGS]]));
} | O0 | c | translog_first_theoretical_lsn:
pushq %rbp
movq %rsp, %rbp
subq $0x2040, %rsp # imm = 0x2040
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
callq 0x54bc0
movq %rax, -0x2018(%rbp)
jmp 0x57456
jmp 0x57458
jmp 0x5745a
movl $0x1, %edi
callq 0x56f00
cmpb $0x0, %al
jne 0x5747a
jmp 0x5746a
movq $0x0, -0x2010(%rbp)
jmp 0x5753c
movabsq $0x100002000, %rax # imm = 0x100002000
cmpq %rax, -0x2018(%rbp)
jne 0x574b6
jmp 0x5748f
movzwl 0x421f4e(%rip), %eax # 0x4793e4
addl $0x2000, %eax # imm = 0x2000
movl %eax, %eax
movabsq $0x100000000, %rcx # imm = 0x100000000
orq %rcx, %rax
movq %rax, -0x2010(%rbp)
jmp 0x5753c
movabsq $0x100002000, %rax # imm = 0x100002000
movq %rax, -0x2018(%rbp)
leaq -0x2018(%rbp), %rax
movq %rax, -0x2030(%rbp)
leaq -0x2008(%rbp), %rsi
leaq -0x2030(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x52190
movq %rax, -0x2020(%rbp)
cmpq $0x0, %rax
jne 0x57508
jmp 0x574fb
movq $0x1, -0x2010(%rbp)
jmp 0x5753c
jmp 0x5750a
movq -0x2020(%rbp), %rax
movzbl 0x6(%rax), %eax
movl %eax, %ecx
leaq 0xc22d92(%rip), %rax # 0xc7a2b0
movl (%rax,%rcx,4), %eax
addl $0x2000, %eax # imm = 0x2000
movl %eax, %eax
movabsq $0x100000000, %rcx # imm = 0x100000000
orq %rcx, %rax
movq %rax, -0x2010(%rbp)
movq -0x2010(%rbp), %rax
movq %rax, -0x2038(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5756c
movq -0x2038(%rbp), %rax
addq $0x2040, %rsp # imm = 0x2040
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| translog_first_theoretical_lsn:
push rbp
mov rbp, rsp
sub rsp, 2040h
mov rax, fs:28h
mov [rbp+var_8], rax
call translog_get_horizon
mov [rbp+var_2018], rax
jmp short $+2
loc_57456:
jmp short $+2
loc_57458:
jmp short $+2
loc_5745A:
mov edi, 1
call translog_is_file
cmp al, 0
jnz short loc_5747A
jmp short $+2
loc_5746A:
mov [rbp+var_2010], 0
jmp loc_5753C
loc_5747A:
mov rax, 100002000h
cmp [rbp+var_2018], rax
jnz short loc_574B6
jmp short $+2
loc_5748F:
movzx eax, cs:word_4793E4
add eax, 2000h
mov eax, eax
mov rcx, 100000000h
or rax, rcx
mov [rbp+var_2010], rax
jmp loc_5753C
loc_574B6:
mov rax, 100002000h
mov [rbp+var_2018], rax
lea rax, [rbp+var_2018]
mov [rbp+var_2030], rax
lea rsi, [rbp+var_2008]
lea rdi, [rbp+var_2030]
xor eax, eax
mov edx, eax
call translog_get_page
mov [rbp+var_2020], rax
cmp rax, 0
jnz short loc_57508
jmp short $+2
loc_574FB:
mov [rbp+var_2010], 1
jmp short loc_5753C
loc_57508:
jmp short $+2
loc_5750A:
mov rax, [rbp+var_2020]
movzx eax, byte ptr [rax+6]
mov ecx, eax
lea rax, page_overhead
mov eax, [rax+rcx*4]
add eax, 2000h
mov eax, eax
mov rcx, 100000000h
or rax, rcx
mov [rbp+var_2010], rax
loc_5753C:
mov rax, [rbp+var_2010]
mov [rbp+var_2038], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5756C
mov rax, [rbp+var_2038]
add rsp, 2040h
pop rbp
retn
loc_5756C:
call ___stack_chk_fail
| long long translog_first_theoretical_lsn(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rcx
int v4; // r8d
int v5; // r9d
long long *p_horizon; // [rsp+10h] [rbp-2030h] BYREF
long long page; // [rsp+20h] [rbp-2020h]
long long horizon; // [rsp+28h] [rbp-2018h] BYREF
_BYTE v11[8192]; // [rsp+38h] [rbp-2008h] BYREF
unsigned long long v12; // [rsp+2038h] [rbp-8h]
v12 = __readfsqword(0x28u);
horizon = translog_get_horizon();
if ( !translog_is_file(1u, a2, v2, v3, v4, v5) )
return 0LL;
if ( horizon == 0x100002000LL )
return ((unsigned int)(unsigned __int16)word_4793E4 + 0x2000) | 0x100000000LL;
horizon = 0x100002000LL;
p_horizon = &horizon;
page = translog_get_page(&p_horizon, (long long)v11, 0LL);
if ( page )
return (unsigned int)(page_overhead[*(unsigned __int8 *)(page + 6)] + 0x2000) | 0x100000000LL;
else
return 1LL;
}
| translog_first_theoretical_lsn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2040
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
CALL 0x00154bc0
MOV qword ptr [RBP + -0x2018],RAX
JMP 0x00157456
LAB_00157456:
JMP 0x00157458
LAB_00157458:
JMP 0x0015745a
LAB_0015745a:
MOV EDI,0x1
CALL 0x00156f00
CMP AL,0x0
JNZ 0x0015747a
JMP 0x0015746a
LAB_0015746a:
MOV qword ptr [RBP + -0x2010],0x0
JMP 0x0015753c
LAB_0015747a:
MOV RAX,0x100002000
CMP qword ptr [RBP + -0x2018],RAX
JNZ 0x001574b6
JMP 0x0015748f
LAB_0015748f:
MOVZX EAX,word ptr [0x005793e4]
ADD EAX,0x2000
MOV EAX,EAX
MOV RCX,0x100000000
OR RAX,RCX
MOV qword ptr [RBP + -0x2010],RAX
JMP 0x0015753c
LAB_001574b6:
MOV RAX,0x100002000
MOV qword ptr [RBP + -0x2018],RAX
LEA RAX,[RBP + -0x2018]
MOV qword ptr [RBP + -0x2030],RAX
LEA RSI,[RBP + -0x2008]
LEA RDI,[RBP + -0x2030]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00152190
MOV qword ptr [RBP + -0x2020],RAX
CMP RAX,0x0
JNZ 0x00157508
JMP 0x001574fb
LAB_001574fb:
MOV qword ptr [RBP + -0x2010],0x1
JMP 0x0015753c
LAB_00157508:
JMP 0x0015750a
LAB_0015750a:
MOV RAX,qword ptr [RBP + -0x2020]
MOVZX EAX,byte ptr [RAX + 0x6]
MOV ECX,EAX
LEA RAX,[0xd7a2b0]
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD EAX,0x2000
MOV EAX,EAX
MOV RCX,0x100000000
OR RAX,RCX
MOV qword ptr [RBP + -0x2010],RAX
LAB_0015753c:
MOV RAX,qword ptr [RBP + -0x2010]
MOV qword ptr [RBP + -0x2038],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015756c
MOV RAX,qword ptr [RBP + -0x2038]
ADD RSP,0x2040
POP RBP
RET
LAB_0015756c:
CALL 0x0012a270
|
ulong translog_first_theoretical_lsn(void)
{
char cVar1;
long in_FS_OFFSET;
long *local_2038 [2];
long local_2028;
long local_2020;
ulong local_2018;
int1 local_2010 [8192];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2020 = translog_get_horizon();
cVar1 = translog_is_file(1);
if (cVar1 == '\0') {
local_2018 = 0;
}
else if (local_2020 == 0x100002000) {
local_2018 = (ulong)(DAT_005793e4 + 0x2000) | 0x100000000;
}
else {
local_2020 = 0x100002000;
local_2038[0] = &local_2020;
local_2028 = translog_get_page(local_2038,local_2010,0);
if (local_2028 == 0) {
local_2018 = 1;
}
else {
local_2018 = (ulong)(*(int *)(page_overhead + (ulong)*(byte *)(local_2028 + 6) * 4) + 0x2000)
| 0x100000000;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_2018;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
49,068 | mysql_list_dbs_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_dbs_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_dbs,
(parms->mysql, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O3 | c | mysql_list_dbs_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 %rax, %rdi
callq 0x17040
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_list_dbs_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 rdi, rax
call _mysql_list_dbs@libmariadbclient_18
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_list_dbs_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_list_dbs_libmariadbclient_18(*(_QWORD *)a1, *(const char **)(a1 + 8));
*(_QWORD *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
| mysql_list_dbs_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 RDI,RAX
CALL 0x00117040
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_dbs_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_dbs(*param_1,param_1[1]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
49,069 | my_copy_fix_mb | eloqsql/strings/ctype-mb.c | size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
} | O0 | c | my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4c158
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x4c160
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x4c220
movq %rax, -0x40(%rbp)
jmp 0x4c18b
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x4c1b5
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x244c0
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4c1ca
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4c213
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq -0x48(%rbp), %rcx
movq -0x28(%rbp), %r8
addq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
subq -0x40(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x4c270
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| my_copy_fix_mb:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
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 [rbp+var_38], r9
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jnb short loc_4C158
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
jmp short loc_4C160
loc_4C158:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_4C160:
mov rax, [rbp+var_60]
mov [rbp+var_58], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_28]
add rdx, [rbp+var_58]
mov rcx, [rbp+var_38]
mov r8, [rbp+arg_0]
call my_ci_well_formed_char_length
mov [rbp+var_40], rax
jmp short $+2
loc_4C18B:
mov rax, [rbp+arg_0]
mov rax, [rax]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_4C1B5
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_48]
call _memmove
loc_4C1B5:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_4C1CA
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
jmp short loc_4C213
loc_4C1CA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
add rsi, [rbp+var_48]
mov rdx, [rbp+var_18]
add rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
add rcx, [rbp+var_48]
mov r8, [rbp+var_28]
add r8, [rbp+var_30]
mov r9, [rbp+var_38]
sub r9, [rbp+var_40]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], rax
call my_append_fix_badly_formed_tail
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_8], rax
loc_4C213:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
_QWORD *a7)
{
unsigned long long v8; // [rsp+10h] [rbp-60h]
long long v9; // [rsp+28h] [rbp-48h]
int v10; // [rsp+30h] [rbp-40h]
int v11; // [rsp+38h] [rbp-38h]
int v12; // [rsp+40h] [rbp-30h]
int v14; // [rsp+50h] [rbp-20h]
v14 = a3;
v12 = a5;
v11 = a6;
if ( a5 >= a3 )
v8 = a3;
else
v8 = a5;
v10 = my_ci_well_formed_char_length(a1, a4, v8 + a4, a6, a7);
v9 = *a7 - a4;
if ( v9 )
memmove(a2, a4, v9);
if ( a7[1] )
return my_append_fix_badly_formed_tail(
a1,
(int)v9 + (int)a2,
v14 + (int)a2,
(int)v9 + (int)a4,
v12 + (int)a4,
v11 - v10,
(long long)a7)
+ v9;
else
return v9;
}
| my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0014c158
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0014c160
LAB_0014c158:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_0014c160:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x28]
ADD RDX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x0014c220
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0014c18b
LAB_0014c18b:
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0014c1b5
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001244c0
LAB_0014c1b5:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0014c1ca
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014c213
LAB_0014c1ca:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x28]
ADD R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
SUB R9,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],RAX
CALL 0x0014c270
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014c213:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
size_t my_copy_fix_mb(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
long lVar1;
ulong local_68;
size_t local_10;
local_68 = param_3;
if (param_5 < param_3) {
local_68 = param_5;
}
lVar1 = my_ci_well_formed_char_length(param_1,param_4,(long)param_4 + local_68,param_6,param_7);
local_10 = *param_7 - (long)param_4;
if (local_10 != 0) {
memmove(param_2,param_4,local_10);
}
if (param_7[1] != 0) {
lVar1 = my_append_fix_badly_formed_tail
(param_1,(long)param_2 + local_10,(long)param_2 + param_3,
(long)param_4 + local_10,(long)param_4 + param_5,param_6 - lVar1,param_7);
local_10 = local_10 + lVar1;
}
return local_10;
}
| |
49,070 | ma_invalidate_stmts | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void ma_invalidate_stmts(MYSQL *mysql, const char *function_name)
{
if (mysql->stmts)
{
LIST *li_stmt= mysql->stmts;
for (; li_stmt; li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
stmt->mysql= NULL;
SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, function_name);
}
mysql->stmts= NULL;
}
} | O3 | c | ma_invalidate_stmts:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x4c8(%rdi), %r12
testq %r12, %r12
je 0x1c63a
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq 0x31652(%rip), %rax # 0x4dc10
movq (%rax), %r15
leaq 0x31658(%rip), %r13 # 0x4dc20
movq 0x10(%r12), %rbx
movq $0x0, 0x38(%rbx)
movl $0x808, 0x108(%rbx) # imm = 0x808
leaq 0x30d(%rbx), %rdi
movl $0x5, %edx
movq %r15, %rsi
callq 0x13220
movb $0x0, 0x312(%rbx)
movq %r14, %rsi
testq %r14, %r14
jne 0x1c609
movq 0x1c0(%r13), %rsi
leaq 0x10c(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb $0x0, 0x30b(%rbx)
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1c5c8
movq -0x30(%rbp), %rax
movq $0x0, 0x4c8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_invalidate_stmts:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, [rdi+4C8h]
test r12, r12
jz loc_1C63A
mov r14, rsi
mov [rbp+var_30], rdi
lea rax, SQLSTATE_UNKNOWN
mov r15, [rax]
lea r13, client_errors
loc_1C5C8:
mov rbx, [r12+10h]
mov qword ptr [rbx+38h], 0
mov dword ptr [rbx+108h], 808h
lea rdi, [rbx+30Dh]
mov edx, 5
mov rsi, r15
call _strncpy
mov byte ptr [rbx+312h], 0
mov rsi, r14
test r14, r14
jnz short loc_1C609
mov rsi, [r13+1C0h]
loc_1C609:
lea rdi, [rbx+10Ch]
mov edx, 200h
call _strncpy
mov byte ptr [rbx+30Bh], 0
mov r12, [r12+8]
test r12, r12
jnz short loc_1C5C8
mov rax, [rbp+var_30]
mov qword ptr [rax+4C8h], 0
loc_1C63A:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_invalidate_stmts(long long a1, char *a2)
{
long long v2; // r12
char *v4; // r15
long long v5; // rbx
char *v6; // rsi
long long result; // rax
v2 = *(_QWORD *)(a1 + 1224);
if ( v2 )
{
v4 = SQLSTATE_UNKNOWN;
do
{
v5 = *(_QWORD *)(v2 + 16);
*(_QWORD *)(v5 + 56) = 0LL;
*(_DWORD *)(v5 + 264) = 2056;
strncpy(v5 + 781, v4, 5LL);
*(_BYTE *)(v5 + 786) = 0;
v6 = a2;
if ( !a2 )
v6 = client_errors[56];
strncpy(v5 + 268, v6, 512LL);
*(_BYTE *)(v5 + 779) = 0;
v2 = *(_QWORD *)(v2 + 8);
}
while ( v2 );
result = a1;
*(_QWORD *)(a1 + 1224) = 0LL;
}
return result;
}
| ma_invalidate_stmts:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,qword ptr [RDI + 0x4c8]
TEST R12,R12
JZ 0x0011c63a
MOV R14,RSI
MOV qword ptr [RBP + -0x30],RDI
LEA RAX,[0x14dc10]
MOV R15,qword ptr [RAX]
LEA R13,[0x14dc20]
LAB_0011c5c8:
MOV RBX,qword ptr [R12 + 0x10]
MOV qword ptr [RBX + 0x38],0x0
MOV dword ptr [RBX + 0x108],0x808
LEA RDI,[RBX + 0x30d]
MOV EDX,0x5
MOV RSI,R15
CALL 0x00113220
MOV byte ptr [RBX + 0x312],0x0
MOV RSI,R14
TEST R14,R14
JNZ 0x0011c609
MOV RSI,qword ptr [R13 + 0x1c0]
LAB_0011c609:
LEA RDI,[RBX + 0x10c]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],0x0
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x0011c5c8
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x4c8],0x0
LAB_0011c63a:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ma_invalidate_stmts(long param_1,char *param_2)
{
long lVar1;
int *__src;
char *__src_00;
long lVar2;
__src = SQLSTATE_UNKNOWN;
lVar2 = *(long *)(param_1 + 0x4c8);
if (lVar2 != 0) {
do {
lVar1 = *(long *)(lVar2 + 0x10);
*(int8 *)(lVar1 + 0x38) = 0;
*(int4 *)(lVar1 + 0x108) = 0x808;
strncpy((char *)(lVar1 + 0x30d),__src,5);
*(int1 *)(lVar1 + 0x312) = 0;
__src_00 = param_2;
if (param_2 == (char *)0x0) {
__src_00 = PTR_s_Server_closed_statement_due_to_a_0014dde0;
}
strncpy((char *)(lVar1 + 0x10c),__src_00,0x200);
*(int1 *)(lVar1 + 0x30b) = 0;
lVar2 = *(long *)(lVar2 + 8);
} while (lVar2 != 0);
*(int8 *)(param_1 + 0x4c8) = 0;
}
return;
}
| |
49,071 | void ggml::cpu::aarch64::gemm<block_q4_0, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | void gemm<block_q4_0, 4, 4>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) {
ggml_gemm_q4_0_4x4_q8_0(n, s, bs, vx, vy, nr, nc);
} | O3 | cpp | void ggml::cpu::aarch64::gemm<block_q4_0, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, 0x40(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movq %rdi, 0x60(%rsp)
testb $0x1f, %dil
jne 0x2afb0
testb $0x3, %r9b
jne 0x2afcf
movl 0x100(%rsp), %ecx
movq %rcx, (%rsp)
testb $0x3, %cl
jne 0x2afee
sarl $0x2, %r9d
testl %r9d, %r9d
jle 0x2af9b
sarl $0x5, %eax
movq (%rsp), %rcx
sarl $0x2, %ecx
movq %rcx, (%rsp)
movq %rdx, %rcx
shlq $0x4, %rcx
movq %rcx, 0x50(%rsp)
shlq $0x2, %rdx
movslq %eax, %rcx
movl %r9d, %eax
movq %rax, 0x48(%rsp)
movl %ecx, %eax
movq %rax, 0x78(%rsp)
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
leaq (,%rcx,8), %rax
leaq (%rax,%rax,8), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x8(%rsp)
vxorps %xmm0, %xmm0, %xmm0
leaq 0x80(%rsp), %rdi
movq 0x1e18e(%rip), %rbp # 0x48f68
vpbroadcastb 0xe963(%rip), %xmm1 # 0x39746
cmpl $0x0, (%rsp)
jle 0x2af79
movq 0x8(%rsp), %rax
imulq 0x38(%rsp), %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %r14
addq 0x40(%rsp), %r14
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x68(%rsp)
movq %rsi, 0x70(%rsp)
vmovups %ymm0, 0xa0(%rsp)
vmovups %ymm0, 0x80(%rsp)
cmpl $0x20, 0x60(%rsp)
jl 0x2af30
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
xorl %r12d, %r12d
movq %r12, %rax
shlq $0x7, %rax
leaq (%rax,%r12,8), %rax
addq %r14, %rax
movq %r8, %r11
xorl %r10d, %r10d
movq %r10, %r15
shlq $0x4, %r15
movq %rdi, %r13
xorl %esi, %esi
movzwl (%rax,%rsi,2), %r9d
vmovss (%rbp,%r9,4), %xmm2
leaq (%r15,%rsi,4), %r9
vpmovsxbd 0x48(%rax,%r9), %xmm3
vpmovsxbd 0x8(%rax,%r9), %xmm4
xorl %r9d, %r9d
vmovd (%r11,%r9,4), %xmm5
vpand %xmm1, %xmm5, %xmm6
vpmovsxbd %xmm6, %xmm6
vpmulld %xmm6, %xmm3, %xmm6
vpsllw $0x4, %xmm5, %xmm5
vpand %xmm1, %xmm5, %xmm5
vpmovsxbd %xmm5, %xmm5
vpmulld %xmm4, %xmm5, %xmm5
vpaddd %xmm5, %xmm6, %xmm5
vpsrad $0x4, %xmm5, %xmm5
vphaddd %xmm5, %xmm5, %xmm5
vphaddd %xmm5, %xmm5, %xmm5
vcvtdq2ps %xmm5, %xmm5
movzwl (%rcx,%r9,2), %ebx
vmulss (%rbp,%rbx,4), %xmm5, %xmm5
vfmadd213ss (%r13,%r9,4), %xmm2, %xmm5 # xmm5 = (xmm2 * xmm5) + mem
vmovss %xmm5, (%r13,%r9,4)
incq %r9
cmpq $0x4, %r9
jne 0x2ae98
incq %rsi
addq $0x10, %r13
cmpq $0x4, %rsi
jne 0x2ae77
incq %r10
addq $0x10, %r11
cmpq $0x4, %r10
jne 0x2ae6b
incq %r12
addq $0x48, %r8
addq $0x48, %rcx
cmpq 0x78(%rsp), %r12
jne 0x2ae57
movq 0x70(%rsp), %rsi
movq %rsi, %rax
xorl %ecx, %ecx
vmovups 0x80(%rsp,%rcx), %xmm2
vmovups %xmm2, (%rax)
addq $0x10, %rcx
addq %rdx, %rax
cmpq $0x40, %rcx
jne 0x2af3a
movq 0x68(%rsp), %rcx
incq %rcx
movq 0x58(%rsp), %rax
addq %rax, 0x20(%rsp)
addq %rax, 0x28(%rsp)
addq $0x10, %rsi
cmpq (%rsp), %rcx
jne 0x2ae23
movq 0x8(%rsp), %rcx
incq %rcx
movq 0x50(%rsp), %rax
addq %rax, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
cmpq 0x48(%rsp), %rcx
jne 0x2ade3
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0xea8b(%rip), %rdi # 0x39a42
leaq 0xe952(%rip), %rsi # 0x39910
leaq 0xec83(%rip), %rcx # 0x39c48
movl $0x44b, %edx # imm = 0x44B
callq 0x83b0
leaq 0xece9(%rip), %rdi # 0x39cbf
leaq 0xe933(%rip), %rsi # 0x39910
leaq 0xec64(%rip), %rcx # 0x39c48
movl $0x44c, %edx # imm = 0x44C
callq 0x83b0
leaq 0xead0(%rip), %rdi # 0x39ac5
leaq 0xe914(%rip), %rsi # 0x39910
leaq 0xec45(%rip), %rcx # 0x39c48
movl $0x44d, %edx # imm = 0x44D
callq 0x83b0
| _ZN4ggml3cpu7aarch644gemmI10block_q4_0Ll4ELl4EEEviPfmPKvS6_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov [rsp+0F8h+var_B8], r8
mov [rsp+0F8h+var_E8], rcx
mov [rsp+0F8h+var_E0], rsi
lea eax, [rdi+1Fh]
test edi, edi
cmovns eax, edi
mov [rsp+0F8h+var_98], rdi
test dil, 1Fh
jnz loc_2AFB0
test r9b, 3
jnz loc_2AFCF
mov ecx, [rsp+0F8h+arg_0]
mov [rsp+0F8h+var_F8], rcx
test cl, 3
jnz loc_2AFEE
sar r9d, 2
test r9d, r9d
jle loc_2AF9B
sar eax, 5
mov rcx, [rsp+0F8h+var_F8]
sar ecx, 2
mov [rsp+0F8h+var_F8], rcx
mov rcx, rdx
shl rcx, 4
mov [rsp+0F8h+var_A8], rcx
shl rdx, 2
movsxd rcx, eax
mov eax, r9d
mov [rsp+0F8h+var_B0], rax
mov eax, ecx
mov [rsp+0F8h+var_80], rax
mov rax, [rsp+0F8h+var_E8]
add rax, 8
mov [rsp+0F8h+var_C8], rax
mov [rsp+0F8h+var_C0], rcx
lea rax, ds:0[rcx*8]
lea rax, [rax+rax*8]
mov [rsp+0F8h+var_A0], rax
mov [rsp+0F8h+var_F0], 0
vxorps xmm0, xmm0, xmm0
lea rdi, [rsp+0F8h+var_78]
mov rbp, cs:ggml_table_f32_f16_ptr
vpbroadcastb xmm1, cs:byte_39746
loc_2ADE3:
cmp dword ptr [rsp+0F8h+var_F8], 0
jle loc_2AF79
mov rax, [rsp+0F8h+var_F0]
imul rax, [rsp+0F8h+var_C0]
mov rcx, rax
shl rcx, 7
lea r14, [rcx+rax*8]
add r14, [rsp+0F8h+var_B8]
mov rsi, [rsp+0F8h+var_E0]
mov rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_D0], rax
mov rax, [rsp+0F8h+var_C8]
mov [rsp+0F8h+var_D8], rax
xor ecx, ecx
loc_2AE23:
mov [rsp+0F8h+var_90], rcx
mov [rsp+0F8h+var_88], rsi
vmovups [rsp+0F8h+var_58], ymm0
vmovups [rsp+0F8h+var_78], ymm0
cmp dword ptr [rsp+0F8h+var_98], 20h ; ' '
jl loc_2AF30
mov rcx, [rsp+0F8h+var_D0]
mov r8, [rsp+0F8h+var_D8]
xor r12d, r12d
loc_2AE57:
mov rax, r12
shl rax, 7
lea rax, [rax+r12*8]
add rax, r14
mov r11, r8
xor r10d, r10d
loc_2AE6B:
mov r15, r10
shl r15, 4
mov r13, rdi
xor esi, esi
loc_2AE77:
movzx r9d, word ptr [rax+rsi*2]
vmovss xmm2, dword ptr [rbp+r9*4+0]
lea r9, [r15+rsi*4]
vpmovsxbd xmm3, dword ptr [rax+r9+48h]
vpmovsxbd xmm4, dword ptr [rax+r9+8]
xor r9d, r9d
loc_2AE98:
vmovd xmm5, dword ptr [r11+r9*4]
vpand xmm6, xmm5, xmm1
vpmovsxbd xmm6, xmm6
vpmulld xmm6, xmm3, xmm6
vpsllw xmm5, xmm5, 4
vpand xmm5, xmm5, xmm1
vpmovsxbd xmm5, xmm5
vpmulld xmm5, xmm5, xmm4
vpaddd xmm5, xmm6, xmm5
vpsrad xmm5, xmm5, 4
vphaddd xmm5, xmm5, xmm5
vphaddd xmm5, xmm5, xmm5
vcvtdq2ps xmm5, xmm5
movzx ebx, word ptr [rcx+r9*2]
vmulss xmm5, xmm5, dword ptr [rbp+rbx*4+0]
vfmadd213ss xmm5, xmm2, dword ptr [r13+r9*4+0]
vmovss dword ptr [r13+r9*4+0], xmm5
inc r9
cmp r9, 4
jnz short loc_2AE98
inc rsi
add r13, 10h
cmp rsi, 4
jnz loc_2AE77
inc r10
add r11, 10h
cmp r10, 4
jnz loc_2AE6B
inc r12
add r8, 48h ; 'H'
add rcx, 48h ; 'H'
cmp r12, [rsp+0F8h+var_80]
jnz loc_2AE57
loc_2AF30:
mov rsi, [rsp+0F8h+var_88]
mov rax, rsi
xor ecx, ecx
loc_2AF3A:
vmovups xmm2, xmmword ptr [rsp+rcx+0F8h+var_78]
vmovups xmmword ptr [rax], xmm2
add rcx, 10h
add rax, rdx
cmp rcx, 40h ; '@'
jnz short loc_2AF3A
mov rcx, [rsp+0F8h+var_90]
inc rcx
mov rax, [rsp+0F8h+var_A0]
add [rsp+0F8h+var_D8], rax
add [rsp+0F8h+var_D0], rax
add rsi, 10h
cmp rcx, [rsp+0F8h+var_F8]
jnz loc_2AE23
loc_2AF79:
mov rcx, [rsp+0F8h+var_F0]
inc rcx
mov rax, [rsp+0F8h+var_A8]
add [rsp+0F8h+var_E0], rax
mov [rsp+0F8h+var_F0], rcx
cmp rcx, [rsp+0F8h+var_B0]
jnz loc_2ADE3
loc_2AF9B:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_2AFB0:
lea rdi, aNQk0; "n % qk == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmQ4; "void ggml_gemm_q4_0_4x4_q8_0(int, float"...
mov edx, 44Bh
call ___assert_fail
loc_2AFCF:
lea rdi, aNr40; "nr % 4 == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmQ4; "void ggml_gemm_q4_0_4x4_q8_0(int, float"...
mov edx, 44Ch
call ___assert_fail
loc_2AFEE:
lea rdi, aNcNcolsInterle; "nc % ncols_interleaved == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmQ4; "void ggml_gemm_q4_0_4x4_q8_0(int, float"...
mov edx, 44Dh
call ___assert_fail
| long long ggml::cpu::aarch64::gemm<block_q4_0,4l,4l>(
int a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
__m128 _XMM0,
int a8)
{
long long result; // rax
int v10; // r9d
long long v11; // rdx
long long v15; // rsi
long long v16; // rcx
long long v17; // rcx
long long v18; // r8
long long v19; // r12
long long i; // r10
long long j; // rsi
long long v49; // [rsp+0h] [rbp-F8h]
long long v50; // [rsp+8h] [rbp-F0h]
long long v53; // [rsp+20h] [rbp-D8h]
long long v54; // [rsp+28h] [rbp-D0h]
long long v55; // [rsp+30h] [rbp-C8h]
long long v56; // [rsp+38h] [rbp-C0h]
long long v58; // [rsp+48h] [rbp-B0h]
long long v59; // [rsp+50h] [rbp-A8h]
long long v60; // [rsp+58h] [rbp-A0h]
long long v61; // [rsp+68h] [rbp-90h]
long long v62; // [rsp+70h] [rbp-88h]
long long v63; // [rsp+78h] [rbp-80h]
__m256 v64; // [rsp+80h] [rbp-78h] BYREF
result = (unsigned int)(a1 + 31);
if ( a1 >= 0 )
result = (unsigned int)a1;
if ( (a1 & 0x1F) != 0 )
__assert_fail(
"n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
1099LL,
"void ggml_gemm_q4_0_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a6 & 3) != 0 )
__assert_fail(
"nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
1100LL,
"void ggml_gemm_q4_0_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a8 & 3) != 0 )
__assert_fail(
"nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
v10 = a6 >> 2;
if ( v10 > 0 )
{
v49 = (unsigned int)(a8 >> 2);
v59 = 16 * a3;
v11 = 4 * a3;
v58 = (unsigned int)v10;
v63 = (unsigned int)((int)result >> 5);
v55 = a4 + 8;
v56 = (int)result >> 5;
v60 = 72 * v56;
v50 = 0LL;
__asm { vxorps xmm0, xmm0, xmm0 }
_RBP = &ggml_table_f32_f16;
__asm { vpbroadcastb xmm1, cs:byte_39746 }
do
{
if ( (int)v49 > 0 )
{
v15 = a2;
v54 = a4;
v53 = v55;
v16 = 0LL;
do
{
v61 = v16;
v62 = v15;
__asm
{
vmovups [rsp+0F8h+var_58], ymm0
vmovups [rsp+0F8h+var_78], ymm0
}
if ( a1 >= 32 )
{
v17 = v54;
v18 = v53;
v19 = 0LL;
do
{
_RAX = a5 + 136 * v56 * v50 + 136 * v19;
_R11 = v18;
for ( i = 0LL; i != 4; ++i )
{
_R13 = &v64;
for ( j = 0LL; j != 4; ++j )
{
_R9 = *(unsigned __int16 *)(_RAX + 2 * j);
__asm { vmovss xmm2, dword ptr [rbp+r9*4+0] }
_R9 = 16 * i + 4 * j;
__asm
{
vpmovsxbd xmm3, dword ptr [rax+r9+48h]
vpmovsxbd xmm4, dword ptr [rax+r9+8]
}
for ( _R9 = 0LL; _R9 != 4; ++_R9 )
{
__asm
{
vmovd xmm5, dword ptr [r11+r9*4]
vpand xmm6, xmm5, xmm1
vpmovsxbd xmm6, xmm6
vpmulld xmm6, xmm3, xmm6
vpsllw xmm5, xmm5, 4
vpand xmm5, xmm5, xmm1
vpmovsxbd xmm5, xmm5
vpmulld xmm5, xmm5, xmm4
vpaddd xmm5, xmm6, xmm5
vpsrad xmm5, xmm5, 4
vphaddd xmm5, xmm5, xmm5
vphaddd xmm5, xmm5, xmm5
vcvtdq2ps xmm5, xmm5
vmulss xmm5, xmm5, dword ptr [rbp+rbx*4+0]
vfmadd213ss xmm5, xmm2, dword ptr [r13+r9*4+0]
vmovss dword ptr [r13+r9*4+0], xmm5
}
}
_R13 = (__m256 *)((char *)_R13 + 16);
}
_R11 += 16LL;
}
++v19;
v18 += 72LL;
v17 += 72LL;
}
while ( v19 != v63 );
}
_RAX = v62;
for ( _RCX = 0LL; _RCX != 64; _RCX += 16LL )
{
__asm
{
vmovups xmm2, xmmword ptr [rsp+rcx+0F8h+var_78]
vmovups xmmword ptr [rax], xmm2
}
_RAX += v11;
}
v16 = v61 + 1;
v53 += v60;
v54 += v60;
v15 = v62 + 16;
}
while ( v61 + 1 != v49 );
}
result = v59;
a2 += v59;
++v50;
}
while ( v50 != v58 );
}
__asm { vzeroupper }
return result;
}
| gemm<block_q4_0,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RSI
LEA EAX,[RDI + 0x1f]
TEST EDI,EDI
CMOVNS EAX,EDI
MOV qword ptr [RSP + 0x60],RDI
TEST DIL,0x1f
JNZ 0x0012afb0
TEST R9B,0x3
JNZ 0x0012afcf
MOV ECX,dword ptr [RSP + 0x100]
MOV qword ptr [RSP],RCX
TEST CL,0x3
JNZ 0x0012afee
SAR R9D,0x2
TEST R9D,R9D
JLE 0x0012af9b
SAR EAX,0x5
MOV RCX,qword ptr [RSP]
SAR ECX,0x2
MOV qword ptr [RSP],RCX
MOV RCX,RDX
SHL RCX,0x4
MOV qword ptr [RSP + 0x50],RCX
SHL RDX,0x2
MOVSXD RCX,EAX
MOV EAX,R9D
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,ECX
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x8
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RCX
LEA RAX,[RCX*0x8]
LEA RAX,[RAX + RAX*0x8]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x8],0x0
VXORPS XMM0,XMM0,XMM0
LEA RDI,[RSP + 0x80]
MOV RBP,qword ptr [0x00148f68]
VPBROADCASTB XMM1,byte ptr [0x00139746]
LAB_0012ade3:
CMP dword ptr [RSP],0x0
JLE 0x0012af79
MOV RAX,qword ptr [RSP + 0x8]
IMUL RAX,qword ptr [RSP + 0x38]
MOV RCX,RAX
SHL RCX,0x7
LEA R14,[RCX + RAX*0x8]
ADD R14,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
XOR ECX,ECX
LAB_0012ae23:
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x70],RSI
VMOVUPS ymmword ptr [RSP + 0xa0],YMM0
VMOVUPS ymmword ptr [RSP + 0x80],YMM0
CMP dword ptr [RSP + 0x60],0x20
JL 0x0012af30
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x20]
XOR R12D,R12D
LAB_0012ae57:
MOV RAX,R12
SHL RAX,0x7
LEA RAX,[RAX + R12*0x8]
ADD RAX,R14
MOV R11,R8
XOR R10D,R10D
LAB_0012ae6b:
MOV R15,R10
SHL R15,0x4
MOV R13,RDI
XOR ESI,ESI
LAB_0012ae77:
MOVZX R9D,word ptr [RAX + RSI*0x2]
VMOVSS XMM2,dword ptr [RBP + R9*0x4]
LEA R9,[R15 + RSI*0x4]
VPMOVSXBD XMM3,dword ptr [RAX + R9*0x1 + 0x48]
VPMOVSXBD XMM4,dword ptr [RAX + R9*0x1 + 0x8]
XOR R9D,R9D
LAB_0012ae98:
VMOVD XMM5,dword ptr [R11 + R9*0x4]
VPAND XMM6,XMM5,XMM1
VPMOVSXBD XMM6,XMM6
VPMULLD XMM6,XMM3,XMM6
VPSLLW XMM5,XMM5,0x4
VPAND XMM5,XMM5,XMM1
VPMOVSXBD XMM5,XMM5
VPMULLD XMM5,XMM5,XMM4
VPADDD XMM5,XMM6,XMM5
VPSRAD XMM5,XMM5,0x4
VPHADDD XMM5,XMM5,XMM5
VPHADDD XMM5,XMM5,XMM5
VCVTDQ2PS XMM5,XMM5
MOVZX EBX,word ptr [RCX + R9*0x2]
VMULSS XMM5,XMM5,dword ptr [RBP + RBX*0x4]
VFMADD213SS XMM5,XMM2,dword ptr [R13 + R9*0x4]
VMOVSS dword ptr [R13 + R9*0x4],XMM5
INC R9
CMP R9,0x4
JNZ 0x0012ae98
INC RSI
ADD R13,0x10
CMP RSI,0x4
JNZ 0x0012ae77
INC R10
ADD R11,0x10
CMP R10,0x4
JNZ 0x0012ae6b
INC R12
ADD R8,0x48
ADD RCX,0x48
CMP R12,qword ptr [RSP + 0x78]
JNZ 0x0012ae57
LAB_0012af30:
MOV RSI,qword ptr [RSP + 0x70]
MOV RAX,RSI
XOR ECX,ECX
LAB_0012af3a:
VMOVUPS XMM2,xmmword ptr [RSP + RCX*0x1 + 0x80]
VMOVUPS xmmword ptr [RAX],XMM2
ADD RCX,0x10
ADD RAX,RDX
CMP RCX,0x40
JNZ 0x0012af3a
MOV RCX,qword ptr [RSP + 0x68]
INC RCX
MOV RAX,qword ptr [RSP + 0x58]
ADD qword ptr [RSP + 0x20],RAX
ADD qword ptr [RSP + 0x28],RAX
ADD RSI,0x10
CMP RCX,qword ptr [RSP]
JNZ 0x0012ae23
LAB_0012af79:
MOV RCX,qword ptr [RSP + 0x8]
INC RCX
MOV RAX,qword ptr [RSP + 0x50]
ADD qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x8],RCX
CMP RCX,qword ptr [RSP + 0x48]
JNZ 0x0012ade3
LAB_0012af9b:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_0012afb0:
LEA RDI,[0x139a42]
LEA RSI,[0x139910]
LEA RCX,[0x139c48]
MOV EDX,0x44b
CALL 0x001083b0
LAB_0012afcf:
LEA RDI,[0x139cbf]
LEA RSI,[0x139910]
LEA RCX,[0x139c48]
MOV EDX,0x44c
CALL 0x001083b0
LAB_0012afee:
LEA RDI,[0x139ac5]
LEA RSI,[0x139910]
LEA RCX,[0x139c48]
MOV EDX,0x44d
CALL 0x001083b0
|
/* void ggml::cpu::aarch64::gemm<block_q4_0, 4l, 4l>(int, float*, unsigned long, void const*, void
const*, int, int) */
void ggml::cpu::aarch64::gemm<block_q4_0,4l,4l>
(int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6,
int param_7)
{
uint uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
long lVar5;
int8 uVar6;
long lVar7;
int *puVar8;
int iVar9;
uint uVar10;
float *pfVar11;
void *pvVar12;
ulong uVar13;
float *pfVar14;
long lVar15;
long lVar16;
long lVar17;
long lVar18;
long lVar19;
ulong uVar20;
int8 *puVar21;
int1 auVar22 [16];
int1 auVar23 [16];
int1 auVar24 [16];
ulong local_f0;
float *local_e0;
long local_d8;
void *local_d0;
int8 local_78 [9];
puVar8 = PTR_ggml_table_f32_f16_00148f68;
iVar9 = param_1 + 0x1f;
if (-1 < param_1) {
iVar9 = param_1;
}
if ((param_1 & 0x1fU) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,1099,
"void ggml_gemm_q4_0_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_6 & 3U) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0x44c,
"void ggml_gemm_q4_0_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_7 & 3U) == 0) {
if (0 < param_6 >> 2) {
uVar10 = iVar9 >> 5;
lVar5 = (long)(int)uVar10 * 0x48;
local_f0 = 0;
auVar22[1] = DAT_00139746;
auVar22[0] = DAT_00139746;
auVar22[2] = DAT_00139746;
auVar22[3] = DAT_00139746;
auVar22[4] = DAT_00139746;
auVar22[5] = DAT_00139746;
auVar22[6] = DAT_00139746;
auVar22[7] = DAT_00139746;
auVar22[8] = DAT_00139746;
auVar22[9] = DAT_00139746;
auVar22[10] = DAT_00139746;
auVar22[0xb] = DAT_00139746;
auVar22[0xc] = DAT_00139746;
auVar22[0xd] = DAT_00139746;
auVar22[0xe] = DAT_00139746;
auVar22[0xf] = DAT_00139746;
local_e0 = param_2;
do {
if (0 < param_7 >> 2) {
uVar13 = 0;
pfVar14 = local_e0;
local_d8 = (long)param_4 + 8;
local_d0 = param_4;
do {
local_78[4] = 0;
local_78[5] = 0;
local_78[6] = 0;
local_78[7] = 0;
local_78[0] = 0;
local_78[1] = 0;
local_78[2] = 0;
local_78[3] = 0;
if (0x1f < param_1) {
uVar20 = 0;
pvVar12 = local_d0;
lVar16 = local_d8;
do {
lVar7 = uVar20 * 0x88 + local_f0 * (long)(int)uVar10 * 0x88;
lVar18 = 0;
lVar19 = lVar16;
do {
lVar15 = 0;
puVar21 = local_78;
do {
uVar1 = *(uint *)(puVar8 + (ulong)*(ushort *)
((long)param_5 + lVar15 * 2 + lVar7) * 4);
lVar17 = lVar18 * 0x10 + lVar15 * 4;
auVar2 = vpmovsxbd_avx(ZEXT416(*(uint *)((long)param_5 + lVar17 + lVar7 + 0x48))
);
auVar3 = vpmovsxbd_avx(ZEXT416(*(uint *)((long)param_5 + lVar17 + lVar7 + 8)));
lVar17 = 0;
do {
auVar23 = ZEXT416(*(uint *)(lVar19 + lVar17 * 4));
auVar24 = vpand_avx(auVar23,auVar22);
auVar24 = vpmovsxbd_avx(auVar24);
auVar4 = vpmulld_avx(auVar2,auVar24);
auVar24 = vpsllw_avx(auVar23,4);
auVar24 = vpand_avx(auVar24,auVar22);
auVar24 = vpmovsxbd_avx(auVar24);
auVar24 = vpmulld_avx(auVar24,auVar3);
auVar24 = vpaddd_avx(auVar4,auVar24);
auVar24 = vpsrad_avx(auVar24,4);
auVar24 = vphaddd_avx(auVar24,auVar24);
auVar24 = vphaddd_avx(auVar24,auVar24);
auVar24 = vcvtdq2ps_avx(auVar24);
auVar24 = vfmadd213ss_fma(ZEXT416((uint)(auVar24._0_4_ *
*(float *)(puVar8 + (ulong)*(ushort *)
((long)
pvVar12 + lVar17 * 2) * 4))),ZEXT416(uVar1),
ZEXT416(*(uint *)((long)puVar21 + lVar17 * 4)));
*(int *)((long)puVar21 + lVar17 * 4) = auVar24._0_4_;
lVar17 = lVar17 + 1;
} while (lVar17 != 4);
lVar15 = lVar15 + 1;
puVar21 = puVar21 + 2;
} while (lVar15 != 4);
lVar18 = lVar18 + 1;
lVar19 = lVar19 + 0x10;
} while (lVar18 != 4);
uVar20 = uVar20 + 1;
lVar16 = lVar16 + 0x48;
pvVar12 = (void *)((long)pvVar12 + 0x48);
} while (uVar20 != uVar10);
}
lVar16 = 0;
pfVar11 = pfVar14;
do {
uVar6 = *(int8 *)((long)local_78 + lVar16 + 8);
*(int8 *)pfVar11 = *(int8 *)((long)local_78 + lVar16);
*(int8 *)(pfVar11 + 2) = uVar6;
lVar16 = lVar16 + 0x10;
pfVar11 = pfVar11 + param_3;
} while (lVar16 != 0x40);
uVar13 = uVar13 + 1;
local_d8 = local_d8 + lVar5;
local_d0 = (void *)((long)local_d0 + lVar5);
pfVar14 = pfVar14 + 4;
} while (uVar13 != (uint)(param_7 >> 2));
}
local_f0 = local_f0 + 1;
local_e0 = local_e0 + param_3 * 4;
} while (local_f0 != (uint)(param_6 >> 2));
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0x44d,
"void ggml_gemm_q4_0_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
| |
49,072 | common_log::set_file(char const*) | monkey531[P]llama/common/log.cpp | void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
} | O1 | cpp | common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7ff62
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x80371
callq 0x18680
testq %r14, %r14
je 0x80387
leaq 0x2ad16(%rip), %rsi # 0xab093
movq %r14, %rdi
callq 0x187c0
jmp 0x80389
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7ffea
| _ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_80371
call _fclose
loc_80371:
test r14, r14
jz short loc_80387
lea rsi, aW; "w"
mov rdi, r14
call _fopen
jmp short loc_80389
loc_80387:
xor eax, eax
loc_80389:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
| long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
| set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0017ff62
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x00180371
CALL 0x00118680
LAB_00180371:
TEST R14,R14
JZ 0x00180387
LEA RSI,[0x1ab093]
MOV RDI,R14
CALL 0x001187c0
JMP 0x00180389
LAB_00180387:
XOR EAX,EAX
LAB_00180389:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0017ffea
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
| |
49,073 | common_log::set_file(char const*) | monkey531[P]llama/common/log.cpp | void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
} | O3 | cpp | common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7eca8
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x7f0b9
callq 0x18680
testq %r14, %r14
je 0x7f0cf
leaq 0x29fbe(%rip), %rsi # 0xa9083
movq %r14, %rdi
callq 0x187c0
jmp 0x7f0d1
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7ed30
| _ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_7F0B9
call _fclose
loc_7F0B9:
test r14, r14
jz short loc_7F0CF
lea rsi, aW; "w"
mov rdi, r14
call _fopen
jmp short loc_7F0D1
loc_7F0CF:
xor eax, eax
loc_7F0D1:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
| long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
| set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0017eca8
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x0017f0b9
CALL 0x00118680
LAB_0017f0b9:
TEST R14,R14
JZ 0x0017f0cf
LEA RSI,[0x1a9083]
MOV RDI,R14
CALL 0x001187c0
JMP 0x0017f0d1
LAB_0017f0cf:
XOR EAX,EAX
LAB_0017f0d1:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0017ed30
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
| |
49,074 | my_uca_charcmp | eloqsql/strings/ctype-uca.c | static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
uint num_level= cs->levels_for_order;
int ret;
uint i;
for (i= 0; i != num_level; i++)
{
ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i);
if (ret) {
return ret;
}
}
return 0;
} | O0 | c | my_uca_charcmp:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x5d003
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x5d020
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x5cff6
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5d00a
jmp 0x5cff8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5cfc9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_charcmp:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+0B2h]
mov [rbp+var_24], eax
mov [rbp+var_2C], 0
loc_5CFC9:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jz short loc_5D003
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call my_uca_charcmp_onelevel
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_5CFF6
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
jmp short loc_5D00A
loc_5CFF6:
jmp short $+2
loc_5CFF8:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_5CFC9
loc_5D003:
mov [rbp+var_4], 0
loc_5D00A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_uca_charcmp(long long a1, long long a2, long long a3)
{
unsigned int i; // [rsp+4h] [rbp-2Ch]
unsigned int v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+Ch] [rbp-24h]
v6 = *(unsigned __int8 *)(a1 + 178);
for ( i = 0; i != v6; ++i )
{
v5 = my_uca_charcmp_onelevel(a1, a2, a3, i);
if ( v5 )
return v5;
}
return 0;
}
| my_uca_charcmp:
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 RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0xb2]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_0015cfc9:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x0015d003
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x0015d020
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x0015cff6
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d00a
LAB_0015cff6:
JMP 0x0015cff8
LAB_0015cff8:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015cfc9
LAB_0015d003:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015d00a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int iVar2;
uint local_34;
bVar1 = *(byte *)(param_1 + 0xb2);
local_34 = 0;
while( true ) {
if (local_34 == bVar1) {
return 0;
}
iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34);
if (iVar2 != 0) break;
local_34 = local_34 + 1;
}
return iVar2;
}
| |
49,075 | my_8bit_charset_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
} | O0 | c | my_8bit_charset_flags_from_data:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4b610
cmpb $0x0, %al
je 0x4b5eb
movl -0xc(%rbp), %eax
orl $0x1000, %eax # imm = 0x1000
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4b670
cmpb $0x0, %al
jne 0x4b603
movl -0xc(%rbp), %eax
orl $0x2000, %eax # imm = 0x2000
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_8bit_charset_flags_from_data:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rdi, [rbp+var_8]
call my_charset_is_8bit_pure_ascii
cmp al, 0
jz short loc_4B5EB
mov eax, [rbp+var_C]
or eax, 1000h
mov [rbp+var_C], eax
loc_4B5EB:
mov rdi, [rbp+var_8]
call my_charset_is_ascii_compatible
cmp al, 0
jnz short loc_4B603
mov eax, [rbp+var_C]
or eax, 2000h
mov [rbp+var_C], eax
loc_4B603:
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long my_8bit_charset_flags_from_data(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch]
v2 = 0;
if ( (unsigned __int8)my_charset_is_8bit_pure_ascii(a1) )
v2 = 4096;
if ( !(unsigned __int8)my_charset_is_ascii_compatible(a1) )
v2 |= 0x2000u;
return v2;
}
| my_8bit_charset_flags_from_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0014b610
CMP AL,0x0
JZ 0x0014b5eb
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x1000
MOV dword ptr [RBP + -0xc],EAX
LAB_0014b5eb:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0014b670
CMP AL,0x0
JNZ 0x0014b603
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x2000
MOV dword ptr [RBP + -0xc],EAX
LAB_0014b603:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(int8 param_1)
{
char cVar1;
int4 local_14;
local_14 = 0;
cVar1 = my_charset_is_8bit_pure_ascii(param_1);
if (cVar1 != '\0') {
local_14 = 0x1000;
}
cVar1 = my_charset_is_ascii_compatible(param_1);
if (cVar1 == '\0') {
local_14 = local_14 | 0x2000;
}
return local_14;
}
| |
49,076 | add_compiled_extra_collation | eloqsql/mysys/charset.c | void add_compiled_extra_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
cs->cs_name= org->cs_name;
}
} | O0 | c | add_compiled_extra_collation:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3345e
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x35a9af(%rip), %rax # 0x38de20
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x200, %ecx # imm = 0x200
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rsi
leaq 0x35e990(%rip), %rdi # 0x391e20
callq 0x361a0
cmpb $0x0, %al
je 0x334d1
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x35e970(%rip), %rdi # 0x391e20
callq 0x35db0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| add_compiled_extra_collation:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_3345E:
mov rdx, [rbp+var_8]
mov rax, [rbp+var_8]
mov eax, [rax]
mov ecx, eax
lea rax, all_charsets
mov [rax+rcx*8], rdx
mov rax, [rbp+var_8]
mov ecx, [rax+0Ch]
or ecx, 200h
mov [rax+0Ch], ecx
mov rsi, [rbp+var_8]
lea rdi, charset_name_hash
call my_hash_insert
cmp al, 0
jz short loc_334D1
mov rax, [rbp+var_8]
mov rsi, [rax+10h]
mov rax, [rbp+var_8]
mov rdx, [rax+18h]
lea rdi, charset_name_hash
call my_hash_search
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
mov rdx, [rcx+10h]
mov [rax+10h], rdx
mov rcx, [rcx+18h]
mov [rax+18h], rcx
loc_334D1:
add rsp, 10h
pop rbp
retn
| long long add_compiled_extra_collation(unsigned int *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-10h]
all_charsets[*a1] = a1;
a1[3] |= 0x200u;
result = my_hash_insert(&charset_name_hash, a1);
if ( (_BYTE)result )
{
v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3));
result = (long long)a1;
*((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16);
*((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24);
}
return result;
}
| add_compiled_extra_collation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013345e
LAB_0013345e:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x48de20]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x200
MOV dword ptr [RAX + 0xc],ECX
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x491e20]
CALL 0x001361a0
CMP AL,0x0
JZ 0x001334d1
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x18]
LEA RDI,[0x491e20]
CALL 0x00135db0
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
LAB_001334d1:
ADD RSP,0x10
POP RBP
RET
|
void add_compiled_extra_collation(uint *param_1)
{
char cVar1;
long lVar2;
(&all_charsets)[*param_1] = param_1;
param_1[3] = param_1[3] | 0x200;
cVar1 = my_hash_insert(charset_name_hash,param_1);
if (cVar1 != '\0') {
lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4),
*(int8 *)(param_1 + 6));
*(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10);
*(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18);
}
return;
}
| |
49,077 | js_async_function_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_function_call(JSContext *ctx, JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv, int flags)
{
JSValue promise;
JSAsyncFunctionData *s;
s = js_mallocz(ctx, sizeof(*s));
if (!s)
return JS_EXCEPTION;
s->header.ref_count = 1;
add_gc_object(ctx->rt, &s->header, JS_GC_OBJ_TYPE_ASYNC_FUNCTION);
s->is_active = FALSE;
s->resolving_funcs[0] = JS_UNDEFINED;
s->resolving_funcs[1] = JS_UNDEFINED;
promise = JS_NewPromiseCapability(ctx, s->resolving_funcs);
if (JS_IsException(promise))
goto fail;
if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) {
fail:
JS_FreeValue(ctx, promise);
js_async_function_free(ctx->rt, s);
return JS_EXCEPTION;
}
s->is_active = TRUE;
js_async_function_resume(ctx, s);
js_async_function_free(ctx->rt, s);
return promise;
} | O0 | c | js_async_function_call:
subq $0x98, %rsp
movl 0xa8(%rsp), %eax
movq 0xa0(%rsp), %rax
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %r9d, 0x5c(%rsp)
movq 0x60(%rsp), %rdi
movl $0xa8, %esi
callq 0x21d30
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x53e5f
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x53ff4
movq 0x40(%rsp), %rax
movl $0x1, (%rax)
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x40(%rsp), %rsi
movl $0x4, %edx
callq 0x240d0
movq 0x40(%rsp), %rax
movl $0x0, 0x38(%rax)
movq 0x40(%rsp), %rax
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x40(%rsp), %rax
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x18, %rsi
callq 0x4a490
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x53f25
jmp 0x53f6c
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x40, %rsi
movl 0x5c(%rsp), %r10d
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x70(%rsp), %r9
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x71fb0
cmpl $0x0, %eax
je 0x53fac
jmp 0x53f6c
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x23c90
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x91bf0
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x53ff4
movq 0x40(%rsp), %rax
movl $0x1, 0x38(%rax)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x92620
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x91bf0
movq 0x48(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopl (%rax)
| js_async_function_call:
sub rsp, 98h
mov eax, [rsp+98h+arg_8]
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_30], rcx
mov [rsp+98h+var_28], r8
mov [rsp+98h+var_38], rdi
mov [rsp+98h+var_3C], r9d
mov rdi, [rsp+98h+var_38]
mov esi, 0A8h
call js_mallocz
mov [rsp+98h+var_58], rax
cmp [rsp+98h+var_58], 0
jnz short loc_53E5F
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_53FF4
loc_53E5F:
mov rax, [rsp+98h+var_58]
mov dword ptr [rax], 1
mov rax, [rsp+98h+var_38]
mov rdi, [rax+18h]
mov rsi, [rsp+98h+var_58]
mov edx, 4
call add_gc_object
mov rax, [rsp+98h+var_58]
mov dword ptr [rax+38h], 0
mov rax, [rsp+98h+var_58]
mov dword ptr [rsp+98h+var_68], 0
mov [rsp+98h+var_60], 3
mov rcx, [rsp+98h+var_68]
mov [rax+18h], rcx
mov rcx, [rsp+98h+var_60]
mov [rax+20h], rcx
mov rax, [rsp+98h+var_58]
mov dword ptr [rsp+98h+var_78], 0
mov [rsp+98h+var_70], 3
mov rcx, [rsp+98h+var_78]
mov [rax+28h], rcx
mov rcx, [rsp+98h+var_70]
mov [rax+30h], rcx
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_58]
add rsi, 18h
call JS_NewPromiseCapability
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_50], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_48], rax
mov rdi, [rsp+98h+var_50]
mov rsi, [rsp+98h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_53F25
jmp short loc_53F6C
loc_53F25:
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_58]
add rsi, 40h ; '@'
mov r10d, [rsp+98h+var_3C]
mov rax, [rsp+98h+arg_0]
mov rdx, [rsp+98h+var_20]
mov rcx, [rsp+98h+var_18]
mov r8, [rsp+98h+var_30]
mov r9, [rsp+98h+var_28]
mov [rsp+98h+var_98], r10d
mov [rsp+98h+var_90], rax
call async_func_init
cmp eax, 0
jz short loc_53FAC
jmp short $+2
loc_53F6C:
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_50]
mov rdx, [rsp+98h+var_48]
call JS_FreeValue
mov rax, [rsp+98h+var_38]
mov rdi, [rax+18h]
mov rsi, [rsp+98h+var_58]
call js_async_function_free
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp short loc_53FF4
loc_53FAC:
mov rax, [rsp+98h+var_58]
mov dword ptr [rax+38h], 1
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_58]
call js_async_function_resume
mov rax, [rsp+98h+var_38]
mov rdi, [rax+18h]
mov rsi, [rsp+98h+var_58]
call js_async_function_free
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_8], rax
loc_53FF4:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long js_async_function_call(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7)
{
long long v7; // rdx
long long v9; // [rsp+10h] [rbp-88h]
long long v10; // [rsp+20h] [rbp-78h]
long long v11; // [rsp+30h] [rbp-68h]
long long v12; // [rsp+40h] [rbp-58h]
long long v13; // [rsp+50h] [rbp-48h]
long long v18; // [rsp+88h] [rbp-10h]
v12 = js_mallocz(a1, 0xA8uLL);
if ( v12 )
{
*(_DWORD *)v12 = 1;
add_gc_object(*(_QWORD *)(a1 + 24), v12, 4);
*(_DWORD *)(v12 + 56) = 0;
LODWORD(v11) = 0;
*(_QWORD *)(v12 + 24) = v11;
*(_QWORD *)(v12 + 32) = 3LL;
LODWORD(v10) = 0;
*(_QWORD *)(v12 + 40) = v10;
*(_QWORD *)(v12 + 48) = 3LL;
v9 = JS_NewPromiseCapability(a1, v12 + 24);
v13 = v7;
if ( JS_IsException_1(v9, v7) || (unsigned int)async_func_init(a1, (int)v12 + 64, a2, a3, a4, a5, a6, a7) )
{
JS_FreeValue(a1, v9, v13);
js_async_function_free(*(_QWORD *)(a1 + 24), v12);
LODWORD(v18) = 0;
}
else
{
*(_DWORD *)(v12 + 56) = 1;
js_async_function_resume(a1, v12);
js_async_function_free(*(_QWORD *)(a1 + 24), v12);
return v9;
}
}
else
{
LODWORD(v18) = 0;
}
return v18;
}
| js_async_function_call:
SUB RSP,0x98
MOV EAX,dword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x70],R8
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],R9D
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0xa8
CALL 0x00121d30
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x00153e5f
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00153ff4
LAB_00153e5f:
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
MOV EDX,0x4
CALL 0x001240d0
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x40]
ADD RSI,0x18
CALL 0x0014a490
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00153f25
JMP 0x00153f6c
LAB_00153f25:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x40]
ADD RSI,0x40
MOV R10D,dword ptr [RSP + 0x5c]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x80]
MOV R8,qword ptr [RSP + 0x68]
MOV R9,qword ptr [RSP + 0x70]
MOV dword ptr [RSP],R10D
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00171fb0
CMP EAX,0x0
JZ 0x00153fac
JMP 0x00153f6c
LAB_00153f6c:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00191bf0
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00153ff4
LAB_00153fac:
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX + 0x38],0x1
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00192620
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00191bf0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x90],RAX
LAB_00153ff4:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_async_function_call
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5,
int4 param_6,int8 param_7)
{
int iVar1;
int4 *puVar2;
int1 auVar3 [16];
uint uStack_74;
uint uStack_64;
int4 local_10;
int4 uStack_c;
int8 local_8;
puVar2 = (int4 *)js_mallocz(param_1,0xa8);
if (puVar2 == (int4 *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
*puVar2 = 1;
add_gc_object(*(int8 *)(param_1 + 0x18),puVar2,4);
puVar2[0xe] = 0;
*(ulong *)(puVar2 + 6) = (ulong)uStack_64 << 0x20;
*(int8 *)(puVar2 + 8) = 3;
*(ulong *)(puVar2 + 10) = (ulong)uStack_74 << 0x20;
*(int8 *)(puVar2 + 0xc) = 3;
auVar3 = JS_NewPromiseCapability(param_1,puVar2 + 6);
local_8 = auVar3._8_8_;
iVar1 = JS_IsException(auVar3._0_8_,local_8);
if ((iVar1 == 0) &&
(iVar1 = async_func_init(param_1,puVar2 + 0x10,param_2,param_3,param_4,param_5,param_6,
param_7), iVar1 == 0)) {
puVar2[0xe] = 1;
js_async_function_resume(param_1,puVar2);
js_async_function_free(*(int8 *)(param_1 + 0x18),puVar2);
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else {
JS_FreeValue(param_1,auVar3._0_8_,local_8);
js_async_function_free(*(int8 *)(param_1 + 0x18),puVar2);
local_10 = 0;
local_8 = 6;
}
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
49,078 | js_async_function_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_function_call(JSContext *ctx, JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv, int flags)
{
JSValue promise;
JSAsyncFunctionData *s;
s = js_mallocz(ctx, sizeof(*s));
if (!s)
return JS_EXCEPTION;
s->header.ref_count = 1;
add_gc_object(ctx->rt, &s->header, JS_GC_OBJ_TYPE_ASYNC_FUNCTION);
s->is_active = FALSE;
s->resolving_funcs[0] = JS_UNDEFINED;
s->resolving_funcs[1] = JS_UNDEFINED;
promise = JS_NewPromiseCapability(ctx, s->resolving_funcs);
if (JS_IsException(promise))
goto fail;
if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) {
fail:
JS_FreeValue(ctx, promise);
js_async_function_free(ctx->rt, s);
return JS_EXCEPTION;
}
s->is_active = TRUE;
js_async_function_resume(ctx, s);
js_async_function_free(ctx->rt, s);
return promise;
} | O1 | c | js_async_function_call:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r12
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %r14
movl $0xa8, %esi
callq 0xee06
pushq $0x6
popq %rbp
testq %rax, %rax
je 0x1078b
movq %rax, %r15
movq %r12, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl $0x1, (%rax)
movq 0x18(%r14), %rax
movb $0x4, 0x4(%r15)
leaq 0x8(%r15), %rcx
leaq 0x98(%rax), %rdx
movq 0x98(%rax), %rsi
movq %rcx, 0x8(%rsi)
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x98(%rax)
andl $0x0, 0x38(%r15)
andl $0x0, 0x18(%r15)
leaq 0x18(%r15), %rsi
pushq $0x3
popq %rcx
movq %rcx, 0x20(%r15)
andl $0x0, 0x28(%r15)
movq %rcx, 0x30(%r15)
movq %r14, %rdi
xorl %edx, %edx
callq 0x362b6
movq %rax, %r12
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x107a4
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1d8c6
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x52b8b
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbp, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rsi
addq $0x40, %rsi
movq %r14, %rdi
movq %r13, %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movq 0x8(%rsp), %r9
pushq 0x60(%rsp)
pushq 0x18(%rsp)
callq 0x10be0
popq %rcx
popq %rdx
testl %eax, %eax
jne 0x10770
movl $0x1, 0x38(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x53037
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x52b8b
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r12, %rcx
andq %rax, %rcx
movl %r12d, %eax
movq %rbx, %rbp
jmp 0x1078f
| js_async_function_call:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r12, r8
mov [rsp+58h+var_38], rcx
mov [rsp+58h+var_40], rdx
mov r13, rsi
mov r14, rdi
mov esi, 0A8h
call js_mallocz
push 6
pop rbp
test rax, rax
jz loc_1078B
mov r15, rax
mov [rsp+58h+var_50], r12
mov [rsp+58h+var_48], rbx
mov dword ptr [rax], 1
mov rax, [r14+18h]
mov byte ptr [r15+4], 4
lea rcx, [r15+8]
lea rdx, [rax+98h]
mov rsi, [rax+98h]
mov [rsi+8], rcx
mov [r15+8], rsi
mov [r15+10h], rdx
mov [rax+98h], rcx
and dword ptr [r15+38h], 0
and dword ptr [r15+18h], 0
lea rsi, [r15+18h]
push 3
pop rcx
mov [r15+20h], rcx
and dword ptr [r15+28h], 0
mov [r15+30h], rcx
mov rdi, r14
xor edx, edx
call js_new_promise_capability
mov r12, rax
mov rbx, rdx
cmp ebx, 6
jnz short loc_107A4
loc_10770:
mov rdi, [r14+18h]
mov rsi, r12
mov rdx, rbx
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, r15
call js_async_function_free
loc_1078B:
xor eax, eax
xor ecx, ecx
loc_1078F:
or rax, rcx
mov rdx, rbp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_107A4:
mov rsi, r15
add rsi, 40h ; '@'
mov rdi, r14
mov rdx, r13
mov rcx, [rsp+58h+var_40]
mov r8, [rsp+58h+var_38]
mov r9, [rsp+58h+var_50]
push [rsp+58h+arg_0]
push [rsp+60h+var_48]
call async_func_init
pop rcx
pop rdx
test eax, eax
jnz short loc_10770
mov dword ptr [r15+38h], 1
mov rdi, r14
mov rsi, r15
call js_async_function_resume
mov rdi, [r14+18h]
mov rsi, r15
call js_async_function_free
mov rax, 0FFFFFFFF00000000h
mov rcx, r12
and rcx, rax
mov eax, r12d
mov rbp, rbx
jmp short loc_1078F
| unsigned long long js_async_function_call(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7)
{
_DWORD *v10; // rax
_DWORD *v11; // r15
long long v12; // rax
long long v13; // rsi
long long v14; // r12
int v15; // edx
long long v16; // rax
unsigned long long v17; // rcx
long long v19; // [rsp-8h] [rbp-60h]
int v20; // [rsp+8h] [rbp-50h]
v10 = (_DWORD *)js_mallocz(a1, 0xA8uLL);
if ( v10 )
{
v11 = v10;
v20 = a5;
*v10 = 1;
v12 = *(_QWORD *)(a1 + 24);
*((_BYTE *)v11 + 4) = 4;
v13 = *(_QWORD *)(v12 + 152);
*(_QWORD *)(v13 + 8) = v11 + 2;
*((_QWORD *)v11 + 1) = v13;
*((_QWORD *)v11 + 2) = v12 + 152;
*(_QWORD *)(v12 + 152) = v11 + 2;
v11[14] = 0;
v11[6] = 0;
*((_QWORD *)v11 + 4) = 3LL;
v11[10] = 0;
*((_QWORD *)v11 + 6) = 3LL;
v14 = js_new_promise_capability(a1, v11 + 6, 0LL);
if ( v15 != 6 && !(unsigned int)async_func_init(a1, (int)v11 + 64, a2, a3, a4, v20, a6, a7) )
{
v11[14] = 1;
js_async_function_resume(a1, v11, v19);
js_async_function_free(*(_QWORD *)(a1 + 24), v11);
v17 = v14 & 0xFFFFFFFF00000000LL;
v16 = (unsigned int)v14;
return v17 | v16;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v14);
js_async_function_free(*(_QWORD *)(a1 + 24), v11);
}
v16 = 0LL;
v17 = 0LL;
return v17 | v16;
}
| js_async_function_call:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R12,R8
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV R13,RSI
MOV R14,RDI
MOV ESI,0xa8
CALL 0x0010ee06
PUSH 0x6
POP RBP
TEST RAX,RAX
JZ 0x0011078b
MOV R15,RAX
MOV qword ptr [RSP + 0x8],R12
MOV qword ptr [RSP + 0x10],RBX
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [R15 + 0x4],0x4
LEA RCX,[R15 + 0x8]
LEA RDX,[RAX + 0x98]
MOV RSI,qword ptr [RAX + 0x98]
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [R15 + 0x8],RSI
MOV qword ptr [R15 + 0x10],RDX
MOV qword ptr [RAX + 0x98],RCX
AND dword ptr [R15 + 0x38],0x0
AND dword ptr [R15 + 0x18],0x0
LEA RSI,[R15 + 0x18]
PUSH 0x3
POP RCX
MOV qword ptr [R15 + 0x20],RCX
AND dword ptr [R15 + 0x28],0x0
MOV qword ptr [R15 + 0x30],RCX
MOV RDI,R14
XOR EDX,EDX
CALL 0x001362b6
MOV R12,RAX
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x001107a4
LAB_00110770:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R12
MOV RDX,RBX
CALL 0x0011d8c6
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
CALL 0x00152b8b
LAB_0011078b:
XOR EAX,EAX
XOR ECX,ECX
LAB_0011078f:
OR RAX,RCX
MOV RDX,RBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001107a4:
MOV RSI,R15
ADD RSI,0x40
MOV RDI,R14
MOV RDX,R13
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x8]
PUSH qword ptr [RSP + 0x60]
PUSH qword ptr [RSP + 0x18]
CALL 0x00110be0
POP RCX
POP RDX
TEST EAX,EAX
JNZ 0x00110770
MOV dword ptr [R15 + 0x38],0x1
MOV RDI,R14
MOV RSI,R15
CALL 0x00153037
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
CALL 0x00152b8b
MOV RAX,-0x100000000
MOV RCX,R12
AND RCX,RAX
MOV EAX,R12D
MOV RBP,RBX
JMP 0x0011078f
|
int1 [16]
js_async_function_call
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5,
int4 param_6,int8 param_7)
{
long lVar1;
long lVar2;
int iVar3;
int4 *puVar4;
ulong uVar5;
ulong uVar6;
int8 uVar7;
int1 auVar8 [16];
puVar4 = (int4 *)js_mallocz(param_1,0xa8);
if (puVar4 != (int4 *)0x0) {
*puVar4 = 1;
lVar1 = *(long *)(param_1 + 0x18);
*(int1 *)(puVar4 + 1) = 4;
lVar2 = *(long *)(lVar1 + 0x98);
*(int4 **)(lVar2 + 8) = puVar4 + 2;
*(long *)(puVar4 + 2) = lVar2;
*(long *)(puVar4 + 4) = lVar1 + 0x98;
*(int4 **)(lVar1 + 0x98) = puVar4 + 2;
puVar4[0xe] = 0;
puVar4[6] = 0;
*(int8 *)(puVar4 + 8) = 3;
puVar4[10] = 0;
*(int8 *)(puVar4 + 0xc) = 3;
auVar8 = js_new_promise_capability(param_1,puVar4 + 6,0);
uVar7 = auVar8._8_8_;
uVar5 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
iVar3 = async_func_init(param_1,puVar4 + 0x10,param_2,param_3,param_4,param_5);
if (iVar3 == 0) {
puVar4[0xe] = 1;
js_async_function_resume(param_1,puVar4,param_7,param_6);
js_async_function_free(*(int8 *)(param_1 + 0x18),puVar4);
uVar6 = uVar5 & 0xffffffff00000000;
uVar5 = uVar5 & 0xffffffff;
goto LAB_0011078f;
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar7);
js_async_function_free(*(int8 *)(param_1 + 0x18),puVar4);
}
uVar5 = 0;
uVar6 = 0;
uVar7 = 6;
LAB_0011078f:
auVar8._0_8_ = uVar5 | uVar6;
auVar8._8_8_ = uVar7;
return auVar8;
}
| |
49,079 | js_async_function_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_function_call(JSContext *ctx, JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv, int flags)
{
JSValue promise;
JSAsyncFunctionData *s;
s = js_mallocz(ctx, sizeof(*s));
if (!s)
return JS_EXCEPTION;
s->header.ref_count = 1;
add_gc_object(ctx->rt, &s->header, JS_GC_OBJ_TYPE_ASYNC_FUNCTION);
s->is_active = FALSE;
s->resolving_funcs[0] = JS_UNDEFINED;
s->resolving_funcs[1] = JS_UNDEFINED;
promise = JS_NewPromiseCapability(ctx, s->resolving_funcs);
if (JS_IsException(promise))
goto fail;
if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) {
fail:
JS_FreeValue(ctx, promise);
js_async_function_free(ctx->rt, s);
return JS_EXCEPTION;
}
s->is_active = TRUE;
js_async_function_resume(ctx, s);
js_async_function_free(ctx->rt, s);
return promise;
} | O2 | c | js_async_function_call:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r13
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %rbp
movq %rdi, %r14
movl $0xa8, %esi
callq 0x17241
pushq $0x6
popq %r12
testq %rax, %rax
je 0x2fd92
movq %rax, %r15
movq %r13, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl $0x1, (%rax)
movq 0x18(%r14), %rax
movb $0x4, 0x4(%r15)
leaq 0x8(%r15), %rcx
leaq 0x98(%rax), %rdx
movq 0x98(%rax), %rsi
movq %rcx, 0x8(%rsi)
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x98(%rax)
andl $0x0, 0x38(%r15)
andl $0x0, 0x18(%r15)
leaq 0x18(%r15), %rsi
pushq $0x3
popq %rax
movq %rax, 0x20(%r15)
andl $0x0, 0x28(%r15)
movq %rax, 0x30(%r15)
movq %r14, %rdi
callq 0x2956d
movq %rax, %r13
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x2fd78
movq %r15, %rsi
addq $0x40, %rsi
movq %r14, %rdi
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movq 0x8(%rsp), %r9
pushq 0x60(%rsp)
pushq 0x18(%rsp)
callq 0x3ac67
popq %rcx
popq %rdx
testl %eax, %eax
je 0x2fdab
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1801e
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x46f5f
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %r12, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0x38(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4746e
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x46f5f
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r13, %rcx
andq %rax, %rcx
movl %r13d, %eax
movq %rbx, %r12
jmp 0x2fd96
| js_async_function_call:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r13, r8
mov [rsp+58h+var_38], rcx
mov [rsp+58h+var_40], rdx
mov rbp, rsi
mov r14, rdi
mov esi, 0A8h
call js_mallocz
push 6
pop r12
test rax, rax
jz loc_2FD92
mov r15, rax
mov [rsp+58h+var_50], r13
mov [rsp+58h+var_48], rbx
mov dword ptr [rax], 1
mov rax, [r14+18h]
mov byte ptr [r15+4], 4
lea rcx, [r15+8]
lea rdx, [rax+98h]
mov rsi, [rax+98h]
mov [rsi+8], rcx
mov [r15+8], rsi
mov [r15+10h], rdx
mov [rax+98h], rcx
and dword ptr [r15+38h], 0
and dword ptr [r15+18h], 0
lea rsi, [r15+18h]
push 3
pop rax
mov [r15+20h], rax
and dword ptr [r15+28h], 0
mov [r15+30h], rax
mov rdi, r14
call JS_NewPromiseCapability
mov r13, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_2FD78
mov rsi, r15
add rsi, 40h ; '@'
mov rdi, r14
mov rdx, rbp
mov rcx, [rsp+58h+var_40]
mov r8, [rsp+58h+var_38]
mov r9, [rsp+58h+var_50]
push [rsp+58h+arg_0]
push [rsp+60h+var_48]
call async_func_init
pop rcx
pop rdx
test eax, eax
jz short loc_2FDAB
loc_2FD78:
mov rdi, r14
mov rsi, r13
mov rdx, rbx
call JS_FreeValue
mov rdi, [r14+18h]
mov rsi, r15
call js_async_function_free
loc_2FD92:
xor eax, eax
xor ecx, ecx
loc_2FD96:
or rax, rcx
mov rdx, r12
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2FDAB:
mov dword ptr [r15+38h], 1
mov rdi, r14
mov rsi, r15
call js_async_function_resume
mov rdi, [r14+18h]
mov rsi, r15
call js_async_function_free
mov rax, 0FFFFFFFF00000000h
mov rcx, r13
and rcx, rax
mov eax, r13d
mov r12, rbx
jmp short loc_2FD96
| unsigned long long js_async_function_call(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7)
{
_DWORD *v10; // rax
_DWORD *v11; // r15
long long v12; // rax
long long v13; // rsi
long long v14; // r13
long long v15; // rdx
long long v16; // rbx
long long v17; // rax
unsigned long long v18; // rcx
long long v20; // [rsp-8h] [rbp-60h]
int v21; // [rsp+8h] [rbp-50h]
int v22; // [rsp+10h] [rbp-48h]
v10 = (_DWORD *)js_mallocz(a1, 0xA8uLL);
if ( v10 )
{
v11 = v10;
v21 = a5;
v22 = a6;
*v10 = 1;
v12 = *(_QWORD *)(a1 + 24);
*((_BYTE *)v11 + 4) = 4;
v13 = *(_QWORD *)(v12 + 152);
*(_QWORD *)(v13 + 8) = v11 + 2;
*((_QWORD *)v11 + 1) = v13;
*((_QWORD *)v11 + 2) = v12 + 152;
*(_QWORD *)(v12 + 152) = v11 + 2;
v11[14] = 0;
v11[6] = 0;
*((_QWORD *)v11 + 4) = 3LL;
v11[10] = 0;
*((_QWORD *)v11 + 6) = 3LL;
v14 = JS_NewPromiseCapability(a1, (long long)(v11 + 6));
v16 = v15;
if ( (_DWORD)v15 != 6 && !(unsigned int)async_func_init(a1, (int)v11 + 64, a2, a3, a4, v21, v22, a7) )
{
v11[14] = 1;
js_async_function_resume(a1, v11, v20);
js_async_function_free(*(_QWORD *)(a1 + 24), v11);
v18 = v14 & 0xFFFFFFFF00000000LL;
v17 = (unsigned int)v14;
return v18 | v17;
}
JS_FreeValue(a1, v14, v16);
js_async_function_free(*(_QWORD *)(a1 + 24), v11);
}
v17 = 0LL;
v18 = 0LL;
return v18 | v17;
}
| js_async_function_call:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R13,R8
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RBP,RSI
MOV R14,RDI
MOV ESI,0xa8
CALL 0x00117241
PUSH 0x6
POP R12
TEST RAX,RAX
JZ 0x0012fd92
MOV R15,RAX
MOV qword ptr [RSP + 0x8],R13
MOV qword ptr [RSP + 0x10],RBX
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [R15 + 0x4],0x4
LEA RCX,[R15 + 0x8]
LEA RDX,[RAX + 0x98]
MOV RSI,qword ptr [RAX + 0x98]
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [R15 + 0x8],RSI
MOV qword ptr [R15 + 0x10],RDX
MOV qword ptr [RAX + 0x98],RCX
AND dword ptr [R15 + 0x38],0x0
AND dword ptr [R15 + 0x18],0x0
LEA RSI,[R15 + 0x18]
PUSH 0x3
POP RAX
MOV qword ptr [R15 + 0x20],RAX
AND dword ptr [R15 + 0x28],0x0
MOV qword ptr [R15 + 0x30],RAX
MOV RDI,R14
CALL 0x0012956d
MOV R13,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0012fd78
MOV RSI,R15
ADD RSI,0x40
MOV RDI,R14
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x8]
PUSH qword ptr [RSP + 0x60]
PUSH qword ptr [RSP + 0x18]
CALL 0x0013ac67
POP RCX
POP RDX
TEST EAX,EAX
JZ 0x0012fdab
LAB_0012fd78:
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBX
CALL 0x0011801e
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
CALL 0x00146f5f
LAB_0012fd92:
XOR EAX,EAX
XOR ECX,ECX
LAB_0012fd96:
OR RAX,RCX
MOV RDX,R12
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012fdab:
MOV dword ptr [R15 + 0x38],0x1
MOV RDI,R14
MOV RSI,R15
CALL 0x0014746e
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
CALL 0x00146f5f
MOV RAX,-0x100000000
MOV RCX,R13
AND RCX,RAX
MOV EAX,R13D
MOV R12,RBX
JMP 0x0012fd96
|
int1 [16]
js_async_function_call
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5,
int4 param_6,int8 param_7)
{
long lVar1;
long lVar2;
int iVar3;
int4 *puVar4;
ulong uVar5;
ulong uVar6;
int8 uVar7;
int1 auVar8 [16];
puVar4 = (int4 *)js_mallocz(param_1,0xa8);
if (puVar4 != (int4 *)0x0) {
*puVar4 = 1;
lVar1 = *(long *)(param_1 + 0x18);
*(int1 *)(puVar4 + 1) = 4;
lVar2 = *(long *)(lVar1 + 0x98);
*(int4 **)(lVar2 + 8) = puVar4 + 2;
*(long *)(puVar4 + 2) = lVar2;
*(long *)(puVar4 + 4) = lVar1 + 0x98;
*(int4 **)(lVar1 + 0x98) = puVar4 + 2;
puVar4[0xe] = 0;
puVar4[6] = 0;
*(int8 *)(puVar4 + 8) = 3;
puVar4[10] = 0;
*(int8 *)(puVar4 + 0xc) = 3;
auVar8 = JS_NewPromiseCapability(param_1,puVar4 + 6);
uVar7 = auVar8._8_8_;
uVar5 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
iVar3 = async_func_init(param_1,puVar4 + 0x10,param_2,param_3,param_4,param_5);
if (iVar3 == 0) {
puVar4[0xe] = 1;
js_async_function_resume(param_1,puVar4,param_7,param_6);
js_async_function_free(*(int8 *)(param_1 + 0x18),puVar4);
uVar6 = uVar5 & 0xffffffff00000000;
uVar5 = uVar5 & 0xffffffff;
goto LAB_0012fd96;
}
}
JS_FreeValue(param_1,uVar5,uVar7);
js_async_function_free(*(int8 *)(param_1 + 0x18),puVar4);
}
uVar5 = 0;
uVar6 = 0;
uVar7 = 6;
LAB_0012fd96:
auVar8._0_8_ = uVar5 | uVar6;
auVar8._8_8_ = uVar7;
return auVar8;
}
| |
49,080 | LefDefParser::defwBlockagesLayerSpacing(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwBlockagesLayerSpacing(int minSpacing)
{
defwFunc = DEFW_BLOCKAGE_LAYER; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if ((defwState != DEFW_BLOCKAGE_LAYER) && (defwState != DEFW_BLOCKAGE_RECT))
return DEFW_BAD_ORDER;
if (defwBlockageHasSD) // Either spacing or designrulewidth has defined
return DEFW_BAD_DATA;
fprintf(defwFile, " + SPACING %d\n", minSpacing);
defwLines++;
defwBlockageHasSD = 1;
defwState = DEFW_BLOCKAGE_LAYER;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwBlockagesLayerSpacing(int):
pushq %rax
movl %edi, (%rsp)
leaq 0xc84d(%rip), %rax # 0x2b168
movl $0x2c, (%rax)
leaq 0xc830(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1e93b
movl $0x1, 0x4(%rsp)
jmp 0x1e9bf
leaq 0xc822(%rip), %rax # 0x2b164
cmpl $0x2c, (%rax)
je 0x1e95d
leaq 0xc816(%rip), %rax # 0x2b164
cmpl $0x2e, (%rax)
je 0x1e95d
movl $0x2, 0x4(%rsp)
jmp 0x1e9bf
cmpl $0x0, 0xc834(%rip) # 0x2b198
je 0x1e970
movl $0x3, 0x4(%rsp)
jmp 0x1e9bf
leaq 0xc7e1(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl (%rsp), %edx
leaq 0x66ef(%rip), %rsi # 0x25073
movb $0x0, %al
callq 0x10f0
leaq 0xc7ce(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xc7c2(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl $0x1, 0xc7ee(%rip) # 0x2b198
leaq 0xc7b3(%rip), %rax # 0x2b164
movl $0x2c, (%rax)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser25defwBlockagesLayerSpacingEi:
push rax
mov [rsp+8+var_8], edi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 2Ch ; ','
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1E93B
mov [rsp+8+var_4], 1
jmp loc_1E9BF
loc_1E93B:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Ch ; ','
jz short loc_1E95D
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Eh ; '.'
jz short loc_1E95D
mov [rsp+8+var_4], 2
jmp short loc_1E9BF
loc_1E95D:
cmp cs:_ZN12LefDefParserL17defwBlockageHasSDE, 0; LefDefParser::defwBlockageHasSD
jz short loc_1E970
mov [rsp+8+var_4], 3
jmp short loc_1E9BF
loc_1E970:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+8+var_8]
lea rsi, aSpacingD_1; " + SPACING %d\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov cs:_ZN12LefDefParserL17defwBlockageHasSDE, 1; LefDefParser::defwBlockageHasSD
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 2Ch ; ','
mov [rsp+8+var_4], 0
loc_1E9BF:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::defwBlockagesLayerSpacing(LefDefParser *this)
{
LefDefParser::defwFunc = 44;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 44 || LefDefParser::defwState == 46 )
{
if ( LefDefParser::defwBlockageHasSD )
{
return 3;
}
else
{
fprintf(LefDefParser::defwFile, " + SPACING %d\n", (_DWORD)this);
++LefDefParser::defwLines;
LefDefParser::defwBlockageHasSD = 1;
LefDefParser::defwState = 44;
return 0;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwBlockagesLayerSpacing:
PUSH RAX
MOV dword ptr [RSP],EDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x2c
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011e93b
MOV dword ptr [RSP + 0x4],0x1
JMP 0x0011e9bf
LAB_0011e93b:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2c
JZ 0x0011e95d
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2e
JZ 0x0011e95d
MOV dword ptr [RSP + 0x4],0x2
JMP 0x0011e9bf
LAB_0011e95d:
CMP dword ptr [0x0012b198],0x0
JZ 0x0011e970
MOV dword ptr [RSP + 0x4],0x3
JMP 0x0011e9bf
LAB_0011e970:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP]
LEA RSI,[0x125073]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV dword ptr [0x0012b198],0x1
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x2c
MOV dword ptr [RSP + 0x4],0x0
LAB_0011e9bf:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::defwBlockagesLayerSpacing(int) */
int4 LefDefParser::defwBlockagesLayerSpacing(int param_1)
{
int4 local_4;
defwFunc = 0x2c;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if ((defwState == 0x2c) || (defwState == 0x2e)) {
if (defwBlockageHasSD == 0) {
fprintf(defwFile," + SPACING %d\n",param_1);
defwLines = defwLines + 1;
defwBlockageHasSD = 1;
defwState = 0x2c;
local_4 = 0;
}
else {
local_4 = 3;
}
}
else {
local_4 = 2;
}
return local_4;
}
| |
49,081 | LefDefParser::defwBlockagesLayerSpacing(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwBlockagesLayerSpacing(int minSpacing)
{
defwFunc = DEFW_BLOCKAGE_LAYER; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if ((defwState != DEFW_BLOCKAGE_LAYER) && (defwState != DEFW_BLOCKAGE_RECT))
return DEFW_BAD_ORDER;
if (defwBlockageHasSD) // Either spacing or designrulewidth has defined
return DEFW_BAD_DATA;
fprintf(defwFile, " + SPACING %d\n", minSpacing);
defwLines++;
defwBlockageHasSD = 1;
defwState = DEFW_BLOCKAGE_LAYER;
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwBlockagesLayerSpacing(int):
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0xd151(%rip), %rax # 0x1e178
movl $0x2c, (%rax)
leaq 0xd134(%rip), %rax # 0x1e168
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1108a
leaq 0xd131(%rip), %r14 # 0x1e174
movl (%r14), %eax
andl $-0x3, %eax
movl $0x2, %ebx
cmpl $0x2c, %eax
jne 0x1108f
movl $0x3, %ebx
cmpb $0x0, 0xd149(%rip) # 0x1e1a8
jne 0x1108f
leaq 0x514a(%rip), %rsi # 0x161b2
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10e0
leaq 0xd0f8(%rip), %rax # 0x1e170
incl (%rax)
movb $0x1, 0xd127(%rip) # 0x1e1a8
movl $0x2c, (%r14)
jmp 0x1108f
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN12LefDefParser25defwBlockagesLayerSpacingEi:
push r14
push rbx
push rax
mov edx, edi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 2Ch ; ','
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
test rdi, rdi
jz short loc_1108A
lea r14, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov eax, [r14]
and eax, 0FFFFFFFDh
mov ebx, 2
cmp eax, 2Ch ; ','
jnz short loc_1108F
mov ebx, 3
cmp cs:_ZN12LefDefParserL17defwBlockageHasSDE, 0; LefDefParser::defwBlockageHasSD
jnz short loc_1108F
lea rsi, aSpacingD_1; " + SPACING %d\n"
xor ebx, ebx
xor eax, eax
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
mov cs:_ZN12LefDefParserL17defwBlockageHasSDE, 1; LefDefParser::defwBlockageHasSD
mov dword ptr [r14], 2Ch ; ','
jmp short loc_1108F
loc_1108A:
mov ebx, 1
loc_1108F:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
| long long LefDefParser::defwBlockagesLayerSpacing(LefDefParser *this)
{
unsigned int v1; // ebx
LefDefParser::defwFunc = 44;
if ( LefDefParser::defwFile )
{
v1 = 2;
if ( (LefDefParser::defwState & 0xFFFFFFFD) == 0x2C )
{
v1 = 3;
if ( !LefDefParser::defwBlockageHasSD )
{
v1 = 0;
fprintf(LefDefParser::defwFile, " + SPACING %d\n", (_DWORD)this);
++LefDefParser::defwLines;
LefDefParser::defwBlockageHasSD = 1;
LefDefParser::defwState = 44;
}
}
}
else
{
return 1;
}
return v1;
}
| defwBlockagesLayerSpacing:
PUSH R14
PUSH RBX
PUSH RAX
MOV EDX,EDI
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x2c
LEA RAX,[0x11e168]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0011108a
LEA R14,[0x11e174]
MOV EAX,dword ptr [R14]
AND EAX,0xfffffffd
MOV EBX,0x2
CMP EAX,0x2c
JNZ 0x0011108f
MOV EBX,0x3
CMP byte ptr [0x0011e1a8],0x0
JNZ 0x0011108f
LEA RSI,[0x1161b2]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x001010e0
LEA RAX,[0x11e170]
INC dword ptr [RAX]
MOV byte ptr [0x0011e1a8],0x1
MOV dword ptr [R14],0x2c
JMP 0x0011108f
LAB_0011108a:
MOV EBX,0x1
LAB_0011108f:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LefDefParser::defwBlockagesLayerSpacing(int) */
int8 LefDefParser::defwBlockagesLayerSpacing(int param_1)
{
int8 uVar1;
defwFunc = 0x2c;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if (((defwState & 0xfffffffd) == 0x2c) && (uVar1 = 3, defwBlockageHasSD == '\0')) {
uVar1 = 0;
fprintf(defwFile," + SPACING %d\n",param_1);
defwLines = defwLines + 1;
defwBlockageHasSD = '\x01';
defwState = 0x2c;
}
}
return uVar1;
}
| |
49,082 | my_strnxfrm_win1250ch | eloqsql/strings/ctype-win1250ch.c | static size_t
my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p;
int pass = 0;
size_t totlen = 0;
p = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, 0x00, len - totlen);
totlen= len;
}
return totlen;
} | O0 | c | my_strnxfrm_win1250ch:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x44(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x6bda0
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0x6bda2
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6bf89
jmp 0x6bdb2
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x6bdf9
cmpl $0x0, -0x44(%rbp)
jne 0x6bdeb
movq -0x30(%rbp), %rax
cmpl $0x0, %eax
jle 0x6bdeb
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x6bdf7
movl $0x0, -0x34(%rbp)
jmp 0x6bf4f
jmp 0x6bdf9
cmpl $0x0, -0x44(%rbp)
jne 0x6be18
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x149a51(%rip), %rax # 0x1b5860
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
jmp 0x6be2f
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x319218(%rip), %rax # 0x385040
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0xff, -0x34(%rbp)
jne 0x6bf43
movl $0x0, -0x54(%rbp)
cmpl $0x50, -0x54(%rbp)
jge 0x6bf41
movslq -0x54(%rbp), %rcx
leaq 0x1616e2(%rip), %rax # 0x1cd540
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6d(%rbp)
je 0x6beb7
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x6d(%rbp)
jge 0x6beb7
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
movq -0x68(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x6bec0
jmp 0x6beda
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x6be74
movq -0x60(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x6bf31
cmpl $0x0, -0x44(%rbp)
jne 0x6bf04
movslq -0x54(%rbp), %rcx
leaq 0x16164c(%rip), %rax # 0x1cd540
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0x6bf1d
movslq -0x54(%rbp), %rcx
leaq 0x161631(%rip), %rax # 0x1cd540
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x9(%rax), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x6bf41
jmp 0x6bf33
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x6be49
jmp 0x6bf43
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x6bf57
jmp 0x6bf89
movl -0x44(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x6bf84
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x50(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x6bda2
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6bfbf
movq -0x18(%rbp), %rax
cmpq -0x50(%rbp), %rax
jbe 0x6bfbf
movq -0x10(%rbp), %rdi
addq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x24190
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_win1250ch:
push rbp
mov rbp, rsp
sub rsp, 80h
mov eax, [rbp+arg_0]
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_30], r9
mov [rbp+var_44], 0
mov [rbp+var_50], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_6BDA0
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_6BDA0:
jmp short $+2
loc_6BDA2:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_18]
jnb loc_6BF89
jmp short $+2
loc_6BDB2:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_6BDF9
cmp [rbp+var_44], 0
jnz short loc_6BDEB
mov rax, [rbp+var_30]
cmp eax, 0
jle short loc_6BDEB
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_6BDF7
loc_6BDEB:
mov [rbp+var_34], 0
jmp loc_6BF4F
loc_6BDF7:
jmp short $+2
loc_6BDF9:
cmp [rbp+var_44], 0
jnz short loc_6BE18
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch1
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
jmp short loc_6BE2F
loc_6BE18:
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch2
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
loc_6BE2F:
mov eax, [rbp+var_6C]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0FFh
jnz loc_6BF43
mov [rbp+var_54], 0
loc_6BE49:
cmp [rbp+var_54], 50h ; 'P'
jge loc_6BF41
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
loc_6BE74:
mov rax, [rbp+var_60]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_6D], al
jz short loc_6BEB7
mov rcx, [rbp+var_68]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_6D], al
jge short loc_6BEB7
mov rax, [rbp+var_60]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_68]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
setz al
mov [rbp+var_6D], al
loc_6BEB7:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_6BEC0
jmp short loc_6BEDA
loc_6BEC0:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_68], rax
jmp short loc_6BE74
loc_6BEDA:
mov rax, [rbp+var_60]
cmp byte ptr [rax], 0
jnz short loc_6BF31
cmp [rbp+var_44], 0
jnz short loc_6BF04
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+8]
mov [rbp+var_74], eax
jmp short loc_6BF1D
loc_6BF04:
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+9]
mov [rbp+var_74], eax
loc_6BF1D:
mov eax, [rbp+var_74]
mov [rbp+var_34], eax
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_6BF41
loc_6BF31:
jmp short $+2
loc_6BF33:
mov eax, [rbp+var_54]
add eax, 1
mov [rbp+var_54], eax
jmp loc_6BE49
loc_6BF41:
jmp short $+2
loc_6BF43:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_6BF4F:
cmp [rbp+var_34], 0
jnz short loc_6BF57
jmp short loc_6BF89
loc_6BF57:
mov ecx, [rbp+var_44]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
cmp eax, 0
jz short loc_6BF84
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_50]
mov rsi, rcx
add rsi, 1
mov [rbp+var_50], rsi
mov [rax+rcx], dl
loc_6BF84:
jmp loc_6BDA2
loc_6BF89:
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_6BFBF
mov rax, [rbp+var_18]
cmp rax, [rbp+var_50]
jbe short loc_6BFBF
mov rdi, [rbp+var_10]
add rdi, [rbp+var_50]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_50]
xor esi, esi
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
loc_6BFBF:
mov rax, [rbp+var_50]
add rsp, 80h
pop rbp
retn
| unsigned long long my_strnxfrm_win1250ch(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
long long v7; // rcx
int v9; // [rsp+Ch] [rbp-74h]
bool v10; // [rsp+13h] [rbp-6Dh]
int v11; // [rsp+14h] [rbp-6Ch]
unsigned __int8 *j; // [rsp+18h] [rbp-68h]
_BYTE *v13; // [rsp+20h] [rbp-60h]
int i; // [rsp+2Ch] [rbp-54h]
unsigned long long v15; // [rsp+30h] [rbp-50h]
int v16; // [rsp+3Ch] [rbp-44h]
unsigned __int8 *v17; // [rsp+40h] [rbp-40h]
int v18; // [rsp+4Ch] [rbp-34h]
v16 = 0;
v15 = 0LL;
v17 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
while ( v15 < a3 )
{
if ( v17 - a5 >= a6 )
{
if ( v16 || a6 <= 0 )
{
v18 = 0;
goto LABEL_28;
}
v17 = a5;
v16 = 1;
}
if ( v16 )
v11 = sort_order_win1250ch2[*v17];
else
v11 = sort_order_win1250ch1[*v17];
v18 = v11;
if ( v11 == 255 )
{
for ( i = 0; i < 80; ++i )
{
v13 = *(&doubles_0 + 2 * i);
for ( j = v17; ; ++j )
{
v10 = 0;
if ( *v13 )
{
v10 = 0;
if ( j - a5 < a6 )
v10 = (unsigned __int8)*v13 == *j;
}
if ( !v10 )
break;
++v13;
}
if ( !*v13 )
{
if ( v16 )
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 9);
else
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 8);
v18 = v9;
v17 = j - 1;
break;
}
}
}
++v17;
LABEL_28:
if ( !v18 )
break;
if ( (a7 & (1 << v16)) != 0 )
{
v7 = v15++;
*(_BYTE *)(a2 + v7) = v18;
}
}
if ( (a7 & 0x80) != 0 && a3 > v15 )
{
memset(v15 + a2, 0LL, a3 - v15);
return a3;
}
return v15;
}
| my_strnxfrm_win1250ch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x44],0x0
MOV qword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x0016bda0
MOV EAX,dword ptr [RBP + 0x10]
OR EAX,0xf
MOV dword ptr [RBP + 0x10],EAX
LAB_0016bda0:
JMP 0x0016bda2
LAB_0016bda2:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0016bf89
JMP 0x0016bdb2
LAB_0016bdb2:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x0016bdf9
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0016bdeb
MOV RAX,qword ptr [RBP + -0x30]
CMP EAX,0x0
JLE 0x0016bdeb
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0016bdf7
LAB_0016bdeb:
MOV dword ptr [RBP + -0x34],0x0
JMP 0x0016bf4f
LAB_0016bdf7:
JMP 0x0016bdf9
LAB_0016bdf9:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0016be18
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2b5860]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x0016be2f
LAB_0016be18:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x485040]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x6c],EAX
LAB_0016be2f:
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0xff
JNZ 0x0016bf43
MOV dword ptr [RBP + -0x54],0x0
LAB_0016be49:
CMP dword ptr [RBP + -0x54],0x50
JGE 0x0016bf41
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x2cd540]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x68],RAX
LAB_0016be74:
MOV RAX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x6d],AL
JZ 0x0016beb7
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,EAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x6d],AL
JGE 0x0016beb7
MOV RAX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RBP + -0x6d],AL
LAB_0016beb7:
MOV AL,byte ptr [RBP + -0x6d]
TEST AL,0x1
JNZ 0x0016bec0
JMP 0x0016beda
LAB_0016bec0:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
JMP 0x0016be74
LAB_0016beda:
MOV RAX,qword ptr [RBP + -0x60]
CMP byte ptr [RAX],0x0
JNZ 0x0016bf31
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0016bf04
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x2cd540]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x74],EAX
JMP 0x0016bf1d
LAB_0016bf04:
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x2cd540]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x9]
MOV dword ptr [RBP + -0x74],EAX
LAB_0016bf1d:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016bf41
LAB_0016bf31:
JMP 0x0016bf33
LAB_0016bf33:
MOV EAX,dword ptr [RBP + -0x54]
ADD EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0016be49
LAB_0016bf41:
JMP 0x0016bf43
LAB_0016bf43:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_0016bf4f:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0016bf57
JMP 0x0016bf89
LAB_0016bf57:
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,0x1
SHL EAX,CL
AND EAX,dword ptr [RBP + 0x10]
CMP EAX,0x0
JZ 0x0016bf84
MOV EAX,dword ptr [RBP + -0x34]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x50]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RBP + -0x50],RSI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0016bf84:
JMP 0x0016bda2
LAB_0016bf89:
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016bfbf
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x50]
JBE 0x0016bfbf
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x00124190
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
LAB_0016bfbf:
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x80
POP RBP
RET
|
ulong my_strnxfrm_win1250ch
(int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5,
int param_6,uint param_7)
{
char cVar1;
bool bVar2;
bool bVar3;
byte *local_70;
byte *local_68;
int local_5c;
ulong local_58;
byte *local_48;
bVar2 = false;
local_58 = 0;
local_48 = param_5;
if ((param_7 & 0xf) == 0) {
param_7 = param_7 | 0xf;
}
while (local_58 < param_3) {
if ((long)local_48 - (long)param_5 < (long)param_6) {
LAB_0016bdf9:
if (bVar2) {
cVar1 = _sort_order_win1250ch2[*local_48];
}
else {
cVar1 = _sort_order_win1250ch1[*local_48];
}
if (cVar1 == -1) {
for (local_5c = 0; local_5c < 0x50; local_5c = local_5c + 1) {
local_68 = *(byte **)(doubles + (long)local_5c * 0x10);
local_70 = local_48;
while( true ) {
bVar3 = false;
if ((*local_68 != 0) && (bVar3 = false, (long)local_70 - (long)param_5 < (long)param_6))
{
bVar3 = *local_68 == *local_70;
}
if (!bVar3) break;
local_68 = local_68 + 1;
local_70 = local_70 + 1;
}
if (*local_68 == 0) {
if (bVar2) {
cVar1 = doubles[(long)local_5c * 0x10 + 9];
}
else {
cVar1 = doubles[(long)local_5c * 0x10 + 8];
}
local_48 = local_70 + -1;
break;
}
}
}
local_48 = local_48 + 1;
}
else {
if ((!bVar2) && (0 < param_6)) {
bVar2 = true;
local_48 = param_5;
goto LAB_0016bdf9;
}
cVar1 = '\0';
}
if (cVar1 == '\0') break;
if ((1 << bVar2 & param_7) != 0) {
*(char *)(param_2 + local_58) = cVar1;
local_58 = local_58 + 1;
}
}
if (((param_7 & 0x80) != 0) && (local_58 < param_3)) {
memset((void *)(param_2 + local_58),0,param_3 - local_58);
local_58 = param_3;
}
return local_58;
}
| |
49,083 | 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>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(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>&) | monkey531[P]llama/common/./json.hpp | reference emplace_back(Args&& ... args)
{
// emplace_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (perfect forwarding)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->emplace_back(std::forward<Args>(args)...);
return set_parent(m_data.m_value.array->back(), old_capacity);
} | 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>& 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>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(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>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0xe3bd4
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1a870
movq %rax, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
jmp 0xe3bdd
cmpl $0x2, %eax
jne 0xe3bfa
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xe3d18
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
addq $-0x10, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5df1e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x11f6a(%rip), %rsi # 0xf5b88
leaq 0x10(%rsp), %rdi
callq 0xe3c90
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x137, %esi # imm = 0x137
movq %r14, %rcx
callq 0x5dcc6
xorl %ebp, %ebp
leaq 0x442ff(%rip), %rsi # 0x127f48
leaq -0x89afc(%rip), %rdx # 0x5a154
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe3c76
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0xe3c80
jmp 0xe3c88
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_E3BD4
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
jmp short loc_E3BDD
loc_E3BD4:
cmp eax, 2
jnz short loc_E3BFA
mov rdi, [r14+8]
loc_E3BDD:
mov rsi, rbx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)
mov rax, [r14+8]
mov rax, [rax+8]
add rax, 0FFFFFFFFFFFFFFF0h
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_E3BFA:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseEmpla; "cannot use emplace_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 137h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E3C76
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E3C76:
test bpl, bpl
jnz short loc_E3C80
jmp short loc_E3C88
mov r14, rax
loc_E3C80:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_E3C88:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>(
long long a1,
long long a2)
{
long long v3; // rdi
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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(&)[32],char const*>(
v6,
"cannot use emplace_back() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
311,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = *(_QWORD *)(a1 + 8);
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
}
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>(
v3,
a2);
return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL;
}
| emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x001e3bd4
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011a870
MOV RDI,RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
JMP 0x001e3bdd
LAB_001e3bd4:
CMP EAX,0x2
JNZ 0x001e3bfa
MOV RDI,qword ptr [R14 + 0x8]
LAB_001e3bdd:
MOV RSI,RBX
CALL 0x001e3d18
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,-0x10
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001e3bfa:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015df1e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001e3c17:
LEA RSI,[0x1f5b88]
LEA RDI,[RSP + 0x10]
CALL 0x001e3c90
MOV BPL,0x1
LAB_001e3c2b:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x137
MOV RCX,R14
CALL 0x0015dcc6
XOR EBP,EBP
LEA RSI,[0x227f48]
LEA RDX,[0x15a154]
MOV RDI,RBX
CALL 0x0011aea0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, 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>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
basic_json * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this_00;
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
this_00 = (vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)operator_new(0x18);
*(int8 *)this_00 = 0;
*(int8 *)(this_00 + 8) = 0;
*(int8 *)(this_00 + 0x10) = 0;
*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8) = this_00;
}
else {
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001e3c17 to 001e3c27 has its CatchHandler @ 001e3c7d */
detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(local_38,"cannot use emplace_back() with ",&local_40);
/* try { // try from 001e3c2b to 001e3c57 has its CatchHandler @ 001e3c58 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x137,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(this_00,param_1);
return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10);
}
| |
49,084 | ma_get_prev_key | eloqsql/storage/maria/ma_search.c | static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page,
uchar *keypos)
{
uint page_flag, nod_flag;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_get_prev_key");
page_flag= ma_page->flag;
nod_flag= ma_page->node;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
bmove(key->data, keypos - keyinfo->keylength - nod_flag,
keyinfo->keylength);
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
DBUG_RETURN(0);
}
else
{
uchar *page;
page= ma_page->buff + keyinfo->share->keypage_header + nod_flag;
key->data[0]= 0; /* safety */
DBUG_ASSERT(page != keypos);
while (page < keypos)
{
if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(1);
}
}
}
DBUG_RETURN(0);
} | O0 | c | ma_get_prev_key:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xa2(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0x75fb4
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x75fb4
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movl -0x28(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movl %eax, %edx
callq 0x2a160
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x740(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x10(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x7602f
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movl -0x28(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x0, (%rax)
jmp 0x75fe2
jmp 0x75fe4
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x76027
movq -0x30(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
leaq -0x38(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x76025
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movl $0x7e, %esi
callq 0x702a0
movb $0x1, -0x1(%rbp)
jmp 0x7602f
jmp 0x75fe4
jmp 0x76029
jmp 0x7602b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_get_prev_key:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_28], eax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0A2h]
and eax, 28h
cmp eax, 0
jnz loc_75FB4
mov eax, [rbp+var_24]
and eax, 2
cmp eax, 0
jnz short loc_75FB4
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
movsxd rcx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov eax, [rbp+var_28]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov edx, eax
call _memmove
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, [rax+740h]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_10]
sub ecx, [rax+14h]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 0
mov [rbp+var_1], 0
jmp short loc_7602F
loc_75FB4:
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov ecx, [rbp+var_28]
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov byte ptr [rax], 0
jmp short $+2
loc_75FE2:
jmp short $+2
loc_75FE4:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jnb short loc_76027
mov rax, [rbp+var_30]
mov rax, [rax+0E0h]
mov rdi, [rbp+var_10]
mov esi, [rbp+var_24]
mov edx, [rbp+var_28]
lea rcx, [rbp+var_38]
call rax
cmp eax, 0
jnz short loc_76025
mov rax, [rbp+var_30]
mov rdi, [rax]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
mov [rbp+var_1], 1
jmp short loc_7602F
loc_76025:
jmp short loc_75FE4
loc_76027:
jmp short $+2
loc_76029:
jmp short $+2
loc_7602B:
mov [rbp+var_1], 0
loc_7602F:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char ma_get_prev_key(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
unsigned long long v8; // [rsp+8h] [rbp-38h] BYREF
long long v9; // [rsp+10h] [rbp-30h]
unsigned int v10; // [rsp+18h] [rbp-28h]
unsigned int v11; // [rsp+1Ch] [rbp-24h]
unsigned long long v12; // [rsp+20h] [rbp-20h]
long long v13; // [rsp+28h] [rbp-18h]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v9 = *(_QWORD *)(a1 + 8);
v11 = *(_DWORD *)(a2 + 44);
v10 = *(_DWORD *)(a2 + 40);
if ( (*(_WORD *)(v9 + 162) & 0x28) != 0 || (v11 & 2) != 0 )
{
v8 = v10 + *(unsigned int *)(*(_QWORD *)v9 + 1860LL) + *(_QWORD *)(v13 + 16);
**(_BYTE **)v14 = 0;
while ( v8 < v12 )
{
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(v14, v11, v10, &v8) )
{
ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v3, v4, v5, v6);
return 1;
}
}
return 0;
}
else
{
memmove(*(_QWORD *)v14, v12 - *(unsigned __int16 *)(v9 + 170) - v10, *(unsigned __int16 *)(v9 + 170));
*(_DWORD *)(v14 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL);
*(_DWORD *)(v14 + 16) = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(v14 + 20);
*(_DWORD *)(v14 + 24) = 0;
return 0;
}
}
| _ma_get_prev_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x00175fb4
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x00175fb4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOVSXD RCX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV EDX,EAX
CALL 0x0012a160
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017602f
LAB_00175fb4:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX],0x0
JMP 0x00175fe2
LAB_00175fe2:
JMP 0x00175fe4
LAB_00175fe4:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00176027
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x38]
CALL RAX
CMP EAX,0x0
JNZ 0x00176025
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,0x7e
CALL 0x001702a0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017602f
LAB_00176025:
JMP 0x00175fe4
LAB_00176027:
JMP 0x00176029
LAB_00176029:
JMP 0x0017602b
LAB_0017602b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0017602f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3)
{
int iVar1;
ulong local_40;
long *local_38;
uint local_30;
uint local_2c;
ulong local_28;
long local_20;
int8 *local_18;
int1 local_9;
local_38 = (long *)param_1[1];
local_2c = *(uint *)(param_2 + 0x2c);
local_30 = *(uint *)(param_2 + 0x28);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) {
memmove((void *)*param_1,
(void *)((param_3 - (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa)) -
(ulong)local_30),(ulong)*(ushort *)((long)local_38 + 0xaa));
*(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740);
*(uint *)(local_18 + 2) =
(uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14);
*(int4 *)(local_18 + 3) = 0;
local_9 = 0;
}
else {
local_40 = *(long *)(param_2 + 0x10) + (ulong)*(uint *)(*local_38 + 0x744) + (ulong)local_30;
*(int1 *)*param_1 = 0;
do {
if (local_28 <= local_40) {
return 0;
}
iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40);
} while (iVar1 != 0);
_ma_set_fatal_error_with_share(*local_38,0x7e);
local_9 = 1;
}
return local_9;
}
| |
49,085 | ma_get_prev_key | eloqsql/storage/maria/ma_search.c | static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page,
uchar *keypos)
{
uint page_flag, nod_flag;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_get_prev_key");
page_flag= ma_page->flag;
nod_flag= ma_page->node;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
bmove(key->data, keypos - keyinfo->keylength - nod_flag,
keyinfo->keylength);
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
DBUG_RETURN(0);
}
else
{
uchar *page;
page= ma_page->buff + keyinfo->share->keypage_header + nod_flag;
key->data[0]= 0; /* safety */
DBUG_ASSERT(page != keypos);
while (page < keypos)
{
if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(1);
}
}
}
DBUG_RETURN(0);
} | O3 | c | ma_get_prev_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r9
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movl 0x28(%rsi), %r8d
movl 0x2c(%rsi), %ecx
testb $0x28, 0xa2(%r14)
sete %al
movl %ecx, -0x2c(%rbp)
testb $0x2, %cl
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5fb35
movq (%rbx), %rdi
movzwl 0xaa(%r14), %edx
subq %rdx, %r9
subq %r8, %r9
movq %r9, %rsi
callq 0x2a150
movq (%r14), %rax
movl 0x740(%rax), %eax
movl %eax, 0x14(%rbx)
movzwl 0xaa(%r14), %ecx
subl %eax, %ecx
movl %ecx, 0x10(%rbx)
movl $0x0, 0x18(%rbx)
xorl %eax, %eax
jmp 0x5fb9a
movq %r14, %r12
movq (%r14), %rax
movl 0x744(%rax), %eax
addq 0x10(%rsi), %rax
movq %r8, %r14
addq %r8, %rax
leaq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %rbx, %r13
movq (%rbx), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %r15
cmpq %r9, %r15
jae 0x5fb94
movq %r13, %rdi
movl -0x2c(%rbp), %esi
movl %r14d, %edx
leaq -0x38(%rbp), %rcx
movq %r9, %rbx
callq *0xe0(%r12)
movq %rbx, %r9
testl %eax, %eax
jne 0x5fb5b
movq (%r12), %rdi
movl $0x7e, %esi
callq 0x5cae6
movq %rbx, %r9
cmpq %r9, %r15
setb %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| _ma_get_prev_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r9, rdx
mov rbx, rdi
mov r14, [rdi+8]
mov r8d, [rsi+28h]
mov ecx, [rsi+2Ch]
test byte ptr [r14+0A2h], 28h
setz al
mov [rbp+var_2C], ecx
test cl, 2
setz cl
and cl, al
cmp cl, 1
jnz short loc_5FB35
mov rdi, [rbx]
movzx edx, word ptr [r14+0AAh]
sub r9, rdx
sub r9, r8
mov rsi, r9
call _memmove
mov rax, [r14]
mov eax, [rax+740h]
mov [rbx+14h], eax
movzx ecx, word ptr [r14+0AAh]
sub ecx, eax
mov [rbx+10h], ecx
mov dword ptr [rbx+18h], 0
xor eax, eax
jmp short loc_5FB9A
loc_5FB35:
mov r12, r14
mov rax, [r14]
mov eax, [rax+744h]
add rax, [rsi+10h]
mov r14, r8
add rax, r8
lea rcx, [rbp+var_38]
mov [rcx], rax
mov r13, rbx
mov rax, [rbx]
mov byte ptr [rax], 0
loc_5FB5B:
mov r15, [rbp+var_38]
cmp r15, r9
jnb short loc_5FB94
mov rdi, r13
mov esi, [rbp+var_2C]
mov edx, r14d
lea rcx, [rbp+var_38]
mov rbx, r9
call qword ptr [r12+0E0h]
mov r9, rbx
test eax, eax
jnz short loc_5FB5B
mov rdi, [r12]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
mov r9, rbx
loc_5FB94:
cmp r15, r9
setb al
loc_5FB9A:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool ma_get_prev_key(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // r9
long long v4; // r14
long long v5; // r8
bool v6; // al
int v7; // eax
long long v9; // r12
long long v10; // rax
unsigned int v11; // r14d
unsigned long long v12; // r15
unsigned long long v13; // rbx
int v14; // eax
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
unsigned long long v18; // [rsp+8h] [rbp-38h] BYREF
unsigned int v19; // [rsp+14h] [rbp-2Ch]
v3 = a3;
v4 = *(_QWORD *)(a1 + 8);
v5 = *(unsigned int *)(a2 + 40);
v6 = (*(_BYTE *)(v4 + 162) & 0x28) == 0;
v19 = *(_DWORD *)(a2 + 44);
if ( v6 && (v19 & 2) == 0 )
{
memmove(*(_QWORD *)a1, a3 - *(unsigned __int16 *)(v4 + 170) - v5, *(unsigned __int16 *)(v4 + 170));
v7 = *(_DWORD *)(*(_QWORD *)v4 + 1856LL);
*(_DWORD *)(a1 + 20) = v7;
*(_DWORD *)(a1 + 16) = *(unsigned __int16 *)(v4 + 170) - v7;
*(_DWORD *)(a1 + 24) = 0;
return 0;
}
else
{
v9 = v4;
v10 = *(_QWORD *)(a2 + 16) + *(unsigned int *)(*(_QWORD *)v4 + 1860LL);
v11 = v5;
v18 = v5 + v10;
**(_BYTE **)a1 = 0;
while ( 1 )
{
v12 = v18;
if ( v18 >= v3 )
break;
v13 = v3;
v14 = (*(long long ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(a1, v19, v11, &v18);
v3 = v13;
if ( !v14 )
{
ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v15, v16, v17, v13);
v3 = v13;
return v12 < v3;
}
}
return v12 < v3;
}
}
| _ma_get_prev_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R9,RDX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV R8D,dword ptr [RSI + 0x28]
MOV ECX,dword ptr [RSI + 0x2c]
TEST byte ptr [R14 + 0xa2],0x28
SETZ AL
MOV dword ptr [RBP + -0x2c],ECX
TEST CL,0x2
SETZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x0015fb35
MOV RDI,qword ptr [RBX]
MOVZX EDX,word ptr [R14 + 0xaa]
SUB R9,RDX
SUB R9,R8
MOV RSI,R9
CALL 0x0012a150
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0x740]
MOV dword ptr [RBX + 0x14],EAX
MOVZX ECX,word ptr [R14 + 0xaa]
SUB ECX,EAX
MOV dword ptr [RBX + 0x10],ECX
MOV dword ptr [RBX + 0x18],0x0
XOR EAX,EAX
JMP 0x0015fb9a
LAB_0015fb35:
MOV R12,R14
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0x744]
ADD RAX,qword ptr [RSI + 0x10]
MOV R14,R8
ADD RAX,R8
LEA RCX,[RBP + -0x38]
MOV qword ptr [RCX],RAX
MOV R13,RBX
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX],0x0
LAB_0015fb5b:
MOV R15,qword ptr [RBP + -0x38]
CMP R15,R9
JNC 0x0015fb94
MOV RDI,R13
MOV ESI,dword ptr [RBP + -0x2c]
MOV EDX,R14D
LEA RCX,[RBP + -0x38]
MOV RBX,R9
CALL qword ptr [R12 + 0xe0]
MOV R9,RBX
TEST EAX,EAX
JNZ 0x0015fb5b
MOV RDI,qword ptr [R12]
MOV ESI,0x7e
CALL 0x0015cae6
MOV R9,RBX
LAB_0015fb94:
CMP R15,R9
SETC AL
LAB_0015fb9a:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3)
{
long *plVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
bool bVar5;
ulong local_40;
uint local_34;
plVar1 = (long *)param_1[1];
uVar4 = (ulong)*(uint *)(param_2 + 0x28);
local_34 = *(uint *)(param_2 + 0x2c);
if ((local_34 & 2) == 0 && (*(byte *)((long)plVar1 + 0xa2) & 0x28) == 0) {
memmove((void *)*param_1,(void *)((param_3 - *(ushort *)((long)plVar1 + 0xaa)) - uVar4),
(ulong)*(ushort *)((long)plVar1 + 0xaa));
iVar3 = *(int *)(*plVar1 + 0x740);
*(int *)((long)param_1 + 0x14) = iVar3;
*(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar1 + 0xaa) - iVar3;
*(int4 *)(param_1 + 3) = 0;
bVar5 = false;
}
else {
local_40 = (ulong)*(uint *)(*plVar1 + 0x744) + *(long *)(param_2 + 0x10) + uVar4;
*(int1 *)*param_1 = 0;
do {
uVar2 = local_40;
if (param_3 <= local_40) goto LAB_0015fb94;
iVar3 = (*(code *)plVar1[0x1c])(param_1,local_34,uVar4,&local_40);
} while (iVar3 != 0);
_ma_set_fatal_error_with_share(*plVar1,0x7e);
LAB_0015fb94:
bVar5 = uVar2 < param_3;
}
return bVar5;
}
| |
49,086 | ggml_compute_forward_elu | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_elu(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_elu_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_compute_forward_elu:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x38e1a
jmp 0x38e0b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x39990
jmp 0x38e34
leaq 0x3ad41(%rip), %rdi # 0x73b62
movl $0x18e1, %esi # imm = 0x18E1
leaq 0x3af90(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ggml_compute_forward_elu:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_38E1A
jmp short $+2
loc_38E0B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_elu_f32
jmp short loc_38E34
loc_38E1A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 18E1h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_38E34:
add rsp, 20h
pop rbp
retn
| double ggml_compute_forward_elu(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6369LL,
"fatal error");
ggml_compute_forward_elu_f32(a1, a2);
return result;
}
| ggml_compute_forward_elu:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x00138e1a
JMP 0x00138e0b
LAB_00138e0b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00139990
JMP 0x00138e34
LAB_00138e1a:
LEA RDI,[0x173b62]
MOV ESI,0x18e1
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00138e34:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_elu(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_elu_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x18e1,"fatal error");
}
return;
}
| |
49,087 | js_cond_timedwait | bluesky950520[P]quickjs/cutils.c | int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) {
int r;
struct timespec ts;
#if !defined(__APPLE__)
timeout += js__hrtime_ns();
#endif
ts.tv_sec = timeout / NANOSEC;
ts.tv_nsec = timeout % NANOSEC;
#if defined(__APPLE__) && defined(__MACH__)
r = pthread_cond_timedwait_relative_np(cond, mutex, &ts);
#else
r = pthread_cond_timedwait(cond, mutex, &ts);
#endif
if (r == 0)
return 0;
if (r == ETIMEDOUT)
return -1;
abort();
/* Pacify some compilers. */
return -1;
} | O0 | c | js_cond_timedwait:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
callq 0x20e60
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0xe730
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x210e0
movl $0x0, 0x34(%rsp)
jmp 0x210f6
cmpl $0x6e, 0x14(%rsp)
jne 0x210f1
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x210f6
callq 0xe090
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
| js_cond_timedwait:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
call js__hrtime_ns
add rax, [rsp+38h+var_20]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rsp+38h+var_30], rdx
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
mov rdx, rsp
call _pthread_cond_timedwait
mov [rsp+38h+var_24], eax
cmp [rsp+38h+var_24], 0
jnz short loc_210E0
mov [rsp+38h+var_4], 0
jmp short loc_210F6
loc_210E0:
cmp [rsp+38h+var_24], 6Eh ; 'n'
jnz short loc_210F1
mov [rsp+38h+var_4], 0FFFFFFFFh
jmp short loc_210F6
loc_210F1:
call _abort
loc_210F6:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long js_cond_timedwait(long long a1, long long a2, long long a3)
{
_QWORD v4[2]; // [rsp+0h] [rbp-38h] BYREF
int v5; // [rsp+14h] [rbp-24h]
unsigned long long v6; // [rsp+18h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-18h]
long long v8; // [rsp+28h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = a3 + js__hrtime_ns();
v4[0] = v6 / 0x3B9ACA00;
v4[1] = v6 % 0x3B9ACA00;
v5 = pthread_cond_timedwait(a1, a2, v4);
if ( v5 )
{
if ( v5 != 110 )
abort();
return (unsigned int)-1;
}
else
{
return 0;
}
}
| make_string_error:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0x24],EDX
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00114530
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV ECX,dword ptr [RSP + 0x24]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x001210e0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] make_string_error(int8 param_1,int8 param_2,int4 param_3)
{
int1 auVar1 [16];
auVar1 = JS_NewString(param_1,param_2);
auVar1 = make_obj_error(param_1,auVar1._0_8_,auVar1._8_8_,param_3);
return auVar1;
}
| |
49,088 | js_cond_timedwait | bluesky950520[P]quickjs/cutils.c | int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) {
int r;
struct timespec ts;
#if !defined(__APPLE__)
timeout += js__hrtime_ns();
#endif
ts.tv_sec = timeout / NANOSEC;
ts.tv_nsec = timeout % NANOSEC;
#if defined(__APPLE__) && defined(__MACH__)
r = pthread_cond_timedwait_relative_np(cond, mutex, &ts);
#else
r = pthread_cond_timedwait(cond, mutex, &ts);
#endif
if (r == 0)
return 0;
if (r == ETIMEDOUT)
return -1;
abort();
/* Pacify some compilers. */
return -1;
} | O1 | c | js_cond_timedwait:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1c6e0
movq %rax, %rcx
addq %rbx, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rsp, %rax
movq %rdx, (%rax)
imulq $0x3b9aca00, %rdx, %rdx # imm = 0x3B9ACA00
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xe740
testl %eax, %eax
je 0x1c885
cmpl $0x6e, %eax
jne 0x1c88f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0xe090
| js_cond_timedwait:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call js__hrtime_ns
mov rcx, rax
add rcx, rbx
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov rax, rsp
mov [rax], rdx
imul rdx, 3B9ACA00h
sub rcx, rdx
mov [rax+8], rcx
mov rdi, r15
mov rsi, r14
mov rdx, rax
call _pthread_cond_timedwait
test eax, eax
jz short loc_1C885
cmp eax, 6Eh ; 'n'
jnz short loc_1C88F
mov eax, 0FFFFFFFFh
loc_1C885:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_1C88F:
call _abort
| long long js_cond_timedwait(long long a1, long long a2, long long a3)
{
long long v4; // rax
long long result; // rax
_QWORD v6[5]; // [rsp+0h] [rbp-28h] BYREF
v4 = js__hrtime_ns();
v6[0] = (a3 + v4) / 0x3B9ACA00uLL;
v6[1] = (a3 + v4) % 0x3B9ACA00uLL;
result = pthread_cond_timedwait(a1, a2, v6);
if ( (_DWORD)result )
{
if ( (_DWORD)result != 110 )
abort(a1);
return 0xFFFFFFFFLL;
}
return result;
}
| |||
49,089 | my_sync_dir | eloqsql/mysys/my_sync.c | int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
} | O3 | c | my_sync_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
movq %rsi, %rbx
leaq 0x40968(%rip), %rax # 0xe1e38
cmoveq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xa02c4
testl %eax, %eax
js 0xa1517
movl %eax, %r14d
movq %rbx, %rsi
orq $0x20, %rsi
movl %eax, %edi
callq 0xa1388
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
addl %r15d, %r15d
movl %r14d, %edi
movq %rbx, %rsi
callq 0xa0469
testl %eax, %eax
movl $0x3, %eax
cmovel %r15d, %eax
jmp 0xa151c
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_sync_dir:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp byte ptr [rdi], 0
mov rbx, rsi
lea rax, my_sync_dir_cur_dir_name
cmovz rdi, rax
xor esi, esi
mov rdx, rbx
call my_open
test eax, eax
js short loc_A1517
mov r14d, eax
mov rsi, rbx
or rsi, 20h
mov edi, eax
call my_sync
xor r15d, r15d
test eax, eax
setnz r15b
add r15d, r15d
mov edi, r14d
mov rsi, rbx
call my_close
test eax, eax
mov eax, 3
cmovz eax, r15d
jmp short loc_A151C
loc_A1517:
mov eax, 1
loc_A151C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_sync_dir(_BYTE *a1, long long a2)
{
int v2; // eax
unsigned int v3; // r14d
unsigned int v4; // r15d
bool v5; // zf
long long result; // rax
if ( !*a1 )
a1 = &my_sync_dir_cur_dir_name;
v2 = my_open((long long)a1, 0, a2);
if ( v2 < 0 )
return 1LL;
v3 = v2;
v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, (const char *)(a2 | 0x20)) != 0);
v5 = (unsigned int)my_close(v3, (const char *)a2) == 0;
result = 3LL;
if ( v5 )
return v4;
return result;
}
| my_sync_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP byte ptr [RDI],0x0
MOV RBX,RSI
LEA RAX,[0x1e1e38]
CMOVZ RDI,RAX
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001a02c4
TEST EAX,EAX
JS 0x001a1517
MOV R14D,EAX
MOV RSI,RBX
OR RSI,0x20
MOV EDI,EAX
CALL 0x001a1388
XOR R15D,R15D
TEST EAX,EAX
SETNZ R15B
ADD R15D,R15D
MOV EDI,R14D
MOV RSI,RBX
CALL 0x001a0469
TEST EAX,EAX
MOV EAX,0x3
CMOVZ EAX,R15D
JMP 0x001a151c
LAB_001a1517:
MOV EAX,0x1
LAB_001a151c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char my_sync_dir(char *param_1,ulong param_2)
{
char cVar1;
int iVar2;
int iVar3;
if (*param_1 == '\0') {
param_1 = ".";
}
iVar2 = my_open(param_1,0,param_2);
if (iVar2 < 0) {
cVar1 = '\x01';
}
else {
iVar3 = my_sync(iVar2,param_2 | 0x20);
iVar2 = my_close(iVar2,param_2);
cVar1 = '\x03';
if (iVar2 == 0) {
cVar1 = (iVar3 != 0) * '\x02';
}
}
return cVar1;
}
| |
49,090 | JS_NewStringLen | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len)
{
JSString *str;
size_t len;
int kind;
if (buf_len <= 0) {
return JS_AtomToString(ctx, JS_ATOM_empty_string);
}
/* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */
kind = utf8_scan(buf, buf_len, &len);
if (len > JS_STRING_LEN_MAX)
return JS_ThrowRangeError(ctx, "invalid string length");
switch (kind) {
case UTF8_PLAIN_ASCII:
str = js_alloc_string(ctx, len, 0);
if (!str)
return JS_EXCEPTION;
memcpy(str->u.str8, buf, len);
str->u.str8[len] = '\0';
break;
case UTF8_NON_ASCII:
/* buf contains non-ASCII code-points, but limited to 8-bit values */
str = js_alloc_string(ctx, len, 0);
if (!str)
return JS_EXCEPTION;
utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len);
break;
default:
// This causes a potential problem in JS_ThrowError if message is invalid
//if (kind & UTF8_HAS_ERRORS)
// return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence");
str = js_alloc_string(ctx, len, 1);
if (!str)
return JS_EXCEPTION;
utf8_decode_buf16(str->u.str16, len, buf, buf_len);
break;
}
return JS_MKPTR(JS_TAG_STRING, str);
} | O3 | c | JS_NewStringLen:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
testq %rdx, %rdx
je 0x1fa8a
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x10(%rsp), %r12
movq %rsi, %rdi
movq %rdx, %rsi
movq %r12, %rdx
callq 0x1b567
movq (%r12), %rsi
cmpq $0x40000000, %rsi # imm = 0x40000000
jb 0x1faa5
leaq 0x807c4(%rip), %rsi # 0xa0236
movq %r15, %rdi
xorl %eax, %eax
callq 0x205f0
movq $0x0, 0x8(%rsp)
jmp 0x1fb4d
movq 0x18(%r15), %rax
movq 0x68(%rax), %rax
movq 0x178(%rax), %rax
incl (%rax)
movq %rax, 0x8(%rsp)
jmp 0x1fb3c
movq %r15, %rdi
cmpl $0x1, %eax
je 0x1fae3
testl %eax, %eax
jne 0x1fb0e
xorl %edx, %edx
callq 0x20686
testq %rax, %rax
je 0x1fb45
movq %rax, %r15
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rsp), %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe5a0
movb $0x0, 0x18(%r15,%r14)
jmp 0x1fb37
xorl %edx, %edx
callq 0x20686
testq %rax, %rax
je 0x1fb45
movq %rax, %r15
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rsp), %rsi
incq %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1b620
jmp 0x1fb37
movl $0x1, %edx
callq 0x20686
testq %rax, %rax
je 0x1fb45
movq %rax, %r15
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1b676
movq %r15, 0x8(%rsp)
movq $-0x7, %rdx
jmp 0x1fb52
movl $0x0, 0x8(%rsp)
movl $0x6, %edx
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| JS_NewStringLen:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r15, rdi
test rdx, rdx
jz short loc_1FA8A
mov r14, rdx
mov rbx, rsi
lea r12, [rsp+38h+var_28]
mov rdi, rsi
mov rsi, rdx
mov rdx, r12
call utf8_scan
mov rsi, [r12]
cmp rsi, 40000000h
jb short loc_1FAA5
lea rsi, aInvalidStringL; "invalid string length"
mov rdi, r15
xor eax, eax
call JS_ThrowRangeError
mov [rsp+38h+var_30], 0
jmp loc_1FB4D
loc_1FA8A:
mov rax, [r15+18h]
mov rax, [rax+68h]
mov rax, [rax+178h]
inc dword ptr [rax]
mov [rsp+38h+var_30], rax
jmp loc_1FB3C
loc_1FAA5:
mov rdi, r15
cmp eax, 1
jz short loc_1FAE3
test eax, eax
jnz short loc_1FB0E
xor edx, edx
call js_alloc_string
test rax, rax
jz loc_1FB45
mov r15, rax
mov rdi, rax
add rdi, 18h
mov r14, [rsp+38h+var_28]
mov rsi, rbx
mov rdx, r14
call _memcpy
mov byte ptr [r15+r14+18h], 0
jmp short loc_1FB37
loc_1FAE3:
xor edx, edx
call js_alloc_string
test rax, rax
jz short loc_1FB45
mov r15, rax
mov rdi, rax
add rdi, 18h
mov rsi, [rsp+38h+var_28]
inc rsi
mov rdx, rbx
mov rcx, r14
call utf8_decode_buf8
jmp short loc_1FB37
loc_1FB0E:
mov edx, 1
call js_alloc_string
test rax, rax
jz short loc_1FB45
mov r15, rax
mov rdi, rax
add rdi, 18h
mov rsi, [rsp+38h+var_28]
mov rdx, rbx
mov rcx, r14
call utf8_decode_buf16
loc_1FB37:
mov [rsp+38h+var_30], r15
loc_1FB3C:
mov rdx, 0FFFFFFFFFFFFFFF9h
jmp short loc_1FB52
loc_1FB45:
mov dword ptr [rsp+38h+var_30], 0
loc_1FB4D:
mov edx, 6
loc_1FB52:
mov rax, [rsp+38h+var_30]
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
| _DWORD * JS_NewStringLen(long long a1, char *a2, long long a3)
{
int v4; // eax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
_DWORD *v9; // rax
long long v10; // rax
long long v11; // r15
unsigned long long v12; // r14
long long v13; // rax
long long v14; // rax
long long v16; // [rsp+8h] [rbp-30h]
unsigned long long v17[5]; // [rsp+10h] [rbp-28h] BYREF
if ( !a3 )
{
v9 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL);
++*v9;
return v9;
}
v4 = utf8_scan(a2, a3, (long long *)v17);
if ( v17[0] < 0x40000000 )
{
if ( v4 == 1 )
{
v13 = js_alloc_string(a1);
if ( v13 )
{
v11 = v13;
utf8_decode_buf8(v13 + 24, v17[0] + 1, a2, a3);
return (_DWORD *)v11;
}
}
else if ( v4 )
{
v14 = js_alloc_string(a1);
if ( v14 )
{
v11 = v14;
utf8_decode_buf16(v14 + 24, v17[0], a2, a3);
return (_DWORD *)v11;
}
}
else
{
v10 = js_alloc_string(a1);
if ( v10 )
{
v11 = v10;
v12 = v17[0];
memcpy(v10 + 24, a2, v17[0]);
*(_BYTE *)(v11 + v12 + 24) = 0;
return (_DWORD *)v11;
}
}
LODWORD(v16) = 0;
return (_DWORD *)v16;
}
JS_ThrowRangeError(a1, (unsigned int)"invalid string length", v5, v6, v7, v8);
return 0LL;
}
| JS_NewStringLen:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
TEST RDX,RDX
JZ 0x0011fa8a
MOV R14,RDX
MOV RBX,RSI
LEA R12,[RSP + 0x10]
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,R12
CALL 0x0011b567
MOV RSI,qword ptr [R12]
CMP RSI,0x40000000
JC 0x0011faa5
LEA RSI,[0x1a0236]
MOV RDI,R15
XOR EAX,EAX
CALL 0x001205f0
MOV qword ptr [RSP + 0x8],0x0
JMP 0x0011fb4d
LAB_0011fa8a:
MOV RAX,qword ptr [R15 + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + 0x178]
INC dword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0011fb3c
LAB_0011faa5:
MOV RDI,R15
CMP EAX,0x1
JZ 0x0011fae3
TEST EAX,EAX
JNZ 0x0011fb0e
XOR EDX,EDX
CALL 0x00120686
TEST RAX,RAX
JZ 0x0011fb45
MOV R15,RAX
MOV RDI,RAX
ADD RDI,0x18
MOV R14,qword ptr [RSP + 0x10]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0010e5a0
MOV byte ptr [R15 + R14*0x1 + 0x18],0x0
JMP 0x0011fb37
LAB_0011fae3:
XOR EDX,EDX
CALL 0x00120686
TEST RAX,RAX
JZ 0x0011fb45
MOV R15,RAX
MOV RDI,RAX
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
MOV RDX,RBX
MOV RCX,R14
CALL 0x0011b620
JMP 0x0011fb37
LAB_0011fb0e:
MOV EDX,0x1
CALL 0x00120686
TEST RAX,RAX
JZ 0x0011fb45
MOV R15,RAX
MOV RDI,RAX
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
MOV RCX,R14
CALL 0x0011b676
LAB_0011fb37:
MOV qword ptr [RSP + 0x8],R15
LAB_0011fb3c:
MOV RDX,-0x7
JMP 0x0011fb52
LAB_0011fb45:
MOV dword ptr [RSP + 0x8],0x0
LAB_0011fb4d:
MOV EDX,0x6
LAB_0011fb52:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] JS_NewStringLen(long param_1,void *param_2,long param_3)
{
int iVar1;
int *piVar2;
int8 uVar3;
int1 auVar4 [16];
int *local_30;
ulong local_28;
if (param_3 == 0) {
local_30 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178);
*local_30 = *local_30 + 1;
}
else {
iVar1 = utf8_scan(param_2,param_3,&local_28);
if (0x3fffffff < local_28) {
JS_ThrowRangeError(param_1,"invalid string length");
local_30 = (int *)0x0;
LAB_0011fb4d:
uVar3 = 6;
goto LAB_0011fb52;
}
if (iVar1 == 1) {
piVar2 = (int *)js_alloc_string(param_1,local_28,0);
if (piVar2 == (int *)0x0) goto LAB_0011fb45;
utf8_decode_buf8(piVar2 + 6,local_28 + 1,param_2,param_3);
local_30 = piVar2;
}
else if (iVar1 == 0) {
piVar2 = (int *)js_alloc_string(param_1,local_28,0);
if (piVar2 == (int *)0x0) {
LAB_0011fb45:
local_30 = (int *)((ulong)local_30 & 0xffffffff00000000);
goto LAB_0011fb4d;
}
memcpy(piVar2 + 6,param_2,local_28);
*(int1 *)((long)piVar2 + local_28 + 0x18) = 0;
local_30 = piVar2;
}
else {
piVar2 = (int *)js_alloc_string(param_1,local_28,1);
if (piVar2 == (int *)0x0) goto LAB_0011fb45;
utf8_decode_buf16(piVar2 + 6,local_28,param_2,param_3);
local_30 = piVar2;
}
}
uVar3 = 0xfffffffffffffff9;
LAB_0011fb52:
auVar4._8_8_ = uVar3;
auVar4._0_8_ = local_30;
return auVar4;
}
| |
49,091 | my_casedn_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf32(uni_plane,&wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O0 | c | my_casedn_utf32:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x61352
jmp 0x61354
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x61140
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x613c8
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x654a0
movl -0x34(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x61170
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
je 0x613a4
jmp 0x613c8
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x61354
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_casedn_utf32:
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_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short $+2
loc_61352:
jmp short $+2
loc_61354:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf32_uni
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_613C8
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_tolower_utf32
mov eax, [rbp+var_34]
mov [rbp+var_54], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf32
mov ecx, eax
mov eax, [rbp+var_54]
cmp eax, ecx
jz short loc_613A4
jmp short loc_613C8
loc_613A4:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp short loc_61354
loc_613C8:
mov rax, [rbp+var_18]
add rsp, 60h
pop rbp
retn
| long long my_casedn_utf32(long long a1, long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
long long v7; // [rsp+10h] [rbp-50h]
unsigned long long v8; // [rsp+18h] [rbp-48h]
long long v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+2Ch] [rbp-34h]
unsigned long long v11[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v12; // [rsp+40h] [rbp-20h]
long long v13; // [rsp+48h] [rbp-18h]
long long v14; // [rsp+50h] [rbp-10h]
long long v15; // [rsp+58h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11[1] = a5;
v9 = a3 + a2;
v8 = (unsigned long long)&a4[a5];
v7 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v10 = my_utf32_uni(v15, (long long)v11, v14, v9, a5, a6);
if ( v10 <= 0 )
break;
my_tolower_utf32(v7, v11);
if ( v10 != (unsigned int)my_uni_utf32(v15, v11[0], v12, v8) )
break;
v14 += v10;
v12 += v10;
}
return v13;
}
| my_casedn_utf32:
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 qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00161352
LAB_00161352:
JMP 0x00161354
LAB_00161354:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00161140
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x001613c8
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x001654a0
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x54],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x00161170
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,ECX
JZ 0x001613a4
JMP 0x001613c8
LAB_001613a4:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00161354
LAB_001613c8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x60
POP RBP
RET
|
long my_casedn_utf32(long param_1,long param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
int iVar2;
int iVar3;
int8 local_38;
long local_30;
long local_28;
long local_20;
long local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
iVar2 = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3);
if (iVar2 < 1) {
return local_20;
}
my_tolower_utf32(uVar1,&local_38);
iVar3 = my_uni_utf32(local_10,local_38,local_28,param_4 + param_5);
if (iVar2 != iVar3) break;
local_18 = local_18 + iVar2;
local_28 = local_28 + iVar2;
}
return local_20;
}
| |
49,092 | LefDefParser::lefwLayerRoutingSpacingtableTwoWidthsWidth(double, double, int, double*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwLayerRoutingSpacingtableTwoWidthsWidth(double width,
double runLength,
int numSpacing,
double *spacing)
{
int i;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTING_SP_START &&
lefwState != LEFW_LAYERROUTINGWIDTH)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) "\n WIDTH %.11g", width);
if (runLength)
encPrint(lefwFile, (char*) " PRL %.11g", runLength);
for (i = 0; i < numSpacing; i++)
encPrint(lefwFile, (char*) " %.11g", spacing[i]);
} else {
fprintf(lefwFile, "\n WIDTH %.11g", width);
if (runLength)
fprintf(lefwFile, " PRL %.11g", runLength);
for (i = 0; i < numSpacing; i++)
fprintf(lefwFile, " %.11g", spacing[i]);
}
lefwState = LEFW_LAYERROUTINGWIDTH;
lefwLines++;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwLayerRoutingSpacingtableTwoWidthsWidth(double, double, int, double*):
subq $0x38, %rsp
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movl %edi, 0x1c(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0xa60d0(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x1f193
movl $0x1, 0x34(%rsp)
jmp 0x1f320
leaq 0xa6306(%rip), %rax # 0xc54a0
cmpl $0x8, (%rax)
je 0x1f1b8
leaq 0xa62fa(%rip), %rax # 0xc54a0
cmpl $0x20, (%rax)
je 0x1f1b8
movl $0x2, 0x34(%rsp)
jmp 0x1f320
cmpl $0x0, 0xa637d(%rip) # 0xc553c
je 0x1f25f
leaq 0xa6084(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x28(%rsp), %xmm0
leaq 0x74035(%rip), %rsi # 0x93211
movb $0x1, %al
callq 0x8bf50
movsd 0x20(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1f1f6
jp 0x1f1f6
jmp 0x1f214
leaq 0xa6053(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x20(%rsp), %xmm0
leaq 0x74079(%rip), %rsi # 0x93286
movb $0x1, %al
callq 0x8bf50
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x1f25a
leaq 0xa6023(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x737cc(%rip), %rsi # 0x92a12
movb $0x1, %al
callq 0x8bf50
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x1f21c
jmp 0x1f2f6
leaq 0xa5fea(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x28(%rsp), %xmm0
leaq 0x73f9b(%rip), %rsi # 0x93211
movb $0x1, %al
callq 0x2370
movsd 0x20(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1f290
jp 0x1f290
jmp 0x1f2ae
leaq 0xa5fb9(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x20(%rsp), %xmm0
leaq 0x73fdf(%rip), %rsi # 0x93286
movb $0x1, %al
callq 0x2370
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x1f2f4
leaq 0xa5f89(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x73732(%rip), %rsi # 0x92a12
movb $0x1, %al
callq 0x2370
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x1f2b6
jmp 0x1f2f6
leaq 0xa61a3(%rip), %rax # 0xc54a0
movl $0x20, (%rax)
leaq 0xa6192(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xa6186(%rip), %rax # 0xc549c
movl %ecx, (%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
| _ZN12LefDefParser42lefwLayerRoutingSpacingtableTwoWidthsWidthEddiPd:
sub rsp, 38h
movsd [rsp+38h+var_10], xmm0
movsd [rsp+38h+var_18], xmm1
mov [rsp+38h+var_1C], edi
mov [rsp+38h+var_28], rsi
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_1F193
mov [rsp+38h+var_4], 1
jmp loc_1F320
loc_1F193:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 8
jz short loc_1F1B8
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 20h ; ' '
jz short loc_1F1B8
mov [rsp+38h+var_4], 2
jmp loc_1F320
loc_1F1B8:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz loc_1F25F
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+38h+var_10]
lea rsi, aWidth11g_0; "\n WIDTH %.11g"
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
movsd xmm0, [rsp+38h+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_1F1F6
jp short loc_1F1F6
jmp short loc_1F214
loc_1F1F6:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+38h+var_18]
lea rsi, aPrl11g; " PRL %.11g"
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_1F214:
mov [rsp+38h+var_2C], 0
loc_1F21C:
mov eax, [rsp+38h+var_2C]
cmp eax, [rsp+38h+var_1C]
jge short loc_1F25A
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rax, [rsp+38h+var_28]
movsxd rcx, [rsp+38h+var_2C]
movsd xmm0, qword ptr [rax+rcx*8]
lea rsi, aArea11g+0Ah; " %.11g"
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
jmp short loc_1F21C
loc_1F25A:
jmp loc_1F2F6
loc_1F25F:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+38h+var_10]
lea rsi, aWidth11g_0; "\n WIDTH %.11g"
mov al, 1
call _fprintf
movsd xmm0, [rsp+38h+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_1F290
jp short loc_1F290
jmp short loc_1F2AE
loc_1F290:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+38h+var_18]
lea rsi, aPrl11g; " PRL %.11g"
mov al, 1
call _fprintf
loc_1F2AE:
mov [rsp+38h+var_2C], 0
loc_1F2B6:
mov eax, [rsp+38h+var_2C]
cmp eax, [rsp+38h+var_1C]
jge short loc_1F2F4
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rax, [rsp+38h+var_28]
movsxd rcx, [rsp+38h+var_2C]
movsd xmm0, qword ptr [rax+rcx*8]
lea rsi, aArea11g+0Ah; " %.11g"
mov al, 1
call _fprintf
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
jmp short loc_1F2B6
loc_1F2F4:
jmp short $+2
loc_1F2F6:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 20h ; ' '
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
mov [rsp+38h+var_4], 0
loc_1F320:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long LefDefParser::lefwLayerRoutingSpacingtableTwoWidthsWidth(
LefDefParser *this,
double a2,
double a3,
long long a4,
double *a5,
int a6,
int a7,
int a8)
{
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int i; // [rsp+Ch] [rbp-2Ch]
int j; // [rsp+Ch] [rbp-2Ch]
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwState == 8 || LefDefParser::lefwState == 32 )
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"\n WIDTH %.11g", (_DWORD)a5, a6, a7, a8);
if ( a3 != 0.0 )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" PRL %.11g", v8, v9, v10, v11);
for ( i = 0; i < (int)this; ++i )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" %.11g", v8, i, v10, v11);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n WIDTH %.11g", a2);
if ( a3 != 0.0 )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " PRL %.11g", a3);
for ( j = 0; j < (int)this; ++j )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " %.11g", *(double *)(a4 + 8LL * j));
}
LefDefParser::lefwState = 32;
++LefDefParser::lefwLines;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwLayerRoutingSpacingtableTwoWidthsWidth:
SUB RSP,0x38
MOVSD qword ptr [RSP + 0x28],XMM0
MOVSD qword ptr [RSP + 0x20],XMM1
MOV dword ptr [RSP + 0x1c],EDI
MOV qword ptr [RSP + 0x10],RSI
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x0011f193
MOV dword ptr [RSP + 0x34],0x1
JMP 0x0011f320
LAB_0011f193:
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x8
JZ 0x0011f1b8
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x20
JZ 0x0011f1b8
MOV dword ptr [RSP + 0x34],0x2
JMP 0x0011f320
LAB_0011f1b8:
CMP dword ptr [0x001c553c],0x0
JZ 0x0011f25f
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x28]
LEA RSI,[0x193211]
MOV AL,0x1
CALL 0x0018bf50
MOVSD XMM0,qword ptr [RSP + 0x20]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x0011f1f6
JP 0x0011f1f6
JMP 0x0011f214
LAB_0011f1f6:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x20]
LEA RSI,[0x193286]
MOV AL,0x1
CALL 0x0018bf50
LAB_0011f214:
MOV dword ptr [RSP + 0xc],0x0
LAB_0011f21c:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x1c]
JGE 0x0011f25a
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
LEA RSI,[0x192a12]
MOV AL,0x1
CALL 0x0018bf50
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0011f21c
LAB_0011f25a:
JMP 0x0011f2f6
LAB_0011f25f:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x28]
LEA RSI,[0x193211]
MOV AL,0x1
CALL 0x00102370
MOVSD XMM0,qword ptr [RSP + 0x20]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x0011f290
JP 0x0011f290
JMP 0x0011f2ae
LAB_0011f290:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x20]
LEA RSI,[0x193286]
MOV AL,0x1
CALL 0x00102370
LAB_0011f2ae:
MOV dword ptr [RSP + 0xc],0x0
LAB_0011f2b6:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x1c]
JGE 0x0011f2f4
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
LEA RSI,[0x192a12]
MOV AL,0x1
CALL 0x00102370
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0011f2b6
LAB_0011f2f4:
JMP 0x0011f2f6
LAB_0011f2f6:
LEA RAX,[0x1c54a0]
MOV dword ptr [RAX],0x20
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x34],0x0
LAB_0011f320:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* LefDefParser::lefwLayerRoutingSpacingtableTwoWidthsWidth(double, double, int, double*) */
int4
LefDefParser::lefwLayerRoutingSpacingtableTwoWidthsWidth
(double param_1,double param_2,int param_3,double *param_4)
{
int local_2c;
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if ((lefwState == 8) || (lefwState == 0x20)) {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile,"\n WIDTH %.11g",param_1);
if ((param_2 != 0.0) || (NAN(param_2))) {
fprintf(lefwFile," PRL %.11g",param_2);
}
for (local_2c = 0; local_2c < param_3; local_2c = local_2c + 1) {
fprintf(lefwFile," %.11g",param_4[local_2c]);
}
}
else {
encPrint(lefwFile,"\n WIDTH %.11g",param_1);
if ((param_2 != 0.0) || (NAN(param_2))) {
encPrint(lefwFile," PRL %.11g",param_2);
}
for (local_2c = 0; local_2c < param_3; local_2c = local_2c + 1) {
encPrint(lefwFile," %.11g",param_4[local_2c]);
}
}
lefwState = 0x20;
lefwLines = lefwLines + 1;
local_4 = 0;
}
else {
local_4 = 2;
}
return local_4;
}
| |
49,093 | svc_tasks_init | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/svc/svc_tasks.c | int32_t
svc_tasks_init (const SVC_TASK_CFG_T * pool)
{
if (pool) {
memcpy(&_svc_tasks_pool, pool, sizeof(SVC_TASK_CFG_T));
for (_svc_tasks_pool_count=0;
_svc_tasks_pool.pool[_svc_tasks_pool_count].prio;
_svc_tasks_pool_count++) ;
}
os_timer_init (&_svc_tasks_virtual_timer, svc_tasks_virtual_timer, 0) ;
os_mutex_init (&_svc_task_mutex) ;
os_event_init (&_svc_tasks_complete_event) ;
return EOK ;
} | O3 | c | svc_tasks_init:
testq %rdi, %rdi
je 0x18bdc
movq %rdi, %rsi
leaq 0x25fa6(%rip), %rax # 0x3eb60
movl $0xf, %ecx
movq %rax, %rdi
rep movsq (%rsi), %es:(%rdi)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
incl %ecx
leaq (%rcx,%rcx,2), %rdx
cmpl $0x0, (%rax,%rdx,8)
jne 0x18bca
movl %ecx, 0x25f7c(%rip) # 0x3eb58
pushq %rbp
movq %rsp, %rbp
leaq 0x25f59(%rip), %rdi # 0x3eb40
leaq -0x236(%rip), %rsi # 0x189b8
xorl %edx, %edx
callq 0x158a8
leaq 0x25f54(%rip), %rdi # 0x3eb50
callq 0x14ef0
leaq 0x25f40(%rip), %rdi # 0x3eb48
callq 0x152f1
xorl %eax, %eax
popq %rbp
retq
| svc_tasks_init:
test rdi, rdi
jz short loc_18BDC
mov rsi, rdi
lea rax, _svc_tasks_pool
mov ecx, 0Fh
mov rdi, rax
rep movsq
mov ecx, 0FFFFFFFFh
loc_18BCA:
inc ecx
lea rdx, [rcx+rcx*2]
cmp dword ptr [rax+rdx*8], 0
jnz short loc_18BCA
mov cs:_svc_tasks_pool_count, ecx
loc_18BDC:
push rbp
mov rbp, rsp
lea rdi, _svc_tasks_virtual_timer
lea rsi, svc_tasks_virtual_timer
xor edx, edx
call os_timer_init
lea rdi, _svc_task_mutex
call os_mutex_init
lea rdi, _svc_tasks_complete_event
call os_event_init
xor eax, eax
pop rbp
retn
| long long svc_tasks_init(const void *a1)
{
long long v1; // rcx
if ( a1 )
{
qmemcpy(&svc_tasks_pool, a1, 0x78uLL);
LODWORD(v1) = -1;
do
v1 = (unsigned int)(v1 + 1);
while ( *((_DWORD *)&svc_tasks_pool + 6 * v1) );
svc_tasks_pool_count = v1;
}
os_timer_init((long long *)&svc_tasks_virtual_timer, (long long)svc_tasks_virtual_timer, 0LL);
os_mutex_init(&svc_task_mutex);
os_event_init((long long *)&svc_tasks_complete_event);
return 0LL;
}
| svc_tasks_init:
TEST RDI,RDI
JZ 0x00118bdc
MOV RSI,RDI
LEA RAX,[0x13eb60]
MOV ECX,0xf
MOV RDI,RAX
MOVSQ.REP RDI,RSI
MOV ECX,0xffffffff
LAB_00118bca:
INC ECX
LEA RDX,[RCX + RCX*0x2]
CMP dword ptr [RAX + RDX*0x8],0x0
JNZ 0x00118bca
MOV dword ptr [0x0013eb58],ECX
LAB_00118bdc:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x13eb40]
LEA RSI,[0x1189b8]
XOR EDX,EDX
CALL 0x001158a8
LEA RDI,[0x13eb50]
CALL 0x00114ef0
LEA RDI,[0x13eb48]
CALL 0x001152f1
XOR EAX,EAX
POP RBP
RET
|
int8 svc_tasks_init(int8 *param_1)
{
long lVar1;
ulong uVar2;
int8 *puVar3;
if (param_1 != (int8 *)0x0) {
puVar3 = (int8 *)&_svc_tasks_pool;
for (lVar1 = 0xf; lVar1 != 0; lVar1 = lVar1 + -1) {
*puVar3 = *param_1;
param_1 = param_1 + 1;
puVar3 = puVar3 + 1;
}
uVar2 = 0xffffffff;
do {
_svc_tasks_pool_count = (int)uVar2 + 1;
uVar2 = (ulong)_svc_tasks_pool_count;
} while ((&_svc_tasks_pool)[uVar2 * 6] != 0);
}
os_timer_init(&_svc_tasks_virtual_timer,svc_tasks_virtual_timer,0);
os_mutex_init(&_svc_task_mutex);
os_event_init(&_svc_tasks_complete_event);
return 0;
}
| |
49,094 | my_getwd | eloqsql/mysys/my_getwd.c | int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
} | O3 | c | my_getwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x5079d
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x318534(%rip), %rax # 0x368c70
cmpb $0x0, (%rax)
je 0x50757
decq %rdx
leaq 0x318525(%rip), %rsi # 0x368c70
movq %r14, %rdi
callq 0x36e3c
xorl %ebx, %ebx
jmp 0x5079d
cmpq $0x1, %rdx
je 0x5079d
addl $-0x2, %edx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x24160
testb $0x10, %r15b
je 0x507aa
testq %rax, %rax
jne 0x507aa
callq 0x24060
movq %rax, %r14
movl (%rax), %r15d
callq 0x4bdfa
movl %r15d, (%rax)
movl (%r14), %edx
movl $0x4, %esi
movl $0x10, %edi
xorl %eax, %eax
callq 0x4ca8f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x5e3fc
cmpb $0x2f, -0x1(%rax)
je 0x507bd
movw $0x2f, (%rax)
leaq 0x3184ac(%rip), %rdi # 0x368c70
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rsi
jmp 0x5074e
| my_getwd:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rsi, rsi
jz short loc_5079D
mov r15, rdx
mov rdx, rsi
mov r14, rdi
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_50757
dec rdx
lea rsi, curr_dir
mov rdi, r14
loc_5074E:
call strmake
xor ebx, ebx
jmp short loc_5079D
loc_50757:
cmp rdx, 1
jz short loc_5079D
add edx, 0FFFFFFFEh
mov rdi, r14
mov rsi, rdx
call _getcwd
test r15b, 10h
jz short loc_507AA
test rax, rax
jnz short loc_507AA
call ___errno_location
mov r14, rax
mov r15d, [rax]
call _my_thread_var
mov [rax], r15d
mov edx, [r14]
mov esi, 4
mov edi, 10h
xor eax, eax
call my_error
loc_5079D:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_507AA:
mov rdi, r14
call strend
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_507BD
mov word ptr [rax], 2Fh ; '/'
loc_507BD:
lea rdi, curr_dir
mov edx, 1FFh
mov rsi, r14
jmp short loc_5074E
| long long my_getwd(_BYTE *a1, long long a2, char a3)
{
unsigned int v3; // ebx
_BYTE *v5; // r14
long long v6; // rdx
_BYTE *v7; // rsi
long long v8; // rax
unsigned int *v9; // r14
unsigned int v10; // r15d
_WORD *v12; // rax
v3 = -1;
if ( a2 )
{
v5 = a1;
if ( curr_dir[0] )
{
v6 = a2 - 1;
v7 = curr_dir;
}
else
{
if ( a2 == 1 )
return v3;
v8 = getcwd(a1, (unsigned int)(a2 - 2));
if ( (a3 & 0x10) != 0 && !v8 )
{
v9 = (unsigned int *)__errno_location(a1);
v10 = *v9;
*(_DWORD *)my_thread_var() = v10;
my_error(0x10u, 4LL, *v9);
return v3;
}
v12 = (_WORD *)strend(a1);
if ( *((_BYTE *)v12 - 1) != 47 )
*v12 = 47;
a1 = curr_dir;
v6 = 511LL;
v7 = v5;
}
strmake((long long)a1, (long long)v7, v6);
return 0;
}
return v3;
}
| my_getwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RSI,RSI
JZ 0x0015079d
MOV R15,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RAX,[0x468c70]
CMP byte ptr [RAX],0x0
JZ 0x00150757
DEC RDX
LEA RSI,[0x468c70]
MOV RDI,R14
LAB_0015074e:
CALL 0x00136e3c
XOR EBX,EBX
JMP 0x0015079d
LAB_00150757:
CMP RDX,0x1
JZ 0x0015079d
ADD EDX,-0x2
MOV RDI,R14
MOV RSI,RDX
CALL 0x00124160
TEST R15B,0x10
JZ 0x001507aa
TEST RAX,RAX
JNZ 0x001507aa
CALL 0x00124060
MOV R14,RAX
MOV R15D,dword ptr [RAX]
CALL 0x0014bdfa
MOV dword ptr [RAX],R15D
MOV EDX,dword ptr [R14]
MOV ESI,0x4
MOV EDI,0x10
XOR EAX,EAX
CALL 0x0014ca8f
LAB_0015079d:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001507aa:
MOV RDI,R14
CALL 0x0015e3fc
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x001507bd
MOV word ptr [RAX],0x2f
LAB_001507bd:
LEA RDI,[0x468c70]
MOV EDX,0x1ff
MOV RSI,R14
JMP 0x0015074e
|
int8 my_getwd(char *param_1,long param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int *piVar4;
int2 *puVar5;
char *pcVar6;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 == 1) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar5 = (int2 *)strend(param_1);
if (*(char *)((long)puVar5 + -1) != '/') {
*puVar5 = 0x2f;
}
pcVar6 = &curr_dir;
param_2 = 0x1ff;
pcVar2 = param_1;
}
else {
param_2 = param_2 + -1;
pcVar2 = &curr_dir;
pcVar6 = param_1;
}
strmake(pcVar6,pcVar2,param_2);
return 0;
}
| |
49,095 | string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&) | monkey531[P]llama/common/common.cpp | std::string string_from(const struct llama_context * ctx, const std::vector<llama_token> & tokens) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (const auto & token : tokens) {
if (!first) {
buf << ", ";
} else {
first = false;
}
auto detokenized = common_token_to_piece(ctx, token);
detokenized.erase(
std::remove_if(
detokenized.begin(),
detokenized.end(),
[](const unsigned char c) { return !std::isprint(c); }),
detokenized.end());
buf << "'" << detokenized << "'"
<< ":" << std::to_string(token);
}
buf << " ]";
return buf.str();
} | O0 | cpp | string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&):
subq $0x2a8, %rsp # imm = 0x2A8
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x2a0(%rsp)
movq %rsi, 0x298(%rsp)
movq %rdx, 0x290(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x52460
leaq 0x118(%rsp), %rdi
leaq 0xf0fd3(%rip), %rsi # 0x1ccffb
callq 0x52890
jmp 0xdc02f
movb $0x1, 0xfb(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
callq 0xe6850
movq %rax, 0xe8(%rsp)
movq 0xf0(%rsp), %rdi
callq 0xe6880
movq %rax, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xe68b0
testb $0x1, %al
jne 0xdc08f
jmp 0xdc2c8
leaq 0xe8(%rsp), %rdi
callq 0xe68f0
movq %rax, 0xd8(%rsp)
testb $0x1, 0xfb(%rsp)
jne 0xdc0df
leaq 0x118(%rsp), %rdi
leaq 0xf18f8(%rip), %rsi # 0x1cd9b5
callq 0x52890
jmp 0xdc0c4
jmp 0xdc0e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0xdc30c
movb $0x0, 0xfb(%rsp)
movq 0x298(%rsp), %rsi
movq 0xd8(%rsp), %rax
movl (%rax), %edx
leaq 0xb8(%rsp), %rdi
movl $0x1, %ecx
callq 0xdc330
jmp 0xdc10d
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x52730
movq 0x38(%rsp), %rdi
movq %rax, 0xa0(%rsp)
callq 0x527f0
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0xdc3a0
movq %rax, 0x40(%rsp)
jmp 0xdc155
movq 0x40(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xc2f90
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x527f0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xc2f90
movq 0x28(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x52670
movq %rax, 0x30(%rsp)
jmp 0xdc1c7
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0xed7e2(%rip), %rsi # 0x1c99c2
callq 0x52890
movq %rax, 0x20(%rsp)
jmp 0xdc1ec
movq 0x20(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x52450
movq %rax, 0x18(%rsp)
jmp 0xdc205
movq 0x18(%rsp), %rdi
leaq 0xed7b1(%rip), %rsi # 0x1c99c2
callq 0x52890
movq %rax, 0x10(%rsp)
jmp 0xdc21d
movq 0x10(%rsp), %rdi
leaq 0xf18d7(%rip), %rsi # 0x1cdb00
callq 0x52890
movq %rax, 0x8(%rsp)
jmp 0xdc235
movq 0xd8(%rsp), %rax
movl (%rax), %esi
leaq 0x58(%rsp), %rdi
callq 0x8f460
jmp 0xdc24b
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x52450
jmp 0xdc25c
leaq 0x58(%rsp), %rdi
callq 0x53140
leaq 0xb8(%rsp), %rdi
callq 0x53140
leaq 0xe8(%rsp), %rdi
callq 0xe6900
jmp 0xdc071
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0xdc2b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x53140
leaq 0xb8(%rsp), %rdi
callq 0x53140
jmp 0xdc30c
leaq 0x118(%rsp), %rdi
leaq 0xf0d27(%rip), %rsi # 0x1ccffe
callq 0x52890
jmp 0xdc2de
movq 0x48(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x52a40
jmp 0xdc2f2
leaq 0x108(%rsp), %rdi
callq 0x52570
movq 0x50(%rsp), %rax
addq $0x2a8, %rsp # imm = 0x2A8
retq
leaq 0x108(%rsp), %rdi
callq 0x52570
movq 0x100(%rsp), %rdi
callq 0x52990
nopw %cs:(%rax,%rax)
| _Z11string_fromB5cxx11PK13llama_contextRKSt6vectorIiSaIiEE:
sub rsp, 2A8h
mov [rsp+2A8h+var_260], rdi
mov rax, rdi
mov [rsp+2A8h+var_258], rax
mov [rsp+2A8h+var_8], rdi
mov [rsp+2A8h+var_10], rsi
mov [rsp+2A8h+var_18], rdx
lea rdi, [rsp+2A8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+2A8h+var_190]
lea rsi, asc_1CCFFB; "[ "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_DC02F:
mov [rsp+2A8h+var_1AD], 1
mov rax, [rsp+2A8h+var_18]
mov [rsp+2A8h+var_1B8], rax
mov rdi, [rsp+2A8h+var_1B8]
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rsp+2A8h+var_1C0], rax
mov rdi, [rsp+2A8h+var_1B8]
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rsp+2A8h+var_1C8], rax
loc_DC071:
lea rdi, [rsp+2A8h+var_1C0]
lea rsi, [rsp+2A8h+var_1C8]
call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&)
test al, 1
jnz short loc_DC08F
jmp loc_DC2C8
loc_DC08F:
lea rdi, [rsp+2A8h+var_1C0]
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov [rsp+2A8h+var_1D0], rax
test [rsp+2A8h+var_1AD], 1
jnz short loc_DC0DF
lea rdi, [rsp+2A8h+var_190]
lea rsi, aZuD+6; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_DC0C4:
jmp short loc_DC0E7
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
jmp loc_DC30C
loc_DC0DF:
mov [rsp+2A8h+var_1AD], 0
loc_DC0E7:
mov rsi, [rsp+2A8h+var_10]
mov rax, [rsp+2A8h+var_1D0]
mov edx, [rax]
lea rdi, [rsp+2A8h+var_1F0]
mov ecx, 1
call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool)
jmp short $+2
loc_DC10D:
lea rdi, [rsp+2A8h+var_1F0]
mov [rsp+2A8h+var_270], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov rdi, [rsp+2A8h+var_270]
mov [rsp+2A8h+var_208], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+2A8h+var_210], rax
mov rdi, [rsp+2A8h+var_208]
mov rsi, [rsp+2A8h+var_210]
call _ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZ11string_fromPK13llama_contextRKSt6vectorIiSaIiEEE3$_0ET_SJ_SJ_T0_; std::remove_if<__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,std::vector<int> const&)::$_0>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,std::vector<int> const&)::$_0)
mov [rsp+2A8h+var_268], rax
jmp short $+2
loc_DC155:
mov rax, [rsp+2A8h+var_268]
mov [rsp+2A8h+var_200], rax
lea rdi, [rsp+2A8h+var_1F8]
lea rsi, [rsp+2A8h+var_200]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
lea rdi, [rsp+2A8h+var_1F0]
mov [rsp+2A8h+var_280], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+2A8h+var_228], rax
lea rdi, [rsp+2A8h+var_220]
lea rsi, [rsp+2A8h+var_228]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rsp+2A8h+var_280]
mov rsi, [rsp+2A8h+var_1F8]
mov rdx, [rsp+2A8h+var_220]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>)
mov [rsp+2A8h+var_278], rax
jmp short $+2
loc_DC1C7:
mov rax, [rsp+2A8h+var_278]
mov [rsp+2A8h+var_230], rax
lea rdi, [rsp+2A8h+var_190]
lea rsi, aLastRead+0Dh; "'"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+2A8h+var_288], rax
jmp short $+2
loc_DC1EC:
mov rdi, [rsp+2A8h+var_288]
lea rsi, [rsp+2A8h+var_1F0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+2A8h+var_290], rax
jmp short $+2
loc_DC205:
mov rdi, [rsp+2A8h+var_290]
lea rsi, aLastRead+0Dh; "'"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+2A8h+var_298], rax
jmp short $+2
loc_DC21D:
mov rdi, [rsp+2A8h+var_298]
lea rsi, aArgumentNeedle_0+11h; ":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+2A8h+var_2A0], rax
jmp short $+2
loc_DC235:
mov rax, [rsp+2A8h+var_1D0]
mov esi, [rax]; int
lea rdi, [rsp+2A8h+var_250]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_DC24B:
mov rdi, [rsp+2A8h+var_2A0]
lea rsi, [rsp+2A8h+var_250]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_DC25C:
lea rdi, [rsp+2A8h+var_250]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+2A8h+var_1F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+2A8h+var_1C0]
call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void)
jmp loc_DC071
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
jmp short loc_DC2B9
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_DC2B9:
lea rdi, [rsp+arg_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_DC30C
loc_DC2C8:
lea rdi, [rsp+2A8h+var_190]
lea rsi, asc_1CCFFE; " ]"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_DC2DE:
mov rdi, [rsp+2A8h+var_260]
lea rsi, [rsp+2A8h+var_1A0]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_DC2F2:
lea rdi, [rsp+2A8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rsp+2A8h+var_258]
add rsp, 2A8h
retn
loc_DC30C:
lea rdi, [rsp+arg_100]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rsp+arg_F8]
call __Unwind_Resume
| long long string_from[abi:cxx11](long long a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-2A0h]
long long v5; // [rsp+10h] [rbp-298h]
long long v6; // [rsp+18h] [rbp-290h]
long long v7; // [rsp+20h] [rbp-288h]
_BYTE v8[32]; // [rsp+58h] [rbp-250h] BYREF
long long v9; // [rsp+78h] [rbp-230h]
long long v10; // [rsp+80h] [rbp-228h] BYREF
long long v11; // [rsp+88h] [rbp-220h] BYREF
long long v12; // [rsp+98h] [rbp-210h]
long long v13; // [rsp+A0h] [rbp-208h]
long long v14; // [rsp+A8h] [rbp-200h] BYREF
long long v15; // [rsp+B0h] [rbp-1F8h] BYREF
_BYTE v16[32]; // [rsp+B8h] [rbp-1F0h] BYREF
int *v17; // [rsp+D8h] [rbp-1D0h]
long long v18; // [rsp+E0h] [rbp-1C8h] BYREF
long long v19; // [rsp+E8h] [rbp-1C0h] BYREF
long long v20; // [rsp+F0h] [rbp-1B8h]
char v21; // [rsp+FBh] [rbp-1ADh]
_BYTE v22[16]; // [rsp+108h] [rbp-1A0h] BYREF
_BYTE v23[376]; // [rsp+118h] [rbp-190h] BYREF
long long v24; // [rsp+290h] [rbp-18h]
long long v25; // [rsp+298h] [rbp-10h]
long long v26; // [rsp+2A0h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v22);
std::operator<<<std::char_traits<char>>(v23, "[ ");
v21 = 1;
v20 = v24;
v19 = std::vector<int>::begin(v24);
v18 = std::vector<int>::end(v20);
while ( (__gnu_cxx::operator!=<int const*,std::vector<int>>(&v19, &v18) & 1) != 0 )
{
v17 = (int *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v19);
if ( (v21 & 1) != 0 )
v21 = 0;
else
std::operator<<<std::char_traits<char>>(v23, ", ");
common_token_to_piece[abi:cxx11](v16, v25, (unsigned int)*v17, 1LL);
v13 = std::string::begin(v16);
v12 = std::string::end(v16);
v14 = std::remove_if<__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,std::vector<int> const&)::$_0>(
v13,
v12);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v15, (long long)&v14);
v10 = std::string::end(v16);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v11, (long long)&v10);
v9 = std::string::erase(v16, v15, v11);
v7 = std::operator<<<std::char_traits<char>>(v23, "'");
v6 = std::operator<<<char>(v7, v16);
v5 = std::operator<<<std::char_traits<char>>(v6, "'");
v4 = std::operator<<<std::char_traits<char>>(v5, ":");
std::to_string((std::__cxx11 *)v8, *v17);
std::operator<<<char>(v4, v8);
std::string::~string(v8);
std::string::~string(v16);
__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v19);
}
std::operator<<<std::char_traits<char>>(v23, " ]");
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v22);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v22);
return a1;
}
| string_from[abi:cxx11]:
SUB RSP,0x2a8
MOV qword ptr [RSP + 0x48],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x2a0],RDI
MOV qword ptr [RSP + 0x298],RSI
MOV qword ptr [RSP + 0x290],RDX
LEA RDI,[RSP + 0x108]
CALL 0x00152460
LEA RDI,[RSP + 0x118]
LAB_001dc021:
LEA RSI,[0x2ccffb]
CALL 0x00152890
JMP 0x001dc02f
LAB_001dc02f:
MOV byte ptr [RSP + 0xfb],0x1
MOV RAX,qword ptr [RSP + 0x290]
MOV qword ptr [RSP + 0xf0],RAX
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x001e6850
MOV qword ptr [RSP + 0xe8],RAX
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x001e6880
MOV qword ptr [RSP + 0xe0],RAX
LAB_001dc071:
LEA RDI,[RSP + 0xe8]
LEA RSI,[RSP + 0xe0]
CALL 0x001e68b0
TEST AL,0x1
JNZ 0x001dc08f
JMP 0x001dc2c8
LAB_001dc08f:
LEA RDI,[RSP + 0xe8]
CALL 0x001e68f0
MOV qword ptr [RSP + 0xd8],RAX
TEST byte ptr [RSP + 0xfb],0x1
JNZ 0x001dc0df
LEA RDI,[RSP + 0x118]
LEA RSI,[0x2cd9b5]
CALL 0x00152890
JMP 0x001dc0c4
LAB_001dc0c4:
JMP 0x001dc0e7
LAB_001dc0df:
MOV byte ptr [RSP + 0xfb],0x0
LAB_001dc0e7:
MOV RSI,qword ptr [RSP + 0x298]
MOV RAX,qword ptr [RSP + 0xd8]
MOV EDX,dword ptr [RAX]
LEA RDI,[RSP + 0xb8]
MOV ECX,0x1
CALL 0x001dc330
JMP 0x001dc10d
LAB_001dc10d:
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00152730
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xa0],RAX
CALL 0x001527f0
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
LAB_001dc149:
CALL 0x001dc3a0
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001dc155
LAB_001dc155:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xa8],RAX
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0xa8]
CALL 0x001c2f90
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x001527f0
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x80]
CALL 0x001c2f90
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00152670
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001dc1c7
LAB_001dc1c7:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x118]
LEA RSI,[0x2c99c2]
CALL 0x00152890
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001dc1ec
LAB_001dc1ec:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0xb8]
CALL 0x00152450
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001dc205
LAB_001dc205:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2c99c2]
CALL 0x00152890
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001dc21d
LAB_001dc21d:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x2cdb00]
CALL 0x00152890
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001dc235
LAB_001dc235:
MOV RAX,qword ptr [RSP + 0xd8]
MOV ESI,dword ptr [RAX]
LEA RDI,[RSP + 0x58]
CALL 0x0018f460
JMP 0x001dc24b
LAB_001dc24b:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x58]
CALL 0x00152450
JMP 0x001dc25c
LAB_001dc25c:
LEA RDI,[RSP + 0x58]
CALL 0x00153140
LEA RDI,[RSP + 0xb8]
CALL 0x00153140
LEA RDI,[RSP + 0xe8]
CALL 0x001e6900
JMP 0x001dc071
LAB_001dc2c8:
LEA RDI,[RSP + 0x118]
LAB_001dc2d0:
LEA RSI,[0x2ccffe]
CALL 0x00152890
JMP 0x001dc2de
LAB_001dc2de:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x108]
CALL 0x00152a40
LAB_001dc2f0:
JMP 0x001dc2f2
LAB_001dc2f2:
LEA RDI,[RSP + 0x108]
CALL 0x00152570
MOV RAX,qword ptr [RSP + 0x50]
ADD RSP,0x2a8
RET
|
/* string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int> > const&) */
llama_context * string_from_abi_cxx11_(llama_context *param_1,vector *param_2)
{
bool bVar1;
ostream *poVar2;
vector<int,std::allocator<int>> *in_RDX;
__cxx11 local_250 [32];
int8 local_230;
int8 local_228;
int8 local_220 [2];
int8 local_210;
int8 local_208;
int8 local_200;
int8 local_1f8;
llama_context local_1f0 [32];
int *local_1d0;
int8 local_1c8;
int8 local_1c0;
vector<int,std::allocator<int>> *local_1b8;
byte local_1ad;
stringstream local_1a0 [16];
ostream local_190 [376];
vector<int,std::allocator<int>> *local_18;
vector *local_10;
llama_context *local_8;
local_18 = in_RDX;
local_10 = param_2;
local_8 = param_1;
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 001dc021 to 001dc10a has its CatchHandler @ 001dc0c6 */
std::operator<<(local_190,"[ ");
local_1ad = 1;
local_1b8 = local_18;
local_1c0 = std::vector<int,std::allocator<int>>::begin(local_18);
local_1c8 = std::vector<int,std::allocator<int>>::end(local_1b8);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1c0,(__normal_iterator *)&local_1c8);
if (!bVar1) break;
local_1d0 = (int *)__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>
::operator*((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>
*)&local_1c0);
if ((local_1ad & 1) == 0) {
std::operator<<(local_190,", ");
}
else {
local_1ad = 0;
}
common_token_to_piece_abi_cxx11_(local_1f0,(int)local_10,SUB41(*local_1d0,0));
local_208 = std::__cxx11::string::begin();
local_210 = std::__cxx11::string::end();
/* try { // try from 001dc149 to 001dc248 has its CatchHandler @ 001dc285 */
local_200 = std::
remove_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,string_from(llama_context_const*,std::vector<int,std::allocator<int>>const&)::__0>
(local_208,local_210);
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_1f8,
(__normal_iterator *)&local_200);
local_228 = std::__cxx11::string::end();
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)local_220,
(__normal_iterator *)&local_228);
local_230 = std::__cxx11::string::erase(local_1f0,local_1f8,local_220[0]);
poVar2 = std::operator<<(local_190,"\'");
poVar2 = std::operator<<(poVar2,(string *)local_1f0);
poVar2 = std::operator<<(poVar2,"\'");
poVar2 = std::operator<<(poVar2,":");
std::__cxx11::to_string(local_250,*local_1d0);
/* try { // try from 001dc24b to 001dc259 has its CatchHandler @ 001dc29b */
std::operator<<(poVar2,(string *)local_250);
std::__cxx11::string::~string((string *)local_250);
std::__cxx11::string::~string((string *)local_1f0);
__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_1c0);
}
/* try { // try from 001dc2d0 to 001dc2ef has its CatchHandler @ 001dc0c6 */
std::operator<<(local_190," ]");
std::__cxx11::stringstream::str();
std::__cxx11::stringstream::~stringstream(local_1a0);
return param_1;
}
| |
49,096 | my_convert | eloqsql/strings/ctype.c | uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
} | O0 | c | my_convert:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
orl 0xc(%rcx), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x7b8e3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
movq -0x38(%rbp), %r11
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %r10
movq 0x10(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x7b6d0
movl %eax, -0x4(%rbp)
jmp 0x7ba29
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x7b8f3
movl -0x14(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x7b8f9
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x40(%rbp)
movl %eax, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jb 0x7b949
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x80808080, %eax # imm = 0x80808080
cmpl $0x0, %eax
je 0x7b91a
jmp 0x7b949
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x7b902
jmp 0x7b94b
cmpl $0x0, -0x3c(%rbp)
jne 0x7b966
movq 0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7ba29
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0x7b9f7
movl -0x40(%rbp), %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x44(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
movq -0x38(%rbp), %r11
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %r10
movq 0x10(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x7b6d0
movl %eax, %ecx
movl -0x4c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x7ba29
jmp 0x7b9f9
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x7b94b
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_convert:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_38]
or eax, [rcx+0Ch]
and eax, 2000h
cmp eax, 0
jz short loc_7B8E3
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov esi, eax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rcx, [rax+30h]
mov r8, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r9d, eax
mov r11, [rbp+var_38]
mov rax, [rbp+var_38]
mov rax, [rax+0B8h]
mov r10, [rax+28h]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], r11
mov [rsp+70h+var_68], r10
mov [rsp+70h+var_60], rax
call my_convert_using_func
mov [rbp+var_4], eax
jmp loc_7BA29
loc_7B8E3:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_2C]
jnb short loc_7B8F3
mov eax, [rbp+var_14]
mov [rbp+var_48], eax
jmp short loc_7B8F9
loc_7B8F3:
mov eax, [rbp+var_2C]
mov [rbp+var_48], eax
loc_7B8F9:
mov eax, [rbp+var_48]
mov [rbp+var_40], eax
mov [rbp+var_3C], eax
loc_7B902:
cmp [rbp+var_3C], 4
jb short loc_7B949
mov rax, [rbp+var_28]
mov eax, [rax]
and eax, 80808080h
cmp eax, 0
jz short loc_7B91A
jmp short loc_7B949
loc_7B91A:
mov rax, [rbp+var_28]
mov ecx, [rax]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_3C]
sub eax, 4
mov [rbp+var_3C], eax
mov rax, [rbp+var_28]
add rax, 4
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
add rax, 4
mov [rbp+var_10], rax
jmp short loc_7B902
loc_7B949:
jmp short $+2
loc_7B94B:
cmp [rbp+var_3C], 0
jnz short loc_7B966
mov rax, [rbp+arg_0]
mov dword ptr [rax], 0
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp loc_7BA29
loc_7B966:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle loc_7B9F7
mov eax, [rbp+var_40]
sub eax, [rbp+var_3C]
mov [rbp+var_44], eax
mov ecx, [rbp+var_44]
mov eax, [rbp+var_14]
sub eax, ecx
mov [rbp+var_14], eax
mov ecx, [rbp+var_44]
mov eax, [rbp+var_2C]
sub eax, ecx
mov [rbp+var_2C], eax
mov eax, [rbp+var_44]
mov [rbp+var_4C], eax
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov esi, eax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rcx, [rax+30h]
mov r8, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r9d, eax
mov r11, [rbp+var_38]
mov rax, [rbp+var_38]
mov rax, [rax+0B8h]
mov r10, [rax+28h]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], r11
mov [rsp+70h+var_68], r10
mov [rsp+70h+var_60], rax
call my_convert_using_func
mov ecx, eax
mov eax, [rbp+var_4C]
add eax, ecx
mov [rbp+var_4], eax
jmp short loc_7BA29
loc_7B9F7:
jmp short $+2
loc_7B9F9:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov eax, [rbp+var_3C]
add eax, 0FFFFFFFFh
mov [rbp+var_3C], eax
jmp loc_7B94B
loc_7BA29:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long my_convert(
long long a1,
unsigned int a2,
long long a3,
unsigned long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
char *v7; // rax
char v8; // cl
_BYTE *v9; // rax
unsigned int v11; // [rsp+28h] [rbp-48h]
unsigned int i; // [rsp+34h] [rbp-3Ch]
_DWORD *v13; // [rsp+48h] [rbp-28h]
_DWORD *v14; // [rsp+60h] [rbp-10h]
v14 = (_DWORD *)a1;
v13 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a6 + 12) | *(_DWORD *)(a3 + 12)) & 0x2000) != 0 )
{
return (unsigned int)my_convert_using_func(
a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
}
else
{
if ( a2 >= a5 )
v11 = a5;
else
v11 = a2;
for ( i = v11; i >= 4 && (*v13 & 0x80808080) == 0; i -= 4 )
*v14++ = *v13++;
while ( 1 )
{
if ( !i )
{
*a7 = 0;
return v11;
}
if ( *(unsigned __int8 *)v13 > 0x7Fu )
break;
v7 = (char *)v13;
v13 = (_DWORD *)((char *)v13 + 1);
v8 = *v7;
v9 = v14;
v14 = (_DWORD *)((char *)v14 + 1);
*v9 = v8;
--i;
}
return (unsigned int)(my_convert_using_func(
(long long)v14,
a2 - (v11 - i),
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
(unsigned long long)v13,
a5 - (v11 - i),
a6,
*(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ v11
- i);
}
}
| my_convert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RBP + -0x38]
OR EAX,dword ptr [RCX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x0017b8e3
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RAX + 0x30]
MOV R8,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV R9D,EAX
MOV R11,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xb8]
MOV R10,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0017b6d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017ba29
LAB_0017b8e3:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x2c]
JNC 0x0017b8f3
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x48],EAX
JMP 0x0017b8f9
LAB_0017b8f3:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x48],EAX
LAB_0017b8f9:
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x40],EAX
MOV dword ptr [RBP + -0x3c],EAX
LAB_0017b902:
CMP dword ptr [RBP + -0x3c],0x4
JC 0x0017b949
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
AND EAX,0x80808080
CMP EAX,0x0
JZ 0x0017b91a
JMP 0x0017b949
LAB_0017b91a:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x4
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x4
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x4
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017b902
LAB_0017b949:
JMP 0x0017b94b
LAB_0017b94b:
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x0017b966
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017ba29
LAB_0017b966:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
JLE 0x0017b9f7
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x44],EAX
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,ECX
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RAX + 0x30]
MOV R8,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV R9D,EAX
MOV R11,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xb8]
MOV R10,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0017b6d0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017ba29
LAB_0017b9f7:
JMP 0x0017b9f9
LAB_0017b9f9:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0017b94b
LAB_0017ba29:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
uint my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6,
int4 *param_7)
{
int iVar1;
int iVar2;
uint local_50;
uint local_44;
uint *local_30;
uint *local_18;
uint local_c;
if (((*(uint *)(param_3 + 0xc) | *(uint *)(param_6 + 0xc)) & 0x2000) == 0) {
local_50 = param_5;
if (param_2 < param_5) {
local_50 = param_2;
}
local_44 = local_50;
local_18 = param_1;
for (local_30 = param_4; (3 < local_44 && ((*local_30 & 0x80808080) == 0));
local_30 = local_30 + 1) {
*local_18 = *local_30;
local_44 = local_44 - 4;
local_18 = local_18 + 1;
}
for (; local_44 != 0; local_44 = local_44 - 1) {
if (0x7f < (byte)*local_30) {
iVar1 = local_50 - local_44;
iVar2 = my_convert_using_func
(local_18,param_2 - iVar1,param_3,
*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),local_30,
param_5 - iVar1,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28)
,param_7);
return iVar1 + iVar2;
}
*(byte *)local_18 = (byte)*local_30;
local_30 = (uint *)((long)local_30 + 1);
local_18 = (uint *)((long)local_18 + 1);
}
*param_7 = 0;
local_c = local_50;
}
else {
local_c = my_convert_using_func
(param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),
param_4,param_5,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),
param_7);
}
return local_c;
}
| |
49,097 | js_symbol_keyFor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_symbol_keyFor(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSAtomStruct *p;
if (!JS_IsSymbol(argv[0]))
return JS_ThrowTypeError(ctx, "not a symbol");
p = JS_VALUE_GET_PTR(argv[0]);
if (p->atom_type != JS_ATOM_TYPE_GLOBAL_SYMBOL)
return JS_UNDEFINED;
return js_dup(JS_MKPTR(JS_TAG_STRING, p));
} | O1 | c | js_symbol_keyFor:
pushq %rbx
cmpl $-0x8, 0x8(%r8)
jne 0x7e845
movq (%r8), %rcx
movq 0x4(%rcx), %rax
shrq $0x3e, %rax
cmpl $0x2, %eax
jne 0x7e85c
incl (%rcx)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movl %ecx, %ebx
movq $-0x7, %rdx
jmp 0x7e865
leaq 0x20c7e(%rip), %rsi # 0x9f4ca
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
jmp 0x7e863
movl $0x3, %edx
xorl %ebx, %ebx
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
| js_symbol_keyFor:
push rbx
cmp dword ptr [r8+8], 0FFFFFFF8h
jnz short loc_7E845
mov rcx, [r8]
mov rax, [rcx+4]
shr rax, 3Eh
cmp eax, 2
jnz short loc_7E85C
inc dword ptr [rcx]
mov rax, 0FFFFFFFF00000000h
and rax, rcx
mov ebx, ecx
mov rdx, 0FFFFFFFFFFFFFFF9h
jmp short loc_7E865
loc_7E845:
lea rsi, aNotASymbol; "not a symbol"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
jmp short loc_7E863
loc_7E85C:
mov edx, 3
xor ebx, ebx
loc_7E863:
xor eax, eax
loc_7E865:
or rbx, rax
mov rax, rbx
pop rbx
retn
| unsigned long long js_symbol_keyFor(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
_DWORD *a13,
long long a14)
{
unsigned long long v14; // rcx
unsigned long long v15; // rax
long long v16; // rbx
char v18; // [rsp+0h] [rbp-8h]
if ( a13[2] != -8 )
{
v16 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a symbol", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v18);
LABEL_6:
v15 = 0LL;
return v15 | v16;
}
v14 = *(_QWORD *)a13;
if ( *(_QWORD *)(*(_QWORD *)a13 + 4LL) >> 62 != 2 )
{
v16 = 0LL;
goto LABEL_6;
}
++*(_DWORD *)v14;
v15 = v14 & 0xFFFFFFFF00000000LL;
v16 = (unsigned int)v14;
return v15 | v16;
}
| |||
49,098 | js_symbol_keyFor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_symbol_keyFor(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSAtomStruct *p;
if (!JS_IsSymbol(argv[0]))
return JS_ThrowTypeError(ctx, "not a symbol");
p = JS_VALUE_GET_PTR(argv[0]);
if (p->atom_type != JS_ATOM_TYPE_GLOBAL_SYMBOL)
return JS_UNDEFINED;
return js_dup(JS_MKPTR(JS_TAG_STRING, p));
} | O2 | c | js_symbol_keyFor:
pushq %rbx
cmpl $-0x8, 0x8(%r8)
jne 0x6a545
movq (%r8), %rcx
movq 0x4(%rcx), %rax
shrq $0x3e, %rax
cmpl $0x2, %eax
jne 0x6a55a
incl (%rcx)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movl %ecx, %ebx
pushq $-0x7
popq %rdx
jmp 0x6a561
leaq 0x1bece(%rip), %rsi # 0x8641a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
jmp 0x6a55f
pushq $0x3
popq %rdx
xorl %ebx, %ebx
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
| js_symbol_keyFor:
push rbx
cmp dword ptr [r8+8], 0FFFFFFF8h
jnz short loc_6A545
mov rcx, [r8]
mov rax, [rcx+4]
shr rax, 3Eh
cmp eax, 2
jnz short loc_6A55A
inc dword ptr [rcx]
mov rax, 0FFFFFFFF00000000h
and rax, rcx
mov ebx, ecx
push 0FFFFFFFFFFFFFFF9h
pop rdx
jmp short loc_6A561
loc_6A545:
lea rsi, aNotASymbol; "not a symbol"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
push 6
pop rdx
jmp short loc_6A55F
loc_6A55A:
push 3
pop rdx
xor ebx, ebx
loc_6A55F:
xor eax, eax
loc_6A561:
or rbx, rax
mov rax, rbx
pop rbx
retn
| unsigned long long js_symbol_keyFor(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
_DWORD *a13,
long long a14)
{
unsigned long long v14; // rcx
unsigned long long v15; // rax
long long v16; // rbx
char v18; // [rsp+0h] [rbp-8h]
if ( a13[2] != -8 )
{
v16 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a symbol", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v18);
LABEL_6:
v15 = 0LL;
return v15 | v16;
}
v14 = *(_QWORD *)a13;
if ( *(_QWORD *)(*(_QWORD *)a13 + 4LL) >> 62 != 2 )
{
v16 = 0LL;
goto LABEL_6;
}
++*(_DWORD *)v14;
v15 = v14 & 0xFFFFFFFF00000000LL;
v16 = (unsigned int)v14;
return v15 | v16;
}
| js_symbol_keyFor:
PUSH RBX
CMP dword ptr [R8 + 0x8],-0x8
JNZ 0x0016a545
MOV RCX,qword ptr [R8]
MOV RAX,qword ptr [RCX + 0x4]
SHR RAX,0x3e
CMP EAX,0x2
JNZ 0x0016a55a
INC dword ptr [RCX]
MOV RAX,-0x100000000
AND RAX,RCX
MOV EBX,ECX
PUSH -0x7
POP RDX
JMP 0x0016a561
LAB_0016a545:
LEA RSI,[0x18641a]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RDX
JMP 0x0016a55f
LAB_0016a55a:
PUSH 0x3
POP RDX
XOR EBX,EBX
LAB_0016a55f:
XOR EAX,EAX
LAB_0016a561:
OR RBX,RAX
MOV RAX,RBX
POP RBX
RET
|
int1 [16] js_symbol_keyFor(int8 param_1)
{
int *piVar1;
ulong uVar2;
int8 uVar3;
ulong uVar4;
int8 *in_R8;
int1 auVar5 [16];
if (*(int *)(in_R8 + 1) == -8) {
piVar1 = (int *)*in_R8;
if ((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x3e) == 2) {
*piVar1 = *piVar1 + 1;
uVar2 = (ulong)piVar1 & 0xffffffff00000000;
uVar4 = (ulong)piVar1 & 0xffffffff;
uVar3 = 0xfffffffffffffff9;
goto LAB_0016a561;
}
uVar3 = 3;
}
else {
JS_ThrowTypeError(param_1,"not a symbol");
uVar3 = 6;
}
uVar4 = 0;
uVar2 = 0;
LAB_0016a561:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = uVar4 | uVar2;
return auVar5;
}
| |
49,099 | mysql_close_memory | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void mysql_close_memory(MYSQL *mysql)
{
ma_clear_session_state(mysql);
free(mysql->host_info);
free(mysql->host);
free(mysql->user);
free(mysql->passwd);
free(mysql->db);
free(mysql->unix_socket);
free(mysql->server_version);
mysql->host_info= mysql->host= mysql->unix_socket=
mysql->server_version=mysql->user=mysql->passwd=mysql->db=0;
} | O0 | c | mysql_close_memory:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x420d0
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq 0x2b0(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq 0x2c0(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq 0x2e8(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq 0x2d0(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rax
movq $0x0, 0x2e8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2c0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2b8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2d0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2c8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2b0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2d8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_close_memory:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call ma_clear_session_state
mov rax, [rbp+var_8]
mov rdi, [rax+2D8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2B0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2B8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2C0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2E8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2C8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2D0h]
call _free
mov rax, [rbp+var_8]
mov qword ptr [rax+2E8h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2C0h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2B8h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2D0h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2C8h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2B0h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+2D8h], 0
add rsp, 10h
pop rbp
retn
| _QWORD * mysql_close_memory(_QWORD *a1)
{
_QWORD *result; // rax
ma_clear_session_state(a1);
free(a1[91]);
free(a1[86]);
free(a1[87]);
free(a1[88]);
free(a1[93]);
free(a1[89]);
free(a1[90]);
a1[93] = 0LL;
a1[88] = 0LL;
a1[87] = 0LL;
a1[90] = 0LL;
a1[89] = 0LL;
a1[86] = 0LL;
result = a1;
a1[91] = 0LL;
return result;
}
| mysql_close_memory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001420d0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2d8]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2b0]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2b8]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2c0]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2e8]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2c8]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2d0]
CALL 0x001361a0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2e8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2c0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2b8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2d0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2c8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2b0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2d8],0x0
ADD RSP,0x10
POP RBP
RET
|
void mysql_close_memory(long param_1)
{
ma_clear_session_state(param_1);
free(*(void **)(param_1 + 0x2d8));
free(*(void **)(param_1 + 0x2b0));
free(*(void **)(param_1 + 0x2b8));
free(*(void **)(param_1 + 0x2c0));
free(*(void **)(param_1 + 0x2e8));
free(*(void **)(param_1 + 0x2c8));
free(*(void **)(param_1 + 0x2d0));
*(int8 *)(param_1 + 0x2e8) = 0;
*(int8 *)(param_1 + 0x2c0) = 0;
*(int8 *)(param_1 + 0x2b8) = 0;
*(int8 *)(param_1 + 0x2d0) = 0;
*(int8 *)(param_1 + 0x2c8) = 0;
*(int8 *)(param_1 + 0x2b0) = 0;
*(int8 *)(param_1 + 0x2d8) = 0;
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.