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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,600 | js_worker_postMessage | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_postMessage(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id);
JSWorkerMessagePipe *ps;
size_t data_len, i;
uint8_t *data;
JSWorkerMessage *msg;
JSSABTab sab_tab;
if (!worker)
return JS_EXCEPTION;
data = JS_WriteObject2(ctx, &data_len, argv[0],
JS_WRITE_OBJ_SAB | JS_WRITE_OBJ_REFERENCE,
&sab_tab);
if (!data)
return JS_EXCEPTION;
msg = malloc(sizeof(*msg));
if (!msg)
goto fail;
msg->data = NULL;
msg->sab_tab = NULL;
/* must reallocate because the allocator may be different */
msg->data = malloc(data_len);
if (!msg->data)
goto fail;
memcpy(msg->data, data, data_len);
msg->data_len = data_len;
if (sab_tab.len > 0) {
msg->sab_tab = malloc(sizeof(msg->sab_tab[0]) * sab_tab.len);
if (!msg->sab_tab)
goto fail;
memcpy(msg->sab_tab, sab_tab.tab, sizeof(msg->sab_tab[0]) * sab_tab.len);
}
msg->sab_tab_len = sab_tab.len;
js_free(ctx, data);
js_free(ctx, sab_tab.tab);
/* increment the SAB reference counts */
for(i = 0; i < msg->sab_tab_len; i++) {
js_sab_dup(NULL, msg->sab_tab[i]);
}
ps = worker->send_pipe;
pthread_mutex_lock(&ps->mutex);
/* indicate that data is present */
if (list_empty(&ps->msg_queue)) {
uint8_t ch = '\0';
int ret;
for(;;) {
ret = write(ps->write_fd, &ch, 1);
if (ret == 1)
break;
if (ret < 0 && (errno != EAGAIN || errno != EINTR))
break;
}
}
list_add_tail(&msg->link, &ps->msg_queue);
pthread_mutex_unlock(&ps->mutex);
return JS_UNDEFINED;
fail:
if (msg) {
free(msg->data);
free(msg->sab_tab);
free(msg);
}
js_free(ctx, data);
js_free(ctx, sab_tab.tab);
return JS_EXCEPTION;
} | O1 | c | js_worker_postMessage:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x1f16a
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x399df
movl 0x7c(%rax), %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x269a1
movl $0x6, %r12d
testq %rax, %rax
je 0x177ff
movq %rax, %r15
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %r9
movq %r14, %rdi
movl $0xc, %r8d
callq 0x30b31
testq %rax, %rax
je 0x177ff
movq %rax, %r13
movl $0x30, %edi
callq 0xe650
testq %rax, %rax
je 0x177e7
movq %rax, %rbx
movq %r15, 0x28(%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x20(%rbx)
movq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0xe650
movq %rax, %rbp
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x177ce
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xe5a0
movq %r15, 0x18(%rbx)
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x1772f
leaq (,%r15,8), %rdi
movq %rdi, 0x20(%rsp)
callq 0xe650
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x177ce
movq 0x10(%rsp), %rsi
movq %rax, %rdi
movq 0x20(%rsp), %rdx
callq 0xe5a0
movq %r15, 0x28(%rbx)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1bf85
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1bf85
cmpq $0x0, 0x28(%rbx)
je 0x17769
xorl %eax, %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
lock
incl -0x8(%rcx)
incq %rax
cmpq 0x28(%rbx), %rax
jb 0x17754
movq 0x28(%rsp), %rax
movq 0x8(%rax), %r13
leaq 0x8(%r13), %r14
movq %r14, %rdi
callq 0xe960
leaq 0x30(%r13), %r12
cmpq %r12, 0x38(%r13)
jne 0x177ab
leaq 0xf(%rsp), %r15
movb $0x0, (%r15)
movl 0x44(%r13), %edi
movl $0x1, %edx
movq %r15, %rsi
callq 0xe1d0
cmpl $0x1, %eax
je 0x177ab
testl %eax, %eax
jns 0x17791
movq (%r12), %rax
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
movq %r12, 0x8(%rbx)
movq %rbx, (%r12)
movq %r14, %rdi
callq 0xe640
movl $0x3, %r12d
jmp 0x177ff
movq %rbp, %rdi
callq 0xe060
movq 0x20(%rbx), %rdi
callq 0xe060
movq %rbx, %rdi
callq 0xe060
movq %r14, %rdi
movq %r13, %rsi
callq 0x1bf85
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1bf85
xorl %eax, %eax
movq %r12, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_worker_postMessage:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov r15, rdx
mov r12, rsi
mov r14, rdi
call JS_GetRuntime
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
mov ecx, [rax+7Ch]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call JS_GetOpaque2
mov r12d, 6
test rax, rax
jz loc_177FF
mov r15, rax
mov rdx, [rbx]
mov rcx, [rbx+8]
lea rsi, [rsp+68h+var_38]
lea r9, [rsp+68h+var_58]
mov rdi, r14
mov r8d, 0Ch
call JS_WriteObject2
test rax, rax
jz loc_177FF
mov r13, rax
mov edi, 30h ; '0'
call _malloc
test rax, rax
jz loc_177E7
mov rbx, rax
mov [rsp+68h+var_40], r15
xor eax, eax
mov [rbx+10h], rax
mov [rbx+20h], rax
mov r15, [rsp+68h+var_38]
mov rdi, r15
call _malloc
mov rbp, rax
mov [rbx+10h], rax
test rax, rax
jz loc_177CE
mov rdi, rbp
mov rsi, r13
mov rdx, r15
call _memcpy
mov [rbx+18h], r15
mov r15, [rsp+68h+var_50]
test r15, r15
jz short loc_1772F
lea rdi, ds:0[r15*8]
mov [rsp+68h+var_48], rdi
call _malloc
mov [rbx+20h], rax
test rax, rax
jz loc_177CE
mov rsi, [rsp+68h+var_58]
mov rdi, rax
mov rdx, [rsp+68h+var_48]
call _memcpy
loc_1772F:
mov [rbx+28h], r15
mov rdi, r14
mov rsi, r13
call js_free
mov rsi, [rsp+68h+var_58]
mov rdi, r14
call js_free
cmp qword ptr [rbx+28h], 0
jz short loc_17769
xor eax, eax
loc_17754:
mov rcx, [rbx+20h]
mov rcx, [rcx+rax*8]
lock inc dword ptr [rcx-8]
inc rax
cmp rax, [rbx+28h]
jb short loc_17754
loc_17769:
mov rax, [rsp+68h+var_40]
mov r13, [rax+8]
lea r14, [r13+8]
mov rdi, r14
call _pthread_mutex_lock
lea r12, [r13+30h]
cmp [r13+38h], r12
jnz short loc_177AB
lea r15, [rsp+68h+var_59]
mov byte ptr [r15], 0
loc_17791:
mov edi, [r13+44h]
mov edx, 1
mov rsi, r15
call _write
cmp eax, 1
jz short loc_177AB
test eax, eax
jns short loc_17791
loc_177AB:
mov rax, [r12]
mov [rax+8], rbx
mov [rbx], rax
mov [rbx+8], r12
mov [r12], rbx
mov rdi, r14
call _pthread_mutex_unlock
mov r12d, 3
jmp short loc_177FF
loc_177CE:
mov rdi, rbp
call _free
mov rdi, [rbx+20h]
call _free
mov rdi, rbx
call _free
loc_177E7:
mov rdi, r14
mov rsi, r13
call js_free
mov rsi, [rsp+68h+var_58]
mov rdi, r14
call js_free
loc_177FF:
xor eax, eax
mov rdx, r12
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_worker_postMessage(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
int Runtime; // eax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // rax
long long Opaque2; // rax
long long v14; // r15
long long v15; // rax
long long v16; // r13
long long v17; // rax
_QWORD *v18; // rbx
long long v19; // r15
long long v20; // rax
long long v21; // rbp
long long v22; // r15
long long v23; // rax
unsigned long long v24; // rax
long long v25; // r13
long long *v26; // r12
int v27; // eax
long long v28; // rax
char v30; // [rsp+Fh] [rbp-59h] BYREF
long long v31; // [rsp+10h] [rbp-58h] BYREF
long long v32; // [rsp+18h] [rbp-50h]
long long v33; // [rsp+20h] [rbp-48h]
long long v34; // [rsp+28h] [rbp-40h]
long long v35[7]; // [rsp+30h] [rbp-38h] BYREF
Runtime = JS_GetRuntime(a1);
v12 = js_std_cmd(0, Runtime, v8, v9, v10, v11);
Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(v12 + 124));
if ( !Opaque2 )
return 0LL;
v14 = Opaque2;
v15 = JS_WriteObject2(a1, v35, *a5, a5[1], 12LL, &v31);
if ( !v15 )
return 0LL;
v16 = v15;
v17 = malloc(48LL);
if ( !v17 )
{
LABEL_17:
js_free(a1, v16);
js_free(a1, v31);
return 0LL;
}
v18 = (_QWORD *)v17;
v34 = v14;
*(_QWORD *)(v17 + 16) = 0LL;
*(_QWORD *)(v17 + 32) = 0LL;
v19 = v35[0];
v20 = malloc(v35[0]);
v21 = v20;
v18[2] = v20;
if ( !v20 )
{
LABEL_16:
free(v21);
free(v18[4]);
free(v18);
goto LABEL_17;
}
memcpy(v20, v16, v19);
v18[3] = v19;
v22 = v32;
if ( v32 )
{
v33 = 8 * v32;
v23 = malloc(8 * v32);
v18[4] = v23;
if ( v23 )
{
memcpy(v23, v31, v33);
goto LABEL_8;
}
goto LABEL_16;
}
LABEL_8:
v18[5] = v22;
js_free(a1, v16);
js_free(a1, v31);
if ( v18[5] )
{
v24 = 0LL;
do
_InterlockedIncrement((volatile signed __int32 *)(*(_QWORD *)(v18[4] + 8 * v24++) - 8LL));
while ( v24 < v18[5] );
}
v25 = *(_QWORD *)(v34 + 8);
pthread_mutex_lock(v25 + 8);
v26 = (long long *)(v25 + 48);
if ( *(_QWORD *)(v25 + 56) == v25 + 48 )
{
v30 = 0;
do
v27 = write(*(unsigned int *)(v25 + 68), &v30, 1LL);
while ( v27 != 1 && v27 >= 0 );
}
v28 = *v26;
*(_QWORD *)(v28 + 8) = v18;
*v18 = v28;
v18[1] = v26;
*v26 = (long long)v18;
pthread_mutex_unlock(v25 + 8);
return 0LL;
}
| js_worker_postMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x0011f16a
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x001399df
MOV ECX,dword ptr [RAX + 0x7c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x001269a1
MOV R12D,0x6
TEST RAX,RAX
JZ 0x001177ff
MOV R15,RAX
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
LEA RSI,[RSP + 0x30]
LEA R9,[RSP + 0x10]
MOV RDI,R14
MOV R8D,0xc
CALL 0x00130b31
TEST RAX,RAX
JZ 0x001177ff
MOV R13,RAX
MOV EDI,0x30
CALL 0x0010e650
TEST RAX,RAX
JZ 0x001177e7
MOV RBX,RAX
MOV qword ptr [RSP + 0x28],R15
XOR EAX,EAX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x20],RAX
MOV R15,qword ptr [RSP + 0x30]
MOV RDI,R15
CALL 0x0010e650
MOV RBP,RAX
MOV qword ptr [RBX + 0x10],RAX
TEST RAX,RAX
JZ 0x001177ce
MOV RDI,RBP
MOV RSI,R13
MOV RDX,R15
CALL 0x0010e5a0
MOV qword ptr [RBX + 0x18],R15
MOV R15,qword ptr [RSP + 0x18]
TEST R15,R15
JZ 0x0011772f
LEA RDI,[R15*0x8]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0010e650
MOV qword ptr [RBX + 0x20],RAX
TEST RAX,RAX
JZ 0x001177ce
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,RAX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0010e5a0
LAB_0011772f:
MOV qword ptr [RBX + 0x28],R15
MOV RDI,R14
MOV RSI,R13
CALL 0x0011bf85
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0011bf85
CMP qword ptr [RBX + 0x28],0x0
JZ 0x00117769
XOR EAX,EAX
LAB_00117754:
MOV RCX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RCX + RAX*0x8]
INC.LOCK dword ptr [RCX + -0x8]
INC RAX
CMP RAX,qword ptr [RBX + 0x28]
JC 0x00117754
LAB_00117769:
MOV RAX,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RAX + 0x8]
LEA R14,[R13 + 0x8]
MOV RDI,R14
CALL 0x0010e960
LEA R12,[R13 + 0x30]
CMP qword ptr [R13 + 0x38],R12
JNZ 0x001177ab
LEA R15,[RSP + 0xf]
MOV byte ptr [R15],0x0
LAB_00117791:
MOV EDI,dword ptr [R13 + 0x44]
MOV EDX,0x1
MOV RSI,R15
CALL 0x0010e1d0
CMP EAX,0x1
JZ 0x001177ab
TEST EAX,EAX
JNS 0x00117791
LAB_001177ab:
MOV RAX,qword ptr [R12]
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],R12
MOV qword ptr [R12],RBX
MOV RDI,R14
CALL 0x0010e640
MOV R12D,0x3
JMP 0x001177ff
LAB_001177ce:
MOV RDI,RBP
CALL 0x0010e060
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x0010e060
MOV RDI,RBX
CALL 0x0010e060
LAB_001177e7:
MOV RDI,R14
MOV RSI,R13
CALL 0x0011bf85
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0011bf85
LAB_001177ff:
XOR EAX,EAX
MOV RDX,R12
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_worker_postMessage
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int *piVar1;
long *plVar2;
long lVar3;
int1 auVar4 [16];
int8 uVar5;
long lVar6;
void *__src;
long *__ptr;
void *__dest;
void *__dest_00;
ssize_t sVar7;
ulong uVar8;
int1 local_59;
void *local_58;
long local_50;
size_t local_48;
long local_40;
size_t local_38;
uVar5 = JS_GetRuntime();
lVar6 = js_std_cmd(0,uVar5);
lVar6 = JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar6 + 0x7c));
uVar8 = 6;
if (lVar6 == 0) goto LAB_001177ff;
__src = (void *)JS_WriteObject2(param_1,&local_38,*param_5,param_5[1],0xc,&local_58);
if (__src == (void *)0x0) goto LAB_001177ff;
__ptr = (long *)malloc(0x30);
if (__ptr != (long *)0x0) {
__ptr[2] = 0;
__ptr[4] = 0;
local_40 = lVar6;
__dest = malloc(local_38);
__ptr[2] = (long)__dest;
if (__dest != (void *)0x0) {
memcpy(__dest,__src,local_38);
__ptr[3] = local_38;
if (local_50 != 0) {
local_48 = local_50 * 8;
__dest_00 = malloc(local_48);
__ptr[4] = (long)__dest_00;
if (__dest_00 == (void *)0x0) goto LAB_001177ce;
memcpy(__dest_00,local_58,local_48);
}
__ptr[5] = local_50;
js_free(param_1,__src);
js_free(param_1,local_58);
if (__ptr[5] != 0) {
uVar8 = 0;
do {
LOCK();
piVar1 = (int *)(*(long *)(__ptr[4] + uVar8 * 8) + -8);
*piVar1 = *piVar1 + 1;
UNLOCK();
uVar8 = uVar8 + 1;
} while (uVar8 < (ulong)__ptr[5]);
}
lVar6 = *(long *)(local_40 + 8);
pthread_mutex_lock((pthread_mutex_t *)(lVar6 + 8));
plVar2 = (long *)(lVar6 + 0x30);
if (*(long **)(lVar6 + 0x38) == plVar2) {
local_59 = 0;
do {
sVar7 = write(*(int *)(lVar6 + 0x44),&local_59,1);
if ((int)sVar7 == 1) break;
} while (-1 < (int)sVar7);
}
lVar3 = *plVar2;
*(long **)(lVar3 + 8) = __ptr;
*__ptr = lVar3;
__ptr[1] = (long)plVar2;
*plVar2 = (long)__ptr;
pthread_mutex_unlock((pthread_mutex_t *)(lVar6 + 8));
uVar8 = 3;
goto LAB_001177ff;
}
LAB_001177ce:
free(__dest);
free((void *)__ptr[4]);
free(__ptr);
}
js_free(param_1,__src);
js_free(param_1,local_58);
LAB_001177ff:
auVar4._8_8_ = 0;
auVar4._0_8_ = uVar8;
return auVar4 << 0x40;
}
| |
33,601 | js_worker_postMessage | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_postMessage(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id);
JSWorkerMessagePipe *ps;
size_t data_len, i;
uint8_t *data;
JSWorkerMessage *msg;
JSSABTab sab_tab;
if (!worker)
return JS_EXCEPTION;
data = JS_WriteObject2(ctx, &data_len, argv[0],
JS_WRITE_OBJ_SAB | JS_WRITE_OBJ_REFERENCE,
&sab_tab);
if (!data)
return JS_EXCEPTION;
msg = malloc(sizeof(*msg));
if (!msg)
goto fail;
msg->data = NULL;
msg->sab_tab = NULL;
/* must reallocate because the allocator may be different */
msg->data = malloc(data_len);
if (!msg->data)
goto fail;
memcpy(msg->data, data, data_len);
msg->data_len = data_len;
if (sab_tab.len > 0) {
msg->sab_tab = malloc(sizeof(msg->sab_tab[0]) * sab_tab.len);
if (!msg->sab_tab)
goto fail;
memcpy(msg->sab_tab, sab_tab.tab, sizeof(msg->sab_tab[0]) * sab_tab.len);
}
msg->sab_tab_len = sab_tab.len;
js_free(ctx, data);
js_free(ctx, sab_tab.tab);
/* increment the SAB reference counts */
for(i = 0; i < msg->sab_tab_len; i++) {
js_sab_dup(NULL, msg->sab_tab[i]);
}
ps = worker->send_pipe;
pthread_mutex_lock(&ps->mutex);
/* indicate that data is present */
if (list_empty(&ps->msg_queue)) {
uint8_t ch = '\0';
int ret;
for(;;) {
ret = write(ps->write_fd, &ch, 1);
if (ret == 1)
break;
if (ret < 0 && (errno != EAGAIN || errno != EINTR))
break;
}
}
list_add_tail(&msg->link, &ps->msg_queue);
pthread_mutex_unlock(&ps->mutex);
return JS_UNDEFINED;
fail:
if (msg) {
free(msg->data);
free(msg->sab_tab);
free(msg);
}
js_free(ctx, data);
js_free(ctx, sab_tab.tab);
return JS_EXCEPTION;
} | O3 | c | js_worker_postMessage:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x1f8ad
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3af34
movl 0x7c(%rax), %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x27095
movl $0x6, %r12d
testq %rax, %rax
je 0x181f4
movq %rax, %r15
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %r9
movq %r14, %rdi
movl $0xc, %r8d
callq 0x31bbe
testq %rax, %rax
je 0x181f4
movq %rax, %r13
movl $0x30, %edi
callq 0xe650
testq %rax, %rax
je 0x181dc
movq %rax, %rbx
movq %r15, 0x28(%rsp)
movq $0x0, 0x20(%rax)
movq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0xe650
movq %rax, %rbp
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x181cc
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xe5a0
movq %r15, 0x18(%rbx)
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x1812f
leaq (,%r15,8), %rdi
movq %rdi, 0x20(%rsp)
callq 0xe650
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x181cc
movq 0x10(%rsp), %rsi
movq %rax, %rdi
movq 0x20(%rsp), %rdx
callq 0xe5a0
movq %r15, 0x28(%rbx)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1c845
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1c845
testq %r15, %r15
je 0x18167
xorl %eax, %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
lock
incl -0x8(%rcx)
incq %rax
cmpq 0x28(%rbx), %rax
jb 0x18152
movq 0x28(%rsp), %rax
movq 0x8(%rax), %r13
leaq 0x8(%r13), %r14
movq %r14, %rdi
callq 0xe960
leaq 0x30(%r13), %r12
cmpq %r12, 0x38(%r13)
jne 0x181a9
leaq 0xf(%rsp), %r15
movb $0x0, (%r15)
movl 0x44(%r13), %edi
movl $0x1, %edx
movq %r15, %rsi
callq 0xe1d0
cmpl $0x1, %eax
je 0x181a9
testl %eax, %eax
jns 0x1818f
movq (%r12), %rax
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
movq %r12, 0x8(%rbx)
movq %rbx, (%r12)
movq %r14, %rdi
callq 0xe640
movl $0x3, %r12d
jmp 0x181f4
movq %rbp, %rdi
callq 0xe060
movq %rbx, %rdi
callq 0xe060
movq %r14, %rdi
movq %r13, %rsi
callq 0x1c845
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1c845
xorl %eax, %eax
movq %r12, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_worker_postMessage:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov r15, rdx
mov r12, rsi
mov r14, rdi
call JS_GetRuntime
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
mov ecx, [rax+7Ch]
mov rdi, r14
mov rsi, r12
mov rdx, r15
call JS_GetOpaque2
mov r12d, 6
test rax, rax
jz loc_181F4
mov r15, rax
mov rdx, [rbx]
mov rcx, [rbx+8]
lea rsi, [rsp+68h+var_38]
lea r9, [rsp+68h+var_58]
mov rdi, r14
mov r8d, 0Ch
call JS_WriteObject2
test rax, rax
jz loc_181F4
mov r13, rax
mov edi, 30h ; '0'
call _malloc
test rax, rax
jz loc_181DC
mov rbx, rax
mov [rsp+68h+var_40], r15
mov qword ptr [rax+20h], 0
mov r15, [rsp+68h+var_38]
mov rdi, r15
call _malloc
mov rbp, rax
mov [rbx+10h], rax
test rax, rax
jz loc_181CC
mov rdi, rbp
mov rsi, r13
mov rdx, r15
call _memcpy
mov [rbx+18h], r15
mov r15, [rsp+68h+var_50]
test r15, r15
jz short loc_1812F
lea rdi, ds:0[r15*8]
mov [rsp+68h+var_48], rdi
call _malloc
mov [rbx+20h], rax
test rax, rax
jz loc_181CC
mov rsi, [rsp+68h+var_58]
mov rdi, rax
mov rdx, [rsp+68h+var_48]
call _memcpy
loc_1812F:
mov [rbx+28h], r15
mov rdi, r14
mov rsi, r13
call js_free
mov rsi, [rsp+68h+var_58]
mov rdi, r14
call js_free
test r15, r15
jz short loc_18167
xor eax, eax
loc_18152:
mov rcx, [rbx+20h]
mov rcx, [rcx+rax*8]
lock inc dword ptr [rcx-8]
inc rax
cmp rax, [rbx+28h]
jb short loc_18152
loc_18167:
mov rax, [rsp+68h+var_40]
mov r13, [rax+8]
lea r14, [r13+8]
mov rdi, r14
call _pthread_mutex_lock
lea r12, [r13+30h]
cmp [r13+38h], r12
jnz short loc_181A9
lea r15, [rsp+68h+var_59]
mov byte ptr [r15], 0
loc_1818F:
mov edi, [r13+44h]
mov edx, 1
mov rsi, r15
call _write
cmp eax, 1
jz short loc_181A9
test eax, eax
jns short loc_1818F
loc_181A9:
mov rax, [r12]
mov [rax+8], rbx
mov [rbx], rax
mov [rbx+8], r12
mov [r12], rbx
mov rdi, r14
call _pthread_mutex_unlock
mov r12d, 3
jmp short loc_181F4
loc_181CC:
mov rdi, rbp
call _free
mov rdi, rbx
call _free
loc_181DC:
mov rdi, r14
mov rsi, r13
call js_free
mov rsi, [rsp+68h+var_58]
mov rdi, r14
call js_free
loc_181F4:
xor eax, eax
mov rdx, r12
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_worker_postMessage(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
int Runtime; // eax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // rax
long long Opaque2; // rax
long long v14; // r15
long long v15; // rax
long long v16; // r13
long long v17; // rax
_QWORD *v18; // rbx
long long v19; // r15
long long v20; // rax
long long v21; // rbp
long long v22; // r15
long long v23; // rax
unsigned long long v24; // rax
long long v25; // r13
long long *v26; // r12
int v27; // eax
long long v28; // rax
char v30; // [rsp+Fh] [rbp-59h] BYREF
long long v31; // [rsp+10h] [rbp-58h] BYREF
long long v32; // [rsp+18h] [rbp-50h]
long long v33; // [rsp+20h] [rbp-48h]
long long v34; // [rsp+28h] [rbp-40h]
long long v35[7]; // [rsp+30h] [rbp-38h] BYREF
Runtime = JS_GetRuntime(a1);
v12 = js_std_cmd(0, Runtime, v8, v9, v10, v11);
Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(v12 + 124));
if ( !Opaque2 )
return 0LL;
v14 = Opaque2;
v15 = JS_WriteObject2(a1, v35, *a5, a5[1], 12LL, &v31);
if ( !v15 )
return 0LL;
v16 = v15;
v17 = malloc(48LL);
if ( !v17 )
{
LABEL_17:
js_free(a1, v16);
js_free(a1, v31);
return 0LL;
}
v18 = (_QWORD *)v17;
v34 = v14;
*(_QWORD *)(v17 + 32) = 0LL;
v19 = v35[0];
v20 = malloc(v35[0]);
v21 = v20;
v18[2] = v20;
if ( !v20 )
{
LABEL_16:
free(v21);
free(v18);
goto LABEL_17;
}
memcpy(v20, v16, v19);
v18[3] = v19;
v22 = v32;
if ( v32 )
{
v33 = 8 * v32;
v23 = malloc(8 * v32);
v18[4] = v23;
if ( v23 )
{
memcpy(v23, v31, v33);
goto LABEL_8;
}
goto LABEL_16;
}
LABEL_8:
v18[5] = v22;
js_free(a1, v16);
js_free(a1, v31);
if ( v22 )
{
v24 = 0LL;
do
_InterlockedIncrement((volatile signed __int32 *)(*(_QWORD *)(v18[4] + 8 * v24++) - 8LL));
while ( v24 < v18[5] );
}
v25 = *(_QWORD *)(v34 + 8);
pthread_mutex_lock(v25 + 8);
v26 = (long long *)(v25 + 48);
if ( *(_QWORD *)(v25 + 56) == v25 + 48 )
{
v30 = 0;
do
v27 = write(*(unsigned int *)(v25 + 68), &v30, 1LL);
while ( v27 != 1 && v27 >= 0 );
}
v28 = *v26;
*(_QWORD *)(v28 + 8) = v18;
*v18 = v28;
v18[1] = v26;
*v26 = (long long)v18;
pthread_mutex_unlock(v25 + 8);
return 0LL;
}
| js_worker_postMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x0011f8ad
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0013af34
MOV ECX,dword ptr [RAX + 0x7c]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00127095
MOV R12D,0x6
TEST RAX,RAX
JZ 0x001181f4
MOV R15,RAX
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
LEA RSI,[RSP + 0x30]
LEA R9,[RSP + 0x10]
MOV RDI,R14
MOV R8D,0xc
CALL 0x00131bbe
TEST RAX,RAX
JZ 0x001181f4
MOV R13,RAX
MOV EDI,0x30
CALL 0x0010e650
TEST RAX,RAX
JZ 0x001181dc
MOV RBX,RAX
MOV qword ptr [RSP + 0x28],R15
MOV qword ptr [RAX + 0x20],0x0
MOV R15,qword ptr [RSP + 0x30]
MOV RDI,R15
CALL 0x0010e650
MOV RBP,RAX
MOV qword ptr [RBX + 0x10],RAX
TEST RAX,RAX
JZ 0x001181cc
MOV RDI,RBP
MOV RSI,R13
MOV RDX,R15
CALL 0x0010e5a0
MOV qword ptr [RBX + 0x18],R15
MOV R15,qword ptr [RSP + 0x18]
TEST R15,R15
JZ 0x0011812f
LEA RDI,[R15*0x8]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0010e650
MOV qword ptr [RBX + 0x20],RAX
TEST RAX,RAX
JZ 0x001181cc
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,RAX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0010e5a0
LAB_0011812f:
MOV qword ptr [RBX + 0x28],R15
MOV RDI,R14
MOV RSI,R13
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0011c845
TEST R15,R15
JZ 0x00118167
XOR EAX,EAX
LAB_00118152:
MOV RCX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RCX + RAX*0x8]
INC.LOCK dword ptr [RCX + -0x8]
INC RAX
CMP RAX,qword ptr [RBX + 0x28]
JC 0x00118152
LAB_00118167:
MOV RAX,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RAX + 0x8]
LEA R14,[R13 + 0x8]
MOV RDI,R14
CALL 0x0010e960
LEA R12,[R13 + 0x30]
CMP qword ptr [R13 + 0x38],R12
JNZ 0x001181a9
LEA R15,[RSP + 0xf]
MOV byte ptr [R15],0x0
LAB_0011818f:
MOV EDI,dword ptr [R13 + 0x44]
MOV EDX,0x1
MOV RSI,R15
CALL 0x0010e1d0
CMP EAX,0x1
JZ 0x001181a9
TEST EAX,EAX
JNS 0x0011818f
LAB_001181a9:
MOV RAX,qword ptr [R12]
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],R12
MOV qword ptr [R12],RBX
MOV RDI,R14
CALL 0x0010e640
MOV R12D,0x3
JMP 0x001181f4
LAB_001181cc:
MOV RDI,RBP
CALL 0x0010e060
MOV RDI,RBX
CALL 0x0010e060
LAB_001181dc:
MOV RDI,R14
MOV RSI,R13
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0011c845
LAB_001181f4:
XOR EAX,EAX
MOV RDX,R12
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_worker_postMessage
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int *piVar1;
long *plVar2;
long lVar3;
int1 auVar4 [16];
int8 uVar5;
long lVar6;
void *__src;
long *__ptr;
void *__dest;
void *__dest_00;
ssize_t sVar7;
ulong uVar8;
int1 local_59;
void *local_58;
long local_50;
size_t local_48;
long local_40;
size_t local_38;
uVar5 = JS_GetRuntime();
lVar6 = js_std_cmd(0,uVar5);
lVar6 = JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar6 + 0x7c));
uVar8 = 6;
if (lVar6 == 0) goto LAB_001181f4;
__src = (void *)JS_WriteObject2(param_1,&local_38,*param_5,param_5[1],0xc,&local_58);
if (__src == (void *)0x0) goto LAB_001181f4;
__ptr = (long *)malloc(0x30);
if (__ptr != (long *)0x0) {
__ptr[4] = 0;
local_40 = lVar6;
__dest = malloc(local_38);
__ptr[2] = (long)__dest;
if (__dest != (void *)0x0) {
memcpy(__dest,__src,local_38);
__ptr[3] = local_38;
if (local_50 != 0) {
local_48 = local_50 * 8;
__dest_00 = malloc(local_48);
__ptr[4] = (long)__dest_00;
if (__dest_00 == (void *)0x0) goto LAB_001181cc;
memcpy(__dest_00,local_58,local_48);
}
__ptr[5] = local_50;
js_free(param_1,__src);
js_free(param_1,local_58);
if (local_50 != 0) {
uVar8 = 0;
do {
LOCK();
piVar1 = (int *)(*(long *)(__ptr[4] + uVar8 * 8) + -8);
*piVar1 = *piVar1 + 1;
UNLOCK();
uVar8 = uVar8 + 1;
} while (uVar8 < (ulong)__ptr[5]);
}
lVar6 = *(long *)(local_40 + 8);
pthread_mutex_lock((pthread_mutex_t *)(lVar6 + 8));
plVar2 = (long *)(lVar6 + 0x30);
if (*(long **)(lVar6 + 0x38) == plVar2) {
local_59 = 0;
do {
sVar7 = write(*(int *)(lVar6 + 0x44),&local_59,1);
if ((int)sVar7 == 1) break;
} while (-1 < (int)sVar7);
}
lVar3 = *plVar2;
*(long **)(lVar3 + 8) = __ptr;
*__ptr = lVar3;
__ptr[1] = (long)plVar2;
*plVar2 = (long)__ptr;
pthread_mutex_unlock((pthread_mutex_t *)(lVar6 + 8));
uVar8 = 3;
goto LAB_001181f4;
}
LAB_001181cc:
free(__dest);
free(__ptr);
}
js_free(param_1,__src);
js_free(param_1,local_58);
LAB_001181f4:
auVar4._8_8_ = 0;
auVar4._0_8_ = uVar8;
return auVar4 << 0x40;
}
| |
33,602 | inline_mysql_cond_destroy | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_destroy(
mysql_cond_t *that)
{
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
{
PSI_COND_CALL(destroy_cond)(that->m_psi);
that->m_psi= NULL;
}
#endif
return pthread_cond_destroy(&that->m_cond);
} | O0 | c | inline_mysql_cond_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x311d4
leaq 0x1ac701(%rip), %rax # 0x1dd8b8
movq (%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x24540
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_cond_destroy:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 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_311D4
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+68h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
loc_311D4:
mov rdi, [rbp+var_8]
call _pthread_cond_destroy
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_destroy(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
{
(*((void ( **)(_QWORD))PSI_server[0] + 13))(*(_QWORD *)(a1 + 48));
*(_QWORD *)(a1 + 48) = 0LL;
}
return pthread_cond_destroy(a1);
}
| inline_mysql_cond_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001311d4
LEA RAX,[0x2dd8b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
LAB_001311d4:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124540
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_cond_destroy(pthread_cond_t *param_1)
{
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x68))(param_1[1].__align);
param_1[1].__align = 0;
}
pthread_cond_destroy(param_1);
return;
}
| |
33,603 | ftxui::ButtonOption::Simple() | Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/component_options.cpp | ButtonOption ButtonOption::Simple() {
ButtonOption option;
option.transform = [](const EntryState& s) {
auto element = text(s.label) | borderLight;
if (s.focused) {
element |= inverted;
}
return element;
};
return option;
} | O0 | cpp | ftxui::ButtonOption::Simple():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
callq 0x7a9a0
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
leaq -0xa(%rbp), %rsi
callq 0x75310
movb $0x1, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
jne 0x75304
movq -0x18(%rbp), %rdi
callq 0x7aa30
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZN5ftxui12ButtonOption6SimpleEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov rax, rdi
mov [rbp+var_20], rax
mov [rbp+var_8], rdi
mov [rbp+var_9], 0
call _ZN5ftxui12ButtonOptionC2Ev; ftxui::ButtonOption::ButtonOption(void)
mov rdi, [rbp+var_18]
add rdi, 48h ; 'H'
lea rsi, [rbp+var_A]
call _ZNSt8functionIFSt10shared_ptrIN5ftxui4NodeEERKNS1_10EntryStateEEEaSIZNS1_12ButtonOption6SimpleEvE3$_0EENSt9enable_ifIXsrNS8_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES8_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS6_EEEE5valueERS8_E4typeEOSE_
mov [rbp+var_9], 1
test [rbp+var_9], 1
jnz short loc_75304
mov rdi, [rbp+var_18]; this
call _ZN5ftxui12ButtonOptionD2Ev; ftxui::ButtonOption::~ButtonOption()
loc_75304:
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| ftxui::ButtonOption * ftxui::ButtonOption::Simple(ftxui::ButtonOption *this)
{
_BYTE v2[2]; // [rsp+16h] [rbp-Ah] BYREF
ftxui::ButtonOption *v3; // [rsp+18h] [rbp-8h]
v3 = this;
v2[1] = 0;
ftxui::ButtonOption::ButtonOption(this);
std::function<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&)>::operator=<ftxui::ButtonOption::Simple(void)::$_0>(
(char *)this + 72,
v2);
return this;
}
| Simple:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],0x0
CALL 0x0017a9a0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x48
LEA RSI,[RBP + -0xa]
CALL 0x00175310
MOV byte ptr [RBP + -0x9],0x1
TEST byte ptr [RBP + -0x9],0x1
JNZ 0x00175304
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0017aa30
LAB_00175304:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001752fb) */
/* ftxui::ButtonOption::Simple() */
ButtonOption * __thiscall ftxui::ButtonOption::Simple(ButtonOption *this)
{
__0 local_12;
int1 local_11;
ButtonOption *local_10;
local_11 = 0;
local_10 = this;
ButtonOption(this);
std::function<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&)>::operator=
((function<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&)> *)(this + 0x48),
&local_12);
return this;
}
| |
33,604 | js_parse_property_name | bluesky950520[P]quickjs/quickjs.c | static int __exception js_parse_property_name(JSParseState *s,
JSAtom *pname,
BOOL allow_method, BOOL allow_var,
BOOL allow_private)
{
int is_private = 0;
BOOL is_non_reserved_ident;
JSAtom name;
int prop_type;
prop_type = PROP_TYPE_IDENT;
if (allow_method) {
if (token_is_pseudo_keyword(s, JS_ATOM_get)
|| token_is_pseudo_keyword(s, JS_ATOM_set)) {
/* get x(), set x() */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
prop_type = PROP_TYPE_GET + (name == JS_ATOM_set);
JS_FreeAtom(s->ctx, name);
} else if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_STAR;
} else if (token_is_pseudo_keyword(s, JS_ATOM_async) &&
peek_token(s, TRUE) != '\n') {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
JS_FreeAtom(s->ctx, name);
if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_ASYNC_STAR;
} else {
prop_type = PROP_TYPE_ASYNC;
}
}
}
if (token_is_ident(s->token.val)) {
/* variable can only be a non-reserved identifier */
is_non_reserved_ident =
(s->token.val == TOK_IDENT && !s->token.u.ident.is_reserved);
/* keywords and reserved words have a valid atom */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
ident_found:
if (is_non_reserved_ident &&
prop_type == PROP_TYPE_IDENT && allow_var) {
if (!(s->token.val == ':' ||
(s->token.val == '(' && allow_method))) {
prop_type = PROP_TYPE_VAR;
}
}
} else if (s->token.val == TOK_STRING) {
name = JS_ValueToAtom(s->ctx, s->token.u.str.str);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == TOK_NUMBER) {
JSValue val;
val = s->token.u.num.val;
name = JS_ValueToAtom(s->ctx, val);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == '[') {
if (next_token(s))
goto fail;
if (js_parse_expr(s))
goto fail;
if (js_parse_expect(s, ']'))
goto fail;
name = JS_ATOM_NULL;
} else if (s->token.val == TOK_PRIVATE_NAME && allow_private) {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
is_private = PROP_TYPE_PRIVATE;
} else {
goto invalid_prop;
}
if (prop_type != PROP_TYPE_IDENT && prop_type != PROP_TYPE_VAR &&
s->token.val != '(') {
JS_FreeAtom(s->ctx, name);
invalid_prop:
js_parse_error(s, "invalid property name");
goto fail;
}
*pname = name;
return prop_type | is_private;
fail1:
JS_FreeAtom(s->ctx, name);
fail:
*pname = JS_ATOM_NULL;
return -1;
} | O1 | c | js_parse_property_name:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r13d
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
xorl %ebx, %ebx
testl %edx, %edx
je 0x65d5c
movl 0x20(%r14), %eax
cmpl $-0x7d, %eax
jne 0x65bee
cmpl $0x42, 0x38(%r14)
jne 0x65bd7
cmpl $0x0, 0x3c(%r14)
je 0x65cde
cmpl $-0x7d, %eax
jne 0x65bee
cmpl $0x43, 0x38(%r14)
jne 0x65bee
cmpl $0x0, 0x3c(%r14)
je 0x65cde
cmpl $0x2a, %eax
jne 0x65c0d
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65f4b
movl $0x4, %ebx
jmp 0x65d5c
cmpl $-0x7d, %eax
jne 0x65d5c
cmpl $0x86, 0x38(%r14)
jne 0x65d5c
cmpl $0x0, 0x3c(%r14)
jne 0x65d5c
movq %r14, %rdi
movl $0x1, %esi
callq 0x5f895
cmpl $0xa, %eax
je 0x65d5c
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x65c63
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65dff
movl %r12d, 0xc(%rsp)
movl 0x20(%r14), %eax
xorl %ebx, %ebx
movl $0x1, %r12d
cmpq $0x3d, %rax
ja 0x65c9e
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jb 0x65e0f
cmpl $0x7d, %eax
je 0x65e0f
movq (%r14), %rdi
movl %r15d, %esi
callq 0x207d8
movl $0x5, %ebx
cmpl $0x2a, 0x20(%r14)
movl 0xc(%rsp), %r12d
jne 0x65d5c
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65f4b
movl $0x6, %ebx
jmp 0x65d57
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x65cfc
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65dff
movl %r12d, 0xc(%rsp)
movl 0x20(%r14), %eax
xorl %ebx, %ebx
movl $0x1, %r12d
cmpq $0x3d, %rax
ja 0x65d37
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jb 0x65e0f
cmpl $0x7d, %eax
je 0x65e0f
xorl %ebx, %ebx
cmpl $0x43, %r15d
sete %bl
orl $0x2, %ebx
movq (%r14), %rdi
movl %r15d, %esi
callq 0x207d8
movl 0xc(%rsp), %r12d
movl 0x20(%r14), %eax
cmpl $-0x7d, %eax
setne %cl
leal 0x27(%rax), %edx
cmpl $-0x2e, %edx
setb %dl
testb %dl, %cl
je 0x65dbc
cmpl $-0x80, %eax
je 0x65e92
cmpl $0x5b, %eax
je 0x65e50
cmpl $-0x7f, %eax
jne 0x65ebe
movq (%r14), %rdi
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
callq 0x24093
testl %eax, %eax
je 0x65f4b
movl %eax, %r15d
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65dff
xorl %eax, %eax
jmp 0x65f17
movl %r12d, 0xc(%rsp)
xorl %r12d, %r12d
cmpl $-0x7d, %eax
jne 0x65dd5
xorl %r12d, %r12d
cmpl $0x0, 0x40(%r14)
sete %r12b
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x65df3
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
je 0x65e0f
movq (%r14), %rdi
movl %r15d, %esi
callq 0x207d8
jmp 0x65f4b
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
je 0x65f17
testl %r12d, %r12d
je 0x65f17
testl %ebx, %ebx
jne 0x65f17
testl %ebp, %ebp
sete %cl
movl 0x20(%r14), %edx
cmpl $0x3a, %edx
setne %sil
cmpl $0x28, %edx
setne %dl
orb %cl, %dl
andb %sil, %dl
movzbl %dl, %ebx
jmp 0x65f17
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65f4b
movq %r14, %rdi
movl $0x1, %esi
callq 0x6a9b7
testl %eax, %eax
jne 0x65f4b
movq %r14, %rdi
movl $0x5d, %esi
callq 0x637c4
testl %eax, %eax
jne 0x65f4b
xorl %r15d, %r15d
jmp 0x65db5
movq (%r14), %rdi
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
callq 0x24093
movl %eax, %r15d
testl %eax, %eax
je 0x65f03
movq %r14, %rdi
callq 0x5d1cf
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addl %eax, %eax
jmp 0x65f08
cmpl $-0x57, %eax
setne %al
testl %r13d, %r13d
sete %cl
orb %al, %cl
jne 0x65f3a
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x65eec
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x5d1cf
testl %eax, %eax
jne 0x65dff
movl $0x10, %eax
jmp 0x65f17
movl $0x4, %eax
testl %eax, %eax
je 0x65f17
cmpl $0x2, %eax
je 0x65dff
jmp 0x65f4b
cmpl $0x2, %ebx
jb 0x65f23
cmpl $0x28, 0x20(%r14)
jne 0x65f2f
movq 0x10(%rsp), %rcx
movl %r15d, (%rcx)
orl %ebx, %eax
jmp 0x65f5b
movq (%r14), %rdi
movl %r15d, %esi
callq 0x207d8
leaq 0x3b20c(%rip), %rsi # 0xa114d
movq %r14, %rdi
xorl %eax, %eax
callq 0x2fce9
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_parse_property_name:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, r8d
mov r12d, ecx
mov ebp, edx
mov [rsp+48h+var_38], rsi
mov r14, rdi
xor ebx, ebx
test edx, edx
jz loc_65D5C
mov eax, [r14+20h]
cmp eax, 0FFFFFF83h
jnz short loc_65BEE
cmp dword ptr [r14+38h], 42h ; 'B'
jnz short loc_65BD7
cmp dword ptr [r14+3Ch], 0
jz loc_65CDE
loc_65BD7:
cmp eax, 0FFFFFF83h
jnz short loc_65BEE
cmp dword ptr [r14+38h], 43h ; 'C'
jnz short loc_65BEE
cmp dword ptr [r14+3Ch], 0
jz loc_65CDE
loc_65BEE:
cmp eax, 2Ah ; '*'
jnz short loc_65C0D
mov rdi, r14
call next_token
test eax, eax
jnz loc_65F4B
mov ebx, 4
jmp loc_65D5C
loc_65C0D:
cmp eax, 0FFFFFF83h
jnz loc_65D5C
cmp dword ptr [r14+38h], 86h
jnz loc_65D5C
cmp dword ptr [r14+3Ch], 0
jnz loc_65D5C
mov rdi, r14
mov esi, 1
call peek_token
cmp eax, 0Ah
jz loc_65D5C
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_65C63
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_65C63:
mov rdi, r14
call next_token
test eax, eax
jnz loc_65DFF
mov [rsp+48h+var_3C], r12d
mov eax, [r14+20h]
xor ebx, ebx
mov r12d, 1
cmp rax, 3Dh ; '='
ja short loc_65C9E
mov rcx, 2C00110000000000h
bt rcx, rax
jb loc_65E0F
loc_65C9E:
cmp eax, 7Dh ; '}'
jz loc_65E0F
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
mov ebx, 5
cmp dword ptr [r14+20h], 2Ah ; '*'
mov r12d, [rsp+48h+var_3C]
jnz loc_65D5C
mov rdi, r14
call next_token
test eax, eax
jnz loc_65F4B
mov ebx, 6
jmp short loc_65D57
loc_65CDE:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_65CFC
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_65CFC:
mov rdi, r14
call next_token
test eax, eax
jnz loc_65DFF
mov [rsp+48h+var_3C], r12d
mov eax, [r14+20h]
xor ebx, ebx
mov r12d, 1
cmp rax, 3Dh ; '='
ja short loc_65D37
mov rcx, 2C00110000000000h
bt rcx, rax
jb loc_65E0F
loc_65D37:
cmp eax, 7Dh ; '}'
jz loc_65E0F
xor ebx, ebx
cmp r15d, 43h ; 'C'
setz bl
or ebx, 2
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_65D57:
mov r12d, [rsp+48h+var_3C]
loc_65D5C:
mov eax, [r14+20h]
cmp eax, 0FFFFFF83h
setnz cl
lea edx, [rax+27h]
cmp edx, 0FFFFFFD2h
setb dl
test cl, dl
jz short loc_65DBC
cmp eax, 0FFFFFF80h
jz loc_65E92
cmp eax, 5Bh ; '['
jz loc_65E50
cmp eax, 0FFFFFF81h
jnz loc_65EBE
mov rdi, [r14]
mov rsi, [r14+38h]
mov rdx, [r14+40h]
call JS_ValueToAtom
test eax, eax
jz loc_65F4B
mov r15d, eax
mov rdi, r14
call next_token
test eax, eax
jnz short loc_65DFF
loc_65DB5:
xor eax, eax
jmp loc_65F17
loc_65DBC:
mov [rsp+48h+var_3C], r12d
xor r12d, r12d
cmp eax, 0FFFFFF83h
jnz short loc_65DD5
xor r12d, r12d
cmp dword ptr [r14+40h], 0
setz r12b
loc_65DD5:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_65DF3
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_65DF3:
mov rdi, r14
call next_token
test eax, eax
jz short loc_65E0F
loc_65DFF:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
jmp loc_65F4B
loc_65E0F:
xor eax, eax
cmp [rsp+48h+var_3C], 0
jz loc_65F17
test r12d, r12d
jz loc_65F17
test ebx, ebx
jnz loc_65F17
test ebp, ebp
setz cl
mov edx, [r14+20h]
cmp edx, 3Ah ; ':'
setnz sil
cmp edx, 28h ; '('
setnz dl
or dl, cl
and dl, sil
movzx ebx, dl
jmp loc_65F17
loc_65E50:
mov rdi, r14
call next_token
test eax, eax
jnz loc_65F4B
mov rdi, r14
mov esi, 1
call js_parse_expr2
test eax, eax
jnz loc_65F4B
mov rdi, r14
mov esi, 5Dh ; ']'
call js_parse_expect
test eax, eax
jnz loc_65F4B
xor r15d, r15d
jmp loc_65DB5
loc_65E92:
mov rdi, [r14]
mov rsi, [r14+38h]
mov rdx, [r14+40h]
call JS_ValueToAtom
mov r15d, eax
test eax, eax
jz short loc_65F03
mov rdi, r14
call next_token
mov ecx, eax
xor eax, eax
test ecx, ecx
setnz al
add eax, eax
jmp short loc_65F08
loc_65EBE:
cmp eax, 0FFFFFFA9h
setnz al
test r13d, r13d
setz cl
or cl, al
jnz short loc_65F3A
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_65EEC
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_65EEC:
mov rdi, r14
call next_token
test eax, eax
jnz loc_65DFF
mov eax, 10h
jmp short loc_65F17
loc_65F03:
mov eax, 4
loc_65F08:
test eax, eax
jz short loc_65F17
cmp eax, 2
jz loc_65DFF
jmp short loc_65F4B
loc_65F17:
cmp ebx, 2
jb short loc_65F23
cmp dword ptr [r14+20h], 28h ; '('
jnz short loc_65F2F
loc_65F23:
mov rcx, [rsp+48h+var_38]
mov [rcx], r15d
or eax, ebx
jmp short loc_65F5B
loc_65F2F:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_65F3A:
lea rsi, aInvalidPropert_1; "invalid property name"
mov rdi, r14
xor eax, eax
call js_parse_error
loc_65F4B:
mov rax, [rsp+48h+var_38]
mov dword ptr [rax], 0
mov eax, 0FFFFFFFFh
loc_65F5B:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_parse_property_name(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // r13d
int v15; // r12d
int v16; // ebp
unsigned int v17; // ebx
int v18; // eax
long long v19; // rdx
long long v20; // r15
_DWORD *v21; // rax
unsigned long long v22; // rax
BOOL v23; // r12d
long long v24; // rcx
long long v25; // rdx
_DWORD *v26; // rax
unsigned long long v27; // rax
long long v28; // rcx
int v29; // eax
long long v30; // rdx
long long v31; // rsi
int v32; // eax
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
int v39; // eax
_DWORD *v40; // rax
long long v41; // rdx
long long v42; // rcx
long long v43; // r8
long long v44; // r9
__m128 v45; // xmm4
__m128 v46; // xmm5
long long v47; // rsi
long long v48; // rdx
long long v49; // rcx
long long v50; // r8
long long v51; // r9
__m128 v52; // xmm4
__m128 v53; // xmm5
_DWORD *v54; // rax
char v56; // [rsp+0h] [rbp-48h]
int v57; // [rsp+Ch] [rbp-3Ch]
_DWORD *v58; // [rsp+10h] [rbp-38h]
v14 = a5;
v15 = a4;
v16 = a3;
v58 = (_DWORD *)a2;
v17 = 0;
if ( !(_DWORD)a3 )
goto LABEL_31;
v18 = *((_DWORD *)a1 + 8);
if ( v18 == -125
&& (*((_DWORD *)a1 + 14) == 66 && !*((_DWORD *)a1 + 15) || *((_DWORD *)a1 + 14) == 67 && !*((_DWORD *)a1 + 15)) )
{
v20 = *((int *)a1 + 14);
if ( v20 >= 224 )
{
v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8 * v20);
++*v26;
}
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6) )
goto LABEL_43;
v57 = v15;
v27 = *((unsigned int *)a1 + 8);
v17 = 0;
v23 = 1;
if ( v27 <= 0x3D )
{
v28 = 0x2C00110000000000LL;
if ( _bittest64(&v28, v27) )
goto LABEL_44;
}
if ( (_DWORD)v27 == 125 )
goto LABEL_44;
v17 = ((_DWORD)v20 == 67) | 2;
a2 = (unsigned int)v20;
JS_FreeAtom(*a1, v20);
goto LABEL_30;
}
if ( v18 == 42 )
{
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6) )
goto LABEL_68;
v17 = 4;
goto LABEL_31;
}
if ( v18 == -125 && *((_DWORD *)a1 + 14) == 134 && !*((_DWORD *)a1 + 15) )
{
a2 = 1LL;
if ( (unsigned int)peek_token((long long)a1, 1) != 10 )
{
v20 = *((int *)a1 + 14);
if ( v20 >= 224 )
{
v21 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8 * v20);
++*v21;
}
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, 1LL, v19, a4, a5, a6) )
goto LABEL_43;
v57 = v15;
v22 = *((unsigned int *)a1 + 8);
v17 = 0;
v23 = 1;
if ( v22 <= 0x3D && (v24 = 0x2C00110000000000LL, _bittest64(&v24, v22)) || (_DWORD)v22 == 125 )
{
LABEL_44:
v39 = 0;
if ( v57 && v23 && !v17 )
v17 = *((_DWORD *)a1 + 8) != 58 && (v16 == 0 || *((_DWORD *)a1 + 8) != 40);
goto LABEL_63;
}
a2 = (unsigned int)v20;
JS_FreeAtom(*a1, v20);
v17 = 5;
v15 = v57;
if ( *((_DWORD *)a1 + 8) == 42 )
{
if ( (unsigned int)next_token(
(long long)a1,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
(unsigned int)v20,
v25,
a4,
a5,
a6) )
goto LABEL_68;
v17 = 6;
LABEL_30:
v15 = v57;
}
}
}
LABEL_31:
v29 = *((_DWORD *)a1 + 8);
LOBYTE(a4) = v29 != -125;
v30 = (unsigned int)(v29 + 39);
LOBYTE(v30) = (unsigned int)v30 < 0xFFFFFFD2;
if ( ((unsigned __int8)v30 & (unsigned __int8)a4) == 0 )
{
v57 = v15;
v23 = 0;
if ( v29 == -125 )
v23 = *((_DWORD *)a1 + 16) == 0;
v20 = *((int *)a1 + 14);
if ( v20 >= 224 )
{
v40 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8 * v20);
++*v40;
}
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v30, a4, a5, a6) )
{
LABEL_43:
JS_FreeAtom(*a1, v20);
goto LABEL_68;
}
goto LABEL_44;
}
if ( v29 == -128 )
{
v47 = a1[7];
LODWORD(v20) = JS_ValueToAtom(*a1, v47, a1[8]);
if ( (_DWORD)v20 )
v39 = 2
* ((unsigned int)next_token((long long)a1, a7, a8, a9, a10, v52, v53, a13, a14, v47, v48, v49, v50, v51) != 0);
else
v39 = 4;
if ( !v39 )
goto LABEL_63;
if ( v39 != 2 )
goto LABEL_68;
goto LABEL_43;
}
if ( v29 == 91 )
{
if ( (unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v30, a4, a5, a6)
|| (unsigned int)js_parse_expr2(a1, 1LL)
|| (unsigned int)js_parse_expect(a1, 93LL, v41, v42, v43, v44, a7, a8, a9, a10, v45, v46, a13, a14) )
{
goto LABEL_68;
}
LODWORD(v20) = 0;
goto LABEL_37;
}
if ( v29 != -127 )
{
LOBYTE(a4) = v29 != -87 || v14 == 0;
if ( (_BYTE)a4 )
{
LABEL_67:
js_parse_error(a1, (long long)"invalid property name", v30, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v56);
goto LABEL_68;
}
v20 = *((int *)a1 + 14);
if ( v20 >= 224 )
{
v54 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8 * v20);
++*v54;
}
if ( !(unsigned int)next_token((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v30, a4, a5, a6) )
{
v39 = 16;
LABEL_63:
if ( v17 < 2 || *((_DWORD *)a1 + 8) == 40 )
{
*v58 = v20;
return v17 | v39;
}
JS_FreeAtom(*a1, v20);
goto LABEL_67;
}
goto LABEL_43;
}
v31 = a1[7];
v32 = JS_ValueToAtom(*a1, v31, a1[8]);
if ( v32 )
{
LODWORD(v20) = v32;
if ( !(unsigned int)next_token((long long)a1, a7, a8, a9, a10, v37, v38, a13, a14, v31, v33, v34, v35, v36) )
{
LABEL_37:
v39 = 0;
goto LABEL_63;
}
goto LABEL_43;
}
LABEL_68:
*v58 = 0;
return 0xFFFFFFFFLL;
}
| |||
33,605 | js_parse_property_name | bluesky950520[P]quickjs/quickjs.c | static int __exception js_parse_property_name(JSParseState *s,
JSAtom *pname,
BOOL allow_method, BOOL allow_var,
BOOL allow_private)
{
int is_private = 0;
BOOL is_non_reserved_ident;
JSAtom name;
int prop_type;
prop_type = PROP_TYPE_IDENT;
if (allow_method) {
if (token_is_pseudo_keyword(s, JS_ATOM_get)
|| token_is_pseudo_keyword(s, JS_ATOM_set)) {
/* get x(), set x() */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
prop_type = PROP_TYPE_GET + (name == JS_ATOM_set);
JS_FreeAtom(s->ctx, name);
} else if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_STAR;
} else if (token_is_pseudo_keyword(s, JS_ATOM_async) &&
peek_token(s, TRUE) != '\n') {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
JS_FreeAtom(s->ctx, name);
if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_ASYNC_STAR;
} else {
prop_type = PROP_TYPE_ASYNC;
}
}
}
if (token_is_ident(s->token.val)) {
/* variable can only be a non-reserved identifier */
is_non_reserved_ident =
(s->token.val == TOK_IDENT && !s->token.u.ident.is_reserved);
/* keywords and reserved words have a valid atom */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
ident_found:
if (is_non_reserved_ident &&
prop_type == PROP_TYPE_IDENT && allow_var) {
if (!(s->token.val == ':' ||
(s->token.val == '(' && allow_method))) {
prop_type = PROP_TYPE_VAR;
}
}
} else if (s->token.val == TOK_STRING) {
name = JS_ValueToAtom(s->ctx, s->token.u.str.str);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == TOK_NUMBER) {
JSValue val;
val = s->token.u.num.val;
name = JS_ValueToAtom(s->ctx, val);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == '[') {
if (next_token(s))
goto fail;
if (js_parse_expr(s))
goto fail;
if (js_parse_expect(s, ']'))
goto fail;
name = JS_ATOM_NULL;
} else if (s->token.val == TOK_PRIVATE_NAME && allow_private) {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
is_private = PROP_TYPE_PRIVATE;
} else {
goto invalid_prop;
}
if (prop_type != PROP_TYPE_IDENT && prop_type != PROP_TYPE_VAR &&
s->token.val != '(') {
JS_FreeAtom(s->ctx, name);
invalid_prop:
js_parse_error(s, "invalid property name");
goto fail;
}
*pname = name;
return prop_type | is_private;
fail1:
JS_FreeAtom(s->ctx, name);
fail:
*pname = JS_ATOM_NULL;
return -1;
} | O2 | c | js_parse_property_name:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r13d
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
xorl %r12d, %r12d
testl %edx, %edx
je 0x56c45
pushq $0x42
popq %rsi
movq %r14, %rdi
callq 0x51b2a
testl %eax, %eax
jne 0x56bca
pushq $0x43
popq %rsi
movq %r14, %rdi
callq 0x51b2a
testl %eax, %eax
je 0x56cfb
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56be8
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ce0
movl %ebx, 0xc(%rsp)
movl 0x20(%r14), %eax
xorl %r12d, %r12d
pushq $0x1
popq %rbx
cmpq $0x3d, %rax
ja 0x56c20
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jb 0x56e16
cmpl $0x7d, %eax
je 0x56e16
xorl %r12d, %r12d
cmpl $0x43, %r15d
sete %r12b
orl $0x2, %r12d
movq (%r14), %rdi
movl %r15d, %esi
callq 0x1a995
jmp 0x56c49
movl %ebx, 0xc(%rsp)
movl 0x20(%r14), %eax
cmpl $-0x7d, %eax
setne %cl
leal 0x27(%rax), %edx
cmpl $-0x2e, %edx
setb %dl
testb %dl, %cl
je 0x56ca1
cmpl $-0x80, %eax
je 0x56c77
cmpl $0x5b, %eax
je 0x56d1f
cmpl $-0x7f, %eax
jne 0x56d4e
movq (%r14), %rdi
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
callq 0x1e0bc
testl %eax, %eax
je 0x56ceb
movl %eax, %r15d
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ce0
xorl %eax, %eax
jmp 0x56e49
xorl %ebx, %ebx
cmpl $-0x7d, %eax
jne 0x56cb2
xorl %ebx, %ebx
cmpl $0x0, 0x40(%r14)
sete %bl
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56cd0
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
je 0x56e16
movq (%r14), %rdi
movl %r15d, %esi
callq 0x1a995
movq 0x10(%rsp), %rax
andl $0x0, (%rax)
pushq $-0x1
popq %rax
jmp 0x56e61
cmpl $0x2a, 0x20(%r14)
jne 0x56d98
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ceb
movl %ebx, 0xc(%rsp)
pushq $0x4
popq %r12
jmp 0x56c49
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ceb
movq %r14, %rdi
callq 0x59f66
testl %eax, %eax
jne 0x56ceb
pushq $0x5d
popq %rsi
movq %r14, %rdi
callq 0x5523b
testl %eax, %eax
jne 0x56ceb
xorl %r15d, %r15d
jmp 0x56c9a
cmpl $-0x57, %eax
setne %al
testl %r13d, %r13d
sete %cl
orb %al, %cl
jne 0x56e7b
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56d80
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ce0
pushq $0x10
popq %rax
jmp 0x56e49
movl %ebx, 0xc(%rsp)
movq %r14, %rdi
movl $0x86, %esi
callq 0x51b2a
testl %eax, %eax
je 0x56c49
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0x51b41
cmpl $0xa, %eax
je 0x56c49
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56de5
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ce0
movl 0x20(%r14), %eax
xorl %r12d, %r12d
cmpq $0x3d, %rax
ja 0x56e91
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jae 0x56e91
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
je 0x56e49
testl %ebx, %ebx
je 0x56e49
testl %r12d, %r12d
jne 0x56e49
testl %ebp, %ebp
sete %al
movl 0x20(%r14), %ecx
cmpl $0x3a, %ecx
setne %dl
cmpl $0x28, %ecx
setne %cl
orb %al, %cl
andb %dl, %cl
movzbl %cl, %r12d
xorl %eax, %eax
jmp 0x56e56
cmpl $0x2, %r12d
jb 0x56e56
cmpl $0x28, 0x20(%r14)
jne 0x56e70
orl %r12d, %eax
movq 0x10(%rsp), %rcx
movl %r15d, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
movl %r15d, %esi
callq 0x1a995
leaq 0x31205(%rip), %rsi # 0x88087
movq %r14, %rdi
xorl %eax, %eax
callq 0x28457
jmp 0x56ceb
cmpl $0x7d, %eax
je 0x56e16
movq (%r14), %rdi
movl %r15d, %esi
callq 0x1a995
cmpl $0x2a, 0x20(%r14)
jne 0x56ebf
movq %r14, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x56ceb
pushq $0x6
jmp 0x56d18
pushq $0x5
jmp 0x56d18
| js_parse_property_name:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, r8d
mov ebx, ecx
mov ebp, edx
mov [rsp+48h+var_38], rsi
mov r14, rdi
xor r12d, r12d
test edx, edx
jz loc_56C45
push 42h ; 'B'
pop rsi
mov rdi, r14
call token_is_pseudo_keyword
test eax, eax
jnz short loc_56BCA
push 43h ; 'C'
pop rsi
mov rdi, r14
call token_is_pseudo_keyword
test eax, eax
jz loc_56CFB
loc_56BCA:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56BE8
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56BE8:
mov rdi, r14
call next_token
test eax, eax
jnz loc_56CE0
mov [rsp+48h+var_3C], ebx
mov eax, [r14+20h]
xor r12d, r12d
push 1
pop rbx
cmp rax, 3Dh ; '='
ja short loc_56C20
mov rcx, 2C00110000000000h
bt rcx, rax
jb loc_56E16
loc_56C20:
cmp eax, 7Dh ; '}'
jz loc_56E16
xor r12d, r12d
cmp r15d, 43h ; 'C'
setz r12b
or r12d, 2
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
jmp short loc_56C49
loc_56C45:
mov [rsp+48h+var_3C], ebx
loc_56C49:
mov eax, [r14+20h]
cmp eax, 0FFFFFF83h
setnz cl
lea edx, [rax+27h]
cmp edx, 0FFFFFFD2h
setb dl
test cl, dl
jz short loc_56CA1
cmp eax, 0FFFFFF80h
jz short loc_56C77
cmp eax, 5Bh ; '['
jz loc_56D1F
cmp eax, 0FFFFFF81h
jnz loc_56D4E
loc_56C77:
mov rdi, [r14]
mov rsi, [r14+38h]
mov rdx, [r14+40h]
call JS_ValueToAtom
test eax, eax
jz short loc_56CEB
mov r15d, eax
mov rdi, r14
call next_token
test eax, eax
jnz short loc_56CE0
loc_56C9A:
xor eax, eax
jmp loc_56E49
loc_56CA1:
xor ebx, ebx
cmp eax, 0FFFFFF83h
jnz short loc_56CB2
xor ebx, ebx
cmp dword ptr [r14+40h], 0
setz bl
loc_56CB2:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56CD0
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56CD0:
mov rdi, r14
call next_token
test eax, eax
jz loc_56E16
loc_56CE0:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_56CEB:
mov rax, [rsp+48h+var_38]
and dword ptr [rax], 0
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp loc_56E61
loc_56CFB:
cmp dword ptr [r14+20h], 2Ah ; '*'
jnz loc_56D98
mov rdi, r14
call next_token
test eax, eax
jnz short loc_56CEB
mov [rsp+48h+var_3C], ebx
push 4
loc_56D18:
pop r12
jmp loc_56C49
loc_56D1F:
mov rdi, r14
call next_token
test eax, eax
jnz short loc_56CEB
mov rdi, r14
call js_parse_expr
test eax, eax
jnz short loc_56CEB
push 5Dh ; ']'
pop rsi
mov rdi, r14
call js_parse_expect
test eax, eax
jnz short loc_56CEB
xor r15d, r15d
jmp loc_56C9A
loc_56D4E:
cmp eax, 0FFFFFFA9h
setnz al
test r13d, r13d
setz cl
or cl, al
jnz loc_56E7B
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56D80
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56D80:
mov rdi, r14
call next_token
test eax, eax
jnz loc_56CE0
push 10h
pop rax
jmp loc_56E49
loc_56D98:
mov [rsp+48h+var_3C], ebx
mov rdi, r14
mov esi, 86h
call token_is_pseudo_keyword
test eax, eax
jz loc_56C49
push 1
pop rbx
mov rdi, r14
mov esi, ebx
call peek_token
cmp eax, 0Ah
jz loc_56C49
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56DE5
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56DE5:
mov rdi, r14
call next_token
test eax, eax
jnz loc_56CE0
mov eax, [r14+20h]
xor r12d, r12d
cmp rax, 3Dh ; '='
ja loc_56E91
mov rcx, 2C00110000000000h
bt rcx, rax
jnb short loc_56E91
loc_56E16:
xor eax, eax
cmp [rsp+48h+var_3C], 0
jz short loc_56E49
test ebx, ebx
jz short loc_56E49
test r12d, r12d
jnz short loc_56E49
test ebp, ebp
setz al
mov ecx, [r14+20h]
cmp ecx, 3Ah ; ':'
setnz dl
cmp ecx, 28h ; '('
setnz cl
or cl, al
and cl, dl
movzx r12d, cl
xor eax, eax
jmp short loc_56E56
loc_56E49:
cmp r12d, 2
jb short loc_56E56
cmp dword ptr [r14+20h], 28h ; '('
jnz short loc_56E70
loc_56E56:
or eax, r12d
mov rcx, [rsp+48h+var_38]
mov [rcx], r15d
loc_56E61:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_56E70:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_56E7B:
lea rsi, aInvalidPropert_1; "invalid property name"
mov rdi, r14
xor eax, eax
call js_parse_error
jmp loc_56CEB
loc_56E91:
cmp eax, 7Dh ; '}'
jz short loc_56E16
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
cmp dword ptr [r14+20h], 2Ah ; '*'
jnz short loc_56EBF
mov rdi, r14
call next_token
test eax, eax
jnz loc_56CEB
push 6
jmp loc_56D18
loc_56EBF:
push 5
jmp loc_56D18
| long long js_parse_property_name(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // r13d
int v15; // ebx
unsigned int v17; // r12d
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // r15
_DWORD *v25; // rax
unsigned long long v26; // rax
BOOL v27; // ebx
long long v28; // rcx
int v29; // eax
long long v30; // rdx
long long v31; // rsi
int v32; // eax
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
int v39; // eax
_DWORD *v40; // rax
long long result; // rax
long long v42; // rdx
long long v43; // rcx
long long v44; // r8
long long v45; // r9
__m128 v46; // xmm4
__m128 v47; // xmm5
_DWORD *v48; // rax
long long v49; // rdx
_DWORD *v50; // rax
unsigned long long v51; // rax
long long v52; // rcx
long long v53; // rdx
int v54; // [rsp-8h] [rbp-50h]
char v55; // [rsp+0h] [rbp-48h]
int v56; // [rsp+Ch] [rbp-3Ch]
_DWORD *v57; // [rsp+10h] [rbp-38h]
v14 = a5;
v15 = a4;
v57 = (_DWORD *)a2;
v17 = 0;
if ( a3 )
{
a2 = 66LL;
if ( token_is_pseudo_keyword((_DWORD *)a1, 66) || (a2 = 67LL, token_is_pseudo_keyword((_DWORD *)a1, 67)) )
{
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v25 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v25;
}
if ( (unsigned int)next_token(a1, a2, v18, a7, a8, a9, a10, v22, v23, a13, a14, v19, v20, v21) )
goto LABEL_24;
v56 = v15;
v26 = *(unsigned int *)(a1 + 32);
v17 = 0;
v27 = 1;
if ( v26 <= 0x3D )
{
v28 = 0x2C00110000000000LL;
if ( _bittest64(&v28, v26) )
goto LABEL_46;
}
if ( (_DWORD)v26 == 125 )
goto LABEL_46;
v17 = ((_DWORD)v24 == 67) | 2;
a2 = (unsigned int)v24;
JS_FreeAtom(*(_QWORD *)a1, v24);
}
else
{
if ( *(_DWORD *)(a1 + 32) == 42 )
{
if ( (unsigned int)next_token(a1, 67LL, v18, a7, a8, a9, a10, v22, v23, a13, a14, v19, v20, v21) )
goto LABEL_25;
v56 = v15;
v54 = 4;
}
else
{
v56 = v15;
a2 = 134LL;
if ( !token_is_pseudo_keyword((_DWORD *)a1, 134) )
goto LABEL_12;
v27 = 1;
a2 = 1LL;
if ( (unsigned int)peek_token(a1, 1) == 10 )
goto LABEL_12;
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v50 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v50;
}
if ( (unsigned int)next_token(a1, 1LL, v49, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_24;
v51 = *(unsigned int *)(a1 + 32);
v17 = 0;
if ( v51 <= 0x3D )
{
v52 = 0x2C00110000000000LL;
if ( _bittest64(&v52, v51) )
goto LABEL_46;
}
if ( (_DWORD)v51 == 125 )
goto LABEL_46;
a2 = (unsigned int)v24;
JS_FreeAtom(*(_QWORD *)a1, v24);
if ( *(_DWORD *)(a1 + 32) == 42 )
{
if ( (unsigned int)next_token(a1, (unsigned int)v24, v53, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_25;
v54 = 6;
}
else
{
v54 = 5;
}
}
v17 = v54;
}
}
else
{
v56 = a4;
}
LABEL_12:
v29 = *(_DWORD *)(a1 + 32);
LOBYTE(a4) = v29 != -125;
v30 = (unsigned int)(v29 + 39);
LOBYTE(v30) = (unsigned int)v30 < 0xFFFFFFD2;
if ( ((unsigned __int8)v30 & (unsigned __int8)a4) != 0 )
{
switch ( v29 )
{
case -128:
goto LABEL_16;
case 91:
if ( (unsigned int)next_token(a1, a2, v30, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6)
|| (unsigned int)js_parse_expr(a1)
|| (unsigned int)js_parse_expect(a1, 93LL, v42, v43, v44, v45, a7, a8, a9, a10, v46, v47, a13, a14) )
{
goto LABEL_25;
}
LODWORD(v24) = 0;
goto LABEL_18;
case -127:
LABEL_16:
v31 = *(_QWORD *)(a1 + 56);
v32 = JS_ValueToAtom(*(_QWORD *)a1, v31, *(_QWORD *)(a1 + 64));
if ( !v32 )
{
LABEL_25:
*v57 = 0;
return -1LL;
}
LODWORD(v24) = v32;
if ( !(unsigned int)next_token(a1, v31, v33, a7, a8, a9, a10, v37, v38, a13, a14, v34, v35, v36) )
{
LABEL_18:
v39 = 0;
goto LABEL_50;
}
break;
default:
LOBYTE(a4) = v29 != -87 || v14 == 0;
if ( (_BYTE)a4 )
{
LABEL_54:
js_parse_error(
(long long *)a1,
(long long)"invalid property name",
v30,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v55);
goto LABEL_25;
}
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v48 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v48;
}
if ( !(unsigned int)next_token(a1, a2, v30, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
{
v39 = 16;
LABEL_50:
if ( v17 < 2 || *(_DWORD *)(a1 + 32) == 40 )
goto LABEL_52;
JS_FreeAtom(*(_QWORD *)a1, v24);
goto LABEL_54;
}
break;
}
LABEL_24:
JS_FreeAtom(*(_QWORD *)a1, v24);
goto LABEL_25;
}
v27 = 0;
if ( v29 == -125 )
v27 = *(_DWORD *)(a1 + 64) == 0;
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v40 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v40;
}
if ( (unsigned int)next_token(a1, a2, v30, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_24;
LABEL_46:
v39 = 0;
if ( !v56 || !v27 || v17 )
goto LABEL_50;
v17 = *(_DWORD *)(a1 + 32) != 58 && (a3 == 0 || *(_DWORD *)(a1 + 32) != 40);
v39 = 0;
LABEL_52:
result = v17 | v39;
*v57 = v24;
return result;
}
| js_parse_property_name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13D,R8D
MOV EBX,ECX
MOV EBP,EDX
MOV qword ptr [RSP + 0x10],RSI
MOV R14,RDI
XOR R12D,R12D
TEST EDX,EDX
JZ 0x00156c45
PUSH 0x42
POP RSI
MOV RDI,R14
CALL 0x00151b2a
TEST EAX,EAX
JNZ 0x00156bca
PUSH 0x43
POP RSI
MOV RDI,R14
CALL 0x00151b2a
TEST EAX,EAX
JZ 0x00156cfb
LAB_00156bca:
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156be8
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156be8:
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ce0
MOV dword ptr [RSP + 0xc],EBX
MOV EAX,dword ptr [R14 + 0x20]
XOR R12D,R12D
PUSH 0x1
POP RBX
CMP RAX,0x3d
JA 0x00156c20
MOV RCX,0x2c00110000000000
BT RCX,RAX
JC 0x00156e16
LAB_00156c20:
CMP EAX,0x7d
JZ 0x00156e16
XOR R12D,R12D
CMP R15D,0x43
SETZ R12B
OR R12D,0x2
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x0011a995
JMP 0x00156c49
LAB_00156c45:
MOV dword ptr [RSP + 0xc],EBX
LAB_00156c49:
MOV EAX,dword ptr [R14 + 0x20]
CMP EAX,-0x7d
SETNZ CL
LEA EDX,[RAX + 0x27]
CMP EDX,-0x2e
SETC DL
TEST CL,DL
JZ 0x00156ca1
CMP EAX,-0x80
JZ 0x00156c77
CMP EAX,0x5b
JZ 0x00156d1f
CMP EAX,-0x7f
JNZ 0x00156d4e
LAB_00156c77:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x38]
MOV RDX,qword ptr [R14 + 0x40]
CALL 0x0011e0bc
TEST EAX,EAX
JZ 0x00156ceb
MOV R15D,EAX
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ce0
LAB_00156c9a:
XOR EAX,EAX
JMP 0x00156e49
LAB_00156ca1:
XOR EBX,EBX
CMP EAX,-0x7d
JNZ 0x00156cb2
XOR EBX,EBX
CMP dword ptr [R14 + 0x40],0x0
SETZ BL
LAB_00156cb2:
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156cd0
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156cd0:
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JZ 0x00156e16
LAB_00156ce0:
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x0011a995
LAB_00156ceb:
MOV RAX,qword ptr [RSP + 0x10]
AND dword ptr [RAX],0x0
PUSH -0x1
POP RAX
JMP 0x00156e61
LAB_00156cfb:
CMP dword ptr [R14 + 0x20],0x2a
JNZ 0x00156d98
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ceb
MOV dword ptr [RSP + 0xc],EBX
PUSH 0x4
LAB_00156d18:
POP R12
JMP 0x00156c49
LAB_00156d1f:
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ceb
MOV RDI,R14
CALL 0x00159f66
TEST EAX,EAX
JNZ 0x00156ceb
PUSH 0x5d
POP RSI
MOV RDI,R14
CALL 0x0015523b
TEST EAX,EAX
JNZ 0x00156ceb
XOR R15D,R15D
JMP 0x00156c9a
LAB_00156d4e:
CMP EAX,-0x57
SETNZ AL
TEST R13D,R13D
SETZ CL
OR CL,AL
JNZ 0x00156e7b
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156d80
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156d80:
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ce0
PUSH 0x10
POP RAX
JMP 0x00156e49
LAB_00156d98:
MOV dword ptr [RSP + 0xc],EBX
MOV RDI,R14
MOV ESI,0x86
CALL 0x00151b2a
TEST EAX,EAX
JZ 0x00156c49
PUSH 0x1
POP RBX
MOV RDI,R14
MOV ESI,EBX
CALL 0x00151b41
CMP EAX,0xa
JZ 0x00156c49
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156de5
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156de5:
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ce0
MOV EAX,dword ptr [R14 + 0x20]
XOR R12D,R12D
CMP RAX,0x3d
JA 0x00156e91
MOV RCX,0x2c00110000000000
BT RCX,RAX
JNC 0x00156e91
LAB_00156e16:
XOR EAX,EAX
CMP dword ptr [RSP + 0xc],0x0
JZ 0x00156e49
TEST EBX,EBX
JZ 0x00156e49
TEST R12D,R12D
JNZ 0x00156e49
TEST EBP,EBP
SETZ AL
MOV ECX,dword ptr [R14 + 0x20]
CMP ECX,0x3a
SETNZ DL
CMP ECX,0x28
SETNZ CL
OR CL,AL
AND CL,DL
MOVZX R12D,CL
XOR EAX,EAX
JMP 0x00156e56
LAB_00156e49:
CMP R12D,0x2
JC 0x00156e56
CMP dword ptr [R14 + 0x20],0x28
JNZ 0x00156e70
LAB_00156e56:
OR EAX,R12D
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],R15D
LAB_00156e61:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00156e70:
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x0011a995
LAB_00156e7b:
LEA RSI,[0x188087]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00128457
JMP 0x00156ceb
LAB_00156e91:
CMP EAX,0x7d
JZ 0x00156e16
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x0011a995
CMP dword ptr [R14 + 0x20],0x2a
JNZ 0x00156ebf
MOV RDI,R14
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x00156ceb
PUSH 0x6
JMP 0x00156d18
LAB_00156ebf:
PUSH 0x5
JMP 0x00156d18
|
ulong js_parse_property_name(long *param_1,int4 *param_2,int param_3,int param_4,int param_5)
{
int *piVar1;
long lVar2;
int iVar3;
int iVar4;
uint uVar5;
uint uVar6;
int4 uVar7;
ulong uVar8;
bool bVar9;
uVar6 = 0;
if (param_3 == 0) goto LAB_00156c49;
iVar3 = token_is_pseudo_keyword(param_1,0x42);
if ((iVar3 == 0) && (iVar3 = token_is_pseudo_keyword(param_1,0x43), iVar3 == 0)) {
if ((int)param_1[4] == 0x2a) {
iVar3 = next_token(param_1);
if (iVar3 == 0) {
uVar6 = 4;
goto LAB_00156c49;
}
}
else {
iVar3 = token_is_pseudo_keyword(param_1,0x86);
uVar6 = 0;
if (iVar3 != 0) {
bVar9 = true;
iVar3 = peek_token(param_1,1);
uVar6 = 0;
if (iVar3 != 10) {
lVar2 = param_1[7];
uVar8 = (ulong)(int)lVar2;
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156ce0;
uVar5 = *(uint *)(param_1 + 4);
if ((((ulong)uVar5 < 0x3e) &&
(uVar6 = 0, (0x2c00110000000000U >> ((ulong)uVar5 & 0x3f) & 1) != 0)) ||
(uVar6 = 0, uVar5 == 0x7d)) goto LAB_00156e16;
JS_FreeAtom(*param_1,(int)lVar2);
if ((int)param_1[4] == 0x2a) {
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156ceb;
uVar6 = 6;
}
else {
uVar6 = 5;
}
}
}
LAB_00156c49:
iVar3 = (int)param_1[4];
if (iVar3 == -0x7d || 0xffffffd1 < iVar3 + 0x27U) {
bVar9 = false;
if (iVar3 == -0x7d) {
bVar9 = (int)param_1[8] == 0;
}
uVar8 = (ulong)(int)param_1[7];
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (iVar3 == 0) goto LAB_00156e16;
goto LAB_00156ce0;
}
if (iVar3 == -0x80) {
LAB_00156c77:
uVar5 = JS_ValueToAtom(*param_1,param_1[7],param_1[8]);
if (uVar5 == 0) goto LAB_00156ceb;
uVar8 = (ulong)uVar5;
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156ce0;
LAB_00156c9a:
uVar5 = 0;
goto LAB_00156e49;
}
if (iVar3 == 0x5b) {
iVar3 = next_token(param_1);
if (((iVar3 != 0) || (iVar3 = js_parse_expr(param_1), iVar3 != 0)) ||
(iVar3 = js_parse_expect(param_1,0x5d), iVar3 != 0)) goto LAB_00156ceb;
uVar8 = 0;
goto LAB_00156c9a;
}
if (iVar3 == -0x7f) goto LAB_00156c77;
if (param_5 != 0 && iVar3 == -0x57) {
uVar8 = (ulong)(int)param_1[7];
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156ce0;
uVar5 = 0x10;
goto LAB_00156e49;
}
LAB_00156e7b:
js_parse_error(param_1,"invalid property name");
}
LAB_00156ceb:
*param_2 = 0;
uVar8 = 0xffffffffffffffff;
}
else {
iVar3 = (int)param_1[7];
uVar8 = (ulong)iVar3;
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) {
LAB_00156ce0:
JS_FreeAtom(*param_1,uVar8 & 0xffffffff);
goto LAB_00156ceb;
}
uVar5 = *(uint *)(param_1 + 4);
bVar9 = true;
uVar6 = 0;
if (((0x3d < (ulong)uVar5) || ((0x2c00110000000000U >> ((ulong)uVar5 & 0x3f) & 1) == 0)) &&
(uVar5 != 0x7d)) {
JS_FreeAtom(*param_1,iVar3);
uVar6 = iVar3 == 0x43 | 2;
goto LAB_00156c49;
}
LAB_00156e16:
uVar7 = (int4)uVar8;
uVar5 = 0;
if (((param_4 == 0) || (!bVar9)) || (uVar6 != 0)) {
LAB_00156e49:
uVar7 = (int4)uVar8;
if ((1 < uVar6) && ((int)param_1[4] != 0x28)) {
JS_FreeAtom(*param_1,uVar8 & 0xffffffff);
goto LAB_00156e7b;
}
}
else {
uVar6 = (uint)(((int)param_1[4] != 0x28 || param_3 == 0) && (int)param_1[4] != 0x3a);
uVar5 = 0;
}
uVar8 = (ulong)(uVar5 | uVar6);
*param_2 = uVar7;
}
return uVar8;
}
| |
33,606 | my_snprintf | eloqsql/strings/my_vsnprintf.c | size_t my_snprintf(char* to, size_t n, const char* fmt, ...)
{
size_t result;
va_list args;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
} | O0 | c | my_snprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0xc577b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x18, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0xc5700
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_snprintf:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_C577B
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_C577B:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_D8], rcx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 18h
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rcx, [rbp+var_40]
call my_vsnprintf
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 0F0h
pop rbp
retn
| _BYTE * my_snprintf(
_BYTE *a1,
long long a2,
char *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-F0h] BYREF
long long v17; // [rsp+18h] [rbp-D8h]
long long v18; // [rsp+20h] [rbp-D0h]
long long v19; // [rsp+28h] [rbp-C8h]
__m128 v20; // [rsp+30h] [rbp-C0h]
__m128 v21; // [rsp+40h] [rbp-B0h]
__m128 v22; // [rsp+50h] [rbp-A0h]
__m128 v23; // [rsp+60h] [rbp-90h]
__m128 v24; // [rsp+70h] [rbp-80h]
__m128 v25; // [rsp+80h] [rbp-70h]
__m128 v26; // [rsp+90h] [rbp-60h]
__m128 v27; // [rsp+A0h] [rbp-50h]
int v28[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v29; // [rsp+B8h] [rbp-38h]
char *v30; // [rsp+C0h] [rbp-30h]
char *v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
_BYTE *v33; // [rsp+E8h] [rbp-8h]
v20 = a7;
v21 = a8;
v22 = a9;
v23 = a10;
v24 = a11;
v25 = a12;
v26 = a13;
v27 = a14;
v19 = a6;
v18 = a5;
v17 = a4;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = &v16;
v29 = &a15;
v28[1] = 48;
v28[0] = 24;
return my_vsnprintf(a1, a2, a3, v28);
}
| my_snprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x001c577b
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_001c577b:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0xd8],RCX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x18
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RCX,[RBP + -0x40]
CALL 0x001c5700
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [24];
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x18;
local_e0 = param_12;
local_d8 = param_13;
local_d0 = param_14;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf(param_9,param_10,param_11,&local_48);
return uVar1;
}
| |
33,607 | my_wildcmp_mb_impl | eloqsql/strings/ctype-mb.c | static
int my_wildcmp_mb_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
int l;
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if ((l = my_ismbchar(cs, wildstr, wildend)))
{
if (str+l > str_end || memcmp(str, wildstr, l) != 0)
return 1;
str += l;
wildstr += l;
}
else
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return (result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
const char* mb = wildstr;
int mb_len=0;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return (-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
mb=wildstr;
mb_len= my_ismbchar(cs, wildstr, wildend);
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
for (;;)
{
if (str >= str_end)
return -1;
if (mb_len)
{
if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0)
{
str += mb_len;
break;
}
}
else if (!my_ismbchar(cs, str, str_end) &&
likeconv(cs,*str) == cmp)
{
str++;
break;
}
INC_PTR(cs,str, str_end);
}
{
int tmp=my_wildcmp_mb_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return (tmp);
}
} while (str != str_end);
return(-1);
}
}
return (str != str_end ? 1 : 0);
} | O3 | c | my_wildcmp_mb_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x44(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, %r15
movq %rdx, -0x58(%rbp)
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
movl 0x20(%rbp), %eax
movq %rax, -0x68(%rbp)
leaq 0x338650(%rip), %rax # 0x36f3b0
movq (%rax), %rax
testq %rax, %rax
je 0x36d7b
movl 0x20(%rbp), %edi
callq *%rax
movl $0x1, %r14d
testl %eax, %eax
jne 0x36f16
movl 0x10(%rbp), %edi
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq -0x40(%rbp), %r15
je 0x36f08
movb (%r15), %al
movsbl %al, %ecx
movl 0x18(%rbp), %edx
cmpl %edx, %ecx
sete %sil
cmpl %edi, %ecx
sete %dl
orb %dl, %sil
movq -0x58(%rbp), %r13
je 0x36e44
testb %dl, %dl
je 0x36e31
incq %r15
movq %r15, %rax
movq -0x38(%rbp), %rbx
cmpq %r13, %r12
je 0x36f16
movq %rax, %r15
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0x36e0c
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %r12
cmpq -0x40(%rbp), %r15
movl 0x10(%rbp), %edi
jae 0x36e24
movsbl (%r15), %ecx
leaq 0x1(%r15), %rax
cmpl %edi, %ecx
je 0x36dbd
cmpq -0x40(%rbp), %r15
je 0x36f0c
movb (%r15), %al
movsbl %al, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0x36d84
jmp 0x36f28
leaq 0x1(%r15), %rbx
movq -0x40(%rbp), %rdx
cmpq %rdx, %rbx
cmoveq %r15, %rbx
cmpl -0x44(%rbp), %ecx
cmovneq %r15, %rbx
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x36ea8
movl $0x1, %r14d
cmpq %r13, %r12
je 0x36f16
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb (%rax,%rcx), %cl
movzbl (%r12), %edx
cmpb (%rax,%rdx), %cl
movl 0x10(%rbp), %edi
jne 0x36f16
incq %rbx
incq %r12
movq %rbx, %r15
jmp 0x36edb
movl %eax, %r15d
movq %r13, %rax
leaq (%r12,%r15), %r13
movl $0x1, %r14d
cmpq %rax, %r13
ja 0x36f16
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x242e0
testl %eax, %eax
movl 0x10(%rbp), %edi
jne 0x36f16
addq %r15, %rbx
movq %rbx, %r15
movq %r13, %r12
cmpq -0x40(%rbp), %r15
movq -0x58(%rbp), %r13
je 0x36f0c
movb (%r15), %al
movsbl %al, %ecx
cmpl %edi, %ecx
sete %dl
movl 0x18(%rbp), %esi
cmpl %esi, %ecx
je 0x36daf
cmpl %edi, %ecx
jne 0x36e44
jmp 0x36daf
movq -0x58(%rbp), %r13
xorl %r14d, %r14d
cmpq %r13, %r12
setne %r14b
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %rax
je 0x36fb8
addq $0x2, %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
movb -0x1(%r15), %bl
movsbl %bl, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
je 0x36fa6
cmpl %edi, %eax
jne 0x36fc0
movq -0x58(%rbp), %rbx
cmpq %rbx, %r12
je 0x3718a
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0x36fa0
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r13d, %eax
addq %rax, %r12
movl 0x10(%rbp), %edi
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %r15
movq %rax, %r15
jne 0x36f40
jmp 0x36f16
xorl %r14d, %r14d
jmp 0x36f16
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq -0x58(%rbp), %r13
cmpq %r13, %r12
je 0x36f16
movzbl %bl, %eax
leaq -0x1(%r15), %rcx
movq %rcx, -0x50(%rbp)
cmpl -0x44(%rbp), %eax
jne 0x36ff0
cmpq -0x40(%rbp), %r15
je 0x36ff0
movb (%r15), %bl
movq %r15, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
xorl %ecx, %ecx
cmpl $0x2, %eax
movl %eax, %r15d
cmovll %ecx, %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl $0x1, %ecx
cmpl $0x2, %eax
jl 0x37060
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl %eax, %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
addq -0x50(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl %bl, %ecx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movl -0x60(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
incl %eax
movq %rax, -0x68(%rbp)
cmpq %r13, %r12
jae 0x36f16
movq %r12, %rbx
cmpl $0x2, %r15d
jge 0x370cd
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0x370ee
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb -0x29(%rbp), %dl
cmpb %dl, (%rax,%rcx)
jne 0x370ee
jmp 0x37144
movq -0x60(%rbp), %rax
leaq (%rbx,%rax), %r12
cmpq %r13, %r12
ja 0x370ee
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x242e0
testl %eax, %eax
je 0x3714a
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0x37133
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %rbx
cmpq %r13, %rbx
jb 0x37096
jmp 0x36f16
incq %rbx
movq %rbx, %r12
subq $0x8, %rsp
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x44(%rbp), %r9d
pushq -0x68(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0x36d2b
addq $0x20, %rsp
testl %eax, %eax
jle 0x37195
cmpq %r13, %r12
jne 0x3708a
jmp 0x36f16
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x36f16
movl %eax, %r14d
jmp 0x36f16
| my_wildcmp_mb_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_44], r9d
mov [rbp+var_40], r8
mov r15, rcx
mov [rbp+var_58], rdx
mov r12, rsi
mov [rbp+var_38], rdi
mov eax, [rbp+arg_10]
mov [rbp+var_68], rax
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_36D7B
mov edi, [rbp+arg_10]
call rax
mov r14d, 1
test eax, eax
jnz loc_36F16
loc_36D7B:
mov edi, [rbp+arg_0]
mov r14d, 0FFFFFFFFh
loc_36D84:
cmp r15, [rbp+var_40]
jz loc_36F08
mov al, [r15]
movsx ecx, al
mov edx, [rbp+arg_8]
cmp ecx, edx
setz sil
cmp ecx, edi
setz dl
or sil, dl
mov r13, [rbp+var_58]
jz loc_36E44
loc_36DAF:
test dl, dl
jz short loc_36E31
inc r15
mov rax, r15
mov rbx, [rbp+var_38]
loc_36DBD:
cmp r12, r13
jz loc_36F16
mov r15, rax
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_36E0C
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_36E0C:
add r12, rax
cmp r15, [rbp+var_40]
mov edi, [rbp+arg_0]
jnb short loc_36E24
movsx ecx, byte ptr [r15]
lea rax, [r15+1]
cmp ecx, edi
jz short loc_36DBD
loc_36E24:
cmp r15, [rbp+var_40]
jz loc_36F0C
mov al, [r15]
loc_36E31:
movsx eax, al
mov ecx, [rbp+arg_8]
cmp eax, ecx
jnz loc_36D84
jmp loc_36F28
loc_36E44:
lea rbx, [r15+1]
mov rdx, [rbp+var_40]
cmp rbx, rdx
cmovz rbx, r15
cmp ecx, [rbp+var_44]
cmovnz rbx, r15
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_36EA8
mov r14d, 1
cmp r12, r13
jz loc_36F16
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov cl, [rax+rcx]
movzx edx, byte ptr [r12]
cmp cl, [rax+rdx]
mov edi, [rbp+arg_0]
jnz short loc_36F16
inc rbx
inc r12
mov r15, rbx
jmp short loc_36EDB
loc_36EA8:
mov r15d, eax
mov rax, r13
lea r13, [r12+r15]
mov r14d, 1
cmp r13, rax
ja short loc_36F16
mov rdi, r12
mov rsi, rbx
mov rdx, r15
call _bcmp
test eax, eax
mov edi, [rbp+arg_0]
jnz short loc_36F16
add rbx, r15
mov r15, rbx
mov r12, r13
loc_36EDB:
cmp r15, [rbp+var_40]
mov r13, [rbp+var_58]
jz short loc_36F0C
mov al, [r15]
movsx ecx, al
cmp ecx, edi
setz dl
mov esi, [rbp+arg_8]
cmp ecx, esi
jz loc_36DAF
cmp ecx, edi
jnz loc_36E44
jmp loc_36DAF
loc_36F08:
mov r13, [rbp+var_58]
loc_36F0C:
xor r14d, r14d
cmp r12, r13
setnz r14b
loc_36F16:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36F28:
lea rax, [r15+1]
cmp rax, [rbp+var_40]
jz loc_36FB8
add r15, 2
xor r13d, r13d
xor r14d, r14d
loc_36F40:
mov bl, [r15-1]
movsx eax, bl
mov ecx, [rbp+arg_8]
cmp eax, ecx
jz short loc_36FA6
cmp eax, edi
jnz short loc_36FC0
mov rbx, [rbp+var_58]
cmp r12, rbx
jz loc_3718A
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_36FA0
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r13d
loc_36FA0:
add r12, rax
mov edi, [rbp+arg_0]
loc_36FA6:
lea rax, [r15+1]
cmp r15, [rbp+var_40]
mov r15, rax
jnz short loc_36F40
jmp loc_36F16
loc_36FB8:
xor r14d, r14d
jmp loc_36F16
loc_36FC0:
mov r14d, 0FFFFFFFFh
mov r13, [rbp+var_58]
cmp r12, r13
jz loc_36F16
movzx eax, bl
lea rcx, [r15-1]
mov [rbp+var_50], rcx
cmp eax, [rbp+var_44]
jnz short loc_36FF0
cmp r15, [rbp+var_40]
jz short loc_36FF0
mov bl, [r15]
mov [rbp+var_50], r15
loc_36FF0:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
xor ecx, ecx
cmp eax, 2
mov r15d, eax
cmovl eax, ecx
mov dword ptr [rbp+var_60], eax
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, 1
cmp eax, 2
jl short loc_37060
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, eax
cmp eax, 2
mov eax, 0
cmovl ecx, eax
loc_37060:
add rcx, [rbp+var_50]
mov [rbp+var_70], rcx
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, bl
mov al, [rax+rcx]
mov [rbp+var_29], al
mov eax, dword ptr [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
inc eax
mov [rbp+var_68], rax
loc_3708A:
cmp r12, r13
jnb loc_36F16
mov rbx, r12
loc_37096:
cmp r15d, 2
jge short loc_370CD
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_370EE
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov dl, [rbp+var_29]
cmp [rax+rcx], dl
jnz short loc_370EE
jmp short loc_37144
loc_370CD:
mov rax, [rbp+var_60]
lea r12, [rbx+rax]
cmp r12, r13
ja short loc_370EE
mov rdi, rbx
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_60]
call _bcmp
test eax, eax
jz short loc_3714A
loc_370EE:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_37133
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_37133:
add rbx, rax
cmp rbx, r13
jb loc_37096
jmp loc_36F16
loc_37144:
inc rbx
mov r12, rbx
loc_3714A:
sub rsp, 8
mov rdi, [rbp+var_38]
mov rsi, r12
mov rdx, r13
mov rcx, [rbp+var_70]
mov r8, [rbp+var_40]
mov r9d, [rbp+var_44]
push [rbp+var_68]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_mb_impl
add rsp, 20h
test eax, eax
jle short loc_37195
cmp r12, r13
jnz loc_3708A
jmp loc_36F16
loc_3718A:
mov r14d, 0FFFFFFFFh
jmp loc_36F16
loc_37195:
mov r14d, eax
jmp loc_36F16
| long long my_wildcmp_mb_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned int v11; // r14d
int v12; // edi
char v13; // al
int v14; // ecx
bool v15; // dl
unsigned __int8 *v16; // r13
char *v17; // rax
int v18; // ecx
long long v19; // rax
unsigned __int8 *v20; // rbx
int v21; // eax
long long v22; // r15
unsigned __int8 *v23; // rax
unsigned __int8 *v24; // r13
char *v26; // r15
unsigned __int8 v27; // bl
int v28; // ecx
long long v29; // rax
int v31; // eax
int v32; // r15d
int v33; // eax
int v34; // ecx
unsigned __int8 *v35; // rbx
int v36; // ecx
long long v37; // rax
int v38; // eax
int v39; // [rsp+0h] [rbp-70h]
unsigned int v40; // [rsp+10h] [rbp-60h]
char *v42; // [rsp+20h] [rbp-50h]
char v46; // [rsp+47h] [rbp-29h]
if ( !my_string_stack_guard || (v11 = 1, !(unsigned int)my_string_stack_guard(a9)) )
{
v12 = a7;
v11 = -1;
do
{
if ( a4 == a5 )
{
v16 = a3;
return a2 != v16;
}
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
v16 = a3;
if ( v14 != v12 && v14 != a8 )
{
do
{
v20 = (unsigned __int8 *)(a4 + 1);
if ( a4 + 1 == a5 )
v20 = (unsigned __int8 *)a4;
if ( v14 != a6 )
v20 = (unsigned __int8 *)a4;
v21 = (*(long long ( **)(long long, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v20);
if ( v21 >= 2 )
{
v22 = (unsigned int)v21;
v23 = v16;
v24 = &a2[v22];
v11 = 1;
if ( &a2[v22] > v23 )
return v11;
v12 = a7;
if ( (unsigned int)bcmp(a2, v20, v22) )
return v11;
a4 = (char *)&v20[v22];
a2 = v24;
}
else
{
v11 = 1;
if ( a2 == v16 )
return v11;
v12 = a7;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v20) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v11;
++a2;
a4 = (char *)(v20 + 1);
}
v16 = a3;
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
}
while ( v14 != a8 && v14 != v12 );
}
if ( v15 )
{
v17 = a4 + 1;
do
{
if ( a2 == v16 )
return v11;
a4 = v17;
v18 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
v16);
v19 = 1LL;
if ( v18 >= 2 )
{
v19 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
a2,
v16);
if ( (int)v19 < 2 )
v19 = 0LL;
}
a2 += v19;
v12 = a7;
if ( a4 >= a5 )
break;
v17 = a4 + 1;
}
while ( *a4 == a7 );
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
}
}
while ( v13 != a8 );
if ( a4 + 1 == a5 )
{
return 0;
}
else
{
v26 = a4 + 2;
v11 = 0;
while ( 1 )
{
v27 = *(v26 - 1);
if ( (char)v27 == a8 )
goto LABEL_45;
if ( (char)v27 != v12 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
v28 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
v29 = 1LL;
if ( v28 >= 2 )
{
v29 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
if ( (int)v29 < 2 )
v29 = 0LL;
}
a2 += v29;
v12 = a7;
LABEL_45:
if ( v26++ == a5 )
return v11;
}
v11 = -1;
if ( a2 != a3 )
{
v42 = v26 - 1;
if ( v27 == a6 && v26 != a5 )
{
v27 = *v26;
v42 = v26;
}
v31 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v32 = v31;
if ( v31 < 2 )
v31 = 0;
v40 = v31;
v33 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v34 = 1;
if ( v33 >= 2 )
{
v34 = (*(long long ( **)(long long, char *, char *, long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v42,
a5,
1LL);
if ( v34 < 2 )
v34 = 0;
}
v39 = (_DWORD)v42 + v34;
v46 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v27);
do
{
if ( a2 >= a3 )
return v11;
v35 = a2;
while ( v32 >= 2 )
{
a2 = &v35[v40];
if ( a2 <= a3 && !(unsigned int)bcmp(v35, v42, v40) )
goto LABEL_71;
LABEL_66:
v36 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
v37 = 1LL;
if ( v36 >= 2 )
{
v37 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
if ( (int)v37 < 2 )
v37 = 0LL;
}
v35 += v37;
if ( v35 >= a3 )
return v11;
}
if ( (*(int ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v35,
a3) > 1
|| *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v35) != v46 )
{
goto LABEL_66;
}
a2 = v35 + 1;
LABEL_71:
v38 = my_wildcmp_mb_impl(a1, (_DWORD)a2, (_DWORD)a3, v39, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v38 <= 0 )
return (unsigned int)v38;
}
while ( a2 != a3 );
}
}
}
return v11;
}
| my_wildcmp_mb_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],R9D
MOV qword ptr [RBP + -0x40],R8
MOV R15,RCX
MOV qword ptr [RBP + -0x58],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x38],RDI
MOV EAX,dword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0x46f3b0]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00136d7b
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x00136f16
LAB_00136d7b:
MOV EDI,dword ptr [RBP + 0x10]
MOV R14D,0xffffffff
LAB_00136d84:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x00136f08
MOV AL,byte ptr [R15]
MOVSX ECX,AL
MOV EDX,dword ptr [RBP + 0x18]
CMP ECX,EDX
SETZ SIL
CMP ECX,EDI
SETZ DL
OR SIL,DL
MOV R13,qword ptr [RBP + -0x58]
JZ 0x00136e44
LAB_00136daf:
TEST DL,DL
JZ 0x00136e31
INC R15
MOV RAX,R15
MOV RBX,qword ptr [RBP + -0x38]
LAB_00136dbd:
CMP R12,R13
JZ 0x00136f16
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x00136e0c
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_00136e0c:
ADD R12,RAX
CMP R15,qword ptr [RBP + -0x40]
MOV EDI,dword ptr [RBP + 0x10]
JNC 0x00136e24
MOVSX ECX,byte ptr [R15]
LEA RAX,[R15 + 0x1]
CMP ECX,EDI
JZ 0x00136dbd
LAB_00136e24:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x00136f0c
MOV AL,byte ptr [R15]
LAB_00136e31:
MOVSX EAX,AL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JNZ 0x00136d84
JMP 0x00136f28
LAB_00136e44:
LEA RBX,[R15 + 0x1]
MOV RDX,qword ptr [RBP + -0x40]
CMP RBX,RDX
CMOVZ RBX,R15
CMP ECX,dword ptr [RBP + -0x44]
CMOVNZ RBX,R15
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x00136ea8
MOV R14D,0x1
CMP R12,R13
JZ 0x00136f16
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R12]
CMP CL,byte ptr [RAX + RDX*0x1]
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x00136f16
INC RBX
INC R12
MOV R15,RBX
JMP 0x00136edb
LAB_00136ea8:
MOV R15D,EAX
MOV RAX,R13
LEA R13,[R12 + R15*0x1]
MOV R14D,0x1
CMP R13,RAX
JA 0x00136f16
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R15
CALL 0x001242e0
TEST EAX,EAX
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x00136f16
ADD RBX,R15
MOV R15,RBX
MOV R12,R13
LAB_00136edb:
CMP R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x58]
JZ 0x00136f0c
MOV AL,byte ptr [R15]
MOVSX ECX,AL
CMP ECX,EDI
SETZ DL
MOV ESI,dword ptr [RBP + 0x18]
CMP ECX,ESI
JZ 0x00136daf
CMP ECX,EDI
JNZ 0x00136e44
JMP 0x00136daf
LAB_00136f08:
MOV R13,qword ptr [RBP + -0x58]
LAB_00136f0c:
XOR R14D,R14D
CMP R12,R13
SETNZ R14B
LAB_00136f16:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136f28:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x00136fb8
ADD R15,0x2
XOR R13D,R13D
XOR R14D,R14D
LAB_00136f40:
MOV BL,byte ptr [R15 + -0x1]
MOVSX EAX,BL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JZ 0x00136fa6
CMP EAX,EDI
JNZ 0x00136fc0
MOV RBX,qword ptr [RBP + -0x58]
CMP R12,RBX
JZ 0x0013718a
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x00136fa0
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R13D
LAB_00136fa0:
ADD R12,RAX
MOV EDI,dword ptr [RBP + 0x10]
LAB_00136fa6:
LEA RAX,[R15 + 0x1]
CMP R15,qword ptr [RBP + -0x40]
MOV R15,RAX
JNZ 0x00136f40
JMP 0x00136f16
LAB_00136fb8:
XOR R14D,R14D
JMP 0x00136f16
LAB_00136fc0:
MOV R14D,0xffffffff
MOV R13,qword ptr [RBP + -0x58]
CMP R12,R13
JZ 0x00136f16
MOVZX EAX,BL
LEA RCX,[R15 + -0x1]
MOV qword ptr [RBP + -0x50],RCX
CMP EAX,dword ptr [RBP + -0x44]
JNZ 0x00136ff0
CMP R15,qword ptr [RBP + -0x40]
JZ 0x00136ff0
MOV BL,byte ptr [R15]
MOV qword ptr [RBP + -0x50],R15
LAB_00136ff0:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
XOR ECX,ECX
CMP EAX,0x2
MOV R15D,EAX
CMOVL EAX,ECX
MOV dword ptr [RBP + -0x60],EAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,0x1
CMP EAX,0x2
JL 0x00137060
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
CMP EAX,0x2
MOV EAX,0x0
CMOVL ECX,EAX
LAB_00137060:
ADD RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x70],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,BL
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x29],AL
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
INC EAX
MOV qword ptr [RBP + -0x68],RAX
LAB_0013708a:
CMP R12,R13
JNC 0x00136f16
MOV RBX,R12
LAB_00137096:
CMP R15D,0x2
JGE 0x001370cd
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x001370ee
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV DL,byte ptr [RBP + -0x29]
CMP byte ptr [RAX + RCX*0x1],DL
JNZ 0x001370ee
JMP 0x00137144
LAB_001370cd:
MOV RAX,qword ptr [RBP + -0x60]
LEA R12,[RBX + RAX*0x1]
CMP R12,R13
JA 0x001370ee
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x001242e0
TEST EAX,EAX
JZ 0x0013714a
LAB_001370ee:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x00137133
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_00137133:
ADD RBX,RAX
CMP RBX,R13
JC 0x00137096
JMP 0x00136f16
LAB_00137144:
INC RBX
MOV R12,RBX
LAB_0013714a:
SUB RSP,0x8
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R12
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x70]
MOV R8,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x44]
PUSH qword ptr [RBP + -0x68]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x00136d2b
ADD RSP,0x20
TEST EAX,EAX
JLE 0x00137195
CMP R12,R13
JNZ 0x0013708a
JMP 0x00136f16
LAB_0013718a:
MOV R14D,0xffffffff
JMP 0x00136f16
LAB_00137195:
MOV R14D,EAX
JMP 0x00136f16
|
uint my_wildcmp_mb_impl(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,
uint param_6,uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
uint uVar8;
byte *__s2;
byte *pbVar9;
bool bVar10;
byte *local_58;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar3 = (*my_string_stack_guard)(param_9), iVar3 != 0)) {
return 1;
}
uVar4 = 0xffffffff;
do {
if (param_4 == param_5) {
LAB_00136f0c:
return (uint)(param_2 != param_3);
}
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
pbVar9 = param_2;
if (uVar8 != param_8 && !bVar10) {
do {
__s2 = param_4 + 1;
if (param_4 + 1 == param_5) {
__s2 = param_4;
}
if (uVar8 != param_6) {
__s2 = param_4;
}
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,__s2);
if ((int)uVar4 < 2) {
if (pbVar9 == param_3) {
return 1;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*__s2) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*pbVar9)) {
return 1;
}
param_4 = __s2 + 1;
param_2 = pbVar9 + 1;
}
else {
uVar6 = (ulong)uVar4;
param_2 = pbVar9 + uVar6;
if (param_3 < param_2) {
return 1;
}
iVar3 = bcmp(pbVar9,__s2,uVar6);
if (iVar3 != 0) {
return 1;
}
param_4 = __s2 + uVar6;
}
uVar4 = 1;
if (param_4 == param_5) goto LAB_00136f0c;
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
} while ((uVar8 != param_8) && (pbVar9 = param_2, uVar8 != param_7));
}
if (bVar10) {
do {
param_4 = param_4 + 1;
if (param_2 == param_3) {
return uVar4;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar8;
if ((int)uVar8 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
} while ((param_4 < param_5) && ((int)(char)*param_4 == param_7));
if (param_4 == param_5) goto LAB_00136f0c;
bVar2 = *param_4;
}
} while ((int)(char)bVar2 != param_8);
if (param_4 + 1 != param_5) {
pbVar9 = param_4 + 2;
do {
bVar2 = pbVar9[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
local_58 = pbVar9 + -1;
if ((bVar2 == param_6) && (pbVar9 != param_5)) {
bVar2 = *pbVar9;
local_58 = pbVar9;
}
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar4 = uVar8;
if ((int)uVar8 < 2) {
uVar4 = 0;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar6 = 0;
}
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
goto LAB_0013708a;
}
if (param_2 == param_3) {
return 0xffffffff;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar4;
if ((int)uVar4 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
}
bVar10 = pbVar9 != param_5;
pbVar9 = pbVar9 + 1;
} while (bVar10);
}
return 0;
LAB_0013708a:
if (param_3 <= param_2) {
return 0xffffffff;
}
do {
if ((int)uVar8 < 2) {
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
if ((iVar3 < 2) && (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) == cVar1)) break;
}
else {
pbVar9 = param_2 + uVar4;
if ((pbVar9 <= param_3) && (iVar3 = bcmp(param_2,local_58,(ulong)uVar4), iVar3 == 0))
goto LAB_0013714a;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar7 = 0;
}
}
param_2 = param_2 + uVar7;
if (param_3 <= param_2) {
return 0xffffffff;
}
} while( true );
pbVar9 = param_2 + 1;
LAB_0013714a:
uVar5 = my_wildcmp_mb_impl(param_1,pbVar9,param_3,local_58 + uVar6,param_5,param_6,param_7,param_8
,param_9 + 1);
if ((int)uVar5 < 1) {
return uVar5;
}
param_2 = pbVar9;
if (pbVar9 == param_3) {
return 0xffffffff;
}
goto LAB_0013708a;
}
| |
33,608 | StartTree::UPGMA_Matrix<double>::loadMatrixFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | iqtree3/utils/bionj2.cpp | bool loadMatrixFromFile(const std::string &distanceMatrixFilePath) {
size_t rank;
igzstream in;
try {
in.exceptions(std::ios::failbit | std::ios::badbit);
in.open(distanceMatrixFilePath.c_str(), std::ios_base::in);
in >> rank;
setSize(rank);
progress_display progress(rank, "Loading distance matrix", "loaded", "row");
for (size_t r=0; r<n; ++r) {
std::string name;
in >> name;
clusters.addCluster(name);
for (size_t c=0; c<n; ++c) {
in >> rows[r][c];
//Ensure matrix is symmetric (as it is read!)
if (c<r && rows[r][c] != rows[c][r]) {
T v = ( rows[r][c] + rows[c][r] ) * 0.5;
rows[c][r] = v; //U-R
rows[r][c] = v;
}
}
rowToCluster.emplace_back(r);
++progress;
}
in.close();
} catch (std::ios::failure &) {
std::cerr << "Load matrix failed: IO error"
<< " reading file: " << distanceMatrixFilePath << std::endl;
return false;
} catch (const char *str) {
std::cerr << "Load matrix failed: " << str << std::endl;
return false;
} catch (std::string &str) {
std::cerr << "Load matrix failed: " << str << std::endl;
return false;
}
calculateRowTotals();
//Note: The old code wrote a message to standard output,
// if the matrix was not symmetric. This code doesn't.
return true;
} | O3 | cpp | StartTree::UPGMA_Matrix<double>::loadMatrixFromFile(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 $0x398, %rsp # imm = 0x398
movq %rsi, %r12
movq %rdi, %r14
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1ba40
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0xe8, %rdi
movl $0x5, 0x1c(%rdi)
movl 0x20(%rdi), %esi
callq 0x15560
movq (%r12), %rsi
leaq 0xe8(%rsp), %rdi
movl $0x8, %edx
callq 0x29910
leaq 0x280(%rsp), %r15
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x15170
movq 0x18(%rsp), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movq %r12, 0x10(%rsp)
movsd 0x18(%rsp), %xmm1
unpcklps 0x37b6(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x37be(%rip), %xmm1 # 0x2b6d0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
leaq 0x3ae1(%rip), %rsi # 0x2ba06
leaq 0x3af2(%rip), %rdx # 0x2ba1e
leaq 0x3af2(%rip), %rcx # 0x2ba25
leaq 0x48(%rsp), %rdi
callq 0x29b6a
movq $0x0, 0x8(%rsp)
cmpq $0x0, 0x8(%r14)
je 0x28061
leaq 0x30(%rsp), %r13
leaq 0x48(%r14), %r12
leaq 0x30(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0x20(%rsp), %rbp
movq %r13, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x15400
movq %r12, %rdi
movq %rbp, %rsi
callq 0x26f30
cmpq $0x0, 0x8(%r14)
je 0x27ffe
movq 0x8(%rsp), %rax
xorl %ebx, %ebx
movq 0x20(%r14), %rcx
leaq (,%rbx,8), %rsi
addq (%rcx,%rax,8), %rsi
movq %r15, %rdi
callq 0x151d0
movq 0x8(%rsp), %rax
cmpq %rax, %rbx
jae 0x27ff5
movq 0x20(%r14), %rdx
movq (%rdx,%rax,8), %rcx
movsd (%rcx,%rbx,8), %xmm0
movq (%rdx,%rbx,8), %rdx
movsd (%rdx,%rax,8), %xmm1
ucomisd %xmm1, %xmm0
jne 0x27fdf
jnp 0x27ff5
addsd %xmm1, %xmm0
mulsd 0x37ad(%rip), %xmm0 # 0x2b798
movsd %xmm0, (%rdx,%rax,8)
movsd %xmm0, (%rcx,%rbx,8)
incq %rbx
cmpq 0x8(%r14), %rbx
jb 0x27f9f
movq 0x38(%r14), %rsi
cmpq 0x40(%r14), %rsi
je 0x2801a
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%r14)
jmp 0x28029
movq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1be08
leaq 0x48(%rsp), %rdi
callq 0x29c9c
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x2804a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x152e0
movq 0x8(%rsp), %rax
incq %rax
movq %rax, 0x8(%rsp)
cmpq 0x8(%r14), %rax
jb 0x27f68
leaq 0xe8(%rsp), %rdi
callq 0x29b12
leaq 0x48(%rsp), %rdi
callq 0x2ab6c
movq (%r14), %rax
movb $0x1, %bl
movq %r14, %rdi
callq *0x18(%rax)
leaq 0xc0fe(%rip), %rax # 0x34188
leaq 0x290(%rsp), %r14
movq %rax, -0x10(%r14)
leaq 0xc113(%rip), %rax # 0x341b0
movq %rax, (%r14)
movq $0x0, -0x8(%r14)
leaq 0xc041(%rip), %rsi # 0x340f0
leaq 0xe8(%rsp), %rdi
callq 0x29a54
movq %r14, %rdi
callq 0x150f0
movl %ebx, %eax
addq $0x398, %rsp # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x1bb2a
movq %rbx, %rdi
callq 0x15580
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %r12
jmp 0x28136
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %r12
jmp 0x28140
movq %rdx, %r14
movq %rax, %rbx
jmp 0x28140
jmp 0x28114
movq %rdx, %r14
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
movq 0x10(%rsp), %r12
je 0x28136
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x152e0
leaq 0x48(%rsp), %rdi
callq 0x2ab6c
cmpl $0x3, %r14d
jne 0x281a5
movq %rbx, %rdi
callq 0x15110
movq 0xce9b(%rip), %rdi # 0x34ff0
leaq 0x38e2(%rip), %rsi # 0x2ba3e
movl $0x1c, %edx
callq 0x15360
movq 0xce83(%rip), %rdi # 0x34ff0
leaq 0x38e7(%rip), %rsi # 0x2ba5b
movl $0xf, %edx
callq 0x15360
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0xce62(%rip), %rdi # 0x34ff0
callq 0x15360
movq %rax, %rdi
callq 0x15130
callq 0x15530
jmp 0x28239
cmpl $0x2, %r14d
jne 0x281ec
movq %rbx, %rdi
callq 0x15110
movq %rax, %rbx
movq 0xce33(%rip), %rdi # 0x34ff0
leaq 0x3865(%rip), %rsi # 0x2ba29
movl $0x14, %edx
callq 0x15360
movq 0xce1b(%rip), %rdi # 0x34ff0
movq %rbx, %rsi
callq 0x152b0
movq %rax, %rdi
callq 0x15130
callq 0x15530
jmp 0x28239
cmpl $0x1, %r14d
jne 0x280db
movq %rbx, %rdi
callq 0x15110
movq %rax, %rbx
movq 0xcde8(%rip), %rdi # 0x34ff0
leaq 0x381a(%rip), %rsi # 0x2ba29
movl $0x14, %edx
callq 0x15360
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xcdc9(%rip), %rdi # 0x34ff0
callq 0x15360
movq %rax, %rdi
callq 0x15130
callq 0x15530
xorl %ebx, %ebx
jmp 0x28083
jmp 0x280d8
jmp 0x280d8
movq %rax, %rbx
callq 0x15530
jmp 0x280db
movq %rax, %rbx
callq 0x15530
jmp 0x280db
movq %rax, %rbx
callq 0x15530
jmp 0x280db
movq %rax, %rdi
callq 0x1758f
nop
| _ZN9StartTree12UPGMA_MatrixIdE18loadMatrixFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 398h
mov r12, rsi
mov r14, rdi
lea rbx, [rsp+3C8h+var_2E0]
mov rdi, rbx; this
call _ZN9igzstreamC1Ev; igzstream::igzstream(void)
mov rax, [rbx]
mov rax, [rax-18h]
lea rdi, [rsp+rax+3C8h+var_3C8]
add rdi, 0E8h
mov dword ptr [rdi+1Ch], 5
mov esi, [rdi+20h]
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
mov rsi, [r12]; char *
lea rdi, [rsp+3C8h+var_2E0]; this
mov edx, 8; int
call _ZN12gzstreambase4openEPKci; gzstreambase::open(char const*,int)
lea r15, [rsp+3C8h+var_148]
lea rsi, [rsp+3C8h+var_3B0]
mov rdi, r15
call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &)
mov rsi, [rsp+3C8h+var_3B0]
mov rax, [r14]
mov rdi, r14
call qword ptr [rax]
mov [rsp+3C8h+var_3B8], r12
movsd xmm1, [rsp+3C8h+var_3B0]
unpcklps xmm1, cs:xmmword_2B6C0
subpd xmm1, cs:xmmword_2B6D0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1; double
lea rsi, aLoadingDistanc; "Loading distance matrix"
lea rdx, aLoaded; "loaded"
lea rcx, aRow; "row"
lea rdi, [rsp+3C8h+var_380]; this
call _ZN16progress_displayC2EdPKcS1_S1_; progress_display::progress_display(double,char const*,char const*,char const*)
mov [rsp+3C8h+var_3C0], 0
cmp qword ptr [r14+8], 0
jz loc_28061
lea r13, [rsp+3C8h+var_398]
lea r12, [r14+48h]
lea rax, [r14+30h]
mov [rsp+3C8h+var_388], rax
lea rbp, [rsp+3C8h+var_3A8]
loc_27F68:
mov [rsp+3C8h+var_3A8], r13
mov [rsp+3C8h+var_3A0], 0
mov byte ptr [rsp+3C8h+var_398], 0
mov rdi, r15
mov rsi, rbp
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rdi, r12
mov rsi, rbp
call _ZNSt6vectorIN9StartTree7ClusterIdEESaIS2_EE12emplace_backIJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERS2_DpOT_; std::vector<StartTree::Cluster<double>>::emplace_back<std::string const&>(std::string const&)
cmp qword ptr [r14+8], 0
jz short loc_27FFE
mov rax, [rsp+3C8h+var_3C0]
xor ebx, ebx
loc_27F9F:
mov rcx, [r14+20h]
lea rsi, ds:0[rbx*8]
add rsi, [rcx+rax*8]
mov rdi, r15
call __ZNSi10_M_extractIdEERSiRT_; std::istream::_M_extract<double>(double &)
mov rax, [rsp+3C8h+var_3C0]
cmp rbx, rax
jnb short loc_27FF5
mov rdx, [r14+20h]
mov rcx, [rdx+rax*8]
movsd xmm0, qword ptr [rcx+rbx*8]
mov rdx, [rdx+rbx*8]
movsd xmm1, qword ptr [rdx+rax*8]
ucomisd xmm0, xmm1
jnz short loc_27FDF
jnp short loc_27FF5
loc_27FDF:
addsd xmm0, xmm1
mulsd xmm0, cs:qword_2B798
movsd qword ptr [rdx+rax*8], xmm0
movsd qword ptr [rcx+rbx*8], xmm0
loc_27FF5:
inc rbx
cmp rbx, [r14+8]
jb short loc_27F9F
loc_27FFE:
mov rsi, [r14+38h]
cmp rsi, [r14+40h]
jz short loc_2801A
mov rax, [rsp+3C8h+var_3C0]
mov [rsi], rax
add rsi, 8
mov [r14+38h], rsi
jmp short loc_28029
loc_2801A:
mov rdi, [rsp+3C8h+var_388]
lea rdx, [rsp+3C8h+var_3C0]
call _ZNSt6vectorImSaImEE17_M_realloc_insertIJRmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_; std::vector<ulong>::_M_realloc_insert<ulong &>(__gnu_cxx::__normal_iterator<ulong *,std::vector<ulong>>,ulong &)
loc_28029:
lea rdi, [rsp+3C8h+var_380]
call _ZN16progress_displayppEv; progress_display::operator++(void)
mov rdi, [rsp+3C8h+var_3A8]; void *
cmp rdi, r13
jz short loc_2804A
mov rsi, [rsp+3C8h+var_398]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2804A:
mov rax, [rsp+3C8h+var_3C0]
inc rax
mov [rsp+3C8h+var_3C0], rax
cmp rax, [r14+8]
jb loc_27F68
loc_28061:
lea rdi, [rsp+3C8h+var_2E0]; this
call _ZN12gzstreambase5closeEv; gzstreambase::close(void)
lea rdi, [rsp+3C8h+var_380]; this
call _ZN16progress_displayD2Ev; progress_display::~progress_display()
mov rax, [r14]
mov bl, 1
mov rdi, r14
call qword ptr [rax+18h]
loc_28083:
lea rax, off_34188
lea r14, [rsp+3C8h+var_138]
mov [r14-10h], rax
lea rax, off_341B0
mov [r14], rax
mov qword ptr [r14-8], 0
lea rsi, off_340F0
lea rdi, [rsp+3C8h+var_2E0]; this
call _ZN12gzstreambaseD2Ev; gzstreambase::~gzstreambase()
mov rdi, r14; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov eax, ebx
add rsp, 398h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_280D8:
mov rbx, rax
loc_280DB:
lea rdi, [rsp+3C8h+var_2E0]; this
call _ZN9igzstreamD1Ev; igzstream::~igzstream()
mov rdi, rbx
call __Unwind_Resume
mov r14, rdx
mov rbx, rax
mov r12, [rsp+3C8h+var_3B8]
jmp short loc_28136
mov r14, rdx
mov rbx, rax
mov r12, [rsp+3C8h+var_3B8]
jmp short loc_28140
mov r14, rdx
mov rbx, rax
jmp short loc_28140
jmp short $+2
loc_28114:
mov r14, rdx
mov rbx, rax
mov rdi, [rsp+3C8h+var_3A8]; void *
cmp rdi, r13
mov r12, [rsp+3C8h+var_3B8]
jz short loc_28136
mov rsi, [rsp+3C8h+var_398]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_28136:
lea rdi, [rsp+3C8h+var_380]; this
call _ZN16progress_displayD2Ev; progress_display::~progress_display()
loc_28140:
cmp r14d, 3
jnz short loc_281A5
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aLoadMatrixFail; "Load matrix failed: IO error"
mov edx, 1Ch
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, cs:_ZSt4cerr_ptr
lea rsi, aReadingFile; " reading file: "
mov edx, 0Fh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, cs:_ZSt4cerr_ptr
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
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
call ___cxa_end_catch
jmp loc_28239
loc_281A5:
cmp r14d, 2
jnz short loc_281EC
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aLoadMatrixFail_0; "Load matrix failed: "
mov edx, 14h
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, cs:_ZSt4cerr_ptr
mov rsi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
call ___cxa_end_catch
jmp short loc_28239
loc_281EC:
cmp r14d, 1
jnz loc_280DB
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aLoadMatrixFail_0; "Load matrix failed: "
mov edx, 14h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rdi, cs:_ZSt4cerr_ptr
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
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
call ___cxa_end_catch
loc_28239:
xor ebx, ebx
jmp loc_28083
jmp loc_280D8
jmp loc_280D8
mov rbx, rax
call ___cxa_end_catch
jmp loc_280DB
mov rbx, rax
call ___cxa_end_catch
jmp loc_280DB
mov rbx, rax
call ___cxa_end_catch
jmp loc_280DB
mov rdi, rax
call __clang_call_terminate
| long long StartTree::UPGMA_Matrix<double>::loadMatrixFromFile(long long *a1, const char **a2)
{
unsigned long long v3; // rbx
char *v4; // rdi
__m128d v5; // xmm1
long long v6; // rax
long long v7; // rdx
long long v8; // rcx
double v9; // xmm0_8
long long v10; // rdx
double v11; // xmm1_8
double v12; // xmm0_8
_QWORD *v13; // rsi
_QWORD v15[2]; // [rsp+8h] [rbp-3C0h] BYREF
unsigned long long v16; // [rsp+18h] [rbp-3B0h] BYREF
void *v17[2]; // [rsp+20h] [rbp-3A8h] BYREF
_QWORD v18[2]; // [rsp+30h] [rbp-398h] BYREF
long long *v19; // [rsp+40h] [rbp-388h]
_BYTE v20[160]; // [rsp+48h] [rbp-380h] BYREF
_QWORD v21[51]; // [rsp+E8h] [rbp-2E0h] BYREF
_QWORD v22[2]; // [rsp+280h] [rbp-148h] BYREF
void (**v23)(std::istream *__hidden); // [rsp+290h] [rbp-138h] BYREF
v3 = (unsigned long long)v21;
igzstream::igzstream((igzstream *)v21);
v4 = (char *)v21 + *(_QWORD *)(v21[0] - 24LL);
*((_DWORD *)v4 + 7) = 5;
std::ios::clear(v4, *((unsigned int *)v4 + 8));
gzstreambase::open((gzstreambase *)v21, *a2, 8);
std::istream::_M_extract<unsigned long>(v22, &v16);
(*(void ( **)(long long *, unsigned long long))*a1)(a1, v16);
v15[1] = a2;
v5 = _mm_sub_pd((__m128d)_mm_unpacklo_ps((__m128)v16, (__m128)xmmword_2B6C0), (__m128d)xmmword_2B6D0);
progress_display::progress_display(
(progress_display *)v20,
_mm_unpackhi_pd(v5, v5).m128d_f64[0] + v5.m128d_f64[0],
"Loading distance matrix",
"loaded",
"row");
v15[0] = 0LL;
if ( a1[1] )
{
v19 = a1 + 6;
do
{
v17[0] = v18;
v17[1] = 0LL;
LOBYTE(v18[0]) = 0;
std::operator>><char>(v22, v17);
std::vector<StartTree::Cluster<double>>::emplace_back<std::string const&>((long long)(a1 + 9), (long long)v17);
if ( a1[1] )
{
v6 = v15[0];
v3 = 0LL;
do
{
std::istream::_M_extract<double>(v22, *(_QWORD *)(a1[4] + 8 * v6) + 8 * v3);
v6 = v15[0];
if ( v3 < v15[0] )
{
v7 = a1[4];
v8 = *(_QWORD *)(v7 + 8LL * v15[0]);
v9 = *(double *)(v8 + 8 * v3);
v10 = *(_QWORD *)(v7 + 8 * v3);
v11 = *(double *)(v10 + 8LL * v15[0]);
if ( v9 != v11 )
{
v12 = (v9 + v11) * 0.5;
*(double *)(v10 + 8LL * v15[0]) = v12;
*(double *)(v8 + 8 * v3) = v12;
}
}
++v3;
}
while ( v3 < a1[1] );
}
v13 = (_QWORD *)a1[7];
if ( v13 == (_QWORD *)a1[8] )
{
std::vector<unsigned long>::_M_realloc_insert<unsigned long &>(v19, (long long)v13, v15);
}
else
{
*v13 = v15[0];
a1[7] = (long long)(v13 + 1);
}
progress_display::operator++(v20);
if ( v17[0] != v18 )
operator delete(v17[0], v18[0] + 1LL);
++v15[0];
}
while ( v15[0] < (unsigned long long)a1[1] );
}
gzstreambase::close((gzstreambase *)v21);
progress_display::~progress_display((progress_display *)v20);
LOBYTE(v3) = 1;
(*(void ( **)(long long *))(*a1 + 24))(a1);
v22[0] = off_34188;
v23 = off_341B0;
v22[1] = 0LL;
gzstreambase::~gzstreambase((gzstreambase *)v21);
std::ios_base::~ios_base((std::ios_base *)&v23);
return (unsigned int)v3;
}
| loadMatrixFromFile:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x398
MOV R12,RSI
MOV R14,RDI
LEA RBX,[RSP + 0xe8]
MOV RDI,RBX
CALL 0x0011ba40
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[RSP + RAX*0x1]
ADD RDI,0xe8
MOV dword ptr [RDI + 0x1c],0x5
MOV ESI,dword ptr [RDI + 0x20]
LAB_00127ebb:
CALL 0x00115560
MOV RSI,qword ptr [R12]
LEA RDI,[RSP + 0xe8]
MOV EDX,0x8
CALL 0x00129910
LEA R15,[RSP + 0x280]
LEA RSI,[RSP + 0x18]
MOV RDI,R15
CALL 0x00115170
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX]
MOV qword ptr [RSP + 0x10],R12
MOVSD XMM1,qword ptr [RSP + 0x18]
UNPCKLPS XMM1,xmmword ptr [0x0012b6c0]
SUBPD XMM1,xmmword ptr [0x0012b6d0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
LAB_00127f1e:
LEA RSI,[0x12ba06]
LEA RDX,[0x12ba1e]
LEA RCX,[0x12ba25]
LEA RDI,[RSP + 0x48]
CALL 0x00129b6a
MOV qword ptr [RSP + 0x8],0x0
CMP qword ptr [R14 + 0x8],0x0
JZ 0x00128061
LEA R13,[RSP + 0x30]
LEA R12,[R14 + 0x48]
LEA RAX,[R14 + 0x30]
MOV qword ptr [RSP + 0x40],RAX
LEA RBP,[RSP + 0x20]
LAB_00127f68:
MOV qword ptr [RSP + 0x20],R13
MOV qword ptr [RSP + 0x28],0x0
MOV byte ptr [RSP + 0x30],0x0
LAB_00127f7b:
MOV RDI,R15
MOV RSI,RBP
CALL 0x00115400
MOV RDI,R12
MOV RSI,RBP
CALL 0x00126f30
CMP qword ptr [R14 + 0x8],0x0
JZ 0x00127ffe
MOV RAX,qword ptr [RSP + 0x8]
XOR EBX,EBX
LAB_00127f9f:
MOV RCX,qword ptr [R14 + 0x20]
LEA RSI,[RBX*0x8]
ADD RSI,qword ptr [RCX + RAX*0x8]
LAB_00127faf:
MOV RDI,R15
CALL 0x001151d0
MOV RAX,qword ptr [RSP + 0x8]
CMP RBX,RAX
JNC 0x00127ff5
MOV RDX,qword ptr [R14 + 0x20]
MOV RCX,qword ptr [RDX + RAX*0x8]
MOVSD XMM0,qword ptr [RCX + RBX*0x8]
MOV RDX,qword ptr [RDX + RBX*0x8]
MOVSD XMM1,qword ptr [RDX + RAX*0x8]
UCOMISD XMM0,XMM1
JNZ 0x00127fdf
JNP 0x00127ff5
LAB_00127fdf:
ADDSD XMM0,XMM1
MULSD XMM0,qword ptr [0x0012b798]
MOVSD qword ptr [RDX + RAX*0x8],XMM0
MOVSD qword ptr [RCX + RBX*0x8],XMM0
LAB_00127ff5:
INC RBX
CMP RBX,qword ptr [R14 + 0x8]
JC 0x00127f9f
LAB_00127ffe:
MOV RSI,qword ptr [R14 + 0x38]
CMP RSI,qword ptr [R14 + 0x40]
JZ 0x0012801a
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSI],RAX
ADD RSI,0x8
MOV qword ptr [R14 + 0x38],RSI
JMP 0x00128029
LAB_0012801a:
MOV RDI,qword ptr [RSP + 0x40]
LEA RDX,[RSP + 0x8]
CALL 0x0011be08
LAB_00128029:
LEA RDI,[RSP + 0x48]
CALL 0x00129c9c
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x0012804a
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001152e0
LAB_0012804a:
MOV RAX,qword ptr [RSP + 0x8]
INC RAX
MOV qword ptr [RSP + 0x8],RAX
CMP RAX,qword ptr [R14 + 0x8]
JC 0x00127f68
LAB_00128061:
LEA RDI,[RSP + 0xe8]
CALL 0x00129b12
LEA RDI,[RSP + 0x48]
CALL 0x0012ab6c
MOV RAX,qword ptr [R14]
MOV BL,0x1
LAB_0012807d:
MOV RDI,R14
CALL qword ptr [RAX + 0x18]
LAB_00128083:
LEA RAX,[0x134188]
LEA R14,[RSP + 0x290]
MOV qword ptr [R14 + -0x10],RAX
LEA RAX,[0x1341b0]
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + -0x8],0x0
LEA RSI,[0x1340f0]
LEA RDI,[RSP + 0xe8]
CALL 0x00129a54
MOV RDI,R14
CALL 0x001150f0
MOV EAX,EBX
ADD RSP,0x398
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* StartTree::UPGMA_Matrix<double>::loadMatrixFromFile(std::__cxx11::string const&) */
ulong __thiscall
StartTree::UPGMA_Matrix<double>::loadMatrixFromFile(UPGMA_Matrix<double> *this,string *param_1)
{
double dVar1;
long lVar2;
long lVar3;
int8 *puVar4;
igzstream *this_00;
double dVar5;
igzstream *local_3c0;
string *local_3b8;
int8 local_3b0;
int1 *local_3a8;
int8 local_3a0;
int1 local_398;
int7 uStack_397;
UPGMA_Matrix<double> *local_388;
progress_display local_380 [160];
long local_2e0 [3];
int4 auStack_2c4 [95];
int8 local_148;
int8 local_140;
int8 local_138 [33];
this_00 = (igzstream *)local_2e0;
igzstream::igzstream(this_00);
lVar2 = *(long *)(local_2e0[0] + -0x18);
*(int4 *)((long)auStack_2c4 + lVar2) = 5;
/* try { // try from 00127ebb to 00127ef7 has its CatchHandler @ 0012810a */
std::ios::clear((long)local_2e0 + lVar2,*(int4 *)((long)auStack_2c4 + lVar2 + 4));
gzstreambase::open((gzstreambase *)local_2e0,*(char **)param_1,8);
std::istream::_M_extract<unsigned_long>((ulong *)&local_148);
(*(code *)**(int8 **)this)(this,local_3b0);
/* try { // try from 00127f1e to 00127f3c has its CatchHandler @ 001280fd */
local_3b8 = param_1;
progress_display::progress_display
(local_380,
((double)CONCAT44(DAT_0012b6c0._4_4_,(int)((ulong)local_3b0 >> 0x20)) - _UNK_0012b6d8)
+ ((double)CONCAT44((int4)DAT_0012b6c0,(int)local_3b0) - _DAT_0012b6d0),
"Loading distance matrix","loaded","row");
local_3c0 = (igzstream *)0x0;
if (*(long *)(this + 8) != 0) {
local_388 = this + 0x30;
do {
local_3a0 = 0;
local_398 = 0;
local_3a8 = &local_398;
/* try { // try from 00127f7b to 00127f90 has its CatchHandler @ 00128112 */
std::operator>>((istream *)&local_148,(string *)&local_3a8);
std::vector<StartTree::Cluster<double>,std::allocator<StartTree::Cluster<double>>>::
emplace_back<std::__cxx11::string_const&>
((vector<StartTree::Cluster<double>,std::allocator<StartTree::Cluster<double>>> *)
(this + 0x48),(string *)&local_3a8);
if (*(long *)(this + 8) != 0) {
this_00 = (igzstream *)0x0;
do {
/* try { // try from 00127faf to 00127fb6 has its CatchHandler @ 00128114 */
std::istream::_M_extract<double>((double *)&local_148);
if (this_00 < local_3c0) {
lVar2 = *(long *)(*(long *)(this + 0x20) + (long)local_3c0 * 8);
dVar5 = *(double *)(lVar2 + (long)this_00 * 8);
lVar3 = *(long *)(*(long *)(this + 0x20) + (long)this_00 * 8);
dVar1 = *(double *)(lVar3 + (long)local_3c0 * 8);
if ((dVar5 != dVar1) || (NAN(dVar5) || NAN(dVar1))) {
dVar5 = (dVar5 + dVar1) * DAT_0012b798;
*(double *)(lVar3 + (long)local_3c0 * 8) = dVar5;
*(double *)(lVar2 + (long)this_00 * 8) = dVar5;
}
}
this_00 = this_00 + 1;
} while (this_00 < *(igzstream **)(this + 8));
}
puVar4 = *(int8 **)(this + 0x38);
if (puVar4 == *(int8 **)(this + 0x40)) {
/* try { // try from 0012801a to 00128032 has its CatchHandler @ 00128112 */
std::vector<unsigned_long,std::allocator<unsigned_long>>::_M_realloc_insert<unsigned_long&>
((vector<unsigned_long,std::allocator<unsigned_long>> *)local_388,puVar4,
&local_3c0);
}
else {
*puVar4 = local_3c0;
*(int8 **)(this + 0x38) = puVar4 + 1;
}
progress_display::operator++(local_380);
if (local_3a8 != &local_398) {
operator_delete(local_3a8,CONCAT71(uStack_397,local_398) + 1);
}
local_3c0 = local_3c0 + 1;
} while (local_3c0 < *(igzstream **)(this + 8));
}
/* try { // try from 00128061 to 0012806d has its CatchHandler @ 001280f0 */
gzstreambase::close((gzstreambase *)local_2e0);
progress_display::~progress_display(local_380);
/* try { // try from 0012807d to 00128082 has its CatchHandler @ 001280d8 */
(**(code **)(*(long *)this + 0x18))(this);
local_148 = 0x134188;
local_138[0] = 0x1341b0;
local_140 = 0;
gzstreambase::~gzstreambase((gzstreambase *)local_2e0);
std::ios_base::~ios_base((ios_base *)local_138);
return CONCAT71((int7)((ulong)this_00 >> 8),1) & 0xffffffff;
}
| |
33,609 | downheap | eloqsql/mysys/queues.c | void _downheap(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements >> 1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
while (idx <= half_queue)
{
next_index= idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]=element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
} | O3 | c | downheap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq (%rdi), %rax
movl %esi, %r13d
movq (%rax,%r13,8), %rcx
movl 0x10(%rdi), %edx
movl %edx, -0x30(%rbp)
shrl %edx
movl 0x1c(%rdi), %r15d
movl %edx, -0x2c(%rbp)
cmpl %esi, %edx
jb 0x5f6c6
movq %rdi, %r14
movl 0x18(%rdi), %eax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
addq %rcx, %rax
movq %rax, -0x48(%rbp)
leal (%rbx,%rbx), %r12d
movq (%r14), %rax
cmpl -0x30(%rbp), %r12d
jae 0x5f669
movq 0x8(%r14), %rdi
movl %r12d, %ecx
movq (%rax,%rcx,8), %rsi
movq -0x38(%rbp), %rcx
addq %rcx, %rsi
movl %r12d, %r13d
orl $0x1, %r13d
movq (%rax,%r13,8), %rdx
addq %rcx, %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jg 0x5f663
movl %r12d, %r13d
movq (%r14), %rax
movl %r13d, %r12d
movq 0x8(%r14), %rdi
movl %r12d, %r13d
movq (%rax,%r13,8), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jns 0x5f6b6
movq (%r14), %rcx
movq (%rcx,%r13,8), %rdx
movl %ebx, %eax
movq %rdx, (%rcx,%rax,8)
testq %r15, %r15
je 0x5f6a7
movq (%r14), %rcx
movq (%rcx,%rax,8), %rax
movl %ebx, -0x1(%rax,%r15)
movl %r12d, %ebx
cmpl -0x2c(%rbp), %r12d
jbe 0x5f626
jmp 0x5f6bc
movl %ebx, %r13d
movl %ebx, %r12d
movq (%r14), %rax
movl %r12d, %ebx
movq -0x40(%rbp), %rcx
movq %rcx, (%rax,%r13,8)
testq %r15, %r15
je 0x5f6d4
movl %ebx, -0x1(%rcx,%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _downheap:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov rax, [rdi]
mov r13d, esi
mov rcx, [rax+r13*8]
mov edx, [rdi+10h]
mov [rbp+var_30], edx
shr edx, 1
mov r15d, [rdi+1Ch]
mov [rbp+var_2C], edx
cmp edx, esi
jb loc_5F6C6
mov r14, rdi
mov eax, [rdi+18h]
mov [rbp+var_40], rcx
mov [rbp+var_38], rax
add rax, rcx
mov [rbp+var_48], rax
loc_5F626:
lea r12d, [rbx+rbx]
mov rax, [r14]
cmp r12d, [rbp+var_30]
jnb short loc_5F669
mov rdi, [r14+8]
mov ecx, r12d
mov rsi, [rax+rcx*8]
mov rcx, [rbp+var_38]
add rsi, rcx
mov r13d, r12d
or r13d, 1
mov rdx, [rax+r13*8]
add rdx, rcx
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jg short loc_5F663
mov r13d, r12d
loc_5F663:
mov rax, [r14]
mov r12d, r13d
loc_5F669:
mov rdi, [r14+8]
mov r13d, r12d
mov rsi, [rax+r13*8]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jns short loc_5F6B6
mov rcx, [r14]
mov rdx, [rcx+r13*8]
mov eax, ebx
mov [rcx+rax*8], rdx
test r15, r15
jz short loc_5F6A7
mov rcx, [r14]
mov rax, [rcx+rax*8]
mov [rax+r15-1], ebx
loc_5F6A7:
mov ebx, r12d
cmp r12d, [rbp+var_2C]
jbe loc_5F626
jmp short loc_5F6BC
loc_5F6B6:
mov r13d, ebx
mov r12d, ebx
loc_5F6BC:
mov rax, [r14]
mov ebx, r12d
mov rcx, [rbp+var_40]
loc_5F6C6:
mov [rax+r13*8], rcx
test r15, r15
jz short loc_5F6D4
mov [rcx+r15-1], ebx
loc_5F6D4:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long downheap(long long *a1, unsigned int a2)
{
unsigned int v2; // ebx
long long result; // rax
long long v4; // r13
long long v5; // rcx
long long v6; // r15
unsigned int v7; // r12d
long long v8; // rax
long long v9; // r13
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
unsigned int v13; // [rsp+20h] [rbp-30h]
v2 = a2;
result = *a1;
v4 = a2;
v5 = *(_QWORD *)(*a1 + 8LL * a2);
v13 = *((_DWORD *)a1 + 4);
v6 = *((unsigned int *)a1 + 7);
if ( v13 >> 1 >= a2 )
{
v11 = *(_QWORD *)(*a1 + 8LL * a2);
v12 = *((unsigned int *)a1 + 6);
v10 = v5 + v12;
while ( 1 )
{
v7 = 2 * v2;
v8 = *a1;
if ( 2 * v2 < v13 )
{
v9 = v7 | 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v12 + *(_QWORD *)(v8 + 8 * v9))) <= 0 )
LODWORD(v9) = 2 * v2;
v8 = *a1;
v7 = v9;
}
v4 = v7;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v10)) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v2) = *(_QWORD *)(*a1 + 8LL * v7);
if ( v6 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v6 - 1) = v2;
v2 = v7;
if ( v7 > v13 >> 1 )
goto LABEL_13;
}
v4 = v2;
v7 = v2;
LABEL_13:
result = *a1;
v2 = v7;
v5 = v11;
}
*(_QWORD *)(result + 8 * v4) = v5;
if ( v6 )
*(_DWORD *)(v5 + v6 - 1) = v2;
return result;
}
| _downheap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV RAX,qword ptr [RDI]
MOV R13D,ESI
MOV RCX,qword ptr [RAX + R13*0x8]
MOV EDX,dword ptr [RDI + 0x10]
MOV dword ptr [RBP + -0x30],EDX
SHR EDX,0x1
MOV R15D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x2c],EDX
CMP EDX,ESI
JC 0x0015f6c6
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x18]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RAX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_0015f626:
LEA R12D,[RBX + RBX*0x1]
MOV RAX,qword ptr [R14]
CMP R12D,dword ptr [RBP + -0x30]
JNC 0x0015f669
MOV RDI,qword ptr [R14 + 0x8]
MOV ECX,R12D
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x38]
ADD RSI,RCX
MOV R13D,R12D
OR R13D,0x1
MOV RDX,qword ptr [RAX + R13*0x8]
ADD RDX,RCX
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JG 0x0015f663
MOV R13D,R12D
LAB_0015f663:
MOV RAX,qword ptr [R14]
MOV R12D,R13D
LAB_0015f669:
MOV RDI,qword ptr [R14 + 0x8]
MOV R13D,R12D
MOV RSI,qword ptr [RAX + R13*0x8]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JNS 0x0015f6b6
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RCX + R13*0x8]
MOV EAX,EBX
MOV qword ptr [RCX + RAX*0x8],RDX
TEST R15,R15
JZ 0x0015f6a7
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + R15*0x1 + -0x1],EBX
LAB_0015f6a7:
MOV EBX,R12D
CMP R12D,dword ptr [RBP + -0x2c]
JBE 0x0015f626
JMP 0x0015f6bc
LAB_0015f6b6:
MOV R13D,EBX
MOV R12D,EBX
LAB_0015f6bc:
MOV RAX,qword ptr [R14]
MOV EBX,R12D
MOV RCX,qword ptr [RBP + -0x40]
LAB_0015f6c6:
MOV qword ptr [RAX + R13*0x8],RCX
TEST R15,R15
JZ 0x0015f6d4
MOV dword ptr [RCX + R15*0x1 + -0x1],EBX
LAB_0015f6d4:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _downheap(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
lVar6 = *param_1;
uVar9 = (ulong)param_2;
lVar2 = *(long *)(lVar6 + uVar9 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar7 = uVar1 >> 1;
uVar10 = (ulong)*(uint *)((long)param_1 + 0x1c);
if (param_2 <= uVar7) {
uVar5 = (ulong)*(uint *)(param_1 + 3);
uVar8 = param_2;
do {
uVar3 = uVar8 * 2;
uVar9 = (ulong)uVar3;
lVar6 = *param_1;
if (uVar3 < uVar1) {
uVar9 = (ulong)(uVar3 | 1);
iVar4 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar6 + (ulong)uVar3 * 8) + uVar5,
*(long *)(lVar6 + uVar9 * 8) + uVar5);
if (iVar4 * *(int *)((long)param_1 + 0x24) < 1) {
uVar9 = (ulong)uVar3;
}
lVar6 = *param_1;
}
param_2 = (uint)uVar9;
iVar4 = (*(code *)param_1[5])(param_1[1],*(long *)(lVar6 + uVar9 * 8) + uVar5,uVar5 + lVar2);
if (-1 < iVar4 * *(int *)((long)param_1 + 0x24)) {
uVar9 = (ulong)uVar8;
param_2 = uVar8;
break;
}
*(int8 *)(*param_1 + (ulong)uVar8 * 8) = *(int8 *)(*param_1 + uVar9 * 8);
if (uVar10 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)uVar8 * 8) + -1 + uVar10) = uVar8;
}
uVar8 = param_2;
} while (param_2 <= uVar7);
lVar6 = *param_1;
}
*(long *)(lVar6 + uVar9 * 8) = lVar2;
if (uVar10 != 0) {
*(uint *)(lVar2 + -1 + uVar10) = param_2;
}
return;
}
| |
33,610 | mju_outsideBox | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_misc.c | int mju_outsideBox(const mjtNum point[3], const mjtNum pos[3], const mjtNum mat[9],
const mjtNum size[3], mjtNum inflate) {
// check inflation coefficient
if (inflate < 1) {
mjERROR("inflation coefficient must be >= 1")
}
// vector from pos to point, projected to box frame
mjtNum vec[3] = {point[0]-pos[0], point[1]-pos[1], point[2]-pos[2]};
mju_rotVecMatT(vec, vec, mat);
// big: inflated box
mjtNum big[3] = {size[0], size[1], size[2]};
if (inflate > 1) {
mju_scl3(big, big, inflate);
}
// check if outside big box
if (vec[0] > big[0] || vec[0] < -big[0] ||
vec[1] > big[1] || vec[1] < -big[1] ||
vec[2] > big[2] || vec[2] < -big[2]) {
return 1;
}
// quick return if no inflation
if (inflate == 1) {
return -1;
}
// check if inside small (deflated) box
mjtNum small[3] = {size[0]/inflate, size[1]/inflate, size[2]/inflate};
if (vec[0] < small[0] && vec[0] > -small[0] &&
vec[1] < small[1] && vec[1] > -small[1] &&
vec[2] < small[2] && vec[2] > -small[2]) {
return -1;
}
// within margin between small and big box
return 0;
} | O3 | c | mju_outsideBox:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x430, %rsp # imm = 0x430
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
vmovsd 0x11e53f(%rip), %xmm1 # 0x1bcbd0
vmovapd %xmm0, 0x20(%rsp)
vucomisd %xmm0, %xmm1
jbe 0x9e6dd
leaq 0x12ff0f(%rip), %rsi # 0x1ce5b3
leaq 0x30(%rsp), %r13
movl $0x400, %edx # imm = 0x400
movq %r13, %rdi
callq 0x2d240
movabsq $0x31203d3e206562, %rax # imm = 0x31203D3E206562
movq %rax, 0x2b(%r13)
vmovupd 0x12fef6(%rip), %ymm0 # 0x1ce5c2
vmovupd %ymm0, 0xe(%r13)
movq %r13, %rdi
vzeroupper
callq 0x2d260
vmovupd (%r12), %xmm0
vsubpd (%r15), %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
vmovapd %xmm0, (%rdi)
vmovsd 0x10(%r12), %xmm0
vsubsd 0x10(%r15), %xmm0, %xmm0
vmovsd %xmm0, 0x10(%rdi)
movq %rdi, %rsi
movq %r14, %rdx
callq 0x2d110
vmovupd (%rbx), %xmm1
vmovapd %xmm1, (%rsp)
vmovsd 0x10(%rbx), %xmm0
vmovsd %xmm0, 0x10(%rsp)
vmovapd 0x20(%rsp), %xmm0
vucomisd 0x11e4a0(%rip), %xmm0 # 0x1bcbd0
jbe 0x9e74b
movq %rsp, %r14
movq %r14, %rdi
movq %r14, %rsi
callq 0x2d190
vmovapd 0x20(%rsp), %xmm0
vmovsd (%r14), %xmm1
vmovsd 0x30(%rsp), %xmm2
vucomisd %xmm1, %xmm2
movl $0x1, %eax
ja 0x9e829
vmovddup 0x11e438(%rip), %xmm7 # xmm7 = mem[0,0]
vxorpd %xmm7, %xmm1, %xmm1
vucomisd %xmm2, %xmm1
ja 0x9e829
vmovsd 0x38(%rsp), %xmm1
vmovsd 0x8(%rsp), %xmm3
vucomisd %xmm3, %xmm1
ja 0x9e829
vxorpd %xmm7, %xmm3, %xmm3
vucomisd %xmm1, %xmm3
ja 0x9e829
vmovsd 0x40(%rsp), %xmm3
vmovsd 0x10(%rsp), %xmm4
vucomisd %xmm4, %xmm3
ja 0x9e829
vxorpd %xmm7, %xmm4, %xmm4
vucomisd %xmm3, %xmm4
ja 0x9e829
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
vucomisd 0x11e40d(%rip), %xmm0 # 0x1bcbd0
jne 0x9e7c7
jnp 0x9e829
vmovsd 0x10(%rbx), %xmm4
vdivsd %xmm0, %xmm4, %xmm4
vmovupd (%rbx), %xmm5
vmovddup %xmm0, %xmm6 # xmm6 = xmm0[0,0]
vdivpd %xmm6, %xmm5, %xmm5
vxorpd %xmm7, %xmm5, %xmm6
vucomisd %xmm6, %xmm2
seta %al
vunpcklpd %xmm1, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm1[0]
vcmpltpd %xmm5, %xmm2, %xmm2
vmovmskpd %xmm2, %ecx
andb %cl, %al
shrb %cl
vshufpd $0x1, %xmm5, %xmm5, %xmm2 # xmm2 = xmm5[1,0]
vxorpd %xmm7, %xmm2, %xmm2
vucomisd %xmm2, %xmm1
seta %dl
andb %cl, %dl
andb %al, %dl
vxorpd %xmm7, %xmm4, %xmm0
vcmpltpd %xmm4, %xmm3, %xmm1
vcmpltpd %xmm3, %xmm0, %xmm0
vandpd %xmm0, %xmm1, %xmm0
vmovd %xmm0, %eax
andb %dl, %al
movzbl %al, %eax
negl %eax
addq $0x430, %rsp # imm = 0x430
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| mju_outsideBox:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 430h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
vmovsd xmm1, cs:qword_1BCBD0
vmovapd [rsp+458h+var_438], xmm0
vucomisd xmm1, xmm0
jbe short loc_9E6DD
lea rsi, aMjuOutsidebox_0; "mju_outsideBox"
lea r13, [rsp+458h+var_428]
mov edx, 400h
mov rdi, r13
call _strncpy
mov rax, 31203D3E206562h
mov [r13+2Bh], rax
vmovupd ymm0, cs:ymmword_1CE5C2
vmovupd ymmword ptr [r13+0Eh], ymm0
mov rdi, r13
vzeroupper
call _mju_error_raw
loc_9E6DD:
vmovupd xmm0, xmmword ptr [r12]
vsubpd xmm0, xmm0, xmmword ptr [r15]
lea rdi, [rsp+458h+var_428]
vmovapd xmmword ptr [rdi], xmm0
vmovsd xmm0, qword ptr [r12+10h]
vsubsd xmm0, xmm0, qword ptr [r15+10h]
vmovsd qword ptr [rdi+10h], xmm0
mov rsi, rdi
mov rdx, r14
call _mju_rotVecMatT
vmovupd xmm1, xmmword ptr [rbx]
vmovapd [rsp+458h+var_458], xmm1
vmovsd xmm0, qword ptr [rbx+10h]
vmovsd [rsp+458h+var_448], xmm0
vmovapd xmm0, [rsp+458h+var_438]
vucomisd xmm0, cs:qword_1BCBD0
jbe short loc_9E74B
mov r14, rsp
mov rdi, r14
mov rsi, r14
call _mju_scl3
vmovapd xmm0, [rsp+458h+var_438]
vmovsd xmm1, qword ptr [r14]
loc_9E74B:
vmovsd xmm2, [rsp+458h+var_428]
vucomisd xmm2, xmm1
mov eax, 1
ja loc_9E829
vmovddup xmm7, cs:qword_1BCBA0
vxorpd xmm1, xmm1, xmm7
vucomisd xmm1, xmm2
ja loc_9E829
vmovsd xmm1, [rsp+458h+var_420]
vmovsd xmm3, qword ptr [rsp+458h+var_458+8]
vucomisd xmm1, xmm3
ja loc_9E829
vxorpd xmm3, xmm3, xmm7
vucomisd xmm3, xmm1
ja loc_9E829
vmovsd xmm3, [rsp+458h+var_418]
vmovsd xmm4, [rsp+458h+var_448]
vucomisd xmm3, xmm4
ja short loc_9E829
vxorpd xmm4, xmm4, xmm7
vucomisd xmm4, xmm3
ja short loc_9E829
mov eax, 0FFFFFFFFh
vucomisd xmm0, cs:qword_1BCBD0
jnz short loc_9E7C7
jnp short loc_9E829
loc_9E7C7:
vmovsd xmm4, qword ptr [rbx+10h]
vdivsd xmm4, xmm4, xmm0
vmovupd xmm5, xmmword ptr [rbx]
vmovddup xmm6, xmm0
vdivpd xmm5, xmm5, xmm6
vxorpd xmm6, xmm5, xmm7
vucomisd xmm2, xmm6
setnbe al
vunpcklpd xmm2, xmm2, xmm1
vcmpltpd xmm2, xmm2, xmm5
vmovmskpd ecx, xmm2
and al, cl
shr cl, 1
vshufpd xmm2, xmm5, xmm5, 1
vxorpd xmm2, xmm2, xmm7
vucomisd xmm1, xmm2
setnbe dl
and dl, cl
and dl, al
vxorpd xmm0, xmm4, xmm7
vcmpltpd xmm1, xmm3, xmm4
vcmpltpd xmm0, xmm0, xmm3
vandpd xmm0, xmm1, xmm0
vmovd eax, xmm0
and al, dl
movzx eax, al
neg eax
loc_9E829:
add rsp, 430h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long mju_outsideBox(long long a1, __m128 _XMM0, long long a3, long long a4, long long a5)
{
char v16; // cf
char v17; // zf
char v18; // pf
long long result; // rax
__int128 v49; // [rsp+0h] [rbp-458h] BYREF
_QWORD v52[133]; // [rsp+30h] [rbp-428h] BYREF
_RBX = a5;
_R12 = a1;
__asm
{
vmovsd xmm1, cs:qword_1BCBD0
vmovapd [rsp+458h+var_438], xmm0
vucomisd xmm1, xmm0
}
_R13 = v52;
strncpy(v52, "mju_outsideBox", 1024LL);
*(_QWORD *)((char *)&v52[5] + 3) = 0x31203D3E206562LL;
__asm
{
vmovupd ymm0, cs:ymmword_1CE5C2
vmovupd ymmword ptr [r13+0Eh], ymm0
vzeroupper
}
mju_error_raw(v52);
__asm
{
vmovupd xmm0, xmmword ptr [r12]
vsubpd xmm0, xmm0, xmmword ptr [r15]
}
_RDI = v52;
__asm
{
vmovapd xmmword ptr [rdi], xmm0
vmovsd xmm0, qword ptr [r12+10h]
vsubsd xmm0, xmm0, qword ptr [r15+10h]
vmovsd qword ptr [rdi+10h], xmm0
}
mju_rotVecMatT(v52, v52, a4);
__asm
{
vmovupd xmm1, xmmword ptr [rbx]
vmovapd [rsp+458h+var_458], xmm1
vmovsd xmm0, qword ptr [rbx+10h]
vmovsd [rsp+458h+var_448], xmm0
vmovapd xmm0, [rsp+458h+var_438]
vucomisd xmm0, cs:qword_1BCBD0
}
if ( !(v16 | v17) )
{
_R14 = &v49;
mju_scl3(&v49, &v49, *(double *)&_XMM0);
__asm
{
vmovapd xmm0, [rsp+458h+var_438]
vmovsd xmm1, qword ptr [r14]
}
}
__asm
{
vmovsd xmm2, [rsp+458h+var_428]
vucomisd xmm2, xmm1
}
result = 1LL;
if ( v16 | v17 )
{
__asm
{
vmovddup xmm7, cs:qword_1BCBA0
vxorpd xmm1, xmm1, xmm7
vucomisd xmm1, xmm2
vmovsd xmm1, [rsp+458h+var_420]
vmovsd xmm3, qword ptr [rsp+458h+var_458+8]
vucomisd xmm1, xmm3
vxorpd xmm3, xmm3, xmm7
vucomisd xmm3, xmm1
vmovsd xmm3, [rsp+458h+var_418]
vmovsd xmm4, [rsp+458h+var_448]
vucomisd xmm3, xmm4
vxorpd xmm4, xmm4, xmm7
vucomisd xmm4, xmm3
}
result = 0xFFFFFFFFLL;
__asm { vucomisd xmm0, cs:qword_1BCBD0 }
if ( !v17 || v18 )
{
__asm
{
vmovsd xmm4, qword ptr [rbx+10h]
vdivsd xmm4, xmm4, xmm0
vmovupd xmm5, xmmword ptr [rbx]
vmovddup xmm6, xmm0
vdivpd xmm5, xmm5, xmm6
vxorpd xmm6, xmm5, xmm7
vucomisd xmm2, xmm6
vunpcklpd xmm2, xmm2, xmm1
vcmpltpd xmm2, xmm2, xmm5
vmovmskpd ecx, xmm2
vshufpd xmm2, xmm5, xmm5, 1
vxorpd xmm2, xmm2, xmm7
vucomisd xmm1, xmm2
vxorpd xmm0, xmm4, xmm7
vcmpltpd xmm1, xmm3, xmm4
vcmpltpd xmm0, xmm0, xmm3
vandpd xmm0, xmm1, xmm0
vmovd eax, xmm0
}
return (unsigned int)-((unsigned __int8)_ECX & !(v16 | v17) & ((unsigned __int8)_ECX >> 1) & !(_ECX & 1 | ((unsigned __int8)_ECX >> 1 == 0)) & (unsigned __int8)_EAX);
}
}
return result;
}
| mju_outsideBox:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x430
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
VMOVSD XMM1,qword ptr [0x002bcbd0]
VMOVAPD xmmword ptr [RSP + 0x20],XMM0
VUCOMISD XMM1,XMM0
JBE 0x0019e6dd
LEA RSI,[0x2ce5b3]
LEA R13,[RSP + 0x30]
MOV EDX,0x400
MOV RDI,R13
CALL 0x0012d240
MOV RAX,0x31203d3e206562
MOV qword ptr [R13 + 0x2b],RAX
VMOVUPD YMM0,ymmword ptr [0x002ce5c2]
VMOVUPD ymmword ptr [R13 + 0xe],YMM0
MOV RDI,R13
VZEROUPPER
CALL 0x0012d260
LAB_0019e6dd:
VMOVUPD XMM0,xmmword ptr [R12]
VSUBPD XMM0,XMM0,xmmword ptr [R15]
LEA RDI,[RSP + 0x30]
VMOVAPD xmmword ptr [RDI],XMM0
VMOVSD XMM0,qword ptr [R12 + 0x10]
VSUBSD XMM0,XMM0,qword ptr [R15 + 0x10]
VMOVSD qword ptr [RDI + 0x10],XMM0
MOV RSI,RDI
MOV RDX,R14
CALL 0x0012d110
VMOVUPD XMM1,xmmword ptr [RBX]
VMOVAPD xmmword ptr [RSP],XMM1
VMOVSD XMM0,qword ptr [RBX + 0x10]
VMOVSD qword ptr [RSP + 0x10],XMM0
VMOVAPD XMM0,xmmword ptr [RSP + 0x20]
VUCOMISD XMM0,qword ptr [0x002bcbd0]
JBE 0x0019e74b
MOV R14,RSP
MOV RDI,R14
MOV RSI,R14
CALL 0x0012d190
VMOVAPD XMM0,xmmword ptr [RSP + 0x20]
VMOVSD XMM1,qword ptr [R14]
LAB_0019e74b:
VMOVSD XMM2,qword ptr [RSP + 0x30]
VUCOMISD XMM2,XMM1
MOV EAX,0x1
JA 0x0019e829
VMOVDDUP XMM7,qword ptr [0x002bcba0]
VXORPD XMM1,XMM1,XMM7
VUCOMISD XMM1,XMM2
JA 0x0019e829
VMOVSD XMM1,qword ptr [RSP + 0x38]
VMOVSD XMM3,qword ptr [RSP + 0x8]
VUCOMISD XMM1,XMM3
JA 0x0019e829
VXORPD XMM3,XMM3,XMM7
VUCOMISD XMM3,XMM1
JA 0x0019e829
VMOVSD XMM3,qword ptr [RSP + 0x40]
VMOVSD XMM4,qword ptr [RSP + 0x10]
VUCOMISD XMM3,XMM4
JA 0x0019e829
VXORPD XMM4,XMM4,XMM7
VUCOMISD XMM4,XMM3
JA 0x0019e829
MOV EAX,0xffffffff
VUCOMISD XMM0,qword ptr [0x002bcbd0]
JNZ 0x0019e7c7
JNP 0x0019e829
LAB_0019e7c7:
VMOVSD XMM4,qword ptr [RBX + 0x10]
VDIVSD XMM4,XMM4,XMM0
VMOVUPD XMM5,xmmword ptr [RBX]
VMOVDDUP XMM6,XMM0
VDIVPD XMM5,XMM5,XMM6
VXORPD XMM6,XMM5,XMM7
VUCOMISD XMM2,XMM6
SETA AL
VUNPCKLPD XMM2,XMM2,XMM1
VCMPLTPD XMM2,XMM2,XMM5
VMOVMSKPD ECX,XMM2
AND AL,CL
SHR CL,0x1
VSHUFPD XMM2,XMM5,XMM5,0x1
VXORPD XMM2,XMM2,XMM7
VUCOMISD XMM1,XMM2
SETA DL
AND DL,CL
AND DL,AL
VXORPD XMM0,XMM4,XMM7
VCMPLTPD XMM1,XMM3,XMM4
VCMPLTPD XMM0,XMM0,XMM3
VANDPD XMM0,XMM1,XMM0
VMOVD EAX,XMM0
AND AL,DL
MOVZX EAX,AL
NEG EAX
LAB_0019e829:
ADD RSP,0x430
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int mju_outsideBox(double param_1,int1 (*param_2) [16],int1 (*param_3) [16],
int8 param_4,int1 (*param_5) [16])
{
int1 auVar1 [16];
double dVar2;
double dVar3;
int iVar4;
int4 uVar5;
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
double local_458;
double dStack_450;
double local_448;
double local_438;
double local_428;
int6 uStack_420;
int2 uStack_41a;
int6 uStack_418;
int2 uStack_412;
int6 uStack_410;
char acStack_40a [8];
int5 uStack_402;
int3 uStack_3fd;
int5 uStack_3fa;
local_438 = param_1;
if (param_1 < DAT_002bcbd0) {
strncpy((char *)&local_428,"mju_outsideBox",0x400);
uStack_3fa = 0x31203d3e;
uStack_41a = (int2)s___inflation_coefficient_must_be_>_002ce5c2._0_8_;
uStack_418 = SUB86(s___inflation_coefficient_must_be_>_002ce5c2._0_8_,2);
uStack_412 = (int2)s___inflation_coefficient_must_be_>_002ce5c2._8_8_;
uStack_410 = SUB86(s___inflation_coefficient_must_be_>_002ce5c2._8_8_,2);
acStack_40a[0] = s___inflation_coefficient_must_be_>_002ce5c2[0x10];
acStack_40a[1] = s___inflation_coefficient_must_be_>_002ce5c2[0x11];
acStack_40a[2] = s___inflation_coefficient_must_be_>_002ce5c2[0x12];
acStack_40a[3] = s___inflation_coefficient_must_be_>_002ce5c2[0x13];
acStack_40a[4] = s___inflation_coefficient_must_be_>_002ce5c2[0x14];
acStack_40a[5] = s___inflation_coefficient_must_be_>_002ce5c2[0x15];
acStack_40a[6] = s___inflation_coefficient_must_be_>_002ce5c2[0x16];
acStack_40a[7] = s___inflation_coefficient_must_be_>_002ce5c2[0x17];
uStack_402 = (int5)s___inflation_coefficient_must_be_>_002ce5c2._24_8_;
uStack_3fd = SUB83(s___inflation_coefficient_must_be_>_002ce5c2._24_8_,5);
mju_error_raw(&local_428);
}
auVar8 = vsubpd_avx(*param_2,*param_3);
local_428 = auVar8._0_8_;
uStack_420 = auVar8._8_6_;
uStack_41a = auVar8._14_2_;
dVar2 = *(double *)param_2[1] - *(double *)param_3[1];
uStack_418 = SUB86(dVar2,0);
uStack_412 = (int2)((ulong)dVar2 >> 0x30);
mju_rotVecMatT(&local_428,&local_428,param_4);
local_458 = *(double *)*param_5;
dStack_450 = *(double *)(*param_5 + 8);
local_448 = *(double *)param_5[1];
if (DAT_002bcbd0 < local_438) {
mju_scl3(&local_458,&local_458);
}
auVar8._8_8_ = 0;
auVar8._0_8_ = local_428;
iVar4 = 1;
if ((local_428 <= local_458) && ((double)((ulong)local_458 ^ DAT_002bcba0) <= local_428)) {
dVar2 = (double)CONCAT26(uStack_41a,uStack_420);
auVar7._8_8_ = 0;
auVar7._0_8_ = dVar2;
if ((dVar2 <= dStack_450) && ((double)((ulong)dStack_450 ^ DAT_002bcba0) <= dVar2)) {
dVar3 = (double)CONCAT26(uStack_412,uStack_418);
auVar9._8_8_ = 0;
auVar9._0_8_ = dVar3;
if ((dVar3 <= local_448) && ((double)((ulong)local_448 ^ DAT_002bcba0) <= dVar3)) {
iVar4 = -1;
if ((local_438 != DAT_002bcbd0) || (NAN(local_438) || NAN(DAT_002bcbd0))) {
auVar10._0_8_ = *(double *)param_5[1] / local_438;
auVar10._8_8_ = 0;
auVar11._8_8_ = local_438;
auVar11._0_8_ = local_438;
auVar11 = vdivpd_avx(*param_5,auVar11);
auVar8 = vunpcklpd_avx(auVar8,auVar7);
auVar8 = vcmppd_avx(auVar8,auVar11,1);
uVar5 = vmovmskpd_avx(auVar8);
auVar1 = vshufpd_avx(auVar11,auVar11,1);
auVar6._0_8_ = (ulong)auVar10._0_8_ ^ DAT_002bcba0;
auVar6._8_8_ = DAT_002bcba0;
auVar8 = vcmppd_avx(auVar9,auVar10,1);
auVar7 = vcmppd_avx(auVar6,auVar9,1);
auVar8 = vandpd_avx(auVar8,auVar7);
iVar4 = -(uint)(byte)(auVar8[0] &
(double)(auVar1._0_8_ ^ DAT_002bcba0) < dVar2 & (byte)uVar5 >> 1 &
(double)(auVar11._0_8_ ^ DAT_002bcba0) < local_428 & (byte)uVar5);
}
}
}
}
return iVar4;
}
| |
33,611 | check_exp_underflow_overflow | bluesky950520[P]quickjs/libbf.c | static int check_exp_underflow_overflow(bf_context_t *s, bf_t *r,
const bf_t *a_low, const bf_t *a_high,
limb_t prec, bf_flags_t flags)
{
bf_t T_s, *T = &T_s;
bf_t log2_s, *log2 = &log2_s;
slimb_t e_min, e_max;
if (a_high->expn <= 0)
return 0;
e_max = (limb_t)1 << (bf_get_exp_bits(flags) - 1);
e_min = -e_max + 3;
if (flags & BF_FLAG_SUBNORMAL)
e_min -= (prec - 1);
bf_init(s, T);
bf_init(s, log2);
bf_const_log2(log2, LIMB_BITS, BF_RNDU);
bf_mul_ui(T, log2, e_max, LIMB_BITS, BF_RNDU);
/* a_low > e_max * log(2) implies exp(a) > e_max */
if (bf_cmp_lt(T, a_low) > 0) {
/* overflow */
bf_delete(T);
bf_delete(log2);
return bf_set_overflow(r, 0, prec, flags);
}
/* a_high < (e_min - 2) * log(2) implies exp(a) < (e_min - 2) */
bf_const_log2(log2, LIMB_BITS, BF_RNDD);
bf_mul_si(T, log2, e_min - 2, LIMB_BITS, BF_RNDD);
if (bf_cmp_lt(a_high, T)) {
int rnd_mode = flags & BF_RND_MASK;
/* underflow */
bf_delete(T);
bf_delete(log2);
if (rnd_mode == BF_RNDU) {
/* set the smallest value */
bf_set_ui(r, 1);
r->expn = e_min;
} else {
bf_set_zero(r, 0);
}
return BF_ST_UNDERFLOW | BF_ST_INEXACT;
}
bf_delete(log2);
bf_delete(T);
return 0;
} | O2 | c | check_exp_underflow_overflow:
cmpq $0x0, 0x10(%rcx)
jle 0x77ef3
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %r9d, %eax
shrl $0x5, %eax
andl $0x3f, %eax
movb $0x3c, %cl
subb %al, %cl
cmpl $0x3f, %eax
movzbl %cl, %eax
pushq $0x3d
popq %rcx
cmovnel %eax, %ecx
pushq $0x1
popq %r14
shlq %cl, %r14
movq %r8, 0x20(%rsp)
leaq -0x1(%r8), %rax
xorl %r13d, %r13d
testb $0x8, %r9b
cmovneq %rax, %r13
leaq 0x50(%rsp), %r12
movq %rdi, (%r12)
andl $0x0, 0x8(%r12)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r12)
movl %r9d, 0xc(%rsp)
leaq 0x28(%rsp), %rbx
movq %rdi, (%rbx)
andl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movq %rax, 0x10(%rbx)
movups %xmm0, 0x18(%rbx)
pushq $0x40
popq %rsi
pushq $0x3
popq %rbp
movq %rbx, %rdi
movq %rdx, %r15
movl %ebp, %edx
callq 0x77b15
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
pushq $0x40
popq %rcx
movl %ebp, %r8d
callq 0x75ada
movq %r12, %rdi
movq %r15, %rsi
callq 0x7d9f6
testl %eax, %eax
je 0x77ef6
leaq 0x50(%rsp), %rdi
callq 0x7500e
leaq 0x28(%rsp), %rdi
callq 0x7500e
movq 0x10(%rsp), %rdi
xorl %esi, %esi
movq 0x20(%rsp), %rdx
movl 0xc(%rsp), %ecx
callq 0x78e9f
jmp 0x77fa2
xorl %eax, %eax
retq
addq %r13, %r14
leaq 0x28(%rsp), %rbx
pushq $0x40
popq %r15
pushq $0x2
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x77b15
pushq $0x1
popq %rdx
subq %r14, %rdx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %ebp, %r8d
callq 0x75b57
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x7d9f6
testl %eax, %eax
je 0x77f7b
movl 0xc(%rsp), %ebx
andl $0x7, %ebx
leaq 0x50(%rsp), %rdi
callq 0x7500e
leaq 0x28(%rsp), %rdi
callq 0x7500e
cmpl $0x3, %ebx
jne 0x77f93
pushq $0x3
popq %rbx
subq %r14, %rbx
pushq $0x1
popq %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x73106
movq %rbx, 0x10(%r14)
jmp 0x77f9f
leaq 0x28(%rsp), %rdi
callq 0x7500e
leaq 0x50(%rsp), %rdi
callq 0x7500e
xorl %eax, %eax
jmp 0x77fa2
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x731c2
pushq $0x18
popq %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| check_exp_underflow_overflow:
cmp qword ptr [rcx+10h], 0
jle loc_77EF3
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_90], rcx
mov [rsp+0A8h+var_98], rsi
mov eax, r9d
shr eax, 5
and eax, 3Fh
mov cl, 3Ch ; '<'
sub cl, al
cmp eax, 3Fh ; '?'
movzx eax, cl
push 3Dh ; '='
pop rcx
cmovnz ecx, eax
push 1
pop r14
shl r14, cl
mov [rsp+0A8h+var_88], r8
lea rax, [r8-1]
xor r13d, r13d
test r9b, 8
cmovnz r13, rax
lea r12, [rsp+0A8h+var_58]
mov [r12], rdi
and dword ptr [r12+8], 0
mov rax, 8000000000000000h
mov [r12+10h], rax
mov [rsp+0A8h+var_9C], r9d
lea rbx, [rsp+0A8h+var_80]
mov [rbx], rdi
and dword ptr [rbx+8], 0
xorps xmm0, xmm0
movups xmmword ptr [r12+18h], xmm0
mov [rbx+10h], rax
movups xmmword ptr [rbx+18h], xmm0
push 40h ; '@'
pop rsi
push 3
pop rbp
mov rdi, rbx
mov r15, rdx
mov edx, ebp
call bf_const_log2
mov rdi, r12
mov rsi, rbx
mov rdx, r14
push 40h ; '@'
pop rcx
mov r8d, ebp
call bf_mul_ui
mov rdi, r12
mov rsi, r15
call bf_cmp_lt_0
test eax, eax
jz short loc_77EF6
lea rdi, [rsp+0A8h+var_58]
call bf_delete_0
lea rdi, [rsp+0A8h+var_80]
call bf_delete_0
mov rdi, [rsp+0A8h+var_98]
xor esi, esi
mov rdx, [rsp+0A8h+var_88]
mov ecx, [rsp+0A8h+var_9C]
call bf_set_overflow
jmp loc_77FA2
loc_77EF3:
xor eax, eax
retn
loc_77EF6:
add r14, r13
lea rbx, [rsp+0A8h+var_80]
push 40h ; '@'
pop r15
push 2
pop rbp
mov rdi, rbx
mov rsi, r15
mov edx, ebp
call bf_const_log2
push 1
pop rdx
sub rdx, r14
lea r12, [rsp+0A8h+var_58]
mov rdi, r12
mov rsi, rbx
mov rcx, r15
mov r8d, ebp
call bf_mul_si
mov rdi, [rsp+0A8h+var_90]
mov rsi, r12
call bf_cmp_lt_0
test eax, eax
jz short loc_77F7B
mov ebx, [rsp+0A8h+var_9C]
and ebx, 7
lea rdi, [rsp+0A8h+var_58]
call bf_delete_0
lea rdi, [rsp+0A8h+var_80]
call bf_delete_0
cmp ebx, 3
jnz short loc_77F93
push 3
pop rbx
sub rbx, r14
push 1
pop rsi
mov r14, [rsp+0A8h+var_98]
mov rdi, r14
call bf_set_ui
mov [r14+10h], rbx
jmp short loc_77F9F
loc_77F7B:
lea rdi, [rsp+0A8h+var_80]
call bf_delete_0
lea rdi, [rsp+0A8h+var_58]
call bf_delete_0
xor eax, eax
jmp short loc_77FA2
loc_77F93:
mov rdi, [rsp+0A8h+var_98]
xor esi, esi
call bf_set_zero
loc_77F9F:
push 18h
pop rax
loc_77FA2:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long check_exp_underflow_overflow(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
unsigned int a6)
{
int v6; // eax
bool v7; // zf
char v8; // al
char v9; // cl
unsigned long long v10; // r14
long long v11; // r13
long long v14; // r14
long long v18; // [rsp+1Ch] [rbp-80h] BYREF
int v19; // [rsp+24h] [rbp-78h]
unsigned long long v20; // [rsp+2Ch] [rbp-70h]
__int128 v21; // [rsp+34h] [rbp-68h]
long long v22; // [rsp+44h] [rbp-58h] BYREF
int v23; // [rsp+4Ch] [rbp-50h]
unsigned long long v24; // [rsp+54h] [rbp-48h]
__int128 v25; // [rsp+5Ch] [rbp-40h]
if ( *(long long *)(a4 + 16) <= 0 )
return 0LL;
v6 = (a6 >> 5) & 0x3F;
v7 = v6 == 63;
v8 = 60 - v6;
v9 = 61;
if ( !v7 )
v9 = v8;
v10 = 1LL << v9;
v11 = 0LL;
if ( (a6 & 8) != 0 )
v11 = a5 - 1;
v22 = a1;
v23 = 0;
v24 = 0x8000000000000000LL;
v18 = a1;
v19 = 0;
v25 = 0LL;
v20 = 0x8000000000000000LL;
v21 = 0LL;
bf_const_log2(&v18, 64LL, 3LL);
bf_mul_ui(&v22, &v18, v10, 64LL, 3u);
if ( (unsigned int)bf_cmp_lt_0(&v22, a3) )
{
bf_delete_0(&v22);
bf_delete_0(&v18);
return bf_set_overflow(a2, 0LL, a5, a6);
}
else
{
v14 = v11 + v10;
bf_const_log2(&v18, 64LL, 2LL);
bf_mul_si(&v22, &v18, 1 - v14, 64LL, 2u);
if ( (unsigned int)bf_cmp_lt_0(a4, &v22) )
{
bf_delete_0(&v22);
bf_delete_0(&v18);
if ( (a6 & 7) == 3 )
{
bf_set_ui(a2, 1uLL);
*(_QWORD *)(a2 + 16) = 3 - v14;
}
else
{
bf_set_zero(a2, 0);
}
return 24LL;
}
else
{
bf_delete_0(&v18);
bf_delete_0(&v22);
return 0LL;
}
}
}
| check_exp_underflow_overflow:
CMP qword ptr [RCX + 0x10],0x0
JLE 0x00177ef3
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],RSI
MOV EAX,R9D
SHR EAX,0x5
AND EAX,0x3f
MOV CL,0x3c
SUB CL,AL
CMP EAX,0x3f
MOVZX EAX,CL
PUSH 0x3d
POP RCX
CMOVNZ ECX,EAX
PUSH 0x1
POP R14
SHL R14,CL
MOV qword ptr [RSP + 0x20],R8
LEA RAX,[R8 + -0x1]
XOR R13D,R13D
TEST R9B,0x8
CMOVNZ R13,RAX
LEA R12,[RSP + 0x50]
MOV qword ptr [R12],RDI
AND dword ptr [R12 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R12 + 0x10],RAX
MOV dword ptr [RSP + 0xc],R9D
LEA RBX,[RSP + 0x28]
MOV qword ptr [RBX],RDI
AND dword ptr [RBX + 0x8],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x18],XMM0
MOV qword ptr [RBX + 0x10],RAX
MOVUPS xmmword ptr [RBX + 0x18],XMM0
PUSH 0x40
POP RSI
PUSH 0x3
POP RBP
MOV RDI,RBX
MOV R15,RDX
MOV EDX,EBP
CALL 0x00177b15
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R14
PUSH 0x40
POP RCX
MOV R8D,EBP
CALL 0x00175ada
MOV RDI,R12
MOV RSI,R15
CALL 0x0017d9f6
TEST EAX,EAX
JZ 0x00177ef6
LEA RDI,[RSP + 0x50]
CALL 0x0017500e
LEA RDI,[RSP + 0x28]
CALL 0x0017500e
MOV RDI,qword ptr [RSP + 0x10]
XOR ESI,ESI
MOV RDX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0xc]
CALL 0x00178e9f
JMP 0x00177fa2
LAB_00177ef3:
XOR EAX,EAX
RET
LAB_00177ef6:
ADD R14,R13
LEA RBX,[RSP + 0x28]
PUSH 0x40
POP R15
PUSH 0x2
POP RBP
MOV RDI,RBX
MOV RSI,R15
MOV EDX,EBP
CALL 0x00177b15
PUSH 0x1
POP RDX
SUB RDX,R14
LEA R12,[RSP + 0x50]
MOV RDI,R12
MOV RSI,RBX
MOV RCX,R15
MOV R8D,EBP
CALL 0x00175b57
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R12
CALL 0x0017d9f6
TEST EAX,EAX
JZ 0x00177f7b
MOV EBX,dword ptr [RSP + 0xc]
AND EBX,0x7
LEA RDI,[RSP + 0x50]
CALL 0x0017500e
LEA RDI,[RSP + 0x28]
CALL 0x0017500e
CMP EBX,0x3
JNZ 0x00177f93
PUSH 0x3
POP RBX
SUB RBX,R14
PUSH 0x1
POP RSI
MOV R14,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x00173106
MOV qword ptr [R14 + 0x10],RBX
JMP 0x00177f9f
LAB_00177f7b:
LEA RDI,[RSP + 0x28]
CALL 0x0017500e
LEA RDI,[RSP + 0x50]
CALL 0x0017500e
XOR EAX,EAX
JMP 0x00177fa2
LAB_00177f93:
MOV RDI,qword ptr [RSP + 0x10]
XOR ESI,ESI
CALL 0x001731c2
LAB_00177f9f:
PUSH 0x18
POP RAX
LAB_00177fa2:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
check_exp_underflow_overflow
(int8 param_1,long param_2,int8 param_3,long param_4,long param_5,uint param_6
)
{
uint uVar1;
int iVar2;
int8 uVar3;
byte bVar4;
long lVar5;
long lVar6;
int8 local_80;
int4 local_78;
int8 local_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if (0 < *(long *)(param_4 + 0x10)) {
uVar1 = param_6 >> 5 & 0x3f;
bVar4 = 0x3d;
if (uVar1 != 0x3f) {
bVar4 = 0x3c - (char)uVar1;
}
lVar6 = 1L << (bVar4 & 0x3f);
lVar5 = 0;
if ((param_6 & 8) != 0) {
lVar5 = param_5 + -1;
}
local_50 = 0;
local_48 = 0x8000000000000000;
local_78 = 0;
local_40 = 0;
uStack_38 = 0;
local_70 = 0x8000000000000000;
local_68 = 0;
uStack_60 = 0;
local_80 = param_1;
local_58 = param_1;
bf_const_log2(&local_80,0x40,3);
bf_mul_ui(&local_58,&local_80,lVar6,0x40,3);
iVar2 = bf_cmp_lt(&local_58,param_3);
if (iVar2 == 0) {
lVar6 = lVar6 + lVar5;
bf_const_log2(&local_80,0x40,2);
bf_mul_si(&local_58,&local_80,1 - lVar6,0x40,2);
iVar2 = bf_cmp_lt(param_4,&local_58);
if (iVar2 == 0) {
bf_delete(&local_80);
bf_delete(&local_58);
uVar3 = 0;
}
else {
bf_delete(&local_58);
bf_delete(&local_80);
if ((param_6 & 7) == 3) {
bf_set_ui(param_2,1);
*(long *)(param_2 + 0x10) = 3 - lVar6;
}
else {
bf_set_zero(param_2,0);
}
uVar3 = 0x18;
}
}
else {
bf_delete(&local_58);
bf_delete(&local_80);
uVar3 = bf_set_overflow(param_2,0,param_5,param_6);
}
return uVar3;
}
return 0;
}
| |
33,612 | spdlog::details::A_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
string_view_t field_value{full_days[static_cast<size_t>(tm_time.tm_wday)]};
ScopedPadder p(field_value.size(), padinfo_, dest);
fmt_helper::append_string_view(field_value, dest);
} | O0 | c | spdlog::details::A_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0xa8, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movslq 0x18(%rax), %rsi
leaq 0x13895c(%rip), %rdi # 0x1d08b0
callq 0x97a40
movq (%rax), %rax
leaq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0xa0(%rsp)
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rcx
movq %rcx, (%rax)
movq 0x98(%rsp), %rdi
callq 0x152e0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x24d80
movq 0x18(%rsp), %rdx
movq %rax, %rsi
addq $0x8, %rdx
movq 0x78(%rsp), %rcx
leaq 0x40(%rsp), %rdi
callq 0x95af0
movups 0x68(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x78(%rsp), %rdx
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x7e1d0
jmp 0x97fec
leaq 0x40(%rsp), %rdi
callq 0x95be0
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x95be0
movq 0x28(%rsp), %rdi
callq 0x15dd0
| _ZN6spdlog7details11A_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 0A8h
mov [rsp+0A8h+var_18], rdi
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_28], rdx
mov [rsp+0A8h+var_30], rcx
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_90], rax
mov rax, [rsp+0A8h+var_28]
movsxd rsi, dword ptr [rax+18h]
lea rdi, _ZN6spdlog7detailsL9full_daysE; spdlog::details::full_days
call _ZNSt5arrayIPKcLm7EEixEm; std::array<char const*,7ul>::operator[](ulong)
mov rax, [rax]
lea rcx, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_A0], rcx
mov [rsp+0A8h+var_8], rcx
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_98], rax
mov rcx, [rsp+0A8h+var_10]
mov [rax], rcx
mov rdi, [rsp+0A8h+var_10]
call _strlen
mov rdi, [rsp+0A8h+var_A0]
mov rcx, rax
mov rax, [rsp+0A8h+var_98]
mov [rax+8], rcx
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rdx, [rsp+0A8h+var_90]
mov rsi, rax
add rdx, 8
mov rcx, [rsp+0A8h+var_30]
lea rdi, [rsp+0A8h+var_68]
call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
movups xmm0, [rsp+0A8h+var_40]
movaps [rsp+0A8h+var_78], xmm0
mov rdx, [rsp+0A8h+var_30]
mov rdi, qword ptr [rsp+0A8h+var_78]
mov rsi, qword ptr [rsp+0A8h+var_78+8]
call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
jmp short $+2
loc_97FEC:
lea rdi, [rsp+0A8h+var_68]; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
add rsp, 0A8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_38]; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| void spdlog::details::A_formatter<spdlog::details::scoped_padder>::format(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v4; // rax
long long v5; // rax
_BYTE v6[40]; // [rsp+40h] [rbp-68h] BYREF
long long v7; // [rsp+68h] [rbp-40h] BYREF
long long v8; // [rsp+70h] [rbp-38h]
_QWORD *v9; // [rsp+78h] [rbp-30h]
long long v10; // [rsp+80h] [rbp-28h]
long long v11; // [rsp+88h] [rbp-20h]
long long v12; // [rsp+90h] [rbp-18h]
long long v13; // [rsp+98h] [rbp-10h]
long long *v14; // [rsp+A0h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v4 = *(_QWORD *)std::array<char const*,7ul>::operator[]((long long)spdlog::details::full_days, *(int *)(a3 + 24));
v14 = &v7;
v13 = v4;
v7 = v4;
v8 = strlen(v4);
v5 = fmt::v10::basic_string_view<char>::size((long long)&v7);
spdlog::details::scoped_padder::scoped_padder(
(spdlog::details::scoped_padder *)v6,
v5,
(_QWORD *)(a1 + 8),
(long long)v9);
spdlog::details::fmt_helper::append_string_view(v7, v8, v9);
spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v6);
}
| format:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x78],RCX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RSI,dword ptr [RAX + 0x18]
LEA RDI,[0x2d08b0]
CALL 0x00197a40
MOV RAX,qword ptr [RAX]
LEA RCX,[RSP + 0x68]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0xa0],RCX
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RSP + 0x98]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x001152e0
MOV RDI,qword ptr [RSP + 0x8]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
CALL 0x00124d80
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,RAX
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x78]
LEA RDI,[RSP + 0x40]
CALL 0x00195af0
MOVUPS XMM0,xmmword ptr [RSP + 0x68]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RDX,qword ptr [RSP + 0x78]
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
LAB_00197fe5:
CALL 0x0017e1d0
LAB_00197fea:
JMP 0x00197fec
LAB_00197fec:
LEA RDI,[RSP + 0x40]
CALL 0x00195be0
ADD RSP,0xa8
RET
|
/* spdlog::details::A_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::A_formatter<spdlog::details::scoped_padder>::format
(A_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
int8 *puVar1;
size_t sVar2;
ulong uVar3;
scoped_padder local_68 [40];
int4 local_40;
int4 uStack_3c;
int4 uStack_38;
int4 uStack_34;
basic_memory_buffer *local_30;
tm *local_28;
log_msg *local_20;
A_formatter<spdlog::details::scoped_padder> *local_18;
char *local_10;
basic_string_view<char> *local_8;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
puVar1 = (int8 *)
std::array<char_const*,7ul>::operator[]
((array<char_const*,7ul> *)full_days,(long)param_2->tm_wday);
local_10 = (char *)*puVar1;
uStack_3c = (int4)((ulong)local_10 >> 0x20);
local_40 = SUB84(local_10,0);
local_8 = (basic_string_view<char> *)&local_40;
sVar2 = strlen(local_10);
uStack_34 = (int4)(sVar2 >> 0x20);
uStack_38 = (int4)sVar2;
uVar3 = fmt::v10::basic_string_view<char>::size((basic_string_view<char> *)&local_40);
scoped_padder::scoped_padder(local_68,uVar3,(padding_info *)(this + 8),local_30);
/* try { // try from 00197fe5 to 00197fe9 has its CatchHandler @ 00197ffe */
fmt_helper::append_string_view
((fmt_helper *)CONCAT44(uStack_3c,local_40),CONCAT44(uStack_34,uStack_38),local_30);
scoped_padder::~scoped_padder(local_68);
return;
}
| |
33,613 | maria_page_crc_check_index | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_crc_check_index(int res, PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
pgcache_page_no_t page_no= args->pageno;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
uint length= _ma_get_page_used(share, page);
if (res)
return 1;
if (length > share->block_size - CRC_SIZE)
{
DBUG_PRINT("error", ("Wrong page length: %u", length));
my_errno= HA_ERR_WRONG_CRC;
return 1;
}
return maria_page_crc_check(page, (uint32) page_no, share,
MARIA_NO_CRC_NORMAL_PAGE,
length);
} | O3 | c | maria_page_crc_check_index:
testl %edi, %edi
jne 0x52d21
movq (%rsi), %rdi
movq 0x10(%rsi), %rdx
movl 0x744(%rdx), %eax
movzwl -0x2(%rdi,%rax), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
movl 0x7bc(%rdx), %eax
addl $-0x4, %eax
cmpl %eax, %r8d
jbe 0x52d24
pushq %rbp
movq %rsp, %rbp
callq 0xa66da
movl $0xb0, (%rax)
popq %rbp
movb $0x1, %al
retq
movl 0x8(%rsi), %esi
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
jmp 0x52b80
| maria_page_crc_check_index:
test edi, edi
jnz short loc_52D21
mov rdi, [rsi]
mov rdx, [rsi+10h]
mov eax, [rdx+744h]
movzx eax, word ptr [rdi+rax-2]
rol ax, 8
movzx r8d, ax
mov eax, [rdx+7BCh]
add eax, 0FFFFFFFCh
cmp r8d, eax
jbe short loc_52D24
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 0B0h
pop rbp
loc_52D21:
mov al, 1
retn
loc_52D24:
mov esi, [rsi+8]
mov ecx, 0FFFFFFFFh
jmp maria_page_crc_check
| char maria_page_crc_check_index(int a1, long long a2)
{
long long v2; // rdi
long long v3; // rdx
unsigned int v4; // r8d
if ( a1 )
return 1;
v2 = *(_QWORD *)a2;
v3 = *(_QWORD *)(a2 + 16);
v4 = (unsigned __int16)__ROL2__(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v3 + 1860) - 2LL), 8);
if ( v4 > *(_DWORD *)(v3 + 1980) - 4 )
{
*(_DWORD *)my_thread_var(v2) = 176;
return 1;
}
return maria_page_crc_check(v2, *(_DWORD *)(a2 + 8), v3, -1, v4);
}
| maria_page_crc_check_index:
TEST EDI,EDI
JNZ 0x00152d21
MOV RDI,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x10]
MOV EAX,dword ptr [RDX + 0x744]
MOVZX EAX,word ptr [RDI + RAX*0x1 + -0x2]
ROL AX,0x8
MOVZX R8D,AX
MOV EAX,dword ptr [RDX + 0x7bc]
ADD EAX,-0x4
CMP R8D,EAX
JBE 0x00152d24
PUSH RBP
MOV RBP,RSP
CALL 0x001a66da
MOV dword ptr [RAX],0xb0
POP RBP
LAB_00152d21:
MOV AL,0x1
RET
LAB_00152d24:
MOV ESI,dword ptr [RSI + 0x8]
MOV ECX,0xffffffff
JMP 0x00152b80
|
int8 maria_page_crc_check_index(int param_1,long *param_2)
{
ushort uVar1;
long lVar2;
int4 *puVar3;
int8 uVar4;
if (param_1 == 0) {
lVar2 = param_2[2];
uVar1 = *(ushort *)(*param_2 + -2 + (ulong)*(uint *)(lVar2 + 0x744));
if ((uint)(ushort)(uVar1 << 8 | uVar1 >> 8) <= *(int *)(lVar2 + 0x7bc) - 4U) {
uVar4 = maria_page_crc_check(*param_2,(int)param_2[1],lVar2,0xffffffff);
return uVar4;
}
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0xb0;
}
return 1;
}
| |
33,614 | init_instruments(PFS_global_param const*) | eloqsql/storage/perfschema/pfs_instr.cc | int init_instruments(const PFS_global_param *param)
{
uint index;
/* Make sure init_event_name_sizing is called */
assert(wait_class_max != 0);
file_handle_max= param->m_file_handle_sizing;
file_handle_full= false;
file_handle_lost= 0;
pfs_max_digest_length= param->m_max_digest_length;
pfs_max_sqltext= param->m_max_sql_text_length;
events_waits_history_per_thread= param->m_events_waits_history_sizing;
events_stages_history_per_thread= param->m_events_stages_history_sizing;
events_statements_history_per_thread= param->m_events_statements_history_sizing;
statement_stack_max= param->m_statement_stack_sizing;
events_transactions_history_per_thread= param->m_events_transactions_history_sizing;
session_connect_attrs_size_per_thread= param->m_session_connect_attrs_sizing;
session_connect_attrs_lost= 0;
file_handle_array= NULL;
thread_internal_id_counter.m_u64= 0;
if (global_mutex_container.init(param->m_mutex_sizing))
return 1;
if (global_rwlock_container.init(param->m_rwlock_sizing))
return 1;
if (global_cond_container.init(param->m_cond_sizing))
return 1;
if (global_file_container.init(param->m_file_sizing))
return 1;
if (file_handle_max > 0)
{
file_handle_array= PFS_MALLOC_ARRAY(& builtin_memory_file_handle,
file_handle_max,
sizeof(PFS_file*), PFS_file*,
MYF(MY_ZEROFILL));
if (unlikely(file_handle_array == NULL))
return 1;
}
if (global_table_container.init(param->m_table_sizing))
return 1;
if (global_socket_container.init(param->m_socket_sizing))
return 1;
if (global_mdl_container.init(param->m_metadata_lock_sizing))
return 1;
if (global_thread_container.init(param->m_thread_sizing))
return 1;
if (stage_class_max > 0)
{
global_instr_class_stages_array=
PFS_MALLOC_ARRAY(& builtin_memory_global_stages,
stage_class_max,
sizeof(PFS_stage_stat), PFS_stage_stat,
MYF(MY_ZEROFILL));
if (unlikely(global_instr_class_stages_array == NULL))
return 1;
for (index= 0; index < stage_class_max; index++)
global_instr_class_stages_array[index].reset();
}
if (statement_class_max > 0)
{
global_instr_class_statements_array=
PFS_MALLOC_ARRAY(& builtin_memory_global_statements,
statement_class_max,
sizeof(PFS_statement_stat), PFS_statement_stat,
MYF(MY_ZEROFILL));
if (unlikely(global_instr_class_statements_array == NULL))
return 1;
for (index= 0; index < statement_class_max; index++)
global_instr_class_statements_array[index].reset();
}
if (memory_class_max > 0)
{
global_instr_class_memory_array=
PFS_MALLOC_ARRAY(& builtin_memory_global_memory,
memory_class_max,
sizeof(PFS_memory_stat), PFS_memory_stat,
MYF(MY_ZEROFILL));
if (unlikely(global_instr_class_memory_array == NULL))
return 1;
for (index= 0; index < memory_class_max; index++)
global_instr_class_memory_array[index].reset();
}
return 0;
} | O0 | cpp | init_instruments(PFS_global_param const*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x3d4422(%rip) # 0x40da80
movb $0x0, 0x3d4423(%rip) # 0x40da88
movq $0x0, 0x3d4420(%rip) # 0x40da90
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rax
movq %rax, 0x3d4436(%rip) # 0x40dab8
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movq %rax, 0x3d442c(%rip) # 0x40dac0
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rax, 0x3d43f2(%rip) # 0x40da98
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, 0x3d43e8(%rip) # 0x40daa0
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, 0x3d43de(%rip) # 0x40daa8
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
movl %eax, 0x3d43d5(%rip) # 0x40dab0
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x3d43fb(%rip) # 0x40dae8
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rax
movq %rax, 0x3d43d9(%rip) # 0x40dad8
movq $0x0, 0x3d43d6(%rip) # 0x40dae0
movq $0x0, 0x3d43db(%rip) # 0x40daf0
movq $0x0, 0x3d4420(%rip) # 0x40db40
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
leaq 0x395731(%rip), %rdi # 0x3cee60
callq 0x3d610
cmpl $0x0, %eax
je 0x39745
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rsi
leaq 0x395724(%rip), %rdi # 0x3cee78
callq 0x3d670
cmpl $0x0, %eax
je 0x3976a
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
leaq 0x3977df(%rip), %rdi # 0x3d0f58
callq 0x3d7e0
cmpl $0x0, %eax
je 0x3978f
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
leaq 0x398097(%rip), %rdi # 0x3d1838
callq 0x3d950
cmpl $0x0, %eax
je 0x397b7
movl $0x1, -0x4(%rbp)
jmp 0x39a55
cmpq $0x0, 0x3d42c1(%rip) # 0x40da80
jle 0x39808
movq 0x3d42b8(%rip), %rsi # 0x40da80
leaq 0x3cf131(%rip), %rdi # 0x408900
movl $0x8, %edx
movl $0x20, %ecx
callq 0x39270
movq %rax, 0x3d430b(%rip) # 0x40daf0
cmpq $0x0, 0x3d4303(%rip) # 0x40daf0
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x39806
movl $0x1, -0x4(%rbp)
jmp 0x39a55
jmp 0x39808
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
leaq 0x3a6c81(%rip), %rdi # 0x3e0498
callq 0x3dac0
cmpl $0x0, %eax
je 0x3982d
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
leaq 0x3a00d9(%rip), %rdi # 0x3d9918
callq 0x3dc30
cmpl $0x0, %eax
je 0x39855
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movq -0x10(%rbp), %rax
movq 0x148(%rax), %rsi
leaq 0x3a0991(%rip), %rdi # 0x3da1f8
callq 0x3dda0
cmpl $0x0, %eax
je 0x3987d
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rsi
leaq 0x3cdb0c(%rip), %rdi # 0x407398
callq 0x3df10
cmpl $0x0, %eax
je 0x398a2
movl $0x1, -0x4(%rbp)
jmp 0x39a55
leaq 0x394ae7(%rip), %rax # 0x3ce390
cmpq $0x0, (%rax)
jbe 0x3992e
leaq 0x394ada(%rip), %rax # 0x3ce390
movq (%rax), %rsi
leaq 0x3cf900(%rip), %rdi # 0x4091c0
movl $0x20, %ecx
movq %rcx, %rdx
callq 0x39270
movq %rax, 0x3d4224(%rip) # 0x40daf8
cmpq $0x0, 0x3d421c(%rip) # 0x40daf8
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x398f5
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0x394a8a(%rip), %rcx # 0x3ce390
cmpq (%rcx), %rax
jae 0x3992c
movq 0x3d41e6(%rip), %rdi # 0x40daf8
movl -0x14(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x374d0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x398fc
jmp 0x3992e
leaq 0x394a6b(%rip), %rax # 0x3ce3a0
cmpq $0x0, (%rax)
jbe 0x399c3
leaq 0x394a5a(%rip), %rax # 0x3ce3a0
movq (%rax), %rsi
leaq 0x3cf9b0(%rip), %rdi # 0x409300
movl $0xb8, %edx
movl $0x20, %ecx
callq 0x39270
movq %rax, 0x3d419a(%rip) # 0x40db00
cmpq $0x0, 0x3d4192(%rip) # 0x40db00
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x39987
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0x394a08(%rip), %rcx # 0x3ce3a0
cmpq (%rcx), %rax
jae 0x399c1
movq 0x3d415c(%rip), %rdi # 0x40db00
movl -0x14(%rbp), %eax
imulq $0xb8, %rax, %rax
addq %rax, %rdi
callq 0x374f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3998e
jmp 0x399c3
leaq 0x3949f6(%rip), %rax # 0x3ce3c0
cmpq $0x0, (%rax)
jbe 0x39a4e
leaq 0x3949e9(%rip), %rax # 0x3ce3c0
movq (%rax), %rsi
leaq 0x3cfa5f(%rip), %rdi # 0x409440
movl $0x48, %edx
movl $0x20, %ecx
callq 0x39270
movq %rax, 0x3d4111(%rip) # 0x40db08
cmpq $0x0, 0x3d4109(%rip) # 0x40db08
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x39a15
movl $0x1, -0x4(%rbp)
jmp 0x39a55
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0x39499a(%rip), %rcx # 0x3ce3c0
cmpq (%rcx), %rax
jae 0x39a4c
movq 0x3d40d6(%rip), %rdi # 0x40db08
movl -0x14(%rbp), %eax
imulq $0x48, %rax, %rax
addq %rax, %rdi
callq 0x37560
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x39a1c
jmp 0x39a4e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| _Z16init_instrumentsPK16PFS_global_param:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+88h]
mov cs:file_handle_max, rax
mov cs:file_handle_full, 0
mov cs:file_handle_lost, 0
mov rax, [rbp+var_10]
mov rax, [rax+150h]
mov cs:pfs_max_digest_length, rax
mov rax, [rbp+var_10]
mov rax, [rax+158h]
mov cs:pfs_max_sqltext, rax
mov rax, [rbp+var_10]
mov rax, [rax+0A0h]
mov cs:events_waits_history_per_thread, rax
mov rax, [rbp+var_10]
mov rax, [rax+0E0h]
mov cs:events_stages_history_per_thread, rax
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
mov cs:events_statements_history_per_thread, rax
mov rax, [rbp+var_10]
mov rax, [rax+138h]
mov cs:statement_stack_max, eax
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov cs:events_transactions_history_per_thread, rax
mov rax, [rbp+var_10]
mov rax, [rax+130h]
mov cs:session_connect_attrs_size_per_thread, rax
mov cs:session_connect_attrs_lost, 0
mov cs:file_handle_array, 0
mov cs:_ZL26thread_internal_id_counter, 0; thread_internal_id_counter
mov rax, [rbp+var_10]
mov rsi, [rax+58h]
lea rdi, global_mutex_container
call _ZN41PFS_partitioned_buffer_scalable_containerI29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS1_E28PFS_buffer_default_allocatorIS1_EELi2EE4initEl; PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2>::init(long)
cmp eax, 0
jz short loc_39745
mov [rbp+var_4], 1
jmp loc_39A55
loc_39745:
mov rax, [rbp+var_10]
mov rsi, [rax+60h]
lea rdi, global_rwlock_container
call _ZN29PFS_buffer_scalable_containerI10PFS_rwlockLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>::init(long)
cmp eax, 0
jz short loc_3976A
mov [rbp+var_4], 1
jmp loc_39A55
loc_3976A:
mov rax, [rbp+var_10]
mov rsi, [rax+68h]
lea rdi, global_cond_container
call _ZN29PFS_buffer_scalable_containerI8PFS_condLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::init(long)
cmp eax, 0
jz short loc_3978F
mov [rbp+var_4], 1
jmp loc_39A55
loc_3978F:
mov rax, [rbp+var_10]
mov rsi, [rax+80h]
lea rdi, global_file_container
call _ZN29PFS_buffer_scalable_containerI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::init(long)
cmp eax, 0
jz short loc_397B7
mov [rbp+var_4], 1
jmp loc_39A55
loc_397B7:
cmp cs:file_handle_max, 0
jle short loc_39808
mov rsi, cs:file_handle_max; unsigned __int64
lea rdi, builtin_memory_file_handle; PFS_builtin_memory_class *
mov edx, 8; unsigned __int64
mov ecx, 20h ; ' '; unsigned __int64
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:file_handle_array, rax
cmp cs:file_handle_array, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_39806
mov [rbp+var_4], 1
jmp loc_39A55
loc_39806:
jmp short $+2
loc_39808:
mov rax, [rbp+var_10]
mov rsi, [rax+78h]
lea rdi, global_table_container
call _ZN29PFS_buffer_scalable_containerI9PFS_tableLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>::init(long)
cmp eax, 0
jz short loc_3982D
mov [rbp+var_4], 1
jmp loc_39A55
loc_3982D:
mov rax, [rbp+var_10]
mov rsi, [rax+90h]
lea rdi, global_socket_container
call _ZN29PFS_buffer_scalable_containerI10PFS_socketLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>::init(long)
cmp eax, 0
jz short loc_39855
mov [rbp+var_4], 1
jmp loc_39A55
loc_39855:
mov rax, [rbp+var_10]
mov rsi, [rax+148h]
lea rdi, global_mdl_container
call _ZN29PFS_buffer_scalable_containerI17PFS_metadata_lockLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>::init(long)
cmp eax, 0
jz short loc_3987D
mov [rbp+var_4], 1
jmp loc_39A55
loc_3987D:
mov rax, [rbp+var_10]
mov rsi, [rax+70h]
lea rdi, global_thread_container
call _ZN29PFS_buffer_scalable_containerI10PFS_threadLi256ELi256E16PFS_thread_array20PFS_thread_allocatorE4initEl; PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::init(long)
cmp eax, 0
jz short loc_398A2
mov [rbp+var_4], 1
jmp loc_39A55
loc_398A2:
lea rax, stage_class_max
cmp qword ptr [rax], 0
jbe short loc_3992E
lea rax, stage_class_max
mov rsi, [rax]; unsigned __int64
lea rdi, builtin_memory_global_stages; PFS_builtin_memory_class *
mov ecx, 20h ; ' '; unsigned __int64
mov rdx, rcx; unsigned __int64
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:global_instr_class_stages_array, rax
cmp cs:global_instr_class_stages_array, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_398F5
mov [rbp+var_4], 1
jmp loc_39A55
loc_398F5:
mov [rbp+var_14], 0
loc_398FC:
mov eax, [rbp+var_14]
lea rcx, stage_class_max
cmp rax, [rcx]
jnb short loc_3992C
mov rdi, cs:global_instr_class_stages_array
mov eax, [rbp+var_14]
shl rax, 5
add rdi, rax; this
call _ZN14PFS_stage_stat5resetEv; PFS_stage_stat::reset(void)
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_398FC
loc_3992C:
jmp short $+2
loc_3992E:
lea rax, statement_class_max
cmp qword ptr [rax], 0
jbe loc_399C3
lea rax, statement_class_max
mov rsi, [rax]; unsigned __int64
lea rdi, builtin_memory_global_statements; PFS_builtin_memory_class *
mov edx, 0B8h; unsigned __int64
mov ecx, 20h ; ' '; unsigned __int64
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:global_instr_class_statements_array, rax
cmp cs:global_instr_class_statements_array, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_39987
mov [rbp+var_4], 1
jmp loc_39A55
loc_39987:
mov [rbp+var_14], 0
loc_3998E:
mov eax, [rbp+var_14]
lea rcx, statement_class_max
cmp rax, [rcx]
jnb short loc_399C1
mov rdi, cs:global_instr_class_statements_array
mov eax, [rbp+var_14]
imul rax, 0B8h
add rdi, rax; this
call _ZN18PFS_statement_stat5resetEv; PFS_statement_stat::reset(void)
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_3998E
loc_399C1:
jmp short $+2
loc_399C3:
lea rax, memory_class_max
cmp qword ptr [rax], 0
jbe short loc_39A4E
lea rax, memory_class_max
mov rsi, [rax]; unsigned __int64
lea rdi, builtin_memory_global_memory; PFS_builtin_memory_class *
mov edx, 48h ; 'H'; unsigned __int64
mov ecx, 20h ; ' '; unsigned __int64
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:global_instr_class_memory_array, rax
cmp cs:global_instr_class_memory_array, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_39A15
mov [rbp+var_4], 1
jmp short loc_39A55
loc_39A15:
mov [rbp+var_14], 0
loc_39A1C:
mov eax, [rbp+var_14]
lea rcx, memory_class_max
cmp rax, [rcx]
jnb short loc_39A4C
mov rdi, cs:global_instr_class_memory_array
mov eax, [rbp+var_14]
imul rax, 48h ; 'H'
add rdi, rax; this
call _ZN15PFS_memory_stat5resetEv; PFS_memory_stat::reset(void)
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_39A1C
loc_39A4C:
jmp short $+2
loc_39A4E:
mov [rbp+var_4], 0
loc_39A55:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long init_instruments(_QWORD *a1)
{
unsigned int i; // [rsp+Ch] [rbp-14h]
unsigned int j; // [rsp+Ch] [rbp-14h]
unsigned int k; // [rsp+Ch] [rbp-14h]
file_handle_max = a1[17];
file_handle_full = 0;
file_handle_lost = 0LL;
pfs_max_digest_length = a1[42];
pfs_max_sqltext = a1[43];
events_waits_history_per_thread = a1[20];
events_stages_history_per_thread = a1[28];
events_statements_history_per_thread = a1[31];
statement_stack_max = a1[39];
events_transactions_history_per_thread = a1[36];
session_connect_attrs_size_per_thread = a1[38];
session_connect_attrs_lost = 0LL;
file_handle_array = 0LL;
thread_internal_id_counter = 0LL;
if ( (unsigned int)PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2>::init(
&global_mutex_container,
a1[11]) )
{
return 1;
}
else if ( (unsigned int)PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>::init(
&global_rwlock_container,
a1[12]) )
{
return 1;
}
else if ( (unsigned int)PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::init(
&global_cond_container,
a1[13]) )
{
return 1;
}
else if ( (unsigned int)PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::init(
&global_file_container,
a1[16]) )
{
return 1;
}
else if ( (long long)file_handle_max <= 0
|| (file_handle_array = (void *)pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_file_handle,
file_handle_max,
8uLL,
32)) != 0LL )
{
if ( (unsigned int)PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>::init(
&global_table_container,
a1[15]) )
{
return 1;
}
else if ( (unsigned int)PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>::init(
&global_socket_container,
a1[18]) )
{
return 1;
}
else if ( (unsigned int)PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>::init(
&global_mdl_container,
a1[41]) )
{
return 1;
}
else
{
if ( !(unsigned int)PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::init(
&global_thread_container,
a1[14]) )
{
if ( stage_class_max )
{
global_instr_class_stages_array = (PFS_stage_stat *)pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_global_stages,
stage_class_max,
0x20uLL,
32);
if ( !global_instr_class_stages_array )
return 1;
for ( i = 0; i < stage_class_max; ++i )
PFS_stage_stat::reset((PFS_stage_stat *)((char *)global_instr_class_stages_array + 32 * i));
}
if ( statement_class_max )
{
global_instr_class_statements_array = (PFS_statement_stat *)pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_global_statements,
statement_class_max,
0xB8uLL,
32);
if ( !global_instr_class_statements_array )
return 1;
for ( j = 0; j < statement_class_max; ++j )
PFS_statement_stat::reset((PFS_statement_stat *)((char *)global_instr_class_statements_array + 184 * j));
}
if ( memory_class_max )
{
global_instr_class_memory_array = (PFS_memory_stat *)pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_global_memory,
memory_class_max,
0x48uLL,
32);
if ( !global_instr_class_memory_array )
return 1;
for ( k = 0; k < memory_class_max; ++k )
PFS_memory_stat::reset((PFS_memory_stat *)((char *)global_instr_class_memory_array + 72 * k));
}
return 0;
}
return 1;
}
}
else
{
return 1;
}
}
| init_instruments:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [0x0050da80],RAX
MOV byte ptr [0x0050da88],0x0
MOV qword ptr [0x0050da90],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x150]
MOV qword ptr [0x0050dab8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x158]
MOV qword ptr [0x0050dac0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [0x0050da98],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xe0]
MOV qword ptr [0x0050daa0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOV qword ptr [0x0050daa8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x138]
MOV dword ptr [0x0050dab0],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [0x0050dae8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x130]
MOV qword ptr [0x0050dad8],RAX
MOV qword ptr [0x0050dae0],0x0
MOV qword ptr [0x0050daf0],0x0
MOV qword ptr [0x0050db40],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x58]
LEA RDI,[0x4cee60]
CALL 0x0013d610
CMP EAX,0x0
JZ 0x00139745
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_00139745:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x60]
LEA RDI,[0x4cee78]
CALL 0x0013d670
CMP EAX,0x0
JZ 0x0013976a
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_0013976a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x68]
LEA RDI,[0x4d0f58]
CALL 0x0013d7e0
CMP EAX,0x0
JZ 0x0013978f
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_0013978f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x80]
LEA RDI,[0x4d1838]
CALL 0x0013d950
CMP EAX,0x0
JZ 0x001397b7
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_001397b7:
CMP qword ptr [0x0050da80],0x0
JLE 0x00139808
MOV RSI,qword ptr [0x0050da80]
LEA RDI,[0x508900]
MOV EDX,0x8
MOV ECX,0x20
CALL 0x00139270
MOV qword ptr [0x0050daf0],RAX
CMP qword ptr [0x0050daf0],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00139806
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_00139806:
JMP 0x00139808
LAB_00139808:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x78]
LEA RDI,[0x4e0498]
CALL 0x0013dac0
CMP EAX,0x0
JZ 0x0013982d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_0013982d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x90]
LEA RDI,[0x4d9918]
CALL 0x0013dc30
CMP EAX,0x0
JZ 0x00139855
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_00139855:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x148]
LEA RDI,[0x4da1f8]
CALL 0x0013dda0
CMP EAX,0x0
JZ 0x0013987d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_0013987d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x70]
LEA RDI,[0x507398]
CALL 0x0013df10
CMP EAX,0x0
JZ 0x001398a2
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_001398a2:
LEA RAX,[0x4ce390]
CMP qword ptr [RAX],0x0
JBE 0x0013992e
LEA RAX,[0x4ce390]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x5091c0]
MOV ECX,0x20
MOV RDX,RCX
CALL 0x00139270
MOV qword ptr [0x0050daf8],RAX
CMP qword ptr [0x0050daf8],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001398f5
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_001398f5:
MOV dword ptr [RBP + -0x14],0x0
LAB_001398fc:
MOV EAX,dword ptr [RBP + -0x14]
LEA RCX,[0x4ce390]
CMP RAX,qword ptr [RCX]
JNC 0x0013992c
MOV RDI,qword ptr [0x0050daf8]
MOV EAX,dword ptr [RBP + -0x14]
SHL RAX,0x5
ADD RDI,RAX
CALL 0x001374d0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001398fc
LAB_0013992c:
JMP 0x0013992e
LAB_0013992e:
LEA RAX,[0x4ce3a0]
CMP qword ptr [RAX],0x0
JBE 0x001399c3
LEA RAX,[0x4ce3a0]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x509300]
MOV EDX,0xb8
MOV ECX,0x20
CALL 0x00139270
MOV qword ptr [0x0050db00],RAX
CMP qword ptr [0x0050db00],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00139987
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_00139987:
MOV dword ptr [RBP + -0x14],0x0
LAB_0013998e:
MOV EAX,dword ptr [RBP + -0x14]
LEA RCX,[0x4ce3a0]
CMP RAX,qword ptr [RCX]
JNC 0x001399c1
MOV RDI,qword ptr [0x0050db00]
MOV EAX,dword ptr [RBP + -0x14]
IMUL RAX,RAX,0xb8
ADD RDI,RAX
CALL 0x001374f0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0013998e
LAB_001399c1:
JMP 0x001399c3
LAB_001399c3:
LEA RAX,[0x4ce3c0]
CMP qword ptr [RAX],0x0
JBE 0x00139a4e
LEA RAX,[0x4ce3c0]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x509440]
MOV EDX,0x48
MOV ECX,0x20
CALL 0x00139270
MOV qword ptr [0x0050db08],RAX
CMP qword ptr [0x0050db08],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00139a15
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139a55
LAB_00139a15:
MOV dword ptr [RBP + -0x14],0x0
LAB_00139a1c:
MOV EAX,dword ptr [RBP + -0x14]
LEA RCX,[0x4ce3c0]
CMP RAX,qword ptr [RCX]
JNC 0x00139a4c
MOV RDI,qword ptr [0x0050db08]
MOV EAX,dword ptr [RBP + -0x14]
IMUL RAX,RAX,0x48
ADD RDI,RAX
CALL 0x00137560
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00139a1c
LAB_00139a4c:
JMP 0x00139a4e
LAB_00139a4e:
MOV dword ptr [RBP + -0x4],0x0
LAB_00139a55:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
/* init_instruments(PFS_global_param const*) */
int4 init_instruments(PFS_global_param *param_1)
{
int iVar1;
uint local_1c;
int4 local_c;
file_handle_max = *(ulong *)(param_1 + 0x88);
file_handle_full = 0;
file_handle_lost = 0;
pfs_max_digest_length = *(int8 *)(param_1 + 0x150);
pfs_max_sqltext = *(int8 *)(param_1 + 0x158);
events_waits_history_per_thread = *(int8 *)(param_1 + 0xa0);
events_stages_history_per_thread = *(int8 *)(param_1 + 0xe0);
events_statements_history_per_thread = *(int8 *)(param_1 + 0xf8);
statement_stack_max = (int4)*(int8 *)(param_1 + 0x138);
events_transactions_history_per_thread = *(int8 *)(param_1 + 0x120);
session_connect_attrs_size_per_thread = *(int8 *)(param_1 + 0x130);
session_connect_attrs_lost = 0;
file_handle_array = 0;
thread_internal_id_counter._0_8_ = 0;
iVar1 = PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2>
::init((PFS_partitioned_buffer_scalable_container<PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>,2>
*)global_mutex_container,*(long *)(param_1 + 0x58));
if (iVar1 == 0) {
iVar1 = PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>
::init((PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>
*)global_rwlock_container,*(long *)(param_1 + 0x60));
if (iVar1 == 0) {
iVar1 = PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>
::init((PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>
*)global_cond_container,*(long *)(param_1 + 0x68));
if (iVar1 == 0) {
iVar1 = PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
::init((PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
*)&global_file_container,*(long *)(param_1 + 0x80));
if (iVar1 == 0) {
if (((long)file_handle_max < 1) ||
(file_handle_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_file_handle,
file_handle_max,8,0x20), file_handle_array != 0)) {
iVar1 = PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>
::init((PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>
*)global_table_container,*(long *)(param_1 + 0x78));
if (iVar1 == 0) {
iVar1 = PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>
::init((PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>
*)global_socket_container,*(long *)(param_1 + 0x90));
if (iVar1 == 0) {
iVar1 = PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>
::init((PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>
*)global_mdl_container,*(long *)(param_1 + 0x148));
if (iVar1 == 0) {
iVar1 = PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>
::init((PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>
*)global_thread_container,*(long *)(param_1 + 0x70));
if (iVar1 == 0) {
if (stage_class_max != 0) {
global_instr_class_stages_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_global_stages
,stage_class_max,0x20,0x20);
if (global_instr_class_stages_array == 0) {
return 1;
}
for (local_1c = 0; local_1c < stage_class_max; local_1c = local_1c + 1) {
PFS_stage_stat::reset
((PFS_stage_stat *)
(global_instr_class_stages_array + (ulong)local_1c * 0x20));
}
}
if (statement_class_max != 0) {
global_instr_class_statements_array =
pfs_malloc_array((PFS_builtin_memory_class *)
builtin_memory_global_statements,statement_class_max,
0xb8,0x20);
if (global_instr_class_statements_array == 0) {
return 1;
}
for (local_1c = 0; local_1c < statement_class_max; local_1c = local_1c + 1) {
PFS_statement_stat::reset
((PFS_statement_stat *)
(global_instr_class_statements_array + (ulong)local_1c * 0xb8));
}
}
if (memory_class_max != 0) {
global_instr_class_memory_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_global_memory
,memory_class_max,0x48,0x20);
if (global_instr_class_memory_array == 0) {
return 1;
}
for (local_1c = 0; local_1c < memory_class_max; local_1c = local_1c + 1) {
PFS_memory_stat::reset
((PFS_memory_stat *)
(global_instr_class_memory_array + (ulong)local_1c * 0x48));
}
}
local_c = 0;
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
}
else {
local_c = 1;
}
return local_c;
}
| |
33,615 | ftxui::(anonymous namespace)::FgColor::Render(ftxui::Screen&) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/color.cpp | void Render(Screen& screen) override {
for (int y = box_.y_min; y <= box_.y_max; ++y) {
for (int x = box_.x_min; x <= box_.x_max; ++x) {
screen.PixelAt(x, y).foreground_color = color_;
}
}
NodeDecorator::Render(screen);
} | O1 | cpp | ftxui::(anonymous namespace)::FgColor::Render(ftxui::Screen&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x54(%rdi), %r15d
cmpl 0x58(%rdi), %r15d
jg 0x22f3c
movl 0x4c(%r14), %r12d
cmpl 0x50(%r14), %r12d
jg 0x22f2f
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x3a522
movl 0x5c(%r14), %ecx
movl %ecx, 0x2c(%rax)
leal 0x1(%r12), %eax
cmpl 0x50(%r14), %r12d
movl %eax, %r12d
jl 0x22f0c
leal 0x1(%r15), %eax
cmpl 0x58(%r14), %r15d
movl %eax, %r15d
jl 0x22f02
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2419e
| _ZN5ftxui12_GLOBAL__N_17FgColor6RenderERNS_6ScreenE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15d, [rdi+54h]
cmp r15d, [rdi+58h]
jg short loc_22F3C
loc_22F02:
mov r12d, [r14+4Ch]
cmp r12d, [r14+50h]
jg short loc_22F2F
loc_22F0C:
mov rdi, rbx; this
mov esi, r12d; int
mov edx, r15d; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov ecx, [r14+5Ch]
mov [rax+2Ch], ecx
lea eax, [r12+1]
cmp r12d, [r14+50h]
mov r12d, eax
jl short loc_22F0C
loc_22F2F:
lea eax, [r15+1]
cmp r15d, [r14+58h]
mov r15d, eax
jl short loc_22F02
loc_22F3C:
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &)
| long long ftxui::`anonymous namespace'::FgColor::Render(
ftxui::_anonymous_namespace_::FgColor *this,
ftxui::Screen *a2)
{
int v2; // r15d
int v3; // r12d
bool v4; // cc
v2 = *((_DWORD *)this + 21);
if ( v2 <= *((_DWORD *)this + 22) )
{
do
{
v3 = *((_DWORD *)this + 19);
if ( v3 <= *((_DWORD *)this + 20) )
{
do
{
*(_DWORD *)(ftxui::Screen::PixelAt(a2, v3, v2) + 44) = *((_DWORD *)this + 23);
v4 = v3++ < *((_DWORD *)this + 20);
}
while ( v4 );
}
v4 = v2++ < *((_DWORD *)this + 22);
}
while ( v4 );
}
return ftxui::Node::Render(this, a2);
}
| Render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R15D,dword ptr [RDI + 0x54]
CMP R15D,dword ptr [RDI + 0x58]
JG 0x00122f3c
LAB_00122f02:
MOV R12D,dword ptr [R14 + 0x4c]
CMP R12D,dword ptr [R14 + 0x50]
JG 0x00122f2f
LAB_00122f0c:
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R15D
CALL 0x0013a522
MOV ECX,dword ptr [R14 + 0x5c]
MOV dword ptr [RAX + 0x2c],ECX
LEA EAX,[R12 + 0x1]
CMP R12D,dword ptr [R14 + 0x50]
MOV R12D,EAX
JL 0x00122f0c
LAB_00122f2f:
LEA EAX,[R15 + 0x1]
CMP R15D,dword ptr [R14 + 0x58]
MOV R15D,EAX
JL 0x00122f02
LAB_00122f3c:
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0012419e
|
/* ftxui::(anonymous namespace)::FgColor::Render(ftxui::Screen&) */
void __thiscall ftxui::(anonymous_namespace)::FgColor::Render(FgColor *this,Screen *param_1)
{
bool bVar1;
long lVar2;
int iVar3;
int iVar4;
iVar4 = *(int *)(this + 0x54);
if (*(int *)(this + 0x54) <= *(int *)(this + 0x58)) {
do {
iVar3 = *(int *)(this + 0x4c);
if (*(int *)(this + 0x4c) <= *(int *)(this + 0x50)) {
do {
lVar2 = Screen::PixelAt(param_1,iVar3,iVar4);
*(int4 *)(lVar2 + 0x2c) = *(int4 *)(this + 0x5c);
bVar1 = iVar3 < *(int *)(this + 0x50);
iVar3 = iVar3 + 1;
} while (bVar1);
}
bVar1 = iVar4 < *(int *)(this + 0x58);
iVar4 = iVar4 + 1;
} while (bVar1);
}
Node::Render((Node *)this,param_1);
return;
}
| |
33,616 | ma_read_key_record | eloqsql/storage/maria/ma_key.c | int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
{
fast_ma_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf))
{
_ma_set_fatal_error(info, HA_ERR_CRASHED);
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
} | O3 | c | ma_read_key_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x372da
movq %r14, %rdi
xorl %esi, %esi
callq 0x37cca
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpq $-0x1, %r12
je 0x3732a
movl 0x62c(%r14), %esi
testl %esi, %esi
js 0x37313
movq %r14, %rdi
movl $0x1, %edx
movq %r15, %rcx
callq 0x37335
testl %eax, %eax
je 0x37320
movq %r14, %rdi
movl $0x7e, %esi
callq 0x36930
jmp 0x3732a
callq 0xa1a06
movl $0x7c, (%rax)
jmp 0x3732a
orb $0x2, 0x624(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_read_key_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
cmp dword ptr [rax+7B8h], 0
jnz short loc_372DA
mov rdi, r14
xor esi, esi
call _ma_writeinfo
loc_372DA:
mov ebx, 0FFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_3732A
mov esi, [r14+62Ch]
test esi, esi
js short loc_37313
mov rdi, r14
mov edx, 1
mov rcx, r15
call _ma_put_key_in_record
test eax, eax
jz short loc_37320
mov rdi, r14
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
jmp short loc_3732A
loc_37313:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
jmp short loc_3732A
loc_37320:
or byte ptr [r14+624h], 2
xor ebx, ebx
loc_3732A:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_read_key_record(unsigned int *a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rsi
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
int v12; // r9d
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo(a1, 0LL);
v7 = -1;
if ( a3 != -1 )
{
v8 = a1[395];
if ( (int)v8 < 0 )
{
*(_DWORD *)my_thread_var(a1, v8, a3, a4, a5) = 124;
}
else if ( (unsigned int)ma_put_key_in_record(a1, v8, 1LL, a2) )
{
ma_set_fatal_error(a1, 126LL, v9, v10, v11, v12);
}
else
{
*((_BYTE *)a1 + 1572) |= 2u;
return 0;
}
}
return v7;
}
| _ma_read_key_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x001372da
MOV RDI,R14
XOR ESI,ESI
CALL 0x00137cca
LAB_001372da:
MOV EBX,0xffffffff
CMP R12,-0x1
JZ 0x0013732a
MOV ESI,dword ptr [R14 + 0x62c]
TEST ESI,ESI
JS 0x00137313
MOV RDI,R14
MOV EDX,0x1
MOV RCX,R15
CALL 0x00137335
TEST EAX,EAX
JZ 0x00137320
MOV RDI,R14
MOV ESI,0x7e
CALL 0x00136930
JMP 0x0013732a
LAB_00137313:
CALL 0x001a1a06
MOV dword ptr [RAX],0x7c
JMP 0x0013732a
LAB_00137320:
OR byte ptr [R14 + 0x624],0x2
XOR EBX,EBX
LAB_0013732a:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _ma_read_key_record(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
int8 uVar3;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
uVar3 = 0xffffffff;
if (param_3 != -1) {
if (*(int *)((long)param_1 + 0x62c) < 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
else {
iVar1 = _ma_put_key_in_record(param_1,*(int *)((long)param_1 + 0x62c),1,param_2);
if (iVar1 == 0) {
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2;
uVar3 = 0;
}
else {
_ma_set_fatal_error(param_1,0x7e);
}
}
}
return uVar3;
}
| |
33,617 | 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>::operator[]<char const>(char const*) | monkey531[P]llama/common/json.hpp | reference operator[](T* key)
{
return operator[](typename object_t::key_type(key));
} | 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>::operator[]<char const>(char const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x3dfe6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x477b6
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43fa5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43fce
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
movq %rbx, %rdi
callq 0x19c00
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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)
mov rbx, rax
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_43FA5
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_43FA5:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_43FCE
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_43FCE:
mov rdi, rbx
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>::operator[]<char const>(
long long a1,
_BYTE *a2)
{
long long v2; // rbx
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
std::string::basic_string<std::allocator<char>>(v4, a2);
v2 = 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[](
a1,
v4);
if ( v4[0] != &v5 )
operator delete(v4[0], v5 + 1);
return v2;
}
| operator[]<char_const>:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x0013dfe6
LAB_00143f7c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001477b6
LAB_00143f87:
MOV RBX,RAX
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00143fa5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001196d0
LAB_00143fa5:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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[]<char const>(char const*) */
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>
::operator[]<char_const>
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,char *param_1)
{
basic_json *pbVar1;
allocator local_31;
long *local_30 [2];
long local_20 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 00143f7c to 00143f86 has its CatchHandler @ 00143fb0 */
pbVar1 = (basic_json *)operator[](this,(string *)local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return pbVar1;
}
| |
33,618 | resize_partitioned_key_cache | eloqsql/mysys/mf_keycache.c | static
int resize_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold,
uint changed_blocks_hash_size)
{
uint i;
uint partitions= keycache->partitions;
my_bool cleanup= use_mem == 0;
int blocks= -1;
int err= 0;
DBUG_ENTER("partitioned_resize_key_cache");
if (cleanup)
{
end_partitioned_key_cache(keycache, 0);
DBUG_RETURN(-1);
}
for (i= 0; i < partitions; i++)
{
err|= prepare_resize_simple_key_cache(keycache->partition_array[i], 1);
}
if (!err)
blocks= init_partitioned_key_cache(keycache, key_cache_block_size,
use_mem, division_limit, age_threshold,
changed_blocks_hash_size);
if (blocks > 0)
{
for (i= 0; i < partitions; i++)
{
keycache_pthread_mutex_lock(&keycache->partition_array[i]->cache_lock);
finish_resize_simple_key_cache(keycache->partition_array[i]);
}
}
DBUG_RETURN(blocks);
} | O0 | c | resize_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x35(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x40(%rbp)
cmpb $0x0, -0x35(%rbp)
je 0xe7fb3
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xe8540
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe8075
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0xe7fec
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl $0x1, %esi
callq 0xe6dd0
orl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xe7fba
cmpl $0x0, -0x40(%rbp)
jne 0xe8010
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
callq 0xe7c80
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0xe806d
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0xe806b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
addq $0xc0, %rdi
leaq 0x6c1a8(%rip), %rsi # 0x1541ea
movl $0x14a9, %edx # imm = 0x14A9
callq 0xe3620
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xe6ef0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xe801d
jmp 0xe806d
jmp 0xe806f
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
| resize_partitioned_key_cache:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_2C], r9d
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
mov [rbp+var_34], eax
cmp [rbp+var_20], 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_35], al
mov [rbp+var_3C], 0FFFFFFFFh
mov [rbp+var_40], 0
cmp [rbp+var_35], 0
jz short loc_E7FB3
mov rdi, [rbp+var_10]
xor esi, esi
call end_partitioned_key_cache
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_E8075
loc_E7FB3:
mov [rbp+var_30], 0
loc_E7FBA:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_34]
jnb short loc_E7FEC
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov ecx, [rbp+var_30]
mov rdi, [rax+rcx*8]
mov esi, 1
call prepare_resize_simple_key_cache
or eax, [rbp+var_40]
mov [rbp+var_40], eax
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_E7FBA
loc_E7FEC:
cmp [rbp+var_40], 0
jnz short loc_E8010
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
mov r8d, [rbp+var_28]
mov r9d, [rbp+var_2C]
call init_partitioned_key_cache
mov [rbp+var_3C], eax
loc_E8010:
cmp [rbp+var_3C], 0
jle short loc_E806D
mov [rbp+var_30], 0
loc_E801D:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_34]
jnb short loc_E806B
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov ecx, [rbp+var_30]
mov rdi, [rax+rcx*8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 14A9h
call inline_mysql_mutex_lock_24
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov ecx, [rbp+var_30]
mov rdi, [rax+rcx*8]
call finish_resize_simple_key_cache
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_E801D
loc_E806B:
jmp short $+2
loc_E806D:
jmp short $+2
loc_E806F:
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
loc_E8075:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long resize_partitioned_key_cache(
long long a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
int v7; // [rsp+0h] [rbp-40h]
int inited; // [rsp+4h] [rbp-3Ch]
unsigned int v9; // [rsp+Ch] [rbp-34h]
unsigned int i; // [rsp+10h] [rbp-30h]
unsigned int j; // [rsp+10h] [rbp-30h]
v9 = *(_DWORD *)(a1 + 28);
inited = -1;
v7 = 0;
if ( a3 )
{
for ( i = 0; i < v9; ++i )
v7 |= prepare_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), 1);
if ( !v7 )
inited = init_partitioned_key_cache((char *)a1, a2, a3, a4, a5, a6);
if ( inited > 0 )
{
for ( j = 0; j < v9; ++j )
{
inline_mysql_mutex_lock_24(
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * j) + 192LL,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x14A9u);
finish_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * j));
}
}
return (unsigned int)inited;
}
else
{
end_partitioned_key_cache(a1, 0LL);
return (unsigned int)-1;
}
}
| resize_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x34],EAX
CMP qword ptr [RBP + -0x20],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x35],AL
MOV dword ptr [RBP + -0x3c],0xffffffff
MOV dword ptr [RBP + -0x40],0x0
CMP byte ptr [RBP + -0x35],0x0
JZ 0x001e7fb3
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001e8540
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e8075
LAB_001e7fb3:
MOV dword ptr [RBP + -0x30],0x0
LAB_001e7fba:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x34]
JNC 0x001e7fec
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV ESI,0x1
CALL 0x001e6dd0
OR EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001e7fba
LAB_001e7fec:
CMP dword ptr [RBP + -0x40],0x0
JNZ 0x001e8010
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8D,dword ptr [RBP + -0x28]
MOV R9D,dword ptr [RBP + -0x2c]
CALL 0x001e7c80
MOV dword ptr [RBP + -0x3c],EAX
LAB_001e8010:
CMP dword ptr [RBP + -0x3c],0x0
JLE 0x001e806d
MOV dword ptr [RBP + -0x30],0x0
LAB_001e801d:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x34]
JNC 0x001e806b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + RCX*0x8]
ADD RDI,0xc0
LEA RSI,[0x2541ea]
MOV EDX,0x14a9
CALL 0x001e3620
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x001e6ef0
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001e801d
LAB_001e806b:
JMP 0x001e806d
LAB_001e806d:
JMP 0x001e806f
LAB_001e806f:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001e8075:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int resize_partitioned_key_cache
(long param_1,int4 param_2,long param_3,int4 param_4,int4 param_5,
int4 param_6)
{
uint uVar1;
uint uVar2;
uint local_48;
int local_44;
uint local_38;
int local_c;
uVar1 = *(uint *)(param_1 + 0x1c);
local_44 = -1;
local_48 = 0;
if (param_3 == 0) {
end_partitioned_key_cache(param_1,0);
local_c = -1;
}
else {
for (local_38 = 0; local_38 < uVar1; local_38 = local_38 + 1) {
uVar2 = prepare_resize_simple_key_cache
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_38 * 8),1);
local_48 = uVar2 | local_48;
}
if (local_48 == 0) {
local_44 = init_partitioned_key_cache(param_1,param_2,param_3,param_4,param_5,param_6);
}
if (0 < local_44) {
for (local_38 = 0; local_38 < uVar1; local_38 = local_38 + 1) {
inline_mysql_mutex_lock
(*(long *)(*(long *)(param_1 + 8) + (ulong)local_38 * 8) + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x14a9);
finish_resize_simple_key_cache
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_38 * 8));
}
}
local_c = local_44;
}
return local_c;
}
| |
33,619 | resize_partitioned_key_cache | eloqsql/mysys/mf_keycache.c | static
int resize_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold,
uint changed_blocks_hash_size)
{
uint i;
uint partitions= keycache->partitions;
my_bool cleanup= use_mem == 0;
int blocks= -1;
int err= 0;
DBUG_ENTER("partitioned_resize_key_cache");
if (cleanup)
{
end_partitioned_key_cache(keycache, 0);
DBUG_RETURN(-1);
}
for (i= 0; i < partitions; i++)
{
err|= prepare_resize_simple_key_cache(keycache->partition_array[i], 1);
}
if (!err)
blocks= init_partitioned_key_cache(keycache, key_cache_block_size,
use_mem, division_limit, age_threshold,
changed_blocks_hash_size);
if (blocks > 0)
{
for (i= 0; i < partitions; i++)
{
keycache_pthread_mutex_lock(&keycache->partition_array[i]->cache_lock);
finish_resize_simple_key_cache(keycache->partition_array[i]);
}
}
DBUG_RETURN(blocks);
} | O3 | c | resize_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x1c(%rdi), %r13d
testq %rdx, %rdx
je 0x9a97c
movq %rdx, %r15
testq %r13, %r13
je 0x9a90e
movl %esi, -0x2c(%rbp)
movl %ecx, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %r9d, -0x38(%rbp)
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movl $0x1, %esi
callq 0x99c7e
orl %eax, %r12d
incq %r14
cmpq %r14, %r13
jne 0x9a8d4
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testl %r12d, %r12d
movl -0x38(%rbp), %r9d
movl -0x34(%rbp), %r8d
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %esi
jne 0x9a9a1
movq %rbx, %rdi
movq %r15, %rdx
callq 0x9a644
movl %eax, %r14d
testl %eax, %eax
setg %al
testl %r13d, %r13d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x9a9a1
xorl %r12d, %r12d
leaq 0x41a33(%rip), %r15 # 0xdc36b
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rax
leaq 0xc0(%rax), %rdi
cmpq $0x0, 0x100(%rax)
jne 0x9a96d
callq 0x29220
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x99e62
incq %r12
cmpq %r12, %r13
jne 0x9a938
jmp 0x9a9a1
movq %r15, %rsi
movl $0x14a9, %edx # imm = 0x14A9
callq 0x2eb8f
jmp 0x9a956
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testq %r13, %r13
je 0x9a9a1
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
callq 0x99b6a
incq %r15
cmpq %r15, %r13
jne 0x9a98a
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| resize_partitioned_key_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13d, [rdi+1Ch]
test rdx, rdx
jz loc_9A97C
mov r15, rdx
test r13, r13
jz short loc_9A90E
mov [rbp+var_2C], esi
mov [rbp+var_30], ecx
mov [rbp+var_34], r8d
mov [rbp+var_38], r9d
xor r14d, r14d
xor r12d, r12d
loc_9A8D4:
mov rax, [rbx+8]
mov rdi, [rax+r14*8]
mov esi, 1
call prepare_resize_simple_key_cache
or r12d, eax
inc r14
cmp r13, r14
jnz short loc_9A8D4
mov r14d, 0FFFFFFFFh
test r12d, r12d
mov r9d, [rbp+var_38]
mov r8d, [rbp+var_34]
mov ecx, [rbp+var_30]
mov esi, [rbp+var_2C]
jnz loc_9A9A1
loc_9A90E:
mov rdi, rbx
mov rdx, r15
call init_partitioned_key_cache
mov r14d, eax
test eax, eax
setnle al
test r13d, r13d
setnz cl
and cl, al
cmp cl, 1
jnz short loc_9A9A1
xor r12d, r12d
lea r15, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
loc_9A938:
mov rax, [rbx+8]
mov rax, [rax+r12*8]
lea rdi, [rax+0C0h]
cmp qword ptr [rax+100h], 0
jnz short loc_9A96D
call _pthread_mutex_lock
loc_9A956:
mov rax, [rbx+8]
mov rdi, [rax+r12*8]
call finish_resize_simple_key_cache
inc r12
cmp r13, r12
jnz short loc_9A938
jmp short loc_9A9A1
loc_9A96D:
mov rsi, r15
mov edx, 14A9h
call psi_mutex_lock
jmp short loc_9A956
loc_9A97C:
mov r14d, 0FFFFFFFFh
test r13, r13
jz short loc_9A9A1
xor r15d, r15d
loc_9A98A:
mov rax, [rbx+8]
mov rdi, [rax+r15*8]
xor esi, esi
call end_simple_key_cache
inc r15
cmp r13, r15
jnz short loc_9A98A
loc_9A9A1:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long resize_partitioned_key_cache(
long long a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
long long v7; // r13
long long v9; // r14
int v10; // r12d
int inited; // r14d
long long v12; // r12
long long v13; // rax
long long v14; // rdi
long long v15; // r15
unsigned int v17; // [rsp+8h] [rbp-38h]
unsigned int v18; // [rsp+Ch] [rbp-34h]
unsigned int v19; // [rsp+10h] [rbp-30h]
v7 = *(unsigned int *)(a1 + 28);
if ( a3 )
{
if ( !*(_DWORD *)(a1 + 28) )
goto LABEL_19;
v19 = a4;
v18 = a5;
v17 = a6;
v9 = 0LL;
v10 = 0;
do
v10 |= prepare_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v9++), 1);
while ( v7 != v9 );
inited = -1;
a6 = v17;
a5 = v18;
a4 = v19;
if ( !v10 )
{
LABEL_19:
inited = init_partitioned_key_cache((char *)a1, a2, a3, a4, a5, a6);
if ( inited > 0 && (_DWORD)v7 != 0 )
{
v12 = 0LL;
do
{
v13 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v12);
v14 = v13 + 192;
if ( *(_QWORD *)(v13 + 256) )
psi_mutex_lock(v14, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x14A9u);
else
pthread_mutex_lock(v14);
finish_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v12++));
}
while ( v7 != v12 );
}
}
}
else
{
inited = -1;
if ( *(_DWORD *)(a1 + 28) )
{
v15 = 0LL;
do
end_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v15++), 0);
while ( v7 != v15 );
}
}
return (unsigned int)inited;
}
| resize_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13D,dword ptr [RDI + 0x1c]
TEST RDX,RDX
JZ 0x0019a97c
MOV R15,RDX
TEST R13,R13
JZ 0x0019a90e
MOV dword ptr [RBP + -0x2c],ESI
MOV dword ptr [RBP + -0x30],ECX
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBP + -0x38],R9D
XOR R14D,R14D
XOR R12D,R12D
LAB_0019a8d4:
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + R14*0x8]
MOV ESI,0x1
CALL 0x00199c7e
OR R12D,EAX
INC R14
CMP R13,R14
JNZ 0x0019a8d4
MOV R14D,0xffffffff
TEST R12D,R12D
MOV R9D,dword ptr [RBP + -0x38]
MOV R8D,dword ptr [RBP + -0x34]
MOV ECX,dword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x2c]
JNZ 0x0019a9a1
LAB_0019a90e:
MOV RDI,RBX
MOV RDX,R15
CALL 0x0019a644
MOV R14D,EAX
TEST EAX,EAX
SETG AL
TEST R13D,R13D
SETNZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x0019a9a1
XOR R12D,R12D
LEA R15,[0x1dc36b]
LAB_0019a938:
MOV RAX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX + R12*0x8]
LEA RDI,[RAX + 0xc0]
CMP qword ptr [RAX + 0x100],0x0
JNZ 0x0019a96d
CALL 0x00129220
LAB_0019a956:
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + R12*0x8]
CALL 0x00199e62
INC R12
CMP R13,R12
JNZ 0x0019a938
JMP 0x0019a9a1
LAB_0019a96d:
MOV RSI,R15
MOV EDX,0x14a9
CALL 0x0012eb8f
JMP 0x0019a956
LAB_0019a97c:
MOV R14D,0xffffffff
TEST R13,R13
JZ 0x0019a9a1
XOR R15D,R15D
LAB_0019a98a:
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + R15*0x8]
XOR ESI,ESI
CALL 0x00199b6a
INC R15
CMP R13,R15
JNZ 0x0019a98a
LAB_0019a9a1:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int resize_partitioned_key_cache
(long param_1,ulong param_2,long param_3,ulong param_4,ulong param_5,ulong param_6)
{
pthread_mutex_t *__mutex;
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
uVar1 = *(uint *)(param_1 + 0x1c);
uVar6 = (ulong)uVar1;
if (param_3 == 0) {
iVar4 = -1;
if (uVar6 != 0) {
uVar7 = 0;
do {
end_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8),0);
uVar7 = uVar7 + 1;
} while (uVar6 != uVar7);
}
}
else {
if (uVar6 != 0) {
uVar7 = 0;
uVar5 = 0;
do {
uVar3 = prepare_resize_simple_key_cache
(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8),1);
uVar5 = uVar5 | uVar3;
uVar7 = uVar7 + 1;
} while (uVar6 != uVar7);
param_6 = param_6 & 0xffffffff;
param_5 = param_5 & 0xffffffff;
param_4 = param_4 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
if (uVar5 != 0) {
return -1;
}
}
iVar4 = init_partitioned_key_cache(param_1,param_2,param_3,param_4,param_5,param_6);
if (uVar1 != 0 && 0 < iVar4) {
uVar7 = 0;
do {
lVar2 = *(long *)(*(long *)(param_1 + 8) + uVar7 * 8);
__mutex = (pthread_mutex_t *)(lVar2 + 0xc0);
if (*(long *)(lVar2 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x14a9);
}
finish_resize_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8));
uVar7 = uVar7 + 1;
} while (uVar6 != uVar7);
}
}
return iVar4;
}
| |
33,620 | ma_ck_delete | eloqsql/storage/maria/ma_delete.c | my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key)
{
MARIA_SHARE *share= info->s;
int res;
my_bool buff_alloced;
LSN lsn= LSN_IMPOSSIBLE;
my_off_t new_root= share->state.key_root[key->keyinfo->key_nr];
uchar *key_buff, *save_key_data;
MARIA_KEY org_key;
DBUG_ENTER("_ma_ck_delete");
LINT_INIT_STRUCT(org_key);
alloc_on_stack(*info->stack_end_ptr, key_buff, buff_alloced,
key->keyinfo->max_store_length);
if (!key_buff)
DBUG_RETURN(1);
save_key_data= key->data;
if (share->now_transactional)
{
/* Save original value as the key may change */
memcpy(key_buff, key->data, key->data_length + key->ref_length);
org_key= *key;
key->data= key_buff;
}
if ((res= _ma_ck_real_delete(info, key, &new_root)))
{
/* We have to mark the table crashed before unpin_all_pages() */
maria_mark_crashed(info);
}
key->data= save_key_data;
if (!res && share->now_transactional)
res= _ma_write_undo_key_delete(info, &org_key, new_root, &lsn);
else
{
share->state.key_root[key->keyinfo->key_nr]= new_root;
_ma_fast_unlock_key_del(info);
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
stack_alloc_free(key_buff, buff_alloced);
DBUG_RETURN(res != 0);
} | O3 | c | ma_ck_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r13
movq $0x0, -0x48(%rbp)
movq 0x118(%r13), %rax
movq 0x8(%rsi), %rcx
movzbl 0xa5(%rcx), %edx
movq (%rax,%rdx,8), %rax
movq %rax, -0x40(%rbp)
movzwl 0xb0(%rcx), %esi
leaq -0x70(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rdi), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x674a9
cmpq $0x10000, %rax # imm = 0x10000
ja 0x67493
cmpl $0x1000, %esi # imm = 0x1000
jb 0x674a9
cmpq $0x8001, %rax # imm = 0x8001
jb 0x674a9
movq %rsp, %r15
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %r15
movq %r15, %rsp
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x674c8
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0x9fc99
testq %rax, %rax
je 0x675a7
movq %rax, %r15
movl $0x0, -0x34(%rbp)
movq (%r14), %r12
cmpb $0x0, 0x7e7(%r13)
je 0x674fc
movl 0x14(%r14), %edx
addl 0x10(%r14), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x29080
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm0, -0x70(%rbp)
movaps %xmm1, -0x60(%rbp)
movq %r15, (%r14)
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x675cc
testb %al, %al
je 0x6754f
movq (%rbx), %rcx
orl $0x2, 0x170(%rcx)
movq %r12, (%r14)
movzbl %al, %r12d
movq -0x40(%rbp), %rax
movq 0x118(%r13), %rcx
movq 0x8(%r14), %rdx
movzbl 0xa5(%rdx), %edx
movq %rax, (%rcx,%rdx,8)
cmpb $0x0, 0x67e(%rbx)
je 0x6754b
movq %rbx, %rdi
callq 0x5ad9a
xorl %esi, %esi
jmp 0x6757a
movq %r12, (%r14)
cmpb $0x0, 0x7e7(%r13)
je 0x6751c
movq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rsi
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rcx
callq 0x677bb
movsbl %al, %r12d
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x596e0
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
cmpb $0x0, -0x34(%rbp)
jne 0x6759f
movq %r15, %rdi
callq 0x9fec6
testl %r12d, %r12d
setne %al
jmp 0x675a9
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x675c7
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_ck_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13, [rdi]
mov [rbp+var_48], 0
mov rax, [r13+118h]
mov rcx, [rsi+8]
movzx edx, byte ptr [rcx+0A5h]
mov rax, [rax+rdx*8]
mov [rbp+var_40], rax
movzx esi, word ptr [rcx+0B0h]
lea rcx, [rbp+var_70]
mov [rcx], rsi
mov rax, [rdi+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_674A9
cmp rax, offset stru_10000
ja short loc_67493
cmp esi, 1000h
jb short loc_674A9
cmp rax, 8001h
jb short loc_674A9
loc_67493:
mov r15, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub r15, rsi
mov rsp, r15
mov al, 1
mov [rbp+var_34], eax
jmp short loc_674C8
loc_674A9:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz loc_675A7
mov r15, rax
mov [rbp+var_34], 0
loc_674C8:
mov r12, [r14]
cmp byte ptr [r13+7E7h], 0
jz short loc_674FC
mov edx, [r14+14h]
add edx, [r14+10h]
mov rdi, r15
mov rsi, r12
call _memcpy
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
movaps [rbp+var_70], xmm0
movaps [rbp+var_60], xmm1
mov [r14], r15
loc_674FC:
lea rdx, [rbp+var_40]
mov rdi, rbx
mov rsi, r14
call _ma_ck_real_delete
test al, al
jz short loc_6754F
mov rcx, [rbx]
or dword ptr [rcx+170h], 2
mov [r14], r12
loc_6751C:
movzx r12d, al
mov rax, [rbp+var_40]
mov rcx, [r13+118h]
mov rdx, [r14+8]
movzx edx, byte ptr [rdx+0A5h]
mov [rcx+rdx*8], rax
cmp byte ptr [rbx+67Eh], 0
jz short loc_6754B
mov rdi, rbx
call _ma_unlock_key_del
loc_6754B:
xor esi, esi
jmp short loc_6757A
loc_6754F:
mov [r14], r12
cmp byte ptr [r13+7E7h], 0
jz short loc_6751C
mov rdx, [rbp+var_40]
lea rsi, [rbp+var_70]
lea r14, [rbp+var_48]
mov rdi, rbx
mov rcx, r14
call _ma_write_undo_key_delete
movsx r12d, al
mov rsi, [r14]
loc_6757A:
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
cmp byte ptr [rbp+var_34], 0
jnz short loc_6759F
mov rdi, r15
call my_free
loc_6759F:
test r12d, r12d
setnz al
jmp short loc_675A9
loc_675A7:
mov al, 1
loc_675A9:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_675C7
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_675C7:
call ___stack_chk_fail
| bool ma_ck_delete(_QWORD **a1, long long *a2)
{
_DWORD *v3; // r13
long long v4; // rcx
unsigned long long v5; // rsi
unsigned long long v6; // rax
bool v7; // cc
unsigned long long v8; // rax
char *v9; // r15
long long v10; // rax
long long v11; // r12
__int128 v12; // xmm1
unsigned __int8 v13; // al
int v14; // r12d
signed long long v15; // rsi
_OWORD v17[2]; // [rsp+0h] [rbp-70h] BYREF
signed long long v18; // [rsp+28h] [rbp-48h] BYREF
long long v19; // [rsp+30h] [rbp-40h] BYREF
int v20; // [rsp+3Ch] [rbp-34h]
unsigned long long v21; // [rsp+40h] [rbp-30h]
v21 = __readfsqword(0x28u);
v3 = *a1;
v18 = 0LL;
v4 = a2[1];
v19 = *(_QWORD *)(*((_QWORD *)v3 + 35) + 8LL * *(unsigned __int8 *)(v4 + 165));
v5 = *(unsigned __int16 *)(v4 + 176);
*(_QWORD *)&v17[0] = v5;
v6 = *a1[15] - (_QWORD)v17;
v7 = v6 <= v5;
v8 = v6 - v5;
if ( v7 || v8 <= (unsigned long long)&stru_10000 && ((unsigned int)v5 < 0x1000 || v8 < 0x8001) )
{
v10 = my_malloc(0LL, v5, 65552LL);
if ( !v10 )
return 1;
v9 = (char *)v10;
v20 = 0;
}
else
{
v9 = (char *)v17 - (((_DWORD)v5 + 15) & 0xFFFFFFF0);
LOBYTE(v8) = 1;
v20 = v8;
}
v11 = *a2;
if ( *((_BYTE *)v3 + 2023) )
{
memcpy(v9, *a2, (unsigned int)(*((_DWORD *)a2 + 4) + *((_DWORD *)a2 + 5)));
v12 = *((_OWORD *)a2 + 1);
v17[0] = *(_OWORD *)a2;
v17[1] = v12;
*a2 = (long long)v9;
}
v13 = ma_ck_real_delete(a1, a2, &v19);
if ( v13 )
{
*((_DWORD *)*a1 + 92) |= 2u;
*a2 = v11;
LABEL_12:
v14 = v13;
*(_QWORD *)(*((_QWORD *)v3 + 35) + 8LL * *(unsigned __int8 *)(a2[1] + 165)) = v19;
if ( *((_BYTE *)a1 + 1662) )
ma_unlock_key_del(a1);
v15 = 0LL;
goto LABEL_17;
}
*a2 = v11;
if ( !*((_BYTE *)v3 + 2023) )
goto LABEL_12;
v14 = (char)((long long ( *)(_QWORD **, _OWORD *, long long, signed long long *))ma_write_undo_key_delete)(
a1,
v17,
v19,
&v18);
v15 = v18;
LABEL_17:
ma_unpin_all_pages((long long)a1, v15);
a1[1][18] = 0LL;
if ( !(_BYTE)v20 )
my_free(v9);
return v14 != 0;
}
| _ma_ck_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13,qword ptr [RDI]
MOV qword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [R13 + 0x118]
MOV RCX,qword ptr [RSI + 0x8]
MOVZX EDX,byte ptr [RCX + 0xa5]
MOV RAX,qword ptr [RAX + RDX*0x8]
MOV qword ptr [RBP + -0x40],RAX
MOVZX ESI,word ptr [RCX + 0xb0]
LEA RCX,[RBP + -0x70]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x001674a9
CMP RAX,0x10000
JA 0x00167493
CMP ESI,0x1000
JC 0x001674a9
CMP RAX,0x8001
JC 0x001674a9
LAB_00167493:
MOV R15,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB R15,RSI
MOV RSP,R15
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001674c8
LAB_001674a9:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x0019fc99
TEST RAX,RAX
JZ 0x001675a7
MOV R15,RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_001674c8:
MOV R12,qword ptr [R14]
CMP byte ptr [R13 + 0x7e7],0x0
JZ 0x001674fc
MOV EDX,dword ptr [R14 + 0x14]
ADD EDX,dword ptr [R14 + 0x10]
MOV RDI,R15
MOV RSI,R12
CALL 0x00129080
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM1
MOV qword ptr [R14],R15
LAB_001674fc:
LEA RDX,[RBP + -0x40]
MOV RDI,RBX
MOV RSI,R14
CALL 0x001675cc
TEST AL,AL
JZ 0x0016754f
MOV RCX,qword ptr [RBX]
OR dword ptr [RCX + 0x170],0x2
MOV qword ptr [R14],R12
LAB_0016751c:
MOVZX R12D,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [R13 + 0x118]
MOV RDX,qword ptr [R14 + 0x8]
MOVZX EDX,byte ptr [RDX + 0xa5]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x0016754b
MOV RDI,RBX
CALL 0x0015ad9a
LAB_0016754b:
XOR ESI,ESI
JMP 0x0016757a
LAB_0016754f:
MOV qword ptr [R14],R12
CMP byte ptr [R13 + 0x7e7],0x0
JZ 0x0016751c
MOV RDX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x70]
LEA R14,[RBP + -0x48]
MOV RDI,RBX
MOV RCX,R14
CALL 0x001677bb
MOVSX R12D,AL
MOV RSI,qword ptr [R14]
LAB_0016757a:
MOV RDI,RBX
CALL 0x001596e0
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x0016759f
MOV RDI,R15
CALL 0x0019fec6
LAB_0016759f:
TEST R12D,R12D
SETNZ AL
JMP 0x001675a9
LAB_001675a7:
MOV AL,0x1
LAB_001675a9:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001675c7
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001675c7:
CALL 0x00129270
|
bool _ma_ck_delete(long *param_1,ulong *param_2)
{
ushort uVar1;
int iVar2;
long lVar3;
void *__src;
byte bVar4;
char cVar5;
ulong uVar6;
int1 *__dest;
ulong *puVar7;
int8 uVar8;
uint uVar9;
long in_FS_OFFSET;
bool bVar10;
ulong local_78;
int4 uStack_70;
int4 uStack_6c;
ulong local_68;
ulong uStack_60;
int8 local_50;
int8 local_48;
int4 local_3c;
long local_38;
puVar7 = &local_78;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = *param_1;
local_50 = 0;
local_48 = *(int8 *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8);
uVar1 = *(ushort *)(param_2[1] + 0xb0);
local_78 = (ulong)uVar1;
uVar6 = (*(long *)param_1[0xf] - (long)&local_78) - local_78;
if (((ulong)(*(long *)param_1[0xf] - (long)&local_78) < local_78 || uVar6 == 0) ||
((uVar6 < 0x10001 && ((uVar1 < 0x1000 || (uVar6 < 0x8001)))))) {
__dest = (int1 *)my_malloc(0,local_78,0x10010);
if (__dest == (int1 *)0x0) {
bVar10 = true;
goto LAB_001675a9;
}
local_3c = 0;
puVar7 = &local_78;
}
else {
__dest = (int1 *)((long)&local_78 - (ulong)(uVar1 + 0xf & 0xfffffff0));
local_3c = (int4)CONCAT71((int7)(uVar6 >> 8),1);
puVar7 = (ulong *)__dest;
}
__src = (void *)*param_2;
if (*(char *)(lVar3 + 0x7e7) != '\0') {
iVar2 = *(int *)((long)param_2 + 0x14);
uVar6 = param_2[2];
*(int8 *)((long)puVar7 + -8) = 0x1674e8;
memcpy(__dest,__src,(ulong)(uint)(iVar2 + (int)uVar6));
local_78 = *param_2;
uStack_70 = (int4)param_2[1];
uStack_6c = *(int4 *)((long)param_2 + 0xc);
local_68 = param_2[2];
uStack_60 = param_2[3];
*param_2 = (ulong)__dest;
}
*(int8 *)((long)puVar7 + -8) = 0x16750b;
bVar4 = _ma_ck_real_delete(param_1,param_2,&local_48);
uVar8 = local_48;
if (bVar4 == 0) {
*param_2 = (ulong)__src;
if (*(char *)(lVar3 + 0x7e7) == '\0') goto LAB_0016751c;
*(int8 *)((long)puVar7 + -8) = 0x167573;
cVar5 = _ma_write_undo_key_delete(param_1,&local_78,uVar8,&local_50);
uVar9 = (uint)cVar5;
uVar8 = local_50;
}
else {
*(uint *)(*param_1 + 0x170) = *(uint *)(*param_1 + 0x170) | 2;
*param_2 = (ulong)__src;
LAB_0016751c:
uVar9 = (uint)bVar4;
*(int8 *)(*(long *)(lVar3 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8) = local_48;
if (*(char *)((long)param_1 + 0x67e) != '\0') {
*(int8 *)((long)puVar7 + -8) = 0x16754b;
_ma_unlock_key_del(param_1);
}
uVar8 = 0;
}
*(int8 *)((long)puVar7 + -8) = 0x167582;
_ma_unpin_all_pages(param_1,uVar8);
*(int8 *)(param_1[1] + 0x90) = 0;
if ((char)local_3c == '\0') {
*(int8 *)((long)puVar7 + -8) = 0x16759f;
my_free(__dest);
}
bVar10 = uVar9 != 0;
LAB_001675a9:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return bVar10;
}
/* WARNING: Subroutine does not return */
*(code **)((long)puVar7 + -8) = _ma_ck_real_delete;
__stack_chk_fail();
}
| |
33,621 | mysql_net_store_length | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | unsigned char *mysql_net_store_length(unsigned char *packet, size_t length)
{
if (length < (unsigned long long) L64(251)) {
*packet = (unsigned char) length;
return packet + 1;
}
if (length < (unsigned long long) L64(65536)) {
*packet++ = 252;
int2store(packet,(uint) length);
return packet + 2;
}
if (length < (unsigned long long) L64(16777216)) {
*packet++ = 253;
int3store(packet,(ulong) length);
return packet + 3;
}
*packet++ = 254;
int8store(packet, length);
return packet + 8;
} | O3 | c | mysql_net_store_length:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movq %rdi, %rax
cmpq $0xfa, %rsi
ja 0x1f6a3
movb %cl, (%rax)
movl $0x1, %ecx
jmp 0x1f720
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x1f6bc
movb $-0x4, (%rax)
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
movl $0x3, %ecx
jmp 0x1f720
cmpq $0xffffff, %rcx # imm = 0xFFFFFF
ja 0x1f6db
movb $-0x3, (%rax)
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
shrl $0x10, %ecx
movb %cl, 0x3(%rax)
movl $0x4, %ecx
jmp 0x1f720
movb $-0x2, (%rax)
movq %rcx, %rdx
shrq $0x20, %rdx
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
movl %ecx, %esi
shrl $0x10, %esi
movb %sil, 0x3(%rax)
movl %ecx, %esi
shrl $0x18, %esi
movb %sil, 0x4(%rax)
movb %dl, 0x5(%rax)
movq %rcx, %rdx
shrq $0x28, %rdx
movb %dl, 0x6(%rax)
movq %rcx, %rdx
shrq $0x30, %rdx
movb %dl, 0x7(%rax)
shrq $0x38, %rcx
movb %cl, 0x8(%rax)
movl $0x9, %ecx
addq %rcx, %rax
popq %rbp
retq
| mysql_net_store_length:
push rbp
mov rbp, rsp
mov rcx, rsi
mov rax, rdi
cmp rsi, 0FAh
ja short loc_1F6A3
mov [rax], cl
mov ecx, 1
jmp short loc_1F720
loc_1F6A3:
cmp rcx, 0FFFFh
ja short loc_1F6BC
mov byte ptr [rax], 0FCh
mov [rax+1], cl
mov [rax+2], ch
mov ecx, 3
jmp short loc_1F720
loc_1F6BC:
cmp rcx, 0FFFFFFh
ja short loc_1F6DB
mov byte ptr [rax], 0FDh
mov [rax+1], cl
mov [rax+2], ch
shr ecx, 10h
mov [rax+3], cl
mov ecx, 4
jmp short loc_1F720
loc_1F6DB:
mov byte ptr [rax], 0FEh
mov rdx, rcx
shr rdx, 20h
mov [rax+1], cl
mov [rax+2], ch
mov esi, ecx
shr esi, 10h
mov [rax+3], sil
mov esi, ecx
shr esi, 18h
mov [rax+4], sil
mov [rax+5], dl
mov rdx, rcx
shr rdx, 28h
mov [rax+6], dl
mov rdx, rcx
shr rdx, 30h
mov [rax+7], dl
shr rcx, 38h
mov [rax+8], cl
mov ecx, 9
loc_1F720:
add rax, rcx
pop rbp
retn
| long long mysql_net_store_length(long long a1, unsigned long long a2)
{
long long v2; // rcx
if ( a2 > 0xFA )
{
if ( a2 > 0xFFFF )
{
if ( a2 > 0xFFFFFF )
{
*(_BYTE *)a1 = -2;
*(_QWORD *)(a1 + 1) = a2;
v2 = 9LL;
}
else
{
*(_BYTE *)a1 = -3;
*(_WORD *)(a1 + 1) = a2;
*(_BYTE *)(a1 + 3) = BYTE2(a2);
v2 = 4LL;
}
}
else
{
*(_BYTE *)a1 = -4;
*(_WORD *)(a1 + 1) = a2;
v2 = 3LL;
}
}
else
{
*(_BYTE *)a1 = a2;
v2 = 1LL;
}
return v2 + a1;
}
| mysql_net_store_length:
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
MOV RAX,RDI
CMP RSI,0xfa
JA 0x0011f6a3
MOV byte ptr [RAX],CL
MOV ECX,0x1
JMP 0x0011f720
LAB_0011f6a3:
CMP RCX,0xffff
JA 0x0011f6bc
MOV byte ptr [RAX],0xfc
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
MOV ECX,0x3
JMP 0x0011f720
LAB_0011f6bc:
CMP RCX,0xffffff
JA 0x0011f6db
MOV byte ptr [RAX],0xfd
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
SHR ECX,0x10
MOV byte ptr [RAX + 0x3],CL
MOV ECX,0x4
JMP 0x0011f720
LAB_0011f6db:
MOV byte ptr [RAX],0xfe
MOV RDX,RCX
SHR RDX,0x20
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
MOV ESI,ECX
SHR ESI,0x10
MOV byte ptr [RAX + 0x3],SIL
MOV ESI,ECX
SHR ESI,0x18
MOV byte ptr [RAX + 0x4],SIL
MOV byte ptr [RAX + 0x5],DL
MOV RDX,RCX
SHR RDX,0x28
MOV byte ptr [RAX + 0x6],DL
MOV RDX,RCX
SHR RDX,0x30
MOV byte ptr [RAX + 0x7],DL
SHR RCX,0x38
MOV byte ptr [RAX + 0x8],CL
MOV ECX,0x9
LAB_0011f720:
ADD RAX,RCX
POP RBP
RET
|
int1 * mysql_net_store_length(int1 *param_1,ulong param_2)
{
int1 uVar1;
int1 uVar2;
int1 uVar4;
long lVar3;
uVar1 = (int1)param_2;
if (param_2 < 0xfb) {
*param_1 = uVar1;
lVar3 = 1;
}
else {
uVar4 = (int1)(param_2 >> 8);
if (param_2 < 0x10000) {
*param_1 = 0xfc;
param_1[1] = uVar1;
param_1[2] = uVar4;
lVar3 = 3;
}
else {
uVar2 = (int1)(param_2 >> 0x10);
if (param_2 < 0x1000000) {
*param_1 = 0xfd;
param_1[1] = uVar1;
param_1[2] = uVar4;
param_1[3] = uVar2;
lVar3 = 4;
}
else {
*param_1 = 0xfe;
param_1[1] = uVar1;
param_1[2] = uVar4;
param_1[3] = uVar2;
param_1[4] = (char)(param_2 >> 0x18);
param_1[5] = (char)(param_2 >> 0x20);
param_1[6] = (char)(param_2 >> 0x28);
param_1[7] = (char)(param_2 >> 0x30);
param_1[8] = (char)(param_2 >> 0x38);
lVar3 = 9;
}
}
}
return param_1 + lVar3;
}
| |
33,622 | YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test::TestBody() | yoga-mod/tests/YGAspectRatioTest.cpp | TEST(YogaTest, aspect_ratio_allow_child_overflow_parent_size) {
YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
YGNodeStyleSetWidth(root, 100);
YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetHeight(root_child0, 50);
YGNodeStyleSetAspectRatio(root_child0, 4);
YGNodeInsertChild(root, root_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_EQ(100, YGNodeLayoutGetWidth(root));
ASSERT_EQ(50, YGNodeLayoutGetHeight(root));
ASSERT_EQ(200, YGNodeLayoutGetWidth(root_child0));
ASSERT_EQ(50, YGNodeLayoutGetHeight(root_child0));
YGNodeFreeRecursive(root);
} | O0 | cpp | YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x704850
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN59YogaTest_aspect_ratio_allow_child_overflow_parent_size_TestD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
call _ZN7testing4TestD2Ev; testing::Test::~Test()
add rsp, 10h
pop rbp
retn
| void YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test::~YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test(
YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test *this)
{
testing::Test::~Test(this);
}
| ~YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00804850
ADD RSP,0x10
POP RBP
RET
|
/* YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test::~YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test()
*/
void __thiscall
YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test::
~YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test
(YogaTest_aspect_ratio_allow_child_overflow_parent_size_Test *this)
{
testing::Test::~Test((Test *)this);
return;
}
| |
33,623 | parts_get_event | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/parts/parts.c | const PART_EVENT_T*
parts_get_event (uint16_t event_id)
{
uint32_t id = event_id & STATES_EVENT_ID_MASK ;
if (id < STATES_EVENT_DECL_START) {
PART_EVENT_T* pevent = (PART_EVENT_T*)&__engine_event_base__ ;
pevent = &pevent[id] ;
return pevent ;
}
return 0 ;
} | O3 | c | parts_get_event:
pushq %rbp
movq %rsp, %rbp
andl $0x7ff, %edi # imm = 0x7FF
movl %edi, %ecx
shll $0x4, %ecx
addq 0x35e84(%rip), %rcx # 0x3dfe0
xorl %eax, %eax
cmpl $0x700, %edi # imm = 0x700
cmovbq %rcx, %rax
popq %rbp
retq
| parts_get_event:
push rbp
mov rbp, rsp
and edi, 7FFh
mov ecx, edi
shl ecx, 4
add rcx, cs:__engine_event_base___ptr_0
xor eax, eax
cmp edi, 700h
cmovb rax, rcx
pop rbp
retn
| char ** parts_get_event(__int16 a1)
{
unsigned int v1; // edi
char **result; // rax
v1 = a1 & 0x7FF;
result = 0LL;
if ( v1 < 0x700 )
return &_engine_event_base__[2 * v1];
return result;
}
| parts_get_event:
PUSH RBP
MOV RBP,RSP
AND EDI,0x7ff
MOV ECX,EDI
SHL ECX,0x4
ADD RCX,qword ptr [0x0013dfe0]
XOR EAX,EAX
CMP EDI,0x700
CMOVC RAX,RCX
POP RBP
RET
|
int * parts_get_event(uint param_1)
{
int *puVar1;
puVar1 = (int *)0x0;
if ((param_1 & 0x7ff) < 0x700) {
puVar1 = PTR___engine_event__console_char_0013dfe0 + ((param_1 & 0x7ff) << 4);
}
return puVar1;
}
| |
33,624 | ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test() | deependujha[P]DeepTensor/ctests/value_fixture_test.cc | TEST_F(ValueTest, ValueRelu) {
std::shared_ptr<Value> v3 = v1->relu();
EXPECT_DOUBLE_EQ(v1->data, double(5.1));
EXPECT_DOUBLE_EQ(v3->data, double(5.1));
v3->grad = -2.3;
EXPECT_DOUBLE_EQ(v1->grad, double(0.0));
EXPECT_DOUBLE_EQ(v3->grad, double(-2.3));
v3->executeBackWardMethod();
// differentiation of f(x,y) = x * y => x+y
EXPECT_DOUBLE_EQ(v1->grad, double(-2.3));
EXPECT_DOUBLE_EQ(v3->grad, double(-2.3));
// ======= relu second case =======
v3 = std::make_shared<Value>(-5.2);
std::shared_ptr<Value> v4 = v3->relu();
EXPECT_DOUBLE_EQ(v3->data, double(-5.2));
EXPECT_DOUBLE_EQ(v4->data, double(0));
v4->grad = -2.3;
EXPECT_DOUBLE_EQ(v3->grad, double(0.0));
EXPECT_DOUBLE_EQ(v4->grad, double(-2.3));
v4->executeBackWardMethod();
// differentiation of f(x,y) = x * y => x+y
EXPECT_DOUBLE_EQ(v3->grad, double(0));
EXPECT_DOUBLE_EQ(v4->grad, double(-2.3));
} | O0 | cpp | ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x18780
movq -0x10(%rbp), %rdi
movl $0x30, %esi
callq 0xd720
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN24ValueTest_ValueRelu_TestD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN24ValueTest_ValueRelu_TestD2Ev; ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 30h ; '0'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test(ValueTest_ValueRelu_Test *this)
{
ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test(this);
operator delete(this, 0x30uLL);
}
| ~ValueTest_ValueRelu_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00118780
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x30
CALL 0x0010d720
ADD RSP,0x10
POP RBP
RET
|
/* ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test() */
void __thiscall ValueTest_ValueRelu_Test::~ValueTest_ValueRelu_Test(ValueTest_ValueRelu_Test *this)
{
~ValueTest_ValueRelu_Test(this);
operator_delete(this,0x30);
return;
}
| |
33,625 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const | hkr04[P]cpp-mcp/common/json.hpp | pointer operator->() const
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end());
return &(m_it.object_iterator->second);
}
case value_t::array:
{
JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end());
return &*m_it.array_iterator;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
{
return m_object;
}
JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object));
}
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %rax
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x4b66b
cmpl $0x1, %ecx
jne 0x4b671
movq 0x8(%r14), %rax
addq $0x20, %rax
jmp 0x4b678
movq 0x10(%r14), %rax
jmp 0x4b678
cmpq $0x0, 0x18(%r14)
jne 0x4b683
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xa300
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf658(%rip), %rsi # 0x5acf8
leaq 0xf661(%rip), %rdx # 0x5ad08
leaq 0x8(%rsp), %rdi
callq 0xf902
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd6, %esi
callq 0x4ba62
xorl %ebp, %ebp
leaq 0x30366(%rip), %rsi # 0x7ba38
leaq -0x3ac27(%rip), %rdx # 0x10ab2
movq %rbx, %rdi
callq 0xaa00
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4b6fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa630
testb %bpl, %bpl
jne 0x4b705
jmp 0x4b70d
movq %rax, %r14
movq %rbx, %rdi
callq 0xa480
movq %r14, %rdi
callq 0xaa50
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rdi
mov rax, [rdi]
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_4B66B
cmp ecx, 1
jnz short loc_4B671
mov rax, [r14+8]
add rax, 20h ; ' '
jmp short loc_4B678
loc_4B66B:
mov rax, [r14+10h]
jmp short loc_4B678
loc_4B671:
cmp qword ptr [r14+18h], 0
jnz short loc_4B683
loc_4B678:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4B683:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotGetValue; "cannot get value"
lea rdx, aCannotGetValue+10h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0D6h; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_4B6FB
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4B6FB:
test bpl, bpl
jnz short loc_4B705
jmp short loc_4B70D
mov r14, rax
loc_4B705:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4B70D:
mov rdi, r14
call __Unwind_Resume
| operator->:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x0014b66b
CMP ECX,0x1
JNZ 0x0014b671
MOV RAX,qword ptr [R14 + 0x8]
ADD RAX,0x20
JMP 0x0014b678
LAB_0014b66b:
MOV RAX,qword ptr [R14 + 0x10]
JMP 0x0014b678
LAB_0014b671:
CMP qword ptr [R14 + 0x18],0x0
JNZ 0x0014b683
LAB_0014b678:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014b683:
MOV EDI,0x20
CALL 0x0010a300
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0014b699:
LEA RSI,[0x15acf8]
LEA RDX,[0x15ad08]
LEA RDI,[RSP + 0x8]
CALL 0x0010f902
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_0014b6b7:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd6
CALL 0x0014ba62
XOR EBP,EBP
LEA RSI,[0x17ba38]
LEA RDX,[0x110ab2]
MOV RDI,RBX
CALL 0x0010aa00
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
char *pcVar1;
int8 uVar2;
int1 *local_40 [2];
int1 local_30 [16];
pcVar1 = *(char **)this;
if (*pcVar1 == '\x02') {
pcVar1 = *(char **)(this + 0x10);
}
else if (*pcVar1 == '\x01') {
pcVar1 = (char *)(*(long *)(this + 8) + 0x20);
}
else if (*(long *)(this + 0x18) != 0) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 0014b699 to 0014b6b0 has its CatchHandler @ 0014b702 */
std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value","");
/* try { // try from 0014b6b7 to 0014b6e0 has its CatchHandler @ 0014b6e1 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0xd6,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&invalid_iterator::typeinfo,exception::~exception);
}
return pcVar1;
}
| ||
33,626 | my_scan_8bit | eloqsql/strings/ctype-simple.c | size_t my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
{
const char *str0= str;
switch (sq)
{
case MY_SEQ_INTTAIL:
if (*str == '.')
{
for(str++ ; str != end && *str == '0' ; str++);
return (size_t) (str - str0);
}
return 0;
case MY_SEQ_SPACES:
for ( ; str < end ; str++)
{
if (!my_isspace(cs,*str))
break;
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
for ( ; str < end ; str++)
{
if (my_isspace(cs, *str))
break;
}
return (size_t) (str - str0);
default:
return 0;
}
} | O0 | c | my_scan_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
subl $0x1, %eax
je 0x949c7
jmp 0x949a8
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0x94a38
jmp 0x949b6
movl -0x34(%rbp), %eax
subl $0x3, %eax
je 0x94a83
jmp 0x94ace
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x94a2b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x35(%rbp)
je 0x949fe
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x94a07
jmp 0x94a17
jmp 0x94a09
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x949df
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x94ad6
movq $0x0, -0x8(%rbp)
jmp 0x94ad6
jmp 0x94a3a
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x94a72
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x94a62
jmp 0x94a72
jmp 0x94a64
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x94a3a
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x94ad6
jmp 0x94a85
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x94abd
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x94aad
jmp 0x94abd
jmp 0x94aaf
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x94a85
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x94ad6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| my_scan_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov eax, [rbp+var_24]
mov [rbp+var_34], eax
sub eax, 1
jz short loc_949C7
jmp short $+2
loc_949A8:
mov eax, [rbp+var_34]
sub eax, 2
jz loc_94A38
jmp short $+2
loc_949B6:
mov eax, [rbp+var_34]
sub eax, 3
jz loc_94A83
jmp loc_94ACE
loc_949C7:
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz short loc_94A2B
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
loc_949DF:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_35], al
jz short loc_949FE
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
setz al
mov [rbp+var_35], al
loc_949FE:
mov al, [rbp+var_35]
test al, 1
jnz short loc_94A07
jmp short loc_94A17
loc_94A07:
jmp short $+2
loc_94A09:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_949DF
loc_94A17:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
jmp loc_94AD6
loc_94A2B:
mov [rbp+var_8], 0
jmp loc_94AD6
loc_94A38:
jmp short $+2
loc_94A3A:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_94A72
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jnz short loc_94A62
jmp short loc_94A72
loc_94A62:
jmp short $+2
loc_94A64:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_94A3A
loc_94A72:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
jmp short loc_94AD6
loc_94A83:
jmp short $+2
loc_94A85:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_94ABD
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_94AAD
jmp short loc_94ABD
loc_94AAD:
jmp short $+2
loc_94AAF:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_94A85
loc_94ABD:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
jmp short loc_94AD6
loc_94ACE:
mov [rbp+var_8], 0
loc_94AD6:
mov rax, [rbp+var_8]
pop rbp
retn
| long long my_scan_8bit(long long a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4)
{
bool v5; // [rsp+1h] [rbp-35h]
unsigned __int8 *v6; // [rsp+1Eh] [rbp-18h]
unsigned __int8 *i; // [rsp+1Eh] [rbp-18h]
v6 = a2;
switch ( a4 )
{
case 1:
if ( *a2 == 46 )
{
for ( i = a2 + 1; ; ++i )
{
v5 = 0;
if ( i != a3 )
v5 = *i == 48;
if ( !v5 )
break;
}
return i - a2;
}
else
{
return 0LL;
}
case 2:
while ( v6 < a3 && (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v6 + 1LL) & 8) != 0 )
++v6;
return v6 - a2;
case 3:
while ( v6 < a3 && (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v6 + 1LL) & 8) == 0 )
++v6;
return v6 - a2;
default:
return 0LL;
}
}
| my_scan_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x34],EAX
SUB EAX,0x1
JZ 0x001949c7
JMP 0x001949a8
LAB_001949a8:
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0x2
JZ 0x00194a38
JMP 0x001949b6
LAB_001949b6:
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0x3
JZ 0x00194a83
JMP 0x00194ace
LAB_001949c7:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x00194a2b
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
LAB_001949df:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x35],AL
JZ 0x001949fe
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
SETZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_001949fe:
MOV AL,byte ptr [RBP + -0x35]
TEST AL,0x1
JNZ 0x00194a07
JMP 0x00194a17
LAB_00194a07:
JMP 0x00194a09
LAB_00194a09:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001949df
LAB_00194a17:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00194ad6
LAB_00194a2b:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00194ad6
LAB_00194a38:
JMP 0x00194a3a
LAB_00194a3a:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00194a72
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JNZ 0x00194a62
JMP 0x00194a72
LAB_00194a62:
JMP 0x00194a64
LAB_00194a64:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00194a3a
LAB_00194a72:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00194ad6
LAB_00194a83:
JMP 0x00194a85
LAB_00194a85:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00194abd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00194aad
JMP 0x00194abd
LAB_00194aad:
JMP 0x00194aaf
LAB_00194aaf:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00194a85
LAB_00194abd:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00194ad6
LAB_00194ace:
MOV qword ptr [RBP + -0x8],0x0
LAB_00194ad6:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long my_scan_8bit(long param_1,byte *param_2,byte *param_3,int param_4)
{
bool bVar1;
byte *local_20;
long local_10;
if (param_4 == 1) {
if (*param_2 == 0x2e) {
local_20 = param_2 + 1;
while( true ) {
bVar1 = false;
if (local_20 != param_3) {
bVar1 = *local_20 == 0x30;
}
if (!bVar1) break;
local_20 = local_20 + 1;
}
local_10 = (long)local_20 - (long)param_2;
}
else {
local_10 = 0;
}
}
else {
local_20 = param_2;
if (param_4 == 2) {
while ((local_20 < param_3 &&
((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_20) & 8) != 0))) {
local_20 = local_20 + 1;
}
local_10 = (long)local_20 - (long)param_2;
}
else if (param_4 == 3) {
while ((local_20 < param_3 &&
((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_20) & 8) == 0))) {
local_20 = local_20 + 1;
}
local_10 = (long)local_20 - (long)param_2;
}
else {
local_10 = 0;
}
}
return local_10;
}
| |
33,627 | mi_rkey | eloqsql/storage/myisam/mi_rkey.c | int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function search_flag)
{
uchar *key_buff;
MYISAM_SHARE *share=info->s;
MI_KEYDEF *keyinfo;
HA_KEYSEG *last_used_keyseg;
uint pack_key_length, use_key_length, nextflag;
check_result_t res= CHECK_NEG;
DBUG_ENTER("mi_rkey");
DBUG_PRINT("enter", ("base: %p buf: %p inx: %d search_flag: %d",
info, buf, inx, search_flag));
if ((inx = _mi_check_index(info,inx)) < 0)
DBUG_RETURN(my_errno);
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->last_key_func= search_flag;
keyinfo= share->keyinfo + inx;
if (info->once_flags & USE_PACKED_KEYS)
{
info->once_flags&= ~USE_PACKED_KEYS; /* Reset flag */
/*
key is already packed!; This happens when we are using a MERGE TABLE
In this key 'key_part_map' is the length of the key !
*/
key_buff=info->lastkey+info->s->base.max_key_length;
pack_key_length= keypart_map;
bmove(key_buff, key, pack_key_length);
last_used_keyseg= info->s->keyinfo[inx].seg + info->last_used_keyseg;
}
else
{
DBUG_ASSERT(keypart_map);
/* Save the packed key for later use in the second buffer of lastkey. */
key_buff=info->lastkey+info->s->base.max_key_length;
pack_key_length=_mi_pack_key(info,(uint) inx, key_buff, (uchar*) key,
keypart_map, &last_used_keyseg);
/* Save packed_key_length for use by the MERGE engine. */
info->pack_key_length= pack_key_length;
info->last_used_keyseg= (uint16) (last_used_keyseg -
info->s->keyinfo[inx].seg);
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE, keyinfo->seg,
key_buff, pack_key_length););
}
if (fast_mi_readinfo(info))
goto err;
if (share->concurrent_insert)
mysql_rwlock_rdlock(&share->key_root_lock[inx]);
nextflag=myisam_read_vec[search_flag];
use_key_length=pack_key_length;
if (!(nextflag & (SEARCH_FIND | SEARCH_NO_FIND | SEARCH_LAST)))
use_key_length=USE_WHOLE_KEY;
switch (info->s->keyinfo[inx].key_alg) {
#ifdef HAVE_RTREE_KEYS
case HA_KEY_ALG_RTREE:
if (rtree_find_first(info,inx,key_buff,use_key_length,nextflag) < 0)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
if (share->concurrent_insert)
mysql_rwlock_unlock(&share->key_root_lock[inx]);
fast_mi_writeinfo(info);
goto err;
}
break;
#endif
case HA_KEY_ALG_BTREE:
default:
if (!_mi_search(info, keyinfo, key_buff, use_key_length,
myisam_read_vec[search_flag], info->s->state.key_root[inx]))
{
/*
Found a key, but it might not be usable. We cannot use rows that
are inserted by other threads after we got our table lock
("concurrent inserts"). The record may not even be present yet.
Keys are inserted into the index(es) before the record is
inserted into the data file. When we got our table lock, we
saved the current data_file_length. Concurrent inserts always go
to the end of the file. So we can test if the found key
references a new record.
If we are searching for a partial key (or using >, >=, < or <=) and
the data is outside of the data file, we need to continue searching
for the first key inside the data file.
We do also continue searching if an index condition check function
is available.
*/
while ((info->lastpos >= info->state->data_file_length &&
(search_flag != HA_READ_KEY_EXACT ||
last_used_keyseg != keyinfo->seg + keyinfo->keysegs)) ||
(res= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG)
{
uint not_used[2];
/*
Skip rows that are inserted by other threads since we got a lock
Note that this can only happen if we are not searching after an
full length exact key, because the keys are sorted
according to position
*/
if (_mi_search_next(info, keyinfo, info->lastkey,
info->lastkey_length,
myisam_readnext_vec[search_flag],
info->s->state.key_root[inx]))
{
info->lastpos= HA_OFFSET_ERROR;
break;
}
/*
Check that the found key does still match the search.
_mi_search_next() delivers the next key regardless of its
value.
*/
if (search_flag == HA_READ_KEY_EXACT &&
ha_key_cmp(keyinfo->seg, key_buff, info->lastkey, use_key_length,
SEARCH_FIND, not_used))
{
my_errno= HA_ERR_KEY_NOT_FOUND;
info->lastpos= HA_OFFSET_ERROR;
break;
}
/*
If we are at the last key on the key page, allow writers to
access the index.
*/
if (info->int_keypos >= info->int_maxpos &&
mi_yield_and_check_if_killed(info, inx))
{
/* Aborted by user */
DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR &&
my_errno == HA_ERR_ABORTED_BY_USER);
res= CHECK_ERROR;
buf= 0; /* Fast abort */
break;
}
}
if (res == CHECK_OUT_OF_RANGE)
{
/* Change error from HA_ERR_END_OF_FILE */
DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR);
my_errno= HA_ERR_KEY_NOT_FOUND;
}
/*
Error if no row found within the data file. (Bug #29838)
Do not overwrite my_errno if already at HA_OFFSET_ERROR.
*/
if (info->lastpos != HA_OFFSET_ERROR &&
info->lastpos >= info->state->data_file_length)
{
info->lastpos= HA_OFFSET_ERROR;
my_errno= HA_ERR_KEY_NOT_FOUND;
}
}
else
{
DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR);
}
}
if (share->concurrent_insert)
mysql_rwlock_unlock(&share->key_root_lock[inx]);
info->last_rkey_length= pack_key_length;
if (info->lastpos == HA_OFFSET_ERROR) /* No such record */
{
fast_mi_writeinfo(info);
if (!buf)
DBUG_RETURN(my_errno);
}
else
{
/* Calculate length of the found key; Used by mi_rnext_same */
if ((keyinfo->flag & HA_VAR_LENGTH_KEY) && last_used_keyseg)
info->last_rkey_length= _mi_keylength_part(keyinfo, info->lastkey,
last_used_keyseg);
/* Check if we don't want to have record back, only error message */
if (!buf)
{
fast_mi_writeinfo(info);
DBUG_RETURN(0);
}
if (!(*info->read_record)(info,info->lastpos,buf))
{
info->update|= HA_STATE_AKTIV; /* Record is read */
DBUG_RETURN(0);
}
DBUG_PRINT("error", ("Didn't find row. Error %d", my_errno));
info->lastpos= HA_OFFSET_ERROR; /* Didn't find row */
}
/* Store last used key as a base for read next */
memcpy(info->lastkey,key_buff,pack_key_length);
info->last_rkey_length= pack_key_length;
bzero((char*) info->lastkey+pack_key_length,info->s->base.rec_reflength);
info->lastkey_length=pack_key_length+info->s->base.rec_reflength;
if (search_flag == HA_READ_AFTER_KEY)
info->update|=HA_STATE_NEXT_FOUND; /* Previous gives last row */
err:
DBUG_RETURN(my_errno);
} | O3 | c | mi_rkey:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %r15d
movq %r8, -0x50(%rbp)
movq %rcx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %r14
movl %edx, %esi
callq 0x3c350
testl %eax, %eax
js 0x47ecc
movq %r12, -0x48(%rbp)
andl $0x401, 0x1d0(%rbx) # imm = 0x401
movl %r15d, 0x1e0(%rbx)
movl %eax, %ecx
movq %rcx, -0x70(%rbp)
imulq $0x70, %rcx, %r12
movq %r14, -0x60(%rbp)
movq 0x218(%r14), %rcx
addq %r12, %rcx
movq %rcx, -0x38(%rbp)
movl 0x1cc(%rbx), %ecx
testb $0x1, %cl
movl %eax, -0x3c(%rbp)
jne 0x47c06
movq (%rbx), %rcx
movl 0x194(%rcx), %edx
addq 0x108(%rbx), %rdx
leaq -0x68(%rbp), %r14
movq %rbx, %rdi
movl %eax, %esi
movq %rdx, -0x58(%rbp)
movq %r13, %rcx
movq -0x50(%rbp), %r8
movq %r14, %r9
callq 0x33409
movq %rax, -0x50(%rbp)
movl %eax, 0x1e8(%rbx)
movl (%r14), %eax
movq (%rbx), %rcx
movq 0x218(%rcx), %rcx
subl 0x28(%rcx,%r12), %eax
shrl $0x5, %eax
movw %ax, 0x1ec(%rbx)
jmp 0x47c4b
andl $-0x2, %ecx
movl %ecx, 0x1cc(%rbx)
movq (%rbx), %rax
movl 0x194(%rax), %edi
addq 0x108(%rbx), %rdi
movl -0x50(%rbp), %edx
movq %rdi, -0x58(%rbp)
movq %r13, %rsi
callq 0x286d0
movq (%rbx), %rax
movq 0x218(%rax), %rax
movzwl 0x1ec(%rbx), %ecx
shll $0x5, %ecx
addq 0x28(%rax,%r12), %rcx
movq %rcx, -0x68(%rbp)
cmpl $0x2, 0x1f4(%rbx)
movq -0x70(%rbp), %r14
jne 0x47c6f
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x3483f
testl %eax, %eax
jne 0x47ecc
movq -0x60(%rbp), %rax
cmpb $0x0, 0x384(%rax)
je 0x47ca6
movq -0x60(%rbp), %rax
movq 0x4c8(%rax), %rax
imulq $0x98, %r14, %rcx
leaq (%rax,%rcx), %rdi
cmpq $0x0, 0x90(%rax,%rcx)
jne 0x48062
callq 0x5f868
movl %r15d, -0x2c(%rbp)
movl %r15d, %r15d
leaq 0x2e83bc(%rip), %rax # 0x330070
movl (%rax,%r15,4), %r8d
testl $0x103, %r8d # imm = 0x103
movl $0x970, %r13d # imm = 0x970
cmovnel -0x50(%rbp), %r13d
movq (%rbx), %rax
movq 0x218(%rax), %rcx
cmpb $0x2, 0xc(%rcx,%r12)
jne 0x47d7c
movq %rbx, %rdi
movl -0x3c(%rbp), %esi
movq -0x58(%rbp), %rdx
movl %r13d, %ecx
callq 0x42698
testl %eax, %eax
movl -0x2c(%rbp), %r15d
movq -0x48(%rbp), %r12
movq -0x38(%rbp), %r13
jns 0x47dae
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x32f6a
callq 0x5cfd2
movl $0x7e, (%rax)
movq -0x60(%rbp), %rax
cmpb $0x0, 0x384(%rax)
je 0x47d5d
movq 0x4c8(%rax), %rax
imulq $0x98, %r14, %rcx
leaq (%rax,%rcx), %r14
movq 0x90(%rax,%rcx), %rdi
testq %rdi, %rdi
jne 0x4808d
movq %r14, %rdi
callq 0x5f996
movq (%rbx), %rax
cmpl $0x0, 0x368(%rax)
jne 0x47ecc
movq %rbx, %rdi
xorl %esi, %esi
callq 0x34932
jmp 0x47ecc
movq 0x98(%rax), %rax
movq (%rax,%r14,8), %r9
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movq -0x58(%rbp), %rdx
movl %r13d, %ecx
callq 0x3c3fb
testl %eax, %eax
movq -0x48(%rbp), %r12
je 0x47f04
movl -0x2c(%rbp), %r15d
movq -0x38(%rbp), %r13
movq -0x60(%rbp), %rax
cmpb $0x0, 0x384(%rax)
je 0x47de6
movq 0x4c8(%rax), %rax
imulq $0x98, %r14, %rcx
leaq (%rax,%rcx), %r14
movq 0x90(%rax,%rcx), %rdi
testq %rdi, %rdi
jne 0x48078
movq %r14, %rdi
callq 0x5f996
movq -0x50(%rbp), %rax
movl %eax, 0x1dc(%rbx)
cmpq $-0x1, 0x170(%rbx)
je 0x47e58
movb 0xa(%r13), %al
shrb $0x3, %al
movq -0x68(%rbp), %rdx
testq %rdx, %rdx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x47e27
movq 0x108(%rbx), %rsi
movq %r13, %rdi
callq 0x3dfd5
movl %eax, 0x1dc(%rbx)
testq %r12, %r12
je 0x47ee6
movq 0x170(%rbx), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq *0x140(%rbx)
testl %eax, %eax
je 0x47fdd
movq $-0x1, 0x170(%rbx)
jmp 0x47e73
movq (%rbx), %rax
cmpl $0x0, 0x368(%rax)
jne 0x47e6e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x34932
testq %r12, %r12
je 0x47ecc
movq 0x108(%rbx), %rdi
movq -0x50(%rbp), %r12
movl %r12d, %r14d
movq -0x58(%rbp), %rsi
movq %r14, %rdx
callq 0x282c0
movl %r12d, 0x1dc(%rbx)
addq 0x108(%rbx), %r14
movq (%rbx), %rax
movl 0x178(%rax), %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x281c0
movq (%rbx), %rax
addl 0x178(%rax), %r12d
movl %r12d, 0x1d8(%rbx)
cmpl $0x3, %r15d
jne 0x47ecc
orb $0x10, 0x1d0(%rbx)
callq 0x5cfd2
movl (%rax), %r14d
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
xorl %r14d, %r14d
cmpl $0x0, 0x368(%rax)
jne 0x47ed4
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x34932
jmp 0x47ed4
leaq 0x2e81a5(%rip), %r12 # 0x3300b0
movq 0x8(%rbx), %rax
movq 0x170(%rbx), %rcx
cmpq 0x28(%rax), %rcx
jae 0x47f34
movq %rbx, %rdi
movl -0x3c(%rbp), %esi
movq -0x48(%rbp), %rdx
callq 0x33bae
testl %eax, %eax
je 0x47f4f
jmp 0x47fec
cmpl $0x0, -0x2c(%rbp)
jne 0x47f4f
movq -0x38(%rbp), %rcx
movzwl 0x8(%rcx), %eax
shll $0x5, %eax
addq 0x28(%rcx), %rax
cmpq %rax, -0x68(%rbp)
je 0x47f1c
movq (%rbx), %rax
movq 0x108(%rbx), %rdx
movl 0x1d8(%rbx), %ecx
movl (%r12,%r15,4), %r8d
movq 0x98(%rax), %rax
movq (%rax,%r14,8), %r9
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
callq 0x3e079
testl %eax, %eax
jne 0x48011
cmpl $0x0, -0x2c(%rbp)
jne 0x47fb1
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x108(%rbx), %rdx
movq -0x58(%rbp), %rsi
movl %r13d, %ecx
movl $0x1, %r8d
leaq -0x78(%rbp), %r9
callq 0x59d82
testl %eax, %eax
jne 0x48006
movq 0x128(%rbx), %rax
cmpq 0x130(%rbx), %rax
jb 0x47f0b
movq %rbx, %rdi
movl -0x3c(%rbp), %esi
callq 0x480a2
testb %al, %al
je 0x47f0b
xorl %r12d, %r12d
jmp 0x48020
orb $0x2, 0x1d0(%rbx)
xorl %r14d, %r14d
jmp 0x47ed4
cmpl $0x2, %eax
jne 0x47ffc
callq 0x5cfd2
movl $0x78, (%rax)
movl -0x2c(%rbp), %r15d
movq -0x48(%rbp), %r12
jmp 0x48024
callq 0x5cfd2
movl $0x78, (%rax)
movq $-0x1, 0x170(%rbx)
movq -0x48(%rbp), %r12
movl -0x2c(%rbp), %r15d
movq -0x38(%rbp), %r13
movq 0x170(%rbx), %rax
cmpq $-0x1, %rax
je 0x47dae
movq 0x8(%rbx), %rcx
cmpq 0x28(%rcx), %rax
jb 0x47dae
movq $-0x1, 0x170(%rbx)
callq 0x5cfd2
movl $0x78, (%rax)
jmp 0x47dae
leaq 0x4ae59(%rip), %rsi # 0x92ec2
movl $0x4c, %edx
callq 0x2a077
jmp 0x47ca6
leaq 0x2e9dd1(%rip), %rax # 0x331e50
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x47dde
leaq 0x2e9dbc(%rip), %rax # 0x331e50
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x47d55
| mi_rkey:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15d, r9d
mov [rbp+var_50], r8
mov r13, rcx
mov r12, rsi
mov rbx, rdi
mov r14, [rdi]
mov esi, edx
call _mi_check_index
test eax, eax
js loc_47ECC
mov [rbp+var_48], r12
and dword ptr [rbx+1D0h], 401h
mov [rbx+1E0h], r15d
mov ecx, eax
mov [rbp+var_70], rcx
imul r12, rcx, 70h ; 'p'
mov [rbp+var_60], r14
mov rcx, [r14+218h]
add rcx, r12
mov [rbp+var_38], rcx
mov ecx, [rbx+1CCh]
test cl, 1
mov [rbp+var_3C], eax
jnz short loc_47C06
mov rcx, [rbx]
mov edx, [rcx+194h]
add rdx, [rbx+108h]
lea r14, [rbp+var_68]
mov rdi, rbx
mov esi, eax
mov [rbp+var_58], rdx
mov rcx, r13
mov r8, [rbp+var_50]
mov r9, r14
call _mi_pack_key
mov [rbp+var_50], rax
mov [rbx+1E8h], eax
mov eax, [r14]
mov rcx, [rbx]
mov rcx, [rcx+218h]
sub eax, [rcx+r12+28h]
shr eax, 5
mov [rbx+1ECh], ax
jmp short loc_47C4B
loc_47C06:
and ecx, 0FFFFFFFEh
mov [rbx+1CCh], ecx
mov rax, [rbx]
mov edi, [rax+194h]
add rdi, [rbx+108h]
mov edx, dword ptr [rbp+var_50]
mov [rbp+var_58], rdi
mov rsi, r13
call _memmove
mov rax, [rbx]
mov rax, [rax+218h]
movzx ecx, word ptr [rbx+1ECh]
shl ecx, 5
add rcx, [rax+r12+28h]
mov [rbp+var_68], rcx
loc_47C4B:
cmp dword ptr [rbx+1F4h], 2
mov r14, [rbp+var_70]
jnz short loc_47C6F
mov rdi, rbx
xor esi, esi
mov edx, 1
call _mi_readinfo
test eax, eax
jnz loc_47ECC
loc_47C6F:
mov rax, [rbp+var_60]
cmp byte ptr [rax+384h], 0
jz short loc_47CA6
mov rax, [rbp+var_60]
mov rax, [rax+4C8h]
imul rcx, r14, 98h
lea rdi, [rax+rcx]
cmp qword ptr [rax+rcx+90h], 0
jnz loc_48062
call my_rw_rdlock
loc_47CA6:
mov [rbp+var_2C], r15d
mov r15d, r15d
lea rax, myisam_read_vec
mov r8d, [rax+r15*4]
test r8d, 103h
mov r13d, 970h
cmovnz r13d, dword ptr [rbp+var_50]
mov rax, [rbx]
mov rcx, [rax+218h]
cmp byte ptr [rcx+r12+0Ch], 2
jnz loc_47D7C
mov rdi, rbx
mov esi, [rbp+var_3C]
mov rdx, [rbp+var_58]
mov ecx, r13d
call rtree_find_first
test eax, eax
mov r15d, [rbp+var_2C]
mov r12, [rbp+var_48]
mov r13, [rbp+var_38]
jns loc_47DAE
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov rax, [rbp+var_60]
cmp byte ptr [rax+384h], 0
jz short loc_47D5D
mov rax, [rax+4C8h]
imul rcx, r14, 98h
lea r14, [rax+rcx]
mov rdi, [rax+rcx+90h]
test rdi, rdi
jnz loc_4808D
loc_47D55:
mov rdi, r14
call my_rw_unlock
loc_47D5D:
mov rax, [rbx]
cmp dword ptr [rax+368h], 0
jnz loc_47ECC
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
jmp loc_47ECC
loc_47D7C:
mov rax, [rax+98h]
mov r9, [rax+r14*8]
mov rdi, rbx
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_58]
mov ecx, r13d
call _mi_search
test eax, eax
mov r12, [rbp+var_48]
jz loc_47F04
mov r15d, [rbp+var_2C]
mov r13, [rbp+var_38]
loc_47DAE:
mov rax, [rbp+var_60]
cmp byte ptr [rax+384h], 0
jz short loc_47DE6
mov rax, [rax+4C8h]
imul rcx, r14, 98h
lea r14, [rax+rcx]
mov rdi, [rax+rcx+90h]
test rdi, rdi
jnz loc_48078
loc_47DDE:
mov rdi, r14
call my_rw_unlock
loc_47DE6:
mov rax, [rbp+var_50]
mov [rbx+1DCh], eax
cmp qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
jz short loc_47E58
mov al, [r13+0Ah]
shr al, 3
mov rdx, [rbp+var_68]
test rdx, rdx
setnz cl
and cl, al
cmp cl, 1
jnz short loc_47E27
mov rsi, [rbx+108h]
mov rdi, r13
call _mi_keylength_part
mov [rbx+1DCh], eax
loc_47E27:
test r12, r12
jz loc_47EE6
mov rsi, [rbx+170h]
mov rdi, rbx
mov rdx, r12
call qword ptr [rbx+140h]
test eax, eax
jz loc_47FDD
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
jmp short loc_47E73
loc_47E58:
mov rax, [rbx]
cmp dword ptr [rax+368h], 0
jnz short loc_47E6E
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
loc_47E6E:
test r12, r12
jz short loc_47ECC
loc_47E73:
mov rdi, [rbx+108h]
mov r12, [rbp+var_50]
mov r14d, r12d
mov rsi, [rbp+var_58]
mov rdx, r14
call _memcpy
mov [rbx+1DCh], r12d
add r14, [rbx+108h]
mov rax, [rbx]
mov edx, [rax+178h]
mov rdi, r14
xor esi, esi
call _memset
mov rax, [rbx]
add r12d, [rax+178h]
mov [rbx+1D8h], r12d
cmp r15d, 3
jnz short loc_47ECC
or byte ptr [rbx+1D0h], 10h
loc_47ECC:
call _my_thread_var
mov r14d, [rax]
loc_47ED4:
mov eax, r14d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47EE6:
mov rax, [rbx]
xor r14d, r14d
cmp dword ptr [rax+368h], 0
jnz short loc_47ED4
xor r14d, r14d
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
jmp short loc_47ED4
loc_47F04:
lea r12, myisam_readnext_vec
loc_47F0B:
mov rax, [rbx+8]
mov rcx, [rbx+170h]
cmp rcx, [rax+28h]
jnb short loc_47F34
loc_47F1C:
mov rdi, rbx
mov esi, [rbp+var_3C]
mov rdx, [rbp+var_48]
call mi_check_index_tuple
test eax, eax
jz short loc_47F4F
jmp loc_47FEC
loc_47F34:
cmp [rbp+var_2C], 0
jnz short loc_47F4F
mov rcx, [rbp+var_38]
movzx eax, word ptr [rcx+8]
shl eax, 5
add rax, [rcx+28h]
cmp [rbp+var_68], rax
jz short loc_47F1C
loc_47F4F:
mov rax, [rbx]
mov rdx, [rbx+108h]
mov ecx, [rbx+1D8h]
mov r8d, [r12+r15*4]
mov rax, [rax+98h]
mov r9, [rax+r14*8]
mov rdi, rbx
mov rsi, [rbp+var_38]
call _mi_search_next
test eax, eax
jnz loc_48011
cmp [rbp+var_2C], 0
jnz short loc_47FB1
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rdx, [rbx+108h]
mov rsi, [rbp+var_58]
mov ecx, r13d
mov r8d, 1
lea r9, [rbp+var_78]
call ha_key_cmp
test eax, eax
jnz short loc_48006
loc_47FB1:
mov rax, [rbx+128h]
cmp rax, [rbx+130h]
jb loc_47F0B
mov rdi, rbx
mov esi, [rbp+var_3C]
call mi_yield_and_check_if_killed
test al, al
jz loc_47F0B
xor r12d, r12d
jmp short loc_48020
loc_47FDD:
or byte ptr [rbx+1D0h], 2
xor r14d, r14d
jmp loc_47ED4
loc_47FEC:
cmp eax, 2
jnz short loc_47FFC
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
loc_47FFC:
mov r15d, [rbp+var_2C]
mov r12, [rbp+var_48]
jmp short loc_48024
loc_48006:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
loc_48011:
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
mov r12, [rbp+var_48]
loc_48020:
mov r15d, [rbp+var_2C]
loc_48024:
mov r13, [rbp+var_38]
mov rax, [rbx+170h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_47DAE
mov rcx, [rbx+8]
cmp rax, [rcx+28h]
jb loc_47DAE
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
jmp loc_47DAE
loc_48062:
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 4Ch ; 'L'
call psi_rwlock_rdlock
jmp loc_47CA6
loc_48078:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_47DDE
loc_4808D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_47D55
| long long mi_rkey(long long a1, long long a2, long long a3, _BYTE *a4, unsigned long long a5, int a6)
{
long long v9; // rbx
long long v10; // r14
long long v11; // rsi
unsigned int v12; // eax
long long v13; // rdx
long long v14; // r12
int v15; // ecx
long long v16; // r14
long long v17; // rdi
unsigned int v18; // r8d
unsigned int v19; // r13d
int first; // eax
int v21; // r15d
long long v22; // r12
long long v23; // r13
long long v24; // rdx
long long v25; // r14
int v26; // eax
long long v27; // r14
long long *v28; // rdx
int v29; // r12d
long long v30; // r14
unsigned int v31; // r14d
int v33; // eax
long long v34; // rdx
unsigned long long v35; // rax
_BYTE v36[8]; // [rsp+8h] [rbp-78h] BYREF
long long v37; // [rsp+10h] [rbp-70h]
long long *v38; // [rsp+18h] [rbp-68h] BYREF
long long v39; // [rsp+20h] [rbp-60h]
char *v40; // [rsp+28h] [rbp-58h]
unsigned long long v41; // [rsp+30h] [rbp-50h]
long long v42; // [rsp+38h] [rbp-48h]
unsigned int v43; // [rsp+44h] [rbp-3Ch]
long long v44; // [rsp+48h] [rbp-38h]
int v45; // [rsp+54h] [rbp-2Ch]
v41 = a5;
v9 = a1;
v10 = *(_QWORD *)a1;
v11 = (unsigned int)a3;
v12 = mi_check_index((unsigned int *)a1, (unsigned int)a3, a3);
if ( (v12 & 0x80000000) != 0 )
return *(unsigned int *)my_thread_var(a1, v11, v13);
v42 = a2;
*(_DWORD *)(a1 + 464) &= 0x401u;
*(_DWORD *)(a1 + 480) = a6;
v37 = v12;
v14 = 112LL * v12;
v39 = v10;
v44 = v14 + *(_QWORD *)(v10 + 536);
v15 = *(_DWORD *)(a1 + 460);
v43 = v12;
if ( (v15 & 1) != 0 )
{
*(_DWORD *)(a1 + 460) = v15 & 0xFFFFFFFE;
v40 = (char *)(*(_QWORD *)(a1 + 264) + *(unsigned int *)(*(_QWORD *)a1 + 404LL));
memmove(v40, a4, (unsigned int)v41);
v38 = (long long *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + v14 + 40)
+ 32 * (unsigned int)*(unsigned __int16 *)(a1 + 492));
}
else
{
v40 = (char *)(*(_QWORD *)(a1 + 264) + *(unsigned int *)(*(_QWORD *)a1 + 404LL));
v41 = mi_pack_key(a1, v12, v40, a4, v41, &v38);
*(_DWORD *)(a1 + 488) = v41;
*(_WORD *)(a1 + 492) = (unsigned int)((_DWORD)v38 - *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + v14 + 40)) >> 5;
}
v16 = v37;
if ( *(_DWORD *)(a1 + 500) == 2 )
{
v11 = 0LL;
if ( (unsigned int)mi_readinfo((long long *)a1, 0LL, 1LL) )
return *(unsigned int *)my_thread_var(a1, v11, v13);
}
if ( *(_BYTE *)(v39 + 900) )
{
v17 = *(_QWORD *)(v39 + 1224) + 152 * v37;
if ( *(_QWORD *)(v17 + 144) )
psi_rwlock_rdlock(v17, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_rkey.c", 0x4Cu);
else
my_rw_rdlock(v17);
}
v45 = a6;
v18 = myisam_read_vec[a6];
v19 = 2416;
if ( (v18 & 0x103) != 0 )
v19 = v41;
if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)v9 + 536LL) + v14 + 12) == 2 )
{
a1 = v9;
v11 = v43;
first = rtree_find_first(v9, v43, (long long)v40, v19);
v21 = v45;
v22 = v42;
v23 = v44;
if ( first < 0 )
{
v11 = *(_QWORD *)(*(_QWORD *)v9 + 616LL);
a1 = 126LL;
mi_report_error(126, v11);
*(_DWORD *)my_thread_var(126LL, v11, v24) = 126;
if ( *(_BYTE *)(v39 + 900) )
{
v25 = *(_QWORD *)(v39 + 1224) + 152 * v16;
if ( *(_QWORD *)(v25 + 144) )
PSI_server[45]();
a1 = v25;
my_rw_unlock(v25);
}
if ( !*(_DWORD *)(*(_QWORD *)v9 + 872LL) )
{
a1 = v9;
v11 = 0LL;
mi_writeinfo((long long *)v9, 0LL, v13);
}
return *(unsigned int *)my_thread_var(a1, v11, v13);
}
}
else
{
a1 = v9;
v11 = v44;
v26 = mi_search(v9, v44, (long long)v40, v19, v18, *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v9 + 152LL) + 8 * v37));
v22 = v42;
if ( v26 )
{
v21 = v45;
v23 = v44;
}
else
{
while ( 1 )
{
if ( *(_QWORD *)(v9 + 368) < *(_QWORD *)(*(_QWORD *)(v9 + 8) + 40LL)
|| !v45 && v38 == (long long *)(*(_QWORD *)(v44 + 40) + 32 * (unsigned int)*(unsigned __int16 *)(v44 + 8)) )
{
a1 = v9;
v11 = v43;
v33 = mi_check_index_tuple(v9, v43, v42);
if ( v33 )
break;
}
a1 = v9;
v11 = v44;
if ( (unsigned int)mi_search_next(
v9,
v44,
*(_QWORD *)(v9 + 264),
*(_DWORD *)(v9 + 472),
myisam_readnext_vec[a6],
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)v9 + 152LL) + 8 * v16)) )
goto LABEL_57;
if ( !v45 )
{
a1 = *(_QWORD *)(v44 + 40);
v11 = (long long)v40;
if ( (unsigned int)ha_key_cmp(a1, v40, *(_QWORD *)(v9 + 264), v19, 1LL, v36) )
{
*(_DWORD *)my_thread_var(a1, v11, v34) = 120;
LABEL_57:
*(_QWORD *)(v9 + 368) = -1LL;
v22 = v42;
LABEL_58:
v21 = v45;
goto LABEL_59;
}
}
if ( *(_QWORD *)(v9 + 296) >= *(_QWORD *)(v9 + 304) )
{
a1 = v9;
v11 = v43;
if ( (unsigned __int8)mi_yield_and_check_if_killed(v9, v43) )
{
v22 = 0LL;
goto LABEL_58;
}
}
}
if ( v33 == 2 )
*(_DWORD *)my_thread_var(v9, v11, v13) = 120;
v21 = v45;
v22 = v42;
LABEL_59:
v23 = v44;
v35 = *(_QWORD *)(v9 + 368);
if ( v35 != -1LL && v35 >= *(_QWORD *)(*(_QWORD *)(v9 + 8) + 40LL) )
{
*(_QWORD *)(v9 + 368) = -1LL;
*(_DWORD *)my_thread_var(a1, v11, v13) = 120;
}
}
}
if ( *(_BYTE *)(v39 + 900) )
{
v27 = *(_QWORD *)(v39 + 1224) + 152 * v16;
if ( *(_QWORD *)(v27 + 144) )
PSI_server[45]();
a1 = v27;
my_rw_unlock(v27);
}
*(_DWORD *)(v9 + 476) = v41;
if ( *(_QWORD *)(v9 + 368) == -1LL )
{
if ( !*(_DWORD *)(*(_QWORD *)v9 + 872LL) )
{
a1 = v9;
v11 = 0LL;
mi_writeinfo((long long *)v9, 0LL, v13);
}
if ( !v22 )
return *(unsigned int *)my_thread_var(a1, v11, v13);
goto LABEL_35;
}
v28 = v38;
if ( ((*(_BYTE *)(v23 + 10) >> 3) & (v38 != 0LL)) == 1 )
*(_DWORD *)(v9 + 476) = mi_keylength_part(v23, *(unsigned __int8 **)(v9 + 264), (long long)v38);
if ( v22 )
{
if ( !(*(unsigned int ( **)(long long, _QWORD, long long))(v9 + 320))(v9, *(_QWORD *)(v9 + 368), v22) )
{
*(_BYTE *)(v9 + 464) |= 2u;
return 0;
}
*(_QWORD *)(v9 + 368) = -1LL;
LABEL_35:
v29 = v41;
v30 = (unsigned int)v41;
memcpy(*(_QWORD *)(v9 + 264), v40, (unsigned int)v41);
*(_DWORD *)(v9 + 476) = v29;
a1 = *(_QWORD *)(v9 + 264) + v30;
v11 = 0LL;
memset(a1, 0LL, *(unsigned int *)(*(_QWORD *)v9 + 376LL));
*(_DWORD *)(v9 + 472) = *(_DWORD *)(*(_QWORD *)v9 + 376LL) + v29;
if ( v21 == 3 )
*(_BYTE *)(v9 + 464) |= 0x10u;
return *(unsigned int *)my_thread_var(a1, v11, v13);
}
v31 = 0;
if ( !*(_DWORD *)(*(_QWORD *)v9 + 872LL) )
{
v31 = 0;
mi_writeinfo((long long *)v9, 0LL, (long long)v28);
}
return v31;
}
| mi_rkey:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15D,R9D
MOV qword ptr [RBP + -0x50],R8
MOV R13,RCX
MOV R12,RSI
MOV RBX,RDI
MOV R14,qword ptr [RDI]
MOV ESI,EDX
CALL 0x0013c350
TEST EAX,EAX
JS 0x00147ecc
MOV qword ptr [RBP + -0x48],R12
AND dword ptr [RBX + 0x1d0],0x401
MOV dword ptr [RBX + 0x1e0],R15D
MOV ECX,EAX
MOV qword ptr [RBP + -0x70],RCX
IMUL R12,RCX,0x70
MOV qword ptr [RBP + -0x60],R14
MOV RCX,qword ptr [R14 + 0x218]
ADD RCX,R12
MOV qword ptr [RBP + -0x38],RCX
MOV ECX,dword ptr [RBX + 0x1cc]
TEST CL,0x1
MOV dword ptr [RBP + -0x3c],EAX
JNZ 0x00147c06
MOV RCX,qword ptr [RBX]
MOV EDX,dword ptr [RCX + 0x194]
ADD RDX,qword ptr [RBX + 0x108]
LEA R14,[RBP + -0x68]
MOV RDI,RBX
MOV ESI,EAX
MOV qword ptr [RBP + -0x58],RDX
MOV RCX,R13
MOV R8,qword ptr [RBP + -0x50]
MOV R9,R14
CALL 0x00133409
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RBX + 0x1e8],EAX
MOV EAX,dword ptr [R14]
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + 0x218]
SUB EAX,dword ptr [RCX + R12*0x1 + 0x28]
SHR EAX,0x5
MOV word ptr [RBX + 0x1ec],AX
JMP 0x00147c4b
LAB_00147c06:
AND ECX,0xfffffffe
MOV dword ptr [RBX + 0x1cc],ECX
MOV RAX,qword ptr [RBX]
MOV EDI,dword ptr [RAX + 0x194]
ADD RDI,qword ptr [RBX + 0x108]
MOV EDX,dword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RDI
MOV RSI,R13
CALL 0x001286d0
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x218]
MOVZX ECX,word ptr [RBX + 0x1ec]
SHL ECX,0x5
ADD RCX,qword ptr [RAX + R12*0x1 + 0x28]
MOV qword ptr [RBP + -0x68],RCX
LAB_00147c4b:
CMP dword ptr [RBX + 0x1f4],0x2
MOV R14,qword ptr [RBP + -0x70]
JNZ 0x00147c6f
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1
CALL 0x0013483f
TEST EAX,EAX
JNZ 0x00147ecc
LAB_00147c6f:
MOV RAX,qword ptr [RBP + -0x60]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x00147ca6
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x4c8]
IMUL RCX,R14,0x98
LEA RDI,[RAX + RCX*0x1]
CMP qword ptr [RAX + RCX*0x1 + 0x90],0x0
JNZ 0x00148062
CALL 0x0015f868
LAB_00147ca6:
MOV dword ptr [RBP + -0x2c],R15D
MOV R15D,R15D
LEA RAX,[0x430070]
MOV R8D,dword ptr [RAX + R15*0x4]
TEST R8D,0x103
MOV R13D,0x970
CMOVNZ R13D,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0x218]
CMP byte ptr [RCX + R12*0x1 + 0xc],0x2
JNZ 0x00147d7c
MOV RDI,RBX
MOV ESI,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,R13D
CALL 0x00142698
TEST EAX,EAX
MOV R15D,dword ptr [RBP + -0x2c]
MOV R12,qword ptr [RBP + -0x48]
MOV R13,qword ptr [RBP + -0x38]
JNS 0x00147dae
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x00132f6a
CALL 0x0015cfd2
MOV dword ptr [RAX],0x7e
MOV RAX,qword ptr [RBP + -0x60]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x00147d5d
MOV RAX,qword ptr [RAX + 0x4c8]
IMUL RCX,R14,0x98
LEA R14,[RAX + RCX*0x1]
MOV RDI,qword ptr [RAX + RCX*0x1 + 0x90]
TEST RDI,RDI
JNZ 0x0014808d
LAB_00147d55:
MOV RDI,R14
CALL 0x0015f996
LAB_00147d5d:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x00147ecc
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00134932
JMP 0x00147ecc
LAB_00147d7c:
MOV RAX,qword ptr [RAX + 0x98]
MOV R9,qword ptr [RAX + R14*0x8]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,R13D
CALL 0x0013c3fb
TEST EAX,EAX
MOV R12,qword ptr [RBP + -0x48]
JZ 0x00147f04
MOV R15D,dword ptr [RBP + -0x2c]
MOV R13,qword ptr [RBP + -0x38]
LAB_00147dae:
MOV RAX,qword ptr [RBP + -0x60]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x00147de6
MOV RAX,qword ptr [RAX + 0x4c8]
IMUL RCX,R14,0x98
LEA R14,[RAX + RCX*0x1]
MOV RDI,qword ptr [RAX + RCX*0x1 + 0x90]
TEST RDI,RDI
JNZ 0x00148078
LAB_00147dde:
MOV RDI,R14
CALL 0x0015f996
LAB_00147de6:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RBX + 0x1dc],EAX
CMP qword ptr [RBX + 0x170],-0x1
JZ 0x00147e58
MOV AL,byte ptr [R13 + 0xa]
SHR AL,0x3
MOV RDX,qword ptr [RBP + -0x68]
TEST RDX,RDX
SETNZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x00147e27
MOV RSI,qword ptr [RBX + 0x108]
MOV RDI,R13
CALL 0x0013dfd5
MOV dword ptr [RBX + 0x1dc],EAX
LAB_00147e27:
TEST R12,R12
JZ 0x00147ee6
MOV RSI,qword ptr [RBX + 0x170]
MOV RDI,RBX
MOV RDX,R12
CALL qword ptr [RBX + 0x140]
TEST EAX,EAX
JZ 0x00147fdd
MOV qword ptr [RBX + 0x170],-0x1
JMP 0x00147e73
LAB_00147e58:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x00147e6e
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00134932
LAB_00147e6e:
TEST R12,R12
JZ 0x00147ecc
LAB_00147e73:
MOV RDI,qword ptr [RBX + 0x108]
MOV R12,qword ptr [RBP + -0x50]
MOV R14D,R12D
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,R14
CALL 0x001282c0
MOV dword ptr [RBX + 0x1dc],R12D
ADD R14,qword ptr [RBX + 0x108]
MOV RAX,qword ptr [RBX]
MOV EDX,dword ptr [RAX + 0x178]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001281c0
MOV RAX,qword ptr [RBX]
ADD R12D,dword ptr [RAX + 0x178]
MOV dword ptr [RBX + 0x1d8],R12D
CMP R15D,0x3
JNZ 0x00147ecc
OR byte ptr [RBX + 0x1d0],0x10
LAB_00147ecc:
CALL 0x0015cfd2
MOV R14D,dword ptr [RAX]
LAB_00147ed4:
MOV EAX,R14D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00147ee6:
MOV RAX,qword ptr [RBX]
XOR R14D,R14D
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x00147ed4
XOR R14D,R14D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00134932
JMP 0x00147ed4
LAB_00147f04:
LEA R12,[0x4300b0]
LAB_00147f0b:
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x170]
CMP RCX,qword ptr [RAX + 0x28]
JNC 0x00147f34
LAB_00147f1c:
MOV RDI,RBX
MOV ESI,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00133bae
TEST EAX,EAX
JZ 0x00147f4f
JMP 0x00147fec
LAB_00147f34:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00147f4f
MOV RCX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RCX + 0x8]
SHL EAX,0x5
ADD RAX,qword ptr [RCX + 0x28]
CMP qword ptr [RBP + -0x68],RAX
JZ 0x00147f1c
LAB_00147f4f:
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x108]
MOV ECX,dword ptr [RBX + 0x1d8]
MOV R8D,dword ptr [R12 + R15*0x4]
MOV RAX,qword ptr [RAX + 0x98]
MOV R9,qword ptr [RAX + R14*0x8]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0013e079
TEST EAX,EAX
JNZ 0x00148011
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00147fb1
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RDX,qword ptr [RBX + 0x108]
MOV RSI,qword ptr [RBP + -0x58]
MOV ECX,R13D
MOV R8D,0x1
LEA R9,[RBP + -0x78]
CALL 0x00159d82
TEST EAX,EAX
JNZ 0x00148006
LAB_00147fb1:
MOV RAX,qword ptr [RBX + 0x128]
CMP RAX,qword ptr [RBX + 0x130]
JC 0x00147f0b
MOV RDI,RBX
MOV ESI,dword ptr [RBP + -0x3c]
CALL 0x001480a2
TEST AL,AL
JZ 0x00147f0b
XOR R12D,R12D
JMP 0x00148020
LAB_00147fdd:
OR byte ptr [RBX + 0x1d0],0x2
XOR R14D,R14D
JMP 0x00147ed4
LAB_00147fec:
CMP EAX,0x2
JNZ 0x00147ffc
CALL 0x0015cfd2
MOV dword ptr [RAX],0x78
LAB_00147ffc:
MOV R15D,dword ptr [RBP + -0x2c]
MOV R12,qword ptr [RBP + -0x48]
JMP 0x00148024
LAB_00148006:
CALL 0x0015cfd2
MOV dword ptr [RAX],0x78
LAB_00148011:
MOV qword ptr [RBX + 0x170],-0x1
MOV R12,qword ptr [RBP + -0x48]
LAB_00148020:
MOV R15D,dword ptr [RBP + -0x2c]
LAB_00148024:
MOV R13,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBX + 0x170]
CMP RAX,-0x1
JZ 0x00147dae
MOV RCX,qword ptr [RBX + 0x8]
CMP RAX,qword ptr [RCX + 0x28]
JC 0x00147dae
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x0015cfd2
MOV dword ptr [RAX],0x78
JMP 0x00147dae
LAB_00148062:
LEA RSI,[0x192ec2]
MOV EDX,0x4c
CALL 0x0012a077
JMP 0x00147ca6
LAB_00148078:
LEA RAX,[0x431e50]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x00147dde
LAB_0014808d:
LEA RAX,[0x431e50]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x00147d55
|
int4
mi_rkey(long *param_1,long param_2,int4 param_3,void *param_4,ulong param_5,uint param_6)
{
long lVar1;
char cVar2;
uint uVar3;
int iVar4;
int4 uVar5;
int4 *puVar6;
long lVar7;
long lVar8;
ulong uVar9;
int1 local_80 [8];
ulong local_78;
long local_70;
long local_68;
void *local_60;
ulong local_58;
long local_50;
uint local_44;
long local_40;
uint local_34;
lVar8 = *param_1;
local_58 = param_5;
uVar3 = _mi_check_index(param_1,param_3);
if (-1 < (int)uVar3) {
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0x401;
*(uint *)(param_1 + 0x3c) = param_6;
local_78 = (ulong)uVar3;
lVar7 = local_78 * 0x70;
local_40 = *(long *)(lVar8 + 0x218) + lVar7;
local_68 = lVar8;
local_50 = param_2;
local_44 = uVar3;
if ((*(uint *)((long)param_1 + 0x1cc) & 1) == 0) {
local_60 = (void *)((ulong)*(uint *)(*param_1 + 0x194) + param_1[0x21]);
local_58 = _mi_pack_key(param_1,uVar3,local_60,param_4,local_58,&local_70);
*(int *)(param_1 + 0x3d) = (int)local_58;
*(short *)((long)param_1 + 0x1ec) =
(short)((uint)((int)local_70 - *(int *)(*(long *)(*param_1 + 0x218) + 0x28 + lVar7)) >> 5
);
}
else {
*(uint *)((long)param_1 + 0x1cc) = *(uint *)((long)param_1 + 0x1cc) & 0xfffffffe;
local_60 = (void *)((ulong)*(uint *)(*param_1 + 0x194) + param_1[0x21]);
memmove(local_60,param_4,local_58 & 0xffffffff);
local_70 = (ulong)*(ushort *)((long)param_1 + 0x1ec) * 0x20 +
*(long *)(*(long *)(*param_1 + 0x218) + 0x28 + lVar7);
}
uVar9 = local_78;
if ((*(int *)((long)param_1 + 500) != 2) || (iVar4 = _mi_readinfo(param_1,0,1), iVar4 == 0)) {
if (*(char *)(local_68 + 900) != '\0') {
if (*(long *)(*(long *)(local_68 + 0x4c8) + 0x90 + uVar9 * 0x98) == 0) {
my_rw_rdlock();
}
else {
psi_rwlock_rdlock(*(long *)(local_68 + 0x4c8) + uVar9 * 0x98,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_rkey.c",0x4c
);
}
}
uVar5 = 0x970;
if ((*(uint *)(myisam_read_vec + (ulong)param_6 * 4) & 0x103) != 0) {
uVar5 = (int4)local_58;
}
local_34 = param_6;
if (*(char *)(*(long *)(*param_1 + 0x218) + 0xc + lVar7) == '\x02') {
iVar4 = rtree_find_first(param_1,local_44,local_60,uVar5);
lVar7 = local_50;
lVar8 = local_40;
uVar3 = local_34;
if (iVar4 < 0) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
if (*(char *)(local_68 + 900) != '\0') {
lVar8 = *(long *)(local_68 + 0x4c8);
if (*(long *)(lVar8 + 0x90 + uVar9 * 0x98) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar8 + uVar9 * 0x98);
}
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
goto LAB_00147ecc;
}
}
else {
iVar4 = _mi_search(param_1,local_40,local_60,uVar5,
*(uint *)(myisam_read_vec + (ulong)param_6 * 4),
*(int8 *)(*(long *)(*param_1 + 0x98) + uVar9 * 8));
lVar7 = local_50;
lVar8 = local_40;
uVar3 = local_34;
if (iVar4 == 0) {
do {
if ((((ulong)param_1[0x2e] < *(ulong *)(param_1[1] + 0x28)) ||
((local_34 == 0 &&
(local_70 == (ulong)*(ushort *)(local_40 + 8) * 0x20 + *(long *)(local_40 + 0x28)))
)) && (iVar4 = mi_check_index_tuple(param_1,local_44,local_50), iVar4 != 0)) {
lVar7 = local_50;
if (iVar4 == 2) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x78;
lVar7 = local_50;
}
goto LAB_00148024;
}
iVar4 = _mi_search_next(param_1,local_40,param_1[0x21],(int)param_1[0x3b],
*(int4 *)(myisam_readnext_vec + (ulong)param_6 * 4),
*(int8 *)(*(long *)(*param_1 + 0x98) + uVar9 * 8));
if (iVar4 != 0) {
LAB_00148011:
param_1[0x2e] = -1;
lVar7 = local_50;
goto LAB_00148024;
}
if ((local_34 == 0) &&
(iVar4 = ha_key_cmp(*(int8 *)(local_40 + 0x28),local_60,param_1[0x21],uVar5,1,
local_80), iVar4 != 0)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x78;
goto LAB_00148011;
}
} while (((ulong)param_1[0x25] < (ulong)param_1[0x26]) ||
(cVar2 = mi_yield_and_check_if_killed(param_1,local_44), cVar2 == '\0'));
lVar7 = 0;
LAB_00148024:
uVar3 = local_34;
lVar8 = local_40;
if ((param_1[0x2e] != 0xffffffffffffffff) &&
(*(ulong *)(param_1[1] + 0x28) <= (ulong)param_1[0x2e])) {
param_1[0x2e] = -1;
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x78;
}
}
}
if (*(char *)(local_68 + 900) != '\0') {
lVar1 = *(long *)(local_68 + 0x4c8);
if (*(long *)(lVar1 + 0x90 + uVar9 * 0x98) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar1 + uVar9 * 0x98);
}
*(int *)((long)param_1 + 0x1dc) = (int)local_58;
if (param_1[0x2e] == -1) {
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
if (lVar7 == 0) goto LAB_00147ecc;
}
else {
if ((local_70 != 0 & *(byte *)(lVar8 + 10) >> 3) == 1) {
uVar5 = _mi_keylength_part(lVar8,param_1[0x21]);
*(int4 *)((long)param_1 + 0x1dc) = uVar5;
}
if (lVar7 == 0) {
if (*(int *)(*param_1 + 0x368) != 0) {
return 0;
}
_mi_writeinfo(param_1,0);
return 0;
}
iVar4 = (*(code *)param_1[0x28])(param_1,param_1[0x2e],lVar7);
if (iVar4 == 0) {
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2;
return 0;
}
param_1[0x2e] = -1;
}
iVar4 = (int)local_58;
uVar9 = local_58 & 0xffffffff;
memcpy((void *)param_1[0x21],local_60,uVar9);
*(int *)((long)param_1 + 0x1dc) = iVar4;
memset((void *)(uVar9 + param_1[0x21]),0,(ulong)*(uint *)(*param_1 + 0x178));
*(int *)(param_1 + 0x3b) = iVar4 + *(int *)(*param_1 + 0x178);
if (uVar3 == 3) {
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 0x10;
}
}
}
LAB_00147ecc:
puVar6 = (int4 *)_my_thread_var();
return *puVar6;
}
| |
33,628 | MyCTX_nopad::finish(unsigned char*, unsigned int*) | eloqsql/mysys_ssl/my_crypt.cc | int finish(uchar *dst, uint *dlen)
{
if (source_tail_len)
{
/*
Not much we can do, block ciphers cannot encrypt data that aren't
a multiple of the block length. At least not without padding.
Let's do something CTR-like for the last partial block.
*/
uchar mask[MY_AES_BLOCK_SIZE];
uint mlen;
int rc= my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD,
oiv, sizeof(mask), mask, &mlen, key, klen, 0, 0);
DBUG_ASSERT(rc == MY_AES_OK);
if (rc)
return rc;
DBUG_ASSERT(mlen == sizeof(mask));
for (uint i=0; i < source_tail_len; i++)
dst[i]= source_tail[i] ^ mask[i];
}
*dlen= source_tail_len;
return MY_AES_OK;
} | O3 | cpp | MyCTX_nopad::finish(unsigned char*, unsigned int*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
cmpl $0x0, 0xdc(%rdi)
movl $0x0, %r13d
je 0xd8667
movq %rsi, %r15
movq %rdi, %r12
leaq 0xe0(%rdi), %rdx
movl 0xd8(%rdi), %eax
xorl %r13d, %r13d
leaq -0x40(%rbp), %r8
leaq -0x44(%rbp), %r9
xorl %edi, %edi
movl $0x3, %esi
movl $0x10, %ecx
pushq $0x0
pushq $0x0
pushq %rax
pushq 0xd0(%r12)
callq 0xd81e3
addq $0x20, %rsp
testl %eax, %eax
je 0xd863a
movl %eax, %ebx
jmp 0xd866a
cmpl $0x0, 0xdc(%r12)
je 0xd8667
xorl %eax, %eax
movb -0x40(%rbp,%rax), %cl
xorb 0xf0(%r12,%rax), %cl
movb %cl, (%r15,%rax)
incq %rax
movl 0xdc(%r12), %r13d
cmpq %r13, %rax
jb 0xd8647
movl %r13d, (%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xd868a
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
nop
| _ZN11MyCTX_nopad6finishEPhPj:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
xor ebx, ebx
cmp dword ptr [rdi+0DCh], 0
mov r13d, 0
jz short loc_D8667
mov r15, rsi
mov r12, rdi
lea rdx, [rdi+0E0h]
mov eax, [rdi+0D8h]
xor r13d, r13d
lea r8, [rbp+var_40]
lea r9, [rbp+var_44]
xor edi, edi
mov esi, 3
mov ecx, 10h
push 0
push 0
push rax
push qword ptr [r12+0D0h]
call my_aes_crypt
add rsp, 20h
test eax, eax
jz short loc_D863A
mov ebx, eax
jmp short loc_D866A
loc_D863A:
cmp dword ptr [r12+0DCh], 0
jz short loc_D8667
xor eax, eax
loc_D8647:
mov cl, [rbp+rax+var_40]
xor cl, [r12+rax+0F0h]
mov [r15+rax], cl
inc rax
mov r13d, [r12+0DCh]
cmp rax, r13
jb short loc_D8647
loc_D8667:
mov [r14], r13d
loc_D866A:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_D868A
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D868A:
call ___stack_chk_fail
| long long MyCTX_nopad::finish(MyCTX_nopad *this, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int v4; // ebx
unsigned long long v5; // r13
unsigned int v6; // eax
unsigned long long v7; // rax
int v9; // [rsp+Ch] [rbp-44h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v11; // [rsp+20h] [rbp-30h]
v11 = __readfsqword(0x28u);
v4 = 0;
LODWORD(v5) = 0;
if ( !*((_DWORD *)this + 55) )
{
LABEL_7:
*a3 = v5;
return v4;
}
LODWORD(v5) = 0;
v6 = my_aes_crypt(
0,
3,
(long long)this + 224,
0x10u,
(long long)v10,
&v9,
*((_QWORD *)this + 26),
*((_DWORD *)this + 54),
0LL);
if ( !v6 )
{
if ( *((_DWORD *)this + 55) )
{
v7 = 0LL;
do
{
a2[v7] = *((_BYTE *)this + v7 + 240) ^ v10[v7];
++v7;
v5 = *((unsigned int *)this + 55);
}
while ( v7 < v5 );
}
goto LABEL_7;
}
return v6;
}
| finish:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XOR EBX,EBX
CMP dword ptr [RDI + 0xdc],0x0
MOV R13D,0x0
JZ 0x001d8667
MOV R15,RSI
MOV R12,RDI
LEA RDX,[RDI + 0xe0]
MOV EAX,dword ptr [RDI + 0xd8]
XOR R13D,R13D
LEA R8,[RBP + -0x40]
LEA R9,[RBP + -0x44]
XOR EDI,EDI
MOV ESI,0x3
MOV ECX,0x10
PUSH 0x0
PUSH 0x0
PUSH RAX
PUSH qword ptr [R12 + 0xd0]
CALL 0x001d81e3
ADD RSP,0x20
TEST EAX,EAX
JZ 0x001d863a
MOV EBX,EAX
JMP 0x001d866a
LAB_001d863a:
CMP dword ptr [R12 + 0xdc],0x0
JZ 0x001d8667
XOR EAX,EAX
LAB_001d8647:
MOV CL,byte ptr [RBP + RAX*0x1 + -0x40]
XOR CL,byte ptr [R12 + RAX*0x1 + 0xf0]
MOV byte ptr [R15 + RAX*0x1],CL
INC RAX
MOV R13D,dword ptr [R12 + 0xdc]
CMP RAX,R13
JC 0x001d8647
LAB_001d8667:
MOV dword ptr [R14],R13D
LAB_001d866a:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001d868a
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d868a:
CALL 0x00129270
|
/* MyCTX_nopad::finish(unsigned char*, unsigned int*) */
int __thiscall MyCTX_nopad::finish(MyCTX_nopad *this,uchar *param_1,uint *param_2)
{
int iVar1;
ulong uVar2;
uint uVar3;
long in_FS_OFFSET;
int1 local_4c [4];
byte local_48 [16];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = 0;
if (*(int *)(this + 0xdc) != 0) {
uVar3 = 0;
iVar1 = my_aes_crypt(0,3,this + 0xe0,0x10,local_48,local_4c,*(int8 *)(this + 0xd0),
*(int4 *)(this + 0xd8),0,0);
if (iVar1 != 0) goto LAB_001d866a;
if (*(int *)(this + 0xdc) != 0) {
uVar2 = 0;
do {
param_1[uVar2] = local_48[uVar2] ^ (byte)this[uVar2 + 0xf0];
uVar2 = uVar2 + 1;
uVar3 = *(uint *)(this + 0xdc);
} while (uVar2 < uVar3);
}
}
*param_2 = uVar3;
iVar1 = 0;
LAB_001d866a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar1;
}
| |
33,629 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O0 | c | js_os_ttySetRaw:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %rsp, %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0x18590
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x18637
leaq 0x4(%rsp), %rdi
xorl %esi, %esi
movl $0x3c, %edx
callq 0xe350
movl (%rsp), %edi
leaq 0x4(%rsp), %rsi
callq 0xe750
leaq 0x11e05b(%rip), %rdi # 0x136610
leaq 0x4(%rsp), %rsi
movl $0x3c, %edx
callq 0xe5b0
movl 0x4(%rsp), %eax
andl $0xfffffa14, %eax # imm = 0xFFFFFA14
movl %eax, 0x4(%rsp)
movl 0x8(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x8(%rsp)
movl 0x10(%rsp), %eax
andl $0xffff7fb5, %eax # imm = 0xFFFF7FB5
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %eax
andl $0xfffffecf, %eax # imm = 0xFFFFFECF
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
orl $0x30, %eax
movl %eax, 0xc(%rsp)
movb $0x1, 0x1b(%rsp)
movb $0x0, 0x1a(%rsp)
movl (%rsp), %edi
xorl %esi, %esi
leaq 0x4(%rsp), %rdx
callq 0xe760
leaq 0x46af(%rip), %rdi # 0x1ccd0
callq 0x1083b0
movl $0x0, 0x68(%rsp)
movq $0x3, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
| js_os_ttySetRaw:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_2C], ecx
mov [rsp+78h+var_38], r8
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
mov rsi, rsp
call JS_ToInt32
cmp eax, 0
jz short loc_18590
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_18637
loc_18590:
lea rdi, [rsp+78h+var_74]
xor esi, esi
mov edx, 3Ch ; '<'
call _memset
mov edi, [rsp+78h+var_78]
lea rsi, [rsp+78h+var_74]
call _tcgetattr
lea rdi, oldtty
lea rsi, [rsp+78h+var_74]
mov edx, 3Ch ; '<'
call _memcpy
mov eax, [rsp+78h+var_74]
and eax, 0FFFFFA14h
mov [rsp+78h+var_74], eax
mov eax, [rsp+78h+var_70]
or eax, 1
mov [rsp+78h+var_70], eax
mov eax, [rsp+78h+var_68]
and eax, 0FFFF7FB5h
mov [rsp+78h+var_68], eax
mov eax, [rsp+78h+var_6C]
and eax, 0FFFFFECFh
mov [rsp+78h+var_6C], eax
mov eax, [rsp+78h+var_6C]
or eax, 30h
mov [rsp+78h+var_6C], eax
mov [rsp+78h+var_5D], 1
mov [rsp+78h+var_5E], 0
mov edi, [rsp+78h+var_78]
xor esi, esi
lea rdx, [rsp+78h+var_74]
call _tcsetattr
lea rdi, term_exit
call atexit
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 3
loc_18637:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
unsigned int v6; // [rsp+0h] [rbp-78h] BYREF
int v7; // [rsp+4h] [rbp-74h] BYREF
int v8; // [rsp+8h] [rbp-70h]
int v9; // [rsp+Ch] [rbp-6Ch]
int v10; // [rsp+10h] [rbp-68h]
char v11; // [rsp+1Ah] [rbp-5Eh]
char v12; // [rsp+1Bh] [rbp-5Dh]
_QWORD *v13; // [rsp+40h] [rbp-38h]
int v14; // [rsp+4Ch] [rbp-2Ch]
long long v15; // [rsp+50h] [rbp-28h]
long long v16; // [rsp+58h] [rbp-20h]
long long v17; // [rsp+60h] [rbp-18h]
long long v18; // [rsp+68h] [rbp-10h]
long long v19; // [rsp+70h] [rbp-8h]
v16 = a2;
v17 = a3;
v15 = a1;
v14 = a4;
v13 = a5;
if ( (unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
LODWORD(v18) = 0;
v19 = 6LL;
}
else
{
memset(&v7, 0LL, 60LL);
tcgetattr(v6, &v7);
memcpy(&oldtty, &v7, 60LL);
v7 &= 0xFFFFFA14;
v8 |= 1u;
v10 &= 0xFFFF7FB5;
v9 &= 0xFFFFFECF;
v9 |= 0x30u;
v12 = 1;
v11 = 0;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
LODWORD(v18) = 0;
v19 = 3LL;
}
return v18;
}
| js_os_ttySetRaw:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
MOV RSI,RSP
CALL 0x00138f20
CMP EAX,0x0
JZ 0x00118590
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00118637
LAB_00118590:
LEA RDI,[RSP + 0x4]
XOR ESI,ESI
MOV EDX,0x3c
CALL 0x0010e350
MOV EDI,dword ptr [RSP]
LEA RSI,[RSP + 0x4]
CALL 0x0010e750
LEA RDI,[0x236610]
LEA RSI,[RSP + 0x4]
MOV EDX,0x3c
CALL 0x0010e5b0
MOV EAX,dword ptr [RSP + 0x4]
AND EAX,0xfffffa14
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x8]
OR EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x10]
AND EAX,0xffff7fb5
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0xc]
AND EAX,0xfffffecf
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0xc]
OR EAX,0x30
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0x1b],0x1
MOV byte ptr [RSP + 0x1a],0x0
MOV EDI,dword ptr [RSP]
XOR ESI,ESI
LEA RDX,[RSP + 0x4]
CALL 0x0010e760
LEA RDI,[0x11ccd0]
CALL 0x002083b0
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x3
LAB_00118637:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
js_os_ttySetRaw(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_78;
termios local_74;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar2 = JS_ToInt32(param_1,&local_78,*param_5,param_5[1]);
if (iVar2 == 0) {
memset(&local_74,0,0x3c);
tcgetattr(local_78,&local_74);
memcpy(oldtty,&local_74,0x3c);
local_74.c_iflag = local_74.c_iflag & 0xfffffa14;
local_74.c_oflag = local_74.c_oflag | 1;
local_74.c_lflag = local_74.c_lflag & 0xffff7fb5;
local_74.c_cflag = local_74.c_cflag & 0xfffffecf | 0x30;
local_74.c_cc[6] = '\x01';
local_74.c_cc[5] = '\0';
tcsetattr(local_78,0,&local_74);
atexit(term_exit);
local_8 = 3;
}
else {
local_8 = 6;
}
auVar1._4_8_ = local_8;
auVar1._0_4_ = uStack_c;
auVar1._12_4_ = 0;
return auVar1 << 0x20;
}
| |
33,630 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O1 | c | js_os_ttySetRaw:
pushq %rbx
subq $0x50, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x279b0
movl $0x6, %edx
testl %eax, %eax
jne 0x18c9c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0xe760
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm0, 0xb4979(%rip) # 0xcd5b8
movups %xmm1, 0xb4982(%rip) # 0xcd5c8
andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14
movups 0x2c(%rbx), %xmm0
orb $0x1, 0x4(%rbx)
movups %xmm2, 0xb497d(%rip) # 0xcd5d8
andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5
movups %xmm0, 0xb497b(%rip) # 0xcd5e4
movl $0xfffffecf, %eax # imm = 0xFFFFFECF
andl 0x8(%rbx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rbx)
movw $0x100, 0x16(%rbx) # imm = 0x100
movl 0xc(%rsp), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe770
leaq 0x1e67(%rip), %rdi # 0x1aaf9
callq 0x9aa20
movl $0x3, %edx
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
| js_os_ttySetRaw:
push rbx
sub rsp, 50h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+58h+var_4C]
call JS_ToInt32
mov edx, 6
test eax, eax
jnz loc_18C9C
xorps xmm0, xmm0
lea rbx, [rsp+58h+var_48]
movups xmmword ptr [rbx+2Ch], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx], xmm0
mov edi, [rsp+58h+var_4C]
mov rsi, rbx
call _tcgetattr
movaps xmm0, xmmword ptr [rbx]
movaps xmm1, xmmword ptr [rbx+10h]
movaps xmm2, xmmword ptr [rbx+20h]
movups cs:oldtty, xmm0
movups cs:xmmword_CD5C8, xmm1
and dword ptr [rbx], 0FFFFFA14h
movups xmm0, xmmword ptr [rbx+2Ch]
or byte ptr [rbx+4], 1
movups cs:xmmword_CD5D8, xmm2
and dword ptr [rbx+0Ch], 0FFFF7FB5h
movups cs:xmmword_CD5D8+0Ch, xmm0
mov eax, 0FFFFFECFh
and eax, [rbx+8]
or eax, 30h
mov [rbx+8], eax
mov word ptr [rbx+16h], 100h
mov edi, [rsp+58h+var_4C]
xor esi, esi
mov rdx, rbx
call _tcsetattr
lea rdi, term_exit
call atexit
mov edx, 3
loc_18C9C:
xor eax, eax
add rsp, 50h
pop rbx
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v7; // [rsp+10h] [rbp-48h] BYREF
__int128 v8; // [rsp+20h] [rbp-38h]
_OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
memset(v9, 0, 28);
v8 = 0LL;
v7 = 0LL;
tcgetattr(v6, &v7, 6LL);
oldtty = v7;
xmmword_CD5C8 = v8;
LODWORD(v7) = v7 & 0xFFFFFA14;
BYTE4(v7) |= 1u;
xmmword_CD5D8 = v9[0];
HIDWORD(v7) &= 0xFFFF7FB5;
*(__int128 *)((char *)&xmmword_CD5D8 + 12) = *(_OWORD *)((char *)v9 + 12);
DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30;
WORD3(v8) = 256;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
}
return 0LL;
}
| js_os_ttySetRaw:
PUSH RBX
SUB RSP,0x50
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x001279b0
MOV EDX,0x6
TEST EAX,EAX
JNZ 0x00118c9c
XORPS XMM0,XMM0
LEA RBX,[RSP + 0x10]
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RBX],XMM0
MOV EDI,dword ptr [RSP + 0xc]
MOV RSI,RBX
CALL 0x0010e760
MOVAPS XMM0,xmmword ptr [RBX]
MOVAPS XMM1,xmmword ptr [RBX + 0x10]
MOVAPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [0x001cd5b8],XMM0
MOVUPS xmmword ptr [0x001cd5c8],XMM1
AND dword ptr [RBX],0xfffffa14
MOVUPS XMM0,xmmword ptr [RBX + 0x2c]
OR byte ptr [RBX + 0x4],0x1
MOVUPS xmmword ptr [0x001cd5d8],XMM2
AND dword ptr [RBX + 0xc],0xffff7fb5
MOVUPS xmmword ptr [0x001cd5e4],XMM0
MOV EAX,0xfffffecf
AND EAX,dword ptr [RBX + 0x8]
OR EAX,0x30
MOV dword ptr [RBX + 0x8],EAX
MOV word ptr [RBX + 0x16],0x100
MOV EDI,dword ptr [RSP + 0xc]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0010e770
LEA RDI,[0x11aaf9]
CALL 0x0019aa20
MOV EDX,0x3
LAB_00118c9c:
XOR EAX,EAX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] js_os_ttySetRaw(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
ulong uVar3;
int8 *in_R8;
int local_4c;
termios local_48;
iVar2 = JS_ToInt32(param_1,&local_4c,*in_R8,in_R8[1]);
uVar3 = 6;
if (iVar2 == 0) {
local_48.c_cc[0x1f] = '\0';
local_48._49_3_ = 0;
local_48.c_ispeed = 0;
local_48.c_ospeed = 0;
local_48.c_cc[0xf] = '\0';
local_48.c_cc[0x10] = '\0';
local_48.c_cc[0x11] = '\0';
local_48.c_cc[0x12] = '\0';
local_48.c_cc[0x13] = '\0';
local_48.c_cc[0x14] = '\0';
local_48.c_cc[0x15] = '\0';
local_48.c_cc[0x16] = '\0';
local_48.c_cc[0x17] = '\0';
local_48.c_cc[0x18] = '\0';
local_48.c_cc[0x19] = '\0';
local_48.c_cc[0x1a] = '\0';
local_48.c_cc[0x1b] = '\0';
local_48.c_cc[0x1c] = '\0';
local_48.c_cc[0x1d] = '\0';
local_48.c_cc[0x1e] = '\0';
local_48.c_line = '\0';
local_48.c_cc[0] = '\0';
local_48.c_cc[1] = '\0';
local_48.c_cc[2] = '\0';
local_48.c_cc[3] = '\0';
local_48.c_cc[4] = '\0';
local_48.c_cc[5] = '\0';
local_48.c_cc[6] = '\0';
local_48.c_cc[7] = '\0';
local_48.c_cc[8] = '\0';
local_48.c_cc[9] = '\0';
local_48.c_cc[10] = '\0';
local_48.c_cc[0xb] = '\0';
local_48.c_cc[0xc] = '\0';
local_48.c_cc[0xd] = '\0';
local_48.c_cc[0xe] = '\0';
local_48.c_iflag = 0;
local_48.c_oflag = 0;
local_48.c_cflag = 0;
local_48.c_lflag = 0;
tcgetattr(local_4c,&local_48);
oldtty._0_4_ = local_48.c_iflag;
oldtty._4_4_ = local_48.c_oflag;
oldtty._8_4_ = local_48.c_cflag;
oldtty._12_4_ = local_48.c_lflag;
oldtty[0x10] = local_48.c_line;
oldtty[0x11] = local_48.c_cc[0];
oldtty[0x12] = local_48.c_cc[1];
oldtty[0x13] = local_48.c_cc[2];
oldtty[0x14] = local_48.c_cc[3];
oldtty[0x15] = local_48.c_cc[4];
oldtty[0x16] = local_48.c_cc[5];
oldtty[0x17] = local_48.c_cc[6];
oldtty[0x18] = local_48.c_cc[7];
oldtty[0x19] = local_48.c_cc[8];
oldtty[0x1a] = local_48.c_cc[9];
oldtty[0x1b] = local_48.c_cc[10];
oldtty[0x1c] = local_48.c_cc[0xb];
oldtty[0x1d] = local_48.c_cc[0xc];
oldtty[0x1e] = local_48.c_cc[0xd];
oldtty[0x1f] = local_48.c_cc[0xe];
local_48._0_8_ = local_48._0_8_ & 0xfffffffffffffa14;
local_48._0_8_ = local_48._0_8_ | 0x100000000;
oldtty[0x20] = local_48.c_cc[0xf];
oldtty[0x21] = local_48.c_cc[0x10];
oldtty[0x22] = local_48.c_cc[0x11];
oldtty[0x23] = local_48.c_cc[0x12];
oldtty[0x24] = local_48.c_cc[0x13];
oldtty[0x25] = local_48.c_cc[0x14];
oldtty[0x26] = local_48.c_cc[0x15];
oldtty[0x27] = local_48.c_cc[0x16];
oldtty[0x28] = local_48.c_cc[0x17];
oldtty[0x29] = local_48.c_cc[0x18];
oldtty[0x2a] = local_48.c_cc[0x19];
oldtty[0x2b] = local_48.c_cc[0x1a];
oldtty[0x2c] = local_48.c_cc[0x1b];
oldtty[0x2d] = local_48.c_cc[0x1c];
oldtty[0x2e] = local_48.c_cc[0x1d];
oldtty[0x2f] = local_48.c_cc[0x1e];
oldtty._48_4_ = local_48._48_4_;
oldtty._52_4_ = local_48.c_ispeed;
oldtty._56_4_ = local_48.c_ospeed;
local_48._8_8_ = local_48._8_8_ & 0xffff7fb5fffffecf | 0x30;
local_48.c_cc._5_2_ = 0x100;
tcsetattr(local_4c,0,&local_48);
atexit(term_exit);
uVar3 = 3;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar3;
return auVar1 << 0x40;
}
| |
33,631 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O2 | c | js_os_ttySetRaw:
pushq %rbx
subq $0x50, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x215d7
testl %eax, %eax
je 0x138aa
pushq $0x6
jmp 0x13939
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0xe780
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm0, 0xa7ce9(%rip) # 0xbb5c8
movups %xmm1, 0xa7cf2(%rip) # 0xbb5d8
andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14
movups 0x2c(%rbx), %xmm0
orb $0x1, 0x4(%rbx)
movups %xmm2, 0xa7ced(%rip) # 0xbb5e8
andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5
movups %xmm0, 0xa7ceb(%rip) # 0xbb5f4
movl $0xfffffecf, %eax # imm = 0xFFFFFECF
andl 0x8(%rbx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rbx)
movw $0x100, 0x16(%rbx) # imm = 0x100
movl 0xc(%rsp), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe790
leaq 0x1e22(%rip), %rdi # 0x15754
callq 0x81250
pushq $0x3
popq %rdx
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
| js_os_ttySetRaw:
push rbx
sub rsp, 50h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+58h+var_4C]
call JS_ToInt32
test eax, eax
jz short loc_138AA
push 6
jmp loc_13939
loc_138AA:
xorps xmm0, xmm0
lea rbx, [rsp+58h+var_48]
movups xmmword ptr [rbx+2Ch], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx], xmm0
mov edi, [rsp+58h+var_4C]
mov rsi, rbx
call _tcgetattr
movaps xmm0, xmmword ptr [rbx]
movaps xmm1, xmmword ptr [rbx+10h]
movaps xmm2, xmmword ptr [rbx+20h]
movups cs:oldtty, xmm0
movups cs:xmmword_BB5D8, xmm1
and dword ptr [rbx], 0FFFFFA14h
movups xmm0, xmmword ptr [rbx+2Ch]
or byte ptr [rbx+4], 1
movups cs:xmmword_BB5E8, xmm2
and dword ptr [rbx+0Ch], 0FFFF7FB5h
movups cs:xmmword_BB5E8+0Ch, xmm0
mov eax, 0FFFFFECFh
and eax, [rbx+8]
or eax, 30h
mov [rbx+8], eax
mov word ptr [rbx+16h], 100h
mov edi, [rsp+58h+var_4C]
xor esi, esi
mov rdx, rbx
call _tcsetattr
lea rdi, term_exit
call atexit
push 3
loc_13939:
pop rdx
xor eax, eax
add rsp, 50h
pop rbx
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v7; // [rsp+10h] [rbp-48h] BYREF
__int128 v8; // [rsp+20h] [rbp-38h]
_OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
memset(v9, 0, 28);
v8 = 0LL;
v7 = 0LL;
tcgetattr(v6, &v7);
oldtty = v7;
xmmword_BB5D8 = v8;
LODWORD(v7) = v7 & 0xFFFFFA14;
BYTE4(v7) |= 1u;
xmmword_BB5E8 = v9[0];
HIDWORD(v7) &= 0xFFFF7FB5;
*(__int128 *)((char *)&xmmword_BB5E8 + 12) = *(_OWORD *)((char *)v9 + 12);
DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30;
WORD3(v8) = 256;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
}
return 0LL;
}
| js_os_ttySetRaw:
PUSH RBX
SUB RSP,0x50
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x001215d7
TEST EAX,EAX
JZ 0x001138aa
PUSH 0x6
JMP 0x00113939
LAB_001138aa:
XORPS XMM0,XMM0
LEA RBX,[RSP + 0x10]
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RBX],XMM0
MOV EDI,dword ptr [RSP + 0xc]
MOV RSI,RBX
CALL 0x0010e780
MOVAPS XMM0,xmmword ptr [RBX]
MOVAPS XMM1,xmmword ptr [RBX + 0x10]
MOVAPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [0x001bb5c8],XMM0
MOVUPS xmmword ptr [0x001bb5d8],XMM1
AND dword ptr [RBX],0xfffffa14
MOVUPS XMM0,xmmword ptr [RBX + 0x2c]
OR byte ptr [RBX + 0x4],0x1
MOVUPS xmmword ptr [0x001bb5e8],XMM2
AND dword ptr [RBX + 0xc],0xffff7fb5
MOVUPS xmmword ptr [0x001bb5f4],XMM0
MOV EAX,0xfffffecf
AND EAX,dword ptr [RBX + 0x8]
OR EAX,0x30
MOV dword ptr [RBX + 0x8],EAX
MOV word ptr [RBX + 0x16],0x100
MOV EDI,dword ptr [RSP + 0xc]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0010e790
LEA RDI,[0x115754]
CALL 0x00181250
PUSH 0x3
LAB_00113939:
POP RDX
XOR EAX,EAX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] js_os_ttySetRaw(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
int8 *in_R8;
ulong uStack_60;
int local_4c;
termios local_48;
iVar2 = JS_ToInt32(param_1,&local_4c,*in_R8,in_R8[1]);
if (iVar2 == 0) {
local_48.c_cc[0x1f] = '\0';
local_48._49_3_ = 0;
local_48.c_ispeed = 0;
local_48.c_ospeed = 0;
local_48.c_cc[0xf] = '\0';
local_48.c_cc[0x10] = '\0';
local_48.c_cc[0x11] = '\0';
local_48.c_cc[0x12] = '\0';
local_48.c_cc[0x13] = '\0';
local_48.c_cc[0x14] = '\0';
local_48.c_cc[0x15] = '\0';
local_48.c_cc[0x16] = '\0';
local_48.c_cc[0x17] = '\0';
local_48.c_cc[0x18] = '\0';
local_48.c_cc[0x19] = '\0';
local_48.c_cc[0x1a] = '\0';
local_48.c_cc[0x1b] = '\0';
local_48.c_cc[0x1c] = '\0';
local_48.c_cc[0x1d] = '\0';
local_48.c_cc[0x1e] = '\0';
local_48.c_line = '\0';
local_48.c_cc[0] = '\0';
local_48.c_cc[1] = '\0';
local_48.c_cc[2] = '\0';
local_48.c_cc[3] = '\0';
local_48.c_cc[4] = '\0';
local_48.c_cc[5] = '\0';
local_48.c_cc[6] = '\0';
local_48.c_cc[7] = '\0';
local_48.c_cc[8] = '\0';
local_48.c_cc[9] = '\0';
local_48.c_cc[10] = '\0';
local_48.c_cc[0xb] = '\0';
local_48.c_cc[0xc] = '\0';
local_48.c_cc[0xd] = '\0';
local_48.c_cc[0xe] = '\0';
local_48.c_iflag = 0;
local_48.c_oflag = 0;
local_48.c_cflag = 0;
local_48.c_lflag = 0;
tcgetattr(local_4c,&local_48);
oldtty._0_4_ = local_48.c_iflag;
oldtty._4_4_ = local_48.c_oflag;
oldtty._8_4_ = local_48.c_cflag;
oldtty._12_4_ = local_48.c_lflag;
oldtty[0x10] = local_48.c_line;
oldtty[0x11] = local_48.c_cc[0];
oldtty[0x12] = local_48.c_cc[1];
oldtty[0x13] = local_48.c_cc[2];
oldtty[0x14] = local_48.c_cc[3];
oldtty[0x15] = local_48.c_cc[4];
oldtty[0x16] = local_48.c_cc[5];
oldtty[0x17] = local_48.c_cc[6];
oldtty[0x18] = local_48.c_cc[7];
oldtty[0x19] = local_48.c_cc[8];
oldtty[0x1a] = local_48.c_cc[9];
oldtty[0x1b] = local_48.c_cc[10];
oldtty[0x1c] = local_48.c_cc[0xb];
oldtty[0x1d] = local_48.c_cc[0xc];
oldtty[0x1e] = local_48.c_cc[0xd];
oldtty[0x1f] = local_48.c_cc[0xe];
local_48._0_8_ = local_48._0_8_ & 0xfffffffffffffa14;
local_48._0_8_ = local_48._0_8_ | 0x100000000;
oldtty[0x20] = local_48.c_cc[0xf];
oldtty[0x21] = local_48.c_cc[0x10];
oldtty[0x22] = local_48.c_cc[0x11];
oldtty[0x23] = local_48.c_cc[0x12];
oldtty[0x24] = local_48.c_cc[0x13];
oldtty[0x25] = local_48.c_cc[0x14];
oldtty[0x26] = local_48.c_cc[0x15];
oldtty[0x27] = local_48.c_cc[0x16];
oldtty[0x28] = local_48.c_cc[0x17];
oldtty[0x29] = local_48.c_cc[0x18];
oldtty[0x2a] = local_48.c_cc[0x19];
oldtty[0x2b] = local_48.c_cc[0x1a];
oldtty[0x2c] = local_48.c_cc[0x1b];
oldtty[0x2d] = local_48.c_cc[0x1c];
oldtty[0x2e] = local_48.c_cc[0x1d];
oldtty[0x2f] = local_48.c_cc[0x1e];
oldtty._48_4_ = local_48._48_4_;
oldtty._52_4_ = local_48.c_ispeed;
oldtty._56_4_ = local_48.c_ospeed;
local_48._8_8_ = local_48._8_8_ & 0xffff7fb5fffffecf | 0x30;
local_48.c_cc._5_2_ = 0x100;
tcsetattr(local_4c,0,&local_48);
atexit(term_exit);
uStack_60 = 3;
}
else {
uStack_60 = 6;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uStack_60;
return auVar1 << 0x40;
}
| |
33,632 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O3 | c | js_os_ttySetRaw:
pushq %rbx
subq $0x50, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x2803b
movl $0x6, %edx
testl %eax, %eax
jne 0x196be
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0xe760
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm0, 0xb6f57(%rip) # 0xd05b8
movups %xmm1, 0xb6f60(%rip) # 0xd05c8
andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14
movups 0x2c(%rbx), %xmm0
orb $0x1, 0x4(%rbx)
movups %xmm2, 0xb6f5b(%rip) # 0xd05d8
andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5
movups %xmm0, 0xb6f59(%rip) # 0xd05e4
movl $0xfffffecf, %eax # imm = 0xFFFFFECF
andl 0x8(%rbx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rbx)
movw $0x100, 0x16(%rbx) # imm = 0x100
movl 0xc(%rsp), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe770
leaq 0x1d70(%rip), %rdi # 0x1b424
callq 0x9d350
movl $0x3, %edx
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
| js_os_ttySetRaw:
push rbx
sub rsp, 50h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+58h+var_4C]
call JS_ToInt32
mov edx, 6
test eax, eax
jnz loc_196BE
xorps xmm0, xmm0
lea rbx, [rsp+58h+var_48]
movups xmmword ptr [rbx+2Ch], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx], xmm0
mov edi, [rsp+58h+var_4C]
mov rsi, rbx
call _tcgetattr
movaps xmm0, xmmword ptr [rbx]
movaps xmm1, xmmword ptr [rbx+10h]
movaps xmm2, xmmword ptr [rbx+20h]
movups cs:oldtty, xmm0
movups cs:xmmword_D05C8, xmm1
and dword ptr [rbx], 0FFFFFA14h
movups xmm0, xmmword ptr [rbx+2Ch]
or byte ptr [rbx+4], 1
movups cs:xmmword_D05D8, xmm2
and dword ptr [rbx+0Ch], 0FFFF7FB5h
movups cs:xmmword_D05D8+0Ch, xmm0
mov eax, 0FFFFFECFh
and eax, [rbx+8]
or eax, 30h
mov [rbx+8], eax
mov word ptr [rbx+16h], 100h
mov edi, [rsp+58h+var_4C]
xor esi, esi
mov rdx, rbx
call _tcsetattr
lea rdi, term_exit
call atexit
mov edx, 3
loc_196BE:
xor eax, eax
add rsp, 50h
pop rbx
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v7; // [rsp+10h] [rbp-48h] BYREF
__int128 v8; // [rsp+20h] [rbp-38h]
_OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
memset(v9, 0, 28);
v8 = 0LL;
v7 = 0LL;
tcgetattr(v6, &v7, 6LL);
oldtty = v7;
xmmword_D05C8 = v8;
LODWORD(v7) = v7 & 0xFFFFFA14;
BYTE4(v7) |= 1u;
xmmword_D05D8 = v9[0];
HIDWORD(v7) &= 0xFFFF7FB5;
*(__int128 *)((char *)&xmmword_D05D8 + 12) = *(_OWORD *)((char *)v9 + 12);
DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30;
WORD3(v8) = 256;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
}
return 0LL;
}
| js_os_ttySetRaw:
PUSH RBX
SUB RSP,0x50
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x0012803b
MOV EDX,0x6
TEST EAX,EAX
JNZ 0x001196be
XORPS XMM0,XMM0
LEA RBX,[RSP + 0x10]
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RBX],XMM0
MOV EDI,dword ptr [RSP + 0xc]
MOV RSI,RBX
CALL 0x0010e760
MOVAPS XMM0,xmmword ptr [RBX]
MOVAPS XMM1,xmmword ptr [RBX + 0x10]
MOVAPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [0x001d05b8],XMM0
MOVUPS xmmword ptr [0x001d05c8],XMM1
AND dword ptr [RBX],0xfffffa14
MOVUPS XMM0,xmmword ptr [RBX + 0x2c]
OR byte ptr [RBX + 0x4],0x1
MOVUPS xmmword ptr [0x001d05d8],XMM2
AND dword ptr [RBX + 0xc],0xffff7fb5
MOVUPS xmmword ptr [0x001d05e4],XMM0
MOV EAX,0xfffffecf
AND EAX,dword ptr [RBX + 0x8]
OR EAX,0x30
MOV dword ptr [RBX + 0x8],EAX
MOV word ptr [RBX + 0x16],0x100
MOV EDI,dword ptr [RSP + 0xc]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0010e770
LEA RDI,[0x11b424]
CALL 0x0019d350
MOV EDX,0x3
LAB_001196be:
XOR EAX,EAX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] js_os_ttySetRaw(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
ulong uVar3;
int8 *in_R8;
int local_4c;
termios local_48;
iVar2 = JS_ToInt32(param_1,&local_4c,*in_R8,in_R8[1]);
uVar3 = 6;
if (iVar2 == 0) {
local_48.c_cc[0x1f] = '\0';
local_48._49_3_ = 0;
local_48.c_ispeed = 0;
local_48.c_ospeed = 0;
local_48.c_cc[0xf] = '\0';
local_48.c_cc[0x10] = '\0';
local_48.c_cc[0x11] = '\0';
local_48.c_cc[0x12] = '\0';
local_48.c_cc[0x13] = '\0';
local_48.c_cc[0x14] = '\0';
local_48.c_cc[0x15] = '\0';
local_48.c_cc[0x16] = '\0';
local_48.c_cc[0x17] = '\0';
local_48.c_cc[0x18] = '\0';
local_48.c_cc[0x19] = '\0';
local_48.c_cc[0x1a] = '\0';
local_48.c_cc[0x1b] = '\0';
local_48.c_cc[0x1c] = '\0';
local_48.c_cc[0x1d] = '\0';
local_48.c_cc[0x1e] = '\0';
local_48.c_line = '\0';
local_48.c_cc[0] = '\0';
local_48.c_cc[1] = '\0';
local_48.c_cc[2] = '\0';
local_48.c_cc[3] = '\0';
local_48.c_cc[4] = '\0';
local_48.c_cc[5] = '\0';
local_48.c_cc[6] = '\0';
local_48.c_cc[7] = '\0';
local_48.c_cc[8] = '\0';
local_48.c_cc[9] = '\0';
local_48.c_cc[10] = '\0';
local_48.c_cc[0xb] = '\0';
local_48.c_cc[0xc] = '\0';
local_48.c_cc[0xd] = '\0';
local_48.c_cc[0xe] = '\0';
local_48.c_iflag = 0;
local_48.c_oflag = 0;
local_48.c_cflag = 0;
local_48.c_lflag = 0;
tcgetattr(local_4c,&local_48);
oldtty._0_4_ = local_48.c_iflag;
oldtty._4_4_ = local_48.c_oflag;
oldtty._8_4_ = local_48.c_cflag;
oldtty._12_4_ = local_48.c_lflag;
oldtty[0x10] = local_48.c_line;
oldtty[0x11] = local_48.c_cc[0];
oldtty[0x12] = local_48.c_cc[1];
oldtty[0x13] = local_48.c_cc[2];
oldtty[0x14] = local_48.c_cc[3];
oldtty[0x15] = local_48.c_cc[4];
oldtty[0x16] = local_48.c_cc[5];
oldtty[0x17] = local_48.c_cc[6];
oldtty[0x18] = local_48.c_cc[7];
oldtty[0x19] = local_48.c_cc[8];
oldtty[0x1a] = local_48.c_cc[9];
oldtty[0x1b] = local_48.c_cc[10];
oldtty[0x1c] = local_48.c_cc[0xb];
oldtty[0x1d] = local_48.c_cc[0xc];
oldtty[0x1e] = local_48.c_cc[0xd];
oldtty[0x1f] = local_48.c_cc[0xe];
local_48._0_8_ = local_48._0_8_ & 0xfffffffffffffa14;
local_48._0_8_ = local_48._0_8_ | 0x100000000;
oldtty[0x20] = local_48.c_cc[0xf];
oldtty[0x21] = local_48.c_cc[0x10];
oldtty[0x22] = local_48.c_cc[0x11];
oldtty[0x23] = local_48.c_cc[0x12];
oldtty[0x24] = local_48.c_cc[0x13];
oldtty[0x25] = local_48.c_cc[0x14];
oldtty[0x26] = local_48.c_cc[0x15];
oldtty[0x27] = local_48.c_cc[0x16];
oldtty[0x28] = local_48.c_cc[0x17];
oldtty[0x29] = local_48.c_cc[0x18];
oldtty[0x2a] = local_48.c_cc[0x19];
oldtty[0x2b] = local_48.c_cc[0x1a];
oldtty[0x2c] = local_48.c_cc[0x1b];
oldtty[0x2d] = local_48.c_cc[0x1c];
oldtty[0x2e] = local_48.c_cc[0x1d];
oldtty[0x2f] = local_48.c_cc[0x1e];
oldtty._48_4_ = local_48._48_4_;
oldtty._52_4_ = local_48.c_ispeed;
oldtty._56_4_ = local_48.c_ospeed;
local_48._8_8_ = local_48._8_8_ & 0xffff7fb5fffffecf | 0x30;
local_48.c_cc._5_2_ = 0x100;
tcsetattr(local_4c,0,&local_48);
atexit(term_exit);
uVar3 = 3;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar3;
return auVar1 << 0x40;
}
| |
33,633 | mysql_kill_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_kill_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_kill,
(parms->mysql, parms->pid),
parms->mysql,
int,
r_int)
} | O3 | c | mysql_kill_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 0x1c55f
movl %eax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_kill_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_kill
mov [rbx+8], eax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_kill_start_internal(long long *a1)
{
_DWORD *v1; // rbx
long long result; // rax
v1 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
result = mysql_kill(*a1, a1[1]);
v1[2] = result;
*v1 = 0;
return result;
}
| mysql_kill_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 0x0011c55f
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_kill_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_kill(*param_1,param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
33,634 | rtree_estimate | eloqsql/storage/myisam/rt_index.c | ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key,
uint key_length, uint flag)
{
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
my_off_t root;
uint i = 0;
uchar *k;
uchar *last;
uint nod_flag;
uchar *page_buf;
uint k_len;
double area = 0;
ha_rows res = 0;
if (flag & MBR_DISJOINT)
return HA_POS_ERROR;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
return HA_POS_ERROR;
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length)))
return HA_POS_ERROR;
if (!_mi_fetch_keypage(info, keyinfo, root, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
k_len = keyinfo->keylength - info->s->base.rec_reflength;
k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
last = rt_PAGE_END(page_buf);
for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag), ++i)
{
if (nod_flag)
{
double k_area = rtree_rect_volume(keyinfo->seg, k, key_length);
/* The following should be safe, even if we compare doubles */
if (k_area == 0)
{
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
{
area += 1;
}
else if (flag & (MBR_WITHIN | MBR_EQUAL))
{
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN))
area += 1;
}
else
goto err1;
}
else
{
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
{
area += rtree_overlapping_area(keyinfo->seg, key, k, key_length) /
k_area;
}
else if (flag & (MBR_WITHIN | MBR_EQUAL))
{
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN))
area += rtree_rect_volume(keyinfo->seg, key, key_length) /
k_area;
}
else
goto err1;
}
}
else
{
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, flag))
++res;
}
}
if (nod_flag)
{
if (i)
res = (ha_rows) (area / i * info->state->records);
else
res = HA_POS_ERROR;
}
my_afree((uchar*)page_buf);
return res;
err1:
my_afree((uchar*)page_buf);
return HA_POS_ERROR;
} | O0 | c | rtree_estimate:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movl -0x30(%rbp), %eax
andl $0x1000, %eax # imm = 0x1000
cmpl $0x0, %eax
je 0xcbbb7
movq $-0x1, -0x10(%rbp)
jmp 0xcbf43
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x98(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
cmpq $-0x1, %rax
jne 0xcbbe3
movq $-0x1, -0x10(%rbp)
jmp 0xcbf43
movq -0x38(%rbp), %rax
movzwl 0xe(%rax), %eax
addl $0xf, %eax
andl $-0x10, %eax
movl %eax, %ecx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
jne 0xcbc13
movq $-0x1, -0x10(%rbp)
jmp 0xcbf43
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x68(%rbp), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xbf780
cmpq $0x0, %rax
jne 0xcbc3b
jmp 0xcbf3b
movq -0x68(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xcbc61
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x8c(%rbp)
jmp 0xcbc6b
xorl %eax, %eax
movl %eax, -0x8c(%rbp)
jmp 0xcbc6b
movl -0x8c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x12(%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
subl 0x178(%rcx), %eax
movl %eax, -0x6c(%rbp)
movq -0x68(%rbp), %rax
addq $0x2, %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq -0x68(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x68(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0xcbeac
cmpl $0x0, -0x5c(%rbp)
je 0xcbe22
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x50(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0xce310
movsd %xmm0, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xcbd86
jp 0xcbd86
movl -0x30(%rbp), %eax
andl $0x600, %eax # imm = 0x600
cmpl $0x0, %eax
je 0xcbd36
movsd 0x8e57e(%rip), %xmm0 # 0x15a2a8
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0xcbd81
movl -0x30(%rbp), %eax
andl $0x2800, %eax # imm = 0x2800
cmpl $0x0, %eax
je 0xcbd7a
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movl $0x800, %r8d # imm = 0x800
callq 0xcc8c0
cmpl $0x0, %eax
jne 0xcbd78
movsd 0x8e53a(%rip), %xmm0 # 0x15a2a8
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0xcbd7f
jmp 0xcbf3b
jmp 0xcbd81
jmp 0xcbe20
movl -0x30(%rbp), %eax
andl $0x600, %eax # imm = 0x600
cmpl $0x0, %eax
je 0xcbdbf
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0xd0b10
divsd -0x88(%rbp), %xmm0
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0xcbe1e
movl -0x30(%rbp), %eax
andl $0x2800, %eax # imm = 0x2800
cmpl $0x0, %eax
je 0xcbe17
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movl $0x800, %r8d # imm = 0x800
callq 0xcc8c0
cmpl $0x0, %eax
jne 0xcbe15
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0xce310
divsd -0x88(%rbp), %xmm0
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0xcbe1c
jmp 0xcbf3b
jmp 0xcbe1e
jmp 0xcbe20
jmp 0xcbe51
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
callq 0xcc8c0
cmpl $0x0, %eax
jne 0xcbe4f
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0xcbe51
jmp 0xcbe53
movq -0x50(%rbp), %rax
movl -0x6c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0xcbe75
movl -0x5c(%rbp), %eax
movl %eax, -0x9c(%rbp)
jmp 0xcbe88
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
movl %eax, -0x9c(%rbp)
movq -0x98(%rbp), %rax
movl -0x9c(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xcbcce
cmpl $0x0, -0x5c(%rbp)
je 0xcbf31
cmpl $0x0, -0x44(%rbp)
je 0xcbf27
movsd -0x78(%rbp), %xmm0
movl -0x44(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %xmm1
movaps 0x8e684(%rip), %xmm2 # 0x15a560
punpckldq %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x8e688(%rip), %xmm2 # 0x15a570
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x8e38e(%rip), %xmm1 # 0x15a2a0
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0xcbf2f
movq $-0x1, -0x80(%rbp)
jmp 0xcbf31
movq -0x80(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xcbf43
movq $-0x1, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xcbf6c
movq -0xa8(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| rtree_estimate:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_2C], ecx
mov [rbp+var_30], r8d
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_44], 0
xorps xmm0, xmm0
movsd [rbp+var_78], xmm0
mov [rbp+var_80], 0
mov eax, [rbp+var_30]
and eax, 1000h
cmp eax, 0
jz short loc_CBBB7
mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh
jmp loc_CBF43
loc_CBBB7:
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+98h]
mov ecx, [rbp+var_1C]
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_CBBE3
mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh
jmp loc_CBF43
loc_CBBE3:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+0Eh]
add eax, 0Fh
and eax, 0FFFFFFF0h
mov ecx, eax
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_68], rax
cmp rax, 0
jnz short loc_CBC13
mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh
jmp loc_CBF43
loc_CBC13:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_40]
mov r8, [rbp+var_68]
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
cmp rax, 0
jnz short loc_CBC3B
jmp loc_CBF3B
loc_CBC3B:
mov rax, [rbp+var_68]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_CBC61
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_8C], eax
jmp short loc_CBC6B
loc_CBC61:
xor eax, eax
mov [rbp+var_8C], eax
jmp short $+2
loc_CBC6B:
mov eax, [rbp+var_8C]
mov [rbp+var_5C], eax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+12h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
sub eax, [rcx+178h]
mov [rbp+var_6C], eax
mov rax, [rbp+var_68]
add rax, 2
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_68]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_68]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_58], rax
loc_CBCCE:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnb loc_CBEAC
cmp [rbp+var_5C], 0
jz loc_CBE22
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbp+var_50]
mov edx, [rbp+var_2C]
call rtree_rect_volume
movsd [rbp+var_88], xmm0
movsd xmm0, [rbp+var_88]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_CBD86
jp short loc_CBD86
mov eax, [rbp+var_30]
and eax, 600h
cmp eax, 0
jz short loc_CBD36
movsd xmm0, cs:qword_15A2A8
addsd xmm0, [rbp+var_78]
movsd [rbp+var_78], xmm0
jmp short loc_CBD81
loc_CBD36:
mov eax, [rbp+var_30]
and eax, 2800h
cmp eax, 0
jz short loc_CBD7A
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_2C]
mov r8d, 800h
call rtree_key_cmp
cmp eax, 0
jnz short loc_CBD78
movsd xmm0, cs:qword_15A2A8
addsd xmm0, [rbp+var_78]
movsd [rbp+var_78], xmm0
loc_CBD78:
jmp short loc_CBD7F
loc_CBD7A:
jmp loc_CBF3B
loc_CBD7F:
jmp short $+2
loc_CBD81:
jmp loc_CBE20
loc_CBD86:
mov eax, [rbp+var_30]
and eax, 600h
cmp eax, 0
jz short loc_CBDBF
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_2C]
call rtree_overlapping_area
divsd xmm0, [rbp+var_88]
addsd xmm0, [rbp+var_78]
movsd [rbp+var_78], xmm0
jmp short loc_CBE1E
loc_CBDBF:
mov eax, [rbp+var_30]
and eax, 2800h
cmp eax, 0
jz short loc_CBE17
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_2C]
mov r8d, 800h
call rtree_key_cmp
cmp eax, 0
jnz short loc_CBE15
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbp+var_28]
mov edx, [rbp+var_2C]
call rtree_rect_volume
divsd xmm0, [rbp+var_88]
addsd xmm0, [rbp+var_78]
movsd [rbp+var_78], xmm0
loc_CBE15:
jmp short loc_CBE1C
loc_CBE17:
jmp loc_CBF3B
loc_CBE1C:
jmp short $+2
loc_CBE1E:
jmp short $+2
loc_CBE20:
jmp short loc_CBE51
loc_CBE22:
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_2C]
mov r8d, [rbp+var_30]
call rtree_key_cmp
cmp eax, 0
jnz short loc_CBE4F
mov rax, [rbp+var_80]
add rax, 1
mov [rbp+var_80], rax
loc_CBE4F:
jmp short $+2
loc_CBE51:
jmp short $+2
loc_CBE53:
mov rax, [rbp+var_50]
mov ecx, [rbp+var_6C]
add rax, rcx
mov [rbp+var_98], rax
cmp [rbp+var_5C], 0
jz short loc_CBE75
mov eax, [rbp+var_5C]
mov [rbp+var_9C], eax
jmp short loc_CBE88
loc_CBE75:
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+178h]
mov [rbp+var_9C], eax
loc_CBE88:
mov rax, [rbp+var_98]
mov ecx, [rbp+var_9C]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp loc_CBCCE
loc_CBEAC:
cmp [rbp+var_5C], 0
jz short loc_CBF31
cmp [rbp+var_44], 0
jz short loc_CBF27
movsd xmm0, [rbp+var_78]
mov eax, [rbp+var_44]
cvtsi2sd xmm1, rax
divsd xmm0, xmm1
mov rax, [rbp+var_18]
mov rax, [rax+8]
movq xmm1, qword ptr [rax]
movaps xmm2, cs:xmmword_15A560
punpckldq xmm1, xmm2
movapd xmm2, cs:xmmword_15A570
subpd xmm1, xmm2
movaps xmm2, xmm1
unpckhpd xmm1, xmm1
addsd xmm1, xmm2
mulsd xmm0, xmm1
movaps xmm1, xmm0
cvttsd2si rax, xmm1
mov rdx, rax
sar rdx, 3Fh
movsd xmm1, cs:qword_15A2A0
subsd xmm0, xmm1
cvttsd2si rcx, xmm0
and rcx, rdx
or rax, rcx
mov [rbp+var_80], rax
jmp short loc_CBF2F
loc_CBF27:
mov [rbp+var_80], 0FFFFFFFFFFFFFFFFh
loc_CBF2F:
jmp short $+2
loc_CBF31:
mov rax, [rbp+var_80]
mov [rbp+var_10], rax
jmp short loc_CBF43
loc_CBF3B:
mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh
loc_CBF43:
mov rax, [rbp+var_10]
mov [rbp+var_A8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_CBF6C
mov rax, [rbp+var_A8]
mov rsp, rbp
pop rbp
retn
loc_CBF6C:
call ___stack_chk_fail
| long long rtree_estimate(_QWORD *a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5)
{
char *v5; // rcx
double v6; // xmm0_8
double v7; // xmm0_8
__m128d v8; // xmm2
long long v10; // [rsp+0h] [rbp-B0h] BYREF
unsigned int v11; // [rsp+14h] [rbp-9Ch]
unsigned long long v12; // [rsp+18h] [rbp-98h]
unsigned int v13; // [rsp+24h] [rbp-8Ch]
double v14; // [rsp+28h] [rbp-88h]
long long v15; // [rsp+30h] [rbp-80h]
double v16; // [rsp+38h] [rbp-78h]
unsigned int v17; // [rsp+44h] [rbp-6Ch]
unsigned __int16 *v18; // [rsp+48h] [rbp-68h]
unsigned int v19; // [rsp+54h] [rbp-5Ch]
char *v20; // [rsp+58h] [rbp-58h]
unsigned long long v21; // [rsp+60h] [rbp-50h]
int v22; // [rsp+6Ch] [rbp-44h]
long long v23; // [rsp+70h] [rbp-40h]
long long v24; // [rsp+78h] [rbp-38h]
unsigned int v25; // [rsp+80h] [rbp-30h]
unsigned int v26; // [rsp+84h] [rbp-2Ch]
long long v27; // [rsp+88h] [rbp-28h]
unsigned int v28; // [rsp+94h] [rbp-1Ch]
_QWORD *v29; // [rsp+98h] [rbp-18h]
unsigned long long v31; // [rsp+A8h] [rbp-8h]
v31 = __readfsqword(0x28u);
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
v25 = a5;
v24 = 112LL * a2 + *(_QWORD *)(*a1 + 536LL);
v22 = 0;
v16 = 0.0;
v15 = 0LL;
if ( (a5 & 0x1000) != 0 )
return -1LL;
v23 = *(_QWORD *)(*(_QWORD *)(*v29 + 152LL) + 8LL * v28);
if ( v23 == -1 )
return -1LL;
v5 = (char *)((*(unsigned __int16 *)(v24 + 14) + 15) & 0xFFFFFFF0);
v18 = (unsigned __int16 *)((char *)&v10 - v5);
if ( &v10 == (long long *)v5 )
return -1LL;
if ( !mi_fetch_keypage(v29, v24, v23, 3, (int)v18, 0) )
return -1LL;
if ( (*(_BYTE *)v18 & 0x80) != 0 )
v13 = *(_DWORD *)(*v29 + 380LL);
else
v13 = 0;
v19 = v13;
v17 = *(unsigned __int16 *)(v24 + 18) - *(_DWORD *)(*v29 + 376LL);
v21 = (unsigned long long)v18 + v13 + 2;
v20 = (char *)v18 + (_byteswap_ushort(*v18) & 0x7FFF);
while ( v21 < (unsigned long long)v20 )
{
if ( v19 )
{
v14 = rtree_rect_volume(*(_QWORD *)(v24 + 40), v21, v26);
if ( v14 == 0.0 )
{
if ( (v25 & 0x600) != 0 )
{
v16 = v16 + 1.0;
}
else
{
if ( (v25 & 0x2800) == 0 )
return -1LL;
if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, 2048LL) )
v16 = v16 + 1.0;
}
}
else if ( (v25 & 0x600) != 0 )
{
v6 = rtree_overlapping_area(*(_QWORD *)(v24 + 40), v27, v21, v26);
v16 = v6 / v14 + v16;
}
else
{
if ( (v25 & 0x2800) == 0 )
return -1LL;
if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, 2048LL) )
{
v7 = rtree_rect_volume(*(_QWORD *)(v24 + 40), v27, v26);
v16 = v7 / v14 + v16;
}
}
}
else if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, v25) )
{
++v15;
}
v12 = v17 + v21;
if ( v19 )
v11 = v19;
else
v11 = *(_DWORD *)(*v29 + 376LL);
v21 = v11 + v12;
++v22;
}
if ( v19 )
{
if ( v22 )
{
v8 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)v29[1]), (__m128i)xmmword_15A560),
(__m128d)xmmword_15A570);
return (unsigned int)(int)(v16 / (double)v22 * (_mm_unpackhi_pd(v8, v8).m128d_f64[0] + v8.m128d_f64[0]));
}
else
{
return -1LL;
}
}
return v15;
}
| rtree_estimate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x2c],ECX
MOV dword ptr [RBP + -0x30],R8D
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x44],0x0
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x78],XMM0
MOV qword ptr [RBP + -0x80],0x0
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x1000
CMP EAX,0x0
JZ 0x001cbbb7
MOV qword ptr [RBP + -0x10],-0x1
JMP 0x001cbf43
LAB_001cbbb7:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x98]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,-0x1
JNZ 0x001cbbe3
MOV qword ptr [RBP + -0x10],-0x1
JMP 0x001cbf43
LAB_001cbbe3:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0xe]
ADD EAX,0xf
AND EAX,0xfffffff0
MOV ECX,EAX
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x68],RAX
CMP RAX,0x0
JNZ 0x001cbc13
MOV qword ptr [RBP + -0x10],-0x1
JMP 0x001cbf43
LAB_001cbc13:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x68]
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001bf780
CMP RAX,0x0
JNZ 0x001cbc3b
JMP 0x001cbf3b
LAB_001cbc3b:
MOV RAX,qword ptr [RBP + -0x68]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001cbc61
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x8c],EAX
JMP 0x001cbc6b
LAB_001cbc61:
XOR EAX,EAX
MOV dword ptr [RBP + -0x8c],EAX
JMP 0x001cbc6b
LAB_001cbc6b:
MOV EAX,dword ptr [RBP + -0x8c]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x12]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x178]
MOV dword ptr [RBP + -0x6c],EAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x2
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x68]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x68]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_001cbcce:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x001cbeac
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x001cbe22
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x50]
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x001ce310
MOVSD qword ptr [RBP + -0x88],XMM0
MOVSD XMM0,qword ptr [RBP + -0x88]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001cbd86
JP 0x001cbd86
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x600
CMP EAX,0x0
JZ 0x001cbd36
MOVSD XMM0,qword ptr [0x0025a2a8]
ADDSD XMM0,qword ptr [RBP + -0x78]
MOVSD qword ptr [RBP + -0x78],XMM0
JMP 0x001cbd81
LAB_001cbd36:
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x2800
CMP EAX,0x0
JZ 0x001cbd7a
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8D,0x800
CALL 0x001cc8c0
CMP EAX,0x0
JNZ 0x001cbd78
MOVSD XMM0,qword ptr [0x0025a2a8]
ADDSD XMM0,qword ptr [RBP + -0x78]
MOVSD qword ptr [RBP + -0x78],XMM0
LAB_001cbd78:
JMP 0x001cbd7f
LAB_001cbd7a:
JMP 0x001cbf3b
LAB_001cbd7f:
JMP 0x001cbd81
LAB_001cbd81:
JMP 0x001cbe20
LAB_001cbd86:
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x600
CMP EAX,0x0
JZ 0x001cbdbf
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x001d0b10
DIVSD XMM0,qword ptr [RBP + -0x88]
ADDSD XMM0,qword ptr [RBP + -0x78]
MOVSD qword ptr [RBP + -0x78],XMM0
JMP 0x001cbe1e
LAB_001cbdbf:
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x2800
CMP EAX,0x0
JZ 0x001cbe17
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8D,0x800
CALL 0x001cc8c0
CMP EAX,0x0
JNZ 0x001cbe15
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x001ce310
DIVSD XMM0,qword ptr [RBP + -0x88]
ADDSD XMM0,qword ptr [RBP + -0x78]
MOVSD qword ptr [RBP + -0x78],XMM0
LAB_001cbe15:
JMP 0x001cbe1c
LAB_001cbe17:
JMP 0x001cbf3b
LAB_001cbe1c:
JMP 0x001cbe1e
LAB_001cbe1e:
JMP 0x001cbe20
LAB_001cbe20:
JMP 0x001cbe51
LAB_001cbe22:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8D,dword ptr [RBP + -0x30]
CALL 0x001cc8c0
CMP EAX,0x0
JNZ 0x001cbe4f
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,0x1
MOV qword ptr [RBP + -0x80],RAX
LAB_001cbe4f:
JMP 0x001cbe51
LAB_001cbe51:
JMP 0x001cbe53
LAB_001cbe53:
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x6c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x001cbe75
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x9c],EAX
JMP 0x001cbe88
LAB_001cbe75:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
MOV dword ptr [RBP + -0x9c],EAX
LAB_001cbe88:
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,dword ptr [RBP + -0x9c]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001cbcce
LAB_001cbeac:
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x001cbf31
CMP dword ptr [RBP + -0x44],0x0
JZ 0x001cbf27
MOVSD XMM0,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RBP + -0x44]
CVTSI2SD XMM1,RAX
DIVSD XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOVQ XMM1,qword ptr [RAX]
MOVAPS XMM2,xmmword ptr [0x0025a560]
PUNPCKLDQ XMM1,XMM2
MOVAPD XMM2,xmmword ptr [0x0025a570]
SUBPD XMM1,XMM2
MOVAPS XMM2,XMM1
UNPCKHPD XMM1,XMM1
ADDSD XMM1,XMM2
MULSD XMM0,XMM1
MOVAPS XMM1,XMM0
CVTTSD2SI RAX,XMM1
MOV RDX,RAX
SAR RDX,0x3f
MOVSD XMM1,qword ptr [0x0025a2a0]
SUBSD XMM0,XMM1
CVTTSD2SI RCX,XMM0
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001cbf2f
LAB_001cbf27:
MOV qword ptr [RBP + -0x80],-0x1
LAB_001cbf2f:
JMP 0x001cbf31
LAB_001cbf31:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001cbf43
LAB_001cbf3b:
MOV qword ptr [RBP + -0x10],-0x1
LAB_001cbf43:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001cbf6c
MOV RAX,qword ptr [RBP + -0xa8]
MOV RSP,RBP
POP RBP
RET
LAB_001cbf6c:
CALL 0x0012a250
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong rtree_estimate(long *param_1,uint param_2,int8 param_3,int4 param_4,uint param_5)
{
long lVar1;
int8 uVar2;
int8 uVar3;
long lVar4;
byte *pbVar5;
uint uVar6;
int4 uVar7;
int iVar8;
long lVar9;
byte *pbVar10;
long in_FS_OFFSET;
double dVar11;
int1 auVar12 [16];
int8 uStack_c0;
byte abStack_b8 [8];
ulong local_b0;
uint local_a4;
byte *local_a0;
uint local_94;
double local_90;
ulong local_88;
double local_80;
uint local_74;
byte *local_70;
uint local_64;
byte *local_60;
byte *local_58;
uint local_4c;
long local_48;
long local_40;
uint local_38;
int4 local_34;
int8 local_30;
uint local_24;
long *local_20;
ulong local_18;
long local_10;
pbVar10 = abStack_b8;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar9 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70;
local_4c = 0;
local_80 = 0.0;
local_88 = 0;
local_40 = lVar9;
local_38 = param_5;
local_34 = param_4;
local_30 = param_3;
local_24 = param_2;
local_20 = param_1;
if ((param_5 & 0x1000) == 0) {
lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (ulong)param_2 * 8);
local_48 = lVar1;
if (lVar1 == -1) {
local_18 = 0xffffffffffffffff;
}
else {
lVar4 = -(ulong)(*(ushort *)(lVar9 + 0xe) + 0xf & 0xfffffff0);
pbVar10 = abStack_b8 + lVar4;
local_70 = pbVar10;
if (pbVar10 == (byte *)0x0) {
local_18 = 0xffffffffffffffff;
}
else {
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbc30;
lVar9 = _mi_fetch_keypage(param_1,lVar9,lVar1,3,pbVar10,0);
if (lVar9 == 0) {
LAB_001cbf3b:
local_18 = 0xffffffffffffffff;
}
else {
if ((*local_70 & 0x80) == 0) {
local_94 = 0;
}
else {
local_94 = *(uint *)(*local_20 + 0x17c);
}
local_64 = local_94;
local_74 = (uint)*(ushort *)(local_40 + 0x12) - *(int *)(*local_20 + 0x178);
local_60 = local_70 + ((uint)local_70[1] | (*local_70 & 0x7f) << 8);
local_58 = local_70 + (ulong)local_94 + 2;
while (uVar2 = local_30, uVar7 = local_34, uVar6 = local_38, pbVar5 = local_58,
local_58 < local_60) {
if (local_64 == 0) {
uVar3 = *(int8 *)(local_40 + 0x28);
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbe3e;
iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,uVar6);
if (iVar8 == 0) {
local_88 = local_88 + 1;
}
}
else {
uVar2 = *(int8 *)(local_40 + 0x28);
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbcfa;
local_90 = (double)rtree_rect_volume(uVar2,pbVar5,uVar7);
uVar2 = local_30;
uVar7 = local_34;
pbVar5 = local_58;
if ((local_90 != 0.0) || (NAN(local_90))) {
if ((local_38 & 0x600) == 0) {
if ((local_38 & 0x2800) == 0) goto LAB_001cbf3b;
uVar3 = *(int8 *)(local_40 + 0x28);
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbdea;
iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,0x800);
uVar2 = local_30;
uVar7 = local_34;
if (iVar8 == 0) {
uVar3 = *(int8 *)(local_40 + 0x28);
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbe03;
dVar11 = (double)rtree_rect_volume(uVar3,uVar2,uVar7);
local_80 = dVar11 / local_90 + local_80;
}
}
else {
uVar3 = *(int8 *)(local_40 + 0x28);
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbdab;
dVar11 = (double)rtree_overlapping_area(uVar3,uVar2,pbVar5,uVar7);
local_80 = dVar11 / local_90 + local_80;
}
}
else if ((local_38 & 0x600) == 0) {
if ((local_38 & 0x2800) == 0) goto LAB_001cbf3b;
uVar3 = *(int8 *)(local_40 + 0x28);
*(int8 *)((long)&uStack_c0 + lVar4) = 0x1cbd61;
iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,0x800);
if (iVar8 == 0) {
local_80 = DAT_0025a2a8 + local_80;
}
}
else {
local_80 = DAT_0025a2a8 + local_80;
}
}
local_a0 = local_58 + local_74;
if (local_64 == 0) {
local_a4 = *(uint *)(*local_20 + 0x178);
}
else {
local_a4 = local_64;
}
local_4c = local_4c + 1;
local_58 = local_a0 + local_a4;
}
if (local_64 != 0) {
if (local_4c == 0) {
local_88 = 0xffffffffffffffff;
}
else {
uVar2 = *(int8 *)local_20[1];
auVar12._8_4_ = (int)((ulong)uVar2 >> 0x20);
auVar12._0_8_ = uVar2;
auVar12._12_4_ = _UNK_0025a564;
dVar11 = (local_80 / (double)local_4c) *
((auVar12._8_8_ - _UNK_0025a578) +
((double)CONCAT44(_DAT_0025a560,(int)uVar2) - _DAT_0025a570));
local_88 = (ulong)dVar11;
local_88 = local_88 | (long)(dVar11 - DAT_0025a2a0) & (long)local_88 >> 0x3f;
}
}
local_18 = local_88;
}
}
}
}
else {
local_18 = 0xffffffffffffffff;
pbVar10 = abStack_b8;
}
local_b0 = local_18;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
pbVar10[-8] = 0x71;
pbVar10[-7] = 0xbf;
pbVar10[-6] = 0x1c;
pbVar10[-5] = 0;
pbVar10[-4] = 0;
pbVar10[-3] = 0;
pbVar10[-2] = 0;
pbVar10[-1] = 0;
__stack_chk_fail();
}
return local_18;
}
| |
33,635 | ma_scan_init_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_scan_init_block_record(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("_ma_scan_init_block_record");
DBUG_ASSERT(info->dfile.file == share->bitmap.file.file);
/*
bitmap_buff may already be allocated if this is the second call to
rnd_init() without a rnd_end() in between, see sql/handler.h
*/
if (!(info->scan.bitmap_buff ||
((info->scan.bitmap_buff=
(uchar *) my_malloc(PSI_INSTRUMENT_ME, share->block_size * 2,
flag)))))
DBUG_RETURN(1);
info->scan.page_buff= info->scan.bitmap_buff + share->block_size;
info->scan.bitmap_end= info->scan.bitmap_buff + share->bitmap.max_total_size;
/* Set scan variables to get _ma_scan_block() to start with reading bitmap */
info->scan.number_of_rows= 0;
info->scan.bitmap_pos= info->scan.bitmap_end;
info->scan.bitmap_page= (pgcache_page_no_t) 0 - share->bitmap.pages_covered;
info->scan.max_page= share->state.state.data_file_length / share->block_size;
/*
We need to flush what's in memory (bitmap.map) to page cache otherwise, as
we are going to read bitmaps from page cache in table scan (see
_ma_scan_block_record()), we may miss recently inserted rows (bitmap page
in page cache would be too old).
*/
DBUG_RETURN(_ma_bitmap_flush(info->s));
} | O0 | c | ma_scan_init_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x568fa
movq -0x10(%rbp), %rax
cmpq $0x0, 0x220(%rax)
jne 0x5693f
movq -0x18(%rbp), %rax
movl 0x7bc(%rax), %eax
shll %eax
movl %eax, %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
xorl %edi, %edi
callq 0xfc8e0
movq -0x10(%rbp), %rcx
movq %rax, 0x220(%rcx)
cmpq $0x0, %rax
jne 0x5693f
jmp 0x56936
movb $0x1, -0x1(%rbp)
jmp 0x569f5
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0x7bc(%rax), %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x238(%rax)
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0xb3c(%rax), %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x230(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x268(%rax)
movq -0x10(%rbp), %rax
movq 0x230(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x228(%rax)
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
subq 0xb48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x250(%rax)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x258(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5fc80
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop
| _ma_scan_init_block_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_20], rax
jmp short $+2
loc_568FA:
mov rax, [rbp+var_10]
cmp qword ptr [rax+220h], 0
jnz short loc_5693F
mov rax, [rbp+var_18]
mov eax, [rax+7BCh]
shl eax, 1
mov eax, eax
mov esi, eax
mov rdx, [rbp+var_20]
xor edi, edi
call my_malloc
mov rcx, [rbp+var_10]
mov [rcx+220h], rax
cmp rax, 0
jnz short loc_5693F
jmp short $+2
loc_56936:
mov [rbp+var_1], 1
jmp loc_569F5
loc_5693F:
mov rax, [rbp+var_10]
mov rcx, [rax+220h]
mov rax, [rbp+var_18]
mov eax, [rax+7BCh]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+238h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+220h]
mov rax, [rbp+var_18]
mov eax, [rax+0B3Ch]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+230h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+268h], 0
mov rax, [rbp+var_10]
mov rcx, [rax+230h]
mov rax, [rbp+var_10]
mov [rax+228h], rcx
mov rax, [rbp+var_18]
xor ecx, ecx
sub rcx, [rax+0B48h]
mov rax, [rbp+var_10]
mov [rax+250h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+258h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax]
call _ma_bitmap_flush
mov [rbp+var_1], al
loc_569F5:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char ma_scan_init_block_record(_QWORD *a1)
{
int v1; // eax
long long v2; // rax
long long v4; // [rsp+8h] [rbp-18h]
v4 = *a1;
v1 = 0;
if ( *(_BYTE *)(*a1 + 2009LL) )
v1 = 0x10000;
if ( !a1[68] )
{
v2 = my_malloc(0LL, (unsigned int)(2 * *(_DWORD *)(v4 + 1980)), v1 | 0x10u);
a1[68] = v2;
if ( !v2 )
return 1;
}
a1[71] = *(unsigned int *)(v4 + 1980) + a1[68];
a1[70] = *(unsigned int *)(v4 + 2876) + a1[68];
*((_DWORD *)a1 + 154) = 0;
a1[69] = a1[70];
a1[74] = -*(_QWORD *)(v4 + 2888);
a1[75] = *(_QWORD *)(v4 + 64) / (unsigned long long)*(unsigned int *)(v4 + 1980);
return ma_bitmap_flush(*a1);
}
| _ma_scan_init_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001568fa
LAB_001568fa:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x220],0x0
JNZ 0x0015693f
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x7bc]
SHL EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x20]
XOR EDI,EDI
CALL 0x001fc8e0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x220],RAX
CMP RAX,0x0
JNZ 0x0015693f
JMP 0x00156936
LAB_00156936:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001569f5
LAB_0015693f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x220]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x7bc]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x238],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x220]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xb3c]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x230],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x268],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x230]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x228],RCX
MOV RAX,qword ptr [RBP + -0x18]
XOR ECX,ECX
SUB RCX,qword ptr [RAX + 0xb48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x250],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x258],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0015fc80
MOV byte ptr [RBP + -0x1],AL
LAB_001569f5:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 _ma_scan_init_block_record(long *param_1)
{
long lVar1;
int1 uVar2;
uint uVar3;
long lVar4;
lVar1 = *param_1;
uVar3 = 0;
if (*(char *)(lVar1 + 0x7d9) != '\0') {
uVar3 = 0x10000;
}
if (param_1[0x44] == 0) {
lVar4 = my_malloc(0,*(int *)(lVar1 + 0x7bc) << 1,uVar3 | 0x10);
param_1[0x44] = lVar4;
if (lVar4 == 0) {
return 1;
}
}
param_1[0x47] = param_1[0x44] + (ulong)*(uint *)(lVar1 + 0x7bc);
param_1[0x46] = param_1[0x44] + (ulong)*(uint *)(lVar1 + 0xb3c);
*(int4 *)(param_1 + 0x4d) = 0;
param_1[0x45] = param_1[0x46];
param_1[0x4a] = -*(long *)(lVar1 + 0xb48);
param_1[0x4b] = *(ulong *)(lVar1 + 0x40) / (ulong)*(uint *)(lVar1 + 0x7bc);
uVar2 = _ma_bitmap_flush(*param_1);
return uVar2;
}
| |
33,636 | uf_endspace | eloqsql/storage/maria/ma_packrec.c | static void uf_endspace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill(end - spaces, spaces, ' ');
} | O3 | c | uf_endspace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movl 0x4(%rsi), %ecx
movl 0x24(%rdi), %r13d
cmpl %r13d, %ecx
jae 0x3bea9
subl %ecx, %r13d
leaq 0xa65a6(%rip), %rax # 0xe2410
movl (%rax,%rcx,4), %r14d
andl (%r15), %r14d
movl %r13d, %ecx
shll %cl, %r14d
movq %rdi, -0x30(%rbp)
movq %r15, %rdi
movq %rdx, %r12
callq 0x3b68c
movq -0x30(%rbp), %rdi
movq %r12, %rdx
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %r14d, %eax
jmp 0x3bec2
movl (%r15), %eax
subl %r13d, %ecx
movl %ecx, 0x4(%r15)
shrl %cl, %eax
movl 0x24(%rdi), %ecx
leaq 0xa6551(%rip), %rsi # 0xe2410
andl (%rsi,%rcx,4), %eax
movl %eax, %r13d
leaq (%rdx,%r13), %rax
cmpq %rbx, %rax
jbe 0x3bee5
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r14
negq %r14
cmpq %rbx, %rax
je 0x3befc
leaq (%rbx,%r14), %rcx
movq %r15, %rsi
callq 0x3b849
addq %r14, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
| uf_endspace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r15, rsi
mov ecx, [rsi+4]
mov r13d, [rdi+24h]
cmp ecx, r13d
jnb short loc_3BEA9
sub r13d, ecx
lea rax, mask
mov r14d, [rax+rcx*4]
and r14d, [r15]
mov ecx, r13d
shl r14d, cl
mov [rbp+var_30], rdi
mov rdi, r15
mov r12, rdx
call fill_buffer
mov rdi, [rbp+var_30]
mov rdx, r12
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add eax, r14d
jmp short loc_3BEC2
loc_3BEA9:
mov eax, [r15]
sub ecx, r13d
mov [r15+4], ecx
shr eax, cl
mov ecx, [rdi+24h]
lea rsi, mask
and eax, [rsi+rcx*4]
loc_3BEC2:
mov r13d, eax
lea rax, [rdx+r13]
cmp rax, rbx
jbe short loc_3BEE5
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3BEE5:
mov r14, r13
neg r14
cmp rax, rbx
jz short loc_3BEFC
lea rcx, [rbx+r14]
mov rsi, r15
call decode_bytes
loc_3BEFC:
add rbx, r14
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
| unsigned long long uf_endspace(long long a1, unsigned int *a2, _BYTE *a3, unsigned long long a4)
{
long long v5; // rcx
unsigned int v6; // r13d
int v7; // r13d
int v8; // r14d
_BYTE *v9; // r12
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // ecx
long long v13; // r13
unsigned long long result; // rax
v5 = a2[1];
v6 = *(_DWORD *)(a1 + 36);
if ( (unsigned int)v5 >= v6 )
{
v11 = *a2;
v12 = v5 - v6;
a2[1] = v12;
v10 = mask[*(unsigned int *)(a1 + 36)] & (v11 >> v12);
}
else
{
v7 = v6 - v5;
v8 = (*a2 & mask[v5]) << v7;
v9 = a3;
fill_buffer((long long)a2);
a3 = v9;
a2[1] = 32 - v7;
v10 = v8 + (*a2 >> -(char)v7);
}
v13 = v10;
result = (unsigned long long)&a3[v10];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes(a1, (long long)a2, a3, (_BYTE *)(a4 - v13));
return memset(a4 - v13, 32LL, v13);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_endspace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R15,RSI
MOV ECX,dword ptr [RSI + 0x4]
MOV R13D,dword ptr [RDI + 0x24]
CMP ECX,R13D
JNC 0x0013bea9
SUB R13D,ECX
LEA RAX,[0x1e2410]
MOV R14D,dword ptr [RAX + RCX*0x4]
AND R14D,dword ptr [R15]
MOV ECX,R13D
SHL R14D,CL
MOV qword ptr [RBP + -0x30],RDI
MOV RDI,R15
MOV R12,RDX
CALL 0x0013b68c
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,R12
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD EAX,R14D
JMP 0x0013bec2
LAB_0013bea9:
MOV EAX,dword ptr [R15]
SUB ECX,R13D
MOV dword ptr [R15 + 0x4],ECX
SHR EAX,CL
MOV ECX,dword ptr [RDI + 0x24]
LEA RSI,[0x1e2410]
AND EAX,dword ptr [RSI + RCX*0x4]
LAB_0013bec2:
MOV R13D,EAX
LEA RAX,[RDX + R13*0x1]
CMP RAX,RBX
JBE 0x0013bee5
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013bee5:
MOV R14,R13
NEG R14
CMP RAX,RBX
JZ 0x0013befc
LEA RCX,[RBX + R14*0x1]
MOV RSI,R15
CALL 0x0013b849
LAB_0013befc:
ADD RBX,R14
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_endspace(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
byte bVar5;
ulong __n;
uVar4 = param_2[1];
uVar1 = *(uint *)(param_1 + 0x24);
if (uVar4 < uVar1) {
uVar2 = (&mask)[uVar4];
uVar3 = *param_2;
bVar5 = (byte)(uVar1 - uVar4);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar4);
uVar4 = (*param_2 >> (-bVar5 & 0x1f)) + ((uVar2 & uVar3) << (bVar5 & 0x1f));
}
else {
param_2[1] = uVar4 - uVar1;
uVar4 = *param_2 >> ((byte)(uVar4 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)];
}
__n = (ulong)uVar4;
if (param_4 < param_3 + __n) {
param_2[10] = 1;
return;
}
if (param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
memset((void *)(param_4 + -__n),0x20,__n);
return;
}
| |
33,637 | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | llama.cpp/common/minja/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
Value result;
bool first = true;
for (const auto& part : parts) {
if (!part) throw std::runtime_error("FilterExpr.part is null");
if (first) {
first = false;
result = part->evaluate(context);
} else {
if (auto ce = dynamic_cast<CallExpr*>(part.get())) {
auto target = ce->object->evaluate(context);
ArgumentsValue args = ce->args.evaluate(context);
args.args.insert(args.args.begin(), result);
result = target.call(context, args);
} else {
auto callable = part->evaluate(context);
ArgumentsValue args;
args.args.insert(args.args.begin(), result);
result = callable.call(context, args);
}
}
}
return result;
} | O3 | cpp | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rdi), %r12
movq $0x0, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movb $0x0, 0x40(%rdi)
movq %r12, %rdi
movl $0x1, %esi
callq 0x858ca
movq %r12, 0x18(%rsp)
movq %r12, %rdi
movl $0x1, %esi
callq 0x858ca
movq 0x20(%r15), %r12
movq 0x28(%r15), %r15
cmpq %r15, %r12
je 0xec87d
movb $0x1, %al
movq (%r12), %rbp
testq %rbp, %rbp
je 0xec892
testb $0x1, %al
je 0xec5de
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0xe1958
movups 0x80(%rsp), %xmm0
xorps %xmm1, %xmm1
leaq 0xb0(%rsp), %r13
movups %xmm1, -0x30(%r13)
movups 0x10(%rbx), %xmm1
movups %xmm0, 0x10(%rbx)
movaps %xmm1, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x71092
movups 0x90(%rsp), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, -0x20(%r13)
movups 0x20(%rbx), %xmm1
movups %xmm0, 0x20(%rbx)
movaps %xmm1, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x71092
movups 0xa0(%rsp), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, -0x10(%r13)
movups 0x30(%rbx), %xmm1
movups %xmm0, 0x30(%rbx)
movaps %xmm1, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x71092
leaq 0xb0(%rsp), %r13
movups (%r13), %xmm0
movaps %xmm0, 0x20(%rsp)
movq %r13, %rdi
xorl %esi, %esi
callq 0x858ca
movb $0x0, 0xb0(%rsp)
movq $0x0, 0xb8(%rsp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movl $0x1, %esi
callq 0x858ca
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x87a36
movq %rbp, %rdi
xorl %esi, %esi
callq 0x858ca
movq %rbp, %rdi
callq 0x89fe4
jmp 0xec7ff
movq %r15, %r13
movq %rbp, %rdi
leaq 0x743cd(%rip), %rsi # 0x1609b8
leaq 0x7488e(%rip), %rdx # 0x160e80
xorl %ecx, %ecx
callq 0x20fe0
testq %rax, %rax
je 0xec659
movq %rax, %r15
movq 0x20(%rax), %rsi
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
callq 0xe1958
addq $0x30, %r15
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xe9f0c
movq 0xc0(%rsp), %rsi
movq %rbp, %rdi
movq %rbx, %rdx
callq 0xeb97e
movq %r13, %r15
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0xca75c
jmp 0xec6b1
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0xe1958
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xeb97e
movq %r13, %r15
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0xca75c
movups 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
leaq 0x30(%rsp), %r13
movups %xmm1, (%r13)
movups 0x10(%rbx), %xmm1
movups %xmm0, 0x10(%rbx)
movaps %xmm1, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x71092
movups 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%r13)
movups 0x20(%rbx), %xmm1
movups %xmm0, 0x20(%rbx)
movaps %xmm1, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x71092
movups 0x50(%rsp), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x20(%r13)
movups 0x30(%rbx), %xmm1
movups %xmm0, 0x30(%rbx)
movaps %xmm1, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x71092
leaq 0x60(%rsp), %r13
movups (%r13), %xmm0
movaps %xmm0, (%rsp)
movq %r13, %rdi
xorl %esi, %esi
callq 0x858ca
movb $0x0, 0x60(%rsp)
movq $0x0, 0x68(%rsp)
movq %rsp, %rbp
movq %rbp, %rdi
movl $0x1, %esi
callq 0x858ca
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x87a36
movq %rbp, %rdi
xorl %esi, %esi
callq 0x858ca
movq %rbp, %rdi
callq 0x89fe4
movq %r13, %rdi
xorl %esi, %esi
callq 0x858ca
movq %r13, %rdi
callq 0x89fe4
leaq 0x58(%rsp), %rdi
callq 0x71092
leaq 0x48(%rsp), %rdi
callq 0x71092
leaq 0x38(%rsp), %rdi
callq 0x71092
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
leaq 0xc0(%rsp), %r13
je 0xec7e2
movq 0x757db(%rip), %rax # 0x161f98
cmpb $0x0, (%rax)
je 0xec7cd
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xec7d7
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xec7e2
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0xd8(%rsp), %rdi
callq 0xcae26
movq %r13, %rdi
callq 0xbe5c0
leaq 0xb0(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x858ca
movq %r13, %rdi
callq 0x89fe4
leaq 0xa8(%rsp), %rdi
callq 0x71092
leaq 0x98(%rsp), %rdi
callq 0x71092
leaq 0x88(%rsp), %rdi
callq 0x71092
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xec86e
movq 0x7574f(%rip), %rax # 0x161f98
cmpb $0x0, (%rax)
je 0xec859
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xec863
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xec86e
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %r12
xorl %eax, %eax
cmpq %r15, %r12
jne 0xec4d6
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20620
movq %rax, %r15
leaq 0x3550d(%rip), %rsi # 0x121db3
movq %rax, %rdi
callq 0x20400
movq 0x7570b(%rip), %rsi # 0x161fc0
movq 0x756c4(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a30
jmp 0xec8d3
jmp 0xec8d3
jmp 0xec90b
jmp 0xec8d3
movq %rax, %r14
jmp 0xec8f0
jmp 0xec90b
movq %rax, %r14
leaq 0xd8(%rsp), %rdi
callq 0xcae26
leaq 0xc0(%rsp), %rdi
callq 0xbe5c0
leaq 0x70(%rsp), %rdi
callq 0xb6738
jmp 0xec90e
jmp 0xec90b
movq %rax, %r14
movq %r15, %rdi
callq 0x20eb0
jmp 0xec90e
movq %rax, %r14
movq %rbx, %rdi
callq 0xb6738
movq %r14, %rdi
callq 0x20ad0
| _ZNK5minja10FilterExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+40h]
mov qword ptr [rdi+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
mov byte ptr [rdi+40h], 0
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov [rsp+128h+var_110], r12
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov r12, [r15+20h]
mov r15, [r15+28h]
cmp r12, r15
jz loc_EC87D
mov al, 1
loc_EC4D6:
mov rbp, [r12]
test rbp, rbp
jz loc_EC892
test al, 1
jz loc_EC5DE
lea rdi, [rsp+128h+var_B8]
mov rsi, rbp
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
movups xmm0, [rsp+128h+var_A8]
xorps xmm1, xmm1
lea r13, [rsp+128h+var_78]
movups xmmword ptr [r13-30h], xmm1
movups xmm1, xmmword ptr [rbx+10h]
movups xmmword ptr [rbx+10h], xmm0
movaps [rsp+128h+var_108], xmm1
lea rdi, [rsp+128h+var_108+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
movups xmm0, [rsp+128h+var_98]
xorps xmm1, xmm1
movups xmmword ptr [r13-20h], xmm1
movups xmm1, xmmword ptr [rbx+20h]
movups xmmword ptr [rbx+20h], xmm0
movaps [rsp+128h+var_108], xmm1
lea rdi, [rsp+128h+var_108+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
movups xmm0, [rsp+128h+var_88]
xorps xmm1, xmm1
movups xmmword ptr [r13-10h], xmm1
movups xmm1, xmmword ptr [rbx+30h]
movups xmmword ptr [rbx+30h], xmm0
movaps [rsp+128h+var_108], xmm1
lea rdi, [rsp+128h+var_108+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [rsp+128h+var_78]
movups xmm0, xmmword ptr [r13+0]
movaps [rsp+128h+var_108], xmm0
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 [rsp+128h+var_78], 0
mov [rsp+128h+var_70], 0
lea rbp, [rsp+128h+var_108]
mov rdi, rbp
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rsp+128h+var_110]
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, rbp
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, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp loc_EC7FF
loc_EC5DE:
mov r13, r15
mov rdi, rbp; lpsrc
lea rsi, _ZTIN5minja10ExpressionE; lpstype
lea rdx, _ZTIN5minja8CallExprE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_EC659
mov r15, rax
mov rsi, [rax+20h]
lea rdi, [rsp+128h+var_B8]
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
add r15, 30h ; '0'
lea rbp, [rsp+128h+var_68]
mov rdi, rbp
mov rsi, r15
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, qword ptr [rsp+128h+var_68]
mov rdi, rbp
mov rdx, rbx
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
mov r15, r13
lea rdi, [rsp+128h+var_108]
lea rsi, [rsp+128h+var_B8]
mov rdx, r14
mov rcx, rbp
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
jmp short loc_EC6B1
loc_EC659:
lea rdi, [rsp+128h+var_B8]
mov rsi, rbp
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
movaps [rsp+128h+var_48], xmm0
movaps [rsp+128h+var_58], xmm0
movaps [rsp+128h+var_68], xmm0
lea rbp, [rsp+128h+var_68]
mov rdi, rbp
xor esi, esi
mov rdx, rbx
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
mov r15, r13
lea rdi, [rsp+128h+var_108]
lea rsi, [rsp+128h+var_B8]
mov rdx, r14
mov rcx, rbp
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
loc_EC6B1:
movups xmm0, [rsp+128h+var_F8]
xorps xmm1, xmm1
lea r13, [rsp+128h+var_F8]
movups xmmword ptr [r13+0], xmm1
movups xmm1, xmmword ptr [rbx+10h]
movups xmmword ptr [rbx+10h], xmm0
movaps [rsp+128h+var_128], xmm1
lea rdi, [rsp+128h+var_128+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
movups xmm0, [rsp+128h+var_E8]
xorps xmm1, xmm1
movups xmmword ptr [r13+10h], xmm1
movups xmm1, xmmword ptr [rbx+20h]
movups xmmword ptr [rbx+20h], xmm0
movaps [rsp+128h+var_128], xmm1
lea rdi, [rsp+128h+var_128+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
movups xmm0, [rsp+128h+var_D8]
xorps xmm1, xmm1
movups xmmword ptr [r13+20h], xmm1
movups xmm1, xmmword ptr [rbx+30h]
movups xmmword ptr [rbx+30h], xmm0
movaps [rsp+128h+var_128], xmm1
lea rdi, [rsp+128h+var_128+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [rsp+128h+var_C8]
movups xmm0, xmmword ptr [r13+0]
movaps [rsp+128h+var_128], xmm0
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 [rsp+128h+var_C8], 0
mov [rsp+128h+var_C0], 0
mov rbp, rsp
mov rdi, rbp
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rsp+128h+var_110]
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, rbp
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, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
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, [rsp+128h+var_D8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+128h+var_E8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+128h+var_F8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, qword ptr [rsp+128h+var_108+8]
test rdi, rdi
lea r13, [rsp+128h+var_68]
jz short loc_EC7E2
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EC7CD
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EC7D7
loc_EC7CD:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EC7D7:
cmp eax, 1
jnz short loc_EC7E2
mov rax, [rdi]
call qword ptr [rax+18h]
loc_EC7E2:
lea rdi, [rsp+128h+var_58+8]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, r13
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
lea r13, [rsp+128h+var_78]
loc_EC7FF:
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, [rsp+128h+var_88+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+128h+var_98+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+128h+var_A8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+128h+var_B0]
test rdi, rdi
jz short loc_EC86E
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EC859
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EC863
loc_EC859:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EC863:
cmp eax, 1
jnz short loc_EC86E
mov rax, [rdi]
call qword ptr [rax+18h]
loc_EC86E:
add r12, 10h
xor eax, eax
cmp r12, r15
jnz loc_EC4D6
loc_EC87D:
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EC892:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aFilterexprPart; "FilterExpr.part 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, r15; void *
call ___cxa_throw
jmp short loc_EC8D3
jmp short loc_EC8D3
jmp short loc_EC90B
jmp short loc_EC8D3
mov r14, rax
jmp short loc_EC8F0
jmp short loc_EC90B
loc_EC8D3:
mov r14, rax
lea rdi, [rsp+128h+var_58+8]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
lea rdi, [rsp+128h+var_68]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
loc_EC8F0:
lea rdi, [rsp+128h+var_B8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_EC90E
jmp short loc_EC90B
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_EC90E
loc_EC90B:
mov r14, rax
loc_EC90E:
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| long long minja::FilterExpr::do_evaluate(long long a1, long long a2)
{
void (****v3)(void); // r12
void (****v4)(void); // r15
char v5; // al
void (***v6)(void); // rbp
__int128 v7; // xmm0
__int128 v8; // xmm1
__int128 v9; // xmm0
__int128 v10; // xmm1
__int128 v11; // xmm0
__int128 v12; // xmm1
void (****v13)(void); // r13
void (****v14)(void); // rax
void (****v15)(void); // r15
__int128 v16; // xmm0
__int128 v17; // xmm1
__int128 v18; // xmm0
__int128 v19; // xmm1
__int128 v20; // xmm0
__int128 v21; // xmm1
long long v22; // rdi
signed __int32 v23; // eax
long long v24; // rdi
signed __int32 v25; // eax
std::runtime_error *exception; // r15
__int128 v28; // [rsp+0h] [rbp-128h] BYREF
long long v29; // [rsp+18h] [rbp-110h]
__int128 v30; // [rsp+20h] [rbp-108h] BYREF
__int128 v31; // [rsp+30h] [rbp-F8h] BYREF
__int128 v32; // [rsp+40h] [rbp-E8h] BYREF
__int128 v33; // [rsp+50h] [rbp-D8h] BYREF
__int128 v34; // [rsp+60h] [rbp-C8h] BYREF
char v35[8]; // [rsp+70h] [rbp-B8h] BYREF
long long v36; // [rsp+78h] [rbp-B0h]
__int128 v37; // [rsp+80h] [rbp-A8h] BYREF
__int128 v38; // [rsp+90h] [rbp-98h] BYREF
__int128 v39; // [rsp+A0h] [rbp-88h] BYREF
__int128 v40; // [rsp+B0h] [rbp-78h] BYREF
_OWORD v41[6]; // [rsp+C0h] [rbp-68h] BYREF
*(_QWORD *)(a1 + 72) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_BYTE *)(a1 + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64));
v29 = a1 + 64;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64));
v3 = *(void (*****)(void))(a2 + 32);
v4 = *(void (*****)(void))(a2 + 40);
if ( v3 != v4 )
{
v5 = 1;
do
{
v6 = *v3;
if ( !*v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterExpr.part is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (v5 & 1) != 0 )
{
minja::Expression::evaluate((long long)v35, *v3);
v7 = v37;
v37 = 0LL;
v8 = *(_OWORD *)(a1 + 16);
*(_OWORD *)(a1 + 16) = v7;
v30 = v8;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v30 + 1);
v9 = v38;
v38 = 0LL;
v10 = *(_OWORD *)(a1 + 32);
*(_OWORD *)(a1 + 32) = v9;
v30 = v10;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v30 + 1);
v11 = v39;
v39 = 0LL;
v12 = *(_OWORD *)(a1 + 48);
*(_OWORD *)(a1 + 48) = v11;
v30 = v12;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v30 + 1);
v30 = v40;
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 *)&v40);
LOBYTE(v40) = 0;
*((_QWORD *)&v40 + 1) = 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 *)&v30);
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=(
v29,
(long long)&v30);
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 *)&v30);
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(&v30);
}
else
{
v13 = v4;
v14 = (void (****)(void))__dynamic_cast(
*v3,
(const struct __class_type_info *)&`typeinfo for'minja::Expression,
(const struct __class_type_info *)&`typeinfo for'minja::CallExpr,
0LL);
if ( v14 )
{
v15 = v14;
minja::Expression::evaluate((long long)v35, v14[4]);
minja::ArgumentsExpression::evaluate(v41, (long long *)v15 + 6);
std::vector<minja::Value>::insert((long long *)v41, *(long long *)&v41[0], (const minja::Value *)a1);
v4 = v13;
}
else
{
minja::Expression::evaluate((long long)v35, v6);
memset(v41, 0, 48);
std::vector<minja::Value>::insert((long long *)v41, 0LL, (const minja::Value *)a1);
}
minja::Value::call((long long)&v30, (long long)v35);
v16 = v31;
v31 = 0LL;
v17 = *(_OWORD *)(a1 + 16);
*(_OWORD *)(a1 + 16) = v16;
v28 = v17;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v28 + 1);
v18 = v32;
v32 = 0LL;
v19 = *(_OWORD *)(a1 + 32);
*(_OWORD *)(a1 + 32) = v18;
v28 = v19;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v28 + 1);
v20 = v33;
v33 = 0LL;
v21 = *(_OWORD *)(a1 + 48);
*(_OWORD *)(a1 + 48) = v20;
v28 = v21;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v28 + 1);
v28 = v34;
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 *)&v34);
LOBYTE(v34) = 0;
*((_QWORD *)&v34 + 1) = 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 *)&v28);
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=(
v29,
(long long)&v28);
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 *)&v28);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v28);
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 *)&v34);
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(&v34);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v33 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v32 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v31 + 1);
v22 = *((_QWORD *)&v30 + 1);
if ( *((_QWORD *)&v30 + 1) )
{
if ( _libc_single_threaded )
{
v23 = *(_DWORD *)(*((_QWORD *)&v30 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v30 + 1) + 12LL) = v23 - 1;
}
else
{
v23 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v30 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v23 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v22 + 24LL))(v22, 0LL);
}
std::vector<std::pair<std::string,minja::Value>>::~vector((_QWORD *)&v41[1] + 1);
std::vector<minja::Value>::~vector(v41);
}
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 *)&v40);
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(&v40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v39 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v38 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v37 + 1);
v24 = v36;
if ( v36 )
{
if ( _libc_single_threaded )
{
v25 = *(_DWORD *)(v36 + 12);
*(_DWORD *)(v36 + 12) = v25 - 1;
}
else
{
v25 = _InterlockedExchangeAdd((volatile signed __int32 *)(v36 + 12), 0xFFFFFFFF);
}
if ( v25 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v24 + 24LL))(v24, 0LL);
}
v3 += 2;
v5 = 0;
}
while ( v3 != v4 );
}
return a1;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x40]
MOV qword ptr [RDI + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV byte ptr [RDI + 0x40],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x001858ca
MOV qword ptr [RSP + 0x18],R12
MOV RDI,R12
MOV ESI,0x1
CALL 0x001858ca
MOV R12,qword ptr [R15 + 0x20]
MOV R15,qword ptr [R15 + 0x28]
CMP R12,R15
JZ 0x001ec87d
MOV AL,0x1
LAB_001ec4d6:
MOV RBP,qword ptr [R12]
TEST RBP,RBP
JZ 0x001ec892
TEST AL,0x1
JZ 0x001ec5de
LAB_001ec4eb:
LEA RDI,[RSP + 0x70]
MOV RSI,RBP
MOV RDX,R14
CALL 0x001e1958
MOVUPS XMM0,xmmword ptr [RSP + 0x80]
XORPS XMM1,XMM1
LEA R13,[RSP + 0xb0]
MOVUPS xmmword ptr [R13 + -0x30],XMM1
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM1
LEA RDI,[RSP + 0x28]
CALL 0x00171092
MOVUPS XMM0,xmmword ptr [RSP + 0x90]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [R13 + -0x20],XMM1
MOVUPS XMM1,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM1
LEA RDI,[RSP + 0x28]
CALL 0x00171092
MOVUPS XMM0,xmmword ptr [RSP + 0xa0]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [R13 + -0x10],XMM1
MOVUPS XMM1,xmmword ptr [RBX + 0x30]
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM1
LEA RDI,[RSP + 0x28]
CALL 0x00171092
LEA R13,[RSP + 0xb0]
MOVUPS XMM0,xmmword ptr [R13]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV RDI,R13
XOR ESI,ESI
CALL 0x001858ca
MOV byte ptr [RSP + 0xb0],0x0
MOV qword ptr [RSP + 0xb8],0x0
LEA RBP,[RSP + 0x20]
MOV RDI,RBP
MOV ESI,0x1
CALL 0x001858ca
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RBP
CALL 0x00187a36
MOV RDI,RBP
XOR ESI,ESI
CALL 0x001858ca
MOV RDI,RBP
CALL 0x00189fe4
JMP 0x001ec7ff
LAB_001ec5de:
MOV R13,R15
MOV RDI,RBP
LEA RSI,[0x2609b8]
LEA RDX,[0x260e80]
XOR ECX,ECX
CALL 0x00120fe0
TEST RAX,RAX
JZ 0x001ec659
MOV R15,RAX
MOV RSI,qword ptr [RAX + 0x20]
LAB_001ec605:
LEA RDI,[RSP + 0x70]
MOV RDX,R14
CALL 0x001e1958
ADD R15,0x30
LAB_001ec616:
LEA RBP,[RSP + 0xc0]
MOV RDI,RBP
MOV RSI,R15
MOV RDX,R14
CALL 0x001e9f0c
MOV RSI,qword ptr [RSP + 0xc0]
LAB_001ec634:
MOV RDI,RBP
MOV RDX,RBX
CALL 0x001eb97e
LAB_001ec63f:
MOV R15,R13
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x70]
MOV RDX,R14
MOV RCX,RBP
CALL 0x001ca75c
JMP 0x001ec6b1
LAB_001ec659:
LEA RDI,[RSP + 0x70]
MOV RSI,RBP
MOV RDX,R14
CALL 0x001e1958
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOVAPS xmmword ptr [RSP + 0xc0],XMM0
LAB_001ec684:
LEA RBP,[RSP + 0xc0]
MOV RDI,RBP
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001eb97e
LAB_001ec699:
MOV R15,R13
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x70]
MOV RDX,R14
MOV RCX,RBP
CALL 0x001ca75c
LAB_001ec6b1:
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
XORPS XMM1,XMM1
LEA R13,[RSP + 0x30]
MOVUPS xmmword ptr [R13],XMM1
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM1
LEA RDI,[RSP + 0x8]
CALL 0x00171092
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [R13 + 0x10],XMM1
MOVUPS XMM1,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RSP],XMM1
LEA RDI,[RSP + 0x8]
CALL 0x00171092
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [R13 + 0x20],XMM1
MOVUPS XMM1,xmmword ptr [RBX + 0x30]
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVAPS xmmword ptr [RSP],XMM1
LEA RDI,[RSP + 0x8]
CALL 0x00171092
LEA R13,[RSP + 0x60]
MOVUPS XMM0,xmmword ptr [R13]
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,R13
XOR ESI,ESI
CALL 0x001858ca
MOV byte ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x68],0x0
MOV RBP,RSP
MOV RDI,RBP
MOV ESI,0x1
CALL 0x001858ca
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RBP
CALL 0x00187a36
MOV RDI,RBP
XOR ESI,ESI
CALL 0x001858ca
MOV RDI,RBP
CALL 0x00189fe4
MOV RDI,R13
XOR ESI,ESI
CALL 0x001858ca
MOV RDI,R13
CALL 0x00189fe4
LEA RDI,[RSP + 0x58]
CALL 0x00171092
LEA RDI,[RSP + 0x48]
CALL 0x00171092
LEA RDI,[RSP + 0x38]
CALL 0x00171092
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
LEA R13,[RSP + 0xc0]
JZ 0x001ec7e2
MOV RAX,qword ptr [0x00261f98]
CMP byte ptr [RAX],0x0
JZ 0x001ec7cd
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001ec7d7
LAB_001ec7cd:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001ec7d7:
CMP EAX,0x1
JNZ 0x001ec7e2
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001ec7e2:
LEA RDI,[RSP + 0xd8]
CALL 0x001cae26
MOV RDI,R13
CALL 0x001be5c0
LEA R13,[RSP + 0xb0]
LAB_001ec7ff:
MOV RDI,R13
XOR ESI,ESI
CALL 0x001858ca
MOV RDI,R13
CALL 0x00189fe4
LEA RDI,[RSP + 0xa8]
CALL 0x00171092
LEA RDI,[RSP + 0x98]
CALL 0x00171092
LEA RDI,[RSP + 0x88]
CALL 0x00171092
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001ec86e
MOV RAX,qword ptr [0x00261f98]
CMP byte ptr [RAX],0x0
JZ 0x001ec859
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001ec863
LAB_001ec859:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001ec863:
CMP EAX,0x1
JNZ 0x001ec86e
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001ec86e:
ADD R12,0x10
XOR EAX,EAX
CMP R12,R15
JNZ 0x001ec4d6
LAB_001ec87d:
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ec892:
MOV EDI,0x10
CALL 0x00120620
MOV R15,RAX
LAB_001ec89f:
LEA RSI,[0x221db3]
MOV RDI,RAX
CALL 0x00120400
LAB_001ec8ae:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a30
|
/* minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
FilterExpr * __thiscall minja::FilterExpr::do_evaluate(FilterExpr *this,shared_ptr *param_1)
{
int *piVar1;
int8 *puVar2;
shared_ptr *psVar3;
int8 uVar4;
int8 uVar5;
int iVar6;
long lVar7;
runtime_error *this_00;
bool bVar8;
int8 *puVar9;
int8 local_128;
int8 auStack_120 [2];
FilterExpr *local_110;
int8 local_108;
long *plStack_100;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 uStack_d0;
data local_c8;
int7 uStack_c7;
int8 uStack_c0;
Expression local_b8 [8];
long *local_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
data local_78;
int7 uStack_77;
long *plStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
*(int8 *)(this + 0x48) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
this[0x40] = (FilterExpr)0x0;
bVar8 = SUB81(this + 0x40,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar8);
local_110 = this + 0x40;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar8);
puVar9 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar9 != puVar2) {
bVar8 = true;
do {
psVar3 = (shared_ptr *)*puVar9;
if (psVar3 == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ec89f to 001ec8ad has its CatchHandler @ 001ec8fe */
std::runtime_error::runtime_error(this_00,"FilterExpr.part is null");
/* try { // try from 001ec8ae to 001ec8c3 has its CatchHandler @ 001ec8fc */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
if (bVar8) {
/* try { // try from 001ec4eb to 001ec4fa has its CatchHandler @ 001ec90b */
Expression::evaluate(local_b8,psVar3);
uVar5 = uStack_a0;
uVar4 = local_a8;
local_a8 = 0;
uStack_a0 = 0;
local_108 = *(int8 *)(this + 0x10);
plStack_100 = *(long **)(this + 0x18);
*(int8 *)(this + 0x10) = uVar4;
*(int8 *)(this + 0x18) = uVar5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&plStack_100);
uVar5 = uStack_90;
uVar4 = local_98;
local_98 = 0;
uStack_90 = 0;
local_108 = *(int8 *)(this + 0x20);
plStack_100 = *(long **)(this + 0x28);
*(int8 *)(this + 0x20) = uVar4;
*(int8 *)(this + 0x28) = uVar5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&plStack_100);
uVar5 = uStack_80;
uVar4 = local_88;
local_88 = 0;
uStack_80 = 0;
local_108 = *(int8 *)(this + 0x30);
plStack_100 = *(long **)(this + 0x38);
*(int8 *)(this + 0x30) = uVar4;
*(int8 *)(this + 0x38) = uVar5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&plStack_100);
local_108 = CONCAT71(uStack_77,local_78);
plStack_100 = plStack_70;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_78,0));
local_78 = (data)0x0;
plStack_70 = (long *)0x0;
bVar8 = SUB81((data *)&local_108,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_110,(data *)&local_108);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_108);
}
else {
lVar7 = __dynamic_cast(psVar3,&Expression::typeinfo,&CallExpr::typeinfo,0);
if (lVar7 == 0) {
/* try { // try from 001ec659 to 001ec668 has its CatchHandler @ 001ec8c8 */
Expression::evaluate(local_b8,psVar3);
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
/* try { // try from 001ec684 to 001ec698 has its CatchHandler @ 001ec8c6 */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_68,0,this);
/* try { // try from 001ec699 to 001ec6b0 has its CatchHandler @ 001ec8c4 */
Value::call((shared_ptr *)&local_108,(ArgumentsValue *)local_b8);
}
else {
/* try { // try from 001ec605 to 001ec611 has its CatchHandler @ 001ec8d1 */
Expression::evaluate(local_b8,*(shared_ptr **)(lVar7 + 0x20));
/* try { // try from 001ec616 to 001ec62b has its CatchHandler @ 001ec8cc */
ArgumentsExpression::evaluate
((ArgumentsExpression *)&local_68,(shared_ptr *)(lVar7 + 0x30));
/* try { // try from 001ec634 to 001ec63e has its CatchHandler @ 001ec8ca */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_68,local_68,this);
/* try { // try from 001ec63f to 001ec656 has its CatchHandler @ 001ec8d3 */
Value::call((shared_ptr *)&local_108,(ArgumentsValue *)local_b8);
}
uVar5 = uStack_f0;
uVar4 = local_f8;
local_f8 = 0;
uStack_f0 = 0;
local_128 = *(int8 *)(this + 0x10);
auStack_120[0] = *(int8 *)(this + 0x18);
*(int8 *)(this + 0x10) = uVar4;
*(int8 *)(this + 0x18) = uVar5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_120);
uVar5 = uStack_e0;
uVar4 = local_e8;
local_e8 = 0;
uStack_e0 = 0;
local_128 = *(int8 *)(this + 0x20);
auStack_120[0] = *(int8 *)(this + 0x28);
*(int8 *)(this + 0x20) = uVar4;
*(int8 *)(this + 0x28) = uVar5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_120);
uVar5 = uStack_d0;
uVar4 = local_d8;
local_d8 = 0;
uStack_d0 = 0;
local_128 = *(int8 *)(this + 0x30);
auStack_120[0] = *(int8 *)(this + 0x38);
*(int8 *)(this + 0x30) = uVar4;
*(int8 *)(this + 0x38) = uVar5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_120);
local_128 = CONCAT71(uStack_c7,local_c8);
auStack_120[0] = uStack_c0;
bVar8 = SUB81(&local_c8,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar8);
local_c8 = (data)0x0;
uStack_c0 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_128,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>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_110,&local_128);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_128,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_128);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_c8);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_d0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_e0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_f0);
if (plStack_100 != (long *)0x0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_100 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)plStack_100 + 0xc);
*(int *)((long)plStack_100 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*plStack_100 + 0x18))();
}
}
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)&uStack_50);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector
((vector<minja::Value,std::allocator<minja::Value>> *)&local_68);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_78,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_78);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_90);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_a0);
if (local_b0 != (long *)0x0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_b0 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)local_b0 + 0xc);
*(int *)((long)local_b0 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*local_b0 + 0x18))();
}
}
puVar9 = puVar9 + 2;
bVar8 = false;
} while (puVar9 != puVar2);
}
return this;
}
| |
33,638 | my_hrtime | eloqsql/mysys/my_getsystime.c | my_hrtime_t my_hrtime()
{
my_hrtime_t hrtime;
#if defined(_WIN32)
ulonglong newtime;
GetSystemTimePreciseAsFileTime((FILETIME*)&newtime);
hrtime.val= (newtime - OFFSET_TO_EPOC)/10;
#elif defined(HAVE_CLOCK_GETTIME)
struct timespec tp;
clock_gettime(CLOCK_REALTIME, &tp);
hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL;
#else
struct timeval t;
/* The following loop is here because gettimeofday may fail */
while (gettimeofday(&t, NULL) != 0) {}
hrtime.val= t.tv_sec*1000000ULL + t.tv_usec;
#endif
DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;);
DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;);
return hrtime;
} | O0 | c | my_hrtime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
xorl %edi, %edi
leaq -0x18(%rbp), %rsi
callq 0x262d0
imulq $0xf4240, -0x18(%rbp), %rax # imm = 0xF4240
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x5835d
jmp 0x5835f
jmp 0x58361
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_hrtime:
push rbp
mov rbp, rsp
sub rsp, 20h
xor edi, edi
lea rsi, [rbp+var_18]
call _clock_gettime
imul rax, [rbp+var_18], 0F4240h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 3E8h
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
jmp short $+2
loc_5835D:
jmp short $+2
loc_5835F:
jmp short $+2
loc_58361:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_hrtime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
clock_gettime(0LL, &v1);
return v2 / 0x3E8 + 1000000 * v1;
}
| my_hrtime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
XOR EDI,EDI
LEA RSI,[RBP + -0x18]
CALL 0x001262d0
IMUL RAX,qword ptr [RBP + -0x18],0xf4240
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015835d
LAB_0015835d:
JMP 0x0015835f
LAB_0015835f:
JMP 0x00158361
LAB_00158361:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_hrtime(void)
{
timespec local_20;
clock_gettime(0,&local_20);
return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000;
}
| |
33,639 | verify_heap_integrity | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | int verify_heap_integrity(int repair, int *segments_verified, int *segments_repaired) {
if (!heap_initialized) {
HEAP_LOG("Cannot verify heap integrity - heap not initialized\n");
return -1;
}
int total_errors = 0;
int verified = 0;
int repaired = 0;
segment_t *s = segments;
while (s) {
int errors = verify_segment_integrity(s, repair);
total_errors += errors;
verified++;
if (errors > 0 && repair) {
repaired++;
}
s = s->next;
}
HEAP_LOG("Heap integrity verification complete: %d segments checked, %d errors found, %d segments repaired\n",
verified, total_errors, repaired);
if (segments_verified) *segments_verified = verified;
if (segments_repaired) *segments_repaired = repaired;
return total_errors;
} | O3 | c | verify_heap_integrity:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3116(%rip), %rax # 0x5090
cmpl $0x0, (%rax)
je 0x1fd2
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x30f0(%rip), %rax # 0x5080
movq (%rax), %r12
testq %r12, %r12
je 0x1fd9
movl %edi, %r15d
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %ebp, %ebp
testl %r15d, %r15d
setne %r14b
movq %r12, %rdi
movl %r15d, %esi
callq 0x1dca
addl %eax, %ebp
incl %ebx
testl %eax, %eax
setg %al
andb %r14b, %al
movzbl %al, %eax
addl %eax, %r13d
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1fa2
jmp 0x1fe0
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0x1ff9
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x1fec
movl %ebx, (%rax)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1ff9
movl %r13d, (%rax)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| verify_heap_integrity:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea rax, heap_initialized
cmp dword ptr [rax], 0
jz short loc_1FD2
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_38], rdx
lea rax, segments
mov r12, [rax]
test r12, r12
jz short loc_1FD9
mov r15d, edi
xor r13d, r13d
xor ebx, ebx
xor ebp, ebp
loc_1FA2:
test r15d, r15d
setnz r14b
mov rdi, r12
mov esi, r15d
call verify_segment_integrity
add ebp, eax
inc ebx
test eax, eax
setnle al
and al, r14b
movzx eax, al
add r13d, eax
mov r12, [r12+8]
test r12, r12
jnz short loc_1FA2
jmp short loc_1FE0
loc_1FD2:
mov ebp, 0FFFFFFFFh
jmp short loc_1FF9
loc_1FD9:
xor ebp, ebp
xor ebx, ebx
xor r13d, r13d
loc_1FE0:
mov rax, [rsp+48h+var_40]
test rax, rax
jz short loc_1FEC
mov [rax], ebx
loc_1FEC:
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_1FF9
mov [rax], r13d
loc_1FF9:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long verify_heap_integrity(int a1, _DWORD *a2, _DWORD *a3)
{
unsigned long long v3; // r12
int v4; // r13d
int v5; // ebx
unsigned int v6; // ebp
int v7; // eax
if ( heap_initialized )
{
v3 = segments;
if ( segments )
{
v4 = 0;
v5 = 0;
v6 = 0;
do
{
v7 = verify_segment_integrity(v3, a1);
v6 += v7;
++v5;
v4 += a1 != 0 && v7 > 0;
v3 = *(_QWORD *)(v3 + 8);
}
while ( v3 );
}
else
{
v6 = 0;
v5 = 0;
v4 = 0;
}
if ( a2 )
*a2 = v5;
if ( a3 )
*a3 = v4;
}
else
{
return (unsigned int)-1;
}
return v6;
}
| verify_heap_integrity:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA RAX,[0x105090]
CMP dword ptr [RAX],0x0
JZ 0x00101fd2
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
LEA RAX,[0x105080]
MOV R12,qword ptr [RAX]
TEST R12,R12
JZ 0x00101fd9
MOV R15D,EDI
XOR R13D,R13D
XOR EBX,EBX
XOR EBP,EBP
LAB_00101fa2:
TEST R15D,R15D
SETNZ R14B
MOV RDI,R12
MOV ESI,R15D
CALL 0x00101dca
ADD EBP,EAX
INC EBX
TEST EAX,EAX
SETG AL
AND AL,R14B
MOVZX EAX,AL
ADD R13D,EAX
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x00101fa2
JMP 0x00101fe0
LAB_00101fd2:
MOV EBP,0xffffffff
JMP 0x00101ff9
LAB_00101fd9:
XOR EBP,EBP
XOR EBX,EBX
XOR R13D,R13D
LAB_00101fe0:
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JZ 0x00101fec
MOV dword ptr [RAX],EBX
LAB_00101fec:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00101ff9
MOV dword ptr [RAX],R13D
LAB_00101ff9:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int verify_heap_integrity(int param_1,int *param_2,int *param_3)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
if (heap_initialized == 0) {
iVar3 = -1;
}
else {
if (segments == 0) {
iVar3 = 0;
iVar2 = 0;
iVar5 = 0;
}
else {
iVar5 = 0;
iVar2 = 0;
iVar3 = 0;
lVar4 = segments;
do {
iVar1 = verify_segment_integrity(lVar4,param_1);
iVar3 = iVar3 + iVar1;
iVar2 = iVar2 + 1;
iVar5 = iVar5 + (uint)(0 < iVar1 && param_1 != 0);
lVar4 = *(long *)(lVar4 + 8);
} while (lVar4 != 0);
}
if (param_2 != (int *)0x0) {
*param_2 = iVar2;
}
if (param_3 != (int *)0x0) {
*param_3 = iVar5;
}
}
return iVar3;
}
| |
33,640 | ggml_argsort | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_argsort(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_sort_order order) {
GGML_ASSERT(a->ne[0] <= INT32_MAX);
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_I32, GGML_MAX_DIMS, a->ne);
ggml_set_op_params_i32(result, 0, (int32_t) order);
result->op = GGML_OP_ARGSORT;
result->src[0] = a;
return result;
} | O0 | c | ggml_argsort:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x7fffffff, 0x10(%rax) # imm = 0x7FFFFFFF
jle 0x52fa2
leaq 0x5e62f(%rip), %rdi # 0xb15b7
movl $0x10a3, %esi # imm = 0x10A3
leaq 0x5e675(%rip), %rdx # 0xb1609
leaq 0x5e847(%rip), %rcx # 0xb17e2
movb $0x0, %al
callq 0x48a00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
movl $0x1a, %esi
movl $0x4, %edx
callq 0x42510
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %edx
xorl %esi, %esi
callq 0x4df90
movq -0x20(%rbp), %rax
movl $0x3b, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_argsort:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 7FFFFFFFh
jle short loc_52FA2
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 10A3h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0Int32Max; "a->ne[0] <= INT32_MAX"
mov al, 0
call _ggml_abort
loc_52FA2:
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_10]
add rcx, 10h
mov esi, 1Ah
mov edx, 4
call _ggml_new_tensor
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
mov edx, [rbp+var_14]
xor esi, esi
call ggml_set_op_params_i32
mov rax, [rbp+var_20]
mov dword ptr [rax+50h], 3Bh ; ';'
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax+98h], rcx
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| long long ggml_argsort(long long a1, long long a2, int a3)
{
long long v4; // [rsp+0h] [rbp-20h]
if ( *(long long *)(a2 + 16) > 0x7FFFFFFF )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4259,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[0] <= INT32_MAX");
v4 = ggml_new_tensor(a1, 0x1Au, 4u, a2 + 16);
ggml_set_op_params_i32(v4, 0, a3);
*(_DWORD *)(v4 + 80) = 59;
*(_QWORD *)(v4 + 152) = a2;
return v4;
}
| ggml_argsort:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x7fffffff
JLE 0x00152fa2
LEA RDI,[0x1b15b7]
MOV ESI,0x10a3
LEA RDX,[0x1b1609]
LEA RCX,[0x1b17e2]
MOV AL,0x0
CALL 0x00148a00
LAB_00152fa2:
MOV RDI,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x10
MOV ESI,0x1a
MOV EDX,0x4
CALL 0x00142510
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL 0x0014df90
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x50],0x3b
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
long ggml_argsort(int8 param_1,long param_2,int4 param_3)
{
long lVar1;
if (0x7fffffff < *(long *)(param_2 + 0x10)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x10a3,"GGML_ASSERT(%s) failed","a->ne[0] <= INT32_MAX");
}
lVar1 = ggml_new_tensor(param_1,0x1a,4,param_2 + 0x10);
ggml_set_op_params_i32(lVar1,0,param_3);
*(int4 *)(lVar1 + 0x50) = 0x3b;
*(long *)(lVar1 + 0x98) = param_2;
return lVar1;
}
| |
33,641 | ggml_argsort | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_argsort(
struct ggml_context * ctx,
struct ggml_tensor * a,
enum ggml_sort_order order) {
GGML_ASSERT(a->ne[0] <= INT32_MAX);
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_I32, GGML_MAX_DIMS, a->ne);
ggml_set_op_params_i32(result, 0, (int32_t) order);
result->op = GGML_OP_ARGSORT;
result->src[0] = a;
return result;
} | O3 | c | ggml_argsort:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x80000000, %eax # imm = 0x80000000
cmpq %rax, 0x10(%rsi)
jge 0x1e900
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x10(%rsi), %rcx
movl $0x1a, %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
movl %ebp, 0x54(%rax)
movl $0x3b, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2dd0c(%rip), %rdi # 0x4c613
leaq 0x2dd57(%rip), %rdx # 0x4c665
leaq 0x2df29(%rip), %rcx # 0x4c83e
movl $0x10a3, %esi # imm = 0x10A3
xorl %eax, %eax
callq 0x17cd0
| ggml_argsort:
push rbp
push rbx
push rax
mov eax, 80000000h
cmp [rsi+10h], rax
jge short loc_1E900
mov ebp, edx
mov rbx, rsi
lea rcx, [rsi+10h]
mov esi, 1Ah
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov [rax+54h], ebp
mov dword ptr [rax+50h], 3Bh ; ';'
mov [rax+98h], rbx
add rsp, 8
pop rbx
pop rbp
retn
loc_1E900:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0Int32Max; "a->ne[0] <= INT32_MAX"
mov esi, 10A3h
xor eax, eax
call _ggml_abort
| long long ggml_argsort(long long a1, long long a2, int a3, double a4, long long a5, int a6, int a7)
{
long long result; // rax
if ( *(long long *)(a2 + 16) >= 0x80000000LL )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4259,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"a->ne[0] <= INT32_MAX",
a6,
a7);
result = ggml_new_tensor_impl(a1, 0x1Au, 4u, (long long *)(a2 + 16), 0LL, 0LL, a4);
*(_DWORD *)(result + 84) = a3;
*(_DWORD *)(result + 80) = 59;
*(_QWORD *)(result + 152) = a2;
return result;
}
| ggml_argsort:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EAX,0x80000000
CMP qword ptr [RSI + 0x10],RAX
JGE 0x0011e900
MOV EBP,EDX
MOV RBX,RSI
LEA RCX,[RSI + 0x10]
MOV ESI,0x1a
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
MOV dword ptr [RAX + 0x54],EBP
MOV dword ptr [RAX + 0x50],0x3b
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0011e900:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14c83e]
MOV ESI,0x10a3
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_argsort(int8 param_1,long param_2,int4 param_3)
{
long lVar1;
if (*(long *)(param_2 + 0x10) < 0x80000000) {
lVar1 = ggml_new_tensor_impl(param_1,0x1a,4,param_2 + 0x10,0,0);
*(int4 *)(lVar1 + 0x54) = param_3;
*(int4 *)(lVar1 + 0x50) = 0x3b;
*(long *)(lVar1 + 0x98) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x10a3,"GGML_ASSERT(%s) failed","a->ne[0] <= INT32_MAX");
}
| |
33,642 | my_casedn_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_tolower_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O0 | c | my_casedn_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x6af08
jmp 0x6af0a
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x50(%rbp), %rcx
movb %al, -0x61(%rbp)
jae 0x6af3b
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x6af44
jmp 0x6af9f
movq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6e3f0
movl -0x44(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
movl %eax, %ecx
movl -0x68(%rbp), %eax
cmpl %ecx, %eax
je 0x6af78
jmp 0x6af9f
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x6af0a
movq -0x18(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| my_casedn_utf16:
push rbp
mov rbp, rsp
sub rsp, 70h
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_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_60], rax
jmp short $+2
loc_6AF08:
jmp short $+2
loc_6AF0A:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_50]
mov [rbp+var_61], al
jnb short loc_6AF3B
mov rax, [rbp+var_38]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_50]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_44], eax
cmp eax, 0
setnle al
mov [rbp+var_61], al
loc_6AF3B:
mov al, [rbp+var_61]
test al, 1
jnz short loc_6AF44
jmp short loc_6AF9F
loc_6AF44:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_30]
call my_tolower_utf16
mov eax, [rbp+var_44]
mov [rbp+var_68], eax
mov rax, [rbp+var_40]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_58]
call rax
mov ecx, eax
mov eax, [rbp+var_68]
cmp eax, ecx
jz short loc_6AF78
jmp short loc_6AF9F
loc_6AF78:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_44]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_6AF0A
loc_6AF9F:
mov rax, [rbp+var_18]
add rsp, 70h
pop rbp
retn
| long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
bool v6; // [rsp+Fh] [rbp-61h]
long long v7; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+18h] [rbp-58h]
unsigned long long v9; // [rsp+20h] [rbp-50h]
int v10; // [rsp+2Ch] [rbp-44h]
unsigned int ( *v11)(long long, _QWORD, long long, long long); // [rsp+30h] [rbp-40h]
long long ( *v12)(long long, _QWORD *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h]
_QWORD v13[2]; // [rsp+40h] [rbp-30h] BYREF
long long v14; // [rsp+50h] [rbp-20h]
long long v15; // [rsp+58h] [rbp-18h]
unsigned long long v16; // [rsp+60h] [rbp-10h]
long long v17; // [rsp+68h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13[1] = a5;
v12 = *(long long ( **)(long long, _QWORD *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = *(unsigned int ( **)(long long, _QWORD, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL);
v9 = a3 + a2;
v8 = a5 + a4;
v7 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v6 = 0;
if ( v16 < v9 )
{
v10 = v12(v17, v13, v16, v9);
v6 = v10 > 0;
}
if ( !v6 )
break;
my_tolower_utf16(v7, v13);
if ( v10 != v11(v17, v13[0], v14, v8) )
break;
v16 += v10;
v14 += v10;
}
return v15;
}
| my_casedn_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
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 + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0016af08
LAB_0016af08:
JMP 0x0016af0a
LAB_0016af0a:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x50]
MOV byte ptr [RBP + -0x61],AL
JNC 0x0016af3b
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x61],AL
LAB_0016af3b:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x0016af44
JMP 0x0016af9f
LAB_0016af44:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x30]
CALL 0x0016e3f0
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x68],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x68]
CMP EAX,ECX
JZ 0x0016af78
JMP 0x0016af9f
LAB_0016af78:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016af0a
LAB_0016af9f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x70
POP RBP
RET
|
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
code *pcVar1;
code *pcVar2;
int8 uVar3;
bool bVar4;
int iVar5;
int local_4c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar3 = *(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 ) {
bVar4 = false;
if (local_18 < param_2 + param_3) {
local_4c = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3);
bVar4 = 0 < local_4c;
}
if (!bVar4) break;
my_tolower_utf16(uVar3,&local_38);
iVar5 = (*pcVar2)(local_10,local_38,local_28,param_4 + param_5);
if (local_4c != iVar5) {
return local_20;
}
local_18 = local_18 + (long)local_4c;
local_28 = local_28 + local_4c;
}
return local_20;
}
| |
33,643 | stbi__resample_row_v_2 | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
// need to generate two samples vertically for every one in input
int i;
STBI_NOTUSED(hs);
for (i=0; i < w; ++i)
out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2);
return out;
} | O1 | c | stbi__resample_row_v_2:
movq %rdi, %rax
testl %ecx, %ecx
jle 0x187c0
movl %ecx, %ecx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
leal (%r8,%r8,2), %r8d
movzbl (%rdx,%rdi), %r9d
addl %r9d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, (%rax,%rdi)
incq %rdi
cmpq %rdi, %rcx
jne 0x1879b
retq
| stbi__resample_row_v_2:
mov rax, rdi
test ecx, ecx
jle short locret_187C0
mov ecx, ecx
xor edi, edi
loc_1879B:
movzx r8d, byte ptr [rsi+rdi]
lea r8d, [r8+r8*2]
movzx r9d, byte ptr [rdx+rdi]
add r8d, r9d
add r8d, 2
shr r8d, 2
mov [rax+rdi], r8b
inc rdi
cmp rcx, rdi
jnz short loc_1879B
locret_187C0:
retn
| long long stbi__resample_row_v_2(long long a1, long long a2, long long a3, int a4)
{
long long result; // rax
long long i; // rdi
result = a1;
if ( a4 > 0 )
{
for ( i = 0LL; i != a4; ++i )
*(_BYTE *)(result + i) = (*(unsigned __int8 *)(a3 + i) + 3 * (unsigned int)*(unsigned __int8 *)(a2 + i) + 2) >> 2;
}
return result;
}
| stbi__resample_row_v_2:
MOV RAX,RDI
TEST ECX,ECX
JLE 0x001187c0
MOV ECX,ECX
XOR EDI,EDI
LAB_0011879b:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
LEA R8D,[R8 + R8*0x2]
MOVZX R9D,byte ptr [RDX + RDI*0x1]
ADD R8D,R9D
ADD R8D,0x2
SHR R8D,0x2
MOV byte ptr [RAX + RDI*0x1],R8B
INC RDI
CMP RCX,RDI
JNZ 0x0011879b
LAB_001187c0:
RET
|
void stbi__resample_row_v_2(long param_1,long param_2,long param_3,uint param_4)
{
ulong uVar1;
if (0 < (int)param_4) {
uVar1 = 0;
do {
*(char *)(param_1 + uVar1) =
(char)((uint)*(byte *)(param_2 + uVar1) + (uint)*(byte *)(param_2 + uVar1) * 2 +
(uint)*(byte *)(param_3 + uVar1) + 2 >> 2);
uVar1 = uVar1 + 1;
} while (param_4 != uVar1);
}
return;
}
| |
33,644 | my_casedn_str_utf8mb4 | eloqsql/strings/ctype-utf8.c | static size_t
my_casedn_str_utf8mb4(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_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4_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);
} | O3 | c | my_casedn_str_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %r14
je 0xd4bca
movq 0x78(%rdi), %r15
movq %rbx, %r12
movq %rbx, %r14
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0xd7e73
testl %eax, %eax
je 0xd4bca
movl %eax, %r13d
movq -0x30(%rbp), %rdi
cmpq (%r15), %rdi
ja 0xd4bab
movq 0x8(%r15), %rax
movq %rdi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xd4bab
movzbl %dil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %edi
movq %rdi, -0x30(%rbp)
movq %r14, %rsi
callq 0xd7f8f
testl %eax, %eax
je 0xd4bca
movl %r13d, %ecx
movl %eax, %eax
addq %rax, %r14
cmpb $0x0, (%r12,%rcx)
leaq (%r12,%rcx), %r12
jne 0xd4b6b
movb $0x0, (%r14)
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_str_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp byte ptr [rsi], 0
mov r14, rsi
jz short loc_D4BCA
mov r15, [rdi+78h]
mov r12, rbx
mov r14, rbx
loc_D4B6B:
lea rdi, [rbp+var_30]
mov rsi, r12
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_D4BCA
mov r13d, eax
mov rdi, [rbp+var_30]
cmp rdi, [r15]
ja short loc_D4BAB
mov rax, [r15+8]
mov rcx, rdi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_D4BAB
movzx ecx, dil
lea rcx, [rcx+rcx*2]
mov edi, [rax+rcx*4+4]
mov [rbp+var_30], rdi
loc_D4BAB:
mov rsi, r14
call my_wc_mb_utf8mb4_no_range
test eax, eax
jz short loc_D4BCA
mov ecx, r13d
mov eax, eax
add r14, rax
cmp byte ptr [r12+rcx], 0
lea r12, [r12+rcx]
jnz short loc_D4B6B
loc_D4BCA:
mov byte ptr [r14], 0
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_casedn_str_utf8mb4(long long a1, _BYTE *a2)
{
long long v2; // rax
_BYTE *v3; // r14
_QWORD *v4; // r15
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned int v7; // r13d
long long v8; // rdi
long long v9; // rax
unsigned int v10; // eax
bool v11; // zf
_QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF
v13[0] = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD **)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_mb_wc_utf8mb4_no_range(v13, v5);
if ( !v6 )
break;
v7 = v6;
v8 = v13[0];
if ( v13[0] <= *v4 )
{
v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8));
if ( v9 )
{
v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0]) + 4);
v13[0] = v8;
}
}
v10 = my_wc_mb_utf8mb4_no_range(v8, v3);
if ( !v10 )
break;
v3 += v10;
v11 = v5[v7] == 0;
v5 += v7;
}
while ( !v11 );
}
*v3 = 0;
return v3 - a2;
}
| my_casedn_str_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV R14,RSI
JZ 0x001d4bca
MOV R15,qword ptr [RDI + 0x78]
MOV R12,RBX
MOV R14,RBX
LAB_001d4b6b:
LEA RDI,[RBP + -0x30]
MOV RSI,R12
CALL 0x001d7e73
TEST EAX,EAX
JZ 0x001d4bca
MOV R13D,EAX
MOV RDI,qword ptr [RBP + -0x30]
CMP RDI,qword ptr [R15]
JA 0x001d4bab
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,RDI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001d4bab
MOVZX ECX,DIL
LEA RCX,[RCX + RCX*0x2]
MOV EDI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RDI
LAB_001d4bab:
MOV RSI,R14
CALL 0x001d7f8f
TEST EAX,EAX
JZ 0x001d4bca
MOV ECX,R13D
MOV EAX,EAX
ADD R14,RAX
CMP byte ptr [R12 + RCX*0x1],0x0
LEA R12,[R12 + RCX*0x1]
JNZ 0x001d4b6b
LAB_001d4bca:
MOV byte ptr [R14],0x0
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_utf8mb4(long param_1,char *param_2)
{
char *pcVar1;
ulong *puVar2;
long lVar3;
uint uVar4;
uint uVar5;
ulong in_RAX;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6);
if (uVar4 == 0) break;
if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0))
{
local_38 = (ulong)*(uint *)(lVar3 + 4 + (local_38 & 0xff) * 0xc);
}
uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7);
if (uVar5 == 0) break;
pcVar7 = pcVar7 + uVar5;
pcVar1 = pcVar6 + uVar4;
pcVar6 = pcVar6 + uVar4;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
| |
33,645 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_string() | monkey531[P]llama/common/json.hpp | token_type scan_string()
{
// reset token_buffer (ignore opening quote)
reset();
// we entered the function by reading an open quote
JSON_ASSERT(current == '\"');
while (true)
{
// get next character
switch (get())
{
// end of file while parsing string
case char_traits<char_type>::eof():
{
error_message = "invalid string: missing closing quote";
return token_type::parse_error;
}
// closing quote
case '\"':
{
return token_type::value_string;
}
// escapes
case '\\':
{
switch (get())
{
// quotation mark
case '\"':
add('\"');
break;
// reverse solidus
case '\\':
add('\\');
break;
// solidus
case '/':
add('/');
break;
// backspace
case 'b':
add('\b');
break;
// form feed
case 'f':
add('\f');
break;
// line feed
case 'n':
add('\n');
break;
// carriage return
case 'r':
add('\r');
break;
// tab
case 't':
add('\t');
break;
// unicode escapes
case 'u':
{
const int codepoint1 = get_codepoint();
int codepoint = codepoint1; // start with codepoint1
if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1))
{
error_message = "invalid string: '\\u' must be followed by 4 hex digits";
return token_type::parse_error;
}
// check if code point is a high surrogate
if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF)
{
// expect next \uxxxx entry
if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u'))
{
const int codepoint2 = get_codepoint();
if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1))
{
error_message = "invalid string: '\\u' must be followed by 4 hex digits";
return token_type::parse_error;
}
// check if codepoint2 is a low surrogate
if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF))
{
// overwrite codepoint
codepoint = static_cast<int>(
// high surrogate occupies the most significant 22 bits
(static_cast<unsigned int>(codepoint1) << 10u)
// low surrogate occupies the least significant 15 bits
+ static_cast<unsigned int>(codepoint2)
// there is still the 0xD800, 0xDC00 and 0x10000 noise
// in the result, so we have to subtract with:
// (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
- 0x35FDC00u);
}
else
{
error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
return token_type::parse_error;
}
}
else
{
error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
return token_type::parse_error;
}
}
else
{
if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF))
{
error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
return token_type::parse_error;
}
}
// result of the above calculation yields a proper codepoint
JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF);
// translate codepoint into bytes
if (codepoint < 0x80)
{
// 1-byte characters: 0xxxxxxx (ASCII)
add(static_cast<char_int_type>(codepoint));
}
else if (codepoint <= 0x7FF)
{
// 2-byte characters: 110xxxxx 10xxxxxx
add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u)));
add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
}
else if (codepoint <= 0xFFFF)
{
// 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u)));
add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));
add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
}
else
{
// 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u)));
add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu)));
add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));
add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
}
break;
}
// other characters after escape
default:
error_message = "invalid string: forbidden character after backslash";
return token_type::parse_error;
}
break;
}
// invalid control characters
case 0x00:
{
error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
return token_type::parse_error;
}
case 0x01:
{
error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
return token_type::parse_error;
}
case 0x02:
{
error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
return token_type::parse_error;
}
case 0x03:
{
error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
return token_type::parse_error;
}
case 0x04:
{
error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
return token_type::parse_error;
}
case 0x05:
{
error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
return token_type::parse_error;
}
case 0x06:
{
error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
return token_type::parse_error;
}
case 0x07:
{
error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
return token_type::parse_error;
}
case 0x08:
{
error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
return token_type::parse_error;
}
case 0x09:
{
error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
return token_type::parse_error;
}
case 0x0A:
{
error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
return token_type::parse_error;
}
case 0x0B:
{
error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
return token_type::parse_error;
}
case 0x0C:
{
error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
return token_type::parse_error;
}
case 0x0D:
{
error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
return token_type::parse_error;
}
case 0x0E:
{
error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
return token_type::parse_error;
}
case 0x0F:
{
error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
return token_type::parse_error;
}
case 0x10:
{
error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
return token_type::parse_error;
}
case 0x11:
{
error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
return token_type::parse_error;
}
case 0x12:
{
error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
return token_type::parse_error;
}
case 0x13:
{
error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
return token_type::parse_error;
}
case 0x14:
{
error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
return token_type::parse_error;
}
case 0x15:
{
error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
return token_type::parse_error;
}
case 0x16:
{
error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
return token_type::parse_error;
}
case 0x17:
{
error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
return token_type::parse_error;
}
case 0x18:
{
error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
return token_type::parse_error;
}
case 0x19:
{
error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
return token_type::parse_error;
}
case 0x1A:
{
error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
return token_type::parse_error;
}
case 0x1B:
{
error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
return token_type::parse_error;
}
case 0x1C:
{
error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
return token_type::parse_error;
}
case 0x1D:
{
error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
return token_type::parse_error;
}
case 0x1E:
{
error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
return token_type::parse_error;
}
case 0x1F:
{
error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F";
return token_type::parse_error;
}
// U+0020..U+007F (except U+0022 (quote) and U+005C (backspace))
case 0x20:
case 0x21:
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2A:
case 0x2B:
case 0x2C:
case 0x2D:
case 0x2E:
case 0x2F:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3A:
case 0x3B:
case 0x3C:
case 0x3D:
case 0x3E:
case 0x3F:
case 0x40:
case 0x41:
case 0x42:
case 0x43:
case 0x44:
case 0x45:
case 0x46:
case 0x47:
case 0x48:
case 0x49:
case 0x4A:
case 0x4B:
case 0x4C:
case 0x4D:
case 0x4E:
case 0x4F:
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x54:
case 0x55:
case 0x56:
case 0x57:
case 0x58:
case 0x59:
case 0x5A:
case 0x5B:
case 0x5D:
case 0x5E:
case 0x5F:
case 0x60:
case 0x61:
case 0x62:
case 0x63:
case 0x64:
case 0x65:
case 0x66:
case 0x67:
case 0x68:
case 0x69:
case 0x6A:
case 0x6B:
case 0x6C:
case 0x6D:
case 0x6E:
case 0x6F:
case 0x70:
case 0x71:
case 0x72:
case 0x73:
case 0x74:
case 0x75:
case 0x76:
case 0x77:
case 0x78:
case 0x79:
case 0x7A:
case 0x7B:
case 0x7C:
case 0x7D:
case 0x7E:
case 0x7F:
{
add(current);
break;
}
// U+0080..U+07FF: bytes C2..DF 80..BF
case 0xC2:
case 0xC3:
case 0xC4:
case 0xC5:
case 0xC6:
case 0xC7:
case 0xC8:
case 0xC9:
case 0xCA:
case 0xCB:
case 0xCC:
case 0xCD:
case 0xCE:
case 0xCF:
case 0xD0:
case 0xD1:
case 0xD2:
case 0xD3:
case 0xD4:
case 0xD5:
case 0xD6:
case 0xD7:
case 0xD8:
case 0xD9:
case 0xDA:
case 0xDB:
case 0xDC:
case 0xDD:
case 0xDE:
case 0xDF:
{
if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF})))
{
return token_type::parse_error;
}
break;
}
// U+0800..U+0FFF: bytes E0 A0..BF 80..BF
case 0xE0:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF
// U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF
case 0xE1:
case 0xE2:
case 0xE3:
case 0xE4:
case 0xE5:
case 0xE6:
case 0xE7:
case 0xE8:
case 0xE9:
case 0xEA:
case 0xEB:
case 0xEC:
case 0xEE:
case 0xEF:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+D000..U+D7FF: bytes ED 80..9F 80..BF
case 0xED:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+10000..U+3FFFF F0 90..BF 80..BF 80..BF
case 0xF0:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF
case 0xF1:
case 0xF2:
case 0xF3:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+100000..U+10FFFF F4 80..8F 80..BF 80..BF
case 0xF4:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// remaining bytes (80..C1 and F5..FF) are ill-formed
default:
{
error_message = "invalid string: ill-formed UTF-8 byte";
return token_type::parse_error;
}
}
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_string():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x406f8
cmpl $0x22, 0x14(%rbx)
jne 0x4014e
leaq 0x50(%rbx), %r14
leaq 0x6be91(%rip), %r12 # 0xabbe8
pushq $0xe
popq %rbp
movq %rbx, %rdi
callq 0x404b6
incl %eax
cmpl $0xf5, %eax
ja 0x40120
movslq (%r12,%rax,4), %rcx
addq %r12, %rcx
movabsq $0xbf00000080, %rax # imm = 0xBF00000080
jmpq *%rcx
movb 0x14(%rbx), %r15b
movsbl %r15b, %esi
movq %r14, %rdi
callq 0x23770
jmp 0x3fd5a
movq %rsp, %rsi
movq %rax, (%rsi)
pushq $0x2
jmp 0x3fe2c
movaps 0x6bd68(%rip), %xmm0 # 0xabb10
movq %rsp, %rsi
movaps %xmm0, (%rsi)
pushq $0x4
jmp 0x3fe2c
movups 0x7363b(%rip), %xmm0 # 0xb33f4
jmp 0x3fe20
movaps 0x6bd3e(%rip), %xmm0 # 0xabb00
jmp 0x3fda8
movq %rbx, %rdi
callq 0x404b6
leaq 0x719a5(%rip), %r13 # 0xb1778
leal -0x6e(%rax), %ecx
cmpl $0x7, %ecx
jbe 0x3fe4e
cmpl $0x22, %eax
je 0x3ff47
cmpl $0x2f, %eax
je 0x3ff57
cmpl $0x66, %eax
je 0x3ff4f
cmpl $0x62, %eax
je 0x3ff5f
cmpl $0x5c, %eax
jne 0x40127
movb $0x5c, %r15b
jmp 0x3fd86
movups 0x735f5(%rip), %xmm0 # 0xb340c
jmp 0x3fe20
movups 0x735bc(%rip), %xmm0 # 0xb33dc
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq %rax, 0x10(%rsi)
pushq $0x6
popq %rdx
movq %rbx, %rdi
callq 0x407fa
testb %al, %al
jne 0x3fd5a
jmp 0x4012b
movaps 0x6bcd7(%rip), %xmm0 # 0xabb20
jmp 0x3fda8
leaq 0x6c16b(%rip), %rax # 0xabfc0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0xa, %r15b
jmp 0x3fd86
movb $0xd, %r15b
jmp 0x3fd86
movq %rbx, %rdi
callq 0x40734
leaq 0x7180a(%rip), %r13 # 0xb1687
cmpl $-0x1, %eax
je 0x40127
movl %eax, %r15d
andl $0xfffffc00, %eax # imm = 0xFFFFFC00
cmpl $0xd800, %eax # imm = 0xD800
jne 0x3ff67
movq %rbx, %rdi
callq 0x404b6
cmpl $0x5c, %eax
jne 0x4013c
movq %rbx, %rdi
callq 0x404b6
cmpl $0x75, %eax
jne 0x4013c
movq %rbx, %rdi
callq 0x40734
cmpl $-0x1, %eax
je 0x40127
movl %eax, %ecx
andl $0xfffffc00, %ecx # imm = 0xFFFFFC00
leaq 0x717e2(%rip), %r13 # 0xb16bd
cmpl $0xdc00, %ecx # imm = 0xDC00
jne 0x40127
shll $0xa, %r15d
addl %eax, %r15d
addl $0xfca02400, %r15d # imm = 0xFCA02400
movl %r15d, %eax
shrl $0x12, %eax
orb $-0x10, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x23770
movl %r15d, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x23770
movl %r15d, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x23770
andb $0x3f, %r15b
orb $-0x80, %r15b
jmp 0x3fd86
movb $0x9, %r15b
jmp 0x3fd86
movb $0x22, %r15b
jmp 0x3fd86
movb $0xc, %r15b
jmp 0x3fd86
movb $0x2f, %r15b
jmp 0x3fd86
movb $0x8, %r15b
jmp 0x3fd86
cmpl $0xdc00, %eax # imm = 0xDC00
je 0x40145
cmpl $0x110000, %r15d # imm = 0x110000
jae 0x4016f
cmpl $0x7f, %r15d
jbe 0x3fd86
cmpl $0x7ff, %r15d # imm = 0x7FF
ja 0x3ff9c
movl %r15d, %eax
shrl $0x6, %eax
orb $-0x40, %al
jmp 0x3ff27
cmpl $0xffff, %r15d # imm = 0xFFFF
ja 0x3fef5
movl %r15d, %eax
shrl $0xc, %eax
orb $-0x20, %al
jmp 0x3ff12
leaq 0x72090(%rip), %r13 # 0xb204d
jmp 0x40127
leaq 0x71f1a(%rip), %r13 # 0xb1ee3
jmp 0x40127
leaq 0x71d58(%rip), %r13 # 0xb1d2d
jmp 0x40127
leaq 0x71b45(%rip), %r13 # 0xb1b26
jmp 0x40127
leaq 0x71d89(%rip), %r13 # 0xb1d76
jmp 0x40127
leaq 0x71b7b(%rip), %r13 # 0xb1b74
jmp 0x40127
leaq 0x71e4c(%rip), %r13 # 0xb1e51
jmp 0x40127
leaq 0x71ff4(%rip), %r13 # 0xb2005
jmp 0x40127
leaq 0x718fc(%rip), %r13 # 0xb1919
jmp 0x40127
leaq 0x71cbb(%rip), %r13 # 0xb1ce4
jmp 0x40127
leaq 0x71e65(%rip), %r13 # 0xb1e9a
jmp 0x40127
leaq 0x7188f(%rip), %r13 # 0xb18d0
jmp 0x40127
leaq 0x7183a(%rip), %r13 # 0xb1887
jmp 0x40127
leaq 0x71a37(%rip), %r13 # 0xb1a90
jmp 0x40127
leaq 0x718fd(%rip), %r13 # 0xb1962
jmp 0x40127
leaq 0x71f03(%rip), %r13 # 0xb1f74
jmp 0x40127
leaq 0x717c1(%rip), %r13 # 0xb183e
jmp 0x40127
leaq 0x715d8(%rip), %r13 # 0xb1661
jmp 0x40127
leaq 0x71bbd(%rip), %r13 # 0xb1c52
jmp 0x40127
leaq 0x71754(%rip), %r13 # 0xb17f5
jmp 0x40127
leaq 0x716ff(%rip), %r13 # 0xb17ac
jmp 0x40127
leaq 0x71be5(%rip), %r13 # 0xb1c9b
jmp 0x40127
leaq 0x71983(%rip), %r13 # 0xb1a42
jmp 0x40127
leaq 0x71fcd(%rip), %r13 # 0xb2095
jmp 0x40127
leaq 0x718da(%rip), %r13 # 0xb19ab
jmp 0x40127
leaq 0x71d2e(%rip), %r13 # 0xb1e08
jmp 0x40127
leaq 0x719fb(%rip), %r13 # 0xb1ade
jmp 0x40127
leaq 0x71ad6(%rip), %r13 # 0xb1bc2
jmp 0x40127
leaq 0x718ff(%rip), %r13 # 0xb19f4
jmp 0x40127
leaq 0x71cc1(%rip), %r13 # 0xb1dbf
jmp 0x40127
leaq 0x71e24(%rip), %r13 # 0xb1f2b
jmp 0x40127
leaq 0x71afa(%rip), %r13 # 0xb1c0a
jmp 0x40127
leaq 0x71ea4(%rip), %r13 # 0xb1fbd
jmp 0x40127
pushq $0x4
popq %rbp
jmp 0x4012b
leaq 0x71fb6(%rip), %r13 # 0xb20dd
movq %r13, 0x70(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7157a(%rip), %r13 # 0xb16bd
jmp 0x40127
leaq 0x715bd(%rip), %r13 # 0xb1709
jmp 0x40127
leaq 0x71287(%rip), %rdi # 0xb13dc
leaq 0x6b202(%rip), %rdx # 0xab35e
leaq 0x714ee(%rip), %rcx # 0xb1651
movl $0x1dd1, %esi # imm = 0x1DD1
xorl %eax, %eax
callq 0x23f60
leaq 0x71266(%rip), %rdi # 0xb13dc
leaq 0x6b1e1(%rip), %rdx # 0xab35e
leaq 0x715c9(%rip), %rcx # 0xb174d
movl $0x1e49, %esi # imm = 0x1E49
jmp 0x40168
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void)
cmp dword ptr [rbx+14h], 22h ; '"'
jnz loc_4014E
lea r14, [rbx+50h]
lea r12, jpt_3FD80
push 0Eh
pop rbp
loc_3FD5A:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax; switch 246 cases
cmp eax, 0F5h
ja def_3FD80; jumptable 000000000003FD80 default case, cases 128-193
movsxd rcx, ds:(jpt_3FD80 - 0ABBE8h)[r12+rax*4]
add rcx, r12
mov rax, 0BF00000080h
jmp rcx; switch jump
loc_3FD82:
mov r15b, [rbx+14h]; jumptable 000000000003FD80 cases 32,33,35-91,93-127
loc_3FD86:
movsx esi, r15b
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_3FD5A
loc_3FD94:
mov rsi, rsp; jumptable 000000000003FD80 cases 194-223
mov [rsi], rax
push 2
jmp loc_3FE2C
loc_3FDA1:
movaps xmm0, cs:xmmword_ABB10; jumptable 000000000003FD80 cases 225-236,238,239
loc_3FDA8:
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
push 4
jmp short loc_3FE2C
loc_3FDB2:
movups xmm0, cs:xmmword_B33F4; jumptable 000000000003FD80 cases 241-243
jmp short loc_3FE20
loc_3FDBB:
movaps xmm0, cs:xmmword_ABB00; jumptable 000000000003FD80 case 237
jmp short loc_3FDA8
loc_3FDC4:
mov rdi, rbx; jumptable 000000000003FD80 case 92
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea r13, aInvalidStringF; "invalid string: forbidden character aft"...
lea ecx, [rax-6Eh]; switch 8 cases
cmp ecx, 7
jbe short loc_3FE4E
def_3FE5C:
cmp eax, 22h ; '"'; jumptable 000000000003FE5C default case
jz loc_3FF47
cmp eax, 2Fh ; '/'
jz loc_3FF57
cmp eax, 66h ; 'f'
jz loc_3FF4F
cmp eax, 62h ; 'b'
jz loc_3FF5F
cmp eax, 5Ch ; '\'
jnz loc_40127; jumptable 000000000003FE5C cases 111-113,115
mov r15b, 5Ch ; '\'
jmp loc_3FD86
loc_3FE10:
movups xmm0, cs:xmmword_B340C; jumptable 000000000003FD80 case 244
jmp short loc_3FE20
loc_3FE19:
movups xmm0, cs:xmmword_B33DC; jumptable 000000000003FD80 case 240
loc_3FE20:
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov [rsi+10h], rax
push 6
loc_3FE2C:
pop rdx
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(std::initializer_list<int>)
test al, al
jnz loc_3FD5A
jmp loc_4012B
loc_3FE42:
movaps xmm0, cs:xmmword_ABB20; jumptable 000000000003FD80 case 224
jmp loc_3FDA8
loc_3FE4E:
lea rax, jpt_3FE5C
movsxd rcx, ds:(jpt_3FE5C - 0ABFC0h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_3FE5E:
mov r15b, 0Ah; jumptable 000000000003FE5C case 110
jmp loc_3FD86
loc_3FE66:
mov r15b, 0Dh; jumptable 000000000003FE5C case 114
jmp loc_3FD86
loc_3FE6E:
mov rdi, rbx; jumptable 000000000003FE5C case 117
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void)
lea r13, aInvalidStringU; "invalid string: '\\u' must be followed "...
cmp eax, 0FFFFFFFFh
jz loc_40127; jumptable 000000000003FE5C cases 111-113,115
mov r15d, eax
and eax, 0FFFFFC00h
cmp eax, 0D800h
jnz loc_3FF67
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 5Ch ; '\'
jnz loc_4013C
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 75h ; 'u'
jnz loc_4013C
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void)
cmp eax, 0FFFFFFFFh
jz loc_40127; jumptable 000000000003FE5C cases 111-113,115
mov ecx, eax
and ecx, 0FFFFFC00h
lea r13, aInvalidStringS; "invalid string: surrogate U+D800..U+DBF"...
cmp ecx, 0DC00h
jnz loc_40127; jumptable 000000000003FE5C cases 111-113,115
shl r15d, 0Ah
add r15d, eax
add r15d, 0FCA02400h
loc_3FEF5:
mov eax, r15d
shr eax, 12h
or al, 0F0h
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov eax, r15d
shr eax, 0Ch
and al, 3Fh
or al, 80h
loc_3FF12:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov eax, r15d
shr eax, 6
and al, 3Fh
or al, 80h
loc_3FF27:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
and r15b, 3Fh
or r15b, 80h
jmp loc_3FD86
loc_3FF3F:
mov r15b, 9; jumptable 000000000003FE5C case 116
jmp loc_3FD86
loc_3FF47:
mov r15b, 22h ; '"'
jmp loc_3FD86
loc_3FF4F:
mov r15b, 0Ch
jmp loc_3FD86
loc_3FF57:
mov r15b, 2Fh ; '/'
jmp loc_3FD86
loc_3FF5F:
mov r15b, 8
jmp loc_3FD86
loc_3FF67:
cmp eax, 0DC00h
jz loc_40145
cmp r15d, 110000h
jnb loc_4016F
cmp r15d, 7Fh
jbe loc_3FD86
cmp r15d, 7FFh
ja short loc_3FF9C
mov eax, r15d
shr eax, 6
or al, 0C0h
jmp short loc_3FF27
loc_3FF9C:
cmp r15d, 0FFFFh
ja loc_3FEF5
mov eax, r15d
shr eax, 0Ch
or al, 0E0h
jmp loc_3FF12
loc_3FFB6:
lea r13, aInvalidStringC; jumptable 000000000003FD80 case 30
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_3FFC2:
lea r13, aInvalidStringC_0; jumptable 000000000003FD80 case 25
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_3FFCE:
lea r13, aInvalidStringC_1; jumptable 000000000003FD80 case 19
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_3FFDA:
lea r13, aInvalidStringC_2; jumptable 000000000003FD80 case 12
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_3FFE6:
lea r13, aInvalidStringC_3; jumptable 000000000003FD80 case 20
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_3FFF2:
lea r13, aInvalidStringC_4; jumptable 000000000003FD80 case 13
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_3FFFE:
lea r13, aInvalidStringC_5; jumptable 000000000003FD80 case 23
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4000A:
lea r13, aInvalidStringC_6; jumptable 000000000003FD80 case 29
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40016:
lea r13, aInvalidStringC_7; jumptable 000000000003FD80 case 5
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40022:
lea r13, aInvalidStringC_8; jumptable 000000000003FD80 case 18
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4002E:
lea r13, aInvalidStringC_9; jumptable 000000000003FD80 case 24
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4003A:
lea r13, aInvalidStringC_10; jumptable 000000000003FD80 case 4
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40046:
lea r13, aInvalidStringC_11; jumptable 000000000003FD80 case 3
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40052:
lea r13, aInvalidStringC_12; jumptable 000000000003FD80 case 10
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4005E:
lea r13, aInvalidStringC_13; jumptable 000000000003FD80 case 6
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4006A:
lea r13, aInvalidStringC_14; jumptable 000000000003FD80 case 27
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40076:
lea r13, aInvalidStringC_15; jumptable 000000000003FD80 case 2
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40082:
lea r13, aInvalidStringM; jumptable 000000000003FD80 case -1
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4008E:
lea r13, aInvalidStringC_16; jumptable 000000000003FD80 case 16
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4009A:
lea r13, aInvalidStringC_17; jumptable 000000000003FD80 case 1
jmp loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400A6:
lea r13, aInvalidStringC_18; jumptable 000000000003FD80 case 0
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400AF:
lea r13, aInvalidStringC_19; jumptable 000000000003FD80 case 17
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400B8:
lea r13, aInvalidStringC_20; jumptable 000000000003FD80 case 9
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400C1:
lea r13, aInvalidStringC_21; jumptable 000000000003FD80 case 31
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400CA:
lea r13, aInvalidStringC_22; jumptable 000000000003FD80 case 7
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400D3:
lea r13, aInvalidStringC_23; jumptable 000000000003FD80 case 22
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400DC:
lea r13, aInvalidStringC_24; jumptable 000000000003FD80 case 11
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400E5:
lea r13, aInvalidStringC_25; jumptable 000000000003FD80 case 14
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400EE:
lea r13, aInvalidStringC_26; jumptable 000000000003FD80 case 8
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_400F7:
lea r13, aInvalidStringC_27; jumptable 000000000003FD80 case 21
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40100:
lea r13, aInvalidStringC_28; jumptable 000000000003FD80 case 26
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40109:
lea r13, aInvalidStringC_29; jumptable 000000000003FD80 case 15
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40112:
lea r13, aInvalidStringC_30; jumptable 000000000003FD80 case 28
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4011B:
push 4; jumptable 000000000003FD80 case 34
pop rbp
jmp short loc_4012B
def_3FD80:
lea r13, aInvalidStringI; jumptable 000000000003FD80 default case, cases 128-193
loc_40127:
mov [rbx+70h], r13; jumptable 000000000003FE5C cases 111-113,115
loc_4012B:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4013C:
lea r13, aInvalidStringS; "invalid string: surrogate U+D800..U+DBF"...
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_40145:
lea r13, aInvalidStringS_0; "invalid string: surrogate U+DC00..U+DFF"...
jmp short loc_40127; jumptable 000000000003FE5C cases 111-113,115
loc_4014E:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurrent; "current == '\\\"'"
mov esi, 1DD1h
loc_40168:
xor eax, eax
call _ggml_abort
loc_4016F:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, a0x00CodepointC; "0x00 <= codepoint && codepoint <= 0x10F"...
mov esi, 1E49h
jmp short loc_40168
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(
long long a1)
{
unsigned int v1; // ebp
long long v2; // rcx
long long v3; // r8
long long v4; // r9
unsigned int v5; // r15d
char byte_in_range; // al
__int128 v7; // xmm0
__int128 v8; // xmm0
int v9; // eax
const char *v10; // r13
unsigned int codepoint; // eax
unsigned int v12; // eax
int v13; // eax
char v14; // al
char v15; // al
_QWORD v17[2]; // [rsp+0h] [rbp-48h] BYREF
long long v18; // [rsp+10h] [rbp-38h]
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset();
if ( *(_DWORD *)(a1 + 20) != 34 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7633LL,
"GGML_ASSERT(%s) failed",
"current == '\\\"'");
while ( 1 )
LABEL_89:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7753LL,
"GGML_ASSERT(%s) failed",
"0x00 <= codepoint && codepoint <= 0x10FFFF");
}
v1 = 14;
while ( 2 )
{
while ( 2 )
{
switch ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) )
{
case 0xFFFFFFFF:
v10 = "invalid string: missing closing quote";
goto LABEL_84;
case 0u:
v10 = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
goto LABEL_84;
case 1u:
v10 = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
goto LABEL_84;
case 2u:
v10 = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
goto LABEL_84;
case 3u:
v10 = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
goto LABEL_84;
case 4u:
v10 = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
goto LABEL_84;
case 5u:
v10 = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
goto LABEL_84;
case 6u:
v10 = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
goto LABEL_84;
case 7u:
v10 = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
goto LABEL_84;
case 8u:
v10 = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
goto LABEL_84;
case 9u:
v10 = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
goto LABEL_84;
case 0xAu:
v10 = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
goto LABEL_84;
case 0xBu:
v10 = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
goto LABEL_84;
case 0xCu:
v10 = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
goto LABEL_84;
case 0xDu:
v10 = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
goto LABEL_84;
case 0xEu:
v10 = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
goto LABEL_84;
case 0xFu:
v10 = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
goto LABEL_84;
case 0x10u:
v10 = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
goto LABEL_84;
case 0x11u:
v10 = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
goto LABEL_84;
case 0x12u:
v10 = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
goto LABEL_84;
case 0x13u:
v10 = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
goto LABEL_84;
case 0x14u:
v10 = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
goto LABEL_84;
case 0x15u:
v10 = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
goto LABEL_84;
case 0x16u:
v10 = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
goto LABEL_84;
case 0x17u:
v10 = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
goto LABEL_84;
case 0x18u:
v10 = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
goto LABEL_84;
case 0x19u:
v10 = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
goto LABEL_84;
case 0x1Au:
v10 = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
goto LABEL_84;
case 0x1Bu:
v10 = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
goto LABEL_84;
case 0x1Cu:
v10 = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
goto LABEL_84;
case 0x1Du:
v10 = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
goto LABEL_84;
case 0x1Eu:
v10 = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
goto LABEL_84;
case 0x1Fu:
v10 = "invalid string: control character U+001F (US) must be escaped to \\u001F";
goto LABEL_84;
case 0x20u:
case 0x21u:
case 0x23u:
case 0x24u:
case 0x25u:
case 0x26u:
case 0x27u:
case 0x28u:
case 0x29u:
case 0x2Au:
case 0x2Bu:
case 0x2Cu:
case 0x2Du:
case 0x2Eu:
case 0x2Fu:
case 0x30u:
case 0x31u:
case 0x32u:
case 0x33u:
case 0x34u:
case 0x35u:
case 0x36u:
case 0x37u:
case 0x38u:
case 0x39u:
case 0x3Au:
case 0x3Bu:
case 0x3Cu:
case 0x3Du:
case 0x3Eu:
case 0x3Fu:
case 0x40u:
case 0x41u:
case 0x42u:
case 0x43u:
case 0x44u:
case 0x45u:
case 0x46u:
case 0x47u:
case 0x48u:
case 0x49u:
case 0x4Au:
case 0x4Bu:
case 0x4Cu:
case 0x4Du:
case 0x4Eu:
case 0x4Fu:
case 0x50u:
case 0x51u:
case 0x52u:
case 0x53u:
case 0x54u:
case 0x55u:
case 0x56u:
case 0x57u:
case 0x58u:
case 0x59u:
case 0x5Au:
case 0x5Bu:
case 0x5Du:
case 0x5Eu:
case 0x5Fu:
case 0x60u:
case 0x61u:
case 0x62u:
case 0x63u:
case 0x64u:
case 0x65u:
case 0x66u:
case 0x67u:
case 0x68u:
case 0x69u:
case 0x6Au:
case 0x6Bu:
case 0x6Cu:
case 0x6Du:
case 0x6Eu:
case 0x6Fu:
case 0x70u:
case 0x71u:
case 0x72u:
case 0x73u:
case 0x74u:
case 0x75u:
case 0x76u:
case 0x77u:
case 0x78u:
case 0x79u:
case 0x7Au:
case 0x7Bu:
case 0x7Cu:
case 0x7Du:
case 0x7Eu:
case 0x7Fu:
LOBYTE(v5) = *(_BYTE *)(a1 + 20);
goto LABEL_5;
case 0x22u:
return 4;
case 0x5Cu:
v9 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v10 = "invalid string: forbidden character after backslash";
break;
case 0xC2u:
case 0xC3u:
case 0xC4u:
case 0xC5u:
case 0xC6u:
case 0xC7u:
case 0xC8u:
case 0xC9u:
case 0xCAu:
case 0xCBu:
case 0xCCu:
case 0xCDu:
case 0xCEu:
case 0xCFu:
case 0xD0u:
case 0xD1u:
case 0xD2u:
case 0xD3u:
case 0xD4u:
case 0xD5u:
case 0xD6u:
case 0xD7u:
case 0xD8u:
case 0xD9u:
case 0xDAu:
case 0xDBu:
case 0xDCu:
case 0xDDu:
case 0xDEu:
case 0xDFu:
byte_in_range = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
a1,
v17,
2LL,
v2,
v3,
v4,
0xBF00000080LL,
v17[1],
v18);
goto LABEL_21;
case 0xE0u:
v7 = xmmword_ABB20;
goto LABEL_8;
case 0xE1u:
case 0xE2u:
case 0xE3u:
case 0xE4u:
case 0xE5u:
case 0xE6u:
case 0xE7u:
case 0xE8u:
case 0xE9u:
case 0xEAu:
case 0xEBu:
case 0xECu:
case 0xEEu:
case 0xEFu:
v7 = xmmword_ABB10;
goto LABEL_8;
case 0xEDu:
v7 = xmmword_ABB00;
LABEL_8:
byte_in_range = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
a1,
v17,
4LL,
v2,
v3,
v4,
v7,
*((_QWORD *)&v7 + 1),
v18);
goto LABEL_21;
case 0xF0u:
v8 = xmmword_B33DC;
goto LABEL_20;
case 0xF1u:
case 0xF2u:
case 0xF3u:
v8 = xmmword_B33F4;
goto LABEL_20;
case 0xF4u:
v8 = xmmword_B340C;
LABEL_20:
byte_in_range = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(
a1,
v17,
6LL,
v2,
v3,
v4,
v8,
*((_QWORD *)&v8 + 1),
0xBF00000080LL);
LABEL_21:
if ( !byte_in_range )
return v1;
continue;
default:
v10 = "invalid string: ill-formed UTF-8 byte";
goto LABEL_84;
}
break;
}
switch ( v9 )
{
case 'n':
LOBYTE(v5) = 10;
goto LABEL_5;
case 'o':
case 'p':
case 'q':
case 's':
goto LABEL_84;
case 'r':
LOBYTE(v5) = 13;
goto LABEL_5;
case 't':
LOBYTE(v5) = 9;
goto LABEL_5;
case 'u':
codepoint = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(a1);
v10 = "invalid string: '\\u' must be followed by 4 hex digits";
if ( codepoint == -1 )
goto LABEL_84;
v5 = codepoint;
v12 = codepoint & 0xFFFFFC00;
if ( v12 != 55296 )
{
if ( v12 == 56320 )
{
v10 = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
goto LABEL_84;
}
if ( v5 >= 0x110000 )
goto LABEL_89;
if ( v5 > 0x7F )
{
if ( v5 <= 0x7FF )
{
v15 = (v5 >> 6) | 0xC0;
goto LABEL_36;
}
if ( v5 <= 0xFFFF )
{
v14 = (v5 >> 12) | 0xE0;
goto LABEL_35;
}
LABEL_34:
std::string::push_back(a1 + 80, (unsigned int)(char)((v5 >> 18) | 0xF0));
v14 = (v5 >> 12) & 0x3F | 0x80;
LABEL_35:
std::string::push_back(a1 + 80, (unsigned int)v14);
v15 = (v5 >> 6) & 0x3F | 0x80;
LABEL_36:
std::string::push_back(a1 + 80, (unsigned int)v15);
LOBYTE(v5) = v5 & 0x3F | 0x80;
}
LABEL_5:
std::string::push_back(a1 + 80, (unsigned int)(char)v5);
continue;
}
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 92
&& (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 117 )
{
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(a1);
if ( v13 == -1 )
goto LABEL_84;
v10 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
if ( (v13 & 0xFFFFFC00) != 0xDC00 )
goto LABEL_84;
v5 = v13 + (v5 << 10) - 56613888;
goto LABEL_34;
}
v10 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
LABEL_84:
*(_QWORD *)(a1 + 112) = v10;
return v1;
default:
switch ( v9 )
{
case '"':
LOBYTE(v5) = 34;
break;
case '/':
LOBYTE(v5) = 47;
break;
case 'f':
LOBYTE(v5) = 12;
break;
case 'b':
LOBYTE(v5) = 8;
break;
case '\\':
LOBYTE(v5) = 92;
break;
default:
goto LABEL_84;
}
goto LABEL_5;
}
}
}
| scan_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x001406f8
CMP dword ptr [RBX + 0x14],0x22
JNZ 0x0014014e
LEA R14,[RBX + 0x50]
LEA R12,[0x1abbe8]
PUSH 0xe
POP RBP
LAB_0013fd5a:
MOV RDI,RBX
CALL 0x001404b6
INC EAX
CMP EAX,0xf5
JA 0x00140120
MOVSXD RCX,dword ptr [R12 + RAX*0x4]
ADD RCX,R12
MOV RAX,0xbf00000080
switchD:
JMP RCX
caseD_20:
MOV R15B,byte ptr [RBX + 0x14]
LAB_0013fd86:
MOVSX ESI,R15B
MOV RDI,R14
CALL 0x00123770
JMP 0x0013fd5a
caseD_c2:
MOV RSI,RSP
MOV qword ptr [RSI],RAX
PUSH 0x2
JMP 0x0013fe2c
caseD_e1:
MOVAPS XMM0,xmmword ptr [0x001abb10]
LAB_0013fda8:
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
PUSH 0x4
JMP 0x0013fe2c
caseD_f1:
MOVUPS XMM0,xmmword ptr [0x001b33f4]
JMP 0x0013fe20
caseD_ed:
MOVAPS XMM0,xmmword ptr [0x001abb00]
JMP 0x0013fda8
caseD_5c:
MOV RDI,RBX
CALL 0x001404b6
LEA R13,[0x1b1778]
LEA ECX,[RAX + -0x6e]
CMP ECX,0x7
JBE 0x0013fe4e
default:
CMP EAX,0x22
JZ 0x0013ff47
CMP EAX,0x2f
JZ 0x0013ff57
CMP EAX,0x66
JZ 0x0013ff4f
CMP EAX,0x62
JZ 0x0013ff5f
CMP EAX,0x5c
JNZ 0x00140127
MOV R15B,0x5c
JMP 0x0013fd86
caseD_f4:
MOVUPS XMM0,xmmword ptr [0x001b340c]
JMP 0x0013fe20
caseD_f0:
MOVUPS XMM0,xmmword ptr [0x001b33dc]
LAB_0013fe20:
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],RAX
PUSH 0x6
LAB_0013fe2c:
POP RDX
MOV RDI,RBX
CALL 0x001407fa
TEST AL,AL
JNZ 0x0013fd5a
JMP 0x0014012b
caseD_e0:
MOVAPS XMM0,xmmword ptr [0x001abb20]
JMP 0x0013fda8
LAB_0013fe4e:
LEA RAX,[0x1abfc0]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_6e:
MOV R15B,0xa
JMP 0x0013fd86
caseD_72:
MOV R15B,0xd
JMP 0x0013fd86
caseD_75:
MOV RDI,RBX
CALL 0x00140734
LEA R13,[0x1b1687]
CMP EAX,-0x1
JZ 0x00140127
MOV R15D,EAX
AND EAX,0xfffffc00
CMP EAX,0xd800
JNZ 0x0013ff67
MOV RDI,RBX
CALL 0x001404b6
CMP EAX,0x5c
JNZ 0x0014013c
MOV RDI,RBX
CALL 0x001404b6
CMP EAX,0x75
JNZ 0x0014013c
MOV RDI,RBX
CALL 0x00140734
CMP EAX,-0x1
JZ 0x00140127
MOV ECX,EAX
AND ECX,0xfffffc00
LEA R13,[0x1b16bd]
CMP ECX,0xdc00
JNZ 0x00140127
SHL R15D,0xa
ADD R15D,EAX
ADD R15D,0xfca02400
LAB_0013fef5:
MOV EAX,R15D
SHR EAX,0x12
OR AL,0xf0
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00123770
MOV EAX,R15D
SHR EAX,0xc
AND AL,0x3f
OR AL,0x80
LAB_0013ff12:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00123770
MOV EAX,R15D
SHR EAX,0x6
AND AL,0x3f
OR AL,0x80
LAB_0013ff27:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00123770
AND R15B,0x3f
OR R15B,0x80
JMP 0x0013fd86
caseD_74:
MOV R15B,0x9
JMP 0x0013fd86
LAB_0013ff47:
MOV R15B,0x22
JMP 0x0013fd86
LAB_0013ff4f:
MOV R15B,0xc
JMP 0x0013fd86
LAB_0013ff57:
MOV R15B,0x2f
JMP 0x0013fd86
LAB_0013ff5f:
MOV R15B,0x8
JMP 0x0013fd86
LAB_0013ff67:
CMP EAX,0xdc00
JZ 0x00140145
CMP R15D,0x110000
JNC 0x0014016f
CMP R15D,0x7f
JBE 0x0013fd86
CMP R15D,0x7ff
JA 0x0013ff9c
MOV EAX,R15D
SHR EAX,0x6
OR AL,0xc0
JMP 0x0013ff27
LAB_0013ff9c:
CMP R15D,0xffff
JA 0x0013fef5
MOV EAX,R15D
SHR EAX,0xc
OR AL,0xe0
JMP 0x0013ff12
caseD_1e:
LEA R13,[0x1b204d]
JMP 0x00140127
caseD_19:
LEA R13,[0x1b1ee3]
JMP 0x00140127
caseD_13:
LEA R13,[0x1b1d2d]
JMP 0x00140127
caseD_c:
LEA R13,[0x1b1b26]
JMP 0x00140127
caseD_14:
LEA R13,[0x1b1d76]
JMP 0x00140127
caseD_d:
LEA R13,[0x1b1b74]
JMP 0x00140127
caseD_17:
LEA R13,[0x1b1e51]
JMP 0x00140127
caseD_1d:
LEA R13,[0x1b2005]
JMP 0x00140127
caseD_5:
LEA R13,[0x1b1919]
JMP 0x00140127
caseD_12:
LEA R13,[0x1b1ce4]
JMP 0x00140127
caseD_18:
LEA R13,[0x1b1e9a]
JMP 0x00140127
caseD_4:
LEA R13,[0x1b18d0]
JMP 0x00140127
caseD_3:
LEA R13,[0x1b1887]
JMP 0x00140127
caseD_a:
LEA R13,[0x1b1a90]
JMP 0x00140127
caseD_6:
LEA R13,[0x1b1962]
JMP 0x00140127
caseD_1b:
LEA R13,[0x1b1f74]
JMP 0x00140127
caseD_2:
LEA R13,[0x1b183e]
JMP 0x00140127
caseD_ffffffff:
LEA R13,[0x1b1661]
JMP 0x00140127
caseD_10:
LEA R13,[0x1b1c52]
JMP 0x00140127
caseD_1:
LEA R13,[0x1b17f5]
JMP 0x00140127
caseD_0:
LEA R13,[0x1b17ac]
JMP 0x00140127
caseD_11:
LEA R13,[0x1b1c9b]
JMP 0x00140127
caseD_9:
LEA R13,[0x1b1a42]
JMP 0x00140127
caseD_1f:
LEA R13,[0x1b2095]
JMP 0x00140127
caseD_7:
LEA R13,[0x1b19ab]
JMP 0x00140127
caseD_16:
LEA R13,[0x1b1e08]
JMP 0x00140127
caseD_b:
LEA R13,[0x1b1ade]
JMP 0x00140127
caseD_e:
LEA R13,[0x1b1bc2]
JMP 0x00140127
caseD_8:
LEA R13,[0x1b19f4]
JMP 0x00140127
caseD_15:
LEA R13,[0x1b1dbf]
JMP 0x00140127
caseD_1a:
LEA R13,[0x1b1f2b]
JMP 0x00140127
caseD_f:
LEA R13,[0x1b1c0a]
JMP 0x00140127
caseD_1c:
LEA R13,[0x1b1fbd]
JMP 0x00140127
caseD_22:
PUSH 0x4
POP RBP
JMP 0x0014012b
caseD_80:
LEA R13,[0x1b20dd]
caseD_6f:
MOV qword ptr [RBX + 0x70],R13
LAB_0014012b:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014013c:
LEA R13,[0x1b16bd]
JMP 0x00140127
LAB_00140145:
LEA R13,[0x1b1709]
JMP 0x00140127
LAB_0014014e:
LEA RDI,[0x1b13dc]
LEA RDX,[0x1ab35e]
LEA RCX,[0x1b1651]
MOV ESI,0x1dd1
LAB_00140168:
XOR EAX,EAX
CALL 0x00123f60
LAB_0014016f:
LEA RDI,[0x1b13dc]
LEA RDX,[0x1ab35e]
LEA RCX,[0x1b174d]
MOV ESI,0x1e49
JMP 0x00140168
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_string() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_string(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
char cVar1;
int4 uVar2;
int iVar3;
uint uVar4;
int8 uVar5;
char cVar6;
char *pcVar7;
int4 uVar8;
int8 uStack_50;
int8 local_48;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
reset(this);
if (*(int *)(this + 0x14) != 0x22) {
pcVar7 = "current == \'\\\"\'";
uVar5 = 0x1dd1;
LAB_00140168:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5,
"GGML_ASSERT(%s) failed",pcVar7);
}
cVar6 = (char)this + 'P';
LAB_0013fd5a:
uVar2 = get(this);
switch(uVar2) {
case 0:
pcVar7 = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
break;
case 1:
pcVar7 = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
break;
case 2:
pcVar7 = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
break;
case 3:
pcVar7 = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
break;
case 4:
pcVar7 = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
break;
case 5:
pcVar7 = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
break;
case 6:
pcVar7 = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
break;
case 7:
pcVar7 = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
break;
case 8:
pcVar7 = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
break;
case 9:
pcVar7 = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
break;
case 10:
pcVar7 = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
break;
case 0xb:
pcVar7 = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
break;
case 0xc:
pcVar7 = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
break;
case 0xd:
pcVar7 = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
break;
case 0xe:
pcVar7 = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
break;
case 0xf:
pcVar7 = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
break;
case 0x10:
pcVar7 = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
break;
case 0x11:
pcVar7 = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
break;
case 0x12:
pcVar7 = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
break;
case 0x13:
pcVar7 = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
break;
case 0x14:
pcVar7 = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
break;
case 0x15:
pcVar7 = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
break;
case 0x16:
pcVar7 = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
break;
case 0x17:
pcVar7 = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
break;
case 0x18:
pcVar7 = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
break;
case 0x19:
pcVar7 = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
break;
case 0x1a:
pcVar7 = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
break;
case 0x1b:
pcVar7 = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
break;
case 0x1c:
pcVar7 = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
break;
case 0x1d:
pcVar7 = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
break;
case 0x1e:
pcVar7 = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
break;
case 0x1f:
pcVar7 = "invalid string: control character U+001F (US) must be escaped to \\u001F";
break;
case 0x20:
case 0x21:
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2c:
case 0x2d:
case 0x2e:
case 0x2f:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3a:
case 0x3b:
case 0x3c:
case 0x3d:
case 0x3e:
case 0x3f:
case 0x40:
case 0x41:
case 0x42:
case 0x43:
case 0x44:
case 0x45:
case 0x46:
case 0x47:
case 0x48:
case 0x49:
case 0x4a:
case 0x4b:
case 0x4c:
case 0x4d:
case 0x4e:
case 0x4f:
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x54:
case 0x55:
case 0x56:
case 0x57:
case 0x58:
case 0x59:
case 0x5a:
case 0x5b:
case 0x5d:
case 0x5e:
case 0x5f:
case 0x60:
case 0x61:
case 0x62:
case 99:
case 100:
case 0x65:
case 0x66:
case 0x67:
case 0x68:
case 0x69:
case 0x6a:
case 0x6b:
case 0x6c:
case 0x6d:
case 0x6e:
case 0x6f:
case 0x70:
case 0x71:
case 0x72:
case 0x73:
case 0x74:
case 0x75:
case 0x76:
case 0x77:
case 0x78:
case 0x79:
case 0x7a:
case 0x7b:
case 0x7c:
case 0x7d:
case 0x7e:
case 0x7f:
goto LAB_0013fd86;
case 0x22:
return 4;
case 0x5c:
iVar3 = get(this);
pcVar7 = "invalid string: forbidden character after backslash";
switch(iVar3) {
case 0x6e:
break;
case 0x6f:
case 0x70:
case 0x71:
case 0x73:
goto switchD_0013fe5c_caseD_6f;
case 0x72:
break;
case 0x74:
break;
case 0x75:
uVar4 = get_codepoint(this);
pcVar7 = "invalid string: \'\\u\' must be followed by 4 hex digits";
if (uVar4 == 0xffffffff) goto switchD_0013fe5c_caseD_6f;
if ((uVar4 & 0xfffffc00) == 0xd800) {
iVar3 = get(this);
if ((iVar3 != 0x5c) || (iVar3 = get(this), iVar3 != 0x75)) {
pcVar7 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
goto switchD_0013fe5c_caseD_6f;
}
uVar4 = get_codepoint(this);
if ((uVar4 == 0xffffffff) ||
(pcVar7 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF",
(uVar4 & 0xfffffc00) != 0xdc00)) goto switchD_0013fe5c_caseD_6f;
LAB_0013fef5:
std::__cxx11::string::push_back(cVar6);
LAB_0013ff12:
std::__cxx11::string::push_back(cVar6);
}
else {
if ((uVar4 & 0xfffffc00) == 0xdc00) {
pcVar7 = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
goto switchD_0013fe5c_caseD_6f;
}
if (0x10ffff < uVar4) {
pcVar7 = "0x00 <= codepoint && codepoint <= 0x10FFFF";
uVar5 = 0x1e49;
goto LAB_00140168;
}
if (uVar4 < 0x80) break;
if (0x7ff < uVar4) {
if (0xffff < uVar4) goto LAB_0013fef5;
goto LAB_0013ff12;
}
}
std::__cxx11::string::push_back(cVar6);
break;
default:
if ((((iVar3 != 0x22) && (iVar3 != 0x2f)) && (iVar3 != 0x66)) &&
((iVar3 != 0x62 && (iVar3 != 0x5c)))) goto switchD_0013fe5c_caseD_6f;
}
LAB_0013fd86:
std::__cxx11::string::push_back(cVar6);
goto LAB_0013fd5a;
default:
pcVar7 = "invalid string: ill-formed UTF-8 byte";
break;
case 0xc2:
case 0xc3:
case 0xc4:
case 0xc5:
case 0xc6:
case 199:
case 200:
case 0xc9:
case 0xca:
case 0xcb:
case 0xcc:
case 0xcd:
case 0xce:
case 0xcf:
case 0xd0:
case 0xd1:
case 0xd2:
case 0xd3:
case 0xd4:
case 0xd5:
case 0xd6:
case 0xd7:
case 0xd8:
case 0xd9:
case 0xda:
case 0xdb:
case 0xdc:
case 0xdd:
case 0xde:
case 0xdf:
local_48 = 0xbf00000080;
uStack_50 = 2;
goto LAB_0013fe2c;
case 0xe0:
uVar2 = _DAT_001abb20;
uVar8 = _UNK_001abb24;
uStack_40 = _UNK_001abb28;
uStack_3c = _UNK_001abb2c;
goto LAB_0013fda8;
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xee:
case 0xef:
uVar2 = _DAT_001abb10;
uVar8 = _UNK_001abb14;
uStack_40 = _UNK_001abb18;
uStack_3c = _UNK_001abb1c;
goto LAB_0013fda8;
case 0xed:
uVar2 = _DAT_001abb00;
uVar8 = _UNK_001abb04;
uStack_40 = _UNK_001abb08;
uStack_3c = _UNK_001abb0c;
LAB_0013fda8:
local_48 = CONCAT44(uVar8,uVar2);
uStack_50 = 4;
LAB_0013fe2c:
cVar1 = next_byte_in_range(this,&local_48,uStack_50);
if (cVar1 == '\0') {
return 0xe;
}
goto LAB_0013fd5a;
case 0xf0:
uVar2 = _DAT_001b33dc;
uVar8 = _UNK_001b33e0;
uStack_40 = _UNK_001b33e4;
uStack_3c = _UNK_001b33e8;
goto LAB_0013fe20;
case 0xf1:
case 0xf2:
case 0xf3:
uVar2 = _DAT_001b33f4;
uVar8 = _UNK_001b33f8;
uStack_40 = _UNK_001b33fc;
uStack_3c = _UNK_001b3400;
goto LAB_0013fe20;
case 0xf4:
uVar2 = _DAT_001b340c;
uVar8 = _UNK_001b3410;
uStack_40 = _UNK_001b3414;
uStack_3c = _UNK_001b3418;
LAB_0013fe20:
local_48 = CONCAT44(uVar8,uVar2);
local_38 = 0xbf00000080;
uStack_50 = 6;
goto LAB_0013fe2c;
case 0xffffffff:
pcVar7 = "invalid string: missing closing quote";
}
switchD_0013fe5c_caseD_6f:
*(char **)(this + 0x70) = pcVar7;
return 0xe;
}
| |
33,646 | AddSC_boss_archavon() | SylCore-WoTLK/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp | void AddSC_boss_archavon()
{
new boss_archavon();
RegisterSpellScript(spell_archavon_rock_shards);
} | O3 | cpp | AddSC_boss_archavon():
pushq %r14
pushq %rbx
pushq %rax
movl $0x38, %edi
callq 0x10a2258
movq %rax, %rbx
leaq 0xa046bf(%rip), %rsi # 0x113454f
movq %rax, %rdi
callq 0xd8bcae
leaq 0x10c3431(%rip), %rax # 0x17f32d0
movq %rax, (%rbx)
leaq 0x10c34af(%rip), %rax # 0x17f3358
movq %rax, 0x30(%rbx)
movl $0x30, %edi
callq 0x10a2258
movq %rax, %rbx
leaq 0xa04673(%rip), %rsi # 0x1134534
movq %rax, %rdi
callq 0xda494a
leaq 0x10c3708(%rip), %rax # 0x17f35d8
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0x30, %esi
jmp 0x72feed
movq %rax, %r14
movl $0x38, %esi
movq %rbx, %rdi
callq 0x10a22f0
movq %r14, %rdi
callq 0x45c850
nop
| _Z19AddSC_boss_archavonv:
push r14
push rbx
push rax
mov edi, 38h ; '8'; unsigned __int64
call _Znwm; operator new(ulong)
mov rbx, rax
lea rsi, aBossArchavon; "boss_archavon"
mov rdi, rax; this
call _ZN14CreatureScriptC2EPKc; CreatureScript::CreatureScript(char const*)
lea rax, off_17F32D0
mov [rbx], rax
lea rax, off_17F3358
mov [rbx+30h], rax
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov rbx, rax
lea rsi, aSpellArchavonR; "spell_archavon_rock_shards"
mov rdi, rax; this
call _ZN17SpellScriptLoaderC2EPKc; SpellScriptLoader::SpellScriptLoader(char const*)
lea rax, off_17F35D8
mov [rbx], rax
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov esi, 30h ; '0'
jmp short loc_72FEED
mov r14, rax
mov esi, 38h ; '8'; unsigned __int64
loc_72FEED:
mov rdi, rbx; void *
call _ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
| long long ( **AddSC_boss_archavon(void))(SpellScriptLoader *__hidden this)
{
CreatureScript *v0; // rbx
SpellScriptLoader *v1; // rbx
long long ( **result)(SpellScriptLoader *__hidden); // rax
v0 = (CreatureScript *)operator new(0x38uLL);
CreatureScript::CreatureScript(v0, "boss_archavon");
*(_QWORD *)v0 = off_17F32D0;
*((_QWORD *)v0 + 6) = &off_17F3358;
v1 = (SpellScriptLoader *)operator new(0x30uLL);
SpellScriptLoader::SpellScriptLoader(v1, "spell_archavon_rock_shards");
result = off_17F35D8;
*(_QWORD *)v1 = off_17F35D8;
return result;
}
| UpdateAI:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0072a9ee
MOV RDI,RBX
CALL 0x00a1f646
TEST AL,AL
JZ 0x0072feb7
ADD dword ptr [RBX + 0x180],EBP
MOV RAX,qword ptr [RBX + 0x120]
TEST byte ptr [RAX + 0x2781],0x80
JNZ 0x0072feb7
MOV RDI,RBX
CALL 0x0072ae8e
TEST AL,AL
JZ 0x0072fec2
LAB_0072feb7:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0072fec2:
LEA R14,[RBX + 0x180]
MOV RDI,R14
CALL 0x011837a8
DEC EAX
CMP EAX,0x7
JA 0x00730205
LEA RCX,[0x131bc80]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RBX + 0x120]
LEA RAX,[0x137fde0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
MOV RSI,RDI
MOV EDX,0x101db
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00c5010e
MOV ESI,0x2bf20
JMP 0x00730177
caseD_5:
MOVSS XMM0,dword ptr [0x0121b14c]
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
MOV ECX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x00a22f3a
TEST RAX,RAX
JZ 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RCX,[0x137fde0]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP],RCX
MOV RSI,RAX
MOV EDX,0x101d7
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00c5010e
MOV ESI,0x9c40
JMP 0x00730177
caseD_3:
MOV R15,qword ptr [RBX + 0x120]
MOV RDI,R15
MOV ESI,0x18
CALL 0x00b96762
MOV EBP,EAX
MOV RDI,R15
MOV ESI,0x20
CALL 0x00b96762
MOV EAX,EAX
CVTSI2SS XMM0,RAX
MULSS XMM0,dword ptr [0x0121b11c]
DIVSS XMM0,dword ptr [0x0121b034]
CVTTSS2SI RAX,XMM0
CMP EBP,EAX
JNC 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RAX,[0x137fde0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
MOV RSI,RDI
MOV EDX,0x101da
JMP 0x00730165
caseD_4:
MOV RDI,qword ptr [RBX + 0x120]
MOV ESI,0x3b
MOV EDX,0x200000
CALL 0x00b998da
TEST AL,AL
JNZ 0x007301f8
MOVSS XMM0,dword ptr [0x0121b1b4]
MOV RDI,RBX
CALL 0x0072c158
CMP EAX,0x3
JC 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RAX,[0x137fde0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
XOR ESI,ESI
MOV EDX,0x101d6
JMP 0x007301c8
caseD_8:
MOVSS XMM0,dword ptr [0x0121b020]
MOV RDI,RBX
MOV ESI,0x2
XOR EDX,EDX
MOV ECX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x00a22f3a
TEST RAX,RAX
JZ 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RCX,[0x137fde0]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP],RCX
MOV RSI,RAX
MOV EDX,0x101d8
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00c5010e
MOV ESI,0xea60
JMP 0x00730177
caseD_2:
MOV RDI,qword ptr [RBX + 0x120]
MOV ESI,0x3b
MOV EDX,0x200000
CALL 0x00b998da
TEST AL,AL
JNZ 0x007301f8
MOVSS XMM0,dword ptr [0x0121b1b4]
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
MOV ECX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x00a22f3a
TEST RAX,RAX
JZ 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RCX,[0x137fde0]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP],RCX
MOV RSI,RAX
MOV EDX,0x101d3
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00c5010e
MOV ESI,0x1770
MOV EDX,0x1f40
JMP 0x007301df
caseD_6:
MOVSS XMM0,dword ptr [0x0121b194]
MOV RDI,RBX
MOV ESI,0x101d9
CALL 0x0072ad78
TEST RAX,RAX
JZ 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RCX,[0x137fde0]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP],RCX
MOV RSI,RAX
MOV EDX,0x101d9
LAB_00730165:
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00c5010e
MOV ESI,0x493e0
LAB_00730177:
MOV RDI,R14
CALL 0x01183756
JMP 0x007301e7
caseD_7:
MOVSS XMM0,dword ptr [0x0121b020]
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
MOV ECX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x00a22f3a
TEST RAX,RAX
JZ 0x007301f8
MOV RDI,qword ptr [RBX + 0x120]
LEA RCX,[0x137fde0]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP],RCX
MOV RSI,RAX
MOV EDX,0x101d5
LAB_007301c8:
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00c5010e
MOV ESI,0x2710
MOV EDX,0x3a98
LAB_007301df:
MOV RDI,R14
CALL 0x01183776
LAB_007301e7:
MOV RDI,R14
MOV ESI,0x5dc
XOR EDX,EDX
CALL 0x01183914
JMP 0x00730205
LAB_007301f8:
MOV ESI,0x1388
MOV RDI,R14
CALL 0x01183756
default:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00a22c66
|
/* npc_toc_retro_paladin::npc_toc_retro_paladinAI::UpdateAI(unsigned int) */
void __thiscall
npc_toc_retro_paladin::npc_toc_retro_paladinAI::UpdateAI(npc_toc_retro_paladinAI *this,uint param_1)
{
EventMap *this_00;
Object *this_01;
char cVar1;
int4 uVar2;
uint uVar3;
uint uVar4;
long lVar5;
int8 uVar6;
int8 uVar7;
long lVar8;
boss_faction_championsAI::UpdateAI((boss_faction_championsAI *)this,param_1);
cVar1 = CreatureAI::UpdateVictim((CreatureAI *)this);
if (((cVar1 == '\0') ||
(*(uint *)(this + 0x180) = *(int *)(this + 0x180) + param_1,
(*(byte *)(*(long *)(this + 0x120) + 0x2781) & 0x80) != 0)) ||
(cVar1 = boss_faction_championsAI::IsCCed((boss_faction_championsAI *)this), cVar1 != '\0')) {
return;
}
this_00 = (EventMap *)(this + 0x180);
uVar2 = EventMap::ExecuteEvent(this_00);
switch(uVar2) {
case 1:
Unit::CastSpell(*(int8 *)(this + 0x120),*(int8 *)(this + 0x120),0x101db,0,0,0,
ObjectGuid::Empty);
uVar7 = 180000;
break;
case 2:
cVar1 = Object::HasFlag(*(Object **)(this + 0x120),0x3b,0x200000);
if ((cVar1 != '\0') || (lVar5 = UnitAI::SelectTarget(DAT_0121b1b4,this,1,0,1,1,0), lVar5 == 0))
goto LAB_007301f8;
Unit::CastSpell(*(int8 *)(this + 0x120),lVar5,0x101d3,0,0,0,ObjectGuid::Empty);
uVar6 = 6000;
uVar7 = 8000;
LAB_007301df:
EventMap::Repeat(this_00,uVar6,uVar7);
goto LAB_007301e7;
case 3:
this_01 = *(Object **)(this + 0x120);
uVar4 = Object::GetUInt32Value(this_01,0x18);
uVar3 = Object::GetUInt32Value(this_01,0x20);
if ((uint)(long)(((float)uVar3 * DAT_0121b11c) / DAT_0121b034) <= uVar4) goto LAB_007301f8;
lVar5 = *(long *)(this + 0x120);
uVar7 = 0x101da;
lVar8 = lVar5;
LAB_00730165:
Unit::CastSpell(lVar8,lVar5,uVar7,0,0,0,ObjectGuid::Empty);
uVar7 = 300000;
break;
case 4:
cVar1 = Object::HasFlag(*(Object **)(this + 0x120),0x3b,0x200000);
if ((cVar1 == '\0') &&
(uVar4 = boss_faction_championsAI::EnemiesInRange
((boss_faction_championsAI *)this,DAT_0121b1b4), 2 < uVar4)) {
uVar7 = *(int8 *)(this + 0x120);
lVar5 = 0;
uVar6 = 0x101d6;
LAB_007301c8:
Unit::CastSpell(uVar7,lVar5,uVar6,0,0,0,ObjectGuid::Empty);
uVar6 = 10000;
uVar7 = 15000;
goto LAB_007301df;
}
goto LAB_007301f8;
case 5:
lVar5 = UnitAI::SelectTarget(DAT_0121b14c,this,1,0,1,1,0);
if (lVar5 == 0) goto LAB_007301f8;
Unit::CastSpell(*(int8 *)(this + 0x120),lVar5,0x101d7,0,0,0,ObjectGuid::Empty);
uVar7 = 40000;
break;
case 6:
lVar5 = boss_faction_championsAI::SelectTarget_MostHPLostFriendlyMissingBuff
((uint)this,DAT_0121b194);
if (lVar5 != 0) {
uVar7 = 0x101d9;
lVar8 = *(long *)(this + 0x120);
goto LAB_00730165;
}
goto LAB_007301f8;
case 7:
lVar5 = UnitAI::SelectTarget(DAT_0121b020,this,1,0,1,1,0);
if (lVar5 != 0) {
uVar7 = *(int8 *)(this + 0x120);
uVar6 = 0x101d5;
goto LAB_007301c8;
}
LAB_007301f8:
EventMap::Repeat(this_00,5000);
goto switchD_0072feea_default;
case 8:
lVar5 = UnitAI::SelectTarget(DAT_0121b020,this,2,0,1,1,0);
if (lVar5 == 0) goto LAB_007301f8;
Unit::CastSpell(*(int8 *)(this + 0x120),lVar5,0x101d8,0,0,0,ObjectGuid::Empty);
uVar7 = 60000;
break;
default:
goto switchD_0072feea_default;
}
EventMap::Repeat(this_00,uVar7);
LAB_007301e7:
EventMap::DelayEventsToMax(this_00,0x5dc,0);
switchD_0072feea_default:
UnitAI::DoMeleeAttackIfReady((UnitAI *)this);
return;
}
| |
33,647 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&) | monkey531[P]llama/common/json.hpp | inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10)
{
// LCOV_EXCL_START
if (n >= 1000000000)
{
pow10 = 1000000000;
return 10;
}
// LCOV_EXCL_STOP
if (n >= 100000000)
{
pow10 = 100000000;
return 9;
}
if (n >= 10000000)
{
pow10 = 10000000;
return 8;
}
if (n >= 1000000)
{
pow10 = 1000000;
return 7;
}
if (n >= 100000)
{
pow10 = 100000;
return 6;
}
if (n >= 10000)
{
pow10 = 10000;
return 5;
}
if (n >= 1000)
{
pow10 = 1000;
return 4;
}
if (n >= 100)
{
pow10 = 100;
return 3;
}
if (n >= 10)
{
pow10 = 10;
return 2;
}
pow10 = 1;
return 1;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&):
cmpl $0x3b9ac9ff, %edi # imm = 0x3B9AC9FF
jbe 0x87fe1
pushq $0xa
popq %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
jmp 0x88069
cmpl $0x5f5e0ff, %edi # imm = 0x5F5E0FF
jbe 0x87ff3
pushq $0x9
popq %rax
movl $0x5f5e100, %ecx # imm = 0x5F5E100
jmp 0x88069
cmpl $0x98967f, %edi # imm = 0x98967F
jbe 0x88005
pushq $0x8
popq %rax
movl $0x989680, %ecx # imm = 0x989680
jmp 0x88069
cmpl $0xf423f, %edi # imm = 0xF423F
jbe 0x88017
pushq $0x7
popq %rax
movl $0xf4240, %ecx # imm = 0xF4240
jmp 0x88069
cmpl $0x1869f, %edi # imm = 0x1869F
jbe 0x88029
pushq $0x6
popq %rax
movl $0x186a0, %ecx # imm = 0x186A0
jmp 0x88069
cmpl $0x270f, %edi # imm = 0x270F
jbe 0x8803b
pushq $0x5
popq %rax
movl $0x2710, %ecx # imm = 0x2710
jmp 0x88069
cmpl $0x3e7, %edi # imm = 0x3E7
jbe 0x8804d
pushq $0x4
popq %rax
movl $0x3e8, %ecx # imm = 0x3E8
jmp 0x88069
cmpl $0x63, %edi
jbe 0x8805a
pushq $0x3
popq %rax
pushq $0x64
popq %rcx
jmp 0x88069
xorl %eax, %eax
cmpl $0xa, %edi
setae %al
leal (%rax,%rax,8), %ecx
incl %ecx
incl %eax
movl %ecx, (%rsi)
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18find_largest_pow10EjRj:
cmp edi, 3B9AC9FFh
jbe short loc_87FE1
push 0Ah
pop rax
mov ecx, 3B9ACA00h
jmp loc_88069
loc_87FE1:
cmp edi, 5F5E0FFh
jbe short loc_87FF3
push 9
pop rax
mov ecx, 5F5E100h
jmp short loc_88069
loc_87FF3:
cmp edi, 98967Fh
jbe short loc_88005
push 8
pop rax
mov ecx, 989680h
jmp short loc_88069
loc_88005:
cmp edi, offset unk_F423F
jbe short loc_88017
push 7
pop rax
mov ecx, offset unk_F4240
jmp short loc_88069
loc_88017:
cmp edi, 1869Fh
jbe short loc_88029
push 6
pop rax
mov ecx, 186A0h
jmp short loc_88069
loc_88029:
cmp edi, 270Fh
jbe short loc_8803B
push 5
pop rax
mov ecx, 2710h
jmp short loc_88069
loc_8803B:
cmp edi, 3E7h
jbe short loc_8804D
push 4
pop rax
mov ecx, 3E8h
jmp short loc_88069
loc_8804D:
cmp edi, 63h ; 'c'
jbe short loc_8805A
push 3
pop rax
push 64h ; 'd'
pop rcx
jmp short loc_88069
loc_8805A:
xor eax, eax
cmp edi, 0Ah
setnb al
lea ecx, [rax+rax*8]
inc ecx
inc eax
loc_88069:
mov [rsi], ecx
retn
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
_DWORD *a2,
unsigned int *a3)
{
long long result; // rax
void *v4; // rcx
BOOL v5; // eax
if ( (unsigned int)this <= 0x3B9AC9FF )
{
if ( (unsigned int)this <= 0x5F5E0FF )
{
if ( (unsigned int)this <= 0x98967F )
{
if ( (unsigned int)this <= (unsigned int)&unk_F423F )
{
if ( (unsigned int)this <= 0x1869F )
{
if ( (unsigned int)this <= 0x270F )
{
if ( (unsigned int)this <= 0x3E7 )
{
if ( (unsigned int)this <= 0x63 )
{
v5 = (unsigned int)this >= 0xA;
LODWORD(v4) = 9 * v5 + 1;
result = (unsigned int)(v5 + 1);
}
else
{
result = 3LL;
LODWORD(v4) = 100;
}
}
else
{
result = 4LL;
LODWORD(v4) = 1000;
}
}
else
{
result = 5LL;
LODWORD(v4) = 10000;
}
}
else
{
result = 6LL;
LODWORD(v4) = 100000;
}
}
else
{
result = 7LL;
v4 = &unk_F4240;
}
}
else
{
result = 8LL;
LODWORD(v4) = 10000000;
}
}
else
{
result = 9LL;
LODWORD(v4) = 100000000;
}
}
else
{
result = 10LL;
LODWORD(v4) = 1000000000;
}
*a2 = (_DWORD)v4;
return result;
}
| find_largest_pow10:
CMP EDI,0x3b9ac9ff
JBE 0x00187fe1
PUSH 0xa
POP RAX
MOV ECX,0x3b9aca00
JMP 0x00188069
LAB_00187fe1:
CMP EDI,0x5f5e0ff
JBE 0x00187ff3
PUSH 0x9
POP RAX
MOV ECX,0x5f5e100
JMP 0x00188069
LAB_00187ff3:
CMP EDI,0x98967f
JBE 0x00188005
PUSH 0x8
POP RAX
MOV ECX,0x989680
JMP 0x00188069
LAB_00188005:
CMP EDI,0xf423f
JBE 0x00188017
PUSH 0x7
POP RAX
MOV ECX,0xf4240
JMP 0x00188069
LAB_00188017:
CMP EDI,0x1869f
JBE 0x00188029
PUSH 0x6
POP RAX
MOV ECX,0x186a0
JMP 0x00188069
LAB_00188029:
CMP EDI,0x270f
JBE 0x0018803b
PUSH 0x5
POP RAX
MOV ECX,0x2710
JMP 0x00188069
LAB_0018803b:
CMP EDI,0x3e7
JBE 0x0018804d
PUSH 0x4
POP RAX
MOV ECX,0x3e8
JMP 0x00188069
LAB_0018804d:
CMP EDI,0x63
JBE 0x0018805a
PUSH 0x3
POP RAX
PUSH 0x64
POP RCX
JMP 0x00188069
LAB_0018805a:
XOR EAX,EAX
CMP EDI,0xa
SETNC AL
LEA ECX,[RAX + RAX*0x8]
INC ECX
INC EAX
LAB_00188069:
MOV dword ptr [RSI],ECX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&) */
char nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(uint param_1,uint *param_2)
{
char cVar1;
uint uVar2;
if (param_1 < 1000000000) {
if (param_1 < 100000000) {
if (param_1 < 10000000) {
if (param_1 < 1000000) {
if (param_1 < 100000) {
if (param_1 < 10000) {
if (param_1 < 1000) {
if (param_1 < 100) {
uVar2 = (uint)(9 < param_1) * 9 + 1;
cVar1 = (9 < param_1) + '\x01';
}
else {
cVar1 = '\x03';
uVar2 = 100;
}
}
else {
cVar1 = '\x04';
uVar2 = 1000;
}
}
else {
cVar1 = '\x05';
uVar2 = 10000;
}
}
else {
cVar1 = '\x06';
uVar2 = 100000;
}
}
else {
cVar1 = '\a';
uVar2 = 1000000;
}
}
else {
cVar1 = '\b';
uVar2 = 10000000;
}
}
else {
cVar1 = '\t';
uVar2 = 100000000;
}
}
else {
cVar1 = '\n';
uVar2 = 1000000000;
}
*param_2 = uVar2;
return cVar1;
}
| |
33,648 | js_math_round | bluesky950520[P]quickjs/quickjs.c | static double js_math_round(double a)
{
JSFloat64Union u;
uint64_t frac_mask, one;
unsigned int e, s;
u.d = a;
e = (u.u64 >> 52) & 0x7ff;
if (e < 1023) {
/* abs(a) < 1 */
if (e == (1023 - 1) && u.u64 != 0xbfe0000000000000) {
/* abs(a) > 0.5 or a = 0.5: return +/-1.0 */
u.u64 = (u.u64 & ((uint64_t)1 << 63)) | ((uint64_t)1023 << 52);
} else {
/* return +/-0.0 */
u.u64 &= (uint64_t)1 << 63;
}
} else if (e < (1023 + 52)) {
s = u.u64 >> 63;
one = (uint64_t)1 << (52 - (e - 1023));
frac_mask = one - 1;
u.u64 += (one >> 1) - s;
u.u64 &= ~frac_mask; /* truncate to an integer */
}
/* otherwise: abs(a) >= 2^52, or NaN, +/-Infinity: no change */
return u.d;
} | O0 | c | js_math_round:
movsd %xmm0, -0x8(%rsp)
movsd -0x8(%rsp), %xmm0
movsd %xmm0, -0x10(%rsp)
movq -0x10(%rsp), %rax
shrq $0x34, %rax
andq $0x7ff, %rax # imm = 0x7FF
movl %eax, -0x24(%rsp)
cmpl $0x3ff, -0x24(%rsp) # imm = 0x3FF
jae 0xd84c3
cmpl $0x3fe, -0x24(%rsp) # imm = 0x3FE
jne 0xd84ad
movabsq $-0x4020000000000000, %rax # imm = 0xBFE0000000000000
cmpq %rax, -0x10(%rsp)
je 0xd84ad
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq -0x10(%rsp), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
orq %rcx, %rax
movq %rax, -0x10(%rsp)
jmp 0xd84c1
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq -0x10(%rsp), %rax
movq %rax, -0x10(%rsp)
jmp 0xd8538
cmpl $0x433, -0x24(%rsp) # imm = 0x433
jae 0xd8536
movq -0x10(%rsp), %rax
shrq $0x3f, %rax
movl %eax, -0x28(%rsp)
movl -0x24(%rsp), %ecx
subl $0x3ff, %ecx # imm = 0x3FF
movl $0x34, %eax
subl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rsp)
movq -0x20(%rsp), %rax
shrq %rax
movl -0x28(%rsp), %ecx
subq %rcx, %rax
addq -0x10(%rsp), %rax
movq %rax, -0x10(%rsp)
movq -0x18(%rsp), %rax
xorq $-0x1, %rax
andq -0x10(%rsp), %rax
movq %rax, -0x10(%rsp)
jmp 0xd8538
movsd -0x10(%rsp), %xmm0
retq
nop
| js_math_round:
movsd [rsp+var_8], xmm0
movsd xmm0, [rsp+var_8]
movsd [rsp+var_10], xmm0
mov rax, [rsp+var_10]
shr rax, 34h
and rax, 7FFh
mov [rsp+var_24], eax
cmp [rsp+var_24], 3FFh
jnb short loc_D84C3
cmp [rsp+var_24], 3FEh
jnz short loc_D84AD
mov rax, 0BFE0000000000000h
cmp [rsp+var_10], rax
jz short loc_D84AD
mov rax, 8000000000000000h
and rax, [rsp+var_10]
mov rcx, 3FF0000000000000h
or rax, rcx
mov [rsp+var_10], rax
jmp short loc_D84C1
loc_D84AD:
mov rax, 8000000000000000h
and rax, [rsp+var_10]
mov [rsp+var_10], rax
loc_D84C1:
jmp short loc_D8538
loc_D84C3:
cmp [rsp+var_24], 433h
jnb short loc_D8536
mov rax, [rsp+var_10]
shr rax, 3Fh
mov [rsp+var_28], eax
mov ecx, [rsp+var_24]
sub ecx, 3FFh
mov eax, 34h ; '4'
sub eax, ecx
mov eax, eax
mov ecx, eax
mov eax, 1
shl rax, cl
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
sub rax, 1
mov [rsp+var_18], rax
mov rax, [rsp+var_20]
shr rax, 1
mov ecx, [rsp+var_28]
sub rax, rcx
add rax, [rsp+var_10]
mov [rsp+var_10], rax
mov rax, [rsp+var_18]
xor rax, 0FFFFFFFFFFFFFFFFh
and rax, [rsp+var_10]
mov [rsp+var_10], rax
loc_D8536:
jmp short $+2
loc_D8538:
movsd xmm0, [rsp+var_10]
retn
| double js_math_round(double a1)
{
unsigned int v2; // [rsp+4h] [rbp-24h]
double v3; // [rsp+18h] [rbp-10h]
v3 = a1;
v2 = (*(_QWORD *)&a1 >> 52) & 0x7FF;
if ( v2 >= 0x3FF )
{
if ( v2 < 0x433 )
*(_QWORD *)&v3 = (*(_QWORD *)&a1
+ ((unsigned long long)(1LL << (52 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) + 1))) >> 1)
- (*(_QWORD *)&a1 >> 63)) & ~((1LL << (52 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) + 1))) - 1);
}
else if ( v2 != 1022 || a1 == -0.5 )
{
*(_QWORD *)&v3 = *(_QWORD *)&a1 & 0x8000000000000000LL;
}
else
{
*(_QWORD *)&v3 = *(_QWORD *)&a1 & 0x8000000000000000LL | 0x3FF0000000000000LL;
}
return v3;
}
| js_math_round:
MOVSD qword ptr [RSP + -0x8],XMM0
MOVSD XMM0,qword ptr [RSP + -0x8]
MOVSD qword ptr [RSP + -0x10],XMM0
MOV RAX,qword ptr [RSP + -0x10]
SHR RAX,0x34
AND RAX,0x7ff
MOV dword ptr [RSP + -0x24],EAX
CMP dword ptr [RSP + -0x24],0x3ff
JNC 0x001d84c3
CMP dword ptr [RSP + -0x24],0x3fe
JNZ 0x001d84ad
MOV RAX,-0x4020000000000000
CMP qword ptr [RSP + -0x10],RAX
JZ 0x001d84ad
MOV RAX,-0x8000000000000000
AND RAX,qword ptr [RSP + -0x10]
MOV RCX,0x3ff0000000000000
OR RAX,RCX
MOV qword ptr [RSP + -0x10],RAX
JMP 0x001d84c1
LAB_001d84ad:
MOV RAX,-0x8000000000000000
AND RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x10],RAX
LAB_001d84c1:
JMP 0x001d8538
LAB_001d84c3:
CMP dword ptr [RSP + -0x24],0x433
JNC 0x001d8536
MOV RAX,qword ptr [RSP + -0x10]
SHR RAX,0x3f
MOV dword ptr [RSP + -0x28],EAX
MOV ECX,dword ptr [RSP + -0x24]
SUB ECX,0x3ff
MOV EAX,0x34
SUB EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
SUB RAX,0x1
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RSP + -0x20]
SHR RAX,0x1
MOV ECX,dword ptr [RSP + -0x28]
SUB RAX,RCX
ADD RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x10],RAX
MOV RAX,qword ptr [RSP + -0x18]
XOR RAX,-0x1
AND RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x10],RAX
LAB_001d8536:
JMP 0x001d8538
LAB_001d8538:
MOVSD XMM0,qword ptr [RSP + -0x10]
RET
|
ulong js_math_round(ulong param_1)
{
uint uVar1;
uint uVar2;
ulong uVar3;
int8 local_10;
uVar1 = (uint)(param_1 >> 0x20);
uVar2 = uVar1 >> 0x14 & 0x7ff;
if (uVar2 < 0x3ff) {
if ((uVar2 == 0x3fe) && (param_1 != 0xbfe0000000000000)) {
local_10 = param_1 & 0x8000000000000000 | 0x3ff0000000000000;
}
else {
local_10 = param_1 & 0x8000000000000000;
}
}
else {
local_10 = param_1;
if (uVar2 < 0x433) {
uVar3 = 1L << (0x34U - ((char)uVar2 + '\x01') & 0x3f);
local_10 = (uVar3 - 1 ^ 0xffffffffffffffff) &
((uVar3 >> 1) - (ulong)(uVar1 >> 0x1f)) + param_1;
}
}
return local_10;
}
| |
33,649 | js_math_round | bluesky950520[P]quickjs/quickjs.c | static double js_math_round(double a)
{
JSFloat64Union u;
uint64_t frac_mask, one;
unsigned int e, s;
u.d = a;
e = (u.u64 >> 52) & 0x7ff;
if (e < 1023) {
/* abs(a) < 1 */
if (e == (1023 - 1) && u.u64 != 0xbfe0000000000000) {
/* abs(a) > 0.5 or a = 0.5: return +/-1.0 */
u.u64 = (u.u64 & ((uint64_t)1 << 63)) | ((uint64_t)1023 << 52);
} else {
/* return +/-0.0 */
u.u64 &= (uint64_t)1 << 63;
}
} else if (e < (1023 + 52)) {
s = u.u64 >> 63;
one = (uint64_t)1 << (52 - (e - 1023));
frac_mask = one - 1;
u.u64 += (one >> 1) - s;
u.u64 &= ~frac_mask; /* truncate to an integer */
}
/* otherwise: abs(a) >= 2^52, or NaN, +/-Infinity: no change */
return u.d;
} | O2 | c | js_math_round:
movq %xmm0, %rax
movq %rax, %rdx
shrq $0x34, %rdx
andl $0x7ff, %edx # imm = 0x7FF
cmpl $0x3fe, %edx # imm = 0x3FE
ja 0x69b5f
setne %dl
movabsq $-0x4020000000000000, %rcx # imm = 0xBFE0000000000000
cmpq %rcx, %rax
sete %sil
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
andq %rax, %rcx
orb %dl, %sil
jne 0x69b59
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
orq %rax, %rcx
movq %rcx, %xmm0
retq
cmpl $0x432, %edx # imm = 0x432
ja 0x69b8f
movq %rax, %rsi
movb $0x33, %cl
subb %dl, %cl
pushq $0x1
popq %rdx
shlq %cl, %rdx
sarq $0x3f, %rsi
movq %rdx, %rcx
shrq %rcx
addq %rax, %rsi
addq %rcx, %rsi
negq %rdx
andq %rsi, %rdx
movq %rdx, %xmm0
retq
| js_math_round:
movq rax, xmm0
mov rdx, rax
shr rdx, 34h
and edx, 7FFh
cmp edx, 3FEh
ja short loc_69B5F
setnz dl
mov rcx, 0BFE0000000000000h
cmp rax, rcx
setz sil
mov rcx, 8000000000000000h
and rcx, rax
or sil, dl
jnz short loc_69B59
mov rax, 3FF0000000000000h
or rcx, rax
loc_69B59:
movq xmm0, rcx
retn
loc_69B5F:
cmp edx, 432h
ja short locret_69B8F
mov rsi, rax
mov cl, 33h ; '3'
sub cl, dl
push 1
pop rdx
shl rdx, cl
sar rsi, 3Fh
mov rcx, rdx
shr rcx, 1
add rsi, rax
add rsi, rcx
neg rdx
and rdx, rsi
movq xmm0, rdx
locret_69B8F:
retn
| double js_math_round(double result)
{
long long v1; // rdx
double v2; // rcx
v1 = (*(_QWORD *)&result >> 52) & 0x7FFLL;
if ( (unsigned int)v1 > 0x3FE )
{
if ( (unsigned int)v1 <= 0x432 )
*(_QWORD *)&result = (((unsigned long long)(1LL << (51 - (unsigned __int8)(*(_QWORD *)&result >> 52))) >> 1)
+ *(_QWORD *)&result
+ (*(long long *)&result >> 63)) & -(1LL << (51 - (unsigned __int8)(*(_QWORD *)&result >> 52)));
}
else
{
*(_QWORD *)&v2 = *(_QWORD *)&result & 0x8000000000000000LL;
if ( (_DWORD)v1 == 1022 && *(_QWORD *)&result != 0xBFE0000000000000LL )
*(_QWORD *)&v2 |= 0x3FF0000000000000uLL;
return v2;
}
return result;
}
| js_math_round:
MOVQ RAX,XMM0
MOV RDX,RAX
SHR RDX,0x34
AND EDX,0x7ff
CMP EDX,0x3fe
JA 0x00169b5f
SETNZ DL
MOV RCX,-0x4020000000000000
CMP RAX,RCX
SETZ SIL
MOV RCX,-0x8000000000000000
AND RCX,RAX
OR SIL,DL
JNZ 0x00169b59
MOV RAX,0x3ff0000000000000
OR RCX,RAX
LAB_00169b59:
MOVQ XMM0,RCX
RET
LAB_00169b5f:
CMP EDX,0x432
JA 0x00169b8f
MOV RSI,RAX
MOV CL,0x33
SUB CL,DL
PUSH 0x1
POP RDX
SHL RDX,CL
SAR RSI,0x3f
MOV RCX,RDX
SHR RCX,0x1
ADD RSI,RAX
ADD RSI,RCX
NEG RDX
AND RDX,RSI
MOVQ XMM0,RDX
LAB_00169b8f:
RET
|
ulong js_math_round(ulong param_1)
{
ulong uVar1;
uint uVar2;
uVar2 = (uint)(param_1 >> 0x34) & 0x7ff;
if (uVar2 < 0x3ff) {
uVar1 = param_1 & 0x8000000000000000;
if (param_1 != 0xbfe0000000000000 && uVar2 == 0x3fe) {
uVar1 = uVar1 | 0x3ff0000000000000;
}
return uVar1;
}
if (uVar2 < 0x433) {
uVar1 = 1L << (0x33U - (char)uVar2 & 0x3f);
param_1 = -uVar1 & ((long)param_1 >> 0x3f) + param_1 + (uVar1 >> 1);
}
return param_1;
}
| |
33,650 | pvio_socket_async_read | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_async_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r= -1;
#ifndef _WIN32
int read_flags= MSG_DONTWAIT;
#endif
struct st_pvio_socket *csock= NULL;
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef _WIN32
r= recv(csock->socket,(void *)buffer, length, read_flags);
#else
/* Windows doesn't support MSG_DONTWAIT, so we need to set
socket to non blocking */
pvio_socket_blocking(pvio, 0, 0);
r= recv(csock->socket, (char *)buffer, (int)length, 0);
#endif
return r;
} | O0 | c | pvio_socket_async_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movl $0x40, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5b8ac
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5b8b6
movq $-0x1, -0x8(%rbp)
jmp 0x5b8e3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x14160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| pvio_socket_async_read:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_2C], 40h ; '@'
mov [rbp+var_38], 0
cmp [rbp+var_10], 0
jz short loc_5B8AC
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_5B8B6
loc_5B8AC:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_5B8E3
loc_5B8B6:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call _recv
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_5B8E3:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_async_read(_QWORD *a1, long long a2, long long a3)
{
if ( a1 && *a1 )
return recv(*(unsigned int *)*a1, a2, a3, 64LL);
else
return -1LL;
}
| pvio_socket_async_read:
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 qword ptr [RBP + -0x28],-0x1
MOV dword ptr [RBP + -0x2c],0x40
MOV qword ptr [RBP + -0x38],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0015b8ac
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0015b8b6
LAB_0015b8ac:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0015b8e3
LAB_0015b8b6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x00114160
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015b8e3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
ssize_t pvio_socket_async_read(long *param_1,void *param_2,size_t param_3)
{
int8 local_10;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_10 = -1;
}
else {
local_10 = recv(*(int *)*param_1,param_2,param_3,0x40);
}
return local_10;
}
| |
33,651 | js_std_file_putByte | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_putByte(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f = js_std_file_get(ctx, this_val);
int c;
if (!f)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &c, argv[0]))
return JS_EXCEPTION;
c = fputc(c, f);
return JS_NewInt32(ctx, c);
} | O0 | c | js_std_file_putByte:
subq $0x68, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x13a80
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x139c0
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x13a3c
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x4(%rsp), %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0x139f3
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x13a3c
movl 0x4(%rsp), %edi
movq 0x8(%rsp), %rsi
callq 0xe420
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x68, %rsp
retq
nopl (%rax,%rax)
| js_std_file_putByte:
sub rsp, 68h
mov [rsp+68h+var_40], rsi
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_48], rdi
mov [rsp+68h+var_4C], ecx
mov [rsp+68h+var_58], r8
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_40]
mov rdx, [rsp+68h+var_38]
call js_std_file_get
mov [rsp+68h+var_60], rax
cmp [rsp+68h+var_60], 0
jnz short loc_139C0
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp short loc_13A3C
loc_139C0:
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+68h+var_64]
call JS_ToInt32
cmp eax, 0
jz short loc_139F3
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp short loc_13A3C
loc_139F3:
mov edi, [rsp+68h+var_64]
mov rsi, [rsp+68h+var_60]
call _fputc
mov [rsp+68h+var_64], eax
mov rcx, [rsp+68h+var_48]
mov eax, [rsp+68h+var_64]
mov [rsp+68h+var_18], rcx
mov [rsp+68h+var_1C], eax
mov eax, [rsp+68h+var_1C]
mov dword ptr [rsp+68h+var_10], eax
mov [rsp+68h+var_8], 0
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov [rsp+68h+var_28], rax
loc_13A3C:
mov rax, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_28]
add rsp, 68h
retn
| long long js_std_file_putByte(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
unsigned int v6; // [rsp+4h] [rbp-64h] BYREF
long long v7; // [rsp+8h] [rbp-60h]
_QWORD *v8; // [rsp+10h] [rbp-58h]
int v9; // [rsp+1Ch] [rbp-4Ch]
long long v10; // [rsp+20h] [rbp-48h]
long long v11; // [rsp+28h] [rbp-40h]
long long v12; // [rsp+30h] [rbp-38h]
long long v13; // [rsp+38h] [rbp-30h]
long long v14; // [rsp+40h] [rbp-28h]
unsigned int v15; // [rsp+4Ch] [rbp-1Ch]
long long v16; // [rsp+50h] [rbp-18h]
long long v17; // [rsp+58h] [rbp-10h]
long long v18; // [rsp+60h] [rbp-8h]
v11 = a2;
v12 = a3;
v10 = a1;
v9 = a4;
v8 = a5;
v7 = js_std_file_get(a1, a2, a3);
if ( v7 )
{
if ( (unsigned int)JS_ToInt32(v10, &v6, *v8, v8[1]) )
{
LODWORD(v13) = 0;
v14 = 6LL;
}
else
{
v6 = fputc(v6, v7);
v16 = v10;
v15 = v6;
LODWORD(v17) = v6;
v18 = 0LL;
v13 = v17;
v14 = 0LL;
}
}
else
{
LODWORD(v13) = 0;
v14 = 6LL;
}
return v13;
}
| js_std_file_putByte:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00113a80
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001139c0
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00113a3c
LAB_001139c0:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x4]
CALL 0x00138f20
CMP EAX,0x0
JZ 0x001139f3
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00113a3c
LAB_001139f3:
MOV EDI,dword ptr [RSP + 0x4]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0010e420
MOV dword ptr [RSP + 0x4],EAX
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x4]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_00113a3c:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16]
js_std_file_putByte(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_64;
FILE *local_60;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
local_60 = (FILE *)js_std_file_get(param_1,param_2,param_3);
if (local_60 == (FILE *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
iVar2 = JS_ToInt32(local_48,&local_64,*local_58,local_58[1]);
if (iVar2 == 0) {
local_30 = fputc(local_64,local_60);
uStack_2c = uStack_c;
local_28 = 0;
}
else {
local_30 = 0;
local_28 = 6;
}
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
33,652 | js_std_file_putByte | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_putByte(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f = js_std_file_get(ctx, this_val);
int c;
if (!f)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &c, argv[0]))
return JS_EXCEPTION;
c = fputc(c, f);
return JS_NewInt32(ctx, c);
} | O1 | c | js_std_file_putByte:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rdi, %r15
callq 0x16588
movl $0x6, %ebx
testq %rax, %rax
je 0x16561
movq %rax, %r14
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
callq 0x279b0
testl %eax, %eax
je 0x16565
xorl %eax, %eax
jmp 0x16579
movl 0x4(%rsp), %edi
movq %r14, %rsi
callq 0xe420
movl %eax, 0x4(%rsp)
movl %eax, %eax
xorl %ebx, %ebx
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_std_file_putByte:
push r15
push r14
push r12
push rbx
push rax
mov r12, r8
mov r15, rdi
call js_std_file_get
mov ebx, 6
test rax, rax
jz short loc_16561
mov r14, rax
mov rdx, [r12]
mov rcx, [r12+8]
lea rsi, [rsp+28h+var_24]
mov rdi, r15
call JS_ToInt32
test eax, eax
jz short loc_16565
loc_16561:
xor eax, eax
jmp short loc_16579
loc_16565:
mov edi, [rsp+28h+var_24]
mov rsi, r14
call _fputc
mov [rsp+28h+var_24], eax
mov eax, eax
xor ebx, ebx
loc_16579:
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_std_file_putByte(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // rax
long long v7; // rax
long long v8; // r14
_DWORD v10[9]; // [rsp+0h] [rbp-24h] BYREF
v10[0] = HIDWORD(v5);
v7 = js_std_file_get(a1);
if ( v7 && (v8 = v7, !(unsigned int)JS_ToInt32(a1, v10, *a5, a5[1])) )
return (unsigned int)fputc(v10[0], v8);
else
return 0LL;
}
| |||
33,653 | js_std_file_putByte | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_putByte(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f = js_std_file_get(ctx, this_val);
int c;
if (!f)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &c, argv[0]))
return JS_EXCEPTION;
c = fputc(c, f);
return JS_NewInt32(ctx, c);
} | O2 | c | js_std_file_putByte:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rdi, %r15
callq 0x113c6
pushq $0x6
popq %rbx
testq %rax, %rax
je 0x11388
movq %rax, %r14
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
callq 0x215d7
testl %eax, %eax
je 0x1138c
xorl %eax, %eax
jmp 0x1139c
movl 0x4(%rsp), %edi
movq %r14, %rsi
callq 0xe430
movl %eax, %eax
xorl %ebx, %ebx
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_std_file_putByte:
push r15
push r14
push r12
push rbx
push rax
mov r12, r8
mov r15, rdi
call js_std_file_get
push 6
pop rbx
test rax, rax
jz short loc_11388
mov r14, rax
mov rdx, [r12]
mov rcx, [r12+8]
lea rsi, [rsp+28h+var_24]
mov rdi, r15
call JS_ToInt32
test eax, eax
jz short loc_1138C
loc_11388:
xor eax, eax
jmp short loc_1139C
loc_1138C:
mov edi, [rsp+28h+var_24]
mov rsi, r14
call _fputc
mov eax, eax
xor ebx, ebx
loc_1139C:
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_std_file_putByte(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // rax
long long v7; // rax
long long v8; // r14
_DWORD v10[9]; // [rsp+0h] [rbp-24h] BYREF
v10[0] = HIDWORD(v5);
v7 = js_std_file_get(a1);
if ( v7 && (v8 = v7, !(unsigned int)JS_ToInt32(a1, v10, *a5, a5[1])) )
return (unsigned int)fputc(v10[0], v8);
else
return 0LL;
}
| js_std_file_putByte:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV R15,RDI
CALL 0x001113c6
PUSH 0x6
POP RBX
TEST RAX,RAX
JZ 0x00111388
MOV R14,RAX
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
LEA RSI,[RSP + 0x4]
MOV RDI,R15
CALL 0x001215d7
TEST EAX,EAX
JZ 0x0011138c
LAB_00111388:
XOR EAX,EAX
JMP 0x0011139c
LAB_0011138c:
MOV EDI,dword ptr [RSP + 0x4]
MOV RSI,R14
CALL 0x0010e430
MOV EAX,EAX
XOR EBX,EBX
LAB_0011139c:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int js_std_file_putByte(int8 param_1)
{
int iVar1;
int8 in_RAX;
FILE *__stream;
int8 *in_R8;
int local_24;
local_24 = (int)((ulong)in_RAX >> 0x20);
__stream = (FILE *)js_std_file_get();
if ((__stream != (FILE *)0x0) &&
(iVar1 = JS_ToInt32(param_1,&local_24,*in_R8,in_R8[1]), iVar1 == 0)) {
iVar1 = fputc(local_24,__stream);
return iVar1;
}
return 0;
}
| |
33,654 | my_thread_end | eloqsql/mysys/my_thr_init.c | void my_thread_end(void)
{
struct st_my_thread_var *tmp;
tmp= my_thread_var;
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n",
tmp, pthread_self(), tmp ? (long) tmp->id : 0L);
#endif
/*
Remove the instrumentation for this thread.
This must be done before trashing st_my_thread_var,
because the LF_HASH depends on it.
*/
PSI_CALL_delete_current_thread();
/*
We need to disable DBUG early for this thread to ensure that the
the mutex calls doesn't enable it again
To this we have to both do DBUG_POP() and also reset THR_KEY_mysys
as the key is used by DBUG.
*/
DBUG_POP();
set_mysys_var(NULL);
if (tmp && tmp->init)
{
#if !defined(DBUG_OFF)
/* tmp->dbug is allocated inside DBUG library */
if (tmp->dbug)
{
free(tmp->dbug);
tmp->dbug=0;
}
#endif
my_thread_destory_thr_mutex(tmp);
/*
Decrement counter for number of running threads. We are using this
in my_thread_global_end() to wait until all threads have called
my_thread_end and thus freed all memory they have allocated in
my_thread_init() and DBUG_xxxx
*/
mysql_mutex_lock(&THR_LOCK_threads);
DBUG_ASSERT(THR_thread_count != 0);
if (--THR_thread_count == 0)
mysql_cond_signal(&THR_COND_threads);
mysql_mutex_unlock(&THR_LOCK_threads);
/* Trash variable so that we can detect false accesses to my_thread_var */
tmp->init= 2;
free(tmp);
}
} | O0 | c | my_thread_end:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x82cc0
movq %rax, -0x8(%rbp)
leaq 0x1b62e8(%rip), %rax # 0x2394a0
movq (%rax), %rax
callq *0x138(%rax)
jmp 0x831c3
xorl %eax, %eax
movl %eax, %edi
callq 0x83170
cmpq $0x0, -0x8(%rbp)
je 0x8324c
movq -0x8(%rbp), %rax
movsbl 0xe8(%rax), %eax
cmpl $0x0, %eax
je 0x8324c
movq -0x8(%rbp), %rdi
callq 0x82ce0
leaq 0x3760b5(%rip), %rdi # 0x3f92a8
leaq 0x56c16(%rip), %rsi # 0xd9e10
movl $0x175, %edx # imm = 0x175
callq 0x83020
jmp 0x83206
leaq 0x375e9b(%rip), %rax # 0x3f90a8
movl (%rax), %eax
addl $-0x1, %eax
leaq 0x375e8f(%rip), %rcx # 0x3f90a8
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x8322c
leaq 0x376111(%rip), %rdi # 0x3f9338
callq 0x83260
leaq 0x376075(%rip), %rdi # 0x3f92a8
callq 0x83110
movq -0x8(%rbp), %rax
movb $0x2, 0xe8(%rax)
movq -0x8(%rbp), %rdi
callq 0x28400
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_end:
push rbp
mov rbp, rsp
sub rsp, 10h
call _my_thread_var
mov [rbp+var_8], rax
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+138h]
jmp short $+2
loc_831C3:
xor eax, eax
mov edi, eax
call set_mysys_var
cmp [rbp+var_8], 0
jz short loc_8324C
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+0E8h]
cmp eax, 0
jz short loc_8324C
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 175h
call inline_mysql_mutex_lock_10
jmp short $+2
loc_83206:
lea rax, THR_thread_count
mov eax, [rax]
add eax, 0FFFFFFFFh
lea rcx, THR_thread_count
mov [rcx], eax
cmp eax, 0
jnz short loc_8322C
lea rdi, THR_COND_threads
call inline_mysql_cond_signal_1
loc_8322C:
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_10
mov rax, [rbp+var_8]
mov byte ptr [rax+0E8h], 2
mov rdi, [rbp+var_8]
call _free
loc_8324C:
add rsp, 10h
pop rbp
retn
| long long my_thread_end(long long a1, const char *a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-8h]
v3 = my_thread_var(a1, a2);
PSI_server[39]();
result = set_mysys_var(0LL);
if ( v3 )
{
result = (unsigned int)*(char *)(v3 + 232);
if ( *(_BYTE *)(v3 + 232) )
{
my_thread_destory_thr_mutex(v3);
inline_mysql_mutex_lock_10(
(long long)&THR_LOCK_threads,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0x175u);
if ( !--THR_thread_count )
inline_mysql_cond_signal_1(&THR_COND_threads);
inline_mysql_mutex_unlock_10((long long)&THR_LOCK_threads);
*(_BYTE *)(v3 + 232) = 2;
return free(v3);
}
}
return result;
}
| my_thread_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
CALL 0x00182cc0
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x3394a0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x138]
JMP 0x001831c3
LAB_001831c3:
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00183170
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0018324c
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0xe8]
CMP EAX,0x0
JZ 0x0018324c
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00182ce0
LEA RDI,[0x4f92a8]
LEA RSI,[0x1d9e10]
MOV EDX,0x175
CALL 0x00183020
JMP 0x00183206
LAB_00183206:
LEA RAX,[0x4f90a8]
MOV EAX,dword ptr [RAX]
ADD EAX,-0x1
LEA RCX,[0x4f90a8]
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JNZ 0x0018322c
LEA RDI,[0x4f9338]
CALL 0x00183260
LAB_0018322c:
LEA RDI,[0x4f92a8]
CALL 0x00183110
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0xe8],0x2
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00128400
LAB_0018324c:
ADD RSP,0x10
POP RBP
RET
|
void my_thread_end(void)
{
void *__ptr;
__ptr = (void *)_my_thread_var();
(**(code **)(PSI_server + 0x138))();
set_mysys_var(0);
if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) {
my_thread_destory_thr_mutex(__ptr);
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0x175
);
THR_thread_count = THR_thread_count + -1;
if (THR_thread_count == 0) {
inline_mysql_cond_signal(THR_COND_threads);
}
inline_mysql_mutex_unlock(THR_LOCK_threads);
*(int1 *)((long)__ptr + 0xe8) = 2;
free(__ptr);
}
return;
}
| |
33,655 | mysql_hex_string | eloqsql/libmariadb/libmariadb/mariadb_lib.c | ulong STDCALL mysql_hex_string(char *to, const char *from, unsigned long len)
{
char *start= to;
char hexdigits[]= "0123456789ABCDEF";
while (len--)
{
*to++= hexdigits[((unsigned char)*from) >> 4];
*to++= hexdigits[((unsigned char)*from) & 0x0F];
from++;
}
*to= 0;
return (ulong)(to - start);
} | O0 | c | mysql_hex_string:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0xeab20(%rip), %rax # 0x171560
movq %rax, -0x20(%rbp)
movq 0xeab1d(%rip), %rax # 0x171568
movq %rax, -0x18(%rbp)
movb 0xeab1b(%rip), %al # 0x171570
movb %al, -0x10(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpq $0x0, %rax
je 0x86abd
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x86a58
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x86aef
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
callq 0x60310
nopw %cs:(%rax,%rax)
| mysql_hex_string:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, cs:qword_171560
mov [rbp+var_20], rax
mov rax, cs:qword_171568
mov [rbp+var_18], rax
mov al, cs:byte_171570
mov [rbp+var_10], al
loc_86A58:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
cmp rax, 0
jz short loc_86ABD
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
sar eax, 4
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 0Fh
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_86A58
loc_86ABD:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_40]
sub rax, rcx
mov [rbp+var_48], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_86AEF
mov rax, [rbp+var_48]
add rsp, 50h
pop rbp
retn
loc_86AEF:
call ___stack_chk_fail
| _BYTE * mysql_hex_string(_BYTE *a1, unsigned __int8 *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v8; // [rsp+28h] [rbp-28h]
char v9[24]; // [rsp+30h] [rbp-20h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
strcpy(v9, "0123456789ABCDEF");
while ( a3-- )
{
*v8 = v9[(int)*a2 >> 4];
v4 = v8 + 1;
v8 += 2;
*v4 = v9[*a2++ & 0xF];
}
*v8 = 0;
return (_BYTE *)(v8 - a1);
}
| mysql_hex_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x00271560]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x00271568]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [0x00271570]
MOV byte ptr [RBP + -0x10],AL
LAB_00186a58:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
CMP RAX,0x0
JZ 0x00186abd
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
SAR EAX,0x4
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xf
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00186a58
LAB_00186abd:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00186aef
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x50
POP RBP
RET
LAB_00186aef:
CALL 0x00160310
|
long mysql_hex_string(char *param_1,byte *param_2,long param_3)
{
char *pcVar1;
long in_FS_OFFSET;
long local_40;
byte *local_38;
char *local_30;
char local_28 [16];
char local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28._0_8_ = s_0123456789ABCDEF_00271560._0_8_;
local_28._8_8_ = s_0123456789ABCDEF_00271560._8_8_;
local_18 = s_0123456789ABCDEF_00271560[0x10];
local_40 = param_3;
local_38 = param_2;
local_30 = param_1;
while (local_40 != 0) {
pcVar1 = local_30 + 1;
*local_30 = local_28[(int)(uint)*local_38 >> 4];
local_30 = local_30 + 2;
*pcVar1 = local_28[(int)(*local_38 & 0xf)];
local_38 = local_38 + 1;
local_40 = local_40 + -1;
}
*local_30 = '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return (long)local_30 - (long)param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,656 | ma_test_if_reopen | eloqsql/storage/maria/ma_open.c | MARIA_HA *_ma_test_if_reopen(const char *filename)
{
LIST *pos;
for (pos=maria_open_list ; pos ; pos=pos->next)
{
MARIA_HA *info=(MARIA_HA*) pos->data;
MARIA_SHARE *share= info->s;
if (!strcmp(share->unique_file_name.str,filename) && share->last_version)
return info;
}
return 0;
} | O0 | c | ma_test_if_reopen:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x3ed3bd(%rip), %rax # 0x477330
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x89fd9
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x5b0(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a640
cmpl $0x0, %eax
jne 0x89fc9
movq -0x28(%rbp), %rax
cmpq $0x0, 0x718(%rax)
je 0x89fc9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x89fe1
jmp 0x89fcb
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x89f7a
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_test_if_reopen:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
lea rax, maria_open_list
mov rax, [rax]
mov [rbp+var_18], rax
loc_89F7A:
cmp [rbp+var_18], 0
jz short loc_89FD9
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rdi, [rax+5B0h]
mov rsi, [rbp+var_10]
call _strcmp
cmp eax, 0
jnz short loc_89FC9
mov rax, [rbp+var_28]
cmp qword ptr [rax+718h], 0
jz short loc_89FC9
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_89FE1
loc_89FC9:
jmp short $+2
loc_89FCB:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp short loc_89F7A
loc_89FD9:
mov [rbp+var_8], 0
loc_89FE1:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long * ma_test_if_reopen(long long a1)
{
long long v2; // [rsp+8h] [rbp-28h]
long long *v3; // [rsp+10h] [rbp-20h]
long long i; // [rsp+18h] [rbp-18h]
for ( i = maria_open_list; i; i = *(_QWORD *)(i + 8) )
{
v3 = *(long long **)(i + 16);
v2 = *v3;
if ( !(unsigned int)strcmp(*(_QWORD *)(*v3 + 1456), a1) && *(_QWORD *)(v2 + 1816) )
return v3;
}
return 0LL;
}
| _ma_test_if_reopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x577330]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_00189f7a:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00189fd9
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x5b0]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012a640
CMP EAX,0x0
JNZ 0x00189fc9
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x718],0x0
JZ 0x00189fc9
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00189fe1
LAB_00189fc9:
JMP 0x00189fcb
LAB_00189fcb:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00189f7a
LAB_00189fd9:
MOV qword ptr [RBP + -0x8],0x0
LAB_00189fe1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long * _ma_test_if_reopen(char *param_1)
{
long *plVar1;
long lVar2;
int iVar3;
long local_20;
local_20 = maria_open_list;
while( true ) {
if (local_20 == 0) {
return (long *)0x0;
}
plVar1 = *(long **)(local_20 + 0x10);
lVar2 = *plVar1;
iVar3 = strcmp(*(char **)(lVar2 + 0x5b0),param_1);
if ((iVar3 == 0) && (*(long *)(lVar2 + 0x718) != 0)) break;
local_20 = *(long *)(local_20 + 8);
}
return plVar1;
}
| |
33,657 | SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _visit_pattern(const std::string & pattern, const std::string & name) {
if (!(pattern.front() == '^' && pattern.back() == '$')) {
_errors.push_back("Pattern must start with '^' and end with '$'");
return "";
}
std::string sub_pattern = pattern.substr(1, pattern.length() - 2);
std::unordered_map<std::string, std::string> sub_rule_ids;
size_t i = 0;
size_t length = sub_pattern.length();
using literal_or_rule = std::pair<std::string, bool>;
auto to_rule = [&](const literal_or_rule & ls) {
auto is_literal = ls.second;
auto s = ls.first;
return is_literal ? "\"" + s + "\"" : s;
};
std::function<literal_or_rule()> transform = [&]() -> literal_or_rule {
size_t start = i;
std::vector<literal_or_rule> seq;
auto get_dot = [&]() {
std::string rule;
if (_dotall) {
rule = "[\\U00000000-\\U0010FFFF]";
} else {
rule = "[^\\x0A\\x0D]";
}
return _add_rule("dot", rule);
};
// Joins the sequence, merging consecutive literals together.
auto join_seq = [&]() {
std::vector<literal_or_rule> ret;
std::string literal;
auto flush_literal = [&]() {
if (literal.empty()) {
return false;
}
ret.emplace_back(literal, true);
literal.clear();
return true;
};
for (const auto & item : seq) {
auto is_literal = item.second;
if (is_literal) {
literal += item.first;
} else {
flush_literal();
ret.push_back(item);
}
}
flush_literal();
std::vector<std::string> results;
for (const auto & item : ret) {
results.push_back(to_rule(item));
}
return std::make_pair(string_join(results, " "), false);
};
while (i < length) {
char c = sub_pattern[i];
if (c == '.') {
seq.emplace_back(get_dot(), false);
i++;
} else if (c == '(') {
i++;
if (i < length) {
if (sub_pattern[i] == '?') {
_warnings.push_back("Unsupported pattern syntax");
}
}
seq.emplace_back("(" + to_rule(transform()) + ")", false);
} else if (c == ')') {
i++;
if (start > 0 && sub_pattern[start - 1] != '(') {
_errors.push_back("Unbalanced parentheses");
}
return join_seq();
} else if (c == '[') {
std::string square_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != ']') {
if (sub_pattern[i] == '\\') {
square_brackets += sub_pattern.substr(i, 2);
i += 2;
} else {
square_brackets += sub_pattern[i];
i++;
}
}
if (i >= length) {
_errors.push_back("Unbalanced square brackets");
}
square_brackets += ']';
i++;
seq.emplace_back(square_brackets, false);
} else if (c == '|') {
seq.emplace_back("|", false);
i++;
} else if (c == '*' || c == '+' || c == '?') {
seq.back() = std::make_pair(to_rule(seq.back()) + c, false);
i++;
} else if (c == '{') {
std::string curly_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != '}') {
curly_brackets += sub_pattern[i];
i++;
}
if (i >= length) {
_errors.push_back("Unbalanced curly brackets");
}
curly_brackets += '}';
i++;
auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ",");
int min_times = 0;
int max_times = std::numeric_limits<int>::max();
try {
if (nums.size() == 1) {
min_times = max_times = std::stoi(nums[0]);
} else if (nums.size() != 2) {
_errors.push_back("Wrong number of values in curly brackets");
} else {
if (!nums[0].empty()) {
min_times = std::stoi(nums[0]);
}
if (!nums[1].empty()) {
max_times = std::stoi(nums[1]);
}
}
} catch (const std::invalid_argument & e) {
_errors.push_back("Invalid number in curly brackets");
return std::make_pair("", false);
}
auto &last = seq.back();
auto &sub = last.first;
auto sub_is_literal = last.second;
if (!sub_is_literal) {
std::string & sub_id = sub_rule_ids[sub];
if (sub_id.empty()) {
sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub);
}
sub = sub_id;
}
seq.back().first = build_repetition(
sub_is_literal ? "\"" + sub + "\"" : sub,
min_times,
max_times,
""
);
seq.back().second = false;
} else {
std::string literal;
auto is_non_literal = [&](char c) {
return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end();
};
while (i < length) {
if (sub_pattern[i] == '\\' && i < length - 1) {
char next = sub_pattern[i + 1];
if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) {
i++;
literal += sub_pattern[i];
i++;
} else {
literal += sub_pattern.substr(i, 2);
i += 2;
}
} else if (sub_pattern[i] == '"') {
literal += "\\\"";
i++;
} else if (!is_non_literal(sub_pattern[i]) &&
(i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) {
literal += sub_pattern[i];
i++;
} else {
break;
}
}
if (!literal.empty()) {
seq.emplace_back(literal, true);
}
}
}
return join_seq();
};
return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space");
} | O2 | cpp | SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rax
cmpb $0x5e, (%rax)
jne 0x912b8
movq %rcx, %r15
movq 0x8(%rdx), %rcx
cmpb $0x24, -0x1(%rax,%rcx)
jne 0x912b8
addq $-0x2, %rcx
leaq 0xe0(%rsp), %r12
pushq $0x1
popq %rax
movq %r12, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x23920
leaq 0x130(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
leaq 0xd8(%rsp), %rcx
andq $0x0, (%rcx)
movups %xmm0, -0x8(%rax)
movq 0x8(%r12), %rax
leaq 0xd0(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %r14, 0x8(%rsi)
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rsi)
movq %rdx, 0x18(%rsi)
movq %r12, 0x20(%rsi)
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsi)
leaq 0x100(%rsp), %rax
movq %rax, 0x30(%rsi)
movq %r15, 0x38(%rsi)
callq 0x93d0a
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x93df0
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x93d52
leaq 0x2691f(%rip), %rsi # 0xb7b45
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x58306
leaq 0x26910(%rip), %rdx # 0xb7b4c
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x37f20
leaq 0x90(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8e070
leaq 0x90(%rsp), %rdi
callq 0x241a8
leaq 0x70(%rsp), %rdi
callq 0x241a8
leaq 0x50(%rsp), %rdi
callq 0x241a8
leaq 0x10(%rsp), %rdi
callq 0x241a8
leaq 0xb0(%rsp), %rdi
callq 0x47852
leaq 0x100(%rsp), %rdi
callq 0x9389c
leaq 0xe0(%rsp), %rdi
callq 0x241a8
jmp 0x91303
leaq 0x26859(%rip), %rsi # 0xb7b18
leaq 0x10(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x27370
addq $0xc8, %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3a754
leaq 0x10(%rsp), %rdi
callq 0x241a8
leaq 0x1d8d0(%rip), %rsi # 0xaebc6
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x27370
movq %rbx, %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x241a8
jmp 0x9132a
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x241a8
jmp 0x91339
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x241a8
jmp 0x91348
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x241a8
jmp 0x91357
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x47852
leaq 0x100(%rsp), %rdi
callq 0x9389c
leaq 0xe0(%rsp), %rdi
jmp 0x91388
movq %rax, %rbx
jmp 0x91364
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x241a8
jmp 0x91392
movq %rax, %rbx
movq %rbx, %rdi
callq 0x23f70
| _ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push r15
push r14
push r12
push rbx
sub rsp, 138h
mov r14, rsi
mov rbx, rdi
mov rax, [rdx]
cmp byte ptr [rax], 5Eh ; '^'
jnz loc_912B8
mov r15, rcx
mov rcx, [rdx+8]
cmp byte ptr [rax+rcx-1], 24h ; '$'
jnz loc_912B8
add rcx, 0FFFFFFFFFFFFFFFEh
lea r12, [rsp+158h+var_78]
push 1
pop rax
mov rdi, r12
mov rsi, rdx
mov rdx, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rax, [rsp+158h+var_28]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
lea rcx, [rsp+158h+var_80]
and qword ptr [rcx], 0
movups xmmword ptr [rax-8], xmm0
mov rax, [r12+8]
lea rdx, [rsp+158h+var_88]
mov [rdx], rax
lea rsi, [rsp+158h+var_148]
mov [rsi], rcx
mov [rsi+8], r14
lea rax, [rsp+158h+var_149]
mov [rsi+10h], rax
mov [rsi+18h], rdx
mov [rsi+20h], r12
lea rdi, [rsp+158h+var_A8]
mov [rsi+28h], rdi
lea rax, [rsp+158h+var_58]
mov [rsi+30h], rax
mov [rsi+38h], r15
call _ZNSt8functionIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEEC2IZN15SchemaConverter14_visit_patternERKS6_SD_EUlvE_vEEOT_; std::function<std::pair<std::string,bool> ()(void)>::function<SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1},void>(SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1} &&)
lea rdi, [rsp+158h+var_148]
lea rsi, [rsp+158h+var_A8]
call _ZNKSt8functionIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEEclEv; std::function<std::pair<std::string,bool> ()(void)>::operator()(void)
lea rdi, [rsp+158h+var_108]
lea rsi, [rsp+158h+var_149]
lea rdx, [rsp+158h+var_148]
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&)
lea rsi, asc_B7B45; "\"\\\"\" ("
lea rdi, [rsp+158h+var_E8]
lea rdx, [rsp+158h+var_108]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, aSpace; ") \"\\\"\" space"
lea rdi, [rsp+158h+var_C8]
lea rsi, [rsp+158h+var_E8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rcx, [rsp+158h+var_C8]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
lea rdi, [rsp+158h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_108]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_A8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+158h+var_58]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+158h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91303
loc_912B8:
lea rsi, aPatternMustSta; "Pattern must start with '^' and end wit"...
lea rdi, [rsp+158h+var_148]
lea rdx, [rsp+158h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add r14, 0C8h
lea rsi, [rsp+158h+var_148]
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rdi, [rsp+158h+var_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aErrorWhileHand_0+34h; ""
lea rdx, [rsp+158h+var_148]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
loc_91303:
mov rax, rbx
add rsp, 138h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9132A
mov rbx, rax
loc_9132A:
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91339
mov rbx, rax
loc_91339:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91348
mov rbx, rax
loc_91348:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91357
mov rbx, rax
loc_91357:
lea rdi, [rsp+arg_A8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_91364:
lea rdi, [rsp+arg_F8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+arg_D8]
jmp short loc_91388
mov rbx, rax
jmp short loc_91364
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
loc_91388:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91392
mov rbx, rax
loc_91392:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * SchemaConverter::_visit_pattern(_QWORD *a1, long long a2, long long a3, _QWORD *a4)
{
long long v5; // rcx
int v6; // ecx
int v7; // r8d
int v8; // r9d
char v10; // [rsp+Fh] [rbp-149h] BYREF
_QWORD v11[8]; // [rsp+10h] [rbp-148h] BYREF
_BYTE v12[32]; // [rsp+50h] [rbp-108h] BYREF
_BYTE v13[32]; // [rsp+70h] [rbp-E8h] BYREF
_QWORD v14[4]; // [rsp+90h] [rbp-C8h] BYREF
_BYTE v15[32]; // [rsp+B0h] [rbp-A8h] BYREF
long long v16; // [rsp+D0h] [rbp-88h] BYREF
long long v17; // [rsp+D8h] [rbp-80h] BYREF
_BYTE v18[8]; // [rsp+E0h] [rbp-78h] BYREF
long long v19; // [rsp+E8h] [rbp-70h]
_QWORD v20[2]; // [rsp+100h] [rbp-58h] BYREF
__int128 v21; // [rsp+110h] [rbp-48h]
int v22; // [rsp+120h] [rbp-38h]
__int128 v23; // [rsp+128h] [rbp-30h] BYREF
if ( **(_BYTE **)a3 == 94 && (v5 = *(_QWORD *)(a3 + 8), *(_BYTE *)(*(_QWORD *)a3 + v5 - 1) == 36) )
{
std::string::substr(v18, a3, 1LL, v5 - 2);
v20[0] = (char *)&v23 + 8;
v20[1] = 1LL;
v21 = 0LL;
v22 = 1065353216;
v17 = 0LL;
v23 = 0LL;
v16 = v19;
v11[0] = &v17;
v11[1] = a2;
v11[2] = &v10;
v11[3] = &v16;
v11[4] = v18;
v11[5] = v15;
v11[6] = v20;
v11[7] = a4;
std::function<std::pair<std::string,bool> ()(void)>::function<SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1},void>(
v15,
v11,
&v16,
&v17);
std::function<std::pair<std::string,bool> ()(void)>::operator()(v11, v15);
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11](
(unsigned int)v12,
(unsigned int)&v10,
(unsigned int)v11,
v6,
v7,
v8);
std::operator+<char>((long long)v13, (long long)"\"\\\"\" (", (long long)v12);
std::operator+<char>((long long)v14, (long long)v13, (long long)") \"\\\"\" space");
SchemaConverter::_add_rule((long long)a1, a2, a4, v14);
std::string::~string(v14);
std::string::~string(v13);
std::string::~string(v12);
std::string::~string(v11);
std::_Function_base::~_Function_base((std::_Function_base *)v15);
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v20);
std::string::~string(v18);
}
else
{
std::string::basic_string<std::allocator<char>>(v11, (long long)"Pattern must start with '^' and end with '$'");
std::vector<std::string>::emplace_back<std::string>(a2 + 200, (long long)v11);
std::string::~string(v11);
std::string::basic_string<std::allocator<char>>(a1, (long long)"");
}
return a1;
}
| _visit_pattern:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDX]
CMP byte ptr [RAX],0x5e
JNZ 0x001912b8
MOV R15,RCX
MOV RCX,qword ptr [RDX + 0x8]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x24
JNZ 0x001912b8
ADD RCX,-0x2
LEA R12,[RSP + 0xe0]
PUSH 0x1
POP RAX
MOV RDI,R12
MOV RSI,RDX
MOV RDX,RAX
CALL 0x00123920
LEA RAX,[RSP + 0x130]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
LEA RCX,[RSP + 0xd8]
AND qword ptr [RCX],0x0
MOVUPS xmmword ptr [RAX + -0x8],XMM0
MOV RAX,qword ptr [R12 + 0x8]
LEA RDX,[RSP + 0xd0]
MOV qword ptr [RDX],RAX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RCX
MOV qword ptr [RSI + 0x8],R14
LEA RAX,[RSP + 0xf]
MOV qword ptr [RSI + 0x10],RAX
MOV qword ptr [RSI + 0x18],RDX
MOV qword ptr [RSI + 0x20],R12
LEA RDI,[RSP + 0xb0]
MOV qword ptr [RSI + 0x28],RDI
LEA RAX,[RSP + 0x100]
MOV qword ptr [RSI + 0x30],RAX
MOV qword ptr [RSI + 0x38],R15
LAB_001911f4:
CALL 0x00193d0a
LAB_001911f9:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0xb0]
CALL 0x00193df0
LAB_0019120b:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x10]
CALL 0x00193d52
LAB_0019121f:
LEA RSI,[0x1b7b45]
LEA RDI,[RSP + 0x70]
LEA RDX,[RSP + 0x50]
CALL 0x00158306
LAB_00191235:
LEA RDX,[0x1b7b4c]
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x70]
CALL 0x00137f20
LAB_0019124e:
LEA RCX,[RSP + 0x90]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0018e070
LEA RDI,[RSP + 0x90]
CALL 0x001241a8
LEA RDI,[RSP + 0x70]
CALL 0x001241a8
LEA RDI,[RSP + 0x50]
CALL 0x001241a8
LEA RDI,[RSP + 0x10]
CALL 0x001241a8
LEA RDI,[RSP + 0xb0]
CALL 0x00147852
LEA RDI,[RSP + 0x100]
CALL 0x0019389c
LEA RDI,[RSP + 0xe0]
CALL 0x001241a8
JMP 0x00191303
LAB_001912b8:
LEA RSI,[0x1b7b18]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x100]
CALL 0x00127370
ADD R14,0xc8
LAB_001912d8:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x0013a754
LAB_001912e5:
LEA RDI,[RSP + 0x10]
CALL 0x001241a8
LEA RSI,[0x1aebc6]
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00127370
LAB_00191303:
MOV RAX,RBX
ADD RSP,0x138
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */
string * SchemaConverter::_visit_pattern(string *param_1,string *param_2)
{
int8 *in_RDX;
int1 local_149;
int8 *local_148;
string *local_140;
int1 *local_138;
int8 *local_130;
string *local_128;
_lambda___1_ *local_120;
int8 **local_118;
string local_108 [32];
string local_e8 [32];
string local_c8 [32];
_lambda___1_ local_a8 [32];
int8 local_88;
int8 local_80;
string local_78 [8];
int8 local_70;
int8 *local_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
int4 local_38;
int8 local_30;
int8 uStack_28;
if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) {
std::__cxx11::string::substr((ulong)local_78,(ulong)in_RDX);
local_58 = &uStack_28;
local_50 = 1;
local_48 = 0;
uStack_40 = 0;
local_38 = 0x3f800000;
local_148 = &local_80;
local_80 = 0;
local_30 = 0;
uStack_28 = 0;
local_130 = &local_88;
local_88 = local_70;
local_138 = &local_149;
local_120 = local_a8;
local_118 = &local_58;
local_140 = param_2;
local_128 = local_78;
/* try { // try from 001911f4 to 001911f8 has its CatchHandler @ 0019137b */
std::function<std::pair<std::__cxx11::string,bool>()>::
function<SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_,void>
(local_120);
/* try { // try from 001911f9 to 0019120a has its CatchHandler @ 00191354 */
std::function<std::pair<std::__cxx11::string,bool>()>::operator()
((function<std::pair<std::__cxx11::string,bool>()> *)&local_148);
/* try { // try from 0019120b to 0019121e has its CatchHandler @ 00191345 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::
{lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const
(local_108,&local_149,&local_148);
/* try { // try from 0019121f to 00191234 has its CatchHandler @ 00191336 */
std::operator+((char *)local_e8,(string *)&DAT_001b7b45);
/* try { // try from 00191235 to 0019124d has its CatchHandler @ 00191327 */
std::operator+(local_c8,(char *)local_e8);
/* try { // try from 0019124e to 00191263 has its CatchHandler @ 00191315 */
_add_rule(param_1,param_2);
std::__cxx11::string::~string(local_c8);
std::__cxx11::string::~string(local_e8);
std::__cxx11::string::~string(local_108);
std::__cxx11::string::~string((string *)&local_148);
std::_Function_base::~_Function_base((_Function_base *)local_a8);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)&local_58);
std::__cxx11::string::~string(local_78);
}
else {
/* try { // try from 001912b8 to 001912d0 has its CatchHandler @ 0019138f */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_148,"Pattern must start with \'^\' and end with \'$\'",
(allocator *)&local_58);
/* try { // try from 001912d8 to 001912e4 has its CatchHandler @ 00191380 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200),
(string *)&local_148);
std::__cxx11::string::~string((string *)&local_148);
std::__cxx11::string::string<std::allocator<char>>(param_1,"",(allocator *)&local_148);
}
return param_1;
}
| |
33,658 | normalize_dirname | eloqsql/mysys/mf_pack.c | size_t normalize_dirname(char *to, const char *from)
{
size_t length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("normalize_dirname");
/*
Despite the name, this actually converts the name to the system's
format (TODO: name this properly).
*/
(void) intern_filename(buff, from);
length= strlen(buff); /* Fix that '/' is last */
if (length &&
#ifdef FN_DEVCHAR
buff[length - 1] != FN_DEVCHAR &&
#endif
buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/')
{
/* we need reserve 2 bytes for the trailing slash and the zero */
if (length >= sizeof (buff) - 1)
length= sizeof (buff) - 2;
buff[length]= FN_LIBCHAR;
buff[length + 1]= '\0';
}
length=cleanup_dirname(to, buff);
DBUG_RETURN(length);
} | O0 | c | normalize_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0x41c60
leaq -0x210(%rbp), %rdi
callq 0x25170
movq %rax, -0x228(%rbp)
cmpq $0x0, -0x228(%rbp)
je 0x422dc
movq -0x228(%rbp), %rax
subq $0x1, %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x2f, %eax
je 0x422dc
movq -0x228(%rbp), %rax
subq $0x1, %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x2f, %eax
je 0x422dc
cmpq $0x200, -0x228(%rbp) # imm = 0x200
jb 0x422be
movq $0x1ff, -0x228(%rbp) # imm = 0x1FF
movq -0x228(%rbp), %rax
movb $0x2f, -0x210(%rbp,%rax)
movq -0x228(%rbp), %rax
movb $0x0, -0x20f(%rbp,%rax)
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x41d50
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x230(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x42326
movq -0x230(%rbp), %rax
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x25410
nopl (%rax,%rax)
| normalize_dirname:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
call intern_filename
lea rdi, [rbp+var_210]
call _strlen
mov [rbp+var_228], rax
cmp [rbp+var_228], 0
jz short loc_422DC
mov rax, [rbp+var_228]
sub rax, 1
movsx eax, [rbp+rax+var_210]
cmp eax, 2Fh ; '/'
jz short loc_422DC
mov rax, [rbp+var_228]
sub rax, 1
movsx eax, [rbp+rax+var_210]
cmp eax, 2Fh ; '/'
jz short loc_422DC
cmp [rbp+var_228], 200h
jb short loc_422BE
mov [rbp+var_228], 1FFh
loc_422BE:
mov rax, [rbp+var_228]
mov [rbp+rax+var_210], 2Fh ; '/'
mov rax, [rbp+var_228]
mov [rbp+rax+var_20F], 0
loc_422DC:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call cleanup_dirname
mov [rbp+var_228], rax
mov rax, [rbp+var_228]
mov [rbp+var_230], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_42326
mov rax, [rbp+var_230]
add rsp, 230h
pop rbp
retn
loc_42326:
call ___stack_chk_fail
| long long normalize_dirname(long long a1, _BYTE *a2)
{
unsigned long long v3; // [rsp+8h] [rbp-228h]
long long v4; // [rsp+18h] [rbp-218h]
_BYTE v5[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v6; // [rsp+228h] [rbp-8h]
v6 = __readfsqword(0x28u);
v4 = a1;
intern_filename((long long)v5, a2);
v3 = strlen(v5);
if ( v3 && v5[v3 - 1] != 47 )
{
if ( v3 >= 0x200 )
v3 = 511LL;
v5[v3] = 47;
v5[v3 + 1] = 0;
}
return cleanup_dirname(v4, v5);
}
| normalize_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
CALL 0x00141c60
LEA RDI,[RBP + -0x210]
CALL 0x00125170
MOV qword ptr [RBP + -0x228],RAX
CMP qword ptr [RBP + -0x228],0x0
JZ 0x001422dc
MOV RAX,qword ptr [RBP + -0x228]
SUB RAX,0x1
MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210]
CMP EAX,0x2f
JZ 0x001422dc
MOV RAX,qword ptr [RBP + -0x228]
SUB RAX,0x1
MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210]
CMP EAX,0x2f
JZ 0x001422dc
CMP qword ptr [RBP + -0x228],0x200
JC 0x001422be
MOV qword ptr [RBP + -0x228],0x1ff
LAB_001422be:
MOV RAX,qword ptr [RBP + -0x228]
MOV byte ptr [RBP + RAX*0x1 + -0x210],0x2f
MOV RAX,qword ptr [RBP + -0x228]
MOV byte ptr [RBP + RAX*0x1 + -0x20f],0x0
LAB_001422dc:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x00141d50
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x228]
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00142326
MOV RAX,qword ptr [RBP + -0x230]
ADD RSP,0x230
POP RBP
RET
LAB_00142326:
CALL 0x00125410
|
int8 normalize_dirname(int8 param_1,int8 param_2)
{
int8 uVar1;
long in_FS_OFFSET;
size_t local_230;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_220 = param_1;
intern_filename(local_218,param_2);
local_230 = strlen(local_218);
if (((local_230 != 0) && (local_218[local_230 - 1] != '/')) && (local_218[local_230 - 1] != '/'))
{
if (0x1ff < local_230) {
local_230 = 0x1ff;
}
local_218[local_230] = '/';
local_218[local_230 + 1] = '\0';
}
uVar1 = cleanup_dirname(local_220,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,659 | ma_open | eloqsql/libmariadb/libmariadb/ma_io.c | MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql)
{
int CodePage= -1;
FILE *fp= NULL;
MA_FILE *ma_file= NULL;
if (!location || !location[0])
return NULL;
#ifdef HAVE_REMOTEIO
if (strstr(location, "://"))
goto remote;
#endif
#ifdef _WIN32
if (mysql && mysql->charset)
CodePage= madb_get_windows_cp(mysql->charset->csname);
#endif
if (CodePage == -1)
{
if (!(fp= fopen(location, mode)))
{
return NULL;
}
}
#ifdef _WIN32
/* See CONC-44: we need to support non ascii filenames too, so we convert
current character set to wchar_t and try to open the file via _wsopen */
else
{
wchar_t *w_filename= NULL;
wchar_t *w_mode= NULL;
int len;
DWORD Length;
len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0);
if (!len)
return NULL;
if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t))))
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return NULL;
}
Length= len;
len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length);
if (!len)
{
/* todo: error handling */
free(w_filename);
return NULL;
}
len= (int)strlen(mode);
if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t))))
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
free(w_filename);
return NULL;
}
Length= len;
len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length);
if (!len)
{
/* todo: error handling */
free(w_filename);
free(w_mode);
return NULL;
}
fp= _wfopen(w_filename, w_mode);
free(w_filename);
free(w_mode);
}
#endif
if (fp)
{
ma_file= (MA_FILE *)malloc(sizeof(MA_FILE));
if (!ma_file)
{
fclose(fp);
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return NULL;
}
ma_file->type= MA_FILE_LOCAL;
ma_file->ptr= (void *)fp;
}
return ma_file;
#ifdef HAVE_REMOTEIO
remote:
/* check if plugin for remote io is available and try
* to open location */
{
MYSQL mysql;
if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *)
mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN)))
return rio_plugin->methods->mopen(location, mode);
return NULL;
}
#endif
} | O0 | c | ma_open:
pushq %rbp
movq %rsp, %rbp
subq $0x540, %rsp # imm = 0x540
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x510(%rbp)
movq %rsi, -0x518(%rbp)
movq %rdx, -0x520(%rbp)
movl $0xffffffff, -0x524(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x530(%rbp)
movq $0x0, -0x538(%rbp)
cmpq $0x0, -0x510(%rbp)
je 0x50c43
movq -0x510(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x50c53
movq $0x0, -0x508(%rbp)
jmp 0x50da4
movq -0x510(%rbp), %rdi
leaq 0x1a231(%rip), %rsi # 0x6ae92
callq 0x14100
cmpq $0x0, %rax
je 0x50c71
jmp 0x50d3d
cmpl $-0x1, -0x524(%rbp)
jne 0x50cac
movq -0x510(%rbp), %rdi
movq -0x518(%rbp), %rsi
callq 0x144e0
movq %rax, -0x530(%rbp)
cmpq $0x0, %rax
jne 0x50caa
movq $0x0, -0x508(%rbp)
jmp 0x50da4
jmp 0x50cac
cmpq $0x0, -0x530(%rbp)
je 0x50d2d
movl $0x10, %edi
callq 0x145c0
movq %rax, -0x538(%rbp)
cmpq $0x0, -0x538(%rbp)
jne 0x50d0e
movq -0x530(%rbp), %rdi
callq 0x14430
movq -0x520(%rbp), %rdi
leaq 0x301b5(%rip), %rax # 0x80ea0
movq (%rax), %rdx
movl $0x7d8, %esi # imm = 0x7D8
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x307d0
movq $0x0, -0x508(%rbp)
jmp 0x50da4
movq -0x538(%rbp), %rax
movl $0x1, (%rax)
movq -0x530(%rbp), %rcx
movq -0x538(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x538(%rbp), %rax
movq %rax, -0x508(%rbp)
jmp 0x50da4
leaq 0x31f8c(%rip), %rax # 0x82cd0
cmpq $0x0, (%rax)
jne 0x50d6f
leaq -0x500(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x64, %edx
callq 0x50a10
leaq 0x31f6a(%rip), %rcx # 0x82cd0
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x50d99
leaq 0x31f5a(%rip), %rax # 0x82cd0
movq (%rax), %rax
movq 0x58(%rax), %rax
movq (%rax), %rax
movq -0x510(%rbp), %rdi
movq -0x518(%rbp), %rsi
callq *%rax
movq %rax, -0x508(%rbp)
jmp 0x50da4
movq $0x0, -0x508(%rbp)
movq -0x508(%rbp), %rax
movq %rax, -0x540(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x50dd4
movq -0x540(%rbp), %rax
addq $0x540, %rsp # imm = 0x540
popq %rbp
retq
callq 0x144c0
nopl (%rax)
| ma_open:
push rbp
mov rbp, rsp
sub rsp, 540h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_510], rdi
mov [rbp+var_518], rsi
mov [rbp+var_520], rdx
mov [rbp+var_524], 0FFFFFFFFh
mov [rbp+var_530], 0
mov [rbp+var_538], 0
cmp [rbp+var_510], 0
jz short loc_50C43
mov rax, [rbp+var_510]
cmp byte ptr [rax], 0
jnz short loc_50C53
loc_50C43:
mov [rbp+var_508], 0
jmp loc_50DA4
loc_50C53:
mov rdi, [rbp+var_510]
lea rsi, asc_6AE92; "://"
call _strstr
cmp rax, 0
jz short loc_50C71
jmp loc_50D3D
loc_50C71:
cmp [rbp+var_524], 0FFFFFFFFh
jnz short loc_50CAC
mov rdi, [rbp+var_510]
mov rsi, [rbp+var_518]
call _fopen64
mov [rbp+var_530], rax
cmp rax, 0
jnz short loc_50CAA
mov [rbp+var_508], 0
jmp loc_50DA4
loc_50CAA:
jmp short $+2
loc_50CAC:
cmp [rbp+var_530], 0
jz short loc_50D2D
mov edi, 10h
call _malloc
mov [rbp+var_538], rax
cmp [rbp+var_538], 0
jnz short loc_50D0E
mov rdi, [rbp+var_530]
call _fclose
mov rdi, [rbp+var_520]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D8h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov [rbp+var_508], 0
jmp loc_50DA4
loc_50D0E:
mov rax, [rbp+var_538]
mov dword ptr [rax], 1
mov rcx, [rbp+var_530]
mov rax, [rbp+var_538]
mov [rax+8], rcx
loc_50D2D:
mov rax, [rbp+var_538]
mov [rbp+var_508], rax
jmp short loc_50DA4
loc_50D3D:
lea rax, rio_plugin
cmp qword ptr [rax], 0
jnz short loc_50D6F
lea rdi, [rbp+var_500]
xor eax, eax
mov esi, eax
mov edx, 64h ; 'd'
call mysql_client_find_plugin
lea rcx, rio_plugin
mov [rcx], rax
cmp rax, 0
jz short loc_50D99
loc_50D6F:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax]
mov rdi, [rbp+var_510]
mov rsi, [rbp+var_518]
call rax
mov [rbp+var_508], rax
jmp short loc_50DA4
loc_50D99:
mov [rbp+var_508], 0
loc_50DA4:
mov rax, [rbp+var_508]
mov [rbp+var_540], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_50DD4
mov rax, [rbp+var_540]
add rsp, 540h
pop rbp
retn
loc_50DD4:
call ___stack_chk_fail
| long long ma_open(_BYTE *a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-538h]
long long v5; // [rsp+10h] [rbp-530h]
_BYTE v8[1272]; // [rsp+40h] [rbp-500h] BYREF
unsigned long long v9; // [rsp+538h] [rbp-8h]
v9 = __readfsqword(0x28u);
if ( !a1 || !*a1 )
return 0LL;
if ( strstr(a1, "://") )
{
if ( rio_plugin )
return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2);
rio_plugin = mysql_client_find_plugin((long long)v8, 0LL, 0x64u);
if ( rio_plugin )
return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2);
else
return 0LL;
}
else
{
v5 = fopen64(a1, a2);
if ( v5 )
{
v4 = malloc(16LL);
if ( v4 )
{
*(_DWORD *)v4 = 1;
*(_QWORD *)(v4 + 8) = v5;
return v4;
}
else
{
fclose(v5);
my_set_error(a3, 0x7D8u, (long long)SQLSTATE_UNKNOWN, 0LL);
return 0LL;
}
}
else
{
return 0LL;
}
}
}
| ma_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x540
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x510],RDI
MOV qword ptr [RBP + -0x518],RSI
MOV qword ptr [RBP + -0x520],RDX
MOV dword ptr [RBP + -0x524],0xffffffff
MOV qword ptr [RBP + -0x530],0x0
MOV qword ptr [RBP + -0x538],0x0
CMP qword ptr [RBP + -0x510],0x0
JZ 0x00150c43
MOV RAX,qword ptr [RBP + -0x510]
CMP byte ptr [RAX],0x0
JNZ 0x00150c53
LAB_00150c43:
MOV qword ptr [RBP + -0x508],0x0
JMP 0x00150da4
LAB_00150c53:
MOV RDI,qword ptr [RBP + -0x510]
LEA RSI,[0x16ae92]
CALL 0x00114100
CMP RAX,0x0
JZ 0x00150c71
JMP 0x00150d3d
LAB_00150c71:
CMP dword ptr [RBP + -0x524],-0x1
JNZ 0x00150cac
MOV RDI,qword ptr [RBP + -0x510]
MOV RSI,qword ptr [RBP + -0x518]
CALL 0x001144e0
MOV qword ptr [RBP + -0x530],RAX
CMP RAX,0x0
JNZ 0x00150caa
MOV qword ptr [RBP + -0x508],0x0
JMP 0x00150da4
LAB_00150caa:
JMP 0x00150cac
LAB_00150cac:
CMP qword ptr [RBP + -0x530],0x0
JZ 0x00150d2d
MOV EDI,0x10
CALL 0x001145c0
MOV qword ptr [RBP + -0x538],RAX
CMP qword ptr [RBP + -0x538],0x0
JNZ 0x00150d0e
MOV RDI,qword ptr [RBP + -0x530]
CALL 0x00114430
MOV RDI,qword ptr [RBP + -0x520]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d8
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x001307d0
MOV qword ptr [RBP + -0x508],0x0
JMP 0x00150da4
LAB_00150d0e:
MOV RAX,qword ptr [RBP + -0x538]
MOV dword ptr [RAX],0x1
MOV RCX,qword ptr [RBP + -0x530]
MOV RAX,qword ptr [RBP + -0x538]
MOV qword ptr [RAX + 0x8],RCX
LAB_00150d2d:
MOV RAX,qword ptr [RBP + -0x538]
MOV qword ptr [RBP + -0x508],RAX
JMP 0x00150da4
LAB_00150d3d:
LEA RAX,[0x182cd0]
CMP qword ptr [RAX],0x0
JNZ 0x00150d6f
LEA RDI,[RBP + -0x500]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x64
CALL 0x00150a10
LEA RCX,[0x182cd0]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x00150d99
LAB_00150d6f:
LEA RAX,[0x182cd0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x510]
MOV RSI,qword ptr [RBP + -0x518]
CALL RAX
MOV qword ptr [RBP + -0x508],RAX
JMP 0x00150da4
LAB_00150d99:
MOV qword ptr [RBP + -0x508],0x0
LAB_00150da4:
MOV RAX,qword ptr [RBP + -0x508]
MOV qword ptr [RBP + -0x540],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00150dd4
MOV RAX,qword ptr [RBP + -0x540]
ADD RSP,0x540
POP RBP
RET
LAB_00150dd4:
CALL 0x001144c0
|
int4 * ma_open(char *param_1,char *param_2,int8 param_3)
{
char *pcVar1;
FILE *__stream;
long in_FS_OFFSET;
int4 *local_540;
int4 *local_510;
int1 local_508 [1272];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_540 = (int4 *)0x0;
if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
local_510 = (int4 *)0x0;
}
else {
pcVar1 = strstr(param_1,"://");
if (pcVar1 == (char *)0x0) {
__stream = fopen64(param_1,param_2);
if (__stream == (FILE *)0x0) {
local_510 = (int4 *)0x0;
}
else {
if (__stream != (FILE *)0x0) {
local_540 = (int4 *)malloc(0x10);
if (local_540 == (int4 *)0x0) {
fclose(__stream);
my_set_error(param_3,0x7d8,SQLSTATE_UNKNOWN,0);
local_510 = (int4 *)0x0;
goto LAB_00150da4;
}
*local_540 = 1;
*(FILE **)(local_540 + 2) = __stream;
}
local_510 = local_540;
}
}
else if ((rio_plugin == 0) &&
(rio_plugin = mysql_client_find_plugin(local_508,0,100), rio_plugin == 0)) {
local_510 = (int4 *)0x0;
}
else {
local_510 = (int4 *)(*(code *)**(int8 **)(rio_plugin + 0x58))(param_1,param_2);
}
}
LAB_00150da4:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_510;
}
| |
33,660 | glfwPlatformSetWindowSizeLimits | untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c | void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
int minwidth, int minheight,
int maxwidth, int maxheight)
{
int width, height;
_glfwPlatformGetWindowSize(window, &width, &height);
updateNormalHints(window, width, height);
XFlush(_glfw.x11.display);
} | O3 | c | glfwPlatformSetWindowSizeLimits:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0x856dc(%rip), %r15 # 0xa8638
movq 0x1fec0(%r15), %rdi
movq 0x348(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0xcf20
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
movq %rbx, %rdi
callq 0x22e55
movq 0x1fec0(%r15), %rdi
callq 0xcce0
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _glfwPlatformSetWindowSizeLimits:
push r15
push r14
push rbx
sub rsp, 90h
mov rbx, rdi
lea r15, _glfw
mov rdi, [r15+1FEC0h]
mov rsi, [rbx+348h]
lea r14, [rsp+0A8h+var_A0]
mov rdx, r14
call _XGetWindowAttributes
mov esi, [r14+8]
mov edx, [r14+0Ch]
mov rdi, rbx
call updateNormalHints
mov rdi, [r15+1FEC0h]
call _XFlush
add rsp, 90h
pop rbx
pop r14
pop r15
retn
| long long glfwPlatformSetWindowSizeLimits(long long a1)
{
_BYTE v2[8]; // [rsp+8h] [rbp-A0h] BYREF
int v3; // [rsp+10h] [rbp-98h]
int v4; // [rsp+14h] [rbp-94h]
XGetWindowAttributes(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), v2);
updateNormalHints(a1, v3, v4);
return XFlush(*(_QWORD *)&glfw[32688]);
}
| _glfwPlatformSetWindowSizeLimits:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV RBX,RDI
LEA R15,[0x1a8638]
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV RSI,qword ptr [RBX + 0x348]
LEA R14,[RSP + 0x8]
MOV RDX,R14
CALL 0x0010cf20
MOV ESI,dword ptr [R14 + 0x8]
MOV EDX,dword ptr [R14 + 0xc]
MOV RDI,RBX
CALL 0x00122e55
MOV RDI,qword ptr [R15 + 0x1fec0]
CALL 0x0010cce0
ADD RSP,0x90
POP RBX
POP R14
POP R15
RET
|
void _glfwPlatformSetWindowSizeLimits(long param_1)
{
int1 local_a0 [8];
int4 local_98;
int4 local_94;
XGetWindowAttributes(DAT_001c84f8,*(int8 *)(param_1 + 0x348),local_a0);
updateNormalHints(param_1,local_98,local_94);
XFlush(DAT_001c84f8);
return;
}
| |
33,661 | 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 0x66d82
jmp 0x66d84
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x66b70
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x66df8
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6aed0
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 0x66ba0
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
je 0x66dd4
jmp 0x66df8
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 0x66d84
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_66D82:
jmp short $+2
loc_66D84:
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_66DF8
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_66DD4
jmp short loc_66DF8
loc_66DD4:
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_66D84
loc_66DF8:
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 0x00166d82
LAB_00166d82:
JMP 0x00166d84
LAB_00166d84:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00166b70
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x00166df8
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x0016aed0
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 0x00166ba0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,ECX
JZ 0x00166dd4
JMP 0x00166df8
LAB_00166dd4:
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 0x00166d84
LAB_00166df8:
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;
}
| |
33,662 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O1 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2d, %esi
xorl %edx, %edx
callq 0x1bb40
movq %rax, %r12
testq %rax, %rax
je 0x71bfa
cmpq $-0x1, %r12
jne 0x71c07
leaq 0xbe858(%rip), %rax # 0x130438
cmpl $0x0, (%rax)
js 0x71db8
callq 0xcd443
leaq 0x7ff3a(%rip), %rdx # 0xf1b2f
jmp 0x71d80
movq %rbx, 0x10(%rsp)
movq %r12, %r14
jmp 0x71cc1
movq %rbx, 0x10(%rsp)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x1b940
movq (%r14), %rbp
callq 0x1b060
movq %rax, %r13
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r13)
leaq 0x8(%rsp), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x1bb70
cmpq %rbp, (%rbx)
je 0x71dcb
movq %rax, %r14
movl (%r13), %eax
testl %eax, %eax
je 0x71c74
cmpl $0x22, %eax
jne 0x71c7c
leaq 0x80a81(%rip), %rdi # 0xf26f0
callq 0x1bcc0
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x71c97
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8f0
cmpq $0x200, %r14 # imm = 0x200
jb 0x71cc1
leaq 0xbe791(%rip), %rax # 0x130438
cmpl $0x0, (%rax)
js 0x71db8
callq 0xcd443
leaq 0x7feb0(%rip), %rdx # 0xf1b6c
jmp 0x71d80
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x71d93
incq %r12
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x1b940
movq (%rbx), %rbx
callq 0x1b060
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x1bb70
cmpq %rbx, (%r12)
je 0x71dd7
movq %rax, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x71d41
cmpl $0x22, %eax
jne 0x71d44
leaq 0x809b4(%rip), %rdi # 0xf26f0
callq 0x1bcc0
movl %ebp, (%r15)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x71d5f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8f0
cmpq $0x200, %r13 # imm = 0x200
jb 0x71d93
leaq 0xbe6c9(%rip), %rax # 0x130438
cmpl $0x0, (%rax)
js 0x71db8
callq 0xcd443
leaq 0x7fe08(%rip), %rdx # 0xf1b88
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
xorl %eax, %eax
callq 0xcd4de
jmp 0x71dba
movb $0x1, %bpl
cmpq %r13, %r14
ja 0x71dba
movq 0x10(%rsp), %rdi
addq %r14, %rdi
subq %r14, %r13
incq %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x1b510
jmp 0x71dba
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8091e(%rip), %rdi # 0xf26f0
callq 0x1b570
leaq 0x80912(%rip), %rdi # 0xf26f0
callq 0x1b570
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x71def
movl %ebp, (%r15)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1c936
jmp 0x71e21
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x71e12
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1c953
movq %rbx, %rdi
callq 0x1bfd0
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r15, rdi
mov esi, 2Dh ; '-'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_71BFA
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_71C07
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_71DB8
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_71D80
loc_71BFA:
mov [rsp+68h+var_58], rbx
mov r14, r12
jmp loc_71CC1
loc_71C07:
mov [rsp+68h+var_58], rbx
lea r14, [rsp+68h+var_50]
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbp, [r14]
call ___errno_location
mov r13, rax
mov eax, [rax]
mov [rsp+68h+var_64], eax
mov dword ptr [r13+0], 0
lea rbx, [rsp+68h+var_60]
mov rdi, rbp
mov rsi, rbx
mov edx, 0Ah
call _strtoull
cmp [rbx], rbp
jz loc_71DCB
mov r14, rax
mov eax, [r13+0]
test eax, eax
jz short loc_71C74
cmp eax, 22h ; '"'
jnz short loc_71C7C
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_71C74:
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_71C7C:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_71C97
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71C97:
cmp r14, 200h
jb short loc_71CC1
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_71DB8
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp loc_71D80
loc_71CC1:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz loc_71D93
inc r12
lea rbx, [rsp+68h+var_50]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbx, [rbx]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+68h+var_60]
mov rdi, rbx
mov rsi, r12
mov edx, 0Ah
call _strtoull
cmp [r12], rbx
jz loc_71DD7
mov r13, rax
mov eax, [r15]
test eax, eax
jz short loc_71D41
cmp eax, 22h ; '"'
jnz short loc_71D44
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_71D41:
mov [r15], ebp
loc_71D44:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_71D5F
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71D5F:
cmp r13, 200h
jb short loc_71D93
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_71DB8
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_71D80:
xor ebp, ebp
mov rdi, rax
mov esi, 4
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_71DBA
loc_71D93:
mov bpl, 1
cmp r14, r13
ja short loc_71DBA
mov rdi, [rsp+68h+var_58]
add rdi, r14
sub r13, r14
inc r13
mov esi, 1
mov rdx, r13
call _memset
jmp short loc_71DBA
loc_71DB8:
xor ebp, ebp
loc_71DBA:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_71DCB:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_71DD7:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov rbx, rax
cmp dword ptr [r15], 0
jnz short loc_71DEF
mov [r15], ebp
loc_71DEF:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_1; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
jmp short loc_71E21
mov rbx, rax
cmp dword ptr [r13+0], 0
jnz short loc_71E12
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_71E12:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_2; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
loc_71E21:
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2, double a3)
{
void *v3; // rbp
_DWORD *v4; // r15
long long v5; // rax
long long v6; // r12
int v7; // eax
int v8; // ecx
int v9; // r8d
int v10; // r9d
const char *v11; // rdx
unsigned long long v12; // r14
int *v13; // r13
long long v14; // rax
unsigned long long v15; // r13
void *v16; // rbx
long long v17; // rax
long long v19; // rbx
int v20; // [rsp+4h] [rbp-64h]
void *v21; // [rsp+8h] [rbp-60h] BYREF
long long v22; // [rsp+10h] [rbp-58h]
void *v23[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v24[8]; // [rsp+28h] [rbp-40h] BYREF
v4 = (_DWORD *)a1;
v5 = std::string::find(a1, 45LL, 0LL);
v6 = v5;
if ( v5 )
{
if ( v5 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_27:
LODWORD(v3) = 0;
common_log_add(v7, 4, (_DWORD)v11, v8, v9, v10);
return (unsigned int)v3;
}
goto LABEL_30;
}
v22 = a2;
std::string::substr(v23, a1, 0LL, v5);
v3 = v23[0];
v13 = (int *)__errno_location(a3);
v20 = *v13;
*v13 = 0;
v14 = strtoull(v3, &v21, 10LL);
if ( v21 == v3 )
{
std::__throw_invalid_argument("stoull");
goto LABEL_33;
}
v12 = v14;
if ( *v13 )
{
if ( *v13 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v13 = v20;
}
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v12 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "Start index out of bounds!\n";
goto LABEL_27;
}
LABEL_30:
LODWORD(v3) = 0;
return (unsigned int)v3;
}
}
else
{
v22 = a2;
v12 = 0LL;
}
v15 = 511LL;
if ( v6 == *(_QWORD *)(a1 + 8) - 1LL )
goto LABEL_28;
std::string::substr(v23, a1, v6 + 1, -1LL);
v16 = v23[0];
v4 = (_DWORD *)__errno_location(a3);
LODWORD(v3) = *v4;
*v4 = 0;
v17 = strtoull(v16, &v21, 10LL);
if ( v21 == v16 )
{
LABEL_33:
v19 = std::__throw_invalid_argument("stoull");
if ( !*v4 )
*v4 = (_DWORD)v3;
parse_cpu_range((long long)&v21, v23);
_Unwind_Resume(v19);
}
v15 = v17;
if ( *v4 )
{
if ( *v4 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v4 = (_DWORD)v3;
}
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v15 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "End index out of bounds!\n";
goto LABEL_27;
}
goto LABEL_30;
}
LABEL_28:
LOBYTE(v3) = 1;
if ( v12 <= v15 )
memset(v12 + v22, 1LL, v15 - v12 + 1);
return (unsigned int)v3;
}
| parse_cpu_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R15,RDI
MOV ESI,0x2d
XOR EDX,EDX
CALL 0x0011bb40
MOV R12,RAX
TEST RAX,RAX
JZ 0x00171bfa
CMP R12,-0x1
JNZ 0x00171c07
LEA RAX,[0x230438]
CMP dword ptr [RAX],0x0
JS 0x00171db8
CALL 0x001cd443
LEA RDX,[0x1f1b2f]
JMP 0x00171d80
LAB_00171bfa:
MOV qword ptr [RSP + 0x10],RBX
MOV R14,R12
JMP 0x00171cc1
LAB_00171c07:
MOV qword ptr [RSP + 0x10],RBX
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x0011b940
MOV RBP,qword ptr [R14]
CALL 0x0011b060
MOV R13,RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV dword ptr [R13],0x0
LEA RBX,[RSP + 0x8]
MOV RDI,RBP
MOV RSI,RBX
MOV EDX,0xa
CALL 0x0011bb70
CMP qword ptr [RBX],RBP
JZ 0x00171dcb
MOV R14,RAX
MOV EAX,dword ptr [R13]
TEST EAX,EAX
JZ 0x00171c74
CMP EAX,0x22
JNZ 0x00171c7c
LAB_00171c68:
LEA RDI,[0x1f26f0]
CALL 0x0011bcc0
LAB_00171c74:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R13],EAX
LAB_00171c7c:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00171c97
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8f0
LAB_00171c97:
CMP R14,0x200
JC 0x00171cc1
LEA RAX,[0x230438]
CMP dword ptr [RAX],0x0
JS 0x00171db8
CALL 0x001cd443
LEA RDX,[0x1f1b6c]
JMP 0x00171d80
LAB_00171cc1:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x00171d93
INC R12
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,-0x1
CALL 0x0011b940
MOV RBX,qword ptr [RBX]
CALL 0x0011b060
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,0xa
CALL 0x0011bb70
CMP qword ptr [R12],RBX
JZ 0x00171dd7
MOV R13,RAX
MOV EAX,dword ptr [R15]
TEST EAX,EAX
JZ 0x00171d41
CMP EAX,0x22
JNZ 0x00171d44
LAB_00171d35:
LEA RDI,[0x1f26f0]
CALL 0x0011bcc0
LAB_00171d41:
MOV dword ptr [R15],EBP
LAB_00171d44:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00171d5f
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8f0
LAB_00171d5f:
CMP R13,0x200
JC 0x00171d93
LEA RAX,[0x230438]
CMP dword ptr [RAX],0x0
JS 0x00171db8
CALL 0x001cd443
LEA RDX,[0x1f1b88]
LAB_00171d80:
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
XOR EAX,EAX
CALL 0x001cd4de
JMP 0x00171dba
LAB_00171d93:
MOV BPL,0x1
CMP R14,R13
JA 0x00171dba
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,R14
SUB R13,R14
INC R13
MOV ESI,0x1
MOV RDX,R13
CALL 0x0011b510
JMP 0x00171dba
LAB_00171db8:
XOR EBP,EBP
LAB_00171dba:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00171dcb:
LEA RDI,[0x1f26f0]
CALL 0x0011b570
LAB_00171dd7:
LEA RDI,[0x1f26f0]
CALL 0x0011b570
LAB_00171de3:
MOV RBX,RAX
CMP dword ptr [R15],0x0
JNZ 0x00171def
MOV dword ptr [R15],EBP
LAB_00171def:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x18]
CALL 0x0011c936
JMP 0x00171e21
LAB_00171e21:
MOV RDI,RBX
CALL 0x0011bfd0
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
int iVar1;
uint uVar2;
long *__nptr;
long lVar3;
int8 uVar4;
int *piVar5;
ulong uVar6;
char *pcVar7;
long *unaff_RBP;
ulong uVar8;
ulonglong uVar9;
long *local_60;
bool *local_58;
long *local_50 [2];
long local_40 [2];
lVar3 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar3 == 0) {
uVar6 = 0;
local_58 = param_2;
LAB_00171cc1:
uVar9 = 0x1ff;
if (lVar3 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
__nptr = local_50[0];
param_1 = (string *)__errno_location();
uVar2 = *(uint *)param_1;
unaff_RBP = (long *)(ulong)uVar2;
*(uint *)param_1 = 0;
uVar9 = strtoull((char *)__nptr,(char **)&local_60,10);
if (local_60 == __nptr) {
LAB_00171dd7:
/* try { // try from 00171dd7 to 00171de2 has its CatchHandler @ 00171de3 */
uVar4 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 00171d35 with catch @ 00171de3
catch() { ... } // from try @ 00171dd7 with catch @ 00171de3 */
if (*(uint *)param_1 == 0) {
*(uint *)param_1 = (uint)unaff_RBP;
}
parse_cpu_range((string *)&local_60,(bool *)local_50);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
if (*(uint *)param_1 == 0) {
LAB_00171d41:
*(uint *)param_1 = uVar2;
}
else if (*(uint *)param_1 == 0x22) {
/* try { // try from 00171d35 to 00171d40 has its CatchHandler @ 00171de3 */
std::__throw_out_of_range("stoull");
goto LAB_00171d41;
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (0x1ff < uVar9) {
if (common_log_verbosity_thold < 0) goto LAB_00171db8;
uVar4 = common_log_main();
pcVar7 = "End index out of bounds!\n";
goto LAB_00171d80;
}
}
uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if (uVar6 <= uVar9) {
memset(local_58 + uVar6,1,(uVar9 - uVar6) + 1);
}
}
else {
if (lVar3 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_00171db8:
uVar8 = 0;
goto LAB_00171dba;
}
uVar4 = common_log_main();
pcVar7 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
local_58 = param_2;
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
unaff_RBP = local_50[0];
piVar5 = __errno_location();
iVar1 = *piVar5;
*piVar5 = 0;
uVar6 = strtoull((char *)unaff_RBP,(char **)&local_60,10);
if (local_60 == unaff_RBP) {
/* try { // try from 00171dcb to 00171dd6 has its CatchHandler @ 00171e00 */
std::__throw_invalid_argument("stoull");
goto LAB_00171dd7;
}
if (*piVar5 == 0) {
LAB_00171c74:
*piVar5 = iVar1;
}
else if (*piVar5 == 0x22) {
/* try { // try from 00171c68 to 00171c73 has its CatchHandler @ 00171e00 */
std::__throw_out_of_range("stoull");
goto LAB_00171c74;
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (uVar6 < 0x200) goto LAB_00171cc1;
if (common_log_verbosity_thold < 0) goto LAB_00171db8;
uVar4 = common_log_main();
pcVar7 = "Start index out of bounds!\n";
}
LAB_00171d80:
uVar8 = 0;
common_log_add(uVar4,4,pcVar7);
}
LAB_00171dba:
return uVar8 & 0xffffffff;
}
| |
33,663 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | monkey531[P]llama/common/json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1c2d8
cmpl $0x2f, %eax
je 0x59445
cmpl $0x2a, %eax
jne 0x59462
movq %rbx, %rdi
callq 0x1c2d8
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x5946b
cmpl $0x2a, %eax
jne 0x59419
movq %rbx, %rdi
callq 0x1c2d8
cmpl $0x2f, %eax
je 0x5945e
movq %rbx, %rdi
callq 0x59d2e
jmp 0x59419
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x1c2d8
incl %eax
cmpl $0xf, %eax
jae 0x5944a
btl %eax, %ebp
jae 0x5944a
movb $0x1, %al
jmp 0x59478
leaq 0x95b70(%rip), %rax # 0xeefd9
jmp 0x59472
leaq 0x95b41(%rip), %rax # 0xeefb3
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_59445
cmp eax, 2Ah ; '*'
jnz short loc_59462
loc_59419:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_5946B
cmp eax, 2Ah ; '*'
jnz short loc_59419
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_5945E
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_59419
loc_59445:
mov ebp, 4803h
loc_5944A:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_5944A
bt ebp, eax
jnb short loc_5944A
loc_5945E:
mov al, 1
jmp short loc_59478
loc_59462:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_59472
loc_5946B:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_59472:
mov [rbx+70h], rax
xor eax, eax
loc_59478:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0011c2d8
CMP EAX,0x2f
JZ 0x00159445
CMP EAX,0x2a
JNZ 0x00159462
LAB_00159419:
MOV RDI,RBX
CALL 0x0011c2d8
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x0015946b
CMP EAX,0x2a
JNZ 0x00159419
MOV RDI,RBX
CALL 0x0011c2d8
CMP EAX,0x2f
JZ 0x0015945e
MOV RDI,RBX
CALL 0x00159d2e
JMP 0x00159419
LAB_00159445:
MOV EBP,0x4803
LAB_0015944a:
MOV RDI,RBX
CALL 0x0011c2d8
INC EAX
CMP EAX,0xf
JNC 0x0015944a
BT EBP,EAX
JNC 0x0015944a
LAB_0015945e:
MOV AL,0x1
JMP 0x00159478
LAB_00159462:
LEA RAX,[0x1eefd9]
JMP 0x00159472
LAB_0015946b:
LEA RAX,[0x1eefb3]
LAB_00159472:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_00159478:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_0015945e:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_0015945e;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
| |
33,664 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | monkey531[P]llama/common/json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1b2d8
cmpl $0x2f, %eax
je 0x58ea5
cmpl $0x2a, %eax
jne 0x58ec2
movq %rbx, %rdi
callq 0x1b2d8
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x58ecb
cmpl $0x2a, %eax
jne 0x58e79
movq %rbx, %rdi
callq 0x1b2d8
cmpl $0x2f, %eax
je 0x58ebe
movq %rbx, %rdi
callq 0x59734
jmp 0x58e79
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x1b2d8
incl %eax
cmpl $0xf, %eax
jae 0x58eaa
btl %eax, %ebp
jae 0x58eaa
movb $0x1, %al
jmp 0x58ed8
leaq 0x93110(%rip), %rax # 0xebfd9
jmp 0x58ed2
leaq 0x930e1(%rip), %rax # 0xebfb3
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_58EA5
cmp eax, 2Ah ; '*'
jnz short loc_58EC2
loc_58E79:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_58ECB
cmp eax, 2Ah ; '*'
jnz short loc_58E79
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_58EBE
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_58E79
loc_58EA5:
mov ebp, 4803h
loc_58EAA:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_58EAA
bt ebp, eax
jnb short loc_58EAA
loc_58EBE:
mov al, 1
jmp short loc_58ED8
loc_58EC2:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_58ED2
loc_58ECB:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_58ED2:
mov [rbx+70h], rax
xor eax, eax
loc_58ED8:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0011b2d8
CMP EAX,0x2f
JZ 0x00158ea5
CMP EAX,0x2a
JNZ 0x00158ec2
LAB_00158e79:
MOV RDI,RBX
CALL 0x0011b2d8
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x00158ecb
CMP EAX,0x2a
JNZ 0x00158e79
MOV RDI,RBX
CALL 0x0011b2d8
CMP EAX,0x2f
JZ 0x00158ebe
MOV RDI,RBX
CALL 0x00159734
JMP 0x00158e79
LAB_00158ea5:
MOV EBP,0x4803
LAB_00158eaa:
MOV RDI,RBX
CALL 0x0011b2d8
INC EAX
CMP EAX,0xf
JNC 0x00158eaa
BT EBP,EAX
JNC 0x00158eaa
LAB_00158ebe:
MOV AL,0x1
JMP 0x00158ed8
LAB_00158ec2:
LEA RAX,[0x1ebfd9]
JMP 0x00158ed2
LAB_00158ecb:
LEA RAX,[0x1ebfb3]
LAB_00158ed2:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_00158ed8:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_00158ebe:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_00158ebe;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
| |
33,665 | mp_sub_ui | bluesky950520[P]quickjs/libbf.c | limb_t mp_sub_ui(limb_t *tab, limb_t b, mp_size_t n)
{
mp_size_t i;
limb_t k, a, v;
k=b;
for(i=0;i<n;i++) {
v = tab[i];
a = v - k;
k = a > v;
tab[i] = a;
if (k == 0)
break;
}
return k;
} | O0 | c | mp_sub_ui:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq $0x0, -0x20(%rsp)
movq -0x20(%rsp), %rax
cmpq -0x18(%rsp), %rax
jge 0xe75a8
movq -0x8(%rsp), %rax
movq -0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rsp)
movq -0x38(%rsp), %rax
subq -0x28(%rsp), %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
cmpq -0x38(%rsp), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x28(%rsp)
movq -0x30(%rsp), %rdx
movq -0x8(%rsp), %rax
movq -0x20(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x28(%rsp)
jne 0xe7596
jmp 0xe75a8
jmp 0xe7598
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rsp)
jmp 0xe7532
movq -0x28(%rsp), %rax
retq
nop
| mp_sub_ui:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
mov [rsp+var_20], 0
loc_E7532:
mov rax, [rsp+var_20]
cmp rax, [rsp+var_18]
jge short loc_E75A8
mov rax, [rsp+var_8]
mov rcx, [rsp+var_20]
mov rax, [rax+rcx*8]
mov [rsp+var_38], rax
mov rax, [rsp+var_38]
sub rax, [rsp+var_28]
mov [rsp+var_30], rax
mov rax, [rsp+var_30]
cmp rax, [rsp+var_38]
setnbe al
and al, 1
movzx eax, al
cdqe
mov [rsp+var_28], rax
mov rdx, [rsp+var_30]
mov rax, [rsp+var_8]
mov rcx, [rsp+var_20]
mov [rax+rcx*8], rdx
cmp [rsp+var_28], 0
jnz short loc_E7596
jmp short loc_E75A8
loc_E7596:
jmp short $+2
loc_E7598:
mov rax, [rsp+var_20]
add rax, 1
mov [rsp+var_20], rax
jmp short loc_E7532
loc_E75A8:
mov rax, [rsp+var_28]
retn
| _BOOL8 mp_sub_ui(long long a1, _BOOL8 a2, long long a3)
{
unsigned long long v4; // [rsp+0h] [rbp-38h]
unsigned long long v5; // [rsp+8h] [rbp-30h]
long long i; // [rsp+18h] [rbp-20h]
for ( i = 0LL; i < a3; ++i )
{
v4 = *(_QWORD *)(a1 + 8 * i);
v5 = v4 - a2;
a2 = v4 - a2 > v4;
*(_QWORD *)(a1 + 8 * i) = v5;
if ( !a2 )
break;
}
return a2;
}
| mp_sub_ui:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
MOV qword ptr [RSP + -0x20],0x0
LAB_001e7532:
MOV RAX,qword ptr [RSP + -0x20]
CMP RAX,qword ptr [RSP + -0x18]
JGE 0x001e75a8
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + -0x38],RAX
MOV RAX,qword ptr [RSP + -0x38]
SUB RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x30]
CMP RAX,qword ptr [RSP + -0x38]
SETA AL
AND AL,0x1
MOVZX EAX,AL
CDQE
MOV qword ptr [RSP + -0x28],RAX
MOV RDX,qword ptr [RSP + -0x30]
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP qword ptr [RSP + -0x28],0x0
JNZ 0x001e7596
JMP 0x001e75a8
LAB_001e7596:
JMP 0x001e7598
LAB_001e7598:
MOV RAX,qword ptr [RSP + -0x20]
ADD RAX,0x1
MOV qword ptr [RSP + -0x20],RAX
JMP 0x001e7532
LAB_001e75a8:
MOV RAX,qword ptr [RSP + -0x28]
RET
|
long mp_sub_ui(long param_1,long param_2,long param_3)
{
ulong uVar1;
ulong uVar2;
long local_28;
long local_20;
local_20 = 0;
local_28 = param_2;
while( true ) {
if (param_3 <= local_20) {
return local_28;
}
uVar1 = *(ulong *)(param_1 + local_20 * 8);
uVar2 = uVar1 - local_28;
local_28 = (long)(int)(uint)(uVar1 < uVar2);
*(ulong *)(param_1 + local_20 * 8) = uVar2;
if (local_28 == 0) break;
local_20 = local_20 + 1;
}
return 0;
}
| |
33,666 | mp_sub_ui | bluesky950520[P]quickjs/libbf.c | limb_t mp_sub_ui(limb_t *tab, limb_t b, mp_size_t n)
{
mp_size_t i;
limb_t k, a, v;
k=b;
for(i=0;i<n;i++) {
v = tab[i];
a = v - k;
k = a > v;
tab[i] = a;
if (k == 0)
break;
}
return k;
} | O1 | c | mp_sub_ui:
movq %rsi, %rax
testq %rdx, %rdx
jle 0x855fd
xorl %ecx, %ecx
subq %rax, (%rdi,%rcx,8)
jae 0x855fe
incq %rcx
movl $0x1, %eax
cmpq %rcx, %rdx
jne 0x855ea
retq
xorl %eax, %eax
retq
| mp_sub_ui:
mov rax, rsi
test rdx, rdx
jle short locret_855FD
xor ecx, ecx
loc_855EA:
sub [rdi+rcx*8], rax
jnb short loc_855FE
inc rcx
mov eax, 1
cmp rdx, rcx
jnz short loc_855EA
locret_855FD:
retn
loc_855FE:
xor eax, eax
retn
| unsigned long long mp_sub_ui(long long a1, unsigned long long a2, long long a3)
{
unsigned long long result; // rax
long long v4; // rcx
bool v5; // cf
result = a2;
if ( a3 > 0 )
{
v4 = 0LL;
while ( 1 )
{
v5 = *(_QWORD *)(a1 + 8 * v4) < result;
*(_QWORD *)(a1 + 8 * v4) -= result;
if ( !v5 )
break;
++v4;
result = 1LL;
if ( a3 == v4 )
return result;
}
return 0LL;
}
return result;
}
| |||
33,667 | mysql_handle_local_infile | eloqsql/libmariadb/libmariadb/ma_loaddata.c | my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename, my_bool can_local_infile)
{
unsigned int buflen= 4096;
int bufread;
unsigned char *buf= NULL;
void *info= NULL;
my_bool result= 1;
/* check if all callback functions exist */
if (!conn->options.local_infile_init || !conn->options.local_infile_end ||
!conn->options.local_infile_read || !conn->options.local_infile_error)
{
conn->options.local_infile_userdata= conn;
mysql_set_local_infile_default(conn);
}
if (!(conn->options.client_flag & CLIENT_LOCAL_FILES) ||
!can_local_infile)
{
my_set_error(conn, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, "Load data local infile forbidden");
/* write empty packet to server */
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* allocate buffer for reading data */
buf = (uchar *)malloc(buflen);
/* init handler: allocate read buffer and open file */
if (conn->options.local_infile_init(&info, filename,
conn->options.local_infile_userdata))
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno;
tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* read data */
while ((bufread= conn->options.local_infile_read(info, (char *)buf, buflen)) > 0)
{
if (ma_net_write(&conn->net, (unsigned char *)buf, bufread))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
}
/* send empty packet for eof */
if (ma_net_write(&conn->net, (unsigned char *)"", 0) ||
ma_net_flush(&conn->net))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
/* error during read occurred */
if (bufread < 0)
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
goto infile_error;
}
result = 0;
infile_error:
conn->options.local_infile_end(info);
free(buf);
return(result);
} | O0 | c | mysql_handle_local_infile:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp # imm = 0x450
movb %dl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x418(%rbp)
movq %rsi, -0x420(%rbp)
movb %al, -0x421(%rbp)
movl $0x1000, -0x428(%rbp) # imm = 0x1000
movq $0x0, -0x438(%rbp)
movq $0x0, -0x440(%rbp)
movb $0x1, -0x441(%rbp)
movq -0x418(%rbp), %rax
cmpq $0x0, 0x458(%rax)
je 0x323a9
movq -0x418(%rbp), %rax
cmpq $0x0, 0x468(%rax)
je 0x323a9
movq -0x418(%rbp), %rax
cmpq $0x0, 0x460(%rax)
je 0x323a9
movq -0x418(%rbp), %rax
cmpq $0x0, 0x470(%rax)
jne 0x323ca
movq -0x418(%rbp), %rcx
movq -0x418(%rbp), %rax
movq %rcx, 0x478(%rax)
movq -0x418(%rbp), %rdi
callq 0x31fc0
movq -0x418(%rbp), %rax
movq 0x3a8(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x323ed
cmpb $0x0, -0x421(%rbp)
jne 0x32439
movq -0x418(%rbp), %rdi
leaq 0x34d55(%rip), %rax # 0x67150
movq (%rax), %rdx
movl $0x7d0, %esi # imm = 0x7D0
leaq 0x2021a(%rip), %rcx # 0x52624
movb $0x0, %al
callq 0x1ab90
movq -0x418(%rbp), %rdi
leaq 0x1e34f(%rip), %rsi # 0x5076e
xorl %eax, %eax
movl %eax, %edx
callq 0x4ab10
movq -0x418(%rbp), %rdi
callq 0x4a6f0
jmp 0x3261c
movl -0x428(%rbp), %eax
movl %eax, %edi
callq 0x135b0
movq %rax, -0x438(%rbp)
movq -0x418(%rbp), %rax
movq 0x458(%rax), %rax
movq -0x420(%rbp), %rsi
movq -0x418(%rbp), %rcx
movq 0x478(%rcx), %rdx
leaq -0x440(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
je 0x324f4
movq -0x418(%rbp), %rax
movq 0x470(%rax), %rax
movq -0x440(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq *%rax
movl %eax, -0x448(%rbp)
movq -0x418(%rbp), %rdi
movl -0x448(%rbp), %esi
leaq 0x34c95(%rip), %rax # 0x67150
movq (%rax), %rdx
leaq -0x210(%rbp), %rcx
movb $0x0, %al
callq 0x1ab90
movq -0x418(%rbp), %rdi
leaq 0x1e294(%rip), %rsi # 0x5076e
xorl %eax, %eax
movl %eax, %edx
callq 0x4ab10
movq -0x418(%rbp), %rdi
callq 0x4a6f0
jmp 0x3261c
jmp 0x324f6
movq -0x418(%rbp), %rax
movq 0x460(%rax), %rax
movq -0x440(%rbp), %rdi
movq -0x438(%rbp), %rsi
movl -0x428(%rbp), %edx
callq *%rax
movl %eax, -0x42c(%rbp)
cmpl $0x0, %eax
jle 0x3256c
movq -0x418(%rbp), %rdi
movq -0x438(%rbp), %rsi
movslq -0x42c(%rbp), %rdx
callq 0x4ab10
cmpl $0x0, %eax
je 0x3256a
movq -0x418(%rbp), %rdi
leaq 0x34bfe(%rip), %rax # 0x67150
movq (%rax), %rdx
movl $0x7dd, %esi # imm = 0x7DD
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x1ab90
jmp 0x3261c
jmp 0x324f6
movq -0x418(%rbp), %rdi
leaq 0x1e1f4(%rip), %rsi # 0x5076e
xorl %eax, %eax
movl %eax, %edx
callq 0x4ab10
cmpl $0x0, %eax
jne 0x32599
movq -0x418(%rbp), %rdi
callq 0x4a6f0
cmpl $0x0, %eax
je 0x325bc
movq -0x418(%rbp), %rdi
leaq 0x34ba9(%rip), %rax # 0x67150
movq (%rax), %rdx
movl $0x7dd, %esi # imm = 0x7DD
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x1ab90
jmp 0x3261c
cmpl $0x0, -0x42c(%rbp)
jge 0x32615
movq -0x418(%rbp), %rax
movq 0x470(%rax), %rax
movq -0x440(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq *%rax
movl %eax, -0x44c(%rbp)
movq -0x418(%rbp), %rdi
movl -0x44c(%rbp), %esi
leaq 0x34b4e(%rip), %rax # 0x67150
movq (%rax), %rdx
leaq -0x410(%rbp), %rcx
movb $0x0, %al
callq 0x1ab90
jmp 0x3261c
movb $0x0, -0x441(%rbp)
movq -0x418(%rbp), %rax
movq 0x468(%rax), %rax
movq -0x440(%rbp), %rdi
callq *%rax
movq -0x438(%rbp), %rdi
callq 0x13520
movb -0x441(%rbp), %al
movb %al, -0x44d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3266c
movb -0x44d(%rbp), %al
addq $0x450, %rsp # imm = 0x450
popq %rbp
retq
callq 0x134b0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| mysql_handle_local_infile:
push rbp
mov rbp, rsp
sub rsp, 450h
mov al, dl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_418], rdi
mov [rbp+var_420], rsi
mov [rbp+var_421], al
mov [rbp+var_428], 1000h
mov [rbp+var_438], 0
mov [rbp+var_440], 0
mov [rbp+var_441], 1
mov rax, [rbp+var_418]
cmp qword ptr [rax+458h], 0
jz short loc_323A9
mov rax, [rbp+var_418]
cmp qword ptr [rax+468h], 0
jz short loc_323A9
mov rax, [rbp+var_418]
cmp qword ptr [rax+460h], 0
jz short loc_323A9
mov rax, [rbp+var_418]
cmp qword ptr [rax+470h], 0
jnz short loc_323CA
loc_323A9:
mov rcx, [rbp+var_418]
mov rax, [rbp+var_418]
mov [rax+478h], rcx
mov rdi, [rbp+var_418]
call mysql_set_local_infile_default
loc_323CA:
mov rax, [rbp+var_418]
mov rax, [rax+3A8h]
and rax, 80h
cmp rax, 0
jz short loc_323ED
cmp [rbp+var_421], 0
jnz short loc_32439
loc_323ED:
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D0h
lea rcx, aLoadDataLocalI; "Load data local infile forbidden"
mov al, 0
call my_set_error
mov rdi, [rbp+var_418]
lea rsi, aExecuteTestWit+29h; ""
xor eax, eax
mov edx, eax
call ma_net_write
mov rdi, [rbp+var_418]
call ma_net_flush
jmp loc_3261C
loc_32439:
mov eax, [rbp+var_428]
mov edi, eax
call _malloc
mov [rbp+var_438], rax
mov rax, [rbp+var_418]
mov rax, [rax+458h]
mov rsi, [rbp+var_420]
mov rcx, [rbp+var_418]
mov rdx, [rcx+478h]
lea rdi, [rbp+var_440]
call rax
cmp eax, 0
jz short loc_324F4
mov rax, [rbp+var_418]
mov rax, [rax+470h]
mov rdi, [rbp+var_440]
lea rsi, [rbp+var_210]
mov edx, 200h
call rax
mov [rbp+var_448], eax
mov rdi, [rbp+var_418]
mov esi, [rbp+var_448]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, [rbp+var_210]
mov al, 0
call my_set_error
mov rdi, [rbp+var_418]
lea rsi, aExecuteTestWit+29h; ""
xor eax, eax
mov edx, eax
call ma_net_write
mov rdi, [rbp+var_418]
call ma_net_flush
jmp loc_3261C
loc_324F4:
jmp short $+2
loc_324F6:
mov rax, [rbp+var_418]
mov rax, [rax+460h]
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_438]
mov edx, [rbp+var_428]
call rax
mov [rbp+var_42C], eax
cmp eax, 0
jle short loc_3256C
mov rdi, [rbp+var_418]
mov rsi, [rbp+var_438]
movsxd rdx, [rbp+var_42C]
call ma_net_write
cmp eax, 0
jz short loc_3256A
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7DDh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp loc_3261C
loc_3256A:
jmp short loc_324F6
loc_3256C:
mov rdi, [rbp+var_418]
lea rsi, aExecuteTestWit+29h; ""
xor eax, eax
mov edx, eax
call ma_net_write
cmp eax, 0
jnz short loc_32599
mov rdi, [rbp+var_418]
call ma_net_flush
cmp eax, 0
jz short loc_325BC
loc_32599:
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7DDh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp short loc_3261C
loc_325BC:
cmp [rbp+var_42C], 0
jge short loc_32615
mov rax, [rbp+var_418]
mov rax, [rax+470h]
mov rdi, [rbp+var_440]
lea rsi, [rbp+var_410]
mov edx, 200h
call rax
mov [rbp+var_44C], eax
mov rdi, [rbp+var_418]
mov esi, [rbp+var_44C]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, [rbp+var_410]
mov al, 0
call my_set_error
jmp short loc_3261C
loc_32615:
mov [rbp+var_441], 0
loc_3261C:
mov rax, [rbp+var_418]
mov rax, [rax+468h]
mov rdi, [rbp+var_440]
call rax
mov rdi, [rbp+var_438]
call _free
mov al, [rbp+var_441]
mov [rbp+var_44D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3266C
mov al, [rbp+var_44D]
add rsp, 450h
pop rbp
retn
loc_3266C:
call ___stack_chk_fail
| char mysql_handle_local_infile(_QWORD *a1, long long a2, char a3)
{
unsigned int v4; // [rsp+4h] [rbp-44Ch]
unsigned int v5; // [rsp+8h] [rbp-448h]
char v6; // [rsp+Fh] [rbp-441h]
long long v7; // [rsp+10h] [rbp-440h] BYREF
long long v8; // [rsp+18h] [rbp-438h]
int v9; // [rsp+24h] [rbp-42Ch]
unsigned int v10; // [rsp+28h] [rbp-428h]
char v11; // [rsp+2Fh] [rbp-421h]
long long v12; // [rsp+30h] [rbp-420h]
_QWORD *v13; // [rsp+38h] [rbp-418h]
_BYTE v14[512]; // [rsp+40h] [rbp-410h] BYREF
_BYTE v15[520]; // [rsp+240h] [rbp-210h] BYREF
unsigned long long v16; // [rsp+448h] [rbp-8h]
v16 = __readfsqword(0x28u);
v13 = a1;
v12 = a2;
v11 = a3;
v10 = 4096;
v8 = 0LL;
v7 = 0LL;
v6 = 1;
if ( !a1[139] || !v13[141] || !v13[140] || !v13[142] )
{
v13[143] = v13;
mysql_set_local_infile_default(v13);
}
if ( (v13[117] & 0x80LL) != 0 && v11 )
{
v8 = malloc(v10);
if ( ((unsigned int ( *)(long long *, long long, _QWORD))v13[139])(&v7, v12, v13[143]) )
{
v5 = ((long long ( *)(long long, _BYTE *, long long))v13[142])(v7, v15, 512LL);
my_set_error((long long)v13, v5, (long long)SQLSTATE_UNKNOWN, (long long)v15);
ma_net_write(v13, "", 0LL);
ma_net_flush(v13);
}
else
{
while ( 1 )
{
v9 = ((long long ( *)(long long, long long, _QWORD))v13[140])(v7, v8, v10);
if ( v9 <= 0 )
break;
if ( (unsigned int)ma_net_write(v13, v8, v9) )
goto LABEL_13;
}
if ( (unsigned int)ma_net_write(v13, "", 0LL) || (unsigned int)ma_net_flush(v13) )
{
LABEL_13:
my_set_error((long long)v13, 0x7DDu, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_21;
}
if ( v9 >= 0 )
{
v6 = 0;
}
else
{
v4 = ((long long ( *)(long long, _BYTE *, long long))v13[142])(v7, v14, 512LL);
my_set_error((long long)v13, v4, (long long)SQLSTATE_UNKNOWN, (long long)v14);
}
}
}
else
{
my_set_error((long long)v13, 0x7D0u, (long long)SQLSTATE_UNKNOWN, (long long)"Load data local infile forbidden");
ma_net_write(v13, "", 0LL);
ma_net_flush(v13);
}
LABEL_21:
((void ( *)(long long))v13[141])(v7);
free(v8);
return v6;
}
| mysql_handle_local_infile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x450
MOV AL,DL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x418],RDI
MOV qword ptr [RBP + -0x420],RSI
MOV byte ptr [RBP + -0x421],AL
MOV dword ptr [RBP + -0x428],0x1000
MOV qword ptr [RBP + -0x438],0x0
MOV qword ptr [RBP + -0x440],0x0
MOV byte ptr [RBP + -0x441],0x1
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x458],0x0
JZ 0x001323a9
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x468],0x0
JZ 0x001323a9
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x460],0x0
JZ 0x001323a9
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x470],0x0
JNZ 0x001323ca
LAB_001323a9:
MOV RCX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RBP + -0x418]
MOV qword ptr [RAX + 0x478],RCX
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00131fc0
LAB_001323ca:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x3a8]
AND RAX,0x80
CMP RAX,0x0
JZ 0x001323ed
CMP byte ptr [RBP + -0x421],0x0
JNZ 0x00132439
LAB_001323ed:
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x167150]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d0
LEA RCX,[0x152624]
MOV AL,0x0
CALL 0x0011ab90
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x15076e]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0014ab10
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x0014a6f0
JMP 0x0013261c
LAB_00132439:
MOV EAX,dword ptr [RBP + -0x428]
MOV EDI,EAX
CALL 0x001135b0
MOV qword ptr [RBP + -0x438],RAX
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x458]
MOV RSI,qword ptr [RBP + -0x420]
MOV RCX,qword ptr [RBP + -0x418]
MOV RDX,qword ptr [RCX + 0x478]
LEA RDI,[RBP + -0x440]
CALL RAX
CMP EAX,0x0
JZ 0x001324f4
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x470]
MOV RDI,qword ptr [RBP + -0x440]
LEA RSI,[RBP + -0x210]
MOV EDX,0x200
CALL RAX
MOV dword ptr [RBP + -0x448],EAX
MOV RDI,qword ptr [RBP + -0x418]
MOV ESI,dword ptr [RBP + -0x448]
LEA RAX,[0x167150]
MOV RDX,qword ptr [RAX]
LEA RCX,[RBP + -0x210]
MOV AL,0x0
CALL 0x0011ab90
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x15076e]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0014ab10
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x0014a6f0
JMP 0x0013261c
LAB_001324f4:
JMP 0x001324f6
LAB_001324f6:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x460]
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x438]
MOV EDX,dword ptr [RBP + -0x428]
CALL RAX
MOV dword ptr [RBP + -0x42c],EAX
CMP EAX,0x0
JLE 0x0013256c
MOV RDI,qword ptr [RBP + -0x418]
MOV RSI,qword ptr [RBP + -0x438]
MOVSXD RDX,dword ptr [RBP + -0x42c]
CALL 0x0014ab10
CMP EAX,0x0
JZ 0x0013256a
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x167150]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7dd
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0011ab90
JMP 0x0013261c
LAB_0013256a:
JMP 0x001324f6
LAB_0013256c:
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x15076e]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0014ab10
CMP EAX,0x0
JNZ 0x00132599
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x0014a6f0
CMP EAX,0x0
JZ 0x001325bc
LAB_00132599:
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x167150]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7dd
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0011ab90
JMP 0x0013261c
LAB_001325bc:
CMP dword ptr [RBP + -0x42c],0x0
JGE 0x00132615
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x470]
MOV RDI,qword ptr [RBP + -0x440]
LEA RSI,[RBP + -0x410]
MOV EDX,0x200
CALL RAX
MOV dword ptr [RBP + -0x44c],EAX
MOV RDI,qword ptr [RBP + -0x418]
MOV ESI,dword ptr [RBP + -0x44c]
LEA RAX,[0x167150]
MOV RDX,qword ptr [RAX]
LEA RCX,[RBP + -0x410]
MOV AL,0x0
CALL 0x0011ab90
JMP 0x0013261c
LAB_00132615:
MOV byte ptr [RBP + -0x441],0x0
LAB_0013261c:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x468]
MOV RDI,qword ptr [RBP + -0x440]
CALL RAX
MOV RDI,qword ptr [RBP + -0x438]
CALL 0x00113520
MOV AL,byte ptr [RBP + -0x441]
MOV byte ptr [RBP + -0x44d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013266c
MOV AL,byte ptr [RBP + -0x44d]
ADD RSP,0x450
POP RBP
RET
LAB_0013266c:
CALL 0x001134b0
|
int8 mysql_handle_local_infile(long param_1,int8 param_2,char param_3)
{
int iVar1;
int4 uVar2;
long in_FS_OFFSET;
int1 local_449;
int8 local_448;
void *local_440;
int local_434;
uint local_430;
char local_429;
int8 local_428;
long local_420;
int1 local_418 [512];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_430 = 0x1000;
local_440 = (void *)0x0;
local_448 = 0;
local_449 = 1;
local_429 = param_3;
local_428 = param_2;
local_420 = param_1;
if ((((*(long *)(param_1 + 0x458) == 0) || (*(long *)(param_1 + 0x468) == 0)) ||
(*(long *)(param_1 + 0x460) == 0)) || (*(long *)(param_1 + 0x470) == 0)) {
*(long *)(param_1 + 0x478) = param_1;
mysql_set_local_infile_default(param_1);
}
if (((*(ulong *)(local_420 + 0x3a8) & 0x80) == 0) || (local_429 == '\0')) {
my_set_error(local_420,2000,SQLSTATE_UNKNOWN,"Load data local infile forbidden");
ma_net_write(local_420,"",0);
ma_net_flush(local_420);
}
else {
local_440 = malloc((ulong)local_430);
iVar1 = (**(code **)(local_420 + 0x458))
(&local_448,local_428,*(int8 *)(local_420 + 0x478));
if (iVar1 == 0) {
do {
local_434 = (**(code **)(local_420 + 0x460))(local_448,local_440,local_430);
if (local_434 < 1) {
iVar1 = ma_net_write(local_420,"",0);
if ((iVar1 == 0) && (iVar1 = ma_net_flush(local_420), iVar1 == 0)) {
if (local_434 < 0) {
uVar2 = (**(code **)(local_420 + 0x470))(local_448,local_418,0x200);
my_set_error(local_420,uVar2,SQLSTATE_UNKNOWN,local_418);
}
else {
local_449 = 0;
}
}
else {
my_set_error(local_420,0x7dd,SQLSTATE_UNKNOWN,0);
}
goto LAB_0013261c;
}
iVar1 = ma_net_write(local_420,local_440,(long)local_434);
} while (iVar1 == 0);
my_set_error(local_420,0x7dd,SQLSTATE_UNKNOWN,0);
}
else {
uVar2 = (**(code **)(local_420 + 0x470))(local_448,local_218,0x200);
my_set_error(local_420,uVar2,SQLSTATE_UNKNOWN,local_218);
ma_net_write(local_420,"",0);
ma_net_flush(local_420);
}
}
LAB_0013261c:
(**(code **)(local_420 + 0x468))(local_448);
free(local_440);
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_449);
}
| |
33,668 | mysql_handle_local_infile | eloqsql/libmariadb/libmariadb/ma_loaddata.c | my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename, my_bool can_local_infile)
{
unsigned int buflen= 4096;
int bufread;
unsigned char *buf= NULL;
void *info= NULL;
my_bool result= 1;
/* check if all callback functions exist */
if (!conn->options.local_infile_init || !conn->options.local_infile_end ||
!conn->options.local_infile_read || !conn->options.local_infile_error)
{
conn->options.local_infile_userdata= conn;
mysql_set_local_infile_default(conn);
}
if (!(conn->options.client_flag & CLIENT_LOCAL_FILES) ||
!can_local_infile)
{
my_set_error(conn, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, "Load data local infile forbidden");
/* write empty packet to server */
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* allocate buffer for reading data */
buf = (uchar *)malloc(buflen);
/* init handler: allocate read buffer and open file */
if (conn->options.local_infile_init(&info, filename,
conn->options.local_infile_userdata))
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno;
tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* read data */
while ((bufread= conn->options.local_infile_read(info, (char *)buf, buflen)) > 0)
{
if (ma_net_write(&conn->net, (unsigned char *)buf, bufread))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
}
/* send empty packet for eof */
if (ma_net_write(&conn->net, (unsigned char *)"", 0) ||
ma_net_flush(&conn->net))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
/* error during read occurred */
if (bufread < 0)
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
goto infile_error;
}
result = 0;
infile_error:
conn->options.local_infile_end(info);
free(buf);
return(result);
} | O3 | c | mysql_handle_local_infile:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r15
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x238(%rbp)
movq 0x458(%rdi), %r12
testq %r12, %r12
je 0x25bd9
cmpq $0x0, 0x468(%rbx)
je 0x25bd9
cmpq $0x0, 0x460(%rbx)
je 0x25bd9
cmpq $0x0, 0x470(%rbx)
jne 0x25c18
movq %rbx, 0x478(%rbx)
leaq -0x261(%rip), %r12 # 0x25986
movq %r12, 0x458(%rbx)
leaq -0x17e(%rip), %rax # 0x25a77
movq %rax, 0x460(%rbx)
leaq -0x118(%rip), %rax # 0x25aeb
movq %rax, 0x470(%rbx)
leaq -0xe5(%rip), %rax # 0x25b2c
movq %rax, 0x468(%rbx)
testb %dl, %dl
je 0x25cfa
movq 0x3a8(%rbx), %rax
andl $0x80, %eax
je 0x25cfa
movl $0x1000, %edi # imm = 0x1000
callq 0x13600
movq %rax, %r14
movq 0x478(%rbx), %rdx
leaq -0x238(%rbp), %rdi
movq %r15, %rsi
callq *%r12
testl %eax, %eax
je 0x25c9c
movq -0x238(%rbp), %rdi
leaq -0x230(%rbp), %r15
movq %r15, %rsi
movl $0x200, %edx # imm = 0x200
callq *0x470(%rbx)
leaq 0x28026(%rip), %rcx # 0x4dca0
movq (%rcx), %rdx
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rcx
jmp 0x25d16
movl %r15d, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34437
testl %eax, %eax
jne 0x25cdd
movq -0x238(%rbp), %rdi
movq %r14, %rsi
movl $0x1000, %edx # imm = 0x1000
callq *0x460(%rbx)
movl %eax, %r15d
testl %eax, %eax
jg 0x25c8a
leaq 0x11ad5(%rip), %rsi # 0x37794
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34437
testl %eax, %eax
jne 0x25cdd
movq %rbx, %rdi
callq 0x341f2
testl %eax, %eax
je 0x25d70
leaq 0x27fbc(%rip), %rax # 0x4dca0
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7dd, %esi # imm = 0x7DD
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x187cd
jmp 0x25d36
leaq 0x27f9f(%rip), %rax # 0x4dca0
movq (%rax), %rdx
leaq 0x1391e(%rip), %rcx # 0x39629
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x7d0, %esi # imm = 0x7D0
xorl %eax, %eax
callq 0x187cd
leaq 0x11a70(%rip), %rsi # 0x37794
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34437
movq %rbx, %rdi
callq 0x341f2
movb $0x1, %r15b
movq -0x238(%rbp), %rdi
callq *0x468(%rbx)
movq %r14, %rdi
callq 0x13570
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x25dad
movl %r15d, %eax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
js 0x25d7a
xorl %r15d, %r15d
jmp 0x25d39
movq -0x238(%rbp), %rdi
leaq -0x230(%rbp), %r15
movq %r15, %rsi
movl $0x200, %edx # imm = 0x200
callq *0x470(%rbx)
leaq 0x27f03(%rip), %rcx # 0x4dca0
movq (%rcx), %rdx
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rcx
jmp 0x25cf1
callq 0x13500
nop
| mysql_handle_local_infile:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r15, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
mov [rbp+var_238], 0
mov r12, [rdi+458h]
test r12, r12
jz short loc_25BD9
cmp qword ptr [rbx+468h], 0
jz short loc_25BD9
cmp qword ptr [rbx+460h], 0
jz short loc_25BD9
cmp qword ptr [rbx+470h], 0
jnz short loc_25C18
loc_25BD9:
mov [rbx+478h], rbx
lea r12, mysql_local_infile_init
mov [rbx+458h], r12
lea rax, mysql_local_infile_read
mov [rbx+460h], rax
lea rax, mysql_local_infile_error
mov [rbx+470h], rax
lea rax, mysql_local_infile_end
mov [rbx+468h], rax
loc_25C18:
test dl, dl
jz loc_25CFA
mov rax, [rbx+3A8h]
and eax, 80h
jz loc_25CFA
mov edi, 1000h
call _malloc
mov r14, rax
mov rdx, [rbx+478h]
lea rdi, [rbp+var_238]
mov rsi, r15
call r12
test eax, eax
jz short loc_25C9C
mov rdi, [rbp+var_238]
lea r15, [rbp+var_230]
mov rsi, r15
mov edx, 200h
call qword ptr [rbx+470h]
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rdi, rbx
mov esi, eax
mov rcx, r15
jmp loc_25D16
loc_25C8A:
mov edx, r15d
mov rdi, rbx
mov rsi, r14
call ma_net_write
test eax, eax
jnz short loc_25CDD
loc_25C9C:
mov rdi, [rbp+var_238]
mov rsi, r14
mov edx, 1000h
call qword ptr [rbx+460h]
mov r15d, eax
test eax, eax
jg short loc_25C8A
lea rsi, aExecuteTestWit+29h; ""
mov rdi, rbx
xor edx, edx
call ma_net_write
test eax, eax
jnz short loc_25CDD
mov rdi, rbx
call ma_net_flush
test eax, eax
jz loc_25D70
loc_25CDD:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7DDh
xor ecx, ecx
loc_25CF1:
xor eax, eax
call my_set_error
jmp short loc_25D36
loc_25CFA:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, aLoadDataLocalI; "Load data local infile forbidden"
xor r14d, r14d
mov rdi, rbx
mov esi, 7D0h
loc_25D16:
xor eax, eax
call my_set_error
lea rsi, aExecuteTestWit+29h; ""
mov rdi, rbx
xor edx, edx
call ma_net_write
mov rdi, rbx
call ma_net_flush
loc_25D36:
mov r15b, 1
loc_25D39:
mov rdi, [rbp+var_238]
call qword ptr [rbx+468h]
mov rdi, r14
call _free
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_25DAD
mov eax, r15d
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_25D70:
test r15d, r15d
js short loc_25D7A
xor r15d, r15d
jmp short loc_25D39
loc_25D7A:
mov rdi, [rbp+var_238]
lea r15, [rbp+var_230]
mov rsi, r15
mov edx, 200h
call qword ptr [rbx+470h]
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rdi, rbx
mov esi, eax
mov rcx, r15
jmp loc_25CF1
loc_25DAD:
call ___stack_chk_fail
| long long mysql_handle_local_infile(_QWORD *a1, long long a2, char a3)
{
char *v3; // r15
long long ( *v4)(long long *, long long, long long); // r12
long long v5; // r14
int v6; // eax
int v7; // eax
int v9; // eax
long long v10; // [rsp+8h] [rbp-238h] BYREF
char v11[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v12; // [rsp+218h] [rbp-28h]
LODWORD(v3) = a2;
v12 = __readfsqword(0x28u);
v10 = 0LL;
v4 = (long long ( *)(long long *, long long, long long))a1[139];
if ( !v4 || !a1[141] || !a1[140] || !a1[142] )
{
a1[143] = a1;
v4 = mysql_local_infile_init;
a1[139] = mysql_local_infile_init;
a1[140] = mysql_local_infile_read;
a1[142] = mysql_local_infile_error;
a1[141] = mysql_local_infile_end;
}
if ( !a3 || (a1[117] & 0x80) == 0 )
{
v5 = 0LL;
my_set_error((long long)a1, 2000, (long long)SQLSTATE_UNKNOWN, "Load data local infile forbidden");
goto LABEL_17;
}
v5 = malloc(4096LL);
if ( (unsigned int)v4(&v10, a2, a1[143]) )
{
v3 = v11;
v6 = ((long long ( *)(long long, char *, long long))a1[142])(v10, v11, 512LL);
my_set_error((long long)a1, v6, (long long)SQLSTATE_UNKNOWN, v11);
LABEL_17:
ma_net_write(a1, "", 0LL);
ma_net_flush(a1);
goto LABEL_18;
}
while ( 1 )
{
v7 = ((long long ( *)(long long, long long, long long))a1[140])(v10, v5, 4096LL);
LODWORD(v3) = v7;
if ( v7 <= 0 )
break;
if ( (unsigned int)ma_net_write(a1, v5, (unsigned int)v7) )
goto LABEL_14;
}
if ( (unsigned int)ma_net_write(a1, "", 0LL) || (unsigned int)ma_net_flush(a1) )
{
LABEL_14:
my_set_error((long long)a1, 2013, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_18;
}
if ( (int)v3 >= 0 )
{
LODWORD(v3) = 0;
goto LABEL_19;
}
v3 = v11;
v9 = ((long long ( *)(long long, char *, long long))a1[142])(v10, v11, 512LL);
my_set_error((long long)a1, v9, (long long)SQLSTATE_UNKNOWN, v11);
LABEL_18:
LOBYTE(v3) = 1;
LABEL_19:
((void ( *)(long long))a1[141])(v10);
free(v5);
return (unsigned int)v3;
}
| mysql_handle_local_infile:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x238],0x0
MOV R12,qword ptr [RDI + 0x458]
TEST R12,R12
JZ 0x00125bd9
CMP qword ptr [RBX + 0x468],0x0
JZ 0x00125bd9
CMP qword ptr [RBX + 0x460],0x0
JZ 0x00125bd9
CMP qword ptr [RBX + 0x470],0x0
JNZ 0x00125c18
LAB_00125bd9:
MOV qword ptr [RBX + 0x478],RBX
LEA R12,[0x125986]
MOV qword ptr [RBX + 0x458],R12
LEA RAX,[0x125a77]
MOV qword ptr [RBX + 0x460],RAX
LEA RAX,[0x125aeb]
MOV qword ptr [RBX + 0x470],RAX
LEA RAX,[0x125b2c]
MOV qword ptr [RBX + 0x468],RAX
LAB_00125c18:
TEST DL,DL
JZ 0x00125cfa
MOV RAX,qword ptr [RBX + 0x3a8]
AND EAX,0x80
JZ 0x00125cfa
MOV EDI,0x1000
CALL 0x00113600
MOV R14,RAX
MOV RDX,qword ptr [RBX + 0x478]
LEA RDI,[RBP + -0x238]
MOV RSI,R15
CALL R12
TEST EAX,EAX
JZ 0x00125c9c
MOV RDI,qword ptr [RBP + -0x238]
LEA R15,[RBP + -0x230]
MOV RSI,R15
MOV EDX,0x200
CALL qword ptr [RBX + 0x470]
LEA RCX,[0x14dca0]
MOV RDX,qword ptr [RCX]
MOV RDI,RBX
MOV ESI,EAX
MOV RCX,R15
JMP 0x00125d16
LAB_00125c8a:
MOV EDX,R15D
MOV RDI,RBX
MOV RSI,R14
CALL 0x00134437
TEST EAX,EAX
JNZ 0x00125cdd
LAB_00125c9c:
MOV RDI,qword ptr [RBP + -0x238]
MOV RSI,R14
MOV EDX,0x1000
CALL qword ptr [RBX + 0x460]
MOV R15D,EAX
TEST EAX,EAX
JG 0x00125c8a
LEA RSI,[0x137794]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00134437
TEST EAX,EAX
JNZ 0x00125cdd
MOV RDI,RBX
CALL 0x001341f2
TEST EAX,EAX
JZ 0x00125d70
LAB_00125cdd:
LEA RAX,[0x14dca0]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7dd
XOR ECX,ECX
LAB_00125cf1:
XOR EAX,EAX
CALL 0x001187cd
JMP 0x00125d36
LAB_00125cfa:
LEA RAX,[0x14dca0]
MOV RDX,qword ptr [RAX]
LEA RCX,[0x139629]
XOR R14D,R14D
MOV RDI,RBX
MOV ESI,0x7d0
LAB_00125d16:
XOR EAX,EAX
CALL 0x001187cd
LEA RSI,[0x137794]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00134437
MOV RDI,RBX
CALL 0x001341f2
LAB_00125d36:
MOV R15B,0x1
LAB_00125d39:
MOV RDI,qword ptr [RBP + -0x238]
CALL qword ptr [RBX + 0x468]
MOV RDI,R14
CALL 0x00113570
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00125dad
MOV EAX,R15D
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00125d70:
TEST R15D,R15D
JS 0x00125d7a
XOR R15D,R15D
JMP 0x00125d39
LAB_00125d7a:
MOV RDI,qword ptr [RBP + -0x238]
LEA R15,[RBP + -0x230]
MOV RSI,R15
MOV EDX,0x200
CALL qword ptr [RBX + 0x470]
LEA RCX,[0x14dca0]
MOV RDX,qword ptr [RCX]
MOV RDI,RBX
MOV ESI,EAX
MOV RCX,R15
JMP 0x00125cf1
LAB_00125dad:
CALL 0x00113500
|
ulong mysql_handle_local_infile(long param_1,char *param_2,char param_3)
{
int iVar1;
int4 uVar2;
uint uVar3;
void *__ptr;
char *pcVar4;
code *pcVar5;
ulong uVar6;
long in_FS_OFFSET;
int8 local_240;
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_240 = 0;
pcVar5 = *(code **)(param_1 + 0x458);
if ((((pcVar5 == (code *)0x0) || (*(long *)(param_1 + 0x468) == 0)) ||
(*(long *)(param_1 + 0x460) == 0)) || (*(long *)(param_1 + 0x470) == 0)) {
*(long *)(param_1 + 0x478) = param_1;
pcVar5 = mysql_local_infile_init;
*(code **)(param_1 + 0x458) = mysql_local_infile_init;
*(code **)(param_1 + 0x460) = mysql_local_infile_read;
*(code **)(param_1 + 0x470) = mysql_local_infile_error;
*(code **)(param_1 + 0x468) = mysql_local_infile_end;
}
if ((param_3 == '\0') || ((*(ulong *)(param_1 + 0x3a8) & 0x80) == 0)) {
pcVar4 = "Load data local infile forbidden";
__ptr = (void *)0x0;
uVar2 = 2000;
}
else {
__ptr = malloc(0x1000);
iVar1 = (*pcVar5)(&local_240,param_2,*(int8 *)(param_1 + 0x478));
if (iVar1 == 0) {
do {
uVar3 = (**(code **)(param_1 + 0x460))(local_240,__ptr,0x1000);
if ((int)uVar3 < 1) {
iVar1 = ma_net_write(param_1,"",0);
if (iVar1 == 0) {
iVar1 = ma_net_flush(param_1);
if (iVar1 == 0) {
if (-1 < (int)uVar3) {
uVar6 = 0;
goto LAB_00125d39;
}
pcVar4 = local_238;
uVar2 = (**(code **)(param_1 + 0x470))(local_240,pcVar4,0x200);
param_2 = pcVar4;
goto LAB_00125cf1;
}
}
break;
}
iVar1 = ma_net_write(param_1,__ptr,(char *)(ulong)uVar3);
} while (iVar1 == 0);
uVar2 = 0x7dd;
pcVar4 = (char *)0x0;
param_2 = (char *)(ulong)uVar3;
LAB_00125cf1:
my_set_error(param_1,uVar2,SQLSTATE_UNKNOWN,pcVar4);
goto LAB_00125d36;
}
pcVar4 = local_238;
uVar2 = (**(code **)(param_1 + 0x470))(local_240,pcVar4,0x200);
param_2 = pcVar4;
}
my_set_error(param_1,uVar2,SQLSTATE_UNKNOWN,pcVar4);
ma_net_write(param_1,"",0);
ma_net_flush(param_1);
LAB_00125d36:
uVar6 = CONCAT71((int7)((ulong)param_2 >> 8),1);
LAB_00125d39:
(**(code **)(param_1 + 0x468))(local_240);
free(__ptr);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar6 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,669 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O0 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
subq $0x358, %rsp # imm = 0x358
movq %rdi, 0x70(%rsp)
movq %rdi, %rax
movq %rax, 0x78(%rsp)
movq %rdi, 0x350(%rsp)
movq %rsi, 0x348(%rsp)
movq %rdx, 0x340(%rsp)
movq 0x348(%rsp), %rax
movq %rax, 0x338(%rsp)
movq 0x348(%rsp), %rdi
callq 0x4f300
movq %rax, 0x330(%rsp)
movq 0x348(%rsp), %rdi
callq 0x4fed0
movq %rax, 0x328(%rsp)
movq 0x340(%rsp), %rsi
leaq 0x330(%rsp), %rdi
callq 0x7b150
movq %rax, 0x320(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0x310(%rsp)
movq 0x320(%rsp), %rax
movq %rax, 0x308(%rsp)
movb $0xa, 0x307(%rsp)
movq 0x310(%rsp), %rdi
movq 0x308(%rsp), %rsi
leaq 0x307(%rsp), %rdx
callq 0xf59b0
incq %rax
movq %rax, 0x318(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0x2f0(%rsp)
movq 0x328(%rsp), %rax
movq %rax, 0x2e8(%rsp)
movb $0xa, 0x2e7(%rsp)
movq 0x2f0(%rsp), %rdi
movq 0x2e8(%rsp), %rsi
leaq 0x2e7(%rsp), %rdx
callq 0xf59b0
incq %rax
movq %rax, 0x2f8(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0x2b0(%rsp)
movq 0x320(%rsp), %rax
movq %rax, 0x2a8(%rsp)
leaq 0x2a7(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x4fd90
movq 0x88(%rsp), %rcx
movq 0x2b0(%rsp), %rsi
movq 0x2a8(%rsp), %rdx
leaq 0x2b8(%rsp), %rdi
callq 0x7b1e0
jmp 0x16359f
leaq 0x2b8(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movl $0xa, %esi
movq $-0x1, %rdx
callq 0x4f660
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movq 0x80(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x58(%rsp)
callq 0x50100
leaq 0x2a7(%rsp), %rdi
callq 0x500e0
movq 0x58(%rsp), %rax
movq %rax, 0x2d8(%rsp)
leaq 0x118(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x4fd60
movq 0x60(%rsp), %rdi
leaq 0x563d5(%rip), %rsi # 0x1b99e7
callq 0x4f890
movq %rax, 0x68(%rsp)
jmp 0x16361e
movq 0x68(%rsp), %rdi
movq 0x318(%rsp), %rsi
callq 0x4f560
movq %rax, 0x48(%rsp)
jmp 0x163637
movq 0x48(%rsp), %rdi
leaq 0x5594d(%rip), %rsi # 0x1b8f90
callq 0x4f890
movq %rax, 0x40(%rsp)
jmp 0x16364f
movq 0x40(%rsp), %rdi
movq 0x2d8(%rsp), %rsi
callq 0x4fea0
movq %rax, 0x38(%rsp)
jmp 0x163668
movq 0x38(%rsp), %rdi
leaq 0x5e4a1(%rip), %rsi # 0x1c1b15
callq 0x4f890
jmp 0x16367b
cmpq $0x1, 0x318(%rsp)
jle 0x16374f
movq 0x318(%rsp), %rdx
decq %rdx
leaq 0xf8(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x163990
jmp 0x1636ac
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x4f450
movq %rax, 0x30(%rsp)
jmp 0x1636c8
movq 0x30(%rsp), %rdi
leaq 0x50e3d(%rip), %rsi # 0x1b4511
callq 0x4f890
jmp 0x1636db
leaq 0xf8(%rsp), %rdi
callq 0x50100
jmp 0x16374f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0x2a7(%rsp), %rdi
callq 0x500e0
jmp 0x163976
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x163969
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x50100
jmp 0x163969
movq 0x318(%rsp), %rdx
leaq 0xd8(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x163990
jmp 0x16376e
leaq 0x118(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x4f450
movq %rax, 0x28(%rsp)
jmp 0x16378a
movq 0x28(%rsp), %rdi
leaq 0x50d7b(%rip), %rsi # 0x1b4511
callq 0x4f890
jmp 0x16379d
leaq 0xd8(%rsp), %rdi
callq 0x50100
movq 0x2d8(%rsp), %rax
decq %rax
movq %rax, 0x18(%rsp)
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4fd90
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
leaq 0xb8(%rsp), %rdi
movl $0x20, %edx
callq 0x6e1f0
jmp 0x1637ea
leaq 0x118(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x4f450
movq %rax, 0x10(%rsp)
jmp 0x163806
movq 0x10(%rsp), %rdi
leaq 0x561de(%rip), %rsi # 0x1b99f0
callq 0x4f890
jmp 0x163819
leaq 0xb8(%rsp), %rdi
callq 0x50100
leaq 0xb7(%rsp), %rdi
callq 0x500e0
movq 0x318(%rsp), %rax
cmpq 0x2f8(%rsp), %rax
jge 0x16393b
movq 0x318(%rsp), %rdx
incq %rdx
leaq 0x90(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x163990
jmp 0x16386b
leaq 0x118(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x4f450
movq %rax, 0x8(%rsp)
jmp 0x163887
movq 0x8(%rsp), %rdi
leaq 0x50c7e(%rip), %rsi # 0x1b4511
callq 0x4f890
jmp 0x16389a
leaq 0x90(%rsp), %rdi
callq 0x50100
jmp 0x16393b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x50100
jmp 0x163969
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x163909
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x50100
leaq 0xb7(%rsp), %rdi
callq 0x500e0
jmp 0x163969
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x50100
jmp 0x163969
movq 0x70(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x50030
jmp 0x16394f
leaq 0x118(%rsp), %rdi
callq 0x4fcb0
movq 0x78(%rsp), %rax
addq $0x358, %rsp # imm = 0x358
retq
leaq 0x118(%rsp), %rdi
callq 0x4fcb0
movq 0x298(%rsp), %rdi
callq 0x4f990
nopw %cs:(%rax,%rax)
| _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm_0:
sub rsp, 358h
mov [rsp+358h+var_2E8], rdi
mov rax, rdi
mov [rsp+358h+var_2E0], rax
mov [rsp+358h+var_8], rdi
mov [rsp+358h+var_10], rsi
mov [rsp+358h+var_18], rdx
mov rax, [rsp+358h+var_10]
mov [rsp+358h+var_20], rax
mov rdi, [rsp+358h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+358h+var_28], rax
mov rdi, [rsp+358h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+358h+var_30], rax
mov rsi, [rsp+358h+var_18]
lea rdi, [rsp+358h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long)
mov [rsp+358h+var_38], rax
mov rax, [rsp+358h+var_28]
mov [rsp+358h+var_48], rax
mov rax, [rsp+358h+var_38]
mov [rsp+358h+var_50], rax
mov [rsp+358h+var_51], 0Ah
mov rdi, [rsp+358h+var_48]
mov rsi, [rsp+358h+var_50]
lea rdx, [rsp+358h+var_51]
call _ZSt5countIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcENSt15iterator_traitsIT_E15difference_typeESC_SC_RKT0_; std::count<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&)
inc rax
mov [rsp+358h+var_40], rax
mov rax, [rsp+358h+var_28]
mov [rsp+358h+var_68], rax
mov rax, [rsp+358h+var_30]
mov [rsp+358h+var_70], rax
mov [rsp+358h+var_71], 0Ah
mov rdi, [rsp+358h+var_68]
mov rsi, [rsp+358h+var_70]
lea rdx, [rsp+358h+var_71]
call _ZSt5countIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcENSt15iterator_traitsIT_E15difference_typeESC_SC_RKT0_; std::count<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&)
inc rax
mov [rsp+358h+var_60], rax
mov rax, [rsp+358h+var_18]
mov [rsp+358h+var_2D8], rax
mov rax, [rsp+358h+var_28]
mov [rsp+358h+var_A8], rax
mov rax, [rsp+358h+var_38]
mov [rsp+358h+var_B0], rax
lea rdi, [rsp+358h+var_B1]
mov [rsp+358h+var_2D0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rcx, [rsp+358h+var_2D0]
mov rsi, [rsp+358h+var_A8]
mov rdx, [rsp+358h+var_B0]
lea rdi, [rsp+358h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEET_SB_RKS3_; std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<char> const&)
jmp short $+2
loc_16359F:
lea rdi, [rsp+358h+var_A0]
mov [rsp+358h+var_308], rdi
mov esi, 0Ah
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
mov rdi, [rsp+358h+var_308]; void *
mov rcx, rax
mov rax, [rsp+358h+var_2D8]
sub rax, rcx
mov [rsp+358h+var_300], rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+358h+var_B1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+358h+var_300]
mov [rsp+358h+var_80], rax
lea rdi, [rsp+358h+var_240]
mov [rsp+358h+var_2F8], rdi
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, [rsp+358h+var_2F8]
lea rsi, aAtRow; " at row "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+358h+var_2F0], rax
jmp short $+2
loc_16361E:
mov rdi, [rsp+358h+var_2F0]
mov rsi, [rsp+358h+var_40]
call __ZNSolsEl; std::ostream::operator<<(long)
mov [rsp+358h+var_310], rax
jmp short $+2
loc_163637:
mov rdi, [rsp+358h+var_310]
lea rsi, aColumn; ", column "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+358h+var_318], rax
jmp short $+2
loc_16364F:
mov rdi, [rsp+358h+var_318]
mov rsi, [rsp+358h+var_80]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rsp+358h+var_320], rax
jmp short $+2
loc_163668:
mov rdi, [rsp+358h+var_320]
lea rsi, aJsonSchemaConv+1Dh; ":\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_16367B:
cmp [rsp+358h+var_40], 1
jle loc_16374F
mov rdx, [rsp+358h+var_40]
dec rdx
lea rdi, [rsp+358h+var_260]
lea rsi, [rsp+358h+var_20]
call _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0; minja::error_location_suffix(std::string const&,ulong)::$_0::operator()(ulong)
jmp short $+2
loc_1636AC:
lea rdi, [rsp+358h+var_240]
lea rsi, [rsp+358h+var_260]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+358h+var_328], rax
jmp short $+2
loc_1636C8:
mov rdi, [rsp+358h+var_328]
lea rsi, aToControlTheBe+2Ah; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1636DB:
lea rdi, [rsp+358h+var_260]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_16374F
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
lea rdi, [rsp+arg_29F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_163976
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
jmp loc_163969
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
lea rdi, [rsp+arg_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_163969
loc_16374F:
mov rdx, [rsp+358h+var_40]
lea rdi, [rsp+358h+var_280]
lea rsi, [rsp+358h+var_20]
call _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0; minja::error_location_suffix(std::string const&,ulong)::$_0::operator()(ulong)
jmp short $+2
loc_16376E:
lea rdi, [rsp+358h+var_240]
lea rsi, [rsp+358h+var_280]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+358h+var_330], rax
jmp short $+2
loc_16378A:
mov rdi, [rsp+358h+var_330]
lea rsi, aToControlTheBe+2Ah; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_16379D:
lea rdi, [rsp+358h+var_280]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+358h+var_80]
dec rax
mov [rsp+358h+var_340], rax
lea rdi, [rsp+358h+var_2A1]
mov [rsp+358h+var_338], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+358h+var_340]
mov rcx, [rsp+358h+var_338]
lea rdi, [rsp+358h+var_2A0]
mov edx, 20h ; ' '
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
jmp short $+2
loc_1637EA:
lea rdi, [rsp+358h+var_240]
lea rsi, [rsp+358h+var_2A0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+358h+var_348], rax
jmp short $+2
loc_163806:
mov rdi, [rsp+358h+var_348]
lea rsi, asc_1B99F0; "^\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_163819:
lea rdi, [rsp+358h+var_2A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+358h+var_2A1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+358h+var_40]
cmp rax, [rsp+358h+var_60]
jge loc_16393B
mov rdx, [rsp+358h+var_40]
inc rdx
lea rdi, [rsp+358h+var_2C8]
lea rsi, [rsp+358h+var_20]
call _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0; minja::error_location_suffix(std::string const&,ulong)::$_0::operator()(ulong)
jmp short $+2
loc_16386B:
lea rdi, [rsp+358h+var_240]
lea rsi, [rsp+358h+var_2C8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+358h+var_350], rax
jmp short $+2
loc_163887:
mov rdi, [rsp+358h+var_350]
lea rsi, aToControlTheBe+2Ah; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_16389A:
lea rdi, [rsp+358h+var_2C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_16393B
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
lea rdi, [rsp+arg_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_163969
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
jmp short loc_163909
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
lea rdi, [rsp+arg_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_163909:
lea rdi, [rsp+arg_AF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_163969
mov rcx, rax
mov eax, edx
mov [rsp+arg_290], rcx
mov [rsp+arg_28C], eax
lea rdi, [rsp+arg_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_163969
loc_16393B:
mov rdi, [rsp+358h+var_2E8]
lea rsi, [rsp+358h+var_240]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_16394F:
lea rdi, [rsp+358h+var_240]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rax, [rsp+358h+var_2E0]
add rsp, 358h
retn
loc_163969:
lea rdi, [rsp+arg_110]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_163976:
mov rdi, [rsp+arg_290]
call __Unwind_Resume
| long long minja::error_location_suffix(long long a1, long long a2, long long a3)
{
long long v3; // rsi
int v4; // ecx
int v5; // r8d
int v6; // r9d
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v11; // [rsp+8h] [rbp-350h]
long long v12; // [rsp+10h] [rbp-348h]
long long v13; // [rsp+18h] [rbp-340h]
long long v14; // [rsp+28h] [rbp-330h]
long long v15; // [rsp+30h] [rbp-328h]
long long v16; // [rsp+38h] [rbp-320h]
long long v17; // [rsp+40h] [rbp-318h]
long long v18; // [rsp+48h] [rbp-310h]
long long v19; // [rsp+58h] [rbp-300h]
long long v20; // [rsp+68h] [rbp-2F0h]
long long v21; // [rsp+80h] [rbp-2D8h]
_BYTE v22[39]; // [rsp+90h] [rbp-2C8h] BYREF
char v23; // [rsp+B7h] [rbp-2A1h] BYREF
_BYTE v24[32]; // [rsp+B8h] [rbp-2A0h] BYREF
_BYTE v25[32]; // [rsp+D8h] [rbp-280h] BYREF
_BYTE v26[32]; // [rsp+F8h] [rbp-260h] BYREF
_BYTE v27[399]; // [rsp+118h] [rbp-240h] BYREF
char v28; // [rsp+2A7h] [rbp-B1h] BYREF
long long v29; // [rsp+2A8h] [rbp-B0h]
long long v30; // [rsp+2B0h] [rbp-A8h]
_BYTE v31[32]; // [rsp+2B8h] [rbp-A0h] BYREF
long long v32; // [rsp+2D8h] [rbp-80h]
char v33; // [rsp+2E7h] [rbp-71h] BYREF
long long v34; // [rsp+2E8h] [rbp-70h]
long long v35; // [rsp+2F0h] [rbp-68h]
long long v36; // [rsp+2F8h] [rbp-60h]
char v37; // [rsp+307h] [rbp-51h] BYREF
long long v38; // [rsp+308h] [rbp-50h]
long long v39; // [rsp+310h] [rbp-48h]
long long v40; // [rsp+318h] [rbp-40h]
long long v41; // [rsp+320h] [rbp-38h]
long long v42; // [rsp+328h] [rbp-30h]
long long v43; // [rsp+330h] [rbp-28h] BYREF
long long v44; // [rsp+338h] [rbp-20h] BYREF
long long v45; // [rsp+340h] [rbp-18h]
long long v46; // [rsp+348h] [rbp-10h]
long long v47; // [rsp+350h] [rbp-8h]
v47 = a1;
v46 = a2;
v45 = a3;
v44 = a2;
v43 = std::string::begin(a2);
v42 = std::string::end(a2);
v41 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(&v43, v45);
v39 = v43;
v38 = v41;
v37 = 10;
v40 = std::count<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v43, v41, (long long)&v37) + 1;
v35 = v43;
v34 = v42;
v33 = 10;
v3 = v42;
v36 = std::count<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v43, v42, (long long)&v33) + 1;
v21 = v45;
v30 = v43;
v29 = v41;
std::allocator<char>::allocator(&v28, v3);
std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(
(long long)v31,
v30,
v29,
(long long)&v28);
v19 = v21 - std::string::rfind(v31, 10LL, -1LL);
std::string::~string(v31);
std::allocator<char>::~allocator(&v28);
v32 = v19;
std::ostringstream::basic_ostringstream(v27);
v20 = std::operator<<<std::char_traits<char>>(v27, " at row ");
v18 = std::ostream::operator<<(v20, v40);
v17 = std::operator<<<std::char_traits<char>>(v18, ", column ");
v16 = std::ostream::operator<<(v17, v32);
std::operator<<<std::char_traits<char>>(v16, ":\n");
if ( v40 > 1 )
{
minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
(unsigned int)v26,
(unsigned int)&v44,
v40 - 1,
v4,
v5,
v6);
v15 = std::operator<<<char>(v27, v26);
std::operator<<<std::char_traits<char>>(v15, "\n");
std::string::~string(v26);
}
minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
(unsigned int)v25,
(unsigned int)&v44,
v40,
v4,
v5,
v6);
v14 = std::operator<<<char>(v27, v25);
std::operator<<<std::char_traits<char>>(v14, "\n");
std::string::~string(v25);
v13 = v32 - 1;
std::allocator<char>::allocator(&v23, "\n");
std::string::basic_string<std::allocator<char>>((long long)v24, v13, 32, (long long)&v23);
v12 = std::operator<<<char>(v27, v24);
std::operator<<<std::char_traits<char>>(v12, "^\n");
std::string::~string(v24);
std::allocator<char>::~allocator(&v23);
if ( v40 < v36 )
{
minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
(unsigned int)v22,
(unsigned int)&v44,
v40 + 1,
v7,
v8,
v9);
v11 = std::operator<<<char>(v27, v22);
std::operator<<<std::char_traits<char>>(v11, "\n");
std::string::~string(v22);
}
std::ostringstream::str(a1, v27);
std::ostringstream::~ostringstream(v27);
return a1;
}
| |||
33,670 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O2 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %r14
pushq $0x1
popq %rbp
leaq 0x6(%rsp), %r13
movq (%r12), %rax
movq (%rax), %rsi
addq 0x8(%rax), %rsi
cmpq %r15, %rbp
jae 0x28291
movb $0xa, 0x6(%rsp)
movq %r14, %rdi
movq %r13, %rdx
callq 0x5679a
movq %rax, %r14
incq %r14
incq %rbp
jmp 0x28266
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r14, %rdi
callq 0x5679a
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5667e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rax, [rsi]
mov r14, [rax]
push 1
pop rbp
lea r13, [rsp+38h+var_32]
loc_28266:
mov rax, [r12]
mov rsi, [rax]
add rsi, [rax+8]
cmp rbp, r15
jnb short loc_28291
mov [rsp+38h+var_32], 0Ah
mov rdi, r14
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r14, rax
inc r14
inc rbp
jmp short loc_28266
loc_28291:
lea rdx, [rsp+38h+var_31]
mov byte ptr [rdx], 0Ah
mov rdi, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rcx, [rbx+10h]
mov [rbx], rcx
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
_QWORD *a1,
long long **a2,
unsigned long long a3)
{
long long v3; // rax
long long v6; // r14
unsigned long long i; // rbp
long long v8; // rsi
long long v9; // rax
_WORD v11[25]; // [rsp+0h] [rbp-32h] BYREF
v11[0] = HIWORD(v3);
v6 = **a2;
for ( i = 1LL; ; ++i )
{
v8 = (*a2)[1] + **a2;
if ( i >= a3 )
break;
LOBYTE(v11[0]) = 10;
v6 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v6,
v8,
v11)
+ 1;
}
HIBYTE(v11[0]) = 10;
v9 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v6,
v8,
(char *)v11 + 1);
*a1 = a1 + 2;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(a1, v6, v9);
return a1;
}
| operator()[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV R14,qword ptr [RAX]
PUSH 0x1
POP RBP
LEA R13,[RSP + 0x6]
LAB_00128266:
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [RAX]
ADD RSI,qword ptr [RAX + 0x8]
CMP RBP,R15
JNC 0x00128291
MOV byte ptr [RSP + 0x6],0xa
MOV RDI,R14
MOV RDX,R13
CALL 0x0015679a
MOV R14,RAX
INC R14
INC RBP
JMP 0x00128266
LAB_00128291:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R14
CALL 0x0015679a
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x0015667e
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* operator()[abi:cxx11](unsigned long) const */
ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0::
operator()[abi_cxx11_(ulong param_1)
{
int8 in_RAX;
long lVar1;
int8 uVar2;
ulong in_RDX;
ulong uVar3;
long *in_RSI;
long lVar4;
int8 uStack_38;
lVar1 = *(long *)*in_RSI;
uStack_38 = in_RAX;
for (uVar3 = 1; lVar4 = *(long *)*in_RSI + ((long *)*in_RSI)[1], uVar3 < in_RDX; uVar3 = uVar3 + 1
) {
uStack_38._0_7_ = CONCAT16(10,(int6)uStack_38);
lVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar4,(long)&uStack_38 + 6);
lVar1 = lVar1 + 1;
}
uStack_38 = CONCAT17(10,(int7)uStack_38);
uVar2 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar4);
*(ulong *)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(param_1,lVar1,uVar2);
return param_1;
}
| |
33,671 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O3 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, 0x38(%rsp)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
testq %rdx, %rdx
je 0x87caa
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %edx, %edx
cmpb $0xa, (%rsi,%rcx)
sete %dl
addq %rdx, %r12
incq %rcx
cmpq %rcx, %r8
jne 0x87c94
jmp 0x87cad
xorl %r12d, %r12d
leaq (%rsi,%r8), %rdx
testq %rax, %rax
movq %r8, 0x28(%rsp)
je 0x87cd7
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %edi, %edi
cmpb $0xa, (%rsi,%rcx)
sete %dil
addq %rdi, %r15
incq %rcx
cmpq %rcx, %rax
jne 0x87cc0
jmp 0x87cda
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x5c2a2
movq %rbx, %rdi
movl $0xa, %esi
movq $-0x1, %rdx
callq 0x18d00
movq %rax, %r13
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x87d1c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x18880
leaq 0x241af(%rip), %rsi # 0xabedf
movl $0x8, %edx
movq %rbx, %rdi
callq 0x18770
movq 0x28(%rsp), %rbx
leaq 0x1(%r12), %rsi
leaq 0x40(%rsp), %rdi
movq %rsi, 0x30(%rsp)
callq 0x18650
movq %rax, %rbp
leaq 0x2374a(%rip), %rsi # 0xab4aa
movl $0x9, %edx
movq %rax, %rdi
callq 0x18770
subq %r13, %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x18490
leaq 0x2a4d9(%rip), %rsi # 0xb225b
movl $0x2, %edx
movq %rax, %rdi
callq 0x18770
testq %r12, %r12
jle 0x87e3e
movq (%r14), %r13
cmpq $0x1, %r12
jne 0x87da6
movq %r13, %rsi
jmp 0x87dd2
leaq -0x1(%r12), %rbp
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0x5c45a
movq %rax, %r13
incq %r13
decq %rbp
jne 0x87dab
movq (%r14), %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0x5c45a
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x5c2a2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x18770
leaq 0x1f5fd(%rip), %rsi # 0xa7417
movl $0x1, %edx
movq %rax, %rdi
callq 0x18770
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87e3e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq (%r14), %r13
cmpq $0x2, 0x30(%rsp)
jb 0x87e82
movq %rbx, 0x28(%rsp)
leaq 0x7(%rsp), %rbp
movq %r12, %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
movq %rbp, %rdx
callq 0x5c45a
movq %rax, %r13
incq %r13
decq %rbx
jne 0x87e56
movq (%r14), %rsi
movq 0x28(%rsp), %rbx
jmp 0x87e85
movq %r13, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0x5c45a
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x5c2a2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x18770
leaq 0x1f54a(%rip), %rsi # 0xa7417
movl $0x1, %edx
movq %rax, %rdi
callq 0x18770
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87ef1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
decq %rbx
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %rbx, %rsi
movl $0x20, %edx
callq 0x187a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x18770
leaq 0x23fc4(%rip), %rsi # 0xabee8
movl $0x2, %edx
movq %rax, %rdi
callq 0x18770
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87f48
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
cmpq %r15, %r12
jge 0x87ff4
movq (%r14), %r15
cmpq $-0x3, %r12
ja 0x87f8b
leaq 0x7(%rsp), %r13
movq 0x30(%rsp), %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r15, %rdi
movq %r13, %rdx
callq 0x5c45a
movq %rax, %r15
incq %r15
decq %rbx
jne 0x87f64
movq (%r14), %rsi
jmp 0x87f8e
movq %r15, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r15, %rdi
callq 0x5c45a
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %r15, %rsi
movq %rax, %rdx
callq 0x5c2a2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x18770
leaq 0x1f447(%rip), %rsi # 0xa7417
movl $0x1, %edx
movq %rax, %rdi
callq 0x18770
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x87ff4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x18a40
movq 0x54f6e(%rip), %rsi # 0xdcf78
leaq 0x40(%rsp), %rdi
callq 0x183b0
leaq 0xb0(%rsp), %rdi
callq 0x18210
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8805d
jmp 0x8805d
jmp 0x88041
jmp 0x8805d
jmp 0x8805d
jmp 0x88041
jmp 0x88041
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x88060
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x88060
movq %rax, %rbx
movq 0x54f11(%rip), %rsi # 0xdcf78
leaq 0x40(%rsp), %rdi
callq 0x183b0
leaq 0xb0(%rsp), %rdi
callq 0x18210
movq %rbx, %rdi
callq 0x18b90
| _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov r8, rdx
mov r14, rsi
mov [rsp+1E8h+var_1B0], rdi
mov rsi, [rsi]
mov rax, [r14+8]
test rdx, rdx
jz short loc_87CAA
xor ecx, ecx
xor r12d, r12d
loc_87C94:
xor edx, edx
cmp byte ptr [rsi+rcx], 0Ah
setz dl
add r12, rdx
inc rcx
cmp r8, rcx
jnz short loc_87C94
jmp short loc_87CAD
loc_87CAA:
xor r12d, r12d
loc_87CAD:
lea rdx, [rsi+r8]
test rax, rax
mov [rsp+1E8h+var_1C0], r8
jz short loc_87CD7
xor ecx, ecx
xor r15d, r15d
loc_87CC0:
xor edi, edi
cmp byte ptr [rsi+rcx], 0Ah
setz dil
add r15, rdi
inc rcx
cmp rax, rcx
jnz short loc_87CC0
jmp short loc_87CDA
loc_87CD7:
xor r15d, r15d
loc_87CDA:
lea rbp, [rsp+1E8h+var_198]
mov [rbp-10h], rbp
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdi, rbx
mov esi, 0Ah
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
mov r13, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_87D1C
mov rsi, [rsp+1E8h+var_198]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87D1C:
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aAtRow; " at row "
mov edx, 8
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+1E8h+var_1C0]
lea rsi, [r12+1]
lea rdi, [rsp+1E8h+var_1A8]
mov [rsp+1E8h+var_1B8], rsi
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rbp, rax
lea rsi, aColumn; ", column "
mov edx, 9
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)
sub rbx, r13
mov rdi, rbp
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aJsonSchemaConv+1Dh; ":\n"
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)
test r12, r12
jle loc_87E3E
mov r13, [r14]
cmp r12, 1
jnz short loc_87DA6
mov rsi, r13
jmp short loc_87DD2
loc_87DA6:
lea rbp, [r12-1]
loc_87DAB:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
lea rdx, [rsp+1E8h+var_1E1]
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbp
jnz short loc_87DAB
mov rsi, [r14]
loc_87DD2:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+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)
lea rsi, aUsageSOptions+14h; "\n"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_87E3E
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87E3E:
mov r13, [r14]
cmp [rsp+1E8h+var_1B8], 2
jb short loc_87E82
mov [rsp+1E8h+var_1C0], rbx
lea rbp, [rsp+1E8h+var_1E1]
mov rbx, r12
loc_87E56:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
mov rdx, rbp
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbx
jnz short loc_87E56
mov rsi, [r14]
mov rbx, [rsp+1E8h+var_1C0]
jmp short loc_87E85
loc_87E82:
mov rsi, r13
loc_87E85:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+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)
lea rsi, aUsageSOptions+14h; "\n"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_87EF1
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87EF1:
dec rbx
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, rbx
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+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)
lea rsi, asc_ABEE8; "^\n"
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)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_87F48
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87F48:
cmp r12, r15
jge loc_87FF4
mov r15, [r14]
cmp r12, 0FFFFFFFFFFFFFFFDh
ja short loc_87F8B
lea r13, [rsp+1E8h+var_1E1]
mov rbx, [rsp+1E8h+var_1B8]
loc_87F64:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r15
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r15, rax
inc r15
dec rbx
jnz short loc_87F64
mov rsi, [r14]
jmp short loc_87F8E
loc_87F8B:
mov rsi, r15
loc_87F8E:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, r15
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+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)
lea rsi, aUsageSOptions+14h; "\n"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_87FF4
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87FF4:
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, [rsp+1E8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_8805D
jmp short loc_8805D
jmp short loc_88041
jmp short loc_8805D
jmp short loc_8805D
jmp short loc_88041
jmp short $+2
loc_88041:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_88060
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_88060
loc_8805D:
mov rbx, rax
loc_88060:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_A8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| void minja::error_location_suffix(long long a1, long long a2, long long a3)
{
_BYTE *v4; // rsi
long long v5; // rax
long long v6; // rcx
long long v7; // r12
long long v8; // rcx
long long v9; // r15
long long v10; // r13
long long v11; // rbp
long long v12; // rbx
long long v13; // rax
_BYTE *v14; // r13
_BYTE *v15; // rsi
long long v16; // rbp
long long v17; // rsi
long long v18; // rsi
_BYTE *v19; // rax
long long v20; // rax
_BYTE *v21; // r13
long long v22; // rbx
long long v23; // rsi
_BYTE *v24; // rsi
long long v25; // rsi
_BYTE *v26; // rax
long long v27; // rax
long long v28; // rax
_BYTE *v29; // r15
unsigned long long v30; // rbx
long long v31; // rsi
_BYTE *v32; // rsi
long long v33; // rsi
_BYTE *v34; // rax
long long v35; // rax
char v36; // [rsp+7h] [rbp-1E1h] BYREF
void *v37; // [rsp+8h] [rbp-1E0h] BYREF
long long v38; // [rsp+10h] [rbp-1D8h]
_QWORD v39[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v40; // [rsp+28h] [rbp-1C0h]
unsigned long long v41; // [rsp+30h] [rbp-1B8h]
long long v42; // [rsp+38h] [rbp-1B0h]
_QWORD *v43; // [rsp+40h] [rbp-1A8h] BYREF
_BYTE v44[8]; // [rsp+48h] [rbp-1A0h] BYREF
_QWORD v45[12]; // [rsp+50h] [rbp-198h] BYREF
_BYTE v46[312]; // [rsp+B0h] [rbp-138h] BYREF
v42 = a1;
v4 = *(_BYTE **)a2;
v5 = *(_QWORD *)(a2 + 8);
if ( a3 )
{
v6 = 0LL;
v7 = 0LL;
do
v7 += v4[v6++] == 10;
while ( a3 != v6 );
}
else
{
v7 = 0LL;
}
v40 = a3;
if ( v5 )
{
v8 = 0LL;
v9 = 0LL;
do
v9 += v4[v8++] == 10;
while ( v5 != v8 );
}
else
{
v9 = 0LL;
}
v43 = v45;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v43, v4, (long long)&v4[a3]);
v10 = std::string::rfind(&v43, 10LL, -1LL);
if ( v43 != v45 )
operator delete(v43, v45[0] + 1LL);
std::ostringstream::basic_ostringstream(&v43);
std::__ostream_insert<char,std::char_traits<char>>(&v43, " at row ", 8LL);
v41 = v7 + 1;
v11 = std::ostream::_M_insert<long>(&v43);
std::__ostream_insert<char,std::char_traits<char>>(v11, ", column ", 9LL);
v12 = v40 - v10;
v13 = std::ostream::_M_insert<unsigned long>(v11, v40 - v10);
std::__ostream_insert<char,std::char_traits<char>>(v13, ":\n", 2LL);
if ( v7 > 0 )
{
v14 = *(_BYTE **)a2;
if ( v7 == 1 )
{
v15 = *(_BYTE **)a2;
}
else
{
v16 = v7 - 1;
do
{
v17 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v14 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v17,
&v36)
+ 1;
--v16;
}
while ( v16 );
v15 = *(_BYTE **)a2;
}
v18 = (long long)&v15[*(_QWORD *)(a2 + 8)];
v36 = 10;
v19 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v18,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v14, (long long)v19);
v20 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v20, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
v21 = *(_BYTE **)a2;
if ( v41 < 2 )
{
v24 = *(_BYTE **)a2;
}
else
{
v40 = v12;
v22 = v7;
do
{
v23 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v21 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v23,
&v36)
+ 1;
--v22;
}
while ( v22 );
v24 = *(_BYTE **)a2;
v12 = v40;
}
v25 = (long long)&v24[*(_QWORD *)(a2 + 8)];
v36 = 10;
v26 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v25,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v21, (long long)v26);
v27 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v27, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
v37 = v39;
std::string::_M_construct(&v37, v12 - 1, 32LL);
v28 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v28, "^\n", 2LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
if ( v7 < v9 )
{
v29 = *(_BYTE **)a2;
if ( (unsigned long long)v7 > 0xFFFFFFFFFFFFFFFDLL )
{
v32 = *(_BYTE **)a2;
}
else
{
v30 = v41;
do
{
v31 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v29 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v31,
&v36)
+ 1;
--v30;
}
while ( v30 );
v32 = *(_BYTE **)a2;
}
v33 = (long long)&v32[*(_QWORD *)(a2 + 8)];
v36 = 10;
v34 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v33,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v29, (long long)v34);
v35 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v35, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
std::stringbuf::str(v42, v44);
std::ostringstream::~ostringstream(&v43, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v46);
}
| error_location_suffix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV R8,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x38],RDI
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr [R14 + 0x8]
TEST RDX,RDX
JZ 0x00187caa
XOR ECX,ECX
XOR R12D,R12D
LAB_00187c94:
XOR EDX,EDX
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DL
ADD R12,RDX
INC RCX
CMP R8,RCX
JNZ 0x00187c94
JMP 0x00187cad
LAB_00187caa:
XOR R12D,R12D
LAB_00187cad:
LEA RDX,[RSI + R8*0x1]
TEST RAX,RAX
MOV qword ptr [RSP + 0x28],R8
JZ 0x00187cd7
XOR ECX,ECX
XOR R15D,R15D
LAB_00187cc0:
XOR EDI,EDI
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DIL
ADD R15,RDI
INC RCX
CMP RAX,RCX
JNZ 0x00187cc0
JMP 0x00187cda
LAB_00187cd7:
XOR R15D,R15D
LAB_00187cda:
LEA RBP,[RSP + 0x50]
MOV qword ptr [RBP + -0x10],RBP
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0015c2a2
MOV RDI,RBX
MOV ESI,0xa
MOV RDX,-0x1
CALL 0x00118d00
MOV R13,RAX
MOV RDI,qword ptr [RBX]
CMP RDI,RBP
JZ 0x00187d1c
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x001186a0
LAB_00187d1c:
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x00118880
LAB_00187d29:
LEA RSI,[0x1abedf]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x00118770
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[R12 + 0x1]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x30],RSI
CALL 0x00118650
MOV RBP,RAX
LEA RSI,[0x1ab4aa]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x00118770
SUB RBX,R13
MOV RDI,RBP
MOV RSI,RBX
CALL 0x00118490
LEA RSI,[0x1b225b]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00118770
TEST R12,R12
JLE 0x00187e3e
MOV R13,qword ptr [R14]
CMP R12,0x1
JNZ 0x00187da6
MOV RSI,R13
JMP 0x00187dd2
LAB_00187da6:
LEA RBP,[R12 + -0x1]
LAB_00187dab:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
LEA RDX,[RSP + 0x7]
CALL 0x0015c45a
MOV R13,RAX
INC R13
DEC RBP
JNZ 0x00187dab
MOV RSI,qword ptr [R14]
LAB_00187dd2:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x0015c45a
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_00187def:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x0015c2a2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00187e09:
LEA RDI,[RSP + 0x40]
CALL 0x00118770
LEA RSI,[0x1a7417]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00118770
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00187e3e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_00187e3e:
MOV R13,qword ptr [R14]
CMP qword ptr [RSP + 0x30],0x2
JC 0x00187e82
MOV qword ptr [RSP + 0x28],RBX
LEA RBP,[RSP + 0x7]
MOV RBX,R12
LAB_00187e56:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
MOV RDX,RBP
CALL 0x0015c45a
MOV R13,RAX
INC R13
DEC RBX
JNZ 0x00187e56
MOV RSI,qword ptr [R14]
MOV RBX,qword ptr [RSP + 0x28]
JMP 0x00187e85
LAB_00187e82:
MOV RSI,R13
LAB_00187e85:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x0015c45a
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_00187ea2:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x0015c2a2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00187ebc:
LEA RDI,[RSP + 0x40]
CALL 0x00118770
LEA RSI,[0x1a7417]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00118770
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00187ef1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_00187ef1:
DEC RBX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_00187efc:
MOV RSI,RBX
MOV EDX,0x20
CALL 0x001187a0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00187f13:
LEA RDI,[RSP + 0x40]
CALL 0x00118770
LEA RSI,[0x1abee8]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00118770
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00187f48
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_00187f48:
CMP R12,R15
JGE 0x00187ff4
MOV R15,qword ptr [R14]
CMP R12,-0x3
JA 0x00187f8b
LEA R13,[RSP + 0x7]
MOV RBX,qword ptr [RSP + 0x30]
LAB_00187f64:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R15
MOV RDX,R13
CALL 0x0015c45a
MOV R15,RAX
INC R15
DEC RBX
JNZ 0x00187f64
MOV RSI,qword ptr [R14]
JMP 0x00187f8e
LAB_00187f8b:
MOV RSI,R15
LAB_00187f8e:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R15
CALL 0x0015c45a
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_00187faa:
MOV RSI,R15
MOV RDX,RAX
CALL 0x0015c2a2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00187fbf:
LEA RDI,[RSP + 0x40]
CALL 0x00118770
LEA RSI,[0x1a7417]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00118770
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00187ff4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_00187ff4:
LEA RSI,[RSP + 0x48]
LAB_00187ff9:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00118a40
LAB_00188003:
MOV RSI,qword ptr [0x001dcf78]
LEA RDI,[RSP + 0x40]
CALL 0x001183b0
LEA RDI,[RSP + 0xb0]
CALL 0x00118210
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */
void __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2)
{
long lVar1;
ostream *poVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 local_1e1;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
ulong local_1c0;
ulong local_1b8;
minja *local_1b0;
long *local_1a8 [2];
long local_198 [12];
ios_base local_138 [264];
lVar1 = *(long *)param_1;
if (param_2 == 0) {
uVar8 = 0;
}
else {
uVar4 = 0;
uVar8 = 0;
do {
uVar8 = uVar8 + (*(char *)(lVar1 + uVar4) == '\n');
uVar4 = uVar4 + 1;
} while (param_2 != uVar4);
}
if (*(long *)(param_1 + 8) == 0) {
lVar9 = 0;
}
else {
lVar5 = 0;
lVar9 = 0;
do {
lVar9 = lVar9 + (ulong)(*(char *)(lVar1 + lVar5) == '\n');
lVar5 = lVar5 + 1;
} while (*(long *)(param_1 + 8) != lVar5);
}
local_1c0 = param_2;
local_1b0 = this;
local_1a8[0] = local_198;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(local_1a8,lVar1,lVar1 + param_2);
lVar1 = std::__cxx11::string::rfind((char)local_1a8,10);
if (local_1a8[0] != local_198) {
operator_delete(local_1a8[0],local_198[0] + 1);
}
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
/* try { // try from 00187d29 to 00187d8e has its CatchHandler @ 0018805d */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8," at row ",8);
uVar4 = local_1c0;
local_1b8 = uVar8 + 1;
poVar2 = std::ostream::_M_insert<long>((long)local_1a8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", column ",9);
uVar4 = uVar4 - lVar1;
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2);
if (0 < (long)uVar8) {
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (uVar8 != 1) {
lVar7 = uVar8 - 1;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
/* try { // try from 00187def to 00187dfe has its CatchHandler @ 00188035 */
local_1e0 = local_1d0;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 00187e09 to 00187e26 has its CatchHandler @ 0018803d */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (1 < local_1b8) {
uVar6 = uVar8;
local_1c0 = uVar4;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
uVar6 = uVar6 - 1;
} while (uVar6 != 0);
lVar1 = *(long *)param_1;
uVar4 = local_1c0;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
/* try { // try from 00187ea2 to 00187eb1 has its CatchHandler @ 0018803b */
local_1e0 = local_1d0;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 00187ebc to 00187ed9 has its CatchHandler @ 00188041 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
local_1e0 = local_1d0;
/* try { // try from 00187efc to 00187f08 has its CatchHandler @ 00188039 */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar4 + -1);
/* try { // try from 00187f13 to 00187f30 has its CatchHandler @ 0018803f */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"^\n",2);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
if ((long)uVar8 < lVar9) {
lVar1 = *(long *)param_1;
lVar9 = lVar1;
if (uVar8 < 0xfffffffffffffffe) {
uVar8 = local_1b8;
do {
local_1e1 = 10;
lVar9 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar9 = lVar9 + 1;
uVar8 = uVar8 - 1;
} while (uVar8 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,lVar1 + *(long *)(param_1 + 8));
local_1e0 = local_1d0;
/* try { // try from 00187faa to 00187fb4 has its CatchHandler @ 00188033 */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar9,uVar3);
/* try { // try from 00187fbf to 00187fdc has its CatchHandler @ 00188037 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
/* try { // try from 00187ff9 to 00188002 has its CatchHandler @ 0018805d */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return;
}
| |
33,672 | stbi__build_huffman | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__build_huffman(stbi__huffman *h, int *count)
{
int i,j,k=0;
unsigned int code;
// build size list for each symbol (from JPEG spec)
for (i=0; i < 16; ++i) {
for (j=0; j < count[i]; ++j) {
h->size[k++] = (stbi_uc) (i+1);
if(k >= 257) return stbi__err("bad size list","Corrupt JPEG");
}
}
h->size[k] = 0;
// compute actual symbols (from jpeg spec)
code = 0;
k = 0;
for(j=1; j <= 16; ++j) {
// compute delta to add to code to compute symbol id
h->delta[j] = k - code;
if (h->size[k] == j) {
while (h->size[k] == j)
h->code[k++] = (stbi__uint16) (code++);
if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG");
}
// compute largest code + 1 for this size, preshifted as needed later
h->maxcode[j] = code << (16-j);
code <<= 1;
}
h->maxcode[j] = 0xffffffff;
// build non-spec acceleration table; 255 is flag for not-accelerated
memset(h->fast, 255, 1 << FAST_BITS);
for (i=0; i < k; ++i) {
int s = h->size[i];
if (s <= FAST_BITS) {
int c = h->code[i] << (FAST_BITS-s);
int m = 1 << (FAST_BITS-s);
for (j=0; j < m; ++j) {
h->fast[c+j] = (stbi_uc) i;
}
}
}
return 1;
} | O1 | c | stbi__build_huffman:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
leaq 0xfc22(%rip), %r14 # 0x480f5
xorl %edx, %edx
cmpl $0x0, (%rsi,%rcx,4)
jle 0x3851d
leal 0x1(%rcx), %edi
movslq %edx, %r9
cmpl $0x101, %r9d # imm = 0x101
movl $0x100, %r8d # imm = 0x100
cmovgel %r9d, %r8d
movl %r9d, %r10d
addq %rax, %r9
negl %r8d
addq %r10, %r8
xorl %r10d, %r10d
movb %dil, (%r9,%r10)
movl %r8d, %r11d
addl %r10d, %r11d
je 0x3861b
incq %r10
cmpl (%rsi,%rcx,4), %r10d
jl 0x38501
addl %r10d, %edx
incq %rcx
cmpq $0x10, %rcx
jne 0x384d5
movslq %edx, %rax
movb $0x0, 0x500(%rbx,%rax)
xorl %edx, %edx
movl $0x1, %eax
leaq 0xfbc4(%rip), %r14 # 0x48103
xorl %ebp, %ebp
movl %ebp, %ecx
subl %edx, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %ebp, %rcx
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x38594
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x38585
movw %dx, 0x200(%rbx,%rcx,2)
incl %edx
movzbl 0x501(%rbx,%rcx), %esi
incq %rcx
cmpq %rsi, %rax
je 0x38569
movl %ecx, %ebp
leal -0x1(%rdx), %esi
movl %eax, %ecx
shrl %cl, %esi
testl %esi, %esi
jne 0x3861b
movb $0x10, %cl
subb %al, %cl
movl %edx, %esi
shll %cl, %esi
movl %esi, 0x604(%rbx,%rax,4)
addl %edx, %edx
incq %rax
cmpq $0x11, %rax
jne 0x38541
movl $0xffffffff, 0x648(%rbx) # imm = 0xFFFFFFFF
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0xa1e0
movl $0x1, %eax
testl %ebp, %ebp
jle 0x38630
movl %ebp, %edx
xorl %esi, %esi
movzbl 0x500(%rbx,%rsi), %r8d
cmpq $0x9, %r8
ja 0x38611
movzwl 0x200(%rbx,%rsi,2), %edi
movl $0x9, %ecx
subq %r8, %rcx
shlq %cl, %rdi
addq %rbx, %rdi
xorl %r8d, %r8d
movb %sil, (%rdi,%r8)
incq %r8
movl %r8d, %r9d
shrl %cl, %r9d
testl %r9d, %r9d
je 0x385ff
incq %rsi
cmpq %rdx, %rsi
jne 0x385d7
jmp 0x38630
movq %fs:0x0, %rax
movq %r14, -0x8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stbi__build_huffman:
push rbp
push r14
push rbx
mov rbx, rdi
lea rax, [rdi+500h]
xor ecx, ecx
lea r14, aBadSizeList; "bad size list"
xor edx, edx
loc_384D5:
cmp dword ptr [rsi+rcx*4], 0
jle short loc_3851D
lea edi, [rcx+1]
movsxd r9, edx
cmp r9d, 101h
mov r8d, 100h
cmovge r8d, r9d
mov r10d, r9d
add r9, rax
neg r8d
add r8, r10
xor r10d, r10d
loc_38501:
mov [r9+r10], dil
mov r11d, r8d
add r11d, r10d
jz loc_3861B
inc r10
cmp r10d, [rsi+rcx*4]
jl short loc_38501
add edx, r10d
loc_3851D:
inc rcx
cmp rcx, 10h
jnz short loc_384D5
movsxd rax, edx
mov byte ptr [rbx+rax+500h], 0
xor edx, edx
mov eax, 1
lea r14, aBadCodeLengths; "bad code lengths"
xor ebp, ebp
loc_38541:
mov ecx, ebp
sub ecx, edx
mov [rbx+rax*4+64Ch], ecx
movsxd rcx, ebp
movzx esi, byte ptr [rbx+rcx+500h]
cmp rax, rsi
jnz short loc_38594
movzx esi, byte ptr [rbx+rcx+500h]
cmp rax, rsi
jnz short loc_38585
loc_38569:
mov [rbx+rcx*2+200h], dx
inc edx
movzx esi, byte ptr [rbx+rcx+501h]
inc rcx
cmp rax, rsi
jz short loc_38569
mov ebp, ecx
loc_38585:
lea esi, [rdx-1]
mov ecx, eax
shr esi, cl
test esi, esi
jnz loc_3861B
loc_38594:
mov cl, 10h
sub cl, al
mov esi, edx
shl esi, cl
mov [rbx+rax*4+604h], esi
add edx, edx
inc rax
cmp rax, 11h
jnz short loc_38541
mov dword ptr [rbx+648h], 0FFFFFFFFh
mov edx, 200h
mov rdi, rbx
mov esi, 0FFh
call _memset
mov eax, 1
test ebp, ebp
jle short loc_38630
mov edx, ebp
xor esi, esi
loc_385D7:
movzx r8d, byte ptr [rbx+rsi+500h]
cmp r8, 9
ja short loc_38611
movzx edi, word ptr [rbx+rsi*2+200h]
mov ecx, 9
sub rcx, r8
shl rdi, cl
add rdi, rbx
xor r8d, r8d
loc_385FF:
mov [rdi+r8], sil
inc r8
mov r9d, r8d
shr r9d, cl
test r9d, r9d
jz short loc_385FF
loc_38611:
inc rsi
cmp rsi, rdx
jnz short loc_385D7
jmp short loc_38630
loc_3861B:
mov rax, fs:0
mov [rax-8], r14
xor eax, eax
loc_38630:
pop rbx
pop r14
pop rbp
retn
| long long stbi__build_huffman(long long a1, long long a2)
{
long long v3; // rcx
const char *v4; // r14
int v5; // edx
int v6; // r8d
int v7; // r8d
long long v8; // r10
int v9; // edx
long long v10; // rax
int v11; // ebp
long long v12; // rcx
long long v13; // rsi
long long result; // rax
long long i; // rsi
unsigned long long v16; // r8
char v17; // cl
long long v18; // rdi
long long v19; // r8
v3 = 0LL;
v4 = "bad size list";
v5 = 0;
while ( *(int *)(a2 + 4 * v3) <= 0 )
{
LABEL_9:
if ( ++v3 == 16 )
{
*(_BYTE *)(a1 + v5 + 1280) = 0;
v9 = 0;
v10 = 1LL;
v4 = "bad code lengths";
v11 = 0;
while ( 1 )
{
*(_DWORD *)(a1 + 4 * v10 + 1612) = v11 - v9;
v12 = v11;
if ( v10 == *(unsigned __int8 *)(a1 + v11 + 1280) )
{
do
{
*(_WORD *)(a1 + 2 * v12 + 512) = v9++;
v13 = *(unsigned __int8 *)(a1 + v12++ + 1281);
}
while ( v10 == v13 );
v11 = v12;
if ( (unsigned int)(v9 - 1) >> v10 )
break;
}
*(_DWORD *)(a1 + 4 * v10 + 1540) = v9 << (16 - v10);
v9 *= 2;
if ( ++v10 == 17 )
{
*(_DWORD *)(a1 + 1608) = -1;
memset(a1, 255LL, 512LL);
result = 1LL;
if ( v11 > 0 )
{
for ( i = 0LL; i != v11; ++i )
{
v16 = *(unsigned __int8 *)(a1 + i + 1280);
if ( v16 <= 9 )
{
v17 = 9 - v16;
v18 = a1 + ((unsigned long long)*(unsigned __int16 *)(a1 + 2 * i + 512) << (9 - (unsigned __int8)v16));
v19 = 0LL;
do
*(_BYTE *)(v18 + v19++) = i;
while ( !((unsigned int)v19 >> v17) );
}
}
}
return result;
}
}
goto LABEL_22;
}
}
v6 = 256;
if ( v5 >= 257 )
v6 = v5;
v7 = v5 - v6;
v8 = 0LL;
while ( 1 )
{
*(_BYTE *)(a1 + 1280 + v5 + v8) = v3 + 1;
if ( !((_DWORD)v8 + v7) )
break;
if ( (int)++v8 >= *(_DWORD *)(a2 + 4 * v3) )
{
v5 += v8;
goto LABEL_9;
}
}
LABEL_22:
*(_QWORD *)(__readfsqword(0) - 8) = v4;
return 0LL;
}
| stbi__build_huffman:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x500]
XOR ECX,ECX
LEA R14,[0x1480f5]
XOR EDX,EDX
LAB_001384d5:
CMP dword ptr [RSI + RCX*0x4],0x0
JLE 0x0013851d
LEA EDI,[RCX + 0x1]
MOVSXD R9,EDX
CMP R9D,0x101
MOV R8D,0x100
CMOVGE R8D,R9D
MOV R10D,R9D
ADD R9,RAX
NEG R8D
ADD R8,R10
XOR R10D,R10D
LAB_00138501:
MOV byte ptr [R9 + R10*0x1],DIL
MOV R11D,R8D
ADD R11D,R10D
JZ 0x0013861b
INC R10
CMP R10D,dword ptr [RSI + RCX*0x4]
JL 0x00138501
ADD EDX,R10D
LAB_0013851d:
INC RCX
CMP RCX,0x10
JNZ 0x001384d5
MOVSXD RAX,EDX
MOV byte ptr [RBX + RAX*0x1 + 0x500],0x0
XOR EDX,EDX
MOV EAX,0x1
LEA R14,[0x148103]
XOR EBP,EBP
LAB_00138541:
MOV ECX,EBP
SUB ECX,EDX
MOV dword ptr [RBX + RAX*0x4 + 0x64c],ECX
MOVSXD RCX,EBP
MOVZX ESI,byte ptr [RBX + RCX*0x1 + 0x500]
CMP RAX,RSI
JNZ 0x00138594
MOVZX ESI,byte ptr [RBX + RCX*0x1 + 0x500]
CMP RAX,RSI
JNZ 0x00138585
LAB_00138569:
MOV word ptr [RBX + RCX*0x2 + 0x200],DX
INC EDX
MOVZX ESI,byte ptr [RBX + RCX*0x1 + 0x501]
INC RCX
CMP RAX,RSI
JZ 0x00138569
MOV EBP,ECX
LAB_00138585:
LEA ESI,[RDX + -0x1]
MOV ECX,EAX
SHR ESI,CL
TEST ESI,ESI
JNZ 0x0013861b
LAB_00138594:
MOV CL,0x10
SUB CL,AL
MOV ESI,EDX
SHL ESI,CL
MOV dword ptr [RBX + RAX*0x4 + 0x604],ESI
ADD EDX,EDX
INC RAX
CMP RAX,0x11
JNZ 0x00138541
MOV dword ptr [RBX + 0x648],0xffffffff
MOV EDX,0x200
MOV RDI,RBX
MOV ESI,0xff
CALL 0x0010a1e0
MOV EAX,0x1
TEST EBP,EBP
JLE 0x00138630
MOV EDX,EBP
XOR ESI,ESI
LAB_001385d7:
MOVZX R8D,byte ptr [RBX + RSI*0x1 + 0x500]
CMP R8,0x9
JA 0x00138611
MOVZX EDI,word ptr [RBX + RSI*0x2 + 0x200]
MOV ECX,0x9
SUB RCX,R8
SHL RDI,CL
ADD RDI,RBX
XOR R8D,R8D
LAB_001385ff:
MOV byte ptr [RDI + R8*0x1],SIL
INC R8
MOV R9D,R8D
SHR R9D,CL
TEST R9D,R9D
JZ 0x001385ff
LAB_00138611:
INC RSI
CMP RSI,RDX
JNZ 0x001385d7
JMP 0x00138630
LAB_0013861b:
MOV RAX,qword ptr FS:[0x0]
MOV qword ptr [RAX + -0x8],R14
XOR EAX,EAX
LAB_00138630:
POP RBX
POP R14
POP RBP
RET
|
int8 stbi__build_huffman(void *param_1,long param_2)
{
ushort uVar1;
ulong uVar2;
byte bVar3;
uint uVar4;
long lVar5;
int iVar6;
int iVar7;
long lVar8;
char *pcVar9;
long *in_FS_OFFSET;
lVar5 = 0;
pcVar9 = "bad size list";
iVar6 = 0;
do {
if (0 < *(int *)(param_2 + lVar5 * 4)) {
iVar7 = 0x100;
if (0x100 < iVar6) {
iVar7 = iVar6;
}
lVar8 = 0;
do {
*(char *)((long)param_1 + lVar8 + (long)iVar6 + 0x500) = (char)lVar5 + '\x01';
if ((iVar6 - iVar7) + (int)lVar8 == 0) goto LAB_0013861b;
lVar8 = lVar8 + 1;
} while ((int)lVar8 < *(int *)(param_2 + lVar5 * 4));
iVar6 = iVar6 + (int)lVar8;
}
lVar5 = lVar5 + 1;
} while (lVar5 != 0x10);
*(int1 *)((long)param_1 + (long)iVar6 + 0x500) = 0;
iVar6 = 0;
uVar2 = 1;
pcVar9 = "bad code lengths";
uVar4 = 0;
do {
*(uint *)((long)param_1 + uVar2 * 4 + 0x64c) = uVar4 - iVar6;
lVar5 = (long)(int)uVar4;
if (uVar2 == *(byte *)((long)param_1 + lVar5 + 0x500)) {
if (uVar2 == *(byte *)((long)param_1 + lVar5 + 0x500)) {
do {
*(short *)((long)param_1 + lVar5 * 2 + 0x200) = (short)iVar6;
iVar6 = iVar6 + 1;
lVar8 = lVar5 + 0x501;
lVar5 = lVar5 + 1;
} while (uVar2 == *(byte *)((long)param_1 + lVar8));
uVar4 = (uint)lVar5;
}
if (iVar6 - 1U >> ((byte)uVar2 & 0x1f) != 0) {
LAB_0013861b:
*(char **)(*in_FS_OFFSET + -8) = pcVar9;
return 0;
}
}
*(int *)((long)param_1 + uVar2 * 4 + 0x604) = iVar6 << (0x10 - (byte)uVar2 & 0x1f);
iVar6 = iVar6 * 2;
uVar2 = uVar2 + 1;
if (uVar2 == 0x11) {
*(int4 *)((long)param_1 + 0x648) = 0xffffffff;
memset(param_1,0xff,0x200);
if (0 < (int)uVar4) {
uVar2 = 0;
do {
bVar3 = *(byte *)((long)param_1 + uVar2 + 0x500);
if (bVar3 < 10) {
uVar1 = *(ushort *)((long)param_1 + uVar2 * 2 + 0x200);
bVar3 = 9 - bVar3;
lVar5 = 0;
do {
*(char *)((long)param_1 + lVar5 + ((ulong)uVar1 << (bVar3 & 0x3f))) = (char)uVar2;
lVar5 = lVar5 + 1;
} while ((uint)lVar5 >> (bVar3 & 0x1f) == 0);
}
uVar2 = uVar2 + 1;
} while (uVar2 != uVar4);
}
return 1;
}
} while( true );
}
| |
33,673 | PVG_FT_Vector_Rotate | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c | void PVG_FT_Vector_Rotate(PVG_FT_Vector* vec, PVG_FT_Angle angle)
{
PVG_FT_Int shift;
PVG_FT_Vector v = *vec;
if ( v.x == 0 && v.y == 0 )
return;
shift = ft_trig_prenorm( &v );
ft_trig_pseudo_rotate( &v, angle );
v.x = ft_trig_downscale( v.x );
v.y = ft_trig_downscale( v.y );
if ( shift > 0 )
{
PVG_FT_Int32 half = (PVG_FT_Int32)1L << ( shift - 1 );
vec->x = ( v.x + half - ( v.x < 0 ) ) >> shift;
vec->y = ( v.y + half - ( v.y < 0 ) ) >> shift;
}
else
{
shift = -shift;
vec->x = (PVG_FT_Pos)( (PVG_FT_ULong)v.x << shift );
vec->y = (PVG_FT_Pos)( (PVG_FT_ULong)v.y << shift );
}
} | O0 | c | PVG_FT_Vector_Rotate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3a4d6
cmpq $0x0, -0x20(%rbp)
jne 0x3a4d6
jmp 0x3a5b1
leaq -0x28(%rbp), %rdi
callq 0x3a130
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x39ee0
movq -0x28(%rbp), %rdi
callq 0x3a5c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3a5c0
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x3a580
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, -0x28(%rbp)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movl -0x14(%rbp), %ecx
sarq %cl, %rax
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, -0x20(%rbp)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movl -0x14(%rbp), %ecx
sarq %cl, %rax
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3a5b1
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| PVG_FT_Vector_Rotate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rcx, [rax]
mov [rbp+var_28], rcx
mov rax, [rax+8]
mov [rbp+var_20], rax
cmp [rbp+var_28], 0
jnz short loc_3A4D6
cmp [rbp+var_20], 0
jnz short loc_3A4D6
jmp loc_3A5B1
loc_3A4D6:
lea rdi, [rbp+var_28]
call ft_trig_prenorm
mov [rbp+var_14], eax
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_28]
call ft_trig_pseudo_rotate
mov rdi, [rbp+var_28]
call ft_trig_downscale
mov [rbp+var_28], rax
mov rdi, [rbp+var_20]
call ft_trig_downscale
mov [rbp+var_20], rax
cmp [rbp+var_14], 0
jle short loc_3A580
mov ecx, [rbp+var_14]
sub ecx, 1
mov eax, 1
shl eax, cl
mov [rbp+var_2C], eax
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_2C]
add rax, rcx
cmp [rbp+var_28], 0
setl cl
and cl, 1
movzx ecx, cl
movsxd rcx, ecx
sub rax, rcx
mov ecx, [rbp+var_14]
sar rax, cl
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_2C]
add rax, rcx
cmp [rbp+var_20], 0
setl cl
and cl, 1
movzx ecx, cl
movsxd rcx, ecx
sub rax, rcx
mov ecx, [rbp+var_14]
sar rax, cl
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+8], rcx
jmp short loc_3A5B1
loc_3A580:
xor eax, eax
sub eax, [rbp+var_14]
mov [rbp+var_14], eax
mov rax, [rbp+var_28]
mov ecx, [rbp+var_14]
shl rax, cl
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
shl rax, cl
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+8], rcx
loc_3A5B1:
add rsp, 30h
pop rbp
retn
| long long * PVG_FT_Vector_Rotate(long long *a1, long long a2)
{
long long *result; // rax
int v3; // [rsp+4h] [rbp-2Ch]
long long v4; // [rsp+8h] [rbp-28h] BYREF
long long v5; // [rsp+10h] [rbp-20h]
int v6; // [rsp+1Ch] [rbp-14h]
long long v7; // [rsp+20h] [rbp-10h]
long long *v8; // [rsp+28h] [rbp-8h]
v8 = a1;
v7 = a2;
v4 = *a1;
result = (long long *)a1[1];
v5 = (long long)result;
if ( v4 || v5 )
{
v6 = ft_trig_prenorm(&v4);
ft_trig_pseudo_rotate(&v4, v7);
v4 = ft_trig_downscale(v4);
v5 = ft_trig_downscale(v5);
if ( v6 <= 0 )
{
v6 = -v6;
*v8 = v4 << v6;
result = v8;
v8[1] = v5 << v6;
}
else
{
v3 = 1 << (v6 - 1);
*v8 = (v3 + v4 - (v4 < 0)) >> v6;
result = v8;
v8[1] = (v3 + v5 - (v5 < 0)) >> v6;
}
}
return result;
}
| PVG_FT_Vector_Rotate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0013a4d6
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0013a4d6
JMP 0x0013a5b1
LAB_0013a4d6:
LEA RDI,[RBP + -0x28]
CALL 0x0013a130
MOV dword ptr [RBP + -0x14],EAX
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x28]
CALL 0x00139ee0
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013a5c0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0013a5c0
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x14],0x0
JLE 0x0013a580
MOV ECX,dword ptr [RBP + -0x14]
SUB ECX,0x1
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
CMP qword ptr [RBP + -0x28],0x0
SETL CL
AND CL,0x1
MOVZX ECX,CL
MOVSXD RCX,ECX
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x14]
SAR RAX,CL
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
CMP qword ptr [RBP + -0x20],0x0
SETL CL
AND CL,0x1
MOVZX ECX,CL
MOVSXD RCX,ECX
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x14]
SAR RAX,CL
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013a5b1
LAB_0013a580:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x14]
SHL RAX,CL
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
SHL RAX,CL
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_0013a5b1:
ADD RSP,0x30
POP RBP
RET
|
void PVG_FT_Vector_Rotate(long *param_1,int8 param_2)
{
byte bVar1;
int iVar2;
long lVar3;
long local_30;
long local_28;
int local_1c;
int8 local_18;
long *local_10;
local_30 = *param_1;
local_28 = param_1[1];
if ((local_30 != 0) || (local_28 != 0)) {
local_18 = param_2;
local_10 = param_1;
local_1c = ft_trig_prenorm(&local_30);
ft_trig_pseudo_rotate(&local_30,local_18);
local_30 = ft_trig_downscale(local_30);
lVar3 = ft_trig_downscale(local_28);
bVar1 = (byte)local_1c;
if (local_1c < 1) {
*local_10 = local_30 << (-bVar1 & 0x3f);
local_10[1] = lVar3 << (-bVar1 & 0x3f);
}
else {
iVar2 = 1 << (bVar1 - 1 & 0x1f);
*local_10 = (local_30 + iVar2) - (long)(int)(uint)(local_30 < 0) >> (bVar1 & 0x3f);
local_10[1] = (lVar3 + iVar2) - (long)(int)(uint)(lVar3 < 0) >> (bVar1 & 0x3f);
}
}
return;
}
| |
33,674 | deadlock | eloqsql/mysys/waiting_threads.c | static int deadlock(WT_THD *thd, WT_THD *blocker, uint depth,
uint max_depth)
{
struct deadlock_arg arg= {thd, max_depth, 0, 0};
int ret;
DBUG_ENTER("deadlock");
DBUG_ASSERT(depth < 2);
ret= deadlock_search(&arg, blocker, depth);
if (ret == WT_DEPTH_EXCEEDED)
{
increment_cycle_stats(WT_CYCLE_STATS, max_depth ==
*thd->deadlock_search_depth_long);
ret= WT_OK;
}
/*
if we started with depth==1, blocker was never considered for a victim
in deadlock_search(). Do it here.
*/
if (ret == WT_DEADLOCK && depth)
change_victim(blocker, &arg);
if (arg.last_locked_rc)
{
/*
Special return code if there's nobody to wait for.
depth == 0 means that we start the search from thd (thd == blocker).
ret == WT_OK means that no cycle was found and
arg.last_locked_rc == thd->waiting_for.
and arg.last_locked_rc->owners.elements == 0 means that
(applying the rule above) thd->waiting_for->owners.elements == 0,
and thd doesn't have anybody to wait for.
*/
if (depth == 0 && ret == WT_OK && arg.last_locked_rc->owners.elements == 0)
{
DBUG_ASSERT(thd == blocker);
DBUG_ASSERT(arg.last_locked_rc == thd->waiting_for);
ret= WT_FREE_TO_GO;
}
rc_unlock(arg.last_locked_rc);
}
/* notify the victim, if appropriate */
if (ret == WT_DEADLOCK && arg.victim != thd)
{
DBUG_PRINT("wt", ("killing %s", arg.victim->name));
arg.victim->killed= 1;
mysql_cond_broadcast(&arg.victim->waiting_for->cond);
rc_unlock(arg.victim->waiting_for);
ret= WT_OK;
}
DBUG_RETURN(ret);
} | O3 | c | deadlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r13d
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x48(%rbp), %rdi
movq %rbx, (%rdi)
movl %ecx, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
callq 0xa8233
cmpl $-0x2, %eax
jne 0xa7d40
movl %r13d, %eax
movq 0x50(%rbx), %rcx
xorl %edx, %edx
cmpq %rax, (%rcx)
sete %dl
movl %edx, %eax
shll $0x7, %eax
leal (%rax,%rdx,4), %eax
leaq 0xb6318c(%rip), %rcx # 0xc0aec0
incl 0x80(%rcx,%rax)
xorl %r12d, %r12d
jmp 0xa7d7c
movl %eax, %r12d
cmpl $-0x1, %eax
setne %al
testl %r15d, %r15d
sete %cl
orb %al, %cl
jne 0xa7d7c
movq 0x58(%r14), %rcx
movq -0x38(%rbp), %rax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmpq 0x58(%rax), %rcx
jae 0xa7d7c
cmpq -0x48(%rbp), %rax
je 0xa7db1
movq 0x28(%rax), %rdi
addq $0x18, %rdi
callq 0xa53c2
jmp 0xa7db1
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xa7da7
orl %r12d, %r15d
jne 0xa7d9e
xorl %eax, %eax
cmpl $0x0, 0xe8(%rdi)
setne %al
leal (%rax,%rax,2), %r12d
addl $-0x3, %r12d
addq $0x18, %rdi
callq 0xa53c2
cmpl $-0x1, %r12d
jne 0xa7df2
movq -0x38(%rbp), %r14
cmpq %rbx, %r14
je 0xa7dec
movb $0x1, 0x60(%r14)
movq 0x28(%r14), %rbx
movq 0xd8(%rbx), %rdi
addq $0xa8, %rbx
testq %rdi, %rdi
jne 0xa7e04
movq %rbx, %rdi
callq 0x296f0
movq 0x28(%r14), %rdi
addq $0x18, %rdi
callq 0xa53c2
xorl %r12d, %r12d
jmp 0xa7df2
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e02b5(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x178(%rax)
jmp 0xa7dd2
| deadlock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r13d, ecx
mov r15d, edx
mov r14, rsi
mov rbx, rdi
lea rdi, [rbp+var_48]
mov [rdi], rbx
mov [rdi+8], ecx
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
call deadlock_search
cmp eax, 0FFFFFFFEh
jnz short loc_A7D40
mov eax, r13d
mov rcx, [rbx+50h]
xor edx, edx
cmp [rcx], rax
setz dl
mov eax, edx
shl eax, 7
lea eax, [rax+rdx*4]
lea rcx, wt_cycle_stats
inc dword ptr [rcx+rax+80h]
xor r12d, r12d
jmp short loc_A7D7C
loc_A7D40:
mov r12d, eax
cmp eax, 0FFFFFFFFh
setnz al
test r15d, r15d
setz cl
or cl, al
jnz short loc_A7D7C
mov rcx, [r14+58h]
mov rax, [rbp+var_38]
mov r12d, 0FFFFFFFFh
cmp rcx, [rax+58h]
jnb short loc_A7D7C
cmp rax, [rbp+var_48]
jz short loc_A7DB1
mov rdi, [rax+28h]
add rdi, 18h
call my_rw_unlock
jmp short loc_A7DB1
loc_A7D7C:
mov rdi, [rbp+var_30]
test rdi, rdi
jz short loc_A7DA7
or r15d, r12d
jnz short loc_A7D9E
xor eax, eax
cmp dword ptr [rdi+0E8h], 0
setnz al
lea r12d, [rax+rax*2]
add r12d, 0FFFFFFFDh
loc_A7D9E:
add rdi, 18h
call my_rw_unlock
loc_A7DA7:
cmp r12d, 0FFFFFFFFh
jnz short loc_A7DF2
mov r14, [rbp+var_38]
loc_A7DB1:
cmp r14, rbx
jz short loc_A7DEC
mov byte ptr [r14+60h], 1
mov rbx, [r14+28h]
mov rdi, [rbx+0D8h]
add rbx, 0A8h
test rdi, rdi
jnz short loc_A7E04
loc_A7DD2:
mov rdi, rbx
call _pthread_cond_broadcast
mov rdi, [r14+28h]
add rdi, 18h
call my_rw_unlock
xor r12d, r12d
jmp short loc_A7DF2
loc_A7DEC:
mov r12d, 0FFFFFFFFh
loc_A7DF2:
mov eax, r12d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A7E04:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp short loc_A7DD2
| long long deadlock(long long a1, long long a2, int a3, int a4)
{
long long v6; // r14
unsigned int v7; // eax
long long v8; // rax
unsigned int v9; // r12d
long long v10; // rbx
long long v11; // rdi
long long v12; // rbx
v6 = a2;
v7 = deadlock_search();
if ( v7 == -2 )
{
v8 = 132 * (unsigned int)(**(_QWORD **)(a1 + 80) == a4);
++*(_DWORD *)((char *)&wt_cycle_stats + v8 + 128);
v9 = 0;
}
else
{
v9 = v7;
if ( v7 == -1 && a3 != 0 )
{
v9 = -1;
if ( *(_QWORD *)(a2 + 88) < 0x40uLL )
{
if ( a1 )
my_rw_unlock(4380696LL);
goto LABEL_9;
}
}
}
if ( v9 != -1 )
return v9;
v6 = 0LL;
LABEL_9:
if ( v6 == a1 )
{
return (unsigned int)-1;
}
else
{
*(_BYTE *)(v6 + 96) = 1;
v10 = *(_QWORD *)(v6 + 40);
v11 = *(_QWORD *)(v10 + 216);
v12 = v10 + 168;
if ( v11 )
PSI_server[47]();
pthread_cond_broadcast(v12);
my_rw_unlock(*(_QWORD *)(v6 + 40) + 24LL);
return 0;
}
}
| deadlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R13D,ECX
MOV R15D,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RBP + -0x48]
MOV qword ptr [RDI],RBX
MOV dword ptr [RDI + 0x8],ECX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x001a8233
CMP EAX,-0x2
JNZ 0x001a7d40
MOV EAX,R13D
MOV RCX,qword ptr [RBX + 0x50]
XOR EDX,EDX
CMP qword ptr [RCX],RAX
SETZ DL
MOV EAX,EDX
SHL EAX,0x7
LEA EAX,[RAX + RDX*0x4]
LEA RCX,[0xd0aec0]
INC dword ptr [RCX + RAX*0x1 + 0x80]
XOR R12D,R12D
JMP 0x001a7d7c
LAB_001a7d40:
MOV R12D,EAX
CMP EAX,-0x1
SETNZ AL
TEST R15D,R15D
SETZ CL
OR CL,AL
JNZ 0x001a7d7c
MOV RCX,qword ptr [R14 + 0x58]
MOV RAX,qword ptr [RBP + -0x38]
MOV R12D,0xffffffff
CMP RCX,qword ptr [RAX + 0x58]
JNC 0x001a7d7c
CMP RAX,qword ptr [RBP + -0x48]
JZ 0x001a7db1
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x18
CALL 0x001a53c2
JMP 0x001a7db1
LAB_001a7d7c:
MOV RDI,qword ptr [RBP + -0x30]
TEST RDI,RDI
JZ 0x001a7da7
OR R15D,R12D
JNZ 0x001a7d9e
XOR EAX,EAX
CMP dword ptr [RDI + 0xe8],0x0
SETNZ AL
LEA R12D,[RAX + RAX*0x2]
ADD R12D,-0x3
LAB_001a7d9e:
ADD RDI,0x18
CALL 0x001a53c2
LAB_001a7da7:
CMP R12D,-0x1
JNZ 0x001a7df2
MOV R14,qword ptr [RBP + -0x38]
LAB_001a7db1:
CMP R14,RBX
JZ 0x001a7dec
MOV byte ptr [R14 + 0x60],0x1
MOV RBX,qword ptr [R14 + 0x28]
MOV RDI,qword ptr [RBX + 0xd8]
ADD RBX,0xa8
TEST RDI,RDI
JNZ 0x001a7e04
LAB_001a7dd2:
MOV RDI,RBX
CALL 0x001296f0
MOV RDI,qword ptr [R14 + 0x28]
ADD RDI,0x18
CALL 0x001a53c2
XOR R12D,R12D
JMP 0x001a7df2
LAB_001a7dec:
MOV R12D,0xffffffff
LAB_001a7df2:
MOV EAX,R12D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a7e04:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x001a7dd2
|
/* WARNING: Removing unreachable block (ram,0x001a7d85) */
/* WARNING: Removing unreachable block (ram,0x001a7d8a) */
/* WARNING: Removing unreachable block (ram,0x001a7d9e) */
int deadlock(long param_1,long param_2,int param_3,uint param_4)
{
long lVar1;
int iVar2;
bool bVar3;
iVar2 = deadlock_search();
if (iVar2 == -2) {
bVar3 = **(ulong **)(param_1 + 0x50) == (ulong)param_4;
*(int *)(wt_cycle_stats + (ulong)((uint)bVar3 * 0x80 + (uint)bVar3 * 4) + 0x80) =
*(int *)(wt_cycle_stats + (ulong)((uint)bVar3 * 0x80 + (uint)bVar3 * 4) + 0x80) + 1;
iVar2 = 0;
}
else if ((param_3 != 0 && iVar2 == -1) &&
(iVar2 = -1, *(ulong *)(param_2 + 0x58) < uRam0000000000000058)) {
if (param_1 != 0) {
my_rw_unlock(lRam0000000000000028 + 0x18);
}
goto LAB_001a7db1;
}
if (iVar2 != -1) {
return iVar2;
}
param_2 = 0;
LAB_001a7db1:
if (param_2 == param_1) {
iVar2 = -1;
}
else {
*(int1 *)(param_2 + 0x60) = 1;
lVar1 = *(long *)(param_2 + 0x28);
if (*(long *)(lVar1 + 0xd8) != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)(lVar1 + 0xa8));
my_rw_unlock(*(long *)(param_2 + 0x28) + 0x18);
iVar2 = 0;
}
return iVar2;
}
| |
33,675 | bc_get_leb128_u16 | bluesky950520[P]quickjs/quickjs.c | static int bc_get_leb128_u16(BCReaderState *s, uint16_t *pval)
{
uint32_t val;
if (bc_get_leb128(s, &val)) {
*pval = 0;
return -1;
}
*pval = val;
return 0;
} | O0 | c | bc_get_leb128_u16:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x7a1e0
cmpl $0x0, %eax
je 0x7d076
movq 0x10(%rsp), %rax
movw $0x0, (%rax)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x7d08d
movl 0xc(%rsp), %eax
movw %ax, %cx
movq 0x10(%rsp), %rax
movw %cx, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| bc_get_leb128_u16:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_10]
lea rsi, [rsp+28h+var_1C]
call bc_get_leb128
cmp eax, 0
jz short loc_7D076
mov rax, [rsp+28h+var_18]
mov word ptr [rax], 0
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_7D08D
loc_7D076:
mov eax, [rsp+28h+var_1C]
mov cx, ax
mov rax, [rsp+28h+var_18]
mov [rax], cx
mov [rsp+28h+var_4], 0
loc_7D08D:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long bc_get_leb128_u16(long long a1, _WORD *a2)
{
int v3; // [rsp+Ch] [rbp-1Ch] BYREF
_WORD *v4; // [rsp+10h] [rbp-18h]
long long v5; // [rsp+18h] [rbp-10h]
v5 = a1;
v4 = a2;
if ( (unsigned int)bc_get_leb128(a1, &v3) )
{
*v4 = 0;
return (unsigned int)-1;
}
else
{
*v4 = v3;
return 0;
}
}
| JS_WriteMap:
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]
XOR EDX,EDX
CALL 0x0017e160
ADD RSP,0x18
RET
|
void JS_WriteMap(int8 param_1,int8 param_2)
{
js_map_write(param_1,param_2,0);
return;
}
| |
33,676 | nglog::FlushLogFilesUnsafe(nglog::LogSeverity) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::FlushLogFilesUnsafe(int min_severity) {
// assume we have the log_mutex or we simply don't care
// about it
std::for_each(std::next(std::begin(log_destinations_), min_severity),
std::end(log_destinations_),
[now = std::chrono::system_clock::now()](
std::unique_ptr<LogDestination>& log) {
if (log != nullptr) {
// Flush the base fileobject_ logger directly instead of
// going through any wrappers to reduce chance of deadlock.
log->fileobject_.FlushUnlocked(now);
}
});
} | O3 | cpp | nglog::FlushLogFilesUnsafe(nglog::LogSeverity):
pushq %rbx
movslq %edi, %rax
leaq 0x258d4(%rip), %rcx # 0x31c90
leaq (%rcx,%rax,8), %rbx
callq 0x7070
leaq 0x258e4(%rip), %rsi # 0x31cb0
movq %rbx, %rdi
movq %rax, %rdx
popq %rbx
jmp 0x12972
| _ZN5nglog19FlushLogFilesUnsafeENS_11LogSeverityE:
push rbx
movsxd rax, edi
lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea rbx, [rcx+rax*8]
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
lea rsi, _ZN5nglog12_GLOBAL__N_125g_application_fingerprintB5cxx11E; nglog::`anonymous namespace'::g_application_fingerprint
mov rdi, rbx
mov rdx, rax
pop rbx
jmp _ZSt8for_eachIPSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS2_EEZNS2_19FlushLogFilesUnsafeEiEUlRS5_E_ET0_T_SA_S9_; std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(std::unique_ptr<nglog::LogDestination> *,std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1})
| long long nglog::FlushLogFilesUnsafe(std::chrono::_V2::system_clock *a1)
{
long long v1; // rax
v1 = std::chrono::_V2::system_clock::now(a1);
return std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(
&nglog::LogDestination::log_destinations_[(int)a1],
&nglog::`anonymous namespace'::g_application_fingerprint[abi:cxx11],
v1);
}
| FlushLogFilesUnsafe:
PUSH RBX
MOVSXD RAX,EDI
LEA RCX,[0x131c90]
LEA RBX,[RCX + RAX*0x8]
CALL 0x00107070
LEA RSI,[0x131cb0]
MOV RDI,RBX
MOV RDX,RAX
POP RBX
JMP 0x00112972
|
/* nglog::FlushLogFilesUnsafe(nglog::LogSeverity) */
void nglog::FlushLogFilesUnsafe(int param_1)
{
int8 uVar1;
uVar1 = std::chrono::_V2::system_clock::now();
std::
for_each<std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>*,nglog::LogDestination::FlushLogFilesUnsafe(int)::_lambda(std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>&)_1_>
(&LogDestination::log_destinations_ + param_1,
&(anonymous_namespace)::g_application_fingerprint_abi_cxx11_,uVar1);
return;
}
| |
33,677 | bf_mul_ui | bluesky950520[P]quickjs/libbf.c | int bf_mul_ui(bf_t *r, const bf_t *a, uint64_t b1, limb_t prec,
bf_flags_t flags)
{
bf_t b;
int ret;
bf_init(r->ctx, &b);
ret = bf_set_ui(&b, b1);
ret |= bf_mul(r, a, &b, prec, flags);
bf_delete(&b);
return ret;
} | O1 | c | bf_mul_ui:
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 0x84abb
movl %eax, %ebx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x86711
movl %eax, %ebp
movq (%r13), %rax
testq %rax, %rax
je 0x87fcc
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x87fcc
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_mul_ui:
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_ui
mov ebx, eax
mov rdi, r12
mov rsi, r15
mov rdx, r13
mov rcx, r14
mov r8d, ebp
call bf_mul
mov ebp, eax
mov rax, [r13+0]
test rax, rax
jz short loc_87FCC
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_87FCC
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_87FCC:
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_mul_ui(__int128 *a1, long long a2, unsigned long long a3, long long a4, unsigned int a5)
{
int v7; // ebx
unsigned int v8; // ebp
_QWORD *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 = *(_QWORD **)a1;
v11 = 0;
v12 = 0x8000000000000000LL;
v13 = 0LL;
v7 = bf_set_ui(&v10, a3);
v8 = bf_mul(a1, a2, (long long)&v10, a4, a5);
if ( v10 && *((_QWORD *)&v13 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v10[1])(*v10, *((_QWORD *)&v13 + 1), 0LL);
return v7 | v8;
}
| bf_mul_ui:
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 0x00184abb
MOV EBX,EAX
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
MOV RCX,R14
MOV R8D,EBP
CALL 0x00186711
MOV EBP,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00187fcc
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x00187fcc
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00187fcc:
OR EBP,EBX
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint bf_mul_ui(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_ui(&local_58,param_3);
uVar2 = bf_mul(param_1,param_2,&local_58,param_4,param_5);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
return uVar2 | uVar1;
}
| |
33,678 | set_default_charset | eloqsql/libmariadb/libmariadb/mariadb_charset.c | my_bool set_default_charset(uint cs, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_nr(cs);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
} | O0 | c | set_default_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %edi
callq 0x4ada0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4ae67
movb $0x1, -0x1(%rbp)
jmp 0x4ae79
movq -0x18(%rbp), %rcx
leaq 0x1c276(%rip), %rax # 0x670e8
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| set_default_charset:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov [rbp+var_C], esi
mov edi, [rbp+var_8]
call mysql_get_charset_by_nr
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_4AE67
mov [rbp+var_1], 1
jmp short loc_4AE79
loc_4AE67:
mov rcx, [rbp+var_18]
lea rax, ma_default_charset_info
mov [rax], rcx
mov [rbp+var_1], 0
loc_4AE79:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char set_default_charset(int a1)
{
char *charset_by_nr; // [rsp+8h] [rbp-18h]
charset_by_nr = mysql_get_charset_by_nr(a1);
if ( !charset_by_nr )
return 1;
ma_default_charset_info = charset_by_nr;
return 0;
}
| set_default_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
MOV EDI,dword ptr [RBP + -0x8]
CALL 0x0014ada0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0014ae67
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014ae79
LAB_0014ae67:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x1670e8]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0014ae79:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int8 set_default_charset(int4 param_1)
{
long lVar1;
int8 *puVar2;
bool local_9;
lVar1 = mysql_get_charset_by_nr(param_1);
if (lVar1 != 0) {
puVar2 = &ma_default_charset_info;
ma_default_charset_info = lVar1;
}
else {
puVar2 = (int8 *)0x0;
}
local_9 = lVar1 == 0;
return CONCAT71((int7)((ulong)puVar2 >> 8),local_9);
}
| |
33,679 | set_default_charset | eloqsql/libmariadb/libmariadb/mariadb_charset.c | my_bool set_default_charset(uint cs, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_nr(cs);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
} | O3 | c | set_default_charset:
pushq %rbp
movq %rsp, %rbp
leaq 0x10365(%rip), %rax # 0x44c40
addq $-0x48, %rax
movl 0x48(%rax), %ecx
addq $0x48, %rax
testl %ecx, %ecx
je 0x348ee
cmpl %edi, %ecx
jne 0x348df
testl %ecx, %ecx
je 0x34900
leaq 0x1b2ff(%rip), %rcx # 0x4fbf8
movq %rax, (%rcx)
xorl %eax, %eax
jmp 0x34902
movb $0x1, %al
popq %rbp
retq
| set_default_charset:
push rbp
mov rbp, rsp
lea rax, mariadb_compiled_charsets
add rax, 0FFFFFFFFFFFFFFB8h
loc_348DF:
mov ecx, [rax+48h]
add rax, 48h ; 'H'
test ecx, ecx
jz short loc_348EE
cmp ecx, edi
jnz short loc_348DF
loc_348EE:
test ecx, ecx
jz short loc_34900
lea rcx, ma_default_charset_info
mov [rcx], rax
xor eax, eax
jmp short loc_34902
loc_34900:
mov al, 1
loc_34902:
pop rbp
retn
| char set_default_charset(int a1)
{
char *v1; // rax
int v2; // ecx
v1 = (char *)&mariadb_compiled_charsets - 72;
do
{
v2 = *((_DWORD *)v1 + 18);
v1 += 72;
}
while ( v2 && v2 != a1 );
if ( !v2 )
return 1;
ma_default_charset_info = v1;
return 0;
}
| set_default_charset:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x144c40]
ADD RAX,-0x48
LAB_001348df:
MOV ECX,dword ptr [RAX + 0x48]
ADD RAX,0x48
TEST ECX,ECX
JZ 0x001348ee
CMP ECX,EDI
JNZ 0x001348df
LAB_001348ee:
TEST ECX,ECX
JZ 0x00134900
LEA RCX,[0x14fbf8]
MOV qword ptr [RCX],RAX
XOR EAX,EAX
JMP 0x00134902
LAB_00134900:
MOV AL,0x1
LAB_00134902:
POP RBP
RET
|
int8 set_default_charset(int param_1)
{
int iVar1;
int *puVar2;
int8 uVar3;
puVar2 = &UNK_00144bf8;
do {
iVar1 = *(int *)(puVar2 + 0x48);
puVar2 = puVar2 + 0x48;
if (iVar1 == 0) break;
} while (iVar1 != param_1);
if (iVar1 == 0) {
uVar3 = CONCAT71((int7)((ulong)puVar2 >> 8),1);
}
else {
uVar3 = 0;
ma_default_charset_info = puVar2;
}
return uVar3;
}
| |
33,680 | js_parse_expect_semi | bluesky950520[P]quickjs/quickjs.c | static int js_parse_expect_semi(JSParseState *s)
{
if (s->token.val != ';') {
/* automatic insertion of ';' */
if (s->token.val == TOK_EOF || s->token.val == '}' || s->got_lf) {
return 0;
}
return js_parse_error(s, "expecting '%c'", ';');
}
return next_token(s);
} | O3 | c | js_parse_expect_semi:
movl 0x20(%rdi), %ecx
xorl %eax, %eax
cmpl $-0x56, %ecx
je 0x6bd25
cmpl $0x3b, %ecx
je 0x5f46a
cmpl $0x7d, %ecx
je 0x6bd25
cmpl $0x0, 0x58(%rdi)
je 0x6bd26
retq
pushq %rax
leaq 0x36aeb(%rip), %rsi # 0xa2819
movl $0x3b, %edx
xorl %eax, %eax
callq 0x2fed1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
| js_parse_expect_semi:
mov ecx, [rdi+20h]
xor eax, eax
cmp ecx, 0FFFFFFAAh
jz short locret_6BD25
cmp ecx, 3Bh ; ';'
jz next_token
cmp ecx, 7Dh ; '}'
jz short locret_6BD25
cmp dword ptr [rdi+58h], 0
jz short loc_6BD26
locret_6BD25:
retn
loc_6BD26:
push rax
lea rsi, aExpectingC; "expecting '%c'"
mov edx, 3Bh ; ';'
xor eax, eax
call js_parse_error
mov eax, 0FFFFFFFFh
add rsp, 8
retn
| long long js_parse_expect_semi(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rcx
long long result; // rax
v14 = *(unsigned int *)(a1 + 32);
result = 0LL;
if ( (_DWORD)v14 != -86 )
{
if ( (_DWORD)v14 == 59 )
{
return next_token(a1, a4, a5, a6, a7, a8, a9, a10, a11, a2, a3, v14, a13, a14);
}
else if ( (_DWORD)v14 != 125 && !*(_DWORD *)(a1 + 88) )
{
js_parse_error((long long *)a1, (long long)"expecting '%c'", 59LL, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, 0);
return 0xFFFFFFFFLL;
}
}
return result;
}
| js_parse_expect_semi:
MOV ECX,dword ptr [RDI + 0x20]
XOR EAX,EAX
CMP ECX,-0x56
JZ 0x0016bd25
CMP ECX,0x3b
JZ 0x0015f46a
CMP ECX,0x7d
JZ 0x0016bd25
CMP dword ptr [RDI + 0x58],0x0
JZ 0x0016bd26
LAB_0016bd25:
RET
LAB_0016bd26:
PUSH RAX
LEA RSI,[0x1a2819]
MOV EDX,0x3b
XOR EAX,EAX
CALL 0x0012fed1
MOV EAX,0xffffffff
ADD RSP,0x8
RET
|
int8 js_parse_expect_semi(long *param_1)
{
uint *puVar1;
byte bVar2;
uint uVar3;
int iVar4;
int4 uVar5;
int iVar6;
uint uVar7;
uint uVar8;
int *piVar9;
byte *pbVar10;
byte *pbVar11;
byte bVar12;
int8 uVar13;
int8 uVar14;
ulong uVar15;
char *pcVar16;
int1 auVar17 [16];
int1 auStack_3f0 [912];
int8 uStack_60;
byte *pbStack_58;
byte *pbStack_50;
byte *pbStack_48;
int4 uStack_3c;
byte *pbStack_38;
iVar4 = (int)param_1[4];
if (iVar4 != -0x56) {
if (iVar4 == 0x3b) {
if (auStack_3f0 < *(int1 **)(*(long *)(*param_1 + 0x18) + 0xe8)) {
uStack_60 = 0x15f4a5;
JS_ThrowRangeError(*param_1,"Maximum call stack size exceeded");
return 0xffffffff;
}
puVar1 = (uint *)(param_1 + 4);
uStack_60 = 0x15f4b9;
free_token(param_1,puVar1);
pbVar11 = (byte *)param_1[0xe];
param_1[0xc] = (long)pbVar11;
*(int4 *)(param_1 + 0xb) = 0;
param_1[1] = *(long *)((long)param_1 + 0x24);
pcVar16 = "invalid UTF-8 sequence";
pbStack_38 = pbVar11;
LAB_0015f4e2:
*(long *)((long)param_1 + 0x24) = param_1[2];
param_1[6] = (long)pbVar11;
bVar12 = *pbVar11;
uVar3 = (uint)bVar12;
switch(uVar3) {
case 0:
goto switchD_0015f503_caseD_0;
default:
if ((char)bVar12 < '\0') {
uStack_60 = 0x15f60d;
uVar3 = utf8_decode(pbVar11,&pbStack_48);
if (pbStack_48 != pbStack_38 + 1) {
pbStack_38 = pbStack_48;
if ((uVar3 & 0xfffffffe) == 0x2028) {
iVar4 = (int)param_1[2];
pbVar11 = pbStack_48;
goto LAB_0015f550;
}
uStack_60 = 0x15f6dd;
iVar4 = lre_is_space(uVar3);
pbVar11 = pbStack_38;
if (iVar4 != 0) goto LAB_0015f50c;
if (uVar3 < 0x80) {
uVar7 = (uint)((*(uint *)(lre_id_start_table_ascii + (ulong)(uVar3 >> 5) * 4) >>
(uVar3 & 0x1f) & 1) != 0);
}
else {
uStack_60 = 0x15feaa;
uVar7 = lre_is_id_start(uVar3);
}
if (uVar7 != 0) goto LAB_0015f757;
pcVar16 = "unexpected character";
}
goto LAB_0015f855;
}
LAB_0015f8b7:
uVar7 = (uint)bVar12;
goto LAB_0015f8ba;
case 9:
case 0xb:
case 0xc:
case 0x20:
pbStack_38 = pbVar11 + 1;
pbVar11 = pbStack_38;
goto LAB_0015f50c;
case 10:
goto switchD_0015f503_caseD_a;
case 0xd:
if (pbVar11[1] == 10) {
pbVar11 = pbVar11 + 1;
}
switchD_0015f503_caseD_a:
pbVar11 = pbVar11 + 1;
iVar4 = (int)param_1[2];
LAB_0015f550:
param_1[0x10] = (long)(pbVar11 + -1);
param_1[0x11] = (long)pbVar11;
*(int4 *)(param_1 + 0xb) = 1;
*(int *)(param_1 + 2) = iVar4 + 1;
pbStack_38 = pbVar11;
goto LAB_0015f4e2;
case 0x21:
uVar7 = 0x21;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffffa0;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff9f;
}
goto LAB_0015f8c4;
case 0x22:
case 0x27:
uStack_60 = 0x15f89b;
iVar4 = js_parse_string(param_1,uVar3,1,pbVar11 + 1,puVar1,&pbStack_38);
if (iVar4 != 0) goto LAB_0015f862;
goto LAB_0015f8c4;
case 0x23:
pbStack_38 = pbVar11 + 1;
bVar12 = pbVar11[1];
uVar15 = (ulong)bVar12;
pbStack_48 = pbVar11 + 2;
if (bVar12 == 0x5c) {
uVar15 = 0x5c;
if (*pbStack_48 == 0x75) {
uStack_60 = 0x15f9aa;
uVar3 = lre_parse_escape(&pbStack_48,1);
uVar15 = (ulong)uVar3;
goto LAB_0015fc78;
}
LAB_0015fc82:
uVar3 = (uint)((*(uint *)(lre_id_start_table_ascii + (uVar15 >> 5) * 4) >>
((uint)uVar15 & 0x1f) & 1) != 0);
}
else {
if ((char)bVar12 < '\0') {
uStack_60 = 0x15fc64;
uVar3 = utf8_decode(pbStack_38,&pbStack_48);
uVar15 = (ulong)uVar3;
if (pbStack_48 == pbStack_38 + 1) goto LAB_0015f855;
}
LAB_0015fc78:
if ((uint)uVar15 < 0x80) goto LAB_0015fc82;
uStack_60 = 0x15fd65;
uVar3 = lre_is_id_start(uVar15);
}
if (uVar3 == 0) {
pcVar16 = "invalid first character of private name";
goto LAB_0015f855;
}
pbStack_38 = pbStack_48;
uStack_60 = 0x15fd89;
iVar4 = parse_ident(param_1,&pbStack_38,&uStack_3c,uVar15,1);
if (iVar4 == 0) goto LAB_0015f862;
*(int *)(param_1 + 7) = iVar4;
*(int4 *)(param_1 + 4) = 0xffffffa9;
goto LAB_0015f8c4;
case 0x24:
case 0x41:
case 0x42:
case 0x43:
case 0x44:
case 0x45:
case 0x46:
case 0x47:
case 0x48:
case 0x49:
case 0x4a:
case 0x4b:
case 0x4c:
case 0x4d:
case 0x4e:
case 0x4f:
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x54:
case 0x55:
case 0x56:
case 0x57:
case 0x58:
case 0x59:
case 0x5a:
case 0x5f:
case 0x61:
case 0x62:
case 99:
case 100:
case 0x65:
case 0x66:
case 0x67:
case 0x68:
case 0x69:
case 0x6a:
case 0x6b:
case 0x6c:
case 0x6d:
case 0x6e:
case 0x6f:
case 0x70:
case 0x71:
case 0x72:
case 0x73:
case 0x74:
case 0x75:
case 0x76:
case 0x77:
case 0x78:
case 0x79:
case 0x7a:
param_1[0x11] = (long)pbVar11;
pbStack_38 = pbVar11 + 1;
LAB_0015f757:
uStack_3c = 0;
goto LAB_0015f75e;
case 0x25:
uVar7 = 0x25;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff87;
goto LAB_0015f8c4;
case 0x26:
if (pbVar11[1] == 0x26) {
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff91;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffffa1;
}
}
else {
uVar7 = 0x26;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff8d;
}
goto LAB_0015f8c4;
case 0x2a:
if (pbVar11[1] == 0x2a) {
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff90;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffffa3;
}
}
else {
uVar7 = 0x2a;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff85;
}
goto LAB_0015f8c4;
case 0x2b:
if (pbVar11[1] == 0x2b) {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff95;
}
else {
uVar7 = 0x2b;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff88;
}
goto LAB_0015f8c4;
case 0x2d:
if (pbVar11[1] != 0x2d) {
if (pbVar11[1] != 0x3d) goto LAB_0015f8b7;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff89;
goto LAB_0015f8c4;
}
if (((*(int *)((long)param_1 + 0x9c) == 0) || (pbVar11[2] != 0x3e)) ||
(((int)param_1[0xb] == 0 && (param_1[0xc] != param_1[0xd])))) {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff94;
goto LAB_0015f8c4;
}
break;
case 0x2e:
if (pbVar11[1] != 0x2e) {
uVar7 = 0x2e;
if ((byte)(pbVar11[1] - 0x30) < 10) {
uVar14 = 0x44;
goto LAB_0015f7a6;
}
goto LAB_0015f8ba;
}
uVar7 = 0x2e;
if (pbVar11[2] != 0x2e) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffffa5;
goto LAB_0015f8c4;
case 0x2f:
bVar12 = pbVar11[1];
if (bVar12 == 0x2a) {
pbStack_38 = pbVar11 + 2;
LAB_0015f649:
while (bVar12 = *pbStack_38, bVar12 < 0xd) {
if (bVar12 == 0) {
if (pbStack_38 < (byte *)param_1[0xf]) goto LAB_0015f6c5;
pcVar16 = "unexpected end of comment";
goto LAB_0015f855;
}
if (bVar12 != 10) goto LAB_0015f690;
*(int *)(param_1 + 2) = (int)param_1[2] + 1;
*(int4 *)(param_1 + 0xb) = 1;
param_1[0x10] = (long)pbStack_38;
param_1[0x11] = (long)(pbStack_38 + 1);
pbStack_38 = pbStack_38 + 1;
}
if (bVar12 == 0xd) {
*(int4 *)(param_1 + 0xb) = 1;
}
else if (bVar12 == 0x2a) {
if (pbStack_38[1] == 0x2f) goto LAB_0015f6ee;
}
else {
LAB_0015f690:
if ((char)bVar12 < '\0') {
uStack_60 = 0x15f6a0;
uVar3 = utf8_decode(pbStack_38,&pbStack_38);
if ((uVar3 & 0xfffffffe) == 0x2028) {
*(int4 *)(param_1 + 0xb) = 1;
}
goto LAB_0015f649;
}
}
LAB_0015f6c5:
pbStack_38 = pbStack_38 + 1;
goto LAB_0015f649;
}
if (bVar12 != 0x2f) {
if (bVar12 == 0x3d) {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff86;
}
else {
pbStack_38 = pbVar11 + 1;
*puVar1 = 0x2f;
}
goto LAB_0015f8c4;
}
pbVar11 = pbVar11 + 2;
pbStack_38 = pbVar11;
break;
case 0x30:
if (pbVar11[1] - 0x3a < 0xfffffff6) {
if (pbVar11[1] != 0x5f) {
uVar14 = 0xf4;
goto LAB_0015f7a6;
}
pcVar16 = "Numeric separator can not be used after leading 0";
goto LAB_0015f855;
}
if (*(short *)(param_1[0x12] + 0x84) < 0) {
pcVar16 = "Octal literals are not allowed in strict mode";
goto LAB_0015f855;
}
uVar13 = 8;
bVar12 = 0x30;
pbVar10 = pbVar11;
do {
pbVar10 = pbVar10 + 1;
if ((bVar12 & 0xfe) == 0x38) {
uVar13 = 10;
}
bVar12 = *pbVar10;
} while (0xfffffff5 < bVar12 - 0x3a);
uVar14 = 0;
pbStack_38 = pbVar11;
LAB_0015f7ac:
uStack_60 = 0x15f7c8;
pbStack_58 = pbVar11;
auVar17 = js_atof(*param_1,pbVar11,param_1[0xf] - (long)pbVar11,&pbStack_58,uVar13,uVar14);
piVar9 = auVar17._0_8_;
pbStack_38 = pbStack_58;
if (auVar17._8_4_ != 6) {
pcVar16 = "invalid number literal";
if (((ulong)piVar9 & 0x7fffffffffffffff) < 0x7ff0000000000001 || auVar17._8_8_ != 7) {
uStack_60 = 0x15f815;
uVar5 = utf8_decode(pbStack_58,&pbStack_48);
uStack_60 = 0x15f81c;
iVar4 = lre_js_is_ident_next(uVar5);
if (iVar4 == 0) {
*(int4 *)(param_1 + 4) = 0xffffff80;
*(int1 (*) [16])(param_1 + 7) = auVar17;
goto LAB_0015f8c4;
}
if (0xfffffff6 < auVar17._8_4_) {
uVar14 = *(int8 *)(*param_1 + 0x18);
iVar4 = *piVar9;
*piVar9 = iVar4 + -1;
if (iVar4 < 2) {
uStack_60 = 0x15f84c;
js_free_value_rt(uVar14,piVar9,auVar17._8_8_);
}
}
}
LAB_0015f855:
uStack_60 = 0x15f862;
js_parse_error(param_1,pcVar16);
}
LAB_0015f862:
*puVar1 = 0xffffffa8;
return 0xffffffff;
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
uVar14 = 0xc4;
LAB_0015f7a6:
uVar13 = 10;
goto LAB_0015f7ac;
case 0x3c:
bVar2 = pbVar11[1];
if (bVar2 == 0x3c) {
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff8a;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff96;
}
goto LAB_0015f8c4;
}
if (bVar2 == 0x3d) {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff9a;
goto LAB_0015f8c4;
}
if ((((bVar2 != 0x21) || (*(int *)((long)param_1 + 0x9c) == 0)) || (pbVar11[2] != 0x2d)) ||
(pbVar11[3] != 0x2d)) goto LAB_0015f8b7;
break;
case 0x3d:
if (pbVar11[1] == 0x3e) {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffffa4;
}
else {
uVar7 = 0x3d;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff9e;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff9d;
}
}
goto LAB_0015f8c4;
case 0x3e:
if (pbVar11[1] == 0x3e) {
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff8b;
}
else if (pbVar11[2] == 0x3e) {
if (pbVar11[3] == 0x3d) {
pbStack_38 = pbVar11 + 4;
*puVar1 = 0xffffff8c;
}
else {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff98;
}
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff97;
}
}
else {
uVar7 = 0x3e;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff9c;
}
goto LAB_0015f8c4;
case 0x3f:
uVar7 = 0x3f;
if (pbVar11[1] == 0x2e) {
if ((byte)(pbVar11[2] - 0x30) < 10) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffffa7;
}
else {
if (pbVar11[1] != 0x3f) goto LAB_0015f8ba;
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff93;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffffa6;
}
}
goto LAB_0015f8c4;
case 0x5c:
uVar7 = 0x5c;
if (pbVar11[1] != 0x75) goto LAB_0015f8ba;
pbStack_50 = pbVar11 + 1;
uStack_60 = 0x15faa1;
uVar3 = lre_parse_escape(&pbStack_50,1);
pbVar11 = pbStack_38;
if ((int)uVar3 < 0) goto LAB_0015f8ba;
if (uVar3 < 0x80) {
uVar8 = (uint)((*(uint *)(lre_id_start_table_ascii + (ulong)(uVar3 >> 5) * 4) >>
(uVar3 & 0x1f) & 1) != 0);
}
else {
uStack_60 = 0x15ff36;
uVar8 = lre_is_id_start(uVar3);
}
pbVar11 = pbStack_38;
if (uVar8 == 0) goto LAB_0015f8ba;
pbStack_38 = pbStack_50;
uStack_3c = 1;
LAB_0015f75e:
uStack_60 = 0x15f774;
iVar4 = parse_ident(param_1,&pbStack_38,&uStack_3c,uVar3,0);
if (iVar4 == 0) goto LAB_0015f862;
*(int *)(param_1 + 7) = iVar4;
*(int4 *)((long)param_1 + 0x3c) = uStack_3c;
*(int4 *)(param_1 + 8) = 0;
*(int4 *)(param_1 + 4) = 0xffffff83;
uStack_60 = 0x15f79b;
update_token_ident(param_1);
goto LAB_0015f8c4;
case 0x5e:
uVar7 = 0x5e;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff8e;
goto LAB_0015f8c4;
case 0x60:
uStack_60 = 0x15f905;
iVar4 = js_parse_template_part(param_1,pbVar11 + 1);
if (iVar4 != 0) goto LAB_0015f862;
pbStack_38 = (byte *)param_1[0xe];
goto LAB_0015f8c4;
case 0x7c:
if (pbVar11[1] == 0x7c) {
if (pbVar11[2] == 0x3d) {
pbStack_38 = pbVar11 + 3;
*puVar1 = 0xffffff92;
}
else {
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffffa2;
}
}
else {
uVar7 = 0x7c;
if (pbVar11[1] != 0x3d) goto LAB_0015f8ba;
pbStack_38 = pbVar11 + 2;
*puVar1 = 0xffffff8f;
}
goto LAB_0015f8c4;
}
do {
while (bVar12 = *pbVar11, bVar12 == 0) {
if ((byte *)param_1[0xf] <= pbVar11) goto LAB_0015f50c;
LAB_0015f740:
pbVar11 = pbVar11 + 1;
pbStack_38 = pbVar11;
}
if ((bVar12 == 10) || (bVar12 == 0xd)) break;
if (-1 < (char)bVar12) goto LAB_0015f740;
uStack_60 = 0x15f723;
uVar3 = utf8_decode(pbVar11,&pbStack_38);
pbVar11 = pbStack_38;
} while ((uVar3 & 0xfffffffe) != 0x2028);
goto LAB_0015f50c;
}
if ((iVar4 != 0x7d) && ((int)param_1[0xb] == 0)) {
js_parse_error(param_1,"expecting \'%c\'",0x3b);
return 0xffffffff;
}
}
return 0;
LAB_0015f6ee:
pbStack_38 = pbStack_38 + 2;
pbVar11 = pbStack_38;
LAB_0015f50c:
param_1[0x11] = (long)pbVar11;
goto LAB_0015f4e2;
switchD_0015f503_caseD_0:
uVar7 = 0;
if (pbVar11 < (byte *)param_1[0xf]) {
LAB_0015f8ba:
*puVar1 = uVar7;
pbStack_38 = pbVar11 + 1;
}
else {
*puVar1 = 0xffffffaa;
}
LAB_0015f8c4:
iVar6 = (int)param_1[0x11] - (int)param_1[0x10];
iVar4 = 1;
if (1 < iVar6) {
iVar4 = iVar6;
}
*(int *)(param_1 + 5) = iVar4;
param_1[0xe] = (long)pbStack_38;
return 0;
}
| |
33,681 | minja::Value::operator<(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | bool operator<(const Value & other) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_number() && other.is_number()) return get<double>() < other.get<double>();
if (is_string() && other.is_string()) return get<std::string>() < other.get<std::string>();
throw std::runtime_error("Cannot compare values: " + dump() + " < " + other.dump());
} | O1 | cpp | minja::Value::operator<(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x20(%rdi)
movb 0x40(%rdi), %al
jne 0x5e6e9
cmpq $0x0, 0x10(%r15)
jne 0x5e6e9
testb %al, %al
jne 0x5e6e9
cmpq $0x0, 0x30(%r15)
je 0x5e7e7
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0x5e721
movb 0x40(%r14), %cl
addb $-0x5, %cl
cmpb $0x2, %cl
ja 0x5e721
movq %r15, %rdi
callq 0x43440
movsd %xmm0, 0x40(%rsp)
movq %r14, %rdi
callq 0x43440
ucomisd 0x40(%rsp), %xmm0
seta %bl
jmp 0x5e7d7
cmpb $0x3, %al
jne 0x5e819
cmpb $0x3, 0x40(%r14)
jne 0x5e819
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x44eb0
movq %rsp, %rdi
movq %r14, %rsi
callq 0x44eb0
movq 0x28(%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r14, %r15
movq %r14, %rdx
cmovbq %r15, %rdx
testq %rdx, %rdx
je 0x5e777
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x1a340
movl %eax, %ebx
jmp 0x5e779
xorl %ebx, %ebx
testl %ebx, %ebx
jne 0x5e79e
subq %r15, %r14
cmpq $-0x7fffffff, %r14 # imm = 0x80000001
movq $-0x80000000, %rbx # imm = 0x80000000
cmovgeq %r14, %rbx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
cmpq %rax, %rbx
cmovgeq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e7b9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a740
shrl $0x1f, %ebx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e7d7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a390
movq %rax, %rbx
leaq 0x53f62(%rip), %rsi # 0xb275d
movq %rax, %rdi
callq 0x1a290
movq 0x877e6(%rip), %rsi # 0xe5ff0
movq 0x8775f(%rip), %rdx # 0xe5f70
movq %rbx, %rdi
callq 0x1acd0
movl $0x10, %edi
callq 0x1a390
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x43576
leaq 0x55c27(%rip), %rsi # 0xb4468
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x29fff
leaq 0x55c26(%rip), %rsi # 0xb4480
leaq 0x88(%rsp), %rdi
callq 0x1ae70
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5e888
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x5e894
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x43576
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0x48(%rsp), %rdx
callq 0x2a06f
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ac00
xorl %ebp, %ebp
movq 0x87705(%rip), %rsi # 0xe5ff0
movq 0x8767e(%rip), %rdx # 0xe5f70
movq %rbx, %rdi
callq 0x1acd0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e920
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x5e920
movq %rax, %r14
movb $0x1, %bpl
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e943
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x5e943
movq %rax, %r14
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x5e961
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x5e961
movq %rax, %r14
movb $0x1, %bpl
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e98a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x5e98a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e9ad
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x5e9ad
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x5e9b7
jmp 0x5e9df
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a530
jmp 0x5e9df
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e9df
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
movq %r14, %rdi
callq 0x1ad30
nop
| _ZNK5minja5ValueltERKS0_:
push rbp
push r15
push r14
push rbx
sub rsp, 0A8h
mov r14, rsi
mov r15, rdi
cmp qword ptr [rdi+20h], 0
mov al, [rdi+40h]
jnz short loc_5E6E9
cmp qword ptr [r15+10h], 0
jnz short loc_5E6E9
test al, al
jnz short loc_5E6E9
cmp qword ptr [r15+30h], 0
jz loc_5E7E7
loc_5E6E9:
lea ecx, [rax-5]
cmp cl, 2
ja short loc_5E721
mov cl, [r14+40h]
add cl, 0FBh
cmp cl, 2
ja short loc_5E721
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+0C8h+var_88], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
ucomisd xmm0, [rsp+0C8h+var_88]
setnbe bl
jmp loc_5E7D7
loc_5E721:
cmp al, 3
jnz loc_5E819
cmp byte ptr [r14+40h], 3
jnz loc_5E819
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r15
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov rdi, rsp
mov rsi, r14
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov r14, [rsp+0C8h+var_A0]
mov r15, [rsp+0C8h+var_C0]
cmp r15, r14
mov rdx, r14
cmovb rdx, r15
test rdx, rdx
jz short loc_5E777
mov rsi, [rsp+0C8h+var_C8]
mov rdi, [rsp+0C8h+var_A8]
call _memcmp
mov ebx, eax
jmp short loc_5E779
loc_5E777:
xor ebx, ebx
loc_5E779:
test ebx, ebx
jnz short loc_5E79E
sub r14, r15
cmp r14, 0FFFFFFFF80000001h
mov rbx, 0FFFFFFFF80000000h
cmovge rbx, r14
mov eax, 7FFFFFFFh
cmp rbx, rax
cmovge rbx, rax
loc_5E79E:
lea rax, [rsp+0C8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E7B9
mov rsi, [rsp+0C8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5E7B9:
shr ebx, 1Fh
lea rax, [rsp+0C8h+var_98]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E7D7
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5E7D7:
mov eax, ebx
add rsp, 0A8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5E7E7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_5E819:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0C8h+var_60]
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aCannotCompareV; "Cannot compare values: "
lea rdi, [rsp+0C8h+var_40]
lea rdx, [rsp+0C8h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rsi, asc_B4480; " < "
lea rdi, [rsp+0C8h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+0C8h+var_B8]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_5E888
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
jmp short loc_5E894
loc_5E888:
mov [rsp+0C8h+var_C8], rdx
mov rdx, [rcx]
mov [rsp+0C8h+var_B8], rdx
loc_5E894:
mov rdx, [rax+8]
mov [rsp+0C8h+var_C0], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0C8h+var_80]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rdi, [rsp+0C8h+var_A8]
mov rsi, rsp
lea rdx, [rsp+0C8h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
mov bpl, 1
lea rsi, [rsp+0C8h+var_A8]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+0C8h+var_98]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E920
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5E920
mov r14, rax
mov bpl, 1
loc_5E920:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E943
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5E943
mov r14, rax
mov bpl, 1
loc_5E943:
mov rdi, [rsp+0C8h+var_C8]; void *
cmp rdi, r15
jz short loc_5E961
mov rsi, [rsp+0C8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5E961
mov r14, rax
mov bpl, 1
loc_5E961:
lea rax, [rsp+0C8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E98A
mov rsi, [rsp+0C8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5E98A
mov r14, rax
mov bpl, 1
loc_5E98A:
lea rax, [rsp+0C8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E9AD
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5E9AD
mov r14, rax
mov bpl, 1
loc_5E9AD:
test bpl, bpl
jnz short loc_5E9B7
jmp short loc_5E9DF
mov r14, rax
loc_5E9B7:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_5E9DF
mov r14, rax
lea rax, [rsp+0C8h+var_98]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5E9DF
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5E9DF:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::operator<(long long a1, long long a2)
{
unsigned int v2; // ebx
char v3; // al
unsigned long long v4; // r14
unsigned long long v5; // r15
unsigned long long v6; // rdx
long long v7; // rbx
long long v8; // r14
std::runtime_error *exception; // rbx
void *v11; // rbx
long long v12; // rax
__int128 *v13; // rcx
void *v14; // [rsp+0h] [rbp-C8h] BYREF
unsigned long long v15; // [rsp+8h] [rbp-C0h]
__int128 v16; // [rsp+10h] [rbp-B8h] BYREF
long long *v17; // [rsp+20h] [rbp-A8h] BYREF
unsigned long long v18; // [rsp+28h] [rbp-A0h]
long long v19; // [rsp+30h] [rbp-98h] BYREF
double v20; // [rsp+40h] [rbp-88h]
_QWORD v21[2]; // [rsp+48h] [rbp-80h] BYREF
_BYTE v22[16]; // [rsp+68h] [rbp-60h] BYREF
_BYTE v23[16]; // [rsp+88h] [rbp-40h] BYREF
v3 = *(_BYTE *)(a1 + 64);
if ( !*(_QWORD *)(a1 + 32) && !*(_QWORD *)(a1 + 16) && !v3 && !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (unsigned __int8)(v3 - 5) > 2u || (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 2u )
{
if ( v3 != 3 || *(_BYTE *)(a2 + 64) != 3 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v22, a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v23, (long long)"Cannot compare values: ", (long long)v22);
v12 = std::string::append(v23, " < ");
v14 = &v16;
v13 = (__int128 *)(v12 + 16);
if ( *(_QWORD *)v12 == v12 + 16 )
{
v16 = *v13;
}
else
{
v14 = *(void **)v12;
*(_QWORD *)&v16 = *(_QWORD *)v13;
}
v15 = *(_QWORD *)(v12 + 8);
*(_QWORD *)v12 = v13;
*(_QWORD *)(v12 + 8) = 0LL;
*(_BYTE *)(v12 + 16) = 0;
minja::Value::dump[abi:cxx11]((long long)v21, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)&v17, &v14, v21);
std::runtime_error::runtime_error(v11, &v17);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::get<std::string>((long long)&v17, (_QWORD *)a1);
minja::Value::get<std::string>((long long)&v14, (_QWORD *)a2);
v4 = v18;
v5 = v15;
v6 = v18;
if ( v15 < v18 )
v6 = v15;
if ( v6 )
LODWORD(v7) = memcmp(v17, v14);
else
LODWORD(v7) = 0;
if ( !(_DWORD)v7 )
{
v8 = v4 - v5;
v7 = 0xFFFFFFFF80000000LL;
if ( v8 >= -2147483647 )
v7 = v8;
if ( v7 >= 0x7FFFFFFF )
LODWORD(v7) = 0x7FFFFFFF;
}
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
v2 = (unsigned int)v7 >> 31;
if ( v17 != &v19 )
operator delete(v17, v19 + 1);
}
else
{
v20 = minja::Value::get<double>(a1);
LOBYTE(v2) = minja::Value::get<double>(a2) > v20;
}
return v2;
}
| operator<:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV R14,RSI
MOV R15,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV AL,byte ptr [RDI + 0x40]
JNZ 0x0015e6e9
CMP qword ptr [R15 + 0x10],0x0
JNZ 0x0015e6e9
TEST AL,AL
JNZ 0x0015e6e9
CMP qword ptr [R15 + 0x30],0x0
JZ 0x0015e7e7
LAB_0015e6e9:
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x0015e721
MOV CL,byte ptr [R14 + 0x40]
ADD CL,0xfb
CMP CL,0x2
JA 0x0015e721
MOV RDI,R15
CALL 0x00143440
MOVSD qword ptr [RSP + 0x40],XMM0
MOV RDI,R14
CALL 0x00143440
UCOMISD XMM0,qword ptr [RSP + 0x40]
SETA BL
JMP 0x0015e7d7
LAB_0015e721:
CMP AL,0x3
JNZ 0x0015e819
CMP byte ptr [R14 + 0x40],0x3
JNZ 0x0015e819
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x00144eb0
LAB_0015e741:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00144eb0
LAB_0015e74c:
MOV R14,qword ptr [RSP + 0x28]
MOV R15,qword ptr [RSP + 0x8]
CMP R15,R14
MOV RDX,R14
CMOVC RDX,R15
TEST RDX,RDX
JZ 0x0015e777
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0011a340
MOV EBX,EAX
JMP 0x0015e779
LAB_0015e777:
XOR EBX,EBX
LAB_0015e779:
TEST EBX,EBX
JNZ 0x0015e79e
SUB R14,R15
CMP R14,-0x7fffffff
MOV RBX,-0x80000000
CMOVGE RBX,R14
MOV EAX,0x7fffffff
CMP RBX,RAX
CMOVGE RBX,RAX
LAB_0015e79e:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015e7b9
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a740
LAB_0015e7b9:
SHR EBX,0x1f
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015e7d7
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a740
LAB_0015e7d7:
MOV EAX,EBX
ADD RSP,0xa8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015e7e7:
MOV EDI,0x10
CALL 0x0011a390
MOV RBX,RAX
LAB_0015e7f4:
LEA RSI,[0x1b275d]
MOV RDI,RAX
CALL 0x0011a290
LAB_0015e803:
MOV RSI,qword ptr [0x001e5ff0]
MOV RDX,qword ptr [0x001e5f70]
MOV RDI,RBX
CALL 0x0011acd0
LAB_0015e819:
MOV EDI,0x10
CALL 0x0011a390
MOV RBX,RAX
LAB_0015e826:
LEA RDI,[RSP + 0x68]
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00143576
LAB_0015e83a:
LEA RSI,[0x1b4468]
LEA RDI,[RSP + 0x88]
LEA RDX,[RSP + 0x68]
CALL 0x00129fff
LAB_0015e853:
LEA RSI,[0x1b4480]
LEA RDI,[RSP + 0x88]
CALL 0x0011ae70
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0015e888
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
JMP 0x0015e894
LAB_0015e888:
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
LAB_0015e894:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0015e8ac:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00143576
LAB_0015e8c0:
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
LEA RDX,[RSP + 0x48]
CALL 0x0012a06f
MOV BPL,0x1
LAB_0015e8d5:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011ac00
XOR EBP,EBP
MOV RSI,qword ptr [0x001e5ff0]
MOV RDX,qword ptr [0x001e5f70]
MOV RDI,RBX
CALL 0x0011acd0
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall minja::Value::operator<(Value *this,Value *param_1)
{
Value VVar1;
double dVar2;
uint uVar3;
runtime_error *prVar4;
long *plVar5;
long *plVar6;
ulong uVar7;
int8 unaff_RBX;
long *local_c8;
ulong local_c0;
long local_b8;
long lStack_b0;
long *local_a8;
ulong local_a0;
long local_98 [2];
double local_88;
int1 local_80 [32];
int1 local_60 [32];
char local_40 [32];
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015e7f4 to 0015e802 has its CatchHandler @ 0015e9b4 */
std::runtime_error::runtime_error(prVar4,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e5ff0,PTR__runtime_error_001e5f70);
}
if (((byte)((char)VVar1 - 5U) < 3) && ((byte)((char)param_1[0x40] - 5U) < 3)) {
local_88 = get<double>(this);
dVar2 = get<double>(param_1);
uVar7 = CONCAT71((int7)((ulong)unaff_RBX >> 8),local_88 < dVar2);
}
else {
if ((VVar1 != (Value)0x3) || (param_1[0x40] != (Value)0x3)) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015e826 to 0015e839 has its CatchHandler @ 0015e9a7 */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 0015e83a to 0015e852 has its CatchHandler @ 0015e984 */
std::operator+(local_40,(string *)"Cannot compare values: ");
/* try { // try from 0015e853 to 0015e866 has its CatchHandler @ 0015e95b */
plVar5 = (long *)std::__cxx11::string::append(local_40);
local_c8 = (long *)*plVar5;
plVar6 = plVar5 + 2;
if (local_c8 == plVar6) {
local_b8 = *plVar6;
lStack_b0 = plVar5[3];
local_c8 = &local_b8;
}
else {
local_b8 = *plVar6;
}
local_c0 = plVar5[1];
*plVar5 = (long)plVar6;
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
/* try { // try from 0015e8ac to 0015e8bf has its CatchHandler @ 0015e93d */
dump_abi_cxx11_((int)local_80,SUB81(param_1,0));
/* try { // try from 0015e8c0 to 0015e8d1 has its CatchHandler @ 0015e91a */
std::operator+((string *)&local_a8,(string *)&local_c8);
/* try { // try from 0015e8d5 to 0015e8f9 has its CatchHandler @ 0015e8fa */
std::runtime_error::runtime_error(prVar4,(string *)&local_a8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001e5ff0,PTR__runtime_error_001e5f70);
}
get<std::__cxx11::string>();
/* try { // try from 0015e741 to 0015e74b has its CatchHandler @ 0015e9c1 */
get<std::__cxx11::string>();
uVar7 = local_a0;
if (local_c0 < local_a0) {
uVar7 = local_c0;
}
if (uVar7 == 0) {
uVar7 = 0;
}
else {
uVar3 = memcmp(local_a8,local_c8,uVar7);
uVar7 = (ulong)uVar3;
}
if ((int)uVar7 == 0) {
uVar7 = 0xffffffff80000000;
if (-0x80000000 < (long)(local_a0 - local_c0)) {
uVar7 = local_a0 - local_c0;
}
if (0x7ffffffe < (long)uVar7) {
uVar7 = 0;
}
}
if (local_c8 != &local_b8) {
operator_delete(local_c8,local_b8 + 1);
}
uVar7 = uVar7 >> 0x1f & 1;
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
}
return uVar7 & 0xffffffff;
}
| |
33,682 | 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>::begin() | monkey531[P]llama/common/json.hpp | iterator begin() noexcept
{
iterator result(this);
result.set_begin();
return result;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::begin():
pushq %rbx
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %ecx
cmpl $0x2, %ecx
je 0x6ffea
cmpl $0x1, %ecx
jne 0x6fff4
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x6fff8
movq $0x0, 0x10(%rbx)
jmp 0x6fff8
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x70e6c
movq %rbx, %rax
popq %rbx
retq
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv:
push rbx
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx ecx, byte ptr [rsi]
cmp ecx, 2
jz short loc_6FFEA
cmp ecx, 1
jnz short loc_6FFF4
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_6FFF8
loc_6FFEA:
mov qword ptr [rbx+10h], 0
jmp short loc_6FFF8
loc_6FFF4:
mov [rbx+18h], rax
loc_6FFF8:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_begin(void)
mov rax, rbx
pop rbx
retn
| 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>::begin(
long long a1,
unsigned __int8 *a2)
{
int v2; // ecx
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v2 = *a2;
if ( v2 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v2 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_begin(a1);
return a1;
}
| begin:
PUSH RBX
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],RAX
MOVZX ECX,byte ptr [RSI]
CMP ECX,0x2
JZ 0x0016ffea
CMP ECX,0x1
JNZ 0x0016fff4
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x0016fff8
LAB_0016ffea:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x0016fff8
LAB_0016fff4:
MOV qword ptr [RBX + 0x18],RAX
LAB_0016fff8:
MOV RDI,RBX
CALL 0x00170e6c
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::begin() */
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>
::begin(void)
{
char *in_RSI;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*in_RDI;
*(char **)in_RDI = in_RSI;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
if (*in_RSI == '\x02') {
*(int8 *)(in_RDI + 0x10) = 0;
}
else if (*in_RSI == '\x01') {
*(int8 *)(in_RDI + 8) = 0;
}
else {
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
}
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::set_begin(in_RDI);
return;
}
| |
33,683 | js_Date_UTC | bluesky950520[P]quickjs/quickjs.c | static JSValue js_Date_UTC(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// UTC(y, mon, d, h, m, s, ms)
double fields[] = { 0, 0, 1, 0, 0, 0, 0 };
int i, n;
double a;
n = argc;
if (n == 0)
return JS_NAN;
if (n > 7)
n = 7;
for(i = 0; i < n; i++) {
if (JS_ToFloat64(ctx, &a, argv[i]))
return JS_EXCEPTION;
if (!isfinite(a))
return JS_NAN;
fields[i] = trunc(a);
if (i == 0 && fields[0] >= 0 && fields[0] < 100)
fields[0] += 1900;
}
return js_float64(set_date_fields(fields, 0));
} | O0 | c | js_Date_UTC:
subq $0x88, %rsp
movq %rsi, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %ecx, 0x5c(%rsp)
movq %r8, 0x50(%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0xe370
movsd 0x72918(%rip), %xmm0 # 0x113a20
movsd %xmm0, 0x20(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0xa113c
movsd 0x7294b(%rip), %xmm0 # 0x113a70
movsd %xmm0, 0x78(%rsp)
movq $0x7, 0x80(%rsp)
jmp 0xa126a
cmpl $0x7, 0x8(%rsp)
jle 0xa114b
movl $0x7, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0xa124c
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %rsp, %rsi
callq 0x3e870
cmpl $0x0, %eax
je 0xa11a4
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0xa126a
movsd (%rsp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0xa11eb
movsd 0x72899(%rip), %xmm0 # 0x113a70
movsd %xmm0, 0x78(%rsp)
movq $0x7, 0x80(%rsp)
jmp 0xa126a
movsd (%rsp), %xmm0
callq 0xe150
movslq 0xc(%rsp), %rax
movsd %xmm0, 0x10(%rsp,%rax,8)
cmpl $0x0, 0xc(%rsp)
jne 0xa123a
movsd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xa123a
movsd 0x7285a(%rip), %xmm0 # 0x113a78
ucomisd 0x10(%rsp), %xmm0
jbe 0xa123a
movsd 0x72852(%rip), %xmm0 # 0x113a80
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0xa123c
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xa1153
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x9f710
callq 0x53950
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nop
| js_Date_UTC:
sub rsp, 88h
mov [rsp+88h+var_20], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_28], rdi
mov [rsp+88h+var_2C], ecx
mov [rsp+88h+var_38], r8
lea rdi, [rsp+88h+var_78]
xor esi, esi
mov edx, 38h ; '8'
call _memset
movsd xmm0, cs:qword_113A20
movsd [rsp+88h+var_68], xmm0
mov eax, [rsp+88h+var_2C]
mov [rsp+88h+var_80], eax
cmp [rsp+88h+var_80], 0
jnz short loc_A113C
movsd xmm0, cs:qword_113A70
movsd [rsp+88h+var_10], xmm0
mov [rsp+88h+var_8], 7
jmp loc_A126A
loc_A113C:
cmp [rsp+88h+var_80], 7
jle short loc_A114B
mov [rsp+88h+var_80], 7
loc_A114B:
mov [rsp+88h+var_7C], 0
loc_A1153:
mov eax, [rsp+88h+var_7C]
cmp eax, [rsp+88h+var_80]
jge loc_A124C
mov rdi, [rsp+88h+var_28]
mov rax, [rsp+88h+var_38]
movsxd rcx, [rsp+88h+var_7C]
shl rcx, 4
add rax, rcx
mov rdx, [rax]
mov rcx, [rax+8]
mov rsi, rsp
call JS_ToFloat64
cmp eax, 0
jz short loc_A11A4
mov dword ptr [rsp+88h+var_10], 0
mov [rsp+88h+var_8], 6
jmp loc_A126A
loc_A11A4:
movsd xmm0, [rsp+88h+var_88]
movq rax, xmm0
mov rcx, 7FFFFFFFFFFFFFFFh
and rax, rcx
mov rcx, 7FF0000000000000h
sub rax, rcx
setl al
test al, 1
jnz short loc_A11EB
movsd xmm0, cs:qword_113A70
movsd [rsp+88h+var_10], xmm0
mov [rsp+88h+var_8], 7
jmp short loc_A126A
loc_A11EB:
movsd xmm0, [rsp+88h+var_88]
call _trunc
movsxd rax, [rsp+88h+var_7C]
movsd [rsp+rax*8+88h+var_78], xmm0
cmp [rsp+88h+var_7C], 0
jnz short loc_A123A
movsd xmm0, [rsp+88h+var_78]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_A123A
movsd xmm0, cs:qword_113A78
ucomisd xmm0, [rsp+88h+var_78]
jbe short loc_A123A
movsd xmm0, cs:qword_113A80
addsd xmm0, [rsp+88h+var_78]
movsd [rsp+88h+var_78], xmm0
loc_A123A:
jmp short $+2
loc_A123C:
mov eax, [rsp+88h+var_7C]
add eax, 1
mov [rsp+88h+var_7C], eax
jmp loc_A1153
loc_A124C:
lea rdi, [rsp+88h+var_78]
xor esi, esi
call set_date_fields
call js_float64
mov [rsp+88h+var_10], rax
mov [rsp+88h+var_8], rdx
loc_A126A:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long js_Date_UTC(long long a1, long long a2, long long a3, int a4, long long a5)
{
double v5; // xmm0_8
double v6; // xmm0_8
long long v7; // rdx
double v9; // [rsp+0h] [rbp-88h] BYREF
int v10; // [rsp+8h] [rbp-80h]
int i; // [rsp+Ch] [rbp-7Ch]
double v12[8]; // [rsp+10h] [rbp-78h] BYREF
long long v13; // [rsp+50h] [rbp-38h]
int v14; // [rsp+5Ch] [rbp-2Ch]
long long v15; // [rsp+60h] [rbp-28h]
long long v16; // [rsp+68h] [rbp-20h]
long long v17; // [rsp+70h] [rbp-18h]
long long v18; // [rsp+78h] [rbp-10h]
long long v19; // [rsp+80h] [rbp-8h]
v16 = a2;
v17 = a3;
v15 = a1;
v14 = a4;
v13 = a5;
memset(v12, 0LL, 56LL);
v12[2] = 1.0;
v10 = v14;
if ( v14 )
{
if ( v10 > 7 )
v10 = 7;
for ( i = 0; i < v10; ++i )
{
if ( (unsigned int)JS_ToFloat64(v15, (long long)&v9, *(_DWORD **)(16LL * i + v13), *(_QWORD *)(16LL * i + v13 + 8)) )
{
LODWORD(v18) = 0;
v19 = 6LL;
return v18;
}
if ( (*(_QWORD *)&v9 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
{
v18 = 0x7FF8000000000000LL;
v19 = 7LL;
return v18;
}
v5 = trunc(v9);
v12[i] = v5;
if ( !i && v12[0] >= 0.0 && v12[0] < 100.0 )
v12[0] = v12[0] + 1900.0;
}
v6 = set_date_fields(v12, 0);
v18 = js_float64(v6);
v19 = v7;
}
else
{
v18 = 0x7FF8000000000000LL;
v19 = 7LL;
}
return v18;
}
| js_Date_UTC:
SUB RSP,0x88
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ECX
MOV qword ptr [RSP + 0x50],R8
LEA RDI,[RSP + 0x10]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x0010e370
MOVSD XMM0,qword ptr [0x00213a20]
MOVSD qword ptr [RSP + 0x20],XMM0
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x8],EAX
CMP dword ptr [RSP + 0x8],0x0
JNZ 0x001a113c
MOVSD XMM0,qword ptr [0x00213a70]
MOVSD qword ptr [RSP + 0x78],XMM0
MOV qword ptr [RSP + 0x80],0x7
JMP 0x001a126a
LAB_001a113c:
CMP dword ptr [RSP + 0x8],0x7
JLE 0x001a114b
MOV dword ptr [RSP + 0x8],0x7
LAB_001a114b:
MOV dword ptr [RSP + 0xc],0x0
LAB_001a1153:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x8]
JGE 0x001a124c
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
MOV RSI,RSP
CALL 0x0013e870
CMP EAX,0x0
JZ 0x001a11a4
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x001a126a
LAB_001a11a4:
MOVSD XMM0,qword ptr [RSP]
MOVQ RAX,XMM0
MOV RCX,0x7fffffffffffffff
AND RAX,RCX
MOV RCX,0x7ff0000000000000
SUB RAX,RCX
SETL AL
TEST AL,0x1
JNZ 0x001a11eb
MOVSD XMM0,qword ptr [0x00213a70]
MOVSD qword ptr [RSP + 0x78],XMM0
MOV qword ptr [RSP + 0x80],0x7
JMP 0x001a126a
LAB_001a11eb:
MOVSD XMM0,qword ptr [RSP]
CALL 0x0010e150
MOVSXD RAX,dword ptr [RSP + 0xc]
MOVSD qword ptr [RSP + RAX*0x8 + 0x10],XMM0
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x001a123a
MOVSD XMM0,qword ptr [RSP + 0x10]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x001a123a
MOVSD XMM0,qword ptr [0x00213a78]
UCOMISD XMM0,qword ptr [RSP + 0x10]
JBE 0x001a123a
MOVSD XMM0,qword ptr [0x00213a80]
ADDSD XMM0,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x10],XMM0
LAB_001a123a:
JMP 0x001a123c
LAB_001a123c:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001a1153
LAB_001a124c:
LEA RDI,[RSP + 0x10]
XOR ESI,ESI
CALL 0x0019f710
CALL 0x00153950
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
LAB_001a126a:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16]
js_Date_UTC(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5)
{
int iVar1;
int8 *puVar2;
double dVar3;
int1 auVar4 [16];
double local_88;
int local_80;
int local_7c;
double local_78 [8];
long local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
memset(local_78,0,0x38);
local_78[2] = (double)DAT_00213a20;
local_80 = local_2c;
if (local_2c == 0) {
local_10 = (int4)DAT_00213a70;
uStack_c = (int4)((ulong)DAT_00213a70 >> 0x20);
local_8 = 7;
}
else {
if (7 < local_2c) {
local_80 = 7;
}
for (local_7c = 0; local_7c < local_80; local_7c = local_7c + 1) {
puVar2 = (int8 *)(local_38 + (long)local_7c * 0x10);
iVar1 = JS_ToFloat64(local_28,&local_88,*puVar2,puVar2[1]);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001a126a;
}
if (0x7fefffffffffffff < (ulong)ABS(local_88)) {
local_10 = (int4)DAT_00213a70;
uStack_c = (int4)((ulong)DAT_00213a70 >> 0x20);
local_8 = 7;
goto LAB_001a126a;
}
dVar3 = trunc(local_88);
local_78[local_7c] = dVar3;
if (local_7c == 0) {
if ((0.0 <= local_78[0]) && (local_78[0] < DAT_00213a78)) {
local_78[0] = DAT_00213a80 + local_78[0];
}
}
}
set_date_fields(local_78,0);
auVar4 = js_float64();
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
LAB_001a126a:
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
| |
33,684 | bitmap_test_and_set | eloqsql/mysys/my_bitmap.c | my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_set(map, bitmap_bit);
bitmap_unlock(map);
return res;
} | O0 | c | bitmap_test_and_set:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xef551
jmp 0xef553
jmp 0xef555
movq -0x8(%rbp), %rdi
callq 0xef580
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xef4e0
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
callq 0xef5c0
movb -0xd(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nop
| bitmap_test_and_set:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_EF551:
jmp short $+2
loc_EF553:
jmp short $+2
loc_EF555:
mov rdi, [rbp+var_8]
call bitmap_lock
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call bitmap_fast_test_and_set
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
call bitmap_unlock
mov al, [rbp+var_D]
add rsp, 10h
pop rbp
retn
| char bitmap_test_and_set(_QWORD *a1, unsigned int a2)
{
char v3; // [rsp+3h] [rbp-Dh]
bitmap_lock(a1);
v3 = bitmap_fast_test_and_set(a1, a2);
bitmap_unlock(a1);
return v3;
}
| bitmap_test_and_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001ef551
LAB_001ef551:
JMP 0x001ef553
LAB_001ef553:
JMP 0x001ef555
LAB_001ef555:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ef580
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001ef4e0
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ef5c0
MOV AL,byte ptr [RBP + -0xd]
ADD RSP,0x10
POP RBP
RET
|
int1 bitmap_test_and_set(int8 param_1,int4 param_2)
{
int1 uVar1;
bitmap_lock(param_1);
uVar1 = bitmap_fast_test_and_set(param_1,param_2);
bitmap_unlock(param_1);
return uVar1;
}
| |
33,685 | ftxui::Screen::PixelAt(int, int) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/screen/screen.cpp | Pixel& Screen::PixelAt(int x, int y) {
return stencil.Contain(x, y) ? pixels_[y][x] : dev_null_pixel();
} | O2 | cpp | ftxui::Screen::PixelAt(int, int):
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0x2fd54
testb %al, %al
je 0x30426
movslq %ebp, %rax
movq 0x18(%r14), %rcx
imulq $0x18, %rax, %rdx
movslq %ebx, %rax
imulq $0x30, %rax, %rax
addq (%rcx,%rdx), %rax
jmp 0x30432
callq 0x30481
leaq 0x22fa6(%rip), %rax # 0x533d8
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN5ftxui6Screen7PixelAtEii:
push rbp
push r14
push rbx
mov ebp, edx
mov ebx, esi
mov r14, rdi
call _ZNK5ftxui3Box7ContainEii; ftxui::Box::Contain(int,int)
test al, al
jz short loc_30426
movsxd rax, ebp
mov rcx, [r14+18h]
imul rdx, rax, 18h
movsxd rax, ebx
imul rax, 30h ; '0'
add rax, [rcx+rdx]
jmp short loc_30432
loc_30426:
call _ZN5ftxui12_GLOBAL__N_114dev_null_pixelEv; ftxui::`anonymous namespace'::dev_null_pixel(void)
lea rax, _ZZN5ftxui12_GLOBAL__N_114dev_null_pixelEvE5pixel; ftxui::`anonymous namespace'::dev_null_pixel(void)::pixel
loc_30432:
pop rbx
pop r14
pop rbp
retn
| void * ftxui::Screen::PixelAt(ftxui::Screen *this, int a2, int a3)
{
if ( ftxui::Box::Contain(this, a2, a3) )
return (void *)(*(_QWORD *)(*((_QWORD *)this + 3) + 24LL * a3) + 48LL * a2);
ftxui::`anonymous namespace'::dev_null_pixel(this);
return &ftxui::`anonymous namespace'::dev_null_pixel(void)::pixel;
}
| PixelAt:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,EDX
MOV EBX,ESI
MOV R14,RDI
CALL 0x0012fd54
TEST AL,AL
JZ 0x00130426
MOVSXD RAX,EBP
MOV RCX,qword ptr [R14 + 0x18]
IMUL RDX,RAX,0x18
MOVSXD RAX,EBX
IMUL RAX,RAX,0x30
ADD RAX,qword ptr [RCX + RDX*0x1]
JMP 0x00130432
LAB_00130426:
CALL 0x00130481
LEA RAX,[0x1533d8]
LAB_00130432:
POP RBX
POP R14
POP RBP
RET
|
/* ftxui::Screen::PixelAt(int, int) */
int1 * __thiscall ftxui::Screen::PixelAt(Screen *this,int param_1,int param_2)
{
char cVar1;
int1 *puVar2;
cVar1 = Box::Contain((Box *)this,param_1,param_2);
if (cVar1 == '\0') {
(anonymous_namespace)::dev_null_pixel();
puVar2 = (anonymous_namespace)::dev_null_pixel()::pixel;
}
else {
puVar2 = (int1 *)
((long)param_1 * 0x30 + *(long *)(*(long *)(this + 0x18) + (long)param_2 * 0x18));
}
return puVar2;
}
| |
33,686 | YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test() | yoga-mod/tests/YGDefaultValuesTest.cpp | TEST(YogaTest, assert_default_values) {
YGNodeRef root = YGNodeNew();
ASSERT_EQ(0u, YGNodeGetChildCount(root));
ASSERT_EQ(nullptr, YGNodeGetChild(root, 1));
ASSERT_EQ(YGDirectionInherit, YGNodeStyleGetDirection(root));
ASSERT_EQ(YGFlexDirectionColumn, YGNodeStyleGetFlexDirection(root));
ASSERT_EQ(YGJustifyFlexStart, YGNodeStyleGetJustifyContent(root));
ASSERT_EQ(YGAlignFlexStart, YGNodeStyleGetAlignContent(root));
ASSERT_EQ(YGAlignStretch, YGNodeStyleGetAlignItems(root));
ASSERT_EQ(YGAlignAuto, YGNodeStyleGetAlignSelf(root));
ASSERT_EQ(YGPositionTypeRelative, YGNodeStyleGetPositionType(root));
ASSERT_EQ(YGWrapNoWrap, YGNodeStyleGetFlexWrap(root));
ASSERT_EQ(YGOverflowVisible, YGNodeStyleGetOverflow(root));
ASSERT_FLOAT_EQ(0, YGNodeStyleGetFlexGrow(root));
ASSERT_FLOAT_EQ(0, YGNodeStyleGetFlexShrink(root));
ASSERT_EQ(YGNodeStyleGetFlexBasis(root).unit, YGUnitAuto);
ASSERT_EQ(YGNodeStyleGetPosition(root, YGEdgeLeft).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPosition(root, YGEdgeTop).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPosition(root, YGEdgeRight).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPosition(root, YGEdgeBottom).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPosition(root, YGEdgeStart).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPosition(root, YGEdgeEnd).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMargin(root, YGEdgeLeft).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMargin(root, YGEdgeTop).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMargin(root, YGEdgeRight).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMargin(root, YGEdgeBottom).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMargin(root, YGEdgeStart).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMargin(root, YGEdgeEnd).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPadding(root, YGEdgeLeft).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPadding(root, YGEdgeTop).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPadding(root, YGEdgeRight).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPadding(root, YGEdgeBottom).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPadding(root, YGEdgeStart).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetPadding(root, YGEdgeEnd).unit, YGUnitUndefined);
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetBorder(root, YGEdgeLeft)));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetBorder(root, YGEdgeTop)));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetBorder(root, YGEdgeRight)));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetBorder(root, YGEdgeBottom)));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetBorder(root, YGEdgeStart)));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetBorder(root, YGEdgeEnd)));
ASSERT_EQ(YGNodeStyleGetWidth(root).unit, YGUnitAuto);
ASSERT_EQ(YGNodeStyleGetHeight(root).unit, YGUnitAuto);
ASSERT_EQ(YGNodeStyleGetMinWidth(root).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMinHeight(root).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMaxWidth(root).unit, YGUnitUndefined);
ASSERT_EQ(YGNodeStyleGetMaxHeight(root).unit, YGUnitUndefined);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetRight(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetBottom(root));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetMargin(root, YGEdgeLeft));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetMargin(root, YGEdgeTop));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetMargin(root, YGEdgeRight));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetMargin(root, YGEdgeBottom));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetPadding(root, YGEdgeLeft));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetPadding(root, YGEdgeTop));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetPadding(root, YGEdgeRight));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetPadding(root, YGEdgeBottom));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetBorder(root, YGEdgeLeft));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetBorder(root, YGEdgeTop));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetBorder(root, YGEdgeRight));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetBorder(root, YGEdgeBottom));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeLayoutGetWidth(root)));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeLayoutGetHeight(root)));
ASSERT_EQ(YGDirectionInherit, YGNodeLayoutGetDirection(root));
YGNodeFreeRecursive(root);
} | O0 | cpp | YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0xf12d0
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x354d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN35YogaTest_assert_default_values_TestD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN35YogaTest_assert_default_values_TestD2Ev; YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test(
YogaTest_assert_default_values_Test *this)
{
YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test(this);
operator delete(this, 0x10uLL);
}
| ~YogaTest_assert_default_values_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x001f12d0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x001354d0
ADD RSP,0x10
POP RBP
RET
|
/* YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test() */
void __thiscall
YogaTest_assert_default_values_Test::~YogaTest_assert_default_values_Test
(YogaTest_assert_default_values_Test *this)
{
~YogaTest_assert_default_values_Test(this);
operator_delete(this,0x10);
return;
}
| |
33,687 | bf_mul_log2_radix | bluesky950520[P]quickjs/libbf.c | slimb_t bf_mul_log2_radix(slimb_t a1, unsigned int radix, int is_inv,
int is_ceil1)
{
int is_neg;
limb_t a;
BOOL is_ceil;
is_ceil = is_ceil1;
a = a1;
if (a1 < 0) {
a = -a;
is_neg = 1;
} else {
is_neg = 0;
}
is_ceil ^= is_neg;
if ((radix & (radix - 1)) == 0) {
int radix_bits;
/* radix is a power of two */
radix_bits = ceil_log2(radix);
if (is_inv) {
if (is_ceil)
a += radix_bits - 1;
a = a / radix_bits;
} else {
a = a * radix_bits;
}
} else {
const uint32_t *tab;
limb_t b0, b1;
dlimb_t t;
if (is_inv) {
tab = inv_log2_radix[radix - 2];
#if LIMB_BITS == 32
b1 = tab[0];
b0 = tab[1];
#else
b1 = ((limb_t)tab[0] << 32) | tab[1];
b0 = (limb_t)tab[2] << 32;
#endif
t = (dlimb_t)b0 * (dlimb_t)a;
t = (dlimb_t)b1 * (dlimb_t)a + (t >> LIMB_BITS);
a = t >> (LIMB_BITS - 1);
} else {
b0 = log2_radix[radix - 2];
t = (dlimb_t)b0 * (dlimb_t)a;
a = t >> (LIMB_BITS - 3);
}
/* a = floor(result) and 'result' cannot be an integer */
a += is_ceil;
}
if (is_neg)
a = -a;
return a;
} | O0 | c | bf_mul_log2_radix:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl %edx, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x50(%rsp)
jge 0xec8e5
xorl %eax, %eax
subq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x1, 0x40(%rsp)
jmp 0xec8ed
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
xorl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x4c(%rsp), %eax
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xec969
movl 0x4c(%rsp), %eax
movl %eax, %edi
callq 0xebad0
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x48(%rsp)
je 0xec951
cmpl $0x0, 0x34(%rsp)
je 0xec93b
movl 0x30(%rsp), %eax
subl $0x1, %eax
cltq
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, 0x38(%rsp)
jmp 0xec964
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0xeca54
cmpl $0x0, 0x48(%rsp)
je 0xeca03
movl 0x4c(%rsp), %eax
addl $-0x2, %eax
leaq (%rax,%rax,2), %rcx
leaq 0x250da(%rip), %rax # 0x111a60
leaq (%rax,%rcx,4), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
shlq $0x20, %rax
orq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
shlq $0x20, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
mulq %rcx
movq %rdx, 0x8(%rsp)
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %rcx
mulq %rcx
movq 0x8(%rsp), %rcx
addq %rcx, %rax
adcq $0x0, %rdx
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
shldq $0x1, %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0xeca45
movl 0x4c(%rsp), %eax
addl $-0x2, %eax
movl %eax, %ecx
leaq 0x251fd(%rip), %rax # 0x111c10
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
mulq %rcx
movq %rdx, 0x8(%rsp)
movq %rax, (%rsp)
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
shldq $0x3, %rcx, %rax
movq %rax, 0x38(%rsp)
movslq 0x34(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpl $0x0, 0x40(%rsp)
je 0xeca67
xorl %eax, %eax
subq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| bf_mul_log2_radix:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_C], esi
mov [rsp+58h+var_10], edx
mov [rsp+58h+var_14], ecx
mov eax, [rsp+58h+var_14]
mov [rsp+58h+var_24], eax
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_20], rax
cmp [rsp+58h+var_8], 0
jge short loc_EC8E5
xor eax, eax
sub rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
mov [rsp+58h+var_18], 1
jmp short loc_EC8ED
loc_EC8E5:
mov [rsp+58h+var_18], 0
loc_EC8ED:
mov eax, [rsp+58h+var_18]
xor eax, [rsp+58h+var_24]
mov [rsp+58h+var_24], eax
mov eax, [rsp+58h+var_C]
mov ecx, [rsp+58h+var_C]
sub ecx, 1
and eax, ecx
cmp eax, 0
jnz short loc_EC969
mov eax, [rsp+58h+var_C]
mov edi, eax
call ceil_log2
mov [rsp+58h+var_28], eax
cmp [rsp+58h+var_10], 0
jz short loc_EC951
cmp [rsp+58h+var_24], 0
jz short loc_EC93B
mov eax, [rsp+58h+var_28]
sub eax, 1
cdqe
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_EC93B:
mov rax, [rsp+58h+var_20]
movsxd rcx, [rsp+58h+var_28]
xor edx, edx
div rcx
mov [rsp+58h+var_20], rax
jmp short loc_EC964
loc_EC951:
mov rax, [rsp+58h+var_20]
movsxd rcx, [rsp+58h+var_28]
imul rax, rcx
mov [rsp+58h+var_20], rax
loc_EC964:
jmp loc_ECA54
loc_EC969:
cmp [rsp+58h+var_10], 0
jz loc_ECA03
mov eax, [rsp+58h+var_C]
add eax, 0FFFFFFFEh
lea rcx, [rax+rax*2]
lea rax, inv_log2_radix
lea rax, [rax+rcx*4]
mov [rsp+58h+var_30], rax
mov rcx, [rsp+58h+var_30]
mov eax, [rcx]
mov ecx, [rcx+4]
shl rax, 20h
or rax, rcx
mov [rsp+58h+var_40], rax
mov rax, [rsp+58h+var_30]
mov eax, [rax+8]
shl rax, 20h
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_38]
mov rcx, [rsp+58h+var_20]
mul rcx
mov [rsp+58h+var_50], rdx
mov [rsp+58h+var_58], rax
mov rax, [rsp+58h+var_40]
mov rcx, [rsp+58h+var_20]
mul rcx
mov rcx, [rsp+58h+var_50]
add rax, rcx
adc rdx, 0
mov [rsp+58h+var_58], rax
mov [rsp+58h+var_50], rdx
mov rcx, [rsp+58h+var_58]
mov rax, [rsp+58h+var_50]
shld rax, rcx, 1
mov [rsp+58h+var_20], rax
jmp short loc_ECA45
loc_ECA03:
mov eax, [rsp+58h+var_C]
add eax, 0FFFFFFFEh
mov ecx, eax
lea rax, log2_radix
mov rax, [rax+rcx*8]
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_38]
mov rcx, [rsp+58h+var_20]
mul rcx
mov [rsp+58h+var_50], rdx
mov [rsp+58h+var_58], rax
mov rcx, [rsp+58h+var_58]
mov rax, [rsp+58h+var_50]
shld rax, rcx, 3
mov [rsp+58h+var_20], rax
loc_ECA45:
movsxd rax, [rsp+58h+var_24]
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_ECA54:
cmp [rsp+58h+var_18], 0
jz short loc_ECA67
xor eax, eax
sub rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_ECA67:
mov rax, [rsp+58h+var_20]
add rsp, 58h
retn
| unsigned long long bf_mul_log2_radix(long long a1, unsigned int a2, int a3, int a4)
{
int v5; // [rsp+30h] [rbp-28h]
int v6; // [rsp+34h] [rbp-24h]
unsigned long long v7; // [rsp+38h] [rbp-20h]
unsigned long long v8; // [rsp+38h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-20h]
int v10; // [rsp+40h] [rbp-18h]
v7 = a1;
if ( a1 >= 0 )
{
v10 = 0;
}
else
{
v7 = -a1;
v10 = 1;
}
v6 = a4 ^ v10;
if ( ((a2 - 1) & a2) != 0 )
{
if ( a3 )
v9 = (__int128)(((v7 * (unsigned __int128)((unsigned long long)inv_log2_radix[3 * a2 - 4] << 32)) >> 64)
+ v7
* (unsigned __int128)(inv_log2_radix[3 * a2 - 5] | ((unsigned long long)inv_log2_radix[3 * a2 - 6] << 32))) >> 63;
else
v9 = (__int128)(v7 * (unsigned __int128)log2_radix[a2 - 2]) >> 61;
v8 = v9 + v6;
}
else
{
v5 = ceil_log2(a2);
if ( a3 )
{
if ( v6 )
v7 += v5 - 1;
v8 = v7 / v5;
}
else
{
v8 = v5 * v7;
}
}
if ( v10 )
return -(long long)v8;
return v8;
}
| bf_mul_log2_radix:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ESI
MOV dword ptr [RSP + 0x48],EDX
MOV dword ptr [RSP + 0x44],ECX
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0x34],EAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x50],0x0
JGE 0x001ec8e5
XOR EAX,EAX
SUB RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x40],0x1
JMP 0x001ec8ed
LAB_001ec8e5:
MOV dword ptr [RSP + 0x40],0x0
LAB_001ec8ed:
MOV EAX,dword ptr [RSP + 0x40]
XOR EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x34],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV ECX,dword ptr [RSP + 0x4c]
SUB ECX,0x1
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001ec969
MOV EAX,dword ptr [RSP + 0x4c]
MOV EDI,EAX
CALL 0x001ebad0
MOV dword ptr [RSP + 0x30],EAX
CMP dword ptr [RSP + 0x48],0x0
JZ 0x001ec951
CMP dword ptr [RSP + 0x34],0x0
JZ 0x001ec93b
MOV EAX,dword ptr [RSP + 0x30]
SUB EAX,0x1
CDQE
ADD RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x38],RAX
LAB_001ec93b:
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x30]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001ec964
LAB_001ec951:
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x30]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x38],RAX
LAB_001ec964:
JMP 0x001eca54
LAB_001ec969:
CMP dword ptr [RSP + 0x48],0x0
JZ 0x001eca03
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,-0x2
LEA RCX,[RAX + RAX*0x2]
LEA RAX,[0x211a60]
LEA RAX,[RAX + RCX*0x4]
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x4]
SHL RAX,0x20
OR RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + 0x8]
SHL RAX,0x20
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x38]
MUL RCX
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x38]
MUL RCX
MOV RCX,qword ptr [RSP + 0x8]
ADD RAX,RCX
ADC RDX,0x0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
SHLD RAX,RCX,0x1
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001eca45
LAB_001eca03:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,-0x2
MOV ECX,EAX
LEA RAX,[0x211c10]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x38]
MUL RCX
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
SHLD RAX,RCX,0x3
MOV qword ptr [RSP + 0x38],RAX
LAB_001eca45:
MOVSXD RAX,dword ptr [RSP + 0x34]
ADD RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x38],RAX
LAB_001eca54:
CMP dword ptr [RSP + 0x40],0x0
JZ 0x001eca67
XOR EAX,EAX
SUB RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x38],RAX
LAB_001eca67:
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x58
RET
|
ulong bf_mul_log2_radix(ulong param_1,uint param_2,int param_3,uint param_4)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int iVar8;
ulong local_58;
ulong local_50;
ulong local_20;
uint local_18;
local_20 = param_1;
if ((long)param_1 < 0) {
local_20 = -param_1;
}
local_18 = (uint)((long)param_1 < 0);
if ((param_2 & param_2 - 1) == 0) {
iVar8 = ceil_log2(param_2);
if (param_3 == 0) {
local_20 = local_20 * (long)iVar8;
}
else {
if ((local_18 ^ param_4) != 0) {
local_20 = (long)(iVar8 + -1) + local_20;
}
local_20 = local_20 / (ulong)(long)iVar8;
}
}
else {
if (param_3 == 0) {
auVar3._8_8_ = 0;
auVar3._0_8_ = *(ulong *)(log2_radix + (ulong)(param_2 - 2) * 8);
auVar6._8_8_ = 0;
auVar6._0_8_ = local_20;
local_58 = SUB168(auVar3 * auVar6,0);
local_50 = SUB168(auVar3 * auVar6,8);
local_20 = local_50 << 3 | local_58 >> 0x3d;
}
else {
lVar1 = (ulong)(param_2 - 2) * 0xc;
auVar2._4_4_ = *(int4 *)(inv_log2_radix + lVar1);
auVar2._0_4_ = *(int4 *)(inv_log2_radix + lVar1 + 4);
auVar4._8_8_ = 0;
auVar4._0_8_ = local_20;
auVar2._8_8_ = 0;
auVar5._8_8_ = 0;
auVar5._0_8_ = local_20;
local_50 = SUB168((ZEXT416(*(uint *)(inv_log2_radix + lVar1 + 8)) << 0x20) * auVar4,8);
auVar7._8_8_ = 0;
auVar7._0_8_ = local_50;
auVar7 = auVar2 * auVar5 + auVar7;
local_58 = auVar7._0_8_;
local_50 = auVar7._8_8_;
local_20 = local_50 << 1 | local_58 >> 0x3f;
}
local_20 = (long)(int)(local_18 ^ param_4) + local_20;
}
if (local_18 != 0) {
local_20 = -local_20;
}
return local_20;
}
| |
33,688 | my_thread_destroy_common_mutex | eloqsql/mysys/my_thr_init.c | void my_thread_destroy_common_mutex(void)
{
mysql_mutex_destroy(&THR_LOCK_open);
mysql_mutex_destroy(&THR_LOCK_lock);
mysql_mutex_destroy(&THR_LOCK_myisam);
mysql_mutex_destroy(&THR_LOCK_myisam_mmap);
mysql_mutex_destroy(&THR_LOCK_heap);
mysql_mutex_destroy(&THR_LOCK_net);
mysql_mutex_destroy(&THR_LOCK_charset);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_destroy(&LOCK_localtime_r);
#endif
} | O3 | c | my_thread_destroy_common_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x344493(%rip), %rbx # 0x36e1c8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29d53
leaq 0x2cd2b3(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x34446e(%rip), %rdi # 0x36e1c8
callq 0x243c0
leaq 0x3444aa(%rip), %rbx # 0x36e210
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29d84
leaq 0x2cd282(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x344485(%rip), %rdi # 0x36e210
callq 0x243c0
leaq 0x3444c1(%rip), %rbx # 0x36e258
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29db5
leaq 0x2cd251(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x34449c(%rip), %rdi # 0x36e258
callq 0x243c0
leaq 0x3444d8(%rip), %rbx # 0x36e2a0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29de6
leaq 0x2cd220(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x3444b3(%rip), %rdi # 0x36e2a0
callq 0x243c0
leaq 0x3444ef(%rip), %rbx # 0x36e2e8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29e17
leaq 0x2cd1ef(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x3444ca(%rip), %rdi # 0x36e2e8
callq 0x243c0
leaq 0x344506(%rip), %rbx # 0x36e330
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29e48
leaq 0x2cd1be(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x3444e1(%rip), %rdi # 0x36e330
callq 0x243c0
leaq 0x34451d(%rip), %rbx # 0x36e378
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29e79
leaq 0x2cd18d(%rip), %rax # 0x2f6ff8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x3444f8(%rip), %rdi # 0x36e378
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x243c0
| my_thread_destroy_common_mutex:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, THR_LOCK_open
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29D53
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29D53:
lea rdi, THR_LOCK_open
call _pthread_mutex_destroy
lea rbx, THR_LOCK_lock
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29D84
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29D84:
lea rdi, THR_LOCK_lock
call _pthread_mutex_destroy
lea rbx, THR_LOCK_myisam
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29DB5
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29DB5:
lea rdi, THR_LOCK_myisam
call _pthread_mutex_destroy
lea rbx, THR_LOCK_myisam_mmap
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29DE6
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29DE6:
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_destroy
lea rbx, THR_LOCK_heap
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29E17
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29E17:
lea rdi, THR_LOCK_heap
call _pthread_mutex_destroy
lea rbx, THR_LOCK_net
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29E48
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29E48:
lea rdi, THR_LOCK_net
call _pthread_mutex_destroy
lea rbx, THR_LOCK_charset
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_29E79
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_29E79:
lea rdi, THR_LOCK_charset
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_destroy
| long long my_thread_destroy_common_mutex()
{
long long v0; // rdi
long long v1; // rdi
long long v2; // rdi
long long v3; // rdi
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
v0 = THR_LOCK_open[8];
if ( v0 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v0);
THR_LOCK_open[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_open);
v1 = THR_LOCK_lock[8];
if ( v1 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v1);
THR_LOCK_lock[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_lock);
v2 = THR_LOCK_myisam[8];
if ( v2 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v2);
THR_LOCK_myisam[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_myisam);
v3 = THR_LOCK_myisam_mmap[8];
if ( v3 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v3);
THR_LOCK_myisam_mmap[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_myisam_mmap);
v4 = THR_LOCK_heap[8];
if ( v4 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v4);
THR_LOCK_heap[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_heap);
v5 = THR_LOCK_net[8];
if ( v5 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v5);
THR_LOCK_net[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_net);
v6 = THR_LOCK_charset[8];
if ( v6 )
{
(*((void ( **)(long long))PSI_server[0] + 9))(v6);
THR_LOCK_charset[8] = 0LL;
}
return pthread_mutex_destroy(THR_LOCK_charset);
}
| my_thread_destroy_common_mutex:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x46e1c8]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129d53
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129d53:
LEA RDI,[0x46e1c8]
CALL 0x001243c0
LEA RBX,[0x46e210]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129d84
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129d84:
LEA RDI,[0x46e210]
CALL 0x001243c0
LEA RBX,[0x46e258]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129db5
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129db5:
LEA RDI,[0x46e258]
CALL 0x001243c0
LEA RBX,[0x46e2a0]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129de6
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129de6:
LEA RDI,[0x46e2a0]
CALL 0x001243c0
LEA RBX,[0x46e2e8]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129e17
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129e17:
LEA RDI,[0x46e2e8]
CALL 0x001243c0
LEA RBX,[0x46e330]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129e48
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129e48:
LEA RDI,[0x46e330]
CALL 0x001243c0
LEA RBX,[0x46e378]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00129e79
LEA RAX,[0x3f6ff8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00129e79:
LEA RDI,[0x46e378]
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001243c0
|
void my_thread_destroy_common_mutex(void)
{
if (THR_LOCK_open._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_open._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_open);
if (THR_LOCK_lock._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_lock._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_lock);
if (THR_LOCK_myisam._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_myisam._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam);
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_myisam_mmap._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam_mmap);
if (THR_LOCK_heap._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_heap._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_heap);
if (THR_LOCK_net._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_net._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_net);
if (THR_LOCK_charset._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_charset._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_charset);
return;
}
| |
33,689 | CLI::InvalidError::InvalidError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp | explicit InvalidError(std::string name)
: InvalidError(name + ": Too many positional arguments with unlimited expected args", ExitCodes::InvalidError) {
} | O1 | cpp | CLI::InvalidError::InvalidError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbx
movq %rdi, %rbx
leaq 0x2a887(%rip), %rax # 0x491f0
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x1e984
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7490
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x7430
| _ZN3CLI12InvalidErrorD0Ev:
push rbx
mov rbx, rdi
lea rax, off_491F0
mov [rdi], rax
mov rdi, [rdi+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_1E984
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1E984:
mov rdi, rbx; this
call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error()
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void CLI::InvalidError::~InvalidError(CLI::InvalidError *this)
{
char *v2; // rdi
*(_QWORD *)this = off_491F0;
v2 = (char *)*((_QWORD *)this + 3);
if ( v2 != (char *)this + 40 )
operator delete(v2, *((_QWORD *)this + 5) + 1LL);
std::runtime_error::~runtime_error(this);
operator delete(this, 0x38uLL);
}
| ~InvalidError:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1491f0]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x0011e984
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0011e984:
MOV RDI,RBX
CALL 0x00107490
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x00107430
|
/* CLI::InvalidError::~InvalidError() */
void __thiscall CLI::InvalidError::~InvalidError(InvalidError *this)
{
*(int ***)this = &PTR__Error_001491f0;
if (*(InvalidError **)(this + 0x18) != this + 0x28) {
operator_delete(*(InvalidError **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
std::runtime_error::~runtime_error((runtime_error *)this);
operator_delete(this,0x38);
return;
}
| |
33,690 | blst_uniq_test | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/rb_tree.c | int blst_uniq_test(struct rb_tree *tree, const void *data, size_t len)
{ return (int)rb_tree_insert(tree, data, len); } | O1 | c | blst_uniq_test:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1c0, %rsp # imm = 0x1C0
movq (%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x6879d
movq 0x18(%rcx), %r9
shrq %r9
movq %rdx, %r8
subq %r9, %r8
cmovbq %rdx, %r9
testq %r9, %r9
je 0x68771
movq 0x10(%rcx), %r10
xorl %r11d, %r11d
movzbl (%rsi,%r11), %ebx
movzbl (%r10,%r11), %r14d
cmpb %r14b, %bl
jne 0x6876b
incq %r11
cmpq %r11, %r9
jne 0x68752
jmp 0x68771
subq %r14, %rbx
movq %rbx, %r8
testq %r8, %r8
je 0x6878f
setg -0x50(%rbp,%rax)
movq %rcx, -0x250(%rbp,%rax,8)
setg %r9b
movzbl %r9b, %r9d
movq (%rcx,%r9,8), %rcx
testq %r8, %r8
je 0x6889d
incq %rax
jmp 0x68730
movq 0x8(%rdi), %rcx
leaq 0x1(%rcx), %r8
movq %r8, 0x8(%rdi)
shlq $0x5, %rcx
addq %rdi, %rcx
addq $0x10, %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %rsi, 0x10(%rcx)
leaq 0x1(,%rdx,2), %rdx
movq %rdx, 0x18(%rcx)
movq %rdi, %rdx
testq %rax, %rax
je 0x687e2
movzbl -0x51(%rbp,%rax), %edx
shll $0x3, %edx
addq -0x258(%rbp,%rax,8), %rdx
movq %rcx, (%rdx)
cmpq $0x2, %rax
jb 0x6888e
movq -0x258(%rbp,%rax,8), %rcx
testb $0x1, 0x18(%rcx)
je 0x6888e
movzbl -0x52(%rbp,%rax), %esi
movq -0x260(%rbp,%rax,8), %rdx
movq %rsi, %r8
xorq $0x1, %r8
movq (%rdx,%r8,8), %r9
testq %r9, %r9
je 0x68825
testb $0x1, 0x18(%r9)
jne 0x68873
cmpb %sil, -0x51(%rbp,%rax)
je 0x6883f
movq (%rcx,%r8,8), %r9
movq (%r9,%rsi,8), %r10
movq %r10, (%rcx,%r8,8)
movq %rcx, (%r9,%rsi,8)
movq %r9, %rcx
movq (%rcx,%r8,8), %r9
movq %r9, (%rdx,%rsi,8)
movq %rdx, (%rcx,%r8,8)
orb $0x1, 0x18(%rdx)
andb $-0x2, 0x18(%rcx)
cmpq $0x2, %rax
jne 0x6885e
movq %rcx, (%rdi)
jmp 0x6886f
movq -0x268(%rbp,%rax,8), %rdx
movzbl -0x53(%rbp,%rax), %esi
movq %rcx, (%rdx,%rsi,8)
xorl %ecx, %ecx
jmp 0x68886
orb $0x1, 0x18(%rdx)
addq $-0x2, %rax
andb $-0x2, 0x18(%rcx)
andb $-0x2, 0x18(%r9)
movb $0x1, %cl
testb %cl, %cl
jne 0x687e5
movq (%rdi), %rax
andq $-0x2, 0x18(%rax)
movl $0x1, %eax
jmp 0x6889f
xorl %eax, %eax
addq $0x1c0, %rsp # imm = 0x1C0
popq %rbx
popq %r14
popq %rbp
retq
| blst_uniq_test:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 1C0h
mov rcx, [rdi]
xor eax, eax
loc_68730:
test rcx, rcx
jz short loc_6879D
mov r9, [rcx+18h]
shr r9, 1
mov r8, rdx
sub r8, r9
cmovb r9, rdx
test r9, r9
jz short loc_68771
mov r10, [rcx+10h]
xor r11d, r11d
loc_68752:
movzx ebx, byte ptr [rsi+r11]
movzx r14d, byte ptr [r10+r11]
cmp bl, r14b
jnz short loc_6876B
inc r11
cmp r9, r11
jnz short loc_68752
jmp short loc_68771
loc_6876B:
sub rbx, r14
mov r8, rbx
loc_68771:
test r8, r8
jz short loc_6878F
setnle [rbp+rax+var_50]
mov [rbp+rax*8+var_250], rcx
setnle r9b
movzx r9d, r9b
mov rcx, [rcx+r9*8]
loc_6878F:
test r8, r8
jz loc_6889D
inc rax
jmp short loc_68730
loc_6879D:
mov rcx, [rdi+8]
lea r8, [rcx+1]
mov [rdi+8], r8
shl rcx, 5
add rcx, rdi
add rcx, 10h
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
mov [rcx+10h], rsi
lea rdx, ds:1[rdx*2]
mov [rcx+18h], rdx
mov rdx, rdi
test rax, rax
jz short loc_687E2
movzx edx, [rbp+rax+var_51]
shl edx, 3
add rdx, [rbp+rax*8+var_258]
loc_687E2:
mov [rdx], rcx
loc_687E5:
cmp rax, 2
jb loc_6888E
mov rcx, [rbp+rax*8+var_258]
test byte ptr [rcx+18h], 1
jz loc_6888E
movzx esi, [rbp+rax+var_52]
mov rdx, [rbp+rax*8+var_260]
mov r8, rsi
xor r8, 1
mov r9, [rdx+r8*8]
test r9, r9
jz short loc_68825
test byte ptr [r9+18h], 1
jnz short loc_68873
loc_68825:
cmp [rbp+rax+var_51], sil
jz short loc_6883F
mov r9, [rcx+r8*8]
mov r10, [r9+rsi*8]
mov [rcx+r8*8], r10
mov [r9+rsi*8], rcx
mov rcx, r9
loc_6883F:
mov r9, [rcx+r8*8]
mov [rdx+rsi*8], r9
mov [rcx+r8*8], rdx
or byte ptr [rdx+18h], 1
and byte ptr [rcx+18h], 0FEh
cmp rax, 2
jnz short loc_6885E
mov [rdi], rcx
jmp short loc_6886F
loc_6885E:
mov rdx, [rbp+rax*8+var_268]
movzx esi, [rbp+rax+var_53]
mov [rdx+rsi*8], rcx
loc_6886F:
xor ecx, ecx
jmp short loc_68886
loc_68873:
or byte ptr [rdx+18h], 1
add rax, 0FFFFFFFFFFFFFFFEh
and byte ptr [rcx+18h], 0FEh
and byte ptr [r9+18h], 0FEh
mov cl, 1
loc_68886:
test cl, cl
jnz loc_687E5
loc_6888E:
mov rax, [rdi]
and qword ptr [rax+18h], 0FFFFFFFFFFFFFFFEh
mov eax, 1
jmp short loc_6889F
loc_6889D:
xor eax, eax
loc_6889F:
add rsp, 1C0h
pop rbx
pop r14
pop rbp
retn
| long long blst_uniq_test(long long *a1, long long a2, unsigned long long a3)
{
long long v3; // rcx
unsigned long long v4; // rax
unsigned long long v5; // r9
long long v6; // r8
long long v7; // r11
long long v8; // rbx
long long v9; // r14
long long v10; // rcx
long long v11; // rcx
long long *v12; // rdx
long long v13; // rcx
long long v14; // rsi
long long v15; // rdx
long long v16; // r8
long long v17; // r9
long long v18; // r9
char v19; // cl
_QWORD v21[77]; // [rsp+0h] [rbp-268h]
v3 = *a1;
v4 = 0LL;
while ( v3 )
{
v5 = *(_QWORD *)(v3 + 24) >> 1;
v6 = a3 - v5;
if ( a3 < v5 )
v5 = a3;
if ( v5 )
{
v7 = 0LL;
while ( 1 )
{
v8 = *(unsigned __int8 *)(a2 + v7);
v9 = *(unsigned __int8 *)(*(_QWORD *)(v3 + 16) + v7);
if ( (_BYTE)v8 != (_BYTE)v9 )
break;
if ( v5 == ++v7 )
goto LABEL_11;
}
v6 = v8 - v9;
}
LABEL_11:
if ( !v6 )
return 0LL;
*((_BYTE *)&v21[67] + v4) = v6 > 0;
v21[v4 + 3] = v3;
v3 = *(_QWORD *)(v3 + 8LL * (v6 > 0));
++v4;
}
v10 = a1[1];
a1[1] = v10 + 1;
v11 = (long long)&a1[4 * v10 + 2];
*(_OWORD *)v11 = 0LL;
*(_QWORD *)(v11 + 16) = a2;
*(_QWORD *)(v11 + 24) = 2 * a3 + 1;
v12 = a1;
if ( v4 )
v12 = (long long *)(v21[v4 + 2] + 8 * (unsigned int)*((unsigned __int8 *)&v21[66] + v4 + 7));
*v12 = v11;
do
{
if ( v4 < 2 )
break;
v13 = v21[v4 + 2];
if ( (*(_BYTE *)(v13 + 24) & 1) == 0 )
break;
v14 = *((unsigned __int8 *)&v21[66] + v4 + 6);
v15 = v21[v4 + 1];
v16 = v14 ^ 1;
v17 = *(_QWORD *)(v15 + 8 * (v14 ^ 1));
if ( v17 && (*(_BYTE *)(v17 + 24) & 1) != 0 )
{
*(_BYTE *)(v15 + 24) |= 1u;
v4 -= 2LL;
*(_BYTE *)(v13 + 24) &= ~1u;
*(_BYTE *)(v17 + 24) &= ~1u;
v19 = 1;
}
else
{
if ( *((_BYTE *)&v21[66] + v4 + 7) != (_BYTE)v14 )
{
v18 = *(_QWORD *)(v13 + 8 * v16);
*(_QWORD *)(v13 + 8 * v16) = *(_QWORD *)(v18 + 8 * v14);
*(_QWORD *)(v18 + 8 * v14) = v13;
v13 = v18;
}
*(_QWORD *)(v15 + 8 * v14) = *(_QWORD *)(v13 + 8 * v16);
*(_QWORD *)(v13 + 8 * v16) = v15;
*(_BYTE *)(v15 + 24) |= 1u;
*(_BYTE *)(v13 + 24) &= ~1u;
if ( v4 == 2 )
*a1 = v13;
else
*(_QWORD *)(v21[v4] + 8LL * *((unsigned __int8 *)&v21[66] + v4 + 5)) = v13;
v19 = 0;
}
}
while ( v19 );
*(_QWORD *)(*a1 + 24) &= ~1uLL;
return 1LL;
}
| blst_uniq_test:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x1c0
MOV RCX,qword ptr [RDI]
XOR EAX,EAX
LAB_00168730:
TEST RCX,RCX
JZ 0x0016879d
MOV R9,qword ptr [RCX + 0x18]
SHR R9,0x1
MOV R8,RDX
SUB R8,R9
CMOVC R9,RDX
TEST R9,R9
JZ 0x00168771
MOV R10,qword ptr [RCX + 0x10]
XOR R11D,R11D
LAB_00168752:
MOVZX EBX,byte ptr [RSI + R11*0x1]
MOVZX R14D,byte ptr [R10 + R11*0x1]
CMP BL,R14B
JNZ 0x0016876b
INC R11
CMP R9,R11
JNZ 0x00168752
JMP 0x00168771
LAB_0016876b:
SUB RBX,R14
MOV R8,RBX
LAB_00168771:
TEST R8,R8
JZ 0x0016878f
SETG byte ptr [RBP + RAX*0x1 + -0x50]
MOV qword ptr [RBP + RAX*0x8 + -0x250],RCX
SETG R9B
MOVZX R9D,R9B
MOV RCX,qword ptr [RCX + R9*0x8]
LAB_0016878f:
TEST R8,R8
JZ 0x0016889d
INC RAX
JMP 0x00168730
LAB_0016879d:
MOV RCX,qword ptr [RDI + 0x8]
LEA R8,[RCX + 0x1]
MOV qword ptr [RDI + 0x8],R8
SHL RCX,0x5
ADD RCX,RDI
ADD RCX,0x10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],RSI
LEA RDX,[0x1 + RDX*0x2]
MOV qword ptr [RCX + 0x18],RDX
MOV RDX,RDI
TEST RAX,RAX
JZ 0x001687e2
MOVZX EDX,byte ptr [RBP + RAX*0x1 + -0x51]
SHL EDX,0x3
ADD RDX,qword ptr [RBP + RAX*0x8 + -0x258]
LAB_001687e2:
MOV qword ptr [RDX],RCX
LAB_001687e5:
CMP RAX,0x2
JC 0x0016888e
MOV RCX,qword ptr [RBP + RAX*0x8 + -0x258]
TEST byte ptr [RCX + 0x18],0x1
JZ 0x0016888e
MOVZX ESI,byte ptr [RBP + RAX*0x1 + -0x52]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x260]
MOV R8,RSI
XOR R8,0x1
MOV R9,qword ptr [RDX + R8*0x8]
TEST R9,R9
JZ 0x00168825
TEST byte ptr [R9 + 0x18],0x1
JNZ 0x00168873
LAB_00168825:
CMP byte ptr [RBP + RAX*0x1 + -0x51],SIL
JZ 0x0016883f
MOV R9,qword ptr [RCX + R8*0x8]
MOV R10,qword ptr [R9 + RSI*0x8]
MOV qword ptr [RCX + R8*0x8],R10
MOV qword ptr [R9 + RSI*0x8],RCX
MOV RCX,R9
LAB_0016883f:
MOV R9,qword ptr [RCX + R8*0x8]
MOV qword ptr [RDX + RSI*0x8],R9
MOV qword ptr [RCX + R8*0x8],RDX
OR byte ptr [RDX + 0x18],0x1
AND byte ptr [RCX + 0x18],0xfe
CMP RAX,0x2
JNZ 0x0016885e
MOV qword ptr [RDI],RCX
JMP 0x0016886f
LAB_0016885e:
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x268]
MOVZX ESI,byte ptr [RBP + RAX*0x1 + -0x53]
MOV qword ptr [RDX + RSI*0x8],RCX
LAB_0016886f:
XOR ECX,ECX
JMP 0x00168886
LAB_00168873:
OR byte ptr [RDX + 0x18],0x1
ADD RAX,-0x2
AND byte ptr [RCX + 0x18],0xfe
AND byte ptr [R9 + 0x18],0xfe
MOV CL,0x1
LAB_00168886:
TEST CL,CL
JNZ 0x001687e5
LAB_0016888e:
MOV RAX,qword ptr [RDI]
AND qword ptr [RAX + 0x18],-0x2
MOV EAX,0x1
JMP 0x0016889f
LAB_0016889d:
XOR EAX,EAX
LAB_0016889f:
ADD RSP,0x1c0
POP RBX
POP R14
POP RBP
RET
|
int8 blst_uniq_test(long *param_1,long param_2,ulong param_3)
{
byte bVar1;
bool bVar2;
ulong uVar3;
long lVar4;
long lVar5;
long *plVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
long alStack_270 [66];
byte abStack_5b [67];
uVar3 = 0;
for (lVar4 = *param_1; lVar4 != 0; lVar4 = *(long *)(lVar4 + (ulong)(0 < lVar7) * 8)) {
uVar8 = *(ulong *)(lVar4 + 0x18) >> 1;
lVar7 = param_3 - uVar8;
if (param_3 < uVar8) {
uVar8 = param_3;
}
if (uVar8 != 0) {
uVar9 = 0;
do {
bVar1 = *(byte *)(*(long *)(lVar4 + 0x10) + uVar9);
if (*(byte *)(param_2 + uVar9) != bVar1) {
lVar7 = (ulong)*(byte *)(param_2 + uVar9) - (ulong)bVar1;
break;
}
uVar9 = uVar9 + 1;
} while (uVar8 != uVar9);
}
if (lVar7 == 0) {
return 0;
}
abStack_5b[uVar3 + 3] = 0 < lVar7;
alStack_270[uVar3 + 3] = lVar4;
uVar3 = uVar3 + 1;
}
lVar4 = param_1[1];
param_1[1] = lVar4 + 1;
param_1[lVar4 * 4 + 2] = 0;
param_1[lVar4 * 4 + 3] = 0;
param_1[lVar4 * 4 + 4] = param_2;
param_1[lVar4 * 4 + 5] = param_3 * 2 + 1;
plVar6 = param_1;
if (uVar3 != 0) {
plVar6 = (long *)((ulong)abStack_5b[uVar3 + 2] * 8 + alStack_270[uVar3 + 2]);
}
*plVar6 = (long)(param_1 + lVar4 * 4 + 2);
do {
if ((uVar3 < 2) || (lVar4 = alStack_270[uVar3 + 2], (*(byte *)(lVar4 + 0x18) & 1) == 0)) break;
uVar8 = (ulong)abStack_5b[uVar3 + 1];
lVar7 = alStack_270[uVar3 + 1];
uVar9 = uVar8 ^ 1;
lVar5 = *(long *)(lVar7 + uVar9 * 8);
if ((lVar5 == 0) || ((*(byte *)(lVar5 + 0x18) & 1) == 0)) {
lVar5 = lVar4;
if (abStack_5b[uVar3 + 2] != abStack_5b[uVar3 + 1]) {
lVar5 = *(long *)(lVar4 + uVar9 * 8);
*(int8 *)(lVar4 + uVar9 * 8) = *(int8 *)(lVar5 + uVar8 * 8);
*(long *)(lVar5 + uVar8 * 8) = lVar4;
}
*(int8 *)(lVar7 + uVar8 * 8) = *(int8 *)(lVar5 + uVar9 * 8);
*(long *)(lVar5 + uVar9 * 8) = lVar7;
*(byte *)(lVar7 + 0x18) = *(byte *)(lVar7 + 0x18) | 1;
*(byte *)(lVar5 + 0x18) = *(byte *)(lVar5 + 0x18) & 0xfe;
if (uVar3 == 2) {
*param_1 = lVar5;
}
else {
*(long *)(alStack_270[uVar3] + (ulong)abStack_5b[uVar3] * 8) = lVar5;
}
bVar2 = false;
}
else {
*(byte *)(lVar7 + 0x18) = *(byte *)(lVar7 + 0x18) | 1;
uVar3 = uVar3 - 2;
*(byte *)(lVar4 + 0x18) = *(byte *)(lVar4 + 0x18) & 0xfe;
*(byte *)(lVar5 + 0x18) = *(byte *)(lVar5 + 0x18) & 0xfe;
bVar2 = true;
}
} while (bVar2);
*(ulong *)(*param_1 + 0x18) = *(ulong *)(*param_1 + 0x18) & 0xfffffffffffffffe;
return 1;
}
| |
33,691 | MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) | MarsToPluto[P]llmstudio/build_O1/llmstudio_autogen/UVLADIE3JM/moc_mainwindow.cpp | void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<MainWindow *>(_o);
(void)_t;
switch (_id) {
case 0: _t->onChatSelectionChanged(); break;
default: ;
}
}
(void)_a;
} | O1 | cpp | MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**):
orl %edx, %esi
je 0x90b6
retq
nop
| _ZN10MainWindow18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv:
or esi, edx
jz _ZN10MainWindow22onChatSelectionChangedEv; MainWindow::onChatSelectionChanged(void)
retn
| long long MainWindow::qt_static_metacall(MainWindow *a1, int a2, int a3)
{
long long result; // rax
if ( !(a3 | a2) )
return MainWindow::onChatSelectionChanged(a1);
return result;
}
| qt_static_metacall:
OR ESI,EDX
JZ 0x001090b6
RET
|
/* MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) */
void MainWindow::qt_static_metacall(long param_1,int param_2,int param_3)
{
QString *pQVar1;
int *piVar2;
long *plVar3;
int4 uStack_88;
int4 uStack_84;
int4 uStack_80;
int4 uStack_7c;
int8 uStack_78;
QArrayData *apQStack_70 [3];
QArrayData *apQStack_58 [3];
int4 uStack_40;
int4 uStack_3c;
int4 uStack_38;
int4 uStack_34;
int8 uStack_30;
if (param_2 != 0 || param_3 != 0) {
return;
}
plVar3 = (long *)QListWidget::currentItem();
pQVar1 = *(QString **)(param_1 + 0xe8);
if (plVar3 != (long *)0x0) {
QString::fromUtf8(&uStack_40,0x30,"Chat history for: %1\n\n(Load actual content here)");
uStack_88 = uStack_40;
uStack_84 = uStack_3c;
uStack_80 = uStack_38;
uStack_7c = uStack_34;
uStack_78 = uStack_30;
(**(code **)(*plVar3 + 0x18))(&uStack_40,plVar3,0);
QVariant::toString();
QVariant::~QVariant((QVariant *)&uStack_40);
QString::arg(apQStack_58,&uStack_88,apQStack_70,0,0x20);
QTextEdit::setPlainText(pQVar1);
if (apQStack_58[0] != (QArrayData *)0x0) {
LOCK();
*(int *)apQStack_58[0] = *(int *)apQStack_58[0] + -1;
UNLOCK();
if (*(int *)apQStack_58[0] == 0) {
QArrayData::deallocate(apQStack_58[0],2,8);
}
}
if (apQStack_70[0] != (QArrayData *)0x0) {
LOCK();
*(int *)apQStack_70[0] = *(int *)apQStack_70[0] + -1;
UNLOCK();
if (*(int *)apQStack_70[0] == 0) {
QArrayData::deallocate(apQStack_70[0],2,8);
}
}
piVar2 = (int *)CONCAT44(uStack_84,uStack_88);
if (piVar2 != (int *)0x0) {
LOCK();
*piVar2 = *piVar2 + -1;
UNLOCK();
if (*piVar2 == 0) {
QArrayData::deallocate((QArrayData *)CONCAT44(uStack_84,uStack_88),2,8);
}
}
QWidget::setFocus(*(int8 *)(param_1 + 0x100),7);
return;
}
QTextEdit::clear();
return;
}
| |
33,692 | spdlog::details::B_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
string_view_t field_value{full_months[static_cast<size_t>(tm_time.tm_mon)]};
ScopedPadder p(field_value.size(), padinfo_, dest);
fmt_helper::append_string_view(field_value, dest);
} | O0 | c | spdlog::details::B_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movslq 0x10(%rax), %rsi
leaq 0x11146e(%rip), %rdi # 0x181b50
callq 0x5e2d0
movq (%rax), %rax
leaq 0x28(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rcx
movq %rcx, (%rax)
movq 0x58(%rsp), %rdi
callq 0x16290
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x2a430
movq 0x8(%rsp), %rdx
movq %rax, %rsi
addq $0x8, %rdx
movq 0x38(%rsp), %rcx
leaq 0x27(%rsp), %rdi
callq 0x546d0
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x43a00
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN6spdlog7details11B_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov [rsp+68h+var_30], rcx
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_28]
movsxd rsi, dword ptr [rax+10h]
lea rdi, _ZN6spdlog7detailsL11full_monthsE; spdlog::details::full_months
call _ZNKSt5arrayIPKcLm12EEixEm; std::array<char const*,12ul>::operator[](ulong)
mov rax, [rax]
lea rcx, [rsp+68h+var_40]
mov [rsp+68h+var_8], rcx
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_68], rax
mov rcx, [rsp+68h+var_10]
mov [rax], rcx
mov rdi, [rsp+68h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+68h+var_68]
mov [rax+8], rcx
lea rdi, [rsp+68h+var_40]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rdx, [rsp+68h+var_60]
mov rsi, rax
add rdx, 8
mov rcx, [rsp+68h+var_30]
lea rdi, [rsp+68h+var_41]
call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_50], rax
mov rdx, [rsp+68h+var_30]
mov rdi, [rsp+68h+var_58]
mov rsi, [rsp+68h+var_50]
call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
add rsp, 68h
retn
| long long spdlog::details::B_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v4; // rax
long long v6; // [rsp+28h] [rbp-40h] BYREF
long long v7; // [rsp+30h] [rbp-38h]
_QWORD *v8; // [rsp+38h] [rbp-30h]
long long v9; // [rsp+40h] [rbp-28h]
long long v10; // [rsp+48h] [rbp-20h]
long long v11; // [rsp+50h] [rbp-18h]
long long v12; // [rsp+58h] [rbp-10h]
long long *v13; // [rsp+60h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v4 = *(_QWORD *)std::array<char const*,12ul>::operator[]((long long)spdlog::details::full_months, *(int *)(a3 + 16));
v13 = &v6;
v12 = v4;
v6 = v4;
v7 = strlen(v4);
fmt::v10::basic_string_view<char>::size((long long)&v6);
spdlog::details::null_scoped_padder::null_scoped_padder();
return spdlog::details::fmt_helper::append_string_view(v6, v7, v8);
}
| format:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RSI,dword ptr [RAX + 0x10]
LEA RDI,[0x281b50]
CALL 0x0015e2d0
MOV RAX,qword ptr [RAX]
LEA RCX,[RSP + 0x28]
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00116290
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],RCX
LEA RDI,[RSP + 0x28]
CALL 0x0012a430
MOV RDX,qword ptr [RSP + 0x8]
MOV RSI,RAX
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x27]
CALL 0x001546d0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00143a00
ADD RSP,0x68
RET
|
/* spdlog::details::B_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::B_formatter<spdlog::details::null_scoped_padder>::format
(B_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
int8 *puVar1;
ulong uVar2;
null_scoped_padder local_41;
fmt_helper *local_40;
size_t local_38;
basic_memory_buffer *local_30;
tm *local_28;
log_msg *local_20;
B_formatter<spdlog::details::null_scoped_padder> *local_18;
fmt_helper *local_10;
fmt_helper **local_8;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
puVar1 = (int8 *)
std::array<char_const*,12ul>::operator[]
((array<char_const*,12ul> *)full_months,(long)param_2->tm_mon);
local_40 = (fmt_helper *)*puVar1;
local_8 = &local_40;
local_10 = local_40;
local_38 = strlen((char *)local_40);
uVar2 = fmt::v10::basic_string_view<char>::size((basic_string_view<char> *)&local_40);
null_scoped_padder::null_scoped_padder(&local_41,uVar2,(padding_info *)(this + 8),local_30);
fmt_helper::append_string_view(local_40,local_38,local_30);
return;
}
| |
33,693 | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | monkey531[P]llama/common/./json.hpp | static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("parse_error", id_), "parse error",
position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8301a(%rip), %rsi # 0xb62d5
leaq 0x8301e(%rip), %rdx # 0xb62e0
leaq 0x8(%rsp), %rdi
callq 0x22878
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
callq 0x312c2
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x3950a
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq %r15, (%rsp)
leaq 0x82fd6(%rip), %rdx # 0xb62e1
leaq 0x84a15(%rip), %r8 # 0xb7d27
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rcx
leaq 0x28(%rsp), %r9
callq 0x39401
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x33345
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x33360
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3337b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x196d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x33392
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
movq (%r14), %r14
movq 0x88(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3152a
leaq 0xb5e42(%rip), %rax # 0xe91f0
movq %rax, (%rbx)
movq %r14, 0x20(%rbx)
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x333d6
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x196d0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x33483
movq 0x98(%rsp), %rsi
jmp 0x33476
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x33427
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x33447
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x33447
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x33467
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x33467
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x33483
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x33483
movq %rax, %rbx
movq %rbx, %rdi
callq 0x19c00
nop
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea r12, [rsp+0D8h+var_C0]
mov [r12-10h], r12
lea rsi, aParseError; "parse_error"
lea rdx, aParseError+0Bh; ""
lea rdi, [rsp+0D8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0D8h+var_70]; int
lea rsi, [rsp+0D8h+var_D0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0D8h+var_90]; int
mov rsi, r14; int
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&)
lea r13, [rsp+0D8h+var_A0]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
mov [rsp+0D8h+var_D8], r15
lea rdx, aParseError_0; "parse error"
lea r8, aSubtype+9; ": "
lea rdi, [rsp+0D8h+var_50]
lea rsi, [rsp+0D8h+var_70]
lea rcx, [rsp+0D8h+var_90]
lea r9, [rsp+0D8h+var_B0]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&)
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, r13
jz short loc_33345
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33345:
lea rax, [rsp+0D8h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_33360
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33360:
lea rax, [rsp+0D8h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3337B
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3337B:
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r12
jz short loc_33392
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33392:
mov r14, [r14]
mov rdx, [rsp+0D8h+var_50]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, off_E91F0
mov [rbx], rax
mov [rbx+20h], r14
lea rax, [rsp+0D8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_333D6
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_333D6:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_90]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_33483
mov rsi, [rsp+arg_90]
jmp short loc_33476
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_33427
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33427:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_33447
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_33447
mov rbx, rax
loc_33447:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_33467
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_33467
mov rbx, rax
loc_33467:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_33483
mov rsi, [rsp+arg_10]
loc_33476:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_33483
mov rbx, rax
loc_33483:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
long long *a3,
long long a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // r14
void *v12; // [rsp+0h] [rbp-D8h]
void *v13[2]; // [rsp+8h] [rbp-D0h] BYREF
_QWORD v14[2]; // [rsp+18h] [rbp-C0h] BYREF
void *v15; // [rsp+28h] [rbp-B0h] BYREF
long long v16; // [rsp+30h] [rbp-A8h]
_QWORD v17[2]; // [rsp+38h] [rbp-A0h] BYREF
int v18[4]; // [rsp+48h] [rbp-90h] BYREF
long long v19; // [rsp+58h] [rbp-80h] BYREF
int v20[4]; // [rsp+68h] [rbp-70h] BYREF
long long v21; // [rsp+78h] [rbp-60h] BYREF
char *v22; // [rsp+88h] [rbp-50h] BYREF
long long v23; // [rsp+98h] [rbp-40h] BYREF
v13[0] = v14;
std::string::_M_construct<char const*>((long long)v13, "parse_error", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v20, (long long)v13, a2);
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](
(int)v18,
(int)a3,
v6,
v7,
v8,
v9,
v12,
(int)v13[0],
(long long)v13[1],
v14[0],
(void *)v14[1],
(int)v15,
v16);
v15 = v17;
v16 = 0LL;
LOBYTE(v17[0]) = 0;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(
(unsigned int)&v22,
(unsigned int)v20,
(unsigned int)"parse error",
(unsigned int)v18,
(unsigned int)": ",
(unsigned int)&v15,
a4);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
if ( *(long long **)v18 != &v19 )
operator delete(*(void **)v18, v19 + 1);
if ( *(long long **)v20 != &v21 )
operator delete(*(void **)v20, v21 + 1);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v10 = *a3;
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v22);
*(_QWORD *)this = off_E91F0;
*((_QWORD *)this + 4) = v10;
if ( v22 != (char *)&v23 )
operator delete(v22, v23 + 1);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_001332b4:
LEA RSI,[0x1b62d5]
LEA RDX,[0x1b62e0]
LEA RDI,[RSP + 0x8]
CALL 0x00122878
LAB_001332cc:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x8]
MOV EDX,EBP
CALL 0x001312c2
LAB_001332dd:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x0013950a
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
LAB_00133300:
MOV qword ptr [RSP],R15
LEA RDX,[0x1b62e1]
LEA R8,[0x1b7d27]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x68]
LEA RCX,[RSP + 0x48]
LEA R9,[RSP + 0x28]
CALL 0x00139401
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00133345
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001196d0
LAB_00133345:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00133360
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001196d0
LAB_00133360:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013337b
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001196d0
LAB_0013337b:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00133392
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001196d0
LAB_00133392:
MOV R14,qword ptr [R14]
MOV RDX,qword ptr [RSP + 0x88]
LAB_0013339d:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0013152a
LAB_001333a7:
LEA RAX,[0x1e91f0]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x20],R14
LEA RAX,[RSP + 0x98]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001333d6
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x001196d0
LAB_001333d6:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(exception *param_1,int param_2,position_t *param_3,string *param_4)
{
int8 uVar1;
long *local_d0 [2];
long local_c0 [2];
int1 *local_b0;
int8 local_a8;
int1 local_a0;
int7 uStack_9f;
long *local_90 [2];
long local_80 [2];
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
/* try { // try from 001332b4 to 001332cb has its CatchHandler @ 00133480 */
local_d0[0] = local_c0;
std::__cxx11::string::_M_construct<char_const*>(local_d0,"parse_error","");
/* try { // try from 001332cc to 001332dc has its CatchHandler @ 00133464 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_70,(string *)local_d0,param_2);
/* try { // try from 001332dd to 001332e9 has its CatchHandler @ 00133444 */
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_
((parse_error *)local_90,param_3);
local_a8 = 0;
local_a0 = 0;
/* try { // try from 00133300 to 0013332d has its CatchHandler @ 0013340d */
local_b0 = &local_a0;
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_50,(string *)local_70,"parse error",(string *)local_90,": ",
(string *)&local_b0,param_4);
if (local_b0 != &local_a0) {
operator_delete(local_b0,CONCAT71(uStack_9f,local_a0) + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 1);
}
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
if (local_d0[0] != local_c0) {
operator_delete(local_d0[0],local_c0[0] + 1);
}
uVar1 = *(int8 *)param_3;
/* try { // try from 0013339d to 001333a6 has its CatchHandler @ 001333eb */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,(char *)local_50[0]);
*(int ***)param_1 = &PTR__exception_001e91f0;
*(int8 *)(param_1 + 0x20) = uVar1;
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return param_1;
}
| |
33,694 | gguf_get_val_u32 | ngxson[P]ggml-easy/ggml/src/gguf.cpp | uint32_t gguf_get_val_u32(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<uint32_t>();
} | O1 | cpp | gguf_get_val_u32:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3d46a
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rcx
cmpq %rsi, %rcx
jle 0x3d46a
imulq $0x58, %rsi, %r14
addq %r14, %rdi
callq 0x16620
cmpq $0x1, %rax
jne 0x3d486
addq 0x8(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x16bb0
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1c9b4(%rip), %rdi # 0x59e25
leaq 0xd1e2(%rip), %rdx # 0x4a65a
leaq 0x1ce32(%rip), %rcx # 0x5a2b1
movl $0x33b, %esi # imm = 0x33B
jmp 0x3d4a0
leaq 0x1c998(%rip), %rdi # 0x59e25
leaq 0xd1c6(%rip), %rdx # 0x4a65a
leaq 0x1cee5(%rip), %rcx # 0x5a380
movl $0x33c, %esi # imm = 0x33C
xorl %eax, %eax
callq 0x17c70
| gguf_get_val_u32:
push r14
push rbx
push rax
test rsi, rsi
js short loc_3D46A
mov rbx, rdi
mov rdi, [rdi+8]
mov rax, [rbx+10h]
sub rax, rdi
sar rax, 3
mov rcx, 2E8BA2E8BA2E8BA3h
imul rcx, rax
cmp rcx, rsi
jle short loc_3D46A
imul r14, rsi, 58h ; 'X'
add rdi, r14; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3D486
add r14, [rbx+8]
mov rdi, r14
xor esi, esi
call __ZNK7gguf_kv7get_valIjEERKT_m; gguf_kv::get_val<uint>(ulong)
mov eax, [rax]
add rsp, 8
pop rbx
pop r14
retn
loc_3D46A:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 33Bh
jmp short loc_3D4A0
loc_3D486:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 33Ch
loc_3D4A0:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_u32(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // rdi
const char *v9; // rcx
int v10; // esi
if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) )
{
v9 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v10 = 827;
goto LABEL_7;
}
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 )
{
v9 = "ctx->kv[key_id].get_ne() == 1";
v10 = 828;
LABEL_7:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
v10,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v9,
a5,
a6);
}
return *(unsigned int *)gguf_kv::get_val<unsigned int>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL);
}
| gguf_get_val_u32:
PUSH R14
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013d46a
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,RDI
SAR RAX,0x3
MOV RCX,0x2e8ba2e8ba2e8ba3
IMUL RCX,RAX
CMP RCX,RSI
JLE 0x0013d46a
IMUL R14,RSI,0x58
ADD RDI,R14
CALL 0x00116620
CMP RAX,0x1
JNZ 0x0013d486
ADD R14,qword ptr [RBX + 0x8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00116bb0
MOV EAX,dword ptr [RAX]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013d46a:
LEA RDI,[0x159e25]
LEA RDX,[0x14a65a]
LEA RCX,[0x15a2b1]
MOV ESI,0x33b
JMP 0x0013d4a0
LAB_0013d486:
LEA RDI,[0x159e25]
LEA RDX,[0x14a65a]
LEA RCX,[0x15a380]
MOV ESI,0x33c
LAB_0013d4a0:
XOR EAX,EAX
CALL 0x00117c70
|
uint gguf_get_val_u32(long param_1,long param_2)
{
uint *puVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
if ((param_2 < 0) ||
(lVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3,
lVar2 - param_2 == 0 || lVar2 < param_2)) {
pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar4 = 0x33b;
}
else {
lVar2 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58));
if (lVar2 == 1) {
puVar1 = gguf_kv::get_val<unsigned_int>
((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0);
return *puVar1;
}
pcVar3 = "ctx->kv[key_id].get_ne() == 1";
uVar4 = 0x33c;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
33,695 | gguf_get_val_u32 | ngxson[P]ggml-easy/ggml/src/gguf.cpp | uint32_t gguf_get_val_u32(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<uint32_t>();
} | O2 | cpp | gguf_get_val_u32:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3f166
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rax
subq %rdi, %rax
pushq $0x58
popq %rcx
cqto
idivq %rcx
cmpq %rsi, %rax
jle 0x3f166
imulq $0x58, %rsi, %r14
addq %r14, %rdi
callq 0x1c880
cmpq $0x1, %rax
jne 0x3f182
addq 0x8(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1d000
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b7a8(%rip), %rdi # 0x5a915
leaq 0xc45a(%rip), %rdx # 0x4b5ce
leaq 0x1bc26(%rip), %rcx # 0x5ada1
movl $0x33b, %esi # imm = 0x33B
jmp 0x3f19c
leaq 0x1b78c(%rip), %rdi # 0x5a915
leaq 0xc43e(%rip), %rdx # 0x4b5ce
leaq 0x1bcd9(%rip), %rcx # 0x5ae70
movl $0x33c, %esi # imm = 0x33C
xorl %eax, %eax
callq 0x1e770
| gguf_get_val_u32:
push r14
push rbx
push rax
test rsi, rsi
js short loc_3F166
mov rbx, rdi
mov rdi, [rdi+8]
mov rax, [rbx+10h]
sub rax, rdi
push 58h ; 'X'
pop rcx
cqo
idiv rcx
cmp rax, rsi
jle short loc_3F166
imul r14, rsi, 58h ; 'X'
add rdi, r14; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3F182
add r14, [rbx+8]
mov rdi, r14
xor esi, esi
call __ZNK7gguf_kv7get_valIjEERKT_m; gguf_kv::get_val<uint>(ulong)
mov eax, [rax]
add rsp, 8
pop rbx
pop r14
retn
loc_3F166:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 33Bh
jmp short loc_3F19C
loc_3F182:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 33Ch
loc_3F19C:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_u32(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
long long v16; // rdi
const char *v18; // rcx
int v19; // esi
char v20; // [rsp-8h] [rbp-18h]
v20 = v14;
if ( a2 < 0 || (v16 = *(_QWORD *)(a1 + 8), (*(_QWORD *)(a1 + 16) - v16) / 88 <= a2) )
{
v18 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v19 = 827;
goto LABEL_7;
}
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v16)) != 1 )
{
v18 = "ctx->kv[key_id].get_ne() == 1";
v19 = 828;
LABEL_7:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
v19,
(long long)"GGML_ASSERT(%s) failed",
(long long)v18,
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v20);
}
return *(unsigned int *)gguf_kv::get_val<unsigned int>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL);
}
| gguf_get_val_u32:
PUSH R14
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013f166
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,RDI
PUSH 0x58
POP RCX
CQO
IDIV RCX
CMP RAX,RSI
JLE 0x0013f166
IMUL R14,RSI,0x58
ADD RDI,R14
CALL 0x0011c880
CMP RAX,0x1
JNZ 0x0013f182
ADD R14,qword ptr [RBX + 0x8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0011d000
MOV EAX,dword ptr [RAX]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013f166:
LEA RDI,[0x15a915]
LEA RDX,[0x14b5ce]
LEA RCX,[0x15ada1]
MOV ESI,0x33b
JMP 0x0013f19c
LAB_0013f182:
LEA RDI,[0x15a915]
LEA RDX,[0x14b5ce]
LEA RCX,[0x15ae70]
MOV ESI,0x33c
LAB_0013f19c:
XOR EAX,EAX
CALL 0x0011e770
|
uint gguf_get_val_u32(long param_1,long param_2)
{
long lVar1;
uint *puVar2;
char *pcVar3;
int8 uVar4;
if (-1 < param_2) {
if (param_2 < (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8)) / 0x58) {
lVar1 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58));
if (lVar1 == 1) {
puVar2 = gguf_kv::get_val<unsigned_int>
((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0);
return *puVar2;
}
pcVar3 = "ctx->kv[key_id].get_ne() == 1";
uVar4 = 0x33c;
goto LAB_0013f19c;
}
}
pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar4 = 0x33b;
LAB_0013f19c:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
33,696 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O1 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xe53b(%rip), %rax # 0x2fa9c
movl (%rax), %ebp
callq 0x71f0
movq %rax, %r15
leaq 0x1e51e(%rip), %rdi # 0x3fa90
callq 0x7810
testl %eax, %eax
jne 0x21715
movq 0x1e4d2(%rip), %r12 # 0x3fa58
testq %r12, %r12
je 0x215e8
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0x7100
testl %eax, %eax
je 0x215c5
testb $0x1, %r13b
jne 0x215d8
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x21490
testb %al, %al
je 0x215d8
movl 0x20(%r12), %ebp
movb $0x1, %r13b
jmp 0x215d8
testb $0x1, %r13b
jne 0x215d3
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x2158e
movl %ebp, 0x4(%rsp)
jmp 0x215ef
movl %ebp, 0x4(%rsp)
xorl %r13d, %r13d
testb $0x1, %r13b
jne 0x2169b
movl $0x30, %edi
callq 0x7520
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0x71f0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x7870
movl %ebx, 0x20(%r12)
movq 0x1e415(%rip), %rax # 0x3fa58
movq %rax, 0x28(%r12)
movq %r12, 0x1e409(%rip) # 0x3fa58
movq 0x1e40a(%rip), %r13 # 0x3fa60
testq %r13, %r13
je 0x2169b
addq $0x20, %r12
leaq 0x1e3fa(%rip), %rbp # 0x3fa60
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21490
testb %al, %al
je 0x2168b
movq %r12, (%r13)
movq 0x18(%r13), %rax
movq %rax, (%rbp)
jmp 0x21692
addq $0x18, %r13
movq %r13, %rbp
movq (%rbp), %r13
testq %r13, %r13
jne 0x21666
leaq 0x1e3ee(%rip), %rdi # 0x3fa90
callq 0x73e0
movq 0x1e3ba(%rip), %rax # 0x3fa68
testq %rax, %rax
je 0x216bb
cmpl $0x0, (%rax)
setg %al
jmp 0x216da
leaq 0x1e3a6(%rip), %rdi # 0x3fa68
leaq 0xe3d3(%rip), %rsi # 0x2fa9c
leaq 0x2841(%rip), %rdx # 0x23f11
movl $0x1, %ecx
callq 0x21733
movl 0x4(%rsp), %ebp
testb %al, %al
je 0x21704
leaq 0x2828(%rip), %rsi # 0x23f11
leaq 0x286b(%rip), %rcx # 0x23f5b
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1f228
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
leaq 0x1e36a(%rip), %rdi # 0x3fa90
callq 0x73e0
movq %rbx, %rdi
callq 0x7970
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_21715
mov r12, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
test r12, r12
jz short loc_215E8
xor r13d, r13d
loc_2158E:
mov rdi, r12
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_215C5
test r13b, 1
jnz short loc_215D8
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_215D8
mov ebp, [r12+20h]
mov r13b, 1
jmp short loc_215D8
loc_215C5:
test r13b, 1
jnz short loc_215D3
mov ebp, [r12+20h]
mov r13b, 1
loc_215D3:
mov [r12+20h], ebx
loc_215D8:
mov r12, [r12+28h]
test r12, r12
jnz short loc_2158E
mov [rsp+38h+var_34], ebp
jmp short loc_215EF
loc_215E8:
mov [rsp+38h+var_34], ebp
xor r13d, r13d
loc_215EF:
test r13b, 1
jnz loc_2169B
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
mov qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r14
call _strlen
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
mov r13, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
test r13, r13
jz short loc_2169B
add r12, 20h ; ' '
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_21666:
mov rdx, [r13+8]; unsigned __int64
mov rcx, [r13+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_2168B
mov [r13+0], r12
mov rax, [r13+18h]
mov [rbp+0], rax
jmp short loc_21692
loc_2168B:
add r13, 18h
mov rbp, r13
loc_21692:
mov r13, [rbp+0]
test r13, r13
jnz short loc_21666
loc_2169B:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz short loc_216BB
cmp dword ptr [rax], 0
setnle al
jmp short loc_216DA
loc_216BB:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
loc_216DA:
mov ebp, [rsp+38h+var_34]
test al, al
jz short loc_21704
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_21704:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21715:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::SetVLOGLevel(
nglog *this,
const char *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned int v11; // ebp
const char *v12; // r15
int v13; // eax
long long v14; // r12
char v15; // r13
unsigned long long v16; // r8
long long v17; // r12
long long v18; // rax
unsigned long long v19; // r8
long long v20; // r13
long long v21; // r12
long long *v22; // rbp
__m128 v23; // xmm4
__m128 v24; // xmm5
char v25; // al
unsigned int v26; // ebp
char v28; // [rsp-4h] [rbp-38h]
unsigned int v29; // [rsp+0h] [rbp-34h]
v28 = v10;
v11 = fLI::FLAGS_v;
v12 = (const char *)strlen(this);
v13 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v13 )
std::__throw_system_error(v13);
v14 = nglog::vmodule_list;
if ( nglog::vmodule_list )
{
v15 = 0;
do
{
if ( !(unsigned int)std::string::compare(v14, this) )
{
if ( (v15 & 1) == 0 )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
*(_DWORD *)(v14 + 32) = (_DWORD)a2;
}
else if ( (v15 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v14, *(const char **)(v14 + 8), (long long)this, v12, v16) )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
v14 = *(_QWORD *)(v14 + 40);
}
while ( v14 );
v29 = v11;
}
else
{
v29 = v11;
v15 = 0;
}
if ( (v15 & 1) == 0 )
{
v17 = operator new(0x30uLL);
*(_QWORD *)v17 = v17 + 16;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
v18 = strlen(this);
std::string::_M_replace(v17, 0LL, 0LL, this, v18);
*(_DWORD *)(v17 + 32) = (_DWORD)a2;
*(_QWORD *)(v17 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v17;
v20 = nglog::cached_site_list;
if ( nglog::cached_site_list )
{
v21 = v17 + 32;
v22 = &nglog::cached_site_list;
do
{
if ( nglog::tools::SafeFNMatch_(this, v12, *(_QWORD *)(v20 + 8), *(const char **)(v20 + 16), v19) )
{
*(_QWORD *)v20 = v21;
*v22 = *(_QWORD *)(v20 + 24);
}
else
{
v22 = (long long *)(v20 + 24);
}
v20 = *v22;
}
while ( *v22 );
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( nglog::SetVLOGLevel(char const*,int)::vlocal__ )
v25 = *(_DWORD *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0;
else
v25 = nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL);
v26 = v29;
if ( v25 )
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(long long)"Set VLOG level for \"%s\" to %d",
(long long)this,
(unsigned int)a2,
a3,
a4,
a5,
a6,
v23,
v24,
a9,
a10,
v28);
return v26;
}
| SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x12fa9c]
MOV EBP,dword ptr [RAX]
CALL 0x001071f0
MOV R15,RAX
LEA RDI,[0x13fa90]
CALL 0x00107810
TEST EAX,EAX
JNZ 0x00121715
MOV R12,qword ptr [0x0013fa58]
TEST R12,R12
JZ 0x001215e8
XOR R13D,R13D
LAB_0012158e:
MOV RDI,R12
MOV RSI,R14
CALL 0x00107100
TEST EAX,EAX
JZ 0x001215c5
TEST R13B,0x1
JNZ 0x001215d8
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x00121490
TEST AL,AL
JZ 0x001215d8
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
JMP 0x001215d8
LAB_001215c5:
TEST R13B,0x1
JNZ 0x001215d3
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_001215d3:
MOV dword ptr [R12 + 0x20],EBX
LAB_001215d8:
MOV R12,qword ptr [R12 + 0x28]
TEST R12,R12
JNZ 0x0012158e
MOV dword ptr [RSP + 0x4],EBP
JMP 0x001215ef
LAB_001215e8:
MOV dword ptr [RSP + 0x4],EBP
XOR R13D,R13D
LAB_001215ef:
TEST R13B,0x1
JNZ 0x0012169b
LAB_001215f9:
MOV EDI,0x30
CALL 0x00107520
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R14
CALL 0x001071f0
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x00107870
LAB_00121637:
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x0013fa58]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x0013fa58],R12
MOV R13,qword ptr [0x0013fa60]
TEST R13,R13
JZ 0x0012169b
ADD R12,0x20
LEA RBP,[0x13fa60]
LAB_00121666:
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00121490
TEST AL,AL
JZ 0x0012168b
MOV qword ptr [R13],R12
MOV RAX,qword ptr [R13 + 0x18]
MOV qword ptr [RBP],RAX
JMP 0x00121692
LAB_0012168b:
ADD R13,0x18
MOV RBP,R13
LAB_00121692:
MOV R13,qword ptr [RBP]
TEST R13,R13
JNZ 0x00121666
LAB_0012169b:
LEA RDI,[0x13fa90]
CALL 0x001073e0
MOV RAX,qword ptr [0x0013fa68]
TEST RAX,RAX
JZ 0x001216bb
CMP dword ptr [RAX],0x0
SETG AL
JMP 0x001216da
LAB_001216bb:
LEA RDI,[0x13fa68]
LEA RSI,[0x12fa9c]
LEA RDX,[0x123f11]
MOV ECX,0x1
CALL 0x00121733
LAB_001216da:
MOV EBP,dword ptr [RSP + 0x4]
TEST AL,AL
JZ 0x00121704
LEA RSI,[0x123f11]
LEA RCX,[0x123f5b]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x0011f228
LAB_00121704:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121715:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
char cVar2;
int iVar3;
size_t sVar4;
long *plVar5;
long *plVar6;
int8 *puVar7;
int4 local_34;
local_34 = fLI::FLAGS_v;
sVar4 = strlen(param_1);
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (vmodule_list == (long *)0x0) {
bVar1 = false;
}
else {
bVar1 = false;
plVar5 = vmodule_list;
do {
iVar3 = std::__cxx11::string::compare((char *)plVar5);
if (iVar3 == 0) {
if (!bVar1) {
local_34 = (int4)plVar5[4];
bVar1 = true;
}
*(int *)(plVar5 + 4) = param_2;
}
else if ((!bVar1) &&
(cVar2 = tools::SafeFNMatch_((char *)*plVar5,plVar5[1],param_1,sVar4), cVar2 != '\0'))
{
local_34 = (int4)plVar5[4];
bVar1 = true;
}
plVar5 = (long *)plVar5[5];
} while (plVar5 != (long *)0x0);
}
if (!bVar1) {
/* try { // try from 001215f9 to 00121636 has its CatchHandler @ 0012171c */
plVar5 = (long *)operator_new(0x30);
*plVar5 = (long)(plVar5 + 2);
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
strlen(param_1);
std::__cxx11::string::_M_replace((ulong)plVar5,0,(char *)0x0,(ulong)param_1);
*(int *)(plVar5 + 4) = param_2;
plVar5[5] = (long)vmodule_list;
vmodule_list = plVar5;
if (cached_site_list != (int8 *)0x0) {
plVar6 = (long *)&cached_site_list;
puVar7 = cached_site_list;
do {
cVar2 = tools::SafeFNMatch_(param_1,sVar4,(char *)puVar7[1],puVar7[2]);
if (cVar2 == '\0') {
plVar6 = puVar7 + 3;
}
else {
*puVar7 = plVar5 + 4;
*plVar6 = puVar7[3];
}
puVar7 = (int8 *)*plVar6;
} while (puVar7 != (int8 *)0x0);
}
}
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar2 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
}
else {
cVar2 = 0 < *SetVLOGLevel(char_const*,int)::vlocal__;
}
if (cVar2 != '\0') {
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
}
return local_34;
}
| |
33,697 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O2 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x10f43(%rip), %rax # 0x2dafc
movl (%rax), %ebp
callq 0x7230
movq %rax, %r15
leaq 0x20f26(%rip), %rdi # 0x3daf0
callq 0x1aa48
leaq 0x20ee2(%rip), %r12 # 0x3dab8
xorl %r13d, %r13d
movq (%r12), %r12
testq %r12, %r12
je 0x1cc32
movq %r12, %rdi
movq %r14, %rsi
callq 0xdc4b
testb %al, %al
je 0x1cc06
testb $0x1, %r13b
jne 0x1cbff
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
jmp 0x1cc2c
testb $0x1, %r13b
jne 0x1cc2c
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x1cb08
testb %al, %al
je 0x1cc2c
movl 0x20(%r12), %ebp
movb $0x1, %r13b
addq $0x28, %r12
jmp 0x1cbd9
movl %ebp, 0x4(%rsp)
testb $0x1, %r13b
je 0x1cc94
leaq 0x20ead(%rip), %rdi # 0x3daf0
callq 0x7450
movq 0x20e79(%rip), %rax # 0x3dac8
testq %rax, %rax
je 0x1cd22
cmpl $0x0, (%rax)
movl 0x4(%rsp), %ebp
jle 0x1cc83
leaq 0x22ad(%rip), %rsi # 0x1ef15
leaq 0x22f0(%rip), %rcx # 0x1ef5f
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1ad78
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0x75a0
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
andq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r12, %rdi
movq %r14, %rsi
callq 0x7a90
movq %r12, %r13
addq $0x20, %r13
movl %ebx, 0x20(%r12)
movq 0x20de7(%rip), %rax # 0x3dab8
movq %rax, 0x28(%r12)
movq %r12, 0x20ddb(%rip) # 0x3dab8
leaq 0x20ddc(%rip), %rbp # 0x3dac0
movq (%rbp), %r12
testq %r12, %r12
je 0x1cc3c
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1cb08
testb %al, %al
je 0x1cd19
movq %r13, (%r12)
movq 0x18(%r12), %rax
movq %rax, (%rbp)
jmp 0x1cce4
addq $0x18, %r12
movq %r12, %rbp
jmp 0x1cce4
leaq 0x20d9f(%rip), %rdi # 0x3dac8
leaq 0x10dcc(%rip), %rsi # 0x2dafc
leaq 0x21de(%rip), %rdx # 0x1ef15
pushq $0x1
popq %rcx
callq 0x1cd67
testb %al, %al
movl 0x4(%rsp), %ebp
jne 0x1cc61
jmp 0x1cc83
movq %rax, %rbx
leaq 0x20d96(%rip), %rdi # 0x3daf0
callq 0x7450
movq %rbx, %rdi
callq 0x7a00
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea r12, _ZN5nglogL12vmodule_listE; nglog::vmodule_list
xor r13d, r13d
loc_1CBD9:
mov r12, [r12]
test r12, r12
jz short loc_1CC32
mov rdi, r12
mov rsi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_1CC06
test r13b, 1
jnz short loc_1CBFF
mov ebp, [r12+20h]
mov r13b, 1
loc_1CBFF:
mov [r12+20h], ebx
jmp short loc_1CC2C
loc_1CC06:
test r13b, 1
jnz short loc_1CC2C
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_1CC2C
mov ebp, [r12+20h]
mov r13b, 1
loc_1CC2C:
add r12, 28h ; '('
jmp short loc_1CBD9
loc_1CC32:
mov [rsp+38h+var_34], ebp
test r13b, 1
jz short loc_1CC94
loc_1CC3C:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz loc_1CD22
cmp dword ptr [rax], 0
mov ebp, [rsp+38h+var_34]
jle short loc_1CC83
loc_1CC61:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_1CC83:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1CC94:
push 30h ; '0'
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
and qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r12
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov r13, r12
add r13, 20h ; ' '
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_1CCE4:
mov r12, [rbp+0]
test r12, r12
jz loc_1CC3C
mov rdx, [r12+8]; unsigned __int64
mov rcx, [r12+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_1CD19
mov [r12], r13
mov rax, [r12+18h]
mov [rbp+0], rax
jmp short loc_1CCE4
loc_1CD19:
add r12, 18h
mov rbp, r12
jmp short loc_1CCE4
loc_1CD22:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
push 1
pop rcx
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
test al, al
mov ebp, [rsp+38h+var_34]
jnz loc_1CC61
jmp loc_1CC83
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::SetVLOGLevel(nglog *this, const char *a2)
{
unsigned int v2; // ebp
const char *v3; // r15
long long *v4; // r12
char v5; // r13
long long v6; // r12
unsigned long long v7; // r8
unsigned int v8; // ebp
long long v10; // r12
unsigned long long v11; // r8
long long v12; // r13
long long *v13; // rbp
long long v14; // r12
unsigned int v15; // [rsp+0h] [rbp-34h]
v2 = fLI::FLAGS_v;
v3 = (const char *)strlen(this);
std::mutex::lock((std::mutex *)&nglog::vmodule_mutex);
v4 = &nglog::vmodule_list;
v5 = 0;
while ( 1 )
{
v6 = *v4;
if ( !v6 )
break;
if ( std::operator==<char>(v6) )
{
if ( (v5 & 1) == 0 )
{
v2 = *(_DWORD *)(v6 + 32);
v5 = 1;
}
*(_DWORD *)(v6 + 32) = (_DWORD)a2;
}
else if ( (v5 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v6, *(const char **)(v6 + 8), (long long)this, v3, v7) )
{
v2 = *(_DWORD *)(v6 + 32);
v5 = 1;
}
v4 = (long long *)(v6 + 40);
}
v15 = v2;
if ( (v5 & 1) == 0 )
{
v10 = operator new(0x30uLL);
*(_QWORD *)v10 = v10 + 16;
*(_QWORD *)(v10 + 8) = 0LL;
*(_BYTE *)(v10 + 16) = 0;
std::string::assign(v10, this);
v12 = v10 + 32;
*(_DWORD *)(v10 + 32) = (_DWORD)a2;
*(_QWORD *)(v10 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v10;
v13 = &nglog::cached_site_list;
while ( 1 )
{
v14 = *v13;
if ( !*v13 )
break;
if ( nglog::tools::SafeFNMatch_(this, v3, *(_QWORD *)(v14 + 8), *(const char **)(v14 + 16), v11) )
{
*(_QWORD *)v14 = v12;
*v13 = *(_QWORD *)(v14 + 24);
}
else
{
v13 = (long long *)(v14 + 24);
}
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( !nglog::SetVLOGLevel(char const*,int)::vlocal__ )
{
v8 = v15;
if ( !(unsigned __int8)nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL) )
return v8;
goto LABEL_14;
}
v8 = v15;
if ( *(int *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0 )
LABEL_14:
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
"Set VLOG level for \"%s\" to %d",
(const char *)this,
(_DWORD)a2);
return v8;
}
| SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x12dafc]
MOV EBP,dword ptr [RAX]
CALL 0x00107230
MOV R15,RAX
LEA RDI,[0x13daf0]
CALL 0x0011aa48
LEA R12,[0x13dab8]
XOR R13D,R13D
LAB_0011cbd9:
MOV R12,qword ptr [R12]
TEST R12,R12
JZ 0x0011cc32
MOV RDI,R12
MOV RSI,R14
CALL 0x0010dc4b
TEST AL,AL
JZ 0x0011cc06
TEST R13B,0x1
JNZ 0x0011cbff
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_0011cbff:
MOV dword ptr [R12 + 0x20],EBX
JMP 0x0011cc2c
LAB_0011cc06:
TEST R13B,0x1
JNZ 0x0011cc2c
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x0011cb08
TEST AL,AL
JZ 0x0011cc2c
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_0011cc2c:
ADD R12,0x28
JMP 0x0011cbd9
LAB_0011cc32:
MOV dword ptr [RSP + 0x4],EBP
TEST R13B,0x1
JZ 0x0011cc94
LAB_0011cc3c:
LEA RDI,[0x13daf0]
CALL 0x00107450
MOV RAX,qword ptr [0x0013dac8]
TEST RAX,RAX
JZ 0x0011cd22
CMP dword ptr [RAX],0x0
MOV EBP,dword ptr [RSP + 0x4]
JLE 0x0011cc83
LAB_0011cc61:
LEA RSI,[0x11ef15]
LEA RCX,[0x11ef5f]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x0011ad78
LAB_0011cc83:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011cc94:
PUSH 0x30
POP RDI
CALL 0x001075a0
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
AND qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R12
MOV RSI,R14
CALL 0x00107a90
LAB_0011ccbe:
MOV R13,R12
ADD R13,0x20
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x0013dab8]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x0013dab8],R12
LEA RBP,[0x13dac0]
LAB_0011cce4:
MOV R12,qword ptr [RBP]
TEST R12,R12
JZ 0x0011cc3c
MOV RDX,qword ptr [R12 + 0x8]
MOV RCX,qword ptr [R12 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x0011cb08
TEST AL,AL
JZ 0x0011cd19
MOV qword ptr [R12],R13
MOV RAX,qword ptr [R12 + 0x18]
MOV qword ptr [RBP],RAX
JMP 0x0011cce4
LAB_0011cd19:
ADD R12,0x18
MOV RBP,R12
JMP 0x0011cce4
LAB_0011cd22:
LEA RDI,[0x13dac8]
LEA RSI,[0x12dafc]
LEA RDX,[0x11ef15]
PUSH 0x1
POP RCX
CALL 0x0011cd67
TEST AL,AL
MOV EBP,dword ptr [RSP + 0x4]
JNZ 0x0011cc61
JMP 0x0011cc83
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
int8 *puVar1;
bool bVar2;
bool bVar3;
char cVar4;
size_t sVar5;
char *pcVar6;
int4 uVar7;
long *plVar8;
string *psVar9;
uVar7 = fLI::FLAGS_v;
sVar5 = strlen(param_1);
std::mutex::lock((mutex *)vmodule_mutex);
bVar2 = false;
for (psVar9 = (string *)&vmodule_list; psVar9 = *(string **)psVar9, psVar9 != (string *)0x0;
psVar9 = psVar9 + 0x28) {
bVar3 = std::operator==(psVar9,param_1);
if (bVar3) {
if (!bVar2) {
uVar7 = *(int4 *)(psVar9 + 0x20);
bVar2 = true;
}
*(int *)(psVar9 + 0x20) = param_2;
}
else if ((!bVar2) &&
(cVar4 = tools::SafeFNMatch_(*(char **)psVar9,*(ulong *)(psVar9 + 8),param_1,sVar5),
cVar4 != '\0')) {
uVar7 = *(int4 *)(psVar9 + 0x20);
bVar2 = true;
}
}
if (!bVar2) {
/* try { // try from 0011cc94 to 0011ccbd has its CatchHandler @ 0011cd50 */
pcVar6 = (char *)operator_new(0x30);
*(char **)pcVar6 = pcVar6 + 0x10;
pcVar6[8] = '\0';
pcVar6[9] = '\0';
pcVar6[10] = '\0';
pcVar6[0xb] = '\0';
pcVar6[0xc] = '\0';
pcVar6[0xd] = '\0';
pcVar6[0xe] = '\0';
pcVar6[0xf] = '\0';
pcVar6[0x10] = '\0';
std::__cxx11::string::assign(pcVar6);
*(int *)(pcVar6 + 0x20) = param_2;
*(char **)(pcVar6 + 0x28) = vmodule_list;
plVar8 = &cached_site_list;
vmodule_list = pcVar6;
while (puVar1 = (int8 *)*plVar8, puVar1 != (int8 *)0x0) {
cVar4 = tools::SafeFNMatch_(param_1,sVar5,(char *)puVar1[1],puVar1[2]);
if (cVar4 == '\0') {
plVar8 = puVar1 + 3;
}
else {
*puVar1 = pcVar6 + 0x20;
*plVar8 = puVar1[3];
}
}
}
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar4 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
if (cVar4 == '\0') {
return uVar7;
}
}
else if (*SetVLOGLevel(char_const*,int)::vlocal__ < 1) {
return uVar7;
}
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
return uVar7;
}
| |
33,698 | js_string_fromCodePoint | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_fromCodePoint(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
int i, c;
StringBuffer b_s, *b = NULL;
// shortcut for single argument common case
if (argc == 1 && JS_VALUE_GET_TAG(argv[0]) == JS_TAG_INT) {
c = JS_VALUE_GET_INT(argv[0]);
if (c < 0 || c > 0x10ffff)
goto range_error;
if (c <= 0xffff) {
return js_new_string_char(ctx, c);
} else {
uint16_t c16[2];
c16[0] = get_hi_surrogate(c);
c16[1] = get_lo_surrogate(c);
return js_new_string16_len(ctx, c16, 2);
}
}
/* XXX: could pre-compute string length if all arguments are JS_TAG_INT */
b = &b_s;
if (string_buffer_init(ctx, b, argc))
goto fail;
for(i = 0; i < argc; i++) {
if (JS_VALUE_GET_TAG(argv[i]) == JS_TAG_INT) {
c = JS_VALUE_GET_INT(argv[i]);
if (c < 0 || c > 0x10ffff)
goto range_error;
} else {
if (JS_ToFloat64(ctx, &d, argv[i]))
goto fail;
if (!(d >= 0 && d <= 0x10ffff) || (c = (int)d) != d)
goto range_error;
}
if (string_buffer_putc(b, c))
goto fail;
}
return string_buffer_end(b);
range_error:
JS_ThrowRangeError(ctx, "invalid code point");
fail:
if (b) string_buffer_free(b);
return JS_EXCEPTION;
} | O1 | c | js_string_fromCodePoint:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movq %rdi, %rbx
cmpl $0x1, %ecx
jne 0x7a9dd
cmpl $0x0, 0x8(%r15)
je 0x7aab8
movq %rbx, (%rsp)
movl %ebp, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x7ab8b
testl %ebp, %ebp
jle 0x7aa9e
movl %ebp, %r13d
shlq $0x4, %r13
xorl %ebp, %ebp
movq %rsp, %r14
leaq 0x20(%rsp), %r12
movq 0x8(%r15,%rbp), %rcx
testl %ecx, %ecx
je 0x7aa7d
movq (%r15,%rbp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x27681
testl %eax, %eax
jne 0x7aad7
movsd 0x20(%rsp), %xmm0
ucomisd 0x23ea9(%rip), %xmm0 # 0x9e900
jb 0x7aac6
movsd 0x23ef7(%rip), %xmm1 # 0x9e958
ucomisd %xmm0, %xmm1
jb 0x7aac6
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7aac6
jp 0x7aac6
cvttsd2si %xmm0, %esi
jmp 0x7aa89
movl (%r15,%rbp), %esi
cmpl $0x10ffff, %esi # imm = 0x10FFFF
ja 0x7aac6
movq %r14, %rdi
callq 0x333f0
testl %eax, %eax
jne 0x7aad7
addq $0x10, %rbp
cmpq %rbp, %r13
jne 0x7aa29
movq %rsp, %rdi
callq 0x33444
movq %rdx, %rbx
movabsq $-0x100000000, %r14 # imm = 0xFFFFFFFF00000000
andq %rax, %r14
jmp 0x7aafa
movl (%r15), %ebp
cmpl $0x10ffff, %ebp # imm = 0x10FFFF
jbe 0x7ab11
xorl %r14d, %r14d
leaq 0x27582(%rip), %rsi # 0xa204f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20add
movl $0x6, %ebx
testq %r14, %r14
je 0x7aaf5
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x1cb99
movq $0x0, 0x8(%r14)
xorl %eax, %eax
xorl %r14d, %r14d
movl %eax, %eax
orq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $-0x100000000, %r14 # imm = 0xFFFFFFFF00000000
cmpl $0xffff, %ebp # imm = 0xFFFF
jg 0x7ab33
movzwl %bp, %esi
movq %rbx, %rdi
callq 0x3d58e
movq %rdx, %rbx
jmp 0x7aab3
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x20b73
testq %rax, %rax
je 0x7ab76
movl %ebp, %ecx
andl $0x3ff, %ecx # imm = 0x3FF
orl $0xdc00, %ecx # imm = 0xDC00
shrl $0xa, %ebp
addl $0xffffd7c0, %ebp # imm = 0xFFFFD7C0
movw %bp, 0x18(%rax)
movw %cx, 0x1a(%rax)
movq %rax, (%rsp)
movq $-0x7, %rbx
jmp 0x7ab82
movl $0x0, (%rsp)
movl $0x6, %ebx
movq (%rsp), %rax
jmp 0x7aab3
movq %rsp, %r14
movl $0x0, 0x14(%r14)
movl $0xffffffff, 0x1c(%r14) # imm = 0xFFFFFFFF
jmp 0x7aad7
| js_string_fromCodePoint:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, r8
mov ebp, ecx
mov rbx, rdi
cmp ecx, 1
jnz short loc_7A9DD
cmp dword ptr [r15+8], 0
jz loc_7AAB8
loc_7A9DD:
mov [rsp+58h+var_58], rbx
mov [rsp+58h+var_44], ebp
mov [rsp+58h+var_48], 0
mov [rsp+58h+var_40], 0
mov rdi, rbx
mov esi, ebp
xor edx, edx
call js_alloc_string
mov [rsp+58h+var_50], rax
test rax, rax
jz loc_7AB8B
test ebp, ebp
jle loc_7AA9E
mov r13d, ebp
shl r13, 4
xor ebp, ebp
mov r14, rsp
lea r12, [rsp+58h+var_38]
loc_7AA29:
mov rcx, [r15+rbp+8]
test ecx, ecx
jz short loc_7AA7D
mov rdx, [r15+rbp]
mov rdi, rbx
mov rsi, r12
call JS_ToFloat64
test eax, eax
jnz loc_7AAD7
movsd xmm0, [rsp+58h+var_38]
ucomisd xmm0, cs:qword_9E900
jb short loc_7AAC6
movsd xmm1, cs:qword_9E958
ucomisd xmm1, xmm0
jb short loc_7AAC6
cvttpd2dq xmm1, xmm0
cvtdq2pd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_7AAC6
jp short loc_7AAC6
cvttsd2si esi, xmm0
jmp short loc_7AA89
loc_7AA7D:
mov esi, [r15+rbp]
cmp esi, 10FFFFh
ja short loc_7AAC6
loc_7AA89:
mov rdi, r14
call string_buffer_putc
test eax, eax
jnz short loc_7AAD7
add rbp, 10h
cmp r13, rbp
jnz short loc_7AA29
loc_7AA9E:
mov rdi, rsp
call string_buffer_end
mov rbx, rdx
mov r14, 0FFFFFFFF00000000h
loc_7AAB3:
and r14, rax
jmp short loc_7AAFA
loc_7AAB8:
mov ebp, [r15]
cmp ebp, 10FFFFh
jbe short loc_7AB11
xor r14d, r14d
loc_7AAC6:
lea rsi, aInvalidCodePoi; "invalid code point"
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
loc_7AAD7:
mov ebx, 6
test r14, r14
jz short loc_7AAF5
mov rdi, [r14]
mov rsi, [r14+8]
call js_free
mov qword ptr [r14+8], 0
loc_7AAF5:
xor eax, eax
xor r14d, r14d
loc_7AAFA:
mov eax, eax
or rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7AB11:
mov r14, 0FFFFFFFF00000000h
cmp ebp, 0FFFFh
jg short loc_7AB33
movzx esi, bp
mov rdi, rbx
call js_new_string_char
mov rbx, rdx
jmp short loc_7AAB3
loc_7AB33:
mov rdi, rbx
mov esi, 2
mov edx, 1
call js_alloc_string
test rax, rax
jz short loc_7AB76
mov ecx, ebp
and ecx, 3FFh
or ecx, 0DC00h
shr ebp, 0Ah
add ebp, 0FFFFD7C0h
mov [rax+18h], bp
mov [rax+1Ah], cx
mov [rsp+58h+var_58], rax
mov rbx, 0FFFFFFFFFFFFFFF9h
jmp short loc_7AB82
loc_7AB76:
mov dword ptr [rsp+58h+var_58], 0
mov ebx, 6
loc_7AB82:
mov rax, [rsp+58h+var_58]
jmp loc_7AAB3
loc_7AB8B:
mov r14, rsp
mov dword ptr [r14+14h], 0
mov dword ptr [r14+1Ch], 0FFFFFFFFh
jmp loc_7AAD7
| unsigned long long js_string_fromCodePoint(
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,
int *a13,
long long a14)
{
int v15; // ebp
long long v16; // r13
unsigned long long v17; // rbp
long long *v18; // r14
unsigned int v19; // esi
long long v20; // rax
unsigned long long v21; // r14
int v22; // ebp
long long v24; // rax
long long v25; // [rsp+0h] [rbp-58h] BYREF
int v27; // [rsp+10h] [rbp-48h]
int v28; // [rsp+14h] [rbp-44h]
long long v29; // [rsp+18h] [rbp-40h]
unsigned long long v30[7]; // [rsp+20h] [rbp-38h] BYREF
v15 = a12;
if ( (_DWORD)a12 == 1 && !a13[2] )
{
v22 = *a13;
if ( (unsigned int)*a13 <= 0x10FFFF )
{
if ( v22 > 0xFFFF )
{
v24 = js_alloc_string(a1, 2LL, 1u);
if ( v24 )
{
*(_WORD *)(v24 + 24) = ((unsigned int)v22 >> 10) - 10304;
*(_WORD *)(v24 + 26) = v22 & 0x3FF | 0xDC00;
v25 = v24;
}
else
{
LODWORD(v25) = 0;
}
v20 = v25;
}
else
{
v20 = js_new_string_char(a1, (unsigned __int16)v22);
}
LABEL_16:
v21 = v20 & 0xFFFFFFFF00000000LL;
return v21 | (unsigned int)v20;
}
v18 = 0LL;
LABEL_19:
JS_ThrowRangeError(
a1,
(long long)"invalid code point",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v25);
}
else
{
v25 = a1;
v28 = a12;
v27 = 0;
v29 = 0LL;
if ( js_alloc_string(a1, (unsigned int)a12, 0) )
{
if ( v15 > 0 )
{
v16 = 16LL * (unsigned int)v15;
v17 = 0LL;
v18 = &v25;
do
{
a12 = *(_QWORD *)&a13[v17 / 4 + 2];
if ( (_DWORD)a12 )
{
if ( (unsigned int)JS_ToFloat64(a1, (double *)v30, *(_DWORD **)&a13[v17 / 4], a12) )
goto LABEL_20;
a2 = (__m128)v30[0];
if ( *(double *)v30 < 0.0 )
goto LABEL_19;
a3 = (__m128)0x4130FFFF00000000uLL;
if ( *(double *)v30 > 1114111.0 )
goto LABEL_19;
a3 = (__m128)_mm_cvtepi32_pd(_mm_cvttpd_epi32((__m128d)v30[0]));
if ( *(double *)v30 != *(double *)a3.m128_u64 )
goto LABEL_19;
v19 = (int)*(double *)v30;
}
else
{
v19 = a13[v17 / 4];
if ( v19 > 0x10FFFF )
goto LABEL_19;
}
if ( (unsigned int)string_buffer_putc((long long)&v25, v19) )
goto LABEL_20;
v17 += 16LL;
}
while ( v16 != v17 );
}
v20 = (long long)string_buffer_end((long long)&v25);
goto LABEL_16;
}
v18 = &v25;
v28 = 0;
HIDWORD(v29) = -1;
}
LABEL_20:
if ( v18 )
{
js_free(*v18, v18[1]);
v18[1] = 0LL;
}
LODWORD(v20) = 0;
v21 = 0LL;
return v21 | (unsigned int)v20;
}
| |||
33,699 | js_string_fromCodePoint | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_fromCodePoint(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
int i, c;
StringBuffer b_s, *b = NULL;
// shortcut for single argument common case
if (argc == 1 && JS_VALUE_GET_TAG(argv[0]) == JS_TAG_INT) {
c = JS_VALUE_GET_INT(argv[0]);
if (c < 0 || c > 0x10ffff)
goto range_error;
if (c <= 0xffff) {
return js_new_string_char(ctx, c);
} else {
uint16_t c16[2];
c16[0] = get_hi_surrogate(c);
c16[1] = get_lo_surrogate(c);
return js_new_string16_len(ctx, c16, 2);
}
}
/* XXX: could pre-compute string length if all arguments are JS_TAG_INT */
b = &b_s;
if (string_buffer_init(ctx, b, argc))
goto fail;
for(i = 0; i < argc; i++) {
if (JS_VALUE_GET_TAG(argv[i]) == JS_TAG_INT) {
c = JS_VALUE_GET_INT(argv[i]);
if (c < 0 || c > 0x10ffff)
goto range_error;
} else {
if (JS_ToFloat64(ctx, &d, argv[i]))
goto fail;
if (!(d >= 0 && d <= 0x10ffff) || (c = (int)d) != d)
goto range_error;
}
if (string_buffer_putc(b, c))
goto fail;
}
return string_buffer_end(b);
range_error:
JS_ThrowRangeError(ctx, "invalid code point");
fail:
if (b) string_buffer_free(b);
return JS_EXCEPTION;
} | O2 | c | js_string_fromCodePoint:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movl %ecx, %r13d
movq %rdi, %r14
pushq $0x6
popq %rbx
cmpl $0x1, %ecx
jne 0x67117
cmpl $0x0, 0x8(%r12)
je 0x671c7
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x2e042
testl %eax, %eax
jne 0x671f3
xorl %edx, %edx
testl %r13d, %r13d
cmovlel %edx, %r13d
shlq $0x4, %r13
addq $0x10, %r13
leaq 0x8(%rsp), %r15
movq %rsp, %rbp
leaq 0x10(%rdx), %rbx
cmpq %rbx, %r13
je 0x6722c
movq 0x8(%r12,%rdx), %rcx
testl %ecx, %ecx
je 0x671a7
movq (%r12,%rdx), %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x2127f
testl %eax, %eax
jne 0x671c2
movsd (%rsp), %xmm0
ucomisd 0x1e6a7(%rip), %xmm0 # 0x85828
jb 0x671d7
movsd 0x1e71d(%rip), %xmm1 # 0x858a8
ucomisd %xmm0, %xmm1
jb 0x671d7
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x671d7
jp 0x671d7
cvttsd2si %xmm0, %esi
jmp 0x671b3
movl (%r12,%rdx), %esi
cmpl $0x10ffff, %esi # imm = 0x10FFFF
ja 0x671d7
movq %r15, %rdi
callq 0x2ca82
movq %rbx, %rdx
testl %eax, %eax
je 0x6714b
pushq $0x6
popq %rbx
jmp 0x671f3
movl (%r12), %eax
cmpl $0x10ffff, %eax # imm = 0x10FFFF
jbe 0x67218
xorl %r15d, %r15d
jmp 0x671da
pushq $0x6
popq %rbx
leaq 0x21da8(%rip), %rsi # 0x88f89
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1acb3
testq %r15, %r15
je 0x671fe
movq %r15, %rdi
callq 0x2ef01
xorl %r12d, %r12d
xorl %ecx, %ecx
movl %r12d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xffff, %eax # imm = 0xFFFF
ja 0x67238
movzwl %ax, %esi
movq %r14, %rdi
callq 0x35e9c
jmp 0x67264
leaq 0x8(%rsp), %rdi
callq 0x2cad4
jmp 0x67264
movl %eax, %ecx
shrl $0xa, %ecx
addl $0xffffd7c0, %ecx # imm = 0xFFFFD7C0
leaq 0x8(%rsp), %rsi
movw %cx, (%rsi)
andl $0x3ff, %eax # imm = 0x3FF
orl $0xdc00, %eax # imm = 0xDC00
movw %ax, 0x2(%rsi)
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x35ff3
movq %rax, %r12
movq %rdx, %rbx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x67200
| js_string_fromCodePoint:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r8
mov r13d, ecx
mov r14, rdi
push 6
pop rbx
cmp ecx, 1
jnz short loc_67117
cmp dword ptr [r12+8], 0
jz loc_671C7
loc_67117:
lea r15, [rsp+58h+var_50]
mov rdi, r14
mov rsi, r15
mov edx, r13d
call string_buffer_init
test eax, eax
jnz loc_671F3
xor edx, edx
test r13d, r13d
cmovle r13d, edx
shl r13, 4
add r13, 10h
lea r15, [rsp+58h+var_50]
mov rbp, rsp
loc_6714B:
lea rbx, [rdx+10h]
cmp r13, rbx
jz loc_6722C
mov rcx, [r12+rdx+8]
test ecx, ecx
jz short loc_671A7
mov rdx, [r12+rdx]
mov rdi, r14
mov rsi, rbp
call JS_ToFloat64
test eax, eax
jnz short loc_671C2
movsd xmm0, [rsp+58h+var_58]
ucomisd xmm0, cs:qword_85828
jb short loc_671D7
movsd xmm1, cs:qword_858A8
ucomisd xmm1, xmm0
jb short loc_671D7
cvttpd2dq xmm1, xmm0
cvtdq2pd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_671D7
jp short loc_671D7
cvttsd2si esi, xmm0
jmp short loc_671B3
loc_671A7:
mov esi, [r12+rdx]
cmp esi, 10FFFFh
ja short loc_671D7
loc_671B3:
mov rdi, r15
call string_buffer_putc
mov rdx, rbx
test eax, eax
jz short loc_6714B
loc_671C2:
push 6
pop rbx
jmp short loc_671F3
loc_671C7:
mov eax, [r12]
cmp eax, 10FFFFh
jbe short loc_67218
xor r15d, r15d
jmp short loc_671DA
loc_671D7:
push 6
pop rbx
loc_671DA:
lea rsi, aInvalidCodePoi; "invalid code point"
xor r12d, r12d
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
test r15, r15
jz short loc_671FE
loc_671F3:
mov rdi, r15
call string_buffer_free
xor r12d, r12d
loc_671FE:
xor ecx, ecx
loc_67200:
mov eax, r12d
or rax, rcx
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_67218:
cmp eax, 0FFFFh
ja short loc_67238
movzx esi, ax
mov rdi, r14
call js_new_string_char
jmp short loc_67264
loc_6722C:
lea rdi, [rsp+58h+var_50]
call string_buffer_end
jmp short loc_67264
loc_67238:
mov ecx, eax
shr ecx, 0Ah
add ecx, 0FFFFD7C0h
lea rsi, [rsp+58h+var_50]
mov [rsi], cx
and eax, 3FFh
or eax, 0DC00h
mov [rsi+2], ax
push 2
pop rdx
mov rdi, r14
call js_new_string16_len
loc_67264:
mov r12, rax
mov rbx, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp short loc_67200
| unsigned long long js_string_fromCodePoint(
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,
unsigned int *a13,
long long a14)
{
long long v15; // r13
long long *v16; // r15
long long v17; // r13
long long v18; // rbx
unsigned int v19; // esi
int v20; // eax
unsigned int v21; // eax
unsigned int v22; // r12d
unsigned long long v23; // rcx
long long v25; // rax
double v26; // [rsp+0h] [rbp-58h] BYREF
long long v27[10]; // [rsp+8h] [rbp-50h] BYREF
v15 = (unsigned int)a12;
if ( (_DWORD)a12 != 1 || a13[2] )
{
v16 = v27;
if ( !(unsigned int)string_buffer_init(a1, (long long)v27, a12) )
{
a11 = 0LL;
if ( (int)v15 <= 0 )
v15 = 0LL;
v17 = 16 * v15 + 16;
v16 = v27;
while ( 1 )
{
v18 = a11 + 16;
if ( v17 == a11 + 16 )
break;
a12 = *(_QWORD *)((char *)a13 + a11 + 8);
if ( (_DWORD)a12 )
{
if ( (unsigned int)JS_ToFloat64(a1, (long long)&v26, *(_DWORD **)((char *)a13 + a11), a12) )
goto LABEL_20;
a2 = (__m128)*(unsigned long long *)&v26;
if ( v26 < 0.0 )
goto LABEL_19;
a3 = (__m128)0x4130FFFF00000000uLL;
if ( v26 > 1114111.0 )
goto LABEL_19;
a3 = (__m128)_mm_cvtepi32_pd(_mm_cvttpd_epi32((__m128d)*(unsigned long long *)&v26));
if ( v26 != *(double *)a3.m128_u64 )
goto LABEL_19;
v19 = (int)v26;
}
else
{
v19 = *(unsigned int *)((char *)a13 + a11);
if ( v19 > 0x10FFFF )
goto LABEL_19;
}
v20 = string_buffer_putc((long long)v27, v19);
a11 = v18;
if ( v20 )
goto LABEL_20;
}
v25 = string_buffer_end(v27);
goto LABEL_27;
}
LABEL_20:
string_buffer_free(v16);
v22 = 0;
goto LABEL_21;
}
v21 = *a13;
if ( *a13 <= 0x10FFFF )
{
if ( v21 > 0xFFFF )
{
LOWORD(v27[0]) = (v21 >> 10) - 10304;
WORD1(v27[0]) = v21 & 0x3FF | 0xDC00;
v25 = js_new_string16_len(a1, (long long)v27, 2u);
}
else
{
v25 = js_new_string_char(a1, v21);
}
LABEL_27:
v22 = v25;
v23 = v25 & 0xFFFFFFFF00000000LL;
return v23 | v22;
}
v16 = 0LL;
LABEL_19:
v22 = 0;
JS_ThrowRangeError(
a1,
(long long)"invalid code point",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
SLOBYTE(v26));
if ( v16 )
goto LABEL_20;
LABEL_21:
v23 = 0LL;
return v23 | v22;
}
| js_string_fromCodePoint:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R8
MOV R13D,ECX
MOV R14,RDI
PUSH 0x6
POP RBX
CMP ECX,0x1
JNZ 0x00167117
CMP dword ptr [R12 + 0x8],0x0
JZ 0x001671c7
LAB_00167117:
LEA R15,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R15
MOV EDX,R13D
CALL 0x0012e042
TEST EAX,EAX
JNZ 0x001671f3
XOR EDX,EDX
TEST R13D,R13D
CMOVLE R13D,EDX
SHL R13,0x4
ADD R13,0x10
LEA R15,[RSP + 0x8]
MOV RBP,RSP
LAB_0016714b:
LEA RBX,[RDX + 0x10]
CMP R13,RBX
JZ 0x0016722c
MOV RCX,qword ptr [R12 + RDX*0x1 + 0x8]
TEST ECX,ECX
JZ 0x001671a7
MOV RDX,qword ptr [R12 + RDX*0x1]
MOV RDI,R14
MOV RSI,RBP
CALL 0x0012127f
TEST EAX,EAX
JNZ 0x001671c2
MOVSD XMM0,qword ptr [RSP]
UCOMISD XMM0,qword ptr [0x00185828]
JC 0x001671d7
MOVSD XMM1,qword ptr [0x001858a8]
UCOMISD XMM1,XMM0
JC 0x001671d7
CVTTPD2DQ XMM1,XMM0
CVTDQ2PD XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001671d7
JP 0x001671d7
CVTTSD2SI ESI,XMM0
JMP 0x001671b3
LAB_001671a7:
MOV ESI,dword ptr [R12 + RDX*0x1]
CMP ESI,0x10ffff
JA 0x001671d7
LAB_001671b3:
MOV RDI,R15
CALL 0x0012ca82
MOV RDX,RBX
TEST EAX,EAX
JZ 0x0016714b
LAB_001671c2:
PUSH 0x6
POP RBX
JMP 0x001671f3
LAB_001671c7:
MOV EAX,dword ptr [R12]
CMP EAX,0x10ffff
JBE 0x00167218
XOR R15D,R15D
JMP 0x001671da
LAB_001671d7:
PUSH 0x6
POP RBX
LAB_001671da:
LEA RSI,[0x188f89]
XOR R12D,R12D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011acb3
TEST R15,R15
JZ 0x001671fe
LAB_001671f3:
MOV RDI,R15
CALL 0x0012ef01
XOR R12D,R12D
LAB_001671fe:
XOR ECX,ECX
LAB_00167200:
MOV EAX,R12D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00167218:
CMP EAX,0xffff
JA 0x00167238
MOVZX ESI,AX
MOV RDI,R14
CALL 0x00135e9c
JMP 0x00167264
LAB_0016722c:
LEA RDI,[RSP + 0x8]
CALL 0x0012cad4
JMP 0x00167264
LAB_00167238:
MOV ECX,EAX
SHR ECX,0xa
ADD ECX,0xffffd7c0
LEA RSI,[RSP + 0x8]
MOV word ptr [RSI],CX
AND EAX,0x3ff
OR EAX,0xdc00
MOV word ptr [RSI + 0x2],AX
PUSH 0x2
POP RDX
MOV RDI,R14
CALL 0x00135ff3
LAB_00167264:
MOV R12,RAX
MOV RBX,RDX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00167200
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_string_fromCodePoint
(int8 param_1,int8 param_2,int8 param_3,uint param_4,uint *param_5)
{
uint uVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
int4 uVar6;
ulong uVar5;
short *psVar7;
int1 auVar8 [16];
int1 auVar9 [16];
double local_58;
short local_50;
ushort local_4e;
if ((param_4 == 1) && (param_5[2] == 0)) {
uVar1 = *param_5;
if (uVar1 < 0x110000) {
if (uVar1 < 0x10000) {
auVar9 = js_new_string_char(param_1,uVar1 & 0xffff);
}
else {
local_50 = (short)(uVar1 >> 10) + -0x2840;
local_4e = (ushort)uVar1 & 0x3ff | 0xdc00;
auVar9 = js_new_string16_len(param_1,&local_50,2);
}
LAB_00167264:
uVar3 = auVar9._0_8_ & 0xffffffff00000000;
goto LAB_00167200;
}
psVar7 = (short *)0x0;
LAB_001671da:
JS_ThrowRangeError(param_1,"invalid code point");
if (psVar7 != (short *)0x0) goto LAB_001671f3;
}
else {
psVar7 = &local_50;
iVar2 = string_buffer_init(param_1,psVar7,param_4);
if (iVar2 == 0) {
uVar3 = (ulong)param_4;
if ((int)param_4 < 1) {
uVar3 = 0;
}
psVar7 = &local_50;
uVar4 = 0;
do {
if (uVar3 * 0x10 + 0x10 == uVar4 + 0x10) {
auVar9 = string_buffer_end(&local_50);
goto LAB_00167264;
}
if ((int)*(int8 *)((long)param_5 + uVar4 + 8) == 0) {
uVar5 = (ulong)*(uint *)((long)param_5 + uVar4);
if (0x10ffff < *(uint *)((long)param_5 + uVar4)) goto LAB_001671da;
}
else {
uVar6 = (int)((ulong)&local_58 >> 0x20);
iVar2 = JS_ToFloat64(param_1,&local_58,*(int8 *)((long)param_5 + uVar4));
if (iVar2 != 0) break;
if ((((local_58 < _DAT_00185828) || (DAT_001858a8 < local_58)) ||
(local_58 != (double)(int)local_58)) || (NAN(local_58) || NAN((double)(int)local_58)))
goto LAB_001671da;
uVar5 = CONCAT44(uVar6,(int)local_58);
}
iVar2 = string_buffer_putc(psVar7,uVar5);
uVar4 = uVar4 + 0x10;
} while (iVar2 == 0);
}
LAB_001671f3:
string_buffer_free(psVar7);
}
auVar9 = ZEXT816(6) << 0x40;
uVar3 = 0;
LAB_00167200:
auVar8._0_8_ = auVar9._0_8_ & 0xffffffff | uVar3;
auVar8._8_8_ = auVar9._8_8_;
return auVar8;
}
|
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.