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
|
---|---|---|---|---|---|---|---|---|---|---|---|
63,700 |
is_empty_native
|
fabiosvm[P]rak/src/builtin.c
|
static void is_empty_native(RakVM *vm, RakValue *slots, RakError *err)
{
RakValue val = slots[1];
if (rak_is_string(val))
{
RakString *str = rak_as_string(val);
rak_vm_push_bool(vm, rak_string_is_empty(str), err);
return;
}
if (rak_is_array(val))
{
RakArray *arr = rak_as_array(val);
rak_vm_push_bool(vm, rak_array_is_empty(arr), err);
return;
}
if (rak_is_record(val))
{
RakRecord *rec = rak_as_record(val);
rak_vm_push_bool(vm, rak_record_is_empty(rec), err);
return;
}
rak_error_set(err, "%s does not have a length", rak_type_to_cstr(val.type));
}
|
O0
|
c
|
is_empty_native:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x3, -0x28(%rbp)
jne 0x3feb
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
cmpl $0x0, 0xc(%rax)
setne %al
xorb $-0x1, %al
movq -0x18(%rbp), %rdx
movzbl %al, %esi
andl $0x1, %esi
callq 0x4280
jmp 0x4070
cmpl $0x4, -0x28(%rbp)
jne 0x401b
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
cmpl $0x0, 0xc(%rax)
setne %al
xorb $-0x1, %al
movq -0x18(%rbp), %rdx
movzbl %al, %esi
andl $0x1, %esi
callq 0x4280
jmp 0x4070
cmpl $0x6, -0x28(%rbp)
jne 0x404b
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
cmpl $0x0, 0xc(%rax)
setne %al
xorb $-0x1, %al
movq -0x18(%rbp), %rdx
movzbl %al, %esi
andl $0x1, %esi
callq 0x4280
jmp 0x4070
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x28(%rbp), %edi
callq 0xaef0
movq -0x48(%rbp), %rdi
movq %rax, %rdx
leaq 0xa101(%rip), %rsi # 0xe16a
movb $0x0, %al
callq 0x8220
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
is_empty_native:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov [rbp+var_28], rcx
mov rax, [rax+18h]
mov [rbp+var_20], rax
cmp dword ptr [rbp+var_28], 3
jnz short loc_3FEB
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rdi, [rbp+var_8]
mov rax, [rbp+var_30]
cmp dword ptr [rax+0Ch], 0
setnz al
xor al, 0FFh
mov rdx, [rbp+var_18]
movzx esi, al
and esi, 1
call rak_vm_push_bool
jmp loc_4070
loc_3FEB:
cmp dword ptr [rbp+var_28], 4
jnz short loc_401B
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rdi, [rbp+var_8]
mov rax, [rbp+var_38]
cmp dword ptr [rax+0Ch], 0
setnz al
xor al, 0FFh
mov rdx, [rbp+var_18]
movzx esi, al
and esi, 1
call rak_vm_push_bool
jmp short loc_4070
loc_401B:
cmp dword ptr [rbp+var_28], 6
jnz short loc_404B
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rax, [rbp+var_40]
cmp dword ptr [rax+0Ch], 0
setnz al
xor al, 0FFh
mov rdx, [rbp+var_18]
movzx esi, al
and esi, 1
call rak_vm_push_bool
jmp short loc_4070
loc_404B:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov edi, dword ptr [rbp+var_28]
call rak_type_to_cstr
mov rdi, [rbp+var_48]
mov rdx, rax
lea rsi, aSDoesNotHaveAL; "%s does not have a length"
mov al, 0
call rak_error_set
loc_4070:
add rsp, 50h
pop rbp
retn
|
long long is_empty_native(long long a1, long long a2, long long a3)
{
int v4; // eax
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // [rsp+28h] [rbp-28h]
int v9; // [rsp+38h] [rbp-18h]
v9 = a3;
v8 = *(_QWORD *)(a2 + 16);
if ( (_DWORD)v8 == 3 || (_DWORD)v8 == 4 || (_DWORD)v8 == 6 )
return rak_vm_push_bool(a1, *(_DWORD *)(*(_QWORD *)(a2 + 24) + 12LL) == 0, a3);
v4 = rak_type_to_cstr((unsigned int)v8);
return rak_error_set(v9, (unsigned int)"%s does not have a length", v4, v5, v6, v7);
}
|
is_empty_native:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x28],0x3
JNZ 0x00103feb
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX + 0xc],0x0
SETNZ AL
XOR AL,0xff
MOV RDX,qword ptr [RBP + -0x18]
MOVZX ESI,AL
AND ESI,0x1
CALL 0x00104280
JMP 0x00104070
LAB_00103feb:
CMP dword ptr [RBP + -0x28],0x4
JNZ 0x0010401b
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0xc],0x0
SETNZ AL
XOR AL,0xff
MOV RDX,qword ptr [RBP + -0x18]
MOVZX ESI,AL
AND ESI,0x1
CALL 0x00104280
JMP 0x00104070
LAB_0010401b:
CMP dword ptr [RBP + -0x28],0x6
JNZ 0x0010404b
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x40]
CMP dword ptr [RAX + 0xc],0x0
SETNZ AL
XOR AL,0xff
MOV RDX,qword ptr [RBP + -0x18]
MOVZX ESI,AL
AND ESI,0x1
CALL 0x00104280
JMP 0x00104070
LAB_0010404b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV EDI,dword ptr [RBP + -0x28]
CALL 0x0010aef0
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,RAX
LEA RSI,[0x10e16a]
MOV AL,0x0
CALL 0x00108220
LAB_00104070:
ADD RSP,0x50
POP RBP
RET
|
void is_empty_native(int8 param_1,long param_2,int8 param_3)
{
long lVar1;
int8 uVar2;
int local_30;
lVar1 = *(long *)(param_2 + 0x18);
local_30 = (int)*(ulong *)(param_2 + 0x10);
if (local_30 == 3) {
rak_vm_push_bool(param_1,(*(int *)(lVar1 + 0xc) != 0 ^ 0xffU) & 1,param_3);
}
else if (local_30 == 4) {
rak_vm_push_bool(param_1,(*(int *)(lVar1 + 0xc) != 0 ^ 0xffU) & 1,param_3);
}
else if (local_30 == 6) {
rak_vm_push_bool(param_1,(*(int *)(lVar1 + 0xc) != 0 ^ 0xffU) & 1,param_3);
}
else {
uVar2 = rak_type_to_cstr(*(ulong *)(param_2 + 0x10) & 0xffffffff);
rak_error_set(param_3,"%s does not have a length",uVar2);
}
return;
}
|
|
63,701 |
js_array_reduce
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_reduce(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int special)
{
JSValue obj, val, index_val, acc, acc1;
JSValue args[4];
JSValue func;
int64_t len, k, k1;
int present;
acc = JS_UNDEFINED;
val = JS_UNDEFINED;
if (special & special_TA) {
obj = js_dup(this_val);
len = js_typed_array_get_length_unsafe(ctx, obj);
if (len < 0)
goto exception;
} else {
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &len, obj))
goto exception;
}
func = argv[0];
if (check_function(ctx, func))
goto exception;
k = 0;
if (argc > 1) {
acc = js_dup(argv[1]);
} else {
for(;;) {
if (k >= len) {
JS_ThrowTypeError(ctx, "empty array");
goto exception;
}
k1 = (special & special_reduceRight) ? len - k - 1 : k;
k++;
if (special & special_TA) {
acc = JS_GetPropertyInt64(ctx, obj, k1);
if (JS_IsException(acc))
goto exception;
break;
} else {
present = JS_TryGetPropertyInt64(ctx, obj, k1, &acc);
if (present < 0)
goto exception;
if (present)
break;
}
}
}
for (; k < len; k++) {
k1 = (special & special_reduceRight) ? len - k - 1 : k;
if (special & special_TA) {
val = JS_GetPropertyInt64(ctx, obj, k1);
if (JS_IsException(val))
goto exception;
present = TRUE;
} else {
present = JS_TryGetPropertyInt64(ctx, obj, k1, &val);
if (present < 0)
goto exception;
}
if (present) {
index_val = js_int64(k1);
args[0] = acc;
args[1] = val;
args[2] = index_val;
args[3] = obj;
acc1 = JS_Call(ctx, func, JS_UNDEFINED, 4, args);
JS_FreeValue(ctx, index_val);
JS_FreeValue(ctx, val);
val = JS_UNDEFINED;
if (JS_IsException(acc1))
goto exception;
JS_FreeValue(ctx, acc);
acc = acc1;
}
}
JS_FreeValue(ctx, obj);
return acc;
exception:
JS_FreeValue(ctx, acc);
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_array_reduce:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %r13
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r14
andl $0x0, 0x10(%rsp)
movq %rdi, %r15
andl $0x0, 0x30(%rsp)
pushq $0x3
popq %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movl %r9d, 0x8(%rsp)
testb $0x8, %r9b
jne 0x6285b
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x20b92
movq %rax, %r14
movq %rdx, %r12
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
movq %r12, %rcx
callq 0x1cc43
testl %eax, %eax
jne 0x6289b
jmp 0x6287d
cmpl $-0x9, %r12d
jb 0x62864
incl (%r14)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x64e60
cltq
movq %rax, 0x50(%rsp)
testl %eax, %eax
js 0x6289b
movl %ebx, 0x48(%rsp)
movq (%r13), %rbx
movq 0x8(%r13), %rbp
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x3949a
testl %eax, %eax
je 0x628e8
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x1801e
movq 0x30(%rsp), %rsi
movq %r15, %rdi
movq 0x40(%rsp), %rdx
callq 0x1801e
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1801e
pushq $0x6
popq %r13
xorl %eax, %eax
movq %r13, %rdx
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, 0x70(%rsp)
cmpl $0x1, 0x48(%rsp)
movq %rbx, 0x78(%rsp)
jle 0x6292f
movq 0x10(%r13), %rax
movq 0x18(%r13), %r13
cmpl $-0x9, %r13d
jb 0x62909
incl (%rax)
movq %rax, 0x28(%rsp)
movq %rax, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq 0x50(%rsp), %rbp
movl 0x8(%rsp), %eax
andl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %edx, %edx
jmp 0x62a1a
movq %r15, %rbp
movq %r14, %r13
movq 0x50(%rsp), %rax
movl 0x8(%rsp), %ecx
andl $0x1, %ecx
movl %ecx, 0xc(%rsp)
xorl %r14d, %r14d
testq %rax, %rax
movl $0x0, %r15d
movq %rax, 0x20(%rsp)
cmovgq %rax, %r15
pushq $-0x1
popq %rcx
cmpq %r14, %r15
je 0x629c3
movq %rcx, %rbx
movq 0x20(%rsp), %rax
addq %rax, %rcx
cmpl $0x0, 0xc(%rsp)
cmoveq %r14, %rcx
testb $0x8, 0x8(%rsp)
jne 0x629df
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
leaq 0x10(%rsp), %r8
callq 0x42688
testl %eax, %eax
js 0x62bf0
leaq -0x1(%rbx), %rcx
incq %r14
testl %eax, %eax
je 0x6295d
movq %rbx, %rdx
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
negq %rdx
movq %r13, %r14
movq %rax, %r13
movq %rbp, %r15
jmp 0x62a15
leaq 0x2632c(%rip), %rsi # 0x88cf6
movq %rbp, %r15
movq %rbp, %rdi
xorl %eax, %eax
callq 0x1c64d
movq %r13, %r14
jmp 0x6289b
movq %rbp, %r15
movq %rbp, %rdi
movq %r13, %r14
movq %r13, %rsi
movq %r12, %rdx
callq 0x1e178
movq %rdx, %r13
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
cmpl $0x6, %r13d
je 0x6289b
movq %rax, 0x28(%rsp)
movq %rbx, %rdx
negq %rdx
movq 0x20(%rsp), %rbp
movq %rdx, %rbx
notq %rbx
addq %rbp, %rbx
pushq $0x3
popq %rax
movq %rax, 0x40(%rsp)
movq %r14, 0x60(%rsp)
movq %r12, 0x58(%rsp)
movq %rbp, 0x20(%rsp)
cmpq %rbp, %rdx
jge 0x62bc9
cmpl $0x0, 0xc(%rsp)
movq %rbx, 0x88(%rsp)
movq %rdx, 0x48(%rsp)
cmoveq %rdx, %rbx
testb $0x8, 0x8(%rsp)
jne 0x62a98
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
leaq 0x30(%rsp), %r8
callq 0x42688
testl %eax, %eax
js 0x62bfb
je 0x62bb1
movq %r13, 0x68(%rsp)
movq 0x30(%rsp), %rax
movq %r12, %r13
movq 0x38(%rsp), %r12
jmp 0x62ac8
movq %r13, 0x68(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1e178
movq %r12, %r13
movq %rdx, %r12
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpl $0x6, %r12d
je 0x62c0a
movq %rax, 0x80(%rsp)
movq %rbx, %rdi
callq 0x20a0b
movq %rax, %rbp
movq %r14, %rax
movq %rdx, %r14
movups 0x10(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movups 0x30(%rsp), %xmm0
leaq 0xa0(%rsp), %rcx
movups %xmm0, (%rcx)
movq %rbp, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
movq %rax, 0xc0(%rsp)
movq %r13, 0xc8(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
xorl %ecx, %ecx
pushq $0x3
popq %r8
pushq $0x4
popq %r9
callq 0x21eb6
movq %rax, %rbx
movq %rdx, %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1801e
movq %r15, %rdi
movq 0x80(%rsp), %rsi
movq %r12, %rdx
callq 0x1801e
andl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
cmpl $0x6, %r13d
je 0x62be1
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x1801e
movq %rbx, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %rbx, 0x28(%rsp)
movq 0x58(%rsp), %r12
movq 0x60(%rsp), %r14
movq 0x20(%rsp), %rbp
movq 0x48(%rsp), %rdx
incq %rdx
movq 0x88(%rsp), %rbx
decq %rbx
jmp 0x62a3a
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1801e
movq 0x28(%rsp), %rax
jmp 0x628d3
movq 0x58(%rsp), %r12
movq 0x60(%rsp), %r14
jmp 0x6289b
movq %r13, %r14
movq %rbp, %r15
jmp 0x6289b
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x6289b
movq %r12, 0x40(%rsp)
movq %r13, %r12
jmp 0x6289b
|
js_array_reduce:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r13, r8
mov ebx, ecx
mov r12, rdx
mov r14, rsi
and dword ptr [rsp+108h+var_F8], 0
mov r15, rdi
and dword ptr [rsp+108h+var_D8], 0
push 3
pop rax
mov qword ptr [rsp+108h+var_F8+8], rax
mov [rsp+108h+var_C8], rax
mov qword ptr [rsp+108h+var_D8+8], rax
mov [rsp+108h+var_100], r9d
test r9b, 8
jnz short loc_6285B
mov rdi, r15
mov rsi, r14
mov rdx, r12
call JS_ToObject
mov r14, rax
mov r12, rdx
lea rsi, [rsp+108h+var_B8]
mov rdi, r15
mov rdx, rax
mov rcx, r12
call js_get_length64
test eax, eax
jnz short loc_6289B
jmp short loc_6287D
loc_6285B:
cmp r12d, 0FFFFFFF7h
jb short loc_62864
inc dword ptr [r14]
loc_62864:
mov rdi, r15
mov rsi, r14
mov rdx, r12
call js_typed_array_get_length_unsafe
cdqe
mov [rsp+108h+var_B8], rax
test eax, eax
js short loc_6289B
loc_6287D:
mov dword ptr [rsp+108h+var_C0], ebx
mov rbx, [r13+0]
mov rbp, [r13+8]
mov rdi, r15
mov rsi, rbx
mov rdx, rbp
call check_function
test eax, eax
jz short loc_628E8
loc_6289B:
mov rsi, qword ptr [rsp+108h+var_F8]
mov rdx, qword ptr [rsp+108h+var_F8+8]
mov rdi, r15
call JS_FreeValue
mov rsi, qword ptr [rsp+108h+var_D8]
mov rdi, r15
mov rdx, [rsp+108h+var_C8]
call JS_FreeValue
mov rdi, r15
mov rsi, r14
mov rdx, r12
call JS_FreeValue
push 6
pop r13
xor eax, eax
loc_628D3:
mov rdx, r13
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_628E8:
mov [rsp+108h+var_98], rbp
cmp dword ptr [rsp+108h+var_C0], 1
mov [rsp+108h+var_90], rbx
jle short loc_6292F
mov rax, [r13+10h]
mov r13, [r13+18h]
cmp r13d, 0FFFFFFF7h
jb short loc_62909
inc dword ptr [rax]
loc_62909:
mov [rsp+108h+var_E0], rax
mov qword ptr [rsp+108h+var_F8], rax
mov qword ptr [rsp+108h+var_F8+8], r13
mov rbp, [rsp+108h+var_B8]
mov eax, [rsp+108h+var_100]
and eax, 1
mov [rsp+108h+var_FC], eax
xor edx, edx
jmp loc_62A1A
loc_6292F:
mov rbp, r15
mov r13, r14
mov rax, [rsp+108h+var_B8]
mov ecx, [rsp+108h+var_100]
and ecx, 1
mov [rsp+108h+var_FC], ecx
xor r14d, r14d
test rax, rax
mov r15d, 0
mov [rsp+108h+var_E8], rax
cmovg r15, rax
push 0FFFFFFFFFFFFFFFFh
pop rcx
loc_6295D:
cmp r15, r14
jz short loc_629C3
mov rbx, rcx
mov rax, [rsp+108h+var_E8]
add rcx, rax
cmp [rsp+108h+var_FC], 0
cmovz rcx, r14
test byte ptr [rsp+108h+var_100], 8
jnz short loc_629DF
mov rdi, rbp
mov rsi, r13
mov rdx, r12
lea r8, [rsp+108h+var_F8]
call JS_TryGetPropertyInt64
test eax, eax
js loc_62BF0
lea rcx, [rbx-1]
inc r14
test eax, eax
jz short loc_6295D
mov rdx, rbx
mov rax, qword ptr [rsp+108h+var_F8]
mov [rsp+108h+var_E0], rax
mov rax, qword ptr [rsp+108h+var_F8+8]
neg rdx
mov r14, r13
mov r13, rax
mov r15, rbp
jmp short loc_62A15
loc_629C3:
lea rsi, aEmptyArray; "empty array"
mov r15, rbp
mov rdi, rbp
xor eax, eax
call JS_ThrowTypeError
mov r14, r13
jmp loc_6289B
loc_629DF:
mov r15, rbp
mov rdi, rbp
mov r14, r13
mov rsi, r13
mov rdx, r12
call JS_GetPropertyInt64
mov r13, rdx
mov qword ptr [rsp+108h+var_F8], rax
mov qword ptr [rsp+108h+var_F8+8], rdx
cmp r13d, 6
jz loc_6289B
mov [rsp+108h+var_E0], rax
mov rdx, rbx
neg rdx
loc_62A15:
mov rbp, [rsp+108h+var_E8]
loc_62A1A:
mov rbx, rdx
not rbx
add rbx, rbp
push 3
pop rax
mov [rsp+108h+var_C8], rax
mov [rsp+108h+var_A8], r14
mov [rsp+108h+var_B0], r12
mov [rsp+108h+var_E8], rbp
loc_62A3A:
cmp rdx, rbp
jge loc_62BC9
cmp [rsp+108h+var_FC], 0
mov [rsp+108h+var_80], rbx
mov [rsp+108h+var_C0], rdx
cmovz rbx, rdx
test byte ptr [rsp+108h+var_100], 8
jnz short loc_62A98
mov rdi, r15
mov rsi, r14
mov rdx, r12
mov rcx, rbx
lea r8, [rsp+108h+var_D8]
call JS_TryGetPropertyInt64
test eax, eax
js loc_62BFB
jz loc_62BB1
mov [rsp+108h+var_A0], r13
mov rax, qword ptr [rsp+108h+var_D8]
mov r13, r12
mov r12, qword ptr [rsp+108h+var_D8+8]
jmp short loc_62AC8
loc_62A98:
mov [rsp+108h+var_A0], r13
mov rdi, r15
mov rsi, r14
mov rdx, r12
mov rcx, rbx
call JS_GetPropertyInt64
mov r13, r12
mov r12, rdx
mov qword ptr [rsp+108h+var_D8], rax
mov qword ptr [rsp+108h+var_D8+8], rdx
cmp r12d, 6
jz loc_62C0A
loc_62AC8:
mov [rsp+108h+var_88], rax
mov rdi, rbx
call js_int64
mov rbp, rax
mov rax, r14
mov r14, rdx
movups xmm0, [rsp+108h+var_F8]
movaps [rsp+108h+var_78], xmm0
movups xmm0, [rsp+108h+var_D8]
lea rcx, [rsp+108h+var_68]
movups xmmword ptr [rcx], xmm0
mov [rsp+108h+var_58], rbp
mov [rsp+108h+var_50], rdx
mov [rsp+108h+var_48], rax
mov [rsp+108h+var_40], r13
lea rax, [rsp+108h+var_78]
mov [rsp+108h+var_108], rax
mov rdi, r15
mov rsi, [rsp+108h+var_90]
mov rdx, [rsp+108h+var_98]
xor ecx, ecx
push 3
pop r8
push 4
pop r9
call JS_Call
mov rbx, rax
mov r13, rdx
mov rdi, r15
mov rsi, rbp
mov rdx, r14
call JS_FreeValue
mov rdi, r15
mov rsi, [rsp+108h+var_88]
mov rdx, r12
call JS_FreeValue
and dword ptr [rsp+108h+var_D8], 0
mov qword ptr [rsp+108h+var_D8+8], 3
cmp r13d, 6
jz short loc_62BE1
mov rdi, r15
mov rsi, [rsp+108h+var_E0]
mov rdx, [rsp+108h+var_A0]
call JS_FreeValue
mov qword ptr [rsp+108h+var_F8], rbx
mov qword ptr [rsp+108h+var_F8+8], r13
mov [rsp+108h+var_E0], rbx
mov r12, [rsp+108h+var_B0]
mov r14, [rsp+108h+var_A8]
mov rbp, [rsp+108h+var_E8]
loc_62BB1:
mov rdx, [rsp+108h+var_C0]
inc rdx
mov rbx, [rsp+108h+var_80]
dec rbx
jmp loc_62A3A
loc_62BC9:
mov rdi, r15
mov rsi, r14
mov rdx, r12
call JS_FreeValue
mov rax, [rsp+108h+var_E0]
jmp loc_628D3
loc_62BE1:
mov r12, [rsp+108h+var_B0]
mov r14, [rsp+108h+var_A8]
jmp loc_6289B
loc_62BF0:
mov r14, r13
mov r15, rbp
jmp loc_6289B
loc_62BFB:
mov rax, qword ptr [rsp+108h+var_D8+8]
mov [rsp+108h+var_C8], rax
jmp loc_6289B
loc_62C0A:
mov [rsp+108h+var_C8], r12
mov r12, r13
jmp loc_6289B
|
long long js_array_reduce(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // ebx
long long v16; // r12
long long v17; // r14
long long v18; // r15
long long v19; // rdx
double v20; // xmm4_8
double v21; // xmm5_8
int length_unsafe; // eax
long long v23; // rbx
long long v24; // rbp
long long v25; // rdx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
_DWORD *v31; // rax
long long v32; // r13
long long v33; // rbp
signed long long v34; // rdx
long long v35; // r13
unsigned long long v36; // r14
long long v37; // r15
long long v38; // rcx
long long v39; // rbx
unsigned long long v40; // rcx
int PropertyInt64; // eax
__int128 v42; // rax
unsigned long long v43; // rbx
int v44; // eax
__int128 v45; // rax
long long v46; // r13
long long v47; // r12
long long v48; // rbp
long long v49; // rax
long long v50; // rdx
long long v51; // r14
long long v52; // rbx
long long v53; // rdx
char v54; // [rsp+0h] [rbp-108h]
char v55; // [rsp+8h] [rbp-100h]
int v56; // [rsp+Ch] [rbp-FCh]
__int128 v57; // [rsp+10h] [rbp-F8h] BYREF
long long v58; // [rsp+20h] [rbp-E8h]
_DWORD *v59; // [rsp+28h] [rbp-E0h]
__int128 v60; // [rsp+30h] [rbp-D8h] BYREF
long long v61; // [rsp+40h] [rbp-C8h]
signed long long v62; // [rsp+48h] [rbp-C0h]
long long v63; // [rsp+50h] [rbp-B8h] BYREF
long long v64; // [rsp+58h] [rbp-B0h]
long long v65; // [rsp+60h] [rbp-A8h]
long long v66; // [rsp+68h] [rbp-A0h]
long long v67; // [rsp+70h] [rbp-98h]
long long v68; // [rsp+78h] [rbp-90h]
long long v69; // [rsp+80h] [rbp-88h]
unsigned long long v70; // [rsp+88h] [rbp-80h]
_OWORD v71[2]; // [rsp+90h] [rbp-78h] BYREF
long long v72; // [rsp+B0h] [rbp-58h]
long long v73; // [rsp+B8h] [rbp-50h]
long long v74; // [rsp+C0h] [rbp-48h]
long long v75; // [rsp+C8h] [rbp-40h]
v15 = a4;
v16 = a3;
v17 = (long long)a2;
LODWORD(v57) = 0;
v18 = a1;
LODWORD(v60) = 0;
*((_QWORD *)&v57 + 1) = 3LL;
v61 = 3LL;
*((_QWORD *)&v60 + 1) = 3LL;
v55 = a6;
if ( (a6 & 8) != 0 )
{
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*a2;
length_unsafe = js_typed_array_get_length_unsafe(a1, a2, a3);
v63 = length_unsafe;
if ( length_unsafe < 0 )
goto LABEL_8;
}
else
{
v17 = JS_ToObject(a1, (long long)a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = v19;
if ( (unsigned int)js_get_length64(a1, &v63, v17, v19) )
goto LABEL_8;
}
LODWORD(v62) = v15;
v23 = *a5;
v24 = a5[1];
if ( !(unsigned int)check_function(a1, *a5, v24, a7, a8, a9, a10, v20, v21, a13, a14) )
{
v67 = v24;
v68 = v23;
if ( (int)v62 > 1 )
{
v31 = (_DWORD *)a5[2];
v32 = a5[3];
if ( (unsigned int)v32 >= 0xFFFFFFF7 )
++*v31;
v59 = v31;
*(_QWORD *)&v57 = v31;
*((_QWORD *)&v57 + 1) = v32;
v33 = v63;
v56 = v55 & 1;
v34 = 0LL;
goto LABEL_27;
}
v35 = v17;
v56 = v55 & 1;
v36 = 0LL;
v37 = 0LL;
v58 = v63;
if ( v63 > 0 )
v37 = v63;
v38 = -1LL;
while ( 1 )
{
if ( v37 == v36 )
{
v18 = a1;
JS_ThrowTypeError(a1, (long long)"empty array", v25, v38, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v54);
v17 = v35;
goto LABEL_8;
}
v39 = v38;
v40 = v58 + v38;
if ( (v55 & 1) == 0 )
v40 = v36;
if ( (v55 & 8) != 0 )
break;
PropertyInt64 = JS_TryGetPropertyInt64(a1, v35, v16, v40, (long long)&v57);
if ( PropertyInt64 < 0 )
{
v17 = v35;
v18 = a1;
goto LABEL_8;
}
v38 = v39 - 1;
++v36;
if ( PropertyInt64 )
{
v59 = (_DWORD *)v57;
v34 = -v39;
v17 = v35;
v32 = *((_QWORD *)&v57 + 1);
v18 = a1;
goto LABEL_26;
}
}
v18 = a1;
v17 = v35;
*(_QWORD *)&v42 = JS_GetPropertyInt64(a1, v35, v16, v40);
v32 = *((_QWORD *)&v42 + 1);
v57 = v42;
if ( DWORD2(v42) != 6 )
{
v59 = (_DWORD *)v42;
v34 = -v39;
LABEL_26:
v33 = v58;
LABEL_27:
v43 = v33 + ~v34;
v61 = 3LL;
v65 = v17;
v64 = v16;
v58 = v33;
while ( 2 )
{
if ( v34 >= v33 )
{
JS_FreeValue(v18, v17, v16);
return (long long)v59;
}
v70 = v43;
v62 = v34;
if ( !v56 )
v43 = v34;
if ( (v55 & 8) != 0 )
{
v66 = v32;
*(_QWORD *)&v45 = JS_GetPropertyInt64(v18, v17, v16, v43);
v46 = v16;
v47 = *((_QWORD *)&v45 + 1);
v60 = v45;
if ( DWORD2(v45) == 6 )
{
v61 = *((_QWORD *)&v45 + 1);
v16 = v46;
break;
}
LABEL_36:
v69 = v45;
v48 = js_int64(v43);
v49 = v17;
v51 = v50;
v71[0] = v57;
v71[1] = v60;
v72 = v48;
v73 = v50;
v74 = v49;
v75 = v46;
v52 = JS_Call(v18, v68, v67, 0, 3, 4, (long long)v71);
v32 = v53;
JS_FreeValue(v18, v48, v51);
JS_FreeValue(v18, v69, v47);
LODWORD(v60) = 0;
*((_QWORD *)&v60 + 1) = 3LL;
if ( (_DWORD)v32 == 6 )
{
v16 = v64;
v17 = v65;
break;
}
JS_FreeValue(v18, (long long)v59, v66);
*(_QWORD *)&v57 = v52;
*((_QWORD *)&v57 + 1) = v32;
v59 = (_DWORD *)v52;
v16 = v64;
v17 = v65;
v33 = v58;
}
else
{
v44 = JS_TryGetPropertyInt64(v18, v17, v16, v43, (long long)&v60);
if ( v44 < 0 )
{
v61 = *((_QWORD *)&v60 + 1);
break;
}
if ( v44 )
{
v66 = v32;
*(_QWORD *)&v45 = v60;
v46 = v16;
v47 = *((_QWORD *)&v60 + 1);
goto LABEL_36;
}
}
v34 = v62 + 1;
v43 = v70 - 1;
continue;
}
}
}
LABEL_8:
JS_FreeValue(v18, v57, *((long long *)&v57 + 1));
JS_FreeValue(v18, v60, v61);
JS_FreeValue(v18, v17, v16);
return 0LL;
}
|
js_array_reduce:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R13,R8
MOV EBX,ECX
MOV R12,RDX
MOV R14,RSI
AND dword ptr [RSP + 0x10],0x0
MOV R15,RDI
AND dword ptr [RSP + 0x30],0x0
PUSH 0x3
POP RAX
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x8],R9D
TEST R9B,0x8
JNZ 0x0016285b
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x00120b92
MOV R14,RAX
MOV R12,RDX
LEA RSI,[RSP + 0x50]
MOV RDI,R15
MOV RDX,RAX
MOV RCX,R12
CALL 0x0011cc43
TEST EAX,EAX
JNZ 0x0016289b
JMP 0x0016287d
LAB_0016285b:
CMP R12D,-0x9
JC 0x00162864
INC dword ptr [R14]
LAB_00162864:
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x00164e60
CDQE
MOV qword ptr [RSP + 0x50],RAX
TEST EAX,EAX
JS 0x0016289b
LAB_0016287d:
MOV dword ptr [RSP + 0x48],EBX
MOV RBX,qword ptr [R13]
MOV RBP,qword ptr [R13 + 0x8]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,RBP
CALL 0x0013949a
TEST EAX,EAX
JZ 0x001628e8
LAB_0016289b:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,R15
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,R15
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x0011801e
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0011801e
PUSH 0x6
POP R13
XOR EAX,EAX
LAB_001628d3:
MOV RDX,R13
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001628e8:
MOV qword ptr [RSP + 0x70],RBP
CMP dword ptr [RSP + 0x48],0x1
MOV qword ptr [RSP + 0x78],RBX
JLE 0x0016292f
MOV RAX,qword ptr [R13 + 0x10]
MOV R13,qword ptr [R13 + 0x18]
CMP R13D,-0x9
JC 0x00162909
INC dword ptr [RAX]
LAB_00162909:
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],R13
MOV RBP,qword ptr [RSP + 0x50]
MOV EAX,dword ptr [RSP + 0x8]
AND EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
XOR EDX,EDX
JMP 0x00162a1a
LAB_0016292f:
MOV RBP,R15
MOV R13,R14
MOV RAX,qword ptr [RSP + 0x50]
MOV ECX,dword ptr [RSP + 0x8]
AND ECX,0x1
MOV dword ptr [RSP + 0xc],ECX
XOR R14D,R14D
TEST RAX,RAX
MOV R15D,0x0
MOV qword ptr [RSP + 0x20],RAX
CMOVG R15,RAX
PUSH -0x1
POP RCX
LAB_0016295d:
CMP R15,R14
JZ 0x001629c3
MOV RBX,RCX
MOV RAX,qword ptr [RSP + 0x20]
ADD RCX,RAX
CMP dword ptr [RSP + 0xc],0x0
CMOVZ RCX,R14
TEST byte ptr [RSP + 0x8],0x8
JNZ 0x001629df
MOV RDI,RBP
MOV RSI,R13
MOV RDX,R12
LEA R8,[RSP + 0x10]
CALL 0x00142688
TEST EAX,EAX
JS 0x00162bf0
LEA RCX,[RBX + -0x1]
INC R14
TEST EAX,EAX
JZ 0x0016295d
MOV RDX,RBX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x18]
NEG RDX
MOV R14,R13
MOV R13,RAX
MOV R15,RBP
JMP 0x00162a15
LAB_001629c3:
LEA RSI,[0x188cf6]
MOV R15,RBP
MOV RDI,RBP
XOR EAX,EAX
CALL 0x0011c64d
MOV R14,R13
JMP 0x0016289b
LAB_001629df:
MOV R15,RBP
MOV RDI,RBP
MOV R14,R13
MOV RSI,R13
MOV RDX,R12
CALL 0x0011e178
MOV R13,RDX
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
CMP R13D,0x6
JZ 0x0016289b
MOV qword ptr [RSP + 0x28],RAX
MOV RDX,RBX
NEG RDX
LAB_00162a15:
MOV RBP,qword ptr [RSP + 0x20]
LAB_00162a1a:
MOV RBX,RDX
NOT RBX
ADD RBX,RBP
PUSH 0x3
POP RAX
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x60],R14
MOV qword ptr [RSP + 0x58],R12
MOV qword ptr [RSP + 0x20],RBP
LAB_00162a3a:
CMP RDX,RBP
JGE 0x00162bc9
CMP dword ptr [RSP + 0xc],0x0
MOV qword ptr [RSP + 0x88],RBX
MOV qword ptr [RSP + 0x48],RDX
CMOVZ RBX,RDX
TEST byte ptr [RSP + 0x8],0x8
JNZ 0x00162a98
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
LEA R8,[RSP + 0x30]
CALL 0x00142688
TEST EAX,EAX
JS 0x00162bfb
JZ 0x00162bb1
MOV qword ptr [RSP + 0x68],R13
MOV RAX,qword ptr [RSP + 0x30]
MOV R13,R12
MOV R12,qword ptr [RSP + 0x38]
JMP 0x00162ac8
LAB_00162a98:
MOV qword ptr [RSP + 0x68],R13
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
CALL 0x0011e178
MOV R13,R12
MOV R12,RDX
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
CMP R12D,0x6
JZ 0x00162c0a
LAB_00162ac8:
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,RBX
CALL 0x00120a0b
MOV RBP,RAX
MOV RAX,R14
MOV R14,RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x10]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
LEA RCX,[RSP + 0xa0]
MOVUPS xmmword ptr [RCX],XMM0
MOV qword ptr [RSP + 0xb0],RBP
MOV qword ptr [RSP + 0xb8],RDX
MOV qword ptr [RSP + 0xc0],RAX
MOV qword ptr [RSP + 0xc8],R13
LEA RAX,[RSP + 0x90]
MOV qword ptr [RSP],RAX
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x70]
XOR ECX,ECX
PUSH 0x3
POP R8
PUSH 0x4
POP R9
CALL 0x00121eb6
MOV RBX,RAX
MOV R13,RDX
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R14
CALL 0x0011801e
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,R12
CALL 0x0011801e
AND dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
CMP R13D,0x6
JZ 0x00162be1
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x0011801e
MOV qword ptr [RSP + 0x10],RBX
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x28],RBX
MOV R12,qword ptr [RSP + 0x58]
MOV R14,qword ptr [RSP + 0x60]
MOV RBP,qword ptr [RSP + 0x20]
LAB_00162bb1:
MOV RDX,qword ptr [RSP + 0x48]
INC RDX
MOV RBX,qword ptr [RSP + 0x88]
DEC RBX
JMP 0x00162a3a
LAB_00162bc9:
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0011801e
MOV RAX,qword ptr [RSP + 0x28]
JMP 0x001628d3
LAB_00162be1:
MOV R12,qword ptr [RSP + 0x58]
MOV R14,qword ptr [RSP + 0x60]
JMP 0x0016289b
LAB_00162bf0:
MOV R14,R13
MOV R15,RBP
JMP 0x0016289b
LAB_00162bfb:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0016289b
LAB_00162c0a:
MOV qword ptr [RSP + 0x40],R12
MOV R12,R13
JMP 0x0016289b
|
int1 [16]
js_array_reduce(int8 param_1,int *param_2,int8 param_3,int4 param_4,
int8 *param_5,ulong param_6)
{
int *piVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int iVar4;
long lVar5;
long lVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
long lVar10;
int8 uVar11;
int8 uVar12;
long lVar13;
int8 uVar14;
int1 auVar15 [16];
int1 auVar16 [16];
int1 auVar17 [16];
int1 auVar18 [16];
int1 local_f8 [16];
long local_e8;
int8 local_e0;
int1 local_d8 [16];
int8 local_c8;
ulong local_c0;
long local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
int8 local_88;
ulong local_80;
int *local_78;
int8 uStack_70;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int1 local_58 [16];
int1 local_48 [16];
auVar15._8_8_ = param_3;
auVar15._0_8_ = param_2;
local_f8._0_8_ = local_f8._0_8_ & 0xffffffff00000000;
local_d8._0_8_ = local_d8._0_8_ & 0xffffffff00000000;
local_f8._8_8_ = 3;
local_c8 = 3;
local_d8._8_8_ = 3;
if ((param_6 & 8) == 0) {
auVar15 = JS_ToObject(param_1,param_2,param_3);
iVar4 = js_get_length64(param_1,&local_b8,auVar15._0_8_,auVar15._8_8_);
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
if (iVar4 == 0) {
LAB_0016287d:
local_c0 = CONCAT44(local_c0._4_4_,param_4);
uVar12 = *param_5;
uVar11 = param_5[1];
iVar4 = check_function(param_1,uVar12,uVar11);
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
if (iVar4 == 0) {
local_98 = uVar11;
local_90 = uVar12;
if ((int)local_c0 < 2) {
lVar13 = 0;
local_e8 = local_b8;
lVar10 = 0;
if (0 < local_b8) {
lVar10 = local_b8;
}
lVar6 = -1;
do {
lVar5 = lVar6;
if (lVar10 == lVar13) {
JS_ThrowTypeError(param_1,"empty array");
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
goto LAB_0016289b;
}
lVar6 = lVar5 + local_e8;
if ((param_6 & 1) == 0) {
lVar6 = lVar13;
}
if ((param_6 & 8) != 0) {
local_f8 = JS_GetPropertyInt64(param_1,auVar15._0_8_,auVar15._8_8_,lVar6);
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
if (local_f8._8_4_ == 6) goto LAB_0016289b;
break;
}
iVar4 = JS_TryGetPropertyInt64(param_1,auVar15._0_8_,auVar15._8_8_,lVar6,local_f8);
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
if (iVar4 < 0) goto LAB_0016289b;
lVar13 = lVar13 + 1;
lVar6 = lVar5 + -1;
} while (iVar4 == 0);
uVar7 = -lVar5;
lVar10 = local_e8;
auVar18 = local_f8;
}
else {
piVar1 = *(int **)*(int1 (*) [16])(param_5 + 2);
auVar18 = *(int1 (*) [16])(param_5 + 2);
if (0xfffffff6 < (uint)param_5[3]) {
*piVar1 = *piVar1 + 1;
}
uVar7 = 0;
lVar10 = local_b8;
}
uVar8 = ~uVar7 + lVar10;
local_c8 = 3;
local_e8 = lVar10;
auVar2 = auVar18;
auVar3 = auVar15;
while( true ) {
local_b0 = auVar3._8_8_;
local_a8 = auVar3._0_8_;
local_f8._8_8_ = auVar2._8_8_;
local_e0 = auVar2._0_8_;
uVar11 = auVar15._8_8_;
uVar14 = auVar15._0_8_;
uVar12 = auVar18._8_8_;
local_f8._0_8_ = auVar18._0_8_;
if (lVar10 <= (long)uVar7) break;
uVar9 = uVar8;
if ((param_6 & 1) == 0) {
uVar9 = uVar7;
}
local_c0 = uVar7;
local_80 = uVar8;
if ((param_6 & 8) == 0) {
iVar4 = JS_TryGetPropertyInt64(param_1,uVar14,uVar11,uVar9,local_d8);
auVar2._8_8_ = local_f8._8_8_;
auVar2._0_8_ = local_e0;
auVar18._8_8_ = uVar12;
auVar18._0_8_ = local_f8._0_8_;
if (iVar4 < 0) {
auVar17._8_8_ = local_d8._8_8_;
auVar17._0_8_ = local_d8._0_8_;
goto LAB_0016289b;
}
if (iVar4 != 0) goto LAB_00162ac8;
}
else {
local_a0 = uVar12;
local_d8 = JS_GetPropertyInt64(param_1,uVar14,uVar11,uVar9);
uVar12 = local_a0;
auVar17 = local_d8;
if (local_d8._8_4_ == 6) goto LAB_0016289b;
LAB_00162ac8:
local_a0 = uVar12;
uVar12 = local_d8._8_8_;
local_88 = local_d8._0_8_;
auVar17 = js_int64(uVar9);
local_78 = (int *)local_f8._0_8_;
uStack_70 = local_f8._8_8_;
local_68 = local_d8._0_4_;
uStack_64 = local_d8._4_4_;
uStack_60 = local_d8._8_4_;
uStack_5c = local_d8._12_4_;
local_58 = auVar17;
local_48 = auVar15;
auVar18 = JS_Call(param_1,local_90,local_98,0,3,4,&local_78);
JS_FreeValue(param_1,auVar17._0_8_,auVar17._8_8_);
JS_FreeValue(param_1,local_88,uVar12);
auVar15._8_8_ = local_b0;
auVar15._0_8_ = local_a8;
local_d8._0_8_ = local_d8._0_8_ & 0xffffffff00000000;
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
local_d8._8_8_ = 3;
if (auVar18._8_4_ == 6) goto LAB_0016289b;
JS_FreeValue(param_1,local_e0,local_a0);
auVar15._8_8_ = local_b0;
auVar15._0_8_ = local_a8;
lVar10 = local_e8;
auVar2 = auVar18;
}
auVar3._8_8_ = local_b0;
auVar3._0_8_ = local_a8;
uVar7 = local_c0 + 1;
uVar8 = local_80 - 1;
}
JS_FreeValue(param_1,uVar14,uVar11);
goto LAB_001628d3;
}
}
}
else {
if (0xfffffff6 < (uint)param_3) {
*param_2 = *param_2 + 1;
}
iVar4 = js_typed_array_get_length_unsafe(param_1,param_2,param_3);
auVar17._8_8_ = local_c8;
auVar17._0_8_ = local_d8._0_8_;
local_b8 = (long)iVar4;
if (-1 < iVar4) goto LAB_0016287d;
}
LAB_0016289b:
local_c8 = auVar17._8_8_;
local_d8._0_8_ = auVar17._0_8_;
JS_FreeValue(param_1,local_f8._0_8_,local_f8._8_8_);
JS_FreeValue(param_1,local_d8._0_8_,local_c8);
JS_FreeValue(param_1,auVar15._0_8_,auVar15._8_8_);
uVar12 = 6;
local_e0 = 0;
LAB_001628d3:
auVar16._8_8_ = uVar12;
auVar16._0_8_ = local_e0;
return auVar16;
}
|
|
63,702 |
minja::Parser::parseLogicalAnd()
|
monkey531[P]llama/common/./minja.hpp
|
std::shared_ptr<Expression> parseLogicalAnd() {
auto left = parseLogicalNot();
if (!left) throw std::runtime_error("Expected left side of 'logical and' expression");
static std::regex and_tok(R"(and\b)");
auto location = get_location();
while (!consumeToken(and_tok).empty()) {
auto right = parseLogicalNot();
if (!right) throw std::runtime_error("Expected right side of 'and' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And);
}
return left;
}
|
O0
|
cpp
|
minja::Parser::parseLogicalAnd():
subq $0xb8, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xa8(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movb $0x0, 0xa7(%rsp)
callq 0x9dae0
movq 0x28(%rsp), %rdi
callq 0x77a80
testb $0x1, %al
jne 0x9d7b8
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0x12f07d(%rip), %rsi # 0x1cc7d5
callq 0x50340
jmp 0x9d75f
movq 0x10(%rsp), %rdi
movq 0x1b6845(%rip), %rsi # 0x253fb0
movq 0x1b6806(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0x9d9f1
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x50c40
jmp 0x9d9da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x9d9da
cmpb $0x0, 0x1b77a9(%rip) # 0x254f68
jne 0x9d812
leaq 0x1b77a0(%rip), %rdi # 0x254f68
callq 0x504b0
cmpl $0x0, %eax
je 0x9d812
leaq 0x1b776f(%rip), %rdi # 0x254f48
leaq 0x12f024(%rip), %rsi # 0x1cc804
movl $0x10, %edx
callq 0x76c30
jmp 0x9d7ec
leaq -0x26b13(%rip), %rdi # 0x76ce0
leaq 0x1b774e(%rip), %rsi # 0x254f48
leaq 0x1b7067(%rip), %rdx # 0x254868
callq 0x50c20
leaq 0x1b775b(%rip), %rdi # 0x254f68
callq 0x50820
movq 0x20(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x76db0
jmp 0x9d823
jmp 0x9d825
movq 0x20(%rsp), %rsi
leaq 0x1b7717(%rip), %rdx # 0x254f48
leaq 0x58(%rsp), %rdi
movl $0x1, %ecx
callq 0x778a0
jmp 0x9d842
leaq 0x58(%rsp), %rdi
callq 0x503b0
xorb $-0x1, %al
movb %al, 0xf(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x510c0
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x9d869
jmp 0x9d999
movq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x9dae0
jmp 0x9d87a
leaq 0x48(%rsp), %rdi
callq 0x77a80
testb $0x1, %al
jne 0x9d93d
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0x12ef63(%rip), %rsi # 0x1cc80a
callq 0x50340
jmp 0x9d8ae
movq (%rsp), %rdi
movq 0x1b66f7(%rip), %rsi # 0x253fb0
movq 0x1b66b8(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0x9d9f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x1b7683(%rip), %rdi # 0x254f68
callq 0x505d0
jmp 0x9d9da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x9d9b7
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x50c40
jmp 0x9d98d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x9d98d
movq 0x28(%rsp), %rdx
movl $0xe, 0x34(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x48(%rsp), %rcx
leaq 0x34(%rsp), %r8
callq 0x9da00
jmp 0x9d965
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x9daa0
leaq 0x38(%rsp), %rdi
callq 0x9dad0
leaq 0x48(%rsp), %rdi
callq 0x77890
jmp 0x9d825
leaq 0x48(%rsp), %rdi
callq 0x77890
jmp 0x9d9b7
movb $0x1, 0xa7(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x7a6d0
testb $0x1, 0xa7(%rsp)
jne 0x9d9cd
jmp 0x9d9c3
leaq 0x78(%rsp), %rdi
callq 0x7a6d0
jmp 0x9d9da
movq 0x28(%rsp), %rdi
callq 0x77890
movq 0x18(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x77890
movq 0x98(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN5minja6Parser15parseLogicalAndEv:
sub rsp, 0B8h
mov [rsp+0B8h+var_90], rdi
mov rax, rdi
mov [rsp+0B8h+var_A0], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov rsi, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_98], rsi
mov [rsp+0B8h+var_11], 0
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
mov rdi, [rsp+0B8h+var_90]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_9D7B8
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_9D75F:
mov rdi, [rsp+0B8h+var_A8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_9D9F1
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
call ___cxa_free_exception
jmp loc_9D9DA
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp loc_9D9DA
loc_9D7B8:
cmp cs:_ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11, 0; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok
jnz short loc_9D812
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_9D812
lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
lea rsi, aAndB; "and\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
jmp short $+2
loc_9D7EC:
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_release
loc_9D812:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_40]; this
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
jmp short $+2
loc_9D823:
jmp short $+2
loc_9D825:
mov rsi, [rsp+0B8h+var_98]
lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
lea rdi, [rsp+0B8h+var_60]
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
jmp short $+2
loc_9D842:
lea rdi, [rsp+0B8h+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
xor al, 0FFh
mov [rsp+0B8h+var_A9], al
lea rdi, [rsp+0B8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rsp+0B8h+var_A9]
test al, 1
jnz short loc_9D869
jmp loc_9D999
loc_9D869:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_70]; this
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
jmp short $+2
loc_9D87A:
lea rdi, [rsp+0B8h+var_70]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_9D93D
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_B8], rax
lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_9D8AE:
mov rdi, [rsp+0B8h+var_B8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_9D9F1
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_9D9DA
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp loc_9D9B7
mov rdi, [rsp+0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
call ___cxa_free_exception
jmp short loc_9D98D
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp short loc_9D98D
loc_9D93D:
mov rdx, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_84], 0Eh
lea rdi, [rsp+0B8h+var_80]
lea rsi, [rsp+0B8h+var_40]
lea rcx, [rsp+0B8h+var_70]
lea r8, [rsp+0B8h+var_84]
call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
jmp short $+2
loc_9D965:
mov rdi, [rsp+0B8h+var_90]
lea rsi, [rsp+0B8h+var_80]
call _ZNSt10shared_ptrIN5minja10ExpressionEEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_
lea rdi, [rsp+0B8h+var_80]
call _ZNSt10shared_ptrIN5minja12BinaryOpExprEED2Ev; std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr()
lea rdi, [rsp+0B8h+var_70]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp loc_9D825
loc_9D98D:
lea rdi, [rsp+arg_40]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp short loc_9D9B7
loc_9D999:
mov [rsp+0B8h+var_11], 1
lea rdi, [rsp+0B8h+var_40]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
test [rsp+0B8h+var_11], 1
jnz short loc_9D9CD
jmp short loc_9D9C3
loc_9D9B7:
lea rdi, [rsp+arg_70]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
jmp short loc_9D9DA
loc_9D9C3:
mov rdi, [rsp+0B8h+var_90]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
loc_9D9CD:
mov rax, [rsp+0B8h+var_A0]
add rsp, 0B8h
retn
loc_9D9DA:
mov rdi, [rsp+arg_20]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
mov rdi, [rsp+arg_90]
call __Unwind_Resume
loc_9D9F1:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax+rax+00h]
|
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, long long a2)
{
int v2; // r9d
int v4; // [rsp+0h] [rbp-B8h]
std::runtime_error *v5; // [rsp+0h] [rbp-B8h]
int v6; // [rsp+8h] [rbp-B0h]
char v7; // [rsp+Fh] [rbp-A9h]
int v8; // [rsp+10h] [rbp-A8h]
std::runtime_error *exception; // [rsp+10h] [rbp-A8h]
minja::Parser *v10; // [rsp+18h] [rbp-A0h]
long long v11; // [rsp+20h] [rbp-98h]
int v12; // [rsp+34h] [rbp-84h] BYREF
_BYTE v13[16]; // [rsp+38h] [rbp-80h] BYREF
_QWORD v14[2]; // [rsp+48h] [rbp-70h] BYREF
_BYTE v15[32]; // [rsp+58h] [rbp-60h] BYREF
_BYTE v16[47]; // [rsp+78h] [rbp-40h] BYREF
char v17; // [rsp+A7h] [rbp-11h]
long long v18; // [rsp+A8h] [rbp-10h]
minja::Parser *v19; // [rsp+B0h] [rbp-8h]
v10 = this;
v19 = this;
v18 = a2;
v11 = a2;
v17 = 0;
minja::Parser::parseLogicalNot(this);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
(long long)"and\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v16, a2);
while ( 1 )
{
minja::Parser::consumeToken(
(long long)v15,
v11,
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
1u);
v7 = ~(unsigned __int8)std::string::empty(v15);
std::string::~string(v15);
if ( (v7 & 1) == 0 )
break;
minja::Parser::parseLogicalNot((minja::Parser *)v14);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v14) )
{
v5 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v5, "Expected right side of 'and' expression");
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v12 = 14;
std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
(unsigned int)v13,
(unsigned int)v16,
(_DWORD)this,
(unsigned int)v14,
(unsigned int)&v12,
v2,
v4,
v6,
v8,
(long long)v10,
v11);
std::shared_ptr<minja::Expression>::operator=<minja::BinaryOpExpr>(this, v13);
std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr(v13);
std::shared_ptr<minja::Expression>::~shared_ptr((long long)v14);
}
v17 = 1;
minja::Location::~Location((minja::Location *)v16);
if ( (v17 & 1) == 0 )
std::shared_ptr<minja::Expression>::~shared_ptr((long long)this);
return v10;
}
|
parseLogicalAnd:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV RSI,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x20],RSI
MOV byte ptr [RSP + 0xa7],0x0
CALL 0x0019dae0
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00177a80
TEST AL,0x1
JNZ 0x0019d7b8
MOV EDI,0x10
CALL 0x00150540
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
LAB_0019d751:
LEA RSI,[0x2cc7d5]
CALL 0x00150340
JMP 0x0019d75f
LAB_0019d75f:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
LAB_0019d7b8:
CMP byte ptr [0x00354f68],0x0
JNZ 0x0019d812
LEA RDI,[0x354f68]
CALL 0x001504b0
CMP EAX,0x0
JZ 0x0019d812
LAB_0019d7d2:
LEA RDI,[0x354f48]
LEA RSI,[0x2cc804]
MOV EDX,0x10
CALL 0x00176c30
JMP 0x0019d7ec
LAB_0019d7ec:
LEA RDI,[0x176ce0]
LEA RSI,[0x354f48]
LEA RDX,[0x354868]
CALL 0x00150c20
LEA RDI,[0x354f68]
CALL 0x00150820
LAB_0019d812:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x78]
CALL 0x00176db0
JMP 0x0019d823
LAB_0019d823:
JMP 0x0019d825
LAB_0019d825:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDX,[0x354f48]
LEA RDI,[RSP + 0x58]
MOV ECX,0x1
CALL 0x001778a0
JMP 0x0019d842
LAB_0019d842:
LEA RDI,[RSP + 0x58]
CALL 0x001503b0
XOR AL,0xff
MOV byte ptr [RSP + 0xf],AL
LEA RDI,[RSP + 0x58]
CALL 0x001510c0
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x0019d869
JMP 0x0019d999
LAB_0019d869:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x48]
CALL 0x0019dae0
LAB_0019d878:
JMP 0x0019d87a
LAB_0019d87a:
LEA RDI,[RSP + 0x48]
CALL 0x00177a80
TEST AL,0x1
JNZ 0x0019d93d
MOV EDI,0x10
CALL 0x00150540
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP],RAX
LAB_0019d8a0:
LEA RSI,[0x2cc80a]
CALL 0x00150340
JMP 0x0019d8ae
LAB_0019d8ae:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
LAB_0019d93d:
MOV RDX,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x34],0xe
LAB_0019d94a:
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x78]
LEA RCX,[RSP + 0x48]
LEA R8,[RSP + 0x34]
CALL 0x0019da00
LAB_0019d963:
JMP 0x0019d965
LAB_0019d965:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x38]
CALL 0x0019daa0
LEA RDI,[RSP + 0x38]
CALL 0x0019dad0
LEA RDI,[RSP + 0x48]
CALL 0x00177890
JMP 0x0019d825
LAB_0019d999:
MOV byte ptr [RSP + 0xa7],0x1
LEA RDI,[RSP + 0x78]
CALL 0x0017a6d0
TEST byte ptr [RSP + 0xa7],0x1
JNZ 0x0019d9cd
JMP 0x0019d9c3
LAB_0019d9c3:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00177890
LAB_0019d9cd:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0xb8
RET
|
/* minja::Parser::parseLogicalAnd() */
__shared_ptr * minja::Parser::parseLogicalAnd(void)
{
bool bVar1;
byte bVar2;
int iVar3;
runtime_error *prVar4;
int8 in_RSI;
__shared_ptr *in_RDI;
Location local_80 [16];
__shared_ptr local_70 [16];
string local_60 [32];
shared_ptr local_40 [47];
byte local_11;
local_11 = 0;
parseLogicalNot();
bVar1 = std::__shared_ptr::operator_cast_to_bool(in_RDI);
if (!bVar1) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019d751 to 0019d75c has its CatchHandler @ 0019d77c */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical and\' expression");
/* try { // try from 0019d75f to 0019d776 has its CatchHandler @ 0019d79f */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 0019d7d2 to 0019d7e9 has its CatchHandler @ 0019d8ca */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_);
}
}
/* try { // try from 0019d812 to 0019d820 has its CatchHandler @ 0019d79f */
get_location();
while( true ) {
/* try { // try from 0019d825 to 0019d877 has its CatchHandler @ 0019d8ef */
consumeToken(local_60,in_RSI,parseLogicalAnd()::and_tok_abi_cxx11_,1);
bVar2 = std::__cxx11::string::empty();
std::__cxx11::string::~string(local_60);
if (((bVar2 ^ 0xff) & 1) == 0) {
local_11 = 1;
Location::~Location((Location *)local_40);
if ((local_11 & 1) == 0) {
std::shared_ptr<minja::Expression>::~shared_ptr((shared_ptr<minja::Expression> *)in_RDI);
}
return in_RDI;
}
parseLogicalNot();
bVar1 = std::__shared_ptr::operator_cast_to_bool(local_70);
if (!bVar1) break;
/* try { // try from 0019d94a to 0019d962 has its CatchHandler @ 0019d927 */
std::
make_shared<minja::BinaryOpExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_80,local_40,(shared_ptr *)in_RDI,(Op *)local_70);
std::shared_ptr<minja::Expression>::operator=
((shared_ptr<minja::Expression> *)in_RDI,(shared_ptr *)local_80);
std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr((shared_ptr<minja::BinaryOpExpr> *)local_80);
std::shared_ptr<minja::Expression>::~shared_ptr((shared_ptr<minja::Expression> *)local_70);
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019d8a0 to 0019d8ab has its CatchHandler @ 0019d908 */
std::runtime_error::runtime_error(prVar4,"Expected right side of \'and\' expression");
/* try { // try from 0019d8ae to 0019d8c4 has its CatchHandler @ 0019d927 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
|
|
63,703 |
minja::Parser::parseLogicalAnd()
|
monkey531[P]llama/common/./minja.hpp
|
std::shared_ptr<Expression> parseLogicalAnd() {
auto left = parseLogicalNot();
if (!left) throw std::runtime_error("Expected left side of 'logical and' expression");
static std::regex and_tok(R"(and\b)");
auto location = get_location();
while (!consumeToken(and_tok).empty()) {
auto right = parseLogicalNot();
if (!right) throw std::runtime_error("Expected right side of 'and' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And);
}
return left;
}
|
O2
|
cpp
|
minja::Parser::parseLogicalAnd():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3a4a4
cmpq $0x0, (%rbx)
je 0x3a392
movb 0xa8b21(%rip), %al # 0xe2dc8
testb %al, %al
je 0x3a3c2
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2efae
leaq 0x28(%rsp), %rbp
leaq 0x48(%rsp), %r12
leaq 0xc(%rsp), %r13
movq %rbp, %rdi
movq %r14, %rsi
leaq 0xa8ad0(%rip), %rdx # 0xe2da8
pushq $0x1
popq %rcx
callq 0x2f3f2
movq 0x30(%rsp), %r15
movq %rbp, %rdi
callq 0x20d78
testq %r15, %r15
je 0x3a344
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3a4a4
cmpq $0x0, 0x28(%rsp)
je 0x3a360
movl $0xe, 0xc(%rsp)
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r13, %r8
callq 0x3a47d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x51f68
leaq 0x50(%rsp), %rdi
callq 0x2eeb2
leaq 0x30(%rsp), %rdi
callq 0x2eeb2
jmp 0x3a2cb
leaq 0x18(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %r15
leaq 0x5f9aa(%rip), %rsi # 0x99d1c
movq %rax, %rdi
callq 0x20280
movq 0xa7c67(%rip), %rsi # 0xe1fe8
movq 0xa7be8(%rip), %rdx # 0xe1f70
movq %r15, %rdi
callq 0x20b30
jmp 0x3a3c2
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %r15
leaq 0x5f943(%rip), %rsi # 0x99ce7
movq %rax, %rdi
callq 0x20280
movq 0xa7c35(%rip), %rsi # 0xe1fe8
movq 0xa7bb6(%rip), %rdx # 0xe1f70
movq %r15, %rdi
callq 0x20b30
leaq 0xa89ff(%rip), %rdi # 0xe2dc8
callq 0x20bf0
testl %eax, %eax
je 0x3a2af
leaq 0xa89cb(%rip), %rdi # 0xe2da8
leaq 0x5f932(%rip), %rsi # 0x99d16
pushq $0x10
popq %rdx
callq 0x2ef2e
leaq -0xb45f(%rip), %rdi # 0x2ef94
leaq 0xa89ae(%rip), %rsi # 0xe2da8
leaq 0xa82c7(%rip), %rdx # 0xe26c8
callq 0x205f0
leaq 0xa89bb(%rip), %rdi # 0xe2dc8
callq 0x20480
jmp 0x3a2af
movq %rax, %r14
leaq 0xa89a7(%rip), %rdi # 0xe2dc8
callq 0x20470
jmp 0x3a469
jmp 0x3a437
movq %rax, %r14
movq %r15, %rdi
callq 0x20520
jmp 0x3a469
movq %rax, %r14
jmp 0x3a469
jmp 0x3a44d
movq %rax, %r14
movq %r15, %rdi
callq 0x20520
jmp 0x3a450
jmp 0x3a45c
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x2eeb2
jmp 0x3a45f
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x2eeb2
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2eeb2
movq %r14, %rdi
callq 0x20b90
|
_ZN5minja6Parser15parseLogicalAndEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp qword ptr [rbx], 0
jz loc_3A392
mov al, cs:_ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok
test al, al
jz loc_3A3C2
loc_3A2AF:
lea rdi, [rsp+88h+var_78]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rbp, [rsp+88h+var_60]
lea r12, [rsp+88h+var_40]
lea r13, [rsp+88h+var_7C]
loc_3A2CB:
mov rdi, rbp
mov rsi, r14
lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
push 1
pop rcx
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov r15, [rsp+88h+var_58]
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_3A344
mov rdi, rbp; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+88h+var_60], 0
jz short loc_3A360
mov [rsp+88h+var_7C], 0Eh
mov rdi, r12
lea rsi, [rsp+88h+var_78]
mov rdx, rbx
mov rcx, rbp
mov r8, r13
call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
mov rdi, rbx
mov rsi, r12
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE
lea rdi, [rsp+88h+var_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_3A2CB
loc_3A344:
lea rdi, [rsp+88h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3A360:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_3A3C2
loc_3A392:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_3A3C2:
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_3A2AF
lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
lea rsi, aAndB; "and\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_3A2AF
mov r14, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_3A469
jmp short loc_3A437
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_3A469
loc_3A437:
mov r14, rax
jmp short loc_3A469
jmp short loc_3A44D
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_3A450
jmp short loc_3A45C
loc_3A44D:
mov r14, rax
loc_3A450:
lea rdi, [rsp+arg_28]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_3A45F
loc_3A45C:
mov r14, rax
loc_3A45F:
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_3A469:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, _QWORD *a2)
{
long long v2; // r15
std::runtime_error *v4; // r15
std::runtime_error *exception; // r15
int v6; // [rsp+Ch] [rbp-7Ch] BYREF
_BYTE v7[8]; // [rsp+10h] [rbp-78h] BYREF
long long v8; // [rsp+18h] [rbp-70h] BYREF
long long v9; // [rsp+28h] [rbp-60h] BYREF
_QWORD v10[3]; // [rsp+30h] [rbp-58h] BYREF
_BYTE v11[8]; // [rsp+48h] [rbp-40h] BYREF
_QWORD v12[7]; // [rsp+50h] [rbp-38h] BYREF
minja::Parser::parseLogicalNot(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
"and\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v7, a2);
while ( 1 )
{
minja::Parser::consumeToken(&v9, (long long)a2, (int)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u);
v2 = v10[0];
std::string::~string(&v9);
if ( !v2 )
break;
minja::Parser::parseLogicalNot((minja::Parser *)&v9);
if ( !v9 )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected right side of 'and' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = 14;
std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
v11,
v7,
this,
&v9,
&v6);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v8);
return this;
}
|
parseLogicalAnd:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RBX,RDI
CALL 0x0013a4a4
CMP qword ptr [RBX],0x0
JZ 0x0013a392
MOV AL,byte ptr [0x001e2dc8]
TEST AL,AL
JZ 0x0013a3c2
LAB_0013a2af:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0012efae
LEA RBP,[RSP + 0x28]
LEA R12,[RSP + 0x48]
LEA R13,[RSP + 0xc]
LAB_0013a2cb:
MOV RDI,RBP
MOV RSI,R14
LEA RDX,[0x1e2da8]
PUSH 0x1
POP RCX
CALL 0x0012f3f2
MOV R15,qword ptr [RSP + 0x30]
MOV RDI,RBP
CALL 0x00120d78
TEST R15,R15
JZ 0x0013a344
LAB_0013a2f2:
MOV RDI,RBP
MOV RSI,R14
CALL 0x0013a4a4
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0013a360
MOV dword ptr [RSP + 0xc],0xe
LAB_0013a30d:
MOV RDI,R12
LEA RSI,[RSP + 0x10]
MOV RDX,RBX
MOV RCX,RBP
MOV R8,R13
CALL 0x0013a47d
LAB_0013a323:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00151f68
LEA RDI,[RSP + 0x50]
CALL 0x0012eeb2
LEA RDI,[RSP + 0x30]
CALL 0x0012eeb2
JMP 0x0013a2cb
LAB_0013a344:
LEA RDI,[RSP + 0x18]
CALL 0x0012eeb2
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013a360:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV R15,RAX
LAB_0013a36b:
LEA RSI,[0x199d1c]
MOV RDI,RAX
CALL 0x00120280
LAB_0013a37a:
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,R15
CALL 0x00120b30
LAB_0013a392:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV R15,RAX
LAB_0013a39d:
LEA RSI,[0x199ce7]
MOV RDI,RAX
CALL 0x00120280
LAB_0013a3ac:
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,R15
CALL 0x00120b30
LAB_0013a3c2:
LEA RDI,[0x1e2dc8]
CALL 0x00120bf0
TEST EAX,EAX
JZ 0x0013a2af
LAB_0013a3d6:
LEA RDI,[0x1e2da8]
LEA RSI,[0x199d16]
PUSH 0x10
POP RDX
CALL 0x0012ef2e
LAB_0013a3ec:
LEA RDI,[0x12ef94]
LEA RSI,[0x1e2da8]
LEA RDX,[0x1e26c8]
CALL 0x001205f0
LEA RDI,[0x1e2dc8]
CALL 0x00120480
JMP 0x0013a2af
|
/* minja::Parser::parseLogicalAnd() */
void minja::Parser::parseLogicalAnd(void)
{
long lVar1;
int iVar2;
runtime_error *prVar3;
__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI;
shared_ptr local_78 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [16];
long local_60;
long local_58 [3];
Location local_40 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8];
parseLogicalNot();
if (*(long *)in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013a39d to 0013a3ab has its CatchHandler @ 0013a42a */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'logical and\' expression");
/* try { // try from 0013a3ac to 0013a3c1 has its CatchHandler @ 0013a428 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0013a3d6 to 0013a3eb has its CatchHandler @ 0013a417 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_);
}
}
/* try { // try from 0013a2af to 0013a2bb has its CatchHandler @ 0013a437 */
get_location();
while( true ) {
/* try { // try from 0013a2cb to 0013a2df has its CatchHandler @ 0013a45c */
consumeToken((string *)&local_60);
lVar1 = local_58[0];
std::__cxx11::string::~string((string *)&local_60);
if (lVar1 == 0) {
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70);
return;
}
/* try { // try from 0013a2f2 to 0013a2fc has its CatchHandler @ 0013a44b */
parseLogicalNot();
if (local_60 == 0) break;
/* try { // try from 0013a30d to 0013a322 has its CatchHandler @ 0013a44d */
std::
make_shared<minja::BinaryOpExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_40,local_78,(shared_ptr *)in_RDI,(Op *)&local_60);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
(in_RDI,(__shared_ptr *)local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_58);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013a36b to 0013a379 has its CatchHandler @ 0013a43e */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'and\' expression");
/* try { // try from 0013a37a to 0013a38f has its CatchHandler @ 0013a43c */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
|
|
63,704 |
minja::Parser::parseLogicalAnd()
|
monkey531[P]llama/common/./minja.hpp
|
std::shared_ptr<Expression> parseLogicalAnd() {
auto left = parseLogicalNot();
if (!left) throw std::runtime_error("Expected left side of 'logical and' expression");
static std::regex and_tok(R"(and\b)");
auto location = get_location();
while (!consumeToken(and_tok).empty()) {
auto right = parseLogicalNot();
if (!right) throw std::runtime_error("Expected right side of 'and' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And);
}
return left;
}
|
O3
|
cpp
|
minja::Parser::parseLogicalAnd():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3c936
cmpq $0x0, (%rbx)
je 0x3c83c
movb 0xb46c1(%rip), %al # 0xf0d98
testb %al, %al
je 0x3c86e
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x3c70a
movq 0xb38a4(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x3c706
incl 0x8(%rax)
jmp 0x3c70a
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq %rsp, %r13
leaq 0xb2273(%rip), %r12 # 0xee998
movq %r13, %rdi
movq %r14, %rsi
leaq 0xb4646(%rip), %rdx # 0xf0d78
movl $0x1, %ecx
callq 0x2fd6a
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3c75c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
testq %r15, %r15
je 0x3c7e7
movq %r13, %rdi
movq %r14, %rsi
callq 0x3c936
cmpq $0x0, (%rsp)
je 0x3c808
movl $0x58, %edi
callq 0x18690
movq %rax, %rbp
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%rbp)
movq %r12, (%rbp)
movq %rbp, %r15
addq $0x10, %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0xe, %r8d
callq 0x56e5a
movq %r15, (%rbx)
movq 0x8(%rbx), %rdi
movq %rbp, 0x8(%rbx)
testq %rdi, %rdi
je 0x3c7cf
callq 0x2f80e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3c725
callq 0x2f80e
jmp 0x3c725
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3c7f6
callq 0x2f80e
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %r15
leaq 0x7a378(%rip), %rsi # 0xb6b94
movq %rax, %rdi
callq 0x18270
movq 0xb37c5(%rip), %rsi # 0xefff0
movq 0xb374e(%rip), %rdx # 0xeff80
movq %r15, %rdi
callq 0x18b30
jmp 0x3c86e
movl $0x10, %edi
callq 0x18360
movq %rax, %r15
leaq 0x7a30f(%rip), %rsi # 0xb6b5f
movq %rax, %rdi
callq 0x18270
movq 0xb3791(%rip), %rsi # 0xefff0
movq 0xb371a(%rip), %rdx # 0xeff80
movq %r15, %rdi
callq 0x18b30
leaq 0xb4523(%rip), %rdi # 0xf0d98
callq 0x18be0
testl %eax, %eax
je 0x3c6df
leaq 0xb44ef(%rip), %rdi # 0xf0d78
leaq 0x7a2fe(%rip), %rsi # 0xb6b8e
movl $0x10, %edx
callq 0x2f87e
leaq -0xcfbb(%rip), %rdi # 0x2f8e6
leaq 0xb44d0(%rip), %rsi # 0xf0d78
leaq 0xb3de9(%rip), %rdx # 0xf0698
callq 0x185d0
leaq 0xb44dd(%rip), %rdi # 0xf0d98
callq 0x18450
jmp 0x3c6df
movq %rax, %r14
leaq 0xb44c9(%rip), %rdi # 0xf0d98
callq 0x18440
jmp 0x3c91f
movq %rax, %r14
jmp 0x3c91f
movq %rax, %r14
movq %r15, %rdi
callq 0x18500
jmp 0x3c91f
jmp 0x3c8f9
movq %rax, %r14
movq %r15, %rdi
callq 0x18500
jmp 0x3c8fc
jmp 0x3c90d
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3c910
callq 0x2f80e
jmp 0x3c910
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3c91f
callq 0x2f80e
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x3c92d
callq 0x2f80e
movq %r14, %rdi
callq 0x18b90
nop
|
_ZN5minja6Parser15parseLogicalAndEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp qword ptr [rbx], 0
jz loc_3C83C
mov al, cs:_ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok
test al, al
jz loc_3C86E
loc_3C6DF:
mov rax, [r14]
mov [rsp+68h+var_48], rax
mov rax, [r14+8]
mov [rsp+68h+var_40], rax
test rax, rax
jz short loc_3C70A
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_3C706
inc dword ptr [rax+8]
jmp short loc_3C70A
loc_3C706:
lock inc dword ptr [rax+8]
loc_3C70A:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea rcx, [rsp+68h+var_48]
mov [rcx+10h], rax
mov r13, rsp
lea r12, off_EE998
loc_3C725:
mov rdi, r13
mov rsi, r14
lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, [rsp+68h+var_68]; void *
mov r15, [rsp+68h+var_60]
lea rax, [rsp+68h+var_58]
cmp rdi, rax
jz short loc_3C75C
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C75C:
test r15, r15
jz loc_3C7E7
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+68h+var_68], 0
jz loc_3C808
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbp, rax
mov rax, 100000001h
mov [rbp+8], rax
mov [rbp+0], r12
mov r15, rbp
add r15, 10h
mov rdi, r15
lea rsi, [rsp+68h+var_48]
mov rdx, rbx
mov rcx, r13
mov r8d, 0Eh
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r15
mov rdi, [rbx+8]
mov [rbx+8], rbp
test rdi, rdi
jz short loc_3C7CF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3C7CF:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz loc_3C725
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_3C725
loc_3C7E7:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_3C7F6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3C7F6:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C808:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_3C86E
loc_3C83C:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_3C86E:
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_3C6DF
lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
lea rsi, aAndB; "and\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_3C6DF
mov r14, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_3C91F
mov r14, rax
jmp short loc_3C91F
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_3C91F
jmp short loc_3C8F9
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_3C8FC
jmp short loc_3C90D
loc_3C8F9:
mov r14, rax
loc_3C8FC:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_3C910
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_3C910
loc_3C90D:
mov r14, rax
loc_3C910:
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_3C91F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3C91F:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_3C92D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3C92D:
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalAnd(volatile signed __int32 **this, long long *a2)
{
volatile signed __int32 *v3; // rax
volatile signed __int32 *v4; // r15
volatile signed __int32 *v5; // rbp
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-68h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-60h]
long long v12; // [rsp+10h] [rbp-58h] BYREF
long long v13; // [rsp+20h] [rbp-48h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-40h]
long long v15; // [rsp+30h] [rbp-38h]
minja::Parser::parseLogicalNot((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
"and\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]);
}
v13 = *a2;
v3 = (volatile signed __int32 *)a2[1];
v14 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement(v3 + 2);
}
v15 = a2[4] - a2[2];
while ( 1 )
{
minja::Parser::consumeToken(
(long long)&v10,
(long long)a2,
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
1u);
v4 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( !v4 )
break;
minja::Parser::parseLogicalNot((minja::Parser *)&v10);
if ( !v10 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'and' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v5 = (volatile signed __int32 *)operator new(0x58uLL);
*((_QWORD *)v5 + 1) = 0x100000001LL;
*(_QWORD *)v5 = off_EE998;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 14LL);
*this = v5 + 4;
v6 = this[1];
this[1] = v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
}
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
return (minja::Parser *)this;
}
|
parseLogicalAnd:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
CALL 0x0013c936
CMP qword ptr [RBX],0x0
JZ 0x0013c83c
MOV AL,byte ptr [0x001f0d98]
TEST AL,AL
JZ 0x0013c86e
LAB_0013c6df:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x0013c70a
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x0013c706
INC dword ptr [RAX + 0x8]
JMP 0x0013c70a
LAB_0013c706:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0013c70a:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX + 0x10],RAX
MOV R13,RSP
LEA R12,[0x1ee998]
LAB_0013c725:
MOV RDI,R13
MOV RSI,R14
LEA RDX,[0x1f0d78]
MOV ECX,0x1
CALL 0x0012fd6a
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0013c75c
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001186a0
LAB_0013c75c:
TEST R15,R15
JZ 0x0013c7e7
LAB_0013c765:
MOV RDI,R13
MOV RSI,R14
CALL 0x0013c936
CMP qword ptr [RSP],0x0
JZ 0x0013c808
LAB_0013c77b:
MOV EDI,0x58
CALL 0x00118690
LAB_0013c785:
MOV RBP,RAX
MOV RAX,0x100000001
MOV qword ptr [RBP + 0x8],RAX
MOV qword ptr [RBP],R12
MOV R15,RBP
ADD R15,0x10
MOV RDI,R15
LEA RSI,[RSP + 0x20]
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0xe
CALL 0x00156e5a
MOV qword ptr [RBX],R15
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],RBP
TEST RDI,RDI
JZ 0x0013c7cf
CALL 0x0012f80e
LAB_0013c7cf:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0013c725
CALL 0x0012f80e
JMP 0x0013c725
LAB_0013c7e7:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0013c7f6
CALL 0x0012f80e
LAB_0013c7f6:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c808:
MOV EDI,0x10
CALL 0x00118360
MOV R15,RAX
LAB_0013c815:
LEA RSI,[0x1b6b94]
MOV RDI,RAX
CALL 0x00118270
LAB_0013c824:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R15
CALL 0x00118b30
LAB_0013c83c:
MOV EDI,0x10
CALL 0x00118360
MOV R15,RAX
LAB_0013c849:
LEA RSI,[0x1b6b5f]
MOV RDI,RAX
CALL 0x00118270
LAB_0013c858:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R15
CALL 0x00118b30
LAB_0013c86e:
LEA RDI,[0x1f0d98]
CALL 0x00118be0
TEST EAX,EAX
JZ 0x0013c6df
LAB_0013c882:
LEA RDI,[0x1f0d78]
LEA RSI,[0x1b6b8e]
MOV EDX,0x10
CALL 0x0012f87e
LAB_0013c89a:
LEA RDI,[0x12f8e6]
LEA RSI,[0x1f0d78]
LEA RDX,[0x1f0698]
CALL 0x001185d0
LEA RDI,[0x1f0d98]
CALL 0x00118450
JMP 0x0013c6df
|
/* minja::Parser::parseLogicalAnd() */
void minja::Parser::parseLogicalAnd(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
runtime_error *prVar4;
int8 *in_RSI;
long *in_RDI;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58 [2];
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
parseLogicalNot();
if (*in_RDI == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013c849 to 0013c857 has its CatchHandler @ 0013c8db */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical and\' expression");
/* try { // try from 0013c858 to 0013c86d has its CatchHandler @ 0013c8d6 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0013c882 to 0013c899 has its CatchHandler @ 0013c8c5 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_);
}
}
local_48 = *in_RSI;
local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
}
}
local_38 = in_RSI[4] - in_RSI[2];
while( true ) {
/* try { // try from 0013c725 to 0013c73b has its CatchHandler @ 0013c90d */
consumeToken(&local_68);
p_Var1 = local_60;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 0013c765 to 0013c76f has its CatchHandler @ 0013c8f7 */
parseLogicalNot();
if (local_68 == (long *)0x0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013c815 to 0013c823 has its CatchHandler @ 0013c8ea */
std::runtime_error::runtime_error(prVar4,"Expected right side of \'and\' expression");
/* try { // try from 0013c824 to 0013c839 has its CatchHandler @ 0013c8e8 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
/* try { // try from 0013c77b to 0013c784 has its CatchHandler @ 0013c8f9 */
puVar3 = (int8 *)operator_new(0x58);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_001ee998;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48);
*in_RDI = (long)(puVar3 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar3;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
return;
}
|
|
63,705 |
my_casedn_str_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->casedn_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
/*
In rare cases lower string can be shorter than
the original string, for example:
"U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE"
(which is 0xC4B0 in utf8mb3, i.e. two bytes)
is converted into
"U+0069 LATIN SMALL LETTER I"
(which is 0x69 in utf8mb3, i.e. one byte)
So, we need to put '\0' terminator after converting.
*/
*dst= '\0';
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_casedn_str_utf8mb3:
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 0x90326
movq 0x78(%rdi), %r13
leaq -0x30(%rbp), %r15
movq %rbx, %r12
movq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x90b14
testl %eax, %eax
je 0x90326
movq 0x8(%r13), %rdx
movq -0x30(%rbp), %rcx
movzbl %ch, %esi
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0x902b5
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rdx,%rcx,4), %ecx
movq %rcx, -0x30(%rbp)
movl $0x1, %edx
cmpq $0x80, %rcx
jb 0x9030f
movl $0x2, %edx
cmpq $0x800, %rcx # imm = 0x800
jb 0x902f6
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x90326
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%r14)
shrq $0x6, %rcx
orq $0x800, %rcx # imm = 0x800
movl $0x3, %edx
movl %ecx, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%r14)
shrq $0x6, %rcx
orq $0xc0, %rcx
movb %cl, (%r14)
movl %eax, %eax
addq %rdx, %r14
cmpb $0x0, (%r12,%rax)
leaq (%r12,%rax), %r12
jne 0x9027f
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_utf8mb3:
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 loc_90326
mov r13, [rdi+78h]
lea r15, [rbp+var_30]
mov r12, rbx
mov r14, rbx
loc_9027F:
mov rdi, r15
mov rsi, r12
call my_utf8mb3_uni_no_range
test eax, eax
jz loc_90326
mov rdx, [r13+8]
mov rcx, [rbp+var_30]
movzx esi, ch
mov rdx, [rdx+rsi*8]
test rdx, rdx
jz short loc_902B5
movzx ecx, cl
lea rcx, [rcx+rcx*2]
mov ecx, [rdx+rcx*4+4]
mov [rbp+var_30], rcx
loc_902B5:
mov edx, 1
cmp rcx, 80h
jb short loc_9030F
mov edx, 2
cmp rcx, 800h
jb short loc_902F6
cmp rcx, 0FFFFh
ja short loc_90326
mov edx, ecx
and dl, 3Fh
or dl, 80h
mov [r14+2], dl
shr rcx, 6
or rcx, 800h
mov edx, 3
loc_902F6:
mov esi, ecx
and sil, 3Fh
or sil, 80h
mov [r14+1], sil
shr rcx, 6
or rcx, 0C0h
loc_9030F:
mov [r14], cl
mov eax, eax
add r14, rdx
cmp byte ptr [r12+rax], 0
lea r12, [r12+rax]
jnz loc_9027F
loc_90326:
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_utf8mb3(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
_BYTE *v3; // r14
long long v4; // r13
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rdx
bool v10; // zf
unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF
v12 = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD *)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_utf8mb3_uni_no_range(&v12, v5);
if ( !v6 )
break;
v7 = v12;
v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12));
if ( v8 )
{
v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12 + 4);
v12 = v7;
}
v9 = 1LL;
if ( v7 >= 0x80 )
{
v9 = 2LL;
if ( v7 >= 0x800 )
{
if ( v7 > 0xFFFF )
break;
v3[2] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0x800;
v9 = 3LL;
}
v3[1] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0xC0;
}
*v3 = v7;
v3 += v9;
v10 = v5[v6] == 0;
v5 += v6;
}
while ( !v10 );
}
*v3 = 0;
return v3 - a2;
}
|
my_casedn_str_utf8mb3:
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 0x00190326
MOV R13,qword ptr [RDI + 0x78]
LEA R15,[RBP + -0x30]
MOV R12,RBX
MOV R14,RBX
LAB_0019027f:
MOV RDI,R15
MOV RSI,R12
CALL 0x00190b14
TEST EAX,EAX
JZ 0x00190326
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ESI,CH
MOV RDX,qword ptr [RDX + RSI*0x8]
TEST RDX,RDX
JZ 0x001902b5
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
MOV ECX,dword ptr [RDX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RCX
LAB_001902b5:
MOV EDX,0x1
CMP RCX,0x80
JC 0x0019030f
MOV EDX,0x2
CMP RCX,0x800
JC 0x001902f6
CMP RCX,0xffff
JA 0x00190326
MOV EDX,ECX
AND DL,0x3f
OR DL,0x80
MOV byte ptr [R14 + 0x2],DL
SHR RCX,0x6
OR RCX,0x800
MOV EDX,0x3
LAB_001902f6:
MOV ESI,ECX
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [R14 + 0x1],SIL
SHR RCX,0x6
OR RCX,0xc0
LAB_0019030f:
MOV byte ptr [R14],CL
MOV EAX,EAX
ADD R14,RDX
CMP byte ptr [R12 + RAX*0x1],0x0
LEA R12,[R12 + RAX*0x1]
JNZ 0x0019027f
LAB_00190326:
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_utf8mb3(long param_1,char *param_2)
{
char *pcVar1;
long lVar2;
uint uVar3;
ulong in_RAX;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
lVar2 = *(long *)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6);
if (uVar3 == 0) break;
lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar5 != 0) {
local_38 = (ulong)*(uint *)(lVar5 + 4 + (local_38 & 0xff) * 0xc);
}
lVar5 = 1;
uVar4 = local_38;
if (0x7f < local_38) {
lVar5 = 2;
if (0x7ff < local_38) {
if (0xffff < local_38) break;
pcVar7[2] = (byte)local_38 & 0x3f | 0x80;
uVar4 = local_38 >> 6 | 0x800;
lVar5 = 3;
}
pcVar7[1] = (byte)uVar4 & 0x3f | 0x80;
uVar4 = uVar4 >> 6 | 0xc0;
}
*pcVar7 = (char)uVar4;
pcVar7 = pcVar7 + lVar5;
pcVar1 = pcVar6 + uVar3;
pcVar6 = pcVar6 + uVar3;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
|
|
63,706 |
main
|
tinyCoroLab/examples/mutex.cpp
|
int main(int argc, char const* argv[])
{
/* code */
scheduler::init();
for (int i = 0; i < TASK_NUM; i++)
{
submit_to_scheduler(add_task(i));
}
scheduler::loop();
assert(data == 1000000);
return 0;
}
|
O0
|
cpp
|
main:
subq $0x28, %rsp
movl $0x0, 0x24(%rsp)
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
callq 0x93e0
movl %eax, %eax
movl %eax, %edi
callq 0xb370
movl $0x0, 0x14(%rsp)
cmpl $0x64, 0x14(%rsp)
jge 0x9c91
movl 0x14(%rsp), %esi
leaq 0x8(%rsp), %rdi
callq 0x9720
leaq 0x8(%rsp), %rdi
callq 0xb3a0
leaq 0x8(%rsp), %rdi
callq 0xb3b0
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x9c5b
callq 0xb410
xorl %eax, %eax
addq $0x28, %rsp
retq
nopl (%rax)
|
main:
sub rsp, 28h
mov [rsp+28h+var_4], 0
mov [rsp+28h+var_8], edi
mov [rsp+28h+var_10], rsi
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
mov eax, eax
mov edi, eax; this
call _ZN4coro9scheduler4initEm; coro::scheduler::init(ulong)
mov [rsp+28h+var_14], 0
loc_9C5B:
cmp [rsp+28h+var_14], 64h ; 'd'
jge short loc_9C91
mov esi, [rsp+28h+var_14]
lea rdi, [rsp+28h+var_20]; int
call _Z8add_taski; add_task(int)
lea rdi, [rsp+28h+var_20]
call _ZN4coro19submit_to_schedulerEONS_4taskIvEE; coro::submit_to_scheduler(coro::task<void> &&)
lea rdi, [rsp+28h+var_20]
call _ZN4coro4taskIvED2Ev; coro::task<void>::~task()
mov eax, [rsp+28h+var_14]
add eax, 1
mov [rsp+28h+var_14], eax
jmp short loc_9C5B
loc_9C91:
call _ZN4coro9scheduler4loopEv; coro::scheduler::loop(void)
xor eax, eax
add rsp, 28h
retn
|
// local variable allocation has failed, the output may be wrong!
int main(int argc, const char **argv, const char **envp)
{
int *v3; // rdi
int v5[3]; // [rsp+8h] [rbp-20h] BYREF
int i; // [rsp+14h] [rbp-14h]
const char **v7; // [rsp+18h] [rbp-10h]
int v8; // [rsp+20h] [rbp-8h]
int v9; // [rsp+24h] [rbp-4h]
v9 = 0;
v8 = argc;
v7 = argv;
v3 = (int *)(unsigned int)std::thread::hardware_concurrency(*(std::thread **)&argc);
coro::scheduler::init((coro::scheduler *)v3, (unsigned long long)argv);
for ( i = 0; i < 100; ++i )
{
add_task((long long)v5, (unsigned int)i);
coro::submit_to_scheduler(v5);
v3 = v5;
coro::task<void>::~task(v5);
}
coro::scheduler::loop((coro::scheduler *)v3);
return 0;
}
|
main:
SUB RSP,0x28
MOV dword ptr [RSP + 0x24],0x0
MOV dword ptr [RSP + 0x20],EDI
MOV qword ptr [RSP + 0x18],RSI
CALL 0x001093e0
MOV EAX,EAX
MOV EDI,EAX
CALL 0x0010b370
MOV dword ptr [RSP + 0x14],0x0
LAB_00109c5b:
CMP dword ptr [RSP + 0x14],0x64
JGE 0x00109c91
MOV ESI,dword ptr [RSP + 0x14]
LEA RDI,[RSP + 0x8]
CALL 0x00109720
LEA RDI,[RSP + 0x8]
CALL 0x0010b3a0
LEA RDI,[RSP + 0x8]
CALL 0x0010b3b0
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x00109c5b
LAB_00109c91:
CALL 0x0010b410
XOR EAX,EAX
ADD RSP,0x28
RET
|
int8 main(int4 param_1,int8 param_2)
{
uint uVar1;
task local_20 [12];
int local_14;
int8 local_10;
int4 local_8;
int4 local_4;
local_4 = 0;
local_10 = param_2;
local_8 = param_1;
uVar1 = std::thread::hardware_concurrency();
coro::scheduler::init((ulong)uVar1);
for (local_14 = 0; local_14 < 100; local_14 = local_14 + 1) {
add_task((int)local_20);
coro::submit_to_scheduler(local_20);
coro::task<void>::~task((task<void> *)local_20);
}
coro::scheduler::loop();
return 0;
}
|
|
63,707 |
nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
|
monkey531[P]llama/common/json.hpp
|
static std::string name(const std::string& ename, int id_)
{
return concat("[json.exception.", ename, '.', std::to_string(id_), "] ");
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r15d
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movb $0x2e, 0xf(%rsp)
movl %edx, %ebp
negl %ebp
cmovsl %edx, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x3e1b5
movl $0x4, %r12d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x3e1ac
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x3e1b2
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x3e1b5
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x3e179
addl $-0x3, %r12d
jmp 0x3e1b5
addl $-0x2, %r12d
jmp 0x3e1b5
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x187a0
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x2ac53
leaq 0x6d614(%rip), %rsi # 0xab804
leaq 0x75bc8(%rip), %r9 # 0xb3dbf
leaq 0xf(%rsp), %rcx
movq %rbx, %rdi
movq 0x10(%rsp), %rdx
movq %r13, %r8
callq 0x3e257
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x3e223
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x3e24f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
callq 0x18ba0
|
_ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15d, edx
mov [rsp+68h+var_58], rsi
mov rbx, rdi
mov [rsp+68h+var_59], 2Eh ; '.'
mov ebp, edx
neg ebp
cmovs ebp, edx
mov r12d, 1
cmp ebp, 0Ah
jb short loc_3E1B5
mov r12d, 4
mov eax, 0D1B71759h
mov ecx, ebp
loc_3E179:
cmp ecx, 63h ; 'c'
jbe short loc_3E1AC
cmp ecx, 3E7h
jbe short loc_3E1B2
cmp ecx, 2710h
jb short loc_3E1B5
mov edx, ecx
imul rdx, rax
shr rdx, 2Dh
add r12d, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_3E179
add r12d, 0FFFFFFFDh
jmp short loc_3E1B5
loc_3E1AC:
add r12d, 0FFFFFFFEh
jmp short loc_3E1B5
loc_3E1B2:
dec r12d
loc_3E1B5:
shr r15d, 1Fh
lea esi, [r12+r15]
lea r14, [rsp+68h+var_40]
mov [r14-10h], r14
lea r13, [rsp+68h+var_50]
mov rdi, r13
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r15, [r13+0]
mov rdi, r15
mov esi, r12d
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
lea rsi, aJsonException; "[json.exception."
lea r9, a19+8; "] "
lea rcx, [rsp+68h+var_59]
mov rdi, rbx
mov rdx, [rsp+68h+var_58]
mov r8, r13
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA17_KcRKS8_cS8_RA3_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>(char const(&)[17],std::string const&,char,std::string,char const(&)[3] &&)
mov rdi, [rsp+68h+var_50]; void *
cmp rdi, r14
jz short loc_3E223
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3E223:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r14
jz short loc_3E24F
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3E24F:
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::exception::name(long long a1, long long a2, int a3)
{
unsigned int v3; // ebp
int v4; // r12d
unsigned int v5; // ecx
bool v6; // cc
unsigned int v7; // r15d
char v9; // [rsp+Fh] [rbp-59h] BYREF
long long v10; // [rsp+10h] [rbp-58h]
void *v11[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v12[8]; // [rsp+28h] [rbp-40h] BYREF
v10 = a2;
v9 = 46;
v3 = -a3;
if ( a3 > 0 )
v3 = a3;
v4 = 1;
if ( v3 >= 0xA )
{
v4 = 4;
v5 = v3;
while ( 1 )
{
if ( v5 <= 0x63 )
{
v4 -= 2;
goto LABEL_12;
}
if ( v5 <= 0x3E7 )
break;
if ( v5 < 0x2710 )
goto LABEL_12;
v4 += 4;
v6 = v5 <= 0x1869F;
v5 /= 0x2710u;
if ( v6 )
{
v4 -= 3;
goto LABEL_12;
}
}
--v4;
}
LABEL_12:
v7 = (unsigned int)a3 >> 31;
v11[0] = v12;
std::string::_M_construct(v11, v4 + ((unsigned int)a3 >> 31), 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v11[0] + v7, v4, v3);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>(
a1,
(unsigned int)"[json.exception.",
v10,
(unsigned int)&v9,
(unsigned int)v11,
(unsigned int)"] ");
if ( v11[0] != v12 )
operator delete(v11[0], v12[0] + 1LL);
return a1;
}
|
name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15D,EDX
MOV qword ptr [RSP + 0x10],RSI
MOV RBX,RDI
MOV byte ptr [RSP + 0xf],0x2e
MOV EBP,EDX
NEG EBP
CMOVS EBP,EDX
MOV R12D,0x1
CMP EBP,0xa
JC 0x0013e1b5
MOV R12D,0x4
MOV EAX,0xd1b71759
MOV ECX,EBP
LAB_0013e179:
CMP ECX,0x63
JBE 0x0013e1ac
CMP ECX,0x3e7
JBE 0x0013e1b2
CMP ECX,0x2710
JC 0x0013e1b5
MOV EDX,ECX
IMUL RDX,RAX
SHR RDX,0x2d
ADD R12D,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x0013e179
ADD R12D,-0x3
JMP 0x0013e1b5
LAB_0013e1ac:
ADD R12D,-0x2
JMP 0x0013e1b5
LAB_0013e1b2:
DEC R12D
LAB_0013e1b5:
SHR R15D,0x1f
LEA ESI,[R12 + R15*0x1]
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x10],R14
LEA R13,[RSP + 0x18]
MOV RDI,R13
MOV EDX,0x2d
CALL 0x001187a0
ADD R15,qword ptr [R13]
MOV RDI,R15
MOV ESI,R12D
MOV EDX,EBP
CALL 0x0012ac53
LAB_0013e1e9:
LEA RSI,[0x1ab804]
LEA R9,[0x1b3dbf]
LEA RCX,[RSP + 0xf]
MOV RDI,RBX
MOV RDX,qword ptr [RSP + 0x10]
MOV R8,R13
CALL 0x0013e257
LAB_0013e20c:
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R14
JZ 0x0013e223
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x001186a0
LAB_0013e223:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::string const&, int) */
exception * __thiscall
nlohmann::json_abi_v3_11_3::detail::exception::name(exception *this,string *param_1,int param_2)
{
uint uVar1;
uint uVar2;
ulong uVar3;
uint uVar4;
uint uVar5;
char local_59;
string *local_58;
long *local_50 [2];
long local_40 [2];
local_59 = '.';
uVar4 = -param_2;
if (0 < param_2) {
uVar4 = param_2;
}
uVar5 = 1;
if (9 < uVar4) {
uVar3 = (ulong)uVar4;
uVar1 = 4;
do {
uVar5 = uVar1;
uVar2 = (uint)uVar3;
if (uVar2 < 100) {
uVar5 = uVar5 - 2;
goto LAB_0013e1b5;
}
if (uVar2 < 1000) {
uVar5 = uVar5 - 1;
goto LAB_0013e1b5;
}
if (uVar2 < 10000) goto LAB_0013e1b5;
uVar3 = uVar3 / 10000;
uVar1 = uVar5 + 4;
} while (99999 < uVar2);
uVar5 = uVar5 + 1;
}
LAB_0013e1b5:
local_58 = param_1;
local_50[0] = local_40;
std::__cxx11::string::_M_construct((ulong)local_50,(char)uVar5 - (char)(param_2 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((ulong)((uint)param_2 >> 0x1f) + (long)local_50[0]),uVar5,uVar4);
/* try { // try from 0013e1e9 to 0013e20b has its CatchHandler @ 0013e235 */
concat<std::__cxx11::string,char_const(&)[17],std::__cxx11::string_const&,char,std::__cxx11::string,char_const(&)[3]>
((detail *)this,"[json.exception.",local_58,&local_59,(string *)local_50,"] ");
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return this;
}
|
|
63,708 |
testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(char const*)
|
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
void TypeParameterizedTestSuiteRegistry::RegisterInstantiation(
const char* test_suite_name) {
auto it = suites_.find(std::string(test_suite_name));
if (it != suites_.end()) {
it->second.instantiated = true;
} else {
GTEST_LOG_(ERROR) << "Unknown type parameterized test suit '"
<< test_suite_name << "'";
}
}
|
O3
|
cpp
|
testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(char const*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x81e0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3a3ac
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19d2d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
addq $0x8, %r14
cmpq %r14, %r15
je 0x19d40
movb $0x1, 0x68(%r15)
jmp 0x19dd1
leaq 0x28a66(%rip), %rdx # 0x427ad
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x259, %ecx # imm = 0x259
callq 0x16b08
movq 0x3f286(%rip), %r14 # 0x58fe8
leaq 0x28bdf(%rip), %rsi # 0x42948
movl $0x26, %edx
movq %r14, %rdi
callq 0x85b0
testq %rbx, %rbx
je 0x19d97
movq %rbx, %rdi
callq 0x8200
movq 0x3f25e(%rip), %rdi # 0x58fe8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x85b0
jmp 0x19daf
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x8930
movq 0x3f232(%rip), %rdi # 0x58fe8
leaq 0x28bb0(%rip), %rsi # 0x4296d
movl $0x1, %edx
callq 0x85b0
leaq 0x10(%rsp), %rdi
callq 0x16c4a
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19e0d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x19e0d
movq %rax, %rbx
jmp 0x19e0d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x16c4a
movq %rbx, %rdi
callq 0x8990
nop
|
_ZN7testing8internal34TypeParameterizedTestSuiteRegistry21RegisterInstantiationEPKc:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
lea rsi, [rsp+48h+var_38]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7testing8internal34TypeParameterizedTestSuiteRegistry30TypeParameterizedTestSuiteInfoEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>,std::_Select1st<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>,std::less<std::string>,std::allocator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>::find(std::string const&)
mov r15, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_19D2D
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_19D2D:
add r14, 8
cmp r15, r14
jz short loc_19D40
mov byte ptr [r15+68h], 1
jmp loc_19DD1
loc_19D40:
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+48h+var_38]
mov esi, 2
mov ecx, 259h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov r14, cs:_ZSt4cerr_ptr
lea rsi, aUnknownTypePar; "Unknown type parameterized test suit '"
mov edx, 26h ; '&'
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test rbx, rbx
jz short loc_19D97
mov rdi, rbx
call _strlen
mov rdi, cs:_ZSt4cerr_ptr
mov rsi, rbx
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_19DAF
loc_19D97:
mov rax, [r14]
mov rax, [rax-18h]
lea rdi, [r14+rax]
mov esi, [r14+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_19DAF:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aUnknownTypePar+25h; "'"
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+48h+var_38]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_19DD1:
add rsp, 30h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_19E0D
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_19E0D
mov rbx, rax
jmp short loc_19E0D
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_19E0D:
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(
testing::internal::TypeParameterizedTestSuiteRegistry *this,
const char *a2)
{
_BYTE *v2; // r15
long long v3; // rax
long long v4; // rdx
long long v5; // rcx
char v6; // [rsp+Fh] [rbp-39h] BYREF
void *v7[2]; // [rsp+10h] [rbp-38h] BYREF
long long v8; // [rsp+20h] [rbp-28h] BYREF
std::string::basic_string(v7, a2, &v6);
v2 = (_BYTE *)std::_Rb_tree<std::string,std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>,std::_Select1st<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>,std::less<std::string>,std::allocator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>::find(
this,
v7);
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
if ( v2 == (char *)this + 8 )
{
testing::internal::GTestLog::GTestLog(
v7,
2,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc",
601);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Unknown type parameterized test suit '", 38LL);
if ( a2 )
{
v3 = strlen(a2);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a2, v3);
}
else
{
std::ios::clear(
(char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL),
*(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u);
}
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "'", 1LL);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v7, (long long)"'", v4, v5);
}
else
{
v2[104] = 1;
}
}
|
RegisterInstantiation:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
LAB_00119cf3:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x001081e0
LAB_00119d02:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x0013a3ac
LAB_00119d0f:
MOV R15,RAX
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00119d2d
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001084e0
LAB_00119d2d:
ADD R14,0x8
CMP R15,R14
JZ 0x00119d40
MOV byte ptr [R15 + 0x68],0x1
JMP 0x00119dd1
LAB_00119d40:
LEA RDX,[0x1427ad]
LEA RDI,[RSP + 0x10]
MOV ESI,0x2
MOV ECX,0x259
CALL 0x00116b08
LAB_00119d5b:
MOV R14,qword ptr [0x00158fe8]
LEA RSI,[0x142948]
MOV EDX,0x26
MOV RDI,R14
CALL 0x001085b0
TEST RBX,RBX
JZ 0x00119d97
MOV RDI,RBX
CALL 0x00108200
MOV RDI,qword ptr [0x00158fe8]
MOV RSI,RBX
MOV RDX,RAX
CALL 0x001085b0
JMP 0x00119daf
LAB_00119d97:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R14 + RAX*0x1]
MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x00108930
LAB_00119daf:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x14296d]
MOV EDX,0x1
CALL 0x001085b0
LAB_00119dc7:
LEA RDI,[RSP + 0x10]
CALL 0x00116c4a
LAB_00119dd1:
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(char const*) */
void __thiscall
testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation
(TypeParameterizedTestSuiteRegistry *this,char *param_1)
{
int *puVar1;
TypeParameterizedTestSuiteRegistry *pTVar2;
size_t sVar3;
allocator local_39;
long *local_38 [2];
long local_28 [2];
/* try { // try from 00119cf3 to 00119d01 has its CatchHandler @ 00119dfb */
std::__cxx11::string::string((string *)local_38,param_1,&local_39);
/* try { // try from 00119d02 to 00119d0e has its CatchHandler @ 00119ddb */
pTVar2 = (TypeParameterizedTestSuiteRegistry *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>,std::_Select1st<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>,std::_Select1st<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>
*)this,(string *)local_38);
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
if (pTVar2 == this + 8) {
GTestLog::GTestLog((GTestLog *)local_38,2,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc"
,0x259);
puVar1 = PTR_cerr_00158fe8;
/* try { // try from 00119d5b to 00119dc6 has its CatchHandler @ 00119e00 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"Unknown type parameterized test suit \'",0x26);
if (param_1 == (char *)0x0) {
std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18),
*(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1);
}
else {
sVar3 = strlen(param_1);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,param_1,sVar3)
;
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,"\'",1);
GTestLog::~GTestLog((GTestLog *)local_38);
}
else {
pTVar2[0x68] = (TypeParameterizedTestSuiteRegistry)0x1;
}
return;
}
|
|
63,709 |
my_strntoul_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static ulong
my_strntoul_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr + l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr= (char*)s;
err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int) wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr != NULL )
*endptr= (char*)s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr= (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (overflow)
{
err[0]= (ERANGE);
return (~(uint32) 0);
}
return (negative ? -((long) res) : (long) res);
}
|
O0
|
c
|
my_strntoul_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x69631
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0x6962d
movq -0x88(%rbp), %rax
leaq 0x158109(%rip), %rcx # 0x1c1714
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x6962f
jmp 0x6962f
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x6962f
jmp 0x6962f
jmp 0x69688
jmp 0x69669
cmpq $0x0, -0x30(%rbp)
je 0x69643
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x69851
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x695ca
jmp 0x69686
jmp 0x69688
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x69799
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0x69707
cmpq $0x39, -0x50(%rbp)
ja 0x69707
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0x69750
cmpq $0x41, -0x50(%rbp)
jb 0x69727
cmpq $0x5a, -0x50(%rbp)
ja 0x69727
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x6974e
cmpq $0x61, -0x50(%rbp)
jb 0x69747
cmpq $0x7a, -0x50(%rbp)
ja 0x69747
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x6974c
jmp 0x697d8
jmp 0x6974e
jmp 0x69750
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0x6975b
jmp 0x697d8
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0x69777
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0x69780
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x69780
movl $0x1, -0x40(%rbp)
jmp 0x69797
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0x697ca
cmpl $0x0, -0x44(%rbp)
jne 0x697c8
cmpq $0x0, -0x30(%rbp)
je 0x697b1
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x69851
jmp 0x697d8
jmp 0x697cc
movb $0x1, %al
testb $0x1, %al
jne 0x696b8
jmp 0x697d8
cmpq $0x0, -0x30(%rbp)
je 0x697ea
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0x69808
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x69851
cmpl $0x0, -0x40(%rbp)
je 0x69823
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x69851
cmpl $0x0, -0x3c(%rbp)
je 0x6983c
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x69846
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_strntoul_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_695CA:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_69631
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_69612; jumptable 0000000000069612 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_69612
movsxd rax, ds:(jpt_69612 - 1C1714h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_69614:
jmp short loc_6962F; jumptable 0000000000069612 case 32
loc_69616:
jmp short loc_6962F; jumptable 0000000000069612 case 9
loc_69618:
cmp [rbp+var_3C], 0; jumptable 0000000000069612 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_6962F
loc_6962B:
jmp short loc_6962F; jumptable 0000000000069612 case 43
def_69612:
jmp short loc_69688; jumptable 0000000000069612 default case, cases 10-31,33-42,44
loc_6962F:
jmp short loc_69669
loc_69631:
cmp [rbp+var_30], 0
jz short loc_69643
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_69643:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_69851
loc_69669:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_695CA
jmp short $+2
loc_69686:
jmp short $+2
loc_69688:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_696B8:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_69799
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_69707
cmp [rbp+var_50], 39h ; '9'
ja short loc_69707
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_69750
loc_69707:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_69727
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_69727
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_6974E
loc_69727:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_69747
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_69747
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_6974C
loc_69747:
jmp loc_697D8
loc_6974C:
jmp short $+2
loc_6974E:
jmp short $+2
loc_69750:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_6975B
jmp short loc_697D8
loc_6975B:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_69777
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_69780
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_69780
loc_69777:
mov [rbp+var_40], 1
jmp short loc_69797
loc_69780:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_69797:
jmp short loc_697CA
loc_69799:
cmp [rbp+var_44], 0
jnz short loc_697C8
cmp [rbp+var_30], 0
jz short loc_697B1
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_697B1:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_69851
loc_697C8:
jmp short loc_697D8
loc_697CA:
jmp short $+2
loc_697CC:
mov al, 1
test al, 1
jnz loc_696B8
jmp short $+2
loc_697D8:
cmp [rbp+var_30], 0
jz short loc_697EA
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_697EA:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_69808
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp short loc_69851
loc_69808:
cmp [rbp+var_40], 0
jz short loc_69823
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_69851
loc_69823:
cmp [rbp+var_3C], 0
jz short loc_6983C
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_69846
loc_6983C:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_69846:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_69851:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v9; // [rsp+10h] [rbp-80h]
long long v10; // [rsp+18h] [rbp-78h]
long long v11; // [rsp+20h] [rbp-70h]
unsigned int v12; // [rsp+2Ch] [rbp-64h]
unsigned int v13; // [rsp+30h] [rbp-60h]
unsigned int v14; // [rsp+34h] [rbp-5Ch]
long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v16; // [rsp+40h] [rbp-50h] BYREF
int v17; // [rsp+4Ch] [rbp-44h]
int v18; // [rsp+50h] [rbp-40h]
BOOL v19; // [rsp+54h] [rbp-3Ch]
int *v20; // [rsp+58h] [rbp-38h]
_QWORD *v21; // [rsp+60h] [rbp-30h]
unsigned int v22; // [rsp+6Ch] [rbp-24h]
long long v23; // [rsp+70h] [rbp-20h]
long long v24; // [rsp+78h] [rbp-18h]
long long v25; // [rsp+80h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v19 = 0;
v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = a2;
v10 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
{
if ( v21 )
*v21 = v11;
v6 = 33;
if ( !v17 )
v6 = 84;
*v20 = v6;
return 0LL;
}
else
{
switch ( v16 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v19 = !v19;
LABEL_10:
v11 += v17;
continue;
default:
v18 = 0;
v12 = 0;
v9 = v11;
v13 = 0xFFFFFFFF / v22;
v14 = 0xFFFFFFFF % v22;
break;
}
while ( 1 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
break;
v11 += v17;
if ( v16 < 0x30 || v16 > 0x39 )
{
if ( v16 < 0x41 || v16 > 0x5A )
{
if ( v16 < 0x61 || v16 > 0x7A )
goto LABEL_33;
v16 = v16 - 97 + 10;
}
else
{
v16 = v16 - 65 + 10;
}
}
else
{
v16 -= 48LL;
}
if ( (int)v16 >= (int)v22 )
goto LABEL_33;
if ( v12 > v13 || v12 == v13 && v16 > v14 )
v18 = 1;
else
v12 = v16 + v12 * v22;
}
if ( v17 )
{
LABEL_33:
if ( v21 )
*v21 = v11;
if ( v11 == v9 )
{
*v20 = 33;
return 0LL;
}
else if ( v18 )
{
*v20 = 34;
return 0xFFFFFFFFLL;
}
else if ( v19 )
{
return -(long long)v12;
}
else
{
return v12;
}
}
if ( v21 )
*v21 = v11;
*v20 = 84;
return 0LL;
}
}
}
|
my_strntoul_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_001695ca:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x00169631
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x24
JA 0x0016962d
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x2c1714]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_20:
JMP 0x0016962f
caseD_9:
JMP 0x0016962f
caseD_2d:
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0016962f
caseD_2b:
JMP 0x0016962f
caseD_a:
JMP 0x00169688
LAB_0016962f:
JMP 0x00169669
LAB_00169631:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00169643
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00169643:
MOV EDX,dword ptr [RBP + -0x44]
MOV ECX,0x21
MOV EAX,0x54
CMP EDX,0x0
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00169851
LAB_00169669:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV AL,0x1
TEST AL,0x1
JNZ 0x001695ca
JMP 0x00169686
LAB_00169686:
JMP 0x00169688
LAB_00169688:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x64],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EDX
LAB_001696b8:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x00169799
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x50],0x30
JC 0x00169707
CMP qword ptr [RBP + -0x50],0x39
JA 0x00169707
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x30
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00169750
LAB_00169707:
CMP qword ptr [RBP + -0x50],0x41
JC 0x00169727
CMP qword ptr [RBP + -0x50],0x5a
JA 0x00169727
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x41
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0016974e
LAB_00169727:
CMP qword ptr [RBP + -0x50],0x61
JC 0x00169747
CMP qword ptr [RBP + -0x50],0x7a
JA 0x00169747
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x61
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0016974c
LAB_00169747:
JMP 0x001697d8
LAB_0016974c:
JMP 0x0016974e
LAB_0016974e:
JMP 0x00169750
LAB_00169750:
MOV RAX,qword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x0016975b
JMP 0x001697d8
LAB_0016975b:
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JA 0x00169777
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JNZ 0x00169780
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x5c]
CMP RAX,RCX
JBE 0x00169780
LAB_00169777:
MOV dword ptr [RBP + -0x40],0x1
JMP 0x00169797
LAB_00169780:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x64],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x64]
ADD RAX,RCX
MOV dword ptr [RBP + -0x64],EAX
LAB_00169797:
JMP 0x001697ca
LAB_00169799:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001697c8
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001697b1
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001697b1:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x54
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00169851
LAB_001697c8:
JMP 0x001697d8
LAB_001697ca:
JMP 0x001697cc
LAB_001697cc:
MOV AL,0x1
TEST AL,0x1
JNZ 0x001696b8
JMP 0x001697d8
LAB_001697d8:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001697ea
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001697ea:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x80]
JNZ 0x00169808
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00169851
LAB_00169808:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x00169823
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00169851
LAB_00169823:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0016983c
MOV EAX,dword ptr [RBP + -0x64]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00169846
LAB_0016983c:
MOV EAX,dword ptr [RBP + -0x64]
MOV qword ptr [RBP + -0x90],RAX
LAB_00169846:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x8],RAX
LAB_00169851:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00169684) */
/* WARNING: Removing unreachable block (ram,0x001697d6) */
ulong my_strntoul_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
ulong uVar2;
long lVar3;
uint uVar4;
int4 uVar5;
ulong local_98;
long local_78;
uint local_6c;
ulong local_58;
int local_4c;
int local_48;
uint local_44;
int4 *local_40;
long *local_38;
uint local_2c;
long local_28;
long local_20;
long local_18;
ulong local_10;
local_44 = 0;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_6 = 0;
local_78 = param_2;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
lVar3 = local_78;
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
uVar5 = 0x21;
if (local_4c == 0) {
uVar5 = 0x54;
}
*local_40 = uVar5;
return 0;
}
switch(local_58) {
case 9:
break;
default:
local_48 = 0;
local_6c = 0;
uVar4 = (uint)(0xffffffff / (ulong)local_2c);
uVar2 = (ulong)local_2c;
goto LAB_001696b8;
case 0x20:
break;
case 0x2b:
break;
case 0x2d:
local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1);
}
local_78 = local_78 + local_4c;
} while( true );
LAB_001696b8:
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_4c == 0) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
*local_40 = 0x54;
local_10 = 0;
}
else {
LAB_001697d8:
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
if (local_78 == lVar3) {
*local_40 = 0x21;
local_10 = 0;
}
else if (local_48 == 0) {
if (local_44 == 0) {
local_98 = (ulong)local_6c;
}
else {
local_98 = -(ulong)local_6c;
}
local_10 = local_98;
}
else {
*local_40 = 0x22;
local_10 = 0xffffffff;
}
}
return local_10;
}
local_78 = local_78 + local_4c;
if ((local_58 < 0x30) || (0x39 < local_58)) {
if ((local_58 < 0x41) || (0x5a < local_58)) {
if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001697d8;
local_58 = local_58 - 0x57;
}
else {
local_58 = local_58 - 0x37;
}
}
else {
local_58 = local_58 - 0x30;
}
if ((int)local_2c <= (int)local_58) goto LAB_001697d8;
if ((uVar4 < local_6c) || ((local_6c == uVar4 && (0xffffffffU % uVar2 < local_58)))) {
local_48 = 1;
}
else {
local_6c = local_2c * local_6c + (int)local_58;
}
goto LAB_001696b8;
}
|
|
63,710 |
minja::Parser::parseLogicalAnd()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseLogicalAnd() {
auto left = parseLogicalNot();
if (!left) throw std::runtime_error("Expected left side of 'logical and' expression");
static std::regex and_tok(R"(and\b)");
auto location = get_location();
while (!consumeToken(and_tok).empty()) {
auto right = parseLogicalNot();
if (!right) throw std::runtime_error("Expected right side of 'and' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And);
}
return left;
}
|
O2
|
cpp
|
minja::Parser::parseLogicalAnd():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x6dc02
cmpq $0x0, (%rbx)
je 0x6daef
leaq 0x9f66e(%rip), %rax # 0x10d070
movb (%rax), %al
testb %al, %al
je 0x6db1f
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6bf10
leaq 0x28(%rsp), %rbp
leaq 0x48(%rsp), %r12
leaq 0xc(%rsp), %r13
movq %rbp, %rdi
movq %r14, %rsi
leaq 0x9f61b(%rip), %rdx # 0x10d050
pushq $0x1
popq %rcx
callq 0x6c334
movq 0x30(%rsp), %r15
movq %rbp, %rdi
callq 0x25298
testq %r15, %r15
je 0x6daa1
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6dc02
cmpq $0x0, 0x28(%rsp)
je 0x6dabd
movl $0xe, 0xc(%rsp)
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r13, %r8
callq 0x6dbda
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7cd18
leaq 0x50(%rsp), %rdi
callq 0x5b5b4
leaq 0x30(%rsp), %rdi
callq 0x5b5b4
jmp 0x6da28
leaq 0x18(%rsp), %rdi
callq 0x5b5b4
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %r15
leaq 0x5218f(%rip), %rsi # 0xbfc5e
movq %rax, %rdi
callq 0x24330
movq 0x9e512(%rip), %rsi # 0x10bff0
movq 0x9e473(%rip), %rdx # 0x10bf58
movq %r15, %rdi
callq 0x24f80
jmp 0x6db1f
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %r15
leaq 0x52128(%rip), %rsi # 0xbfc29
movq %rax, %rdi
callq 0x24330
movq 0x9e4e0(%rip), %rsi # 0x10bff0
movq 0x9e441(%rip), %rdx # 0x10bf58
movq %r15, %rdi
callq 0x24f80
leaq 0x9f54a(%rip), %rdi # 0x10d070
callq 0x25090
testl %eax, %eax
je 0x6da0c
leaq 0x9f516(%rip), %rdi # 0x10d050
leaq 0x52117(%rip), %rsi # 0xbfc58
pushq $0x10
popq %rdx
callq 0x52106
leaq -0x1b824(%rip), %rdi # 0x5232c
leaq 0x9f4f9(%rip), %rsi # 0x10d050
leaq 0x9edfa(%rip), %rdx # 0x10c958
callq 0x247e0
leaq 0x9f506(%rip), %rdi # 0x10d070
callq 0x245f0
jmp 0x6da0c
movq %rax, %r14
leaq 0x9f4f2(%rip), %rdi # 0x10d070
callq 0x245e0
jmp 0x6dbc6
jmp 0x6db94
movq %rax, %r14
movq %r15, %rdi
callq 0x246a0
jmp 0x6dbc6
movq %rax, %r14
jmp 0x6dbc6
jmp 0x6dbaa
movq %rax, %r14
movq %r15, %rdi
callq 0x246a0
jmp 0x6dbad
jmp 0x6dbb9
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x5b5b4
jmp 0x6dbbc
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5b5b4
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x5b5b4
movq %r14, %rdi
callq 0x25010
|
_ZN5minja6Parser15parseLogicalAndEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp qword ptr [rbx], 0
jz loc_6DAEF
lea rax, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok
mov al, [rax]
test al, al
jz loc_6DB1F
loc_6DA0C:
lea rdi, [rsp+88h+var_78]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rbp, [rsp+88h+var_60]
lea r12, [rsp+88h+var_40]
lea r13, [rsp+88h+var_7C]
loc_6DA28:
mov rdi, rbp
mov rsi, r14
lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
push 1
pop rcx
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov r15, [rsp+88h+var_58]
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_6DAA1
mov rdi, rbp; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+88h+var_60], 0
jz short loc_6DABD
mov [rsp+88h+var_7C], 0Eh
mov rdi, r12
lea rsi, [rsp+88h+var_78]
mov rdx, rbx
mov rcx, rbp
mov r8, r13
call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
mov rdi, rbx
mov rsi, r12
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE
lea rdi, [rsp+88h+var_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6DA28
loc_6DAA1:
lea rdi, [rsp+88h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6DABD:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression"
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_6DB1F
loc_6DAEF:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"...
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
loc_6DB1F:
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_6DA0C
lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
lea rsi, aAndB; "and\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_6DA0C
mov r14, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_6DBC6
jmp short loc_6DB94
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6DBC6
loc_6DB94:
mov r14, rax
jmp short loc_6DBC6
jmp short loc_6DBAA
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6DBAD
jmp short loc_6DBB9
loc_6DBAA:
mov r14, rax
loc_6DBAD:
lea rdi, [rsp+arg_28]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6DBBC
loc_6DBB9:
mov r14, rax
loc_6DBBC:
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_6DBC6:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, _QWORD *a2)
{
long long v2; // r15
std::runtime_error *v4; // r15
std::runtime_error *exception; // r15
int v6; // [rsp+Ch] [rbp-7Ch] BYREF
_BYTE v7[8]; // [rsp+10h] [rbp-78h] BYREF
long long v8; // [rsp+18h] [rbp-70h] BYREF
long long v9; // [rsp+28h] [rbp-60h] BYREF
_QWORD v10[3]; // [rsp+30h] [rbp-58h] BYREF
_BYTE v11[8]; // [rsp+48h] [rbp-40h] BYREF
_QWORD v12[7]; // [rsp+50h] [rbp-38h] BYREF
minja::Parser::parseLogicalNot(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
(long long)"and\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v7, a2);
while ( 1 )
{
minja::Parser::consumeToken(
&v9,
(long long)a2,
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
1u);
v2 = v10[0];
std::string::~string(&v9);
if ( !v2 )
break;
minja::Parser::parseLogicalNot((minja::Parser *)&v9);
if ( !v9 )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected right side of 'and' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = 14;
std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
v11,
v7,
this,
&v9,
&v6);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v8);
return this;
}
|
parseLogicalAnd:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RBX,RDI
CALL 0x0016dc02
CMP qword ptr [RBX],0x0
JZ 0x0016daef
LEA RAX,[0x20d070]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0016db1f
LAB_0016da0c:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0016bf10
LEA RBP,[RSP + 0x28]
LEA R12,[RSP + 0x48]
LEA R13,[RSP + 0xc]
LAB_0016da28:
MOV RDI,RBP
MOV RSI,R14
LEA RDX,[0x20d050]
PUSH 0x1
POP RCX
CALL 0x0016c334
MOV R15,qword ptr [RSP + 0x30]
MOV RDI,RBP
CALL 0x00125298
TEST R15,R15
JZ 0x0016daa1
LAB_0016da4f:
MOV RDI,RBP
MOV RSI,R14
CALL 0x0016dc02
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0016dabd
MOV dword ptr [RSP + 0xc],0xe
LAB_0016da6a:
MOV RDI,R12
LEA RSI,[RSP + 0x10]
MOV RDX,RBX
MOV RCX,RBP
MOV R8,R13
CALL 0x0016dbda
LAB_0016da80:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0017cd18
LEA RDI,[RSP + 0x50]
CALL 0x0015b5b4
LEA RDI,[RSP + 0x30]
CALL 0x0015b5b4
JMP 0x0016da28
LAB_0016daa1:
LEA RDI,[RSP + 0x18]
CALL 0x0015b5b4
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016dabd:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV R15,RAX
LAB_0016dac8:
LEA RSI,[0x1bfc5e]
MOV RDI,RAX
CALL 0x00124330
LAB_0016dad7:
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,R15
CALL 0x00124f80
LAB_0016daef:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV R15,RAX
LAB_0016dafa:
LEA RSI,[0x1bfc29]
MOV RDI,RAX
CALL 0x00124330
LAB_0016db09:
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,R15
CALL 0x00124f80
LAB_0016db1f:
LEA RDI,[0x20d070]
CALL 0x00125090
TEST EAX,EAX
JZ 0x0016da0c
LAB_0016db33:
LEA RDI,[0x20d050]
LEA RSI,[0x1bfc58]
PUSH 0x10
POP RDX
CALL 0x00152106
LAB_0016db49:
LEA RDI,[0x15232c]
LEA RSI,[0x20d050]
LEA RDX,[0x20c958]
CALL 0x001247e0
LEA RDI,[0x20d070]
CALL 0x001245f0
JMP 0x0016da0c
|
/* minja::Parser::parseLogicalAnd() */
void minja::Parser::parseLogicalAnd(void)
{
long lVar1;
int iVar2;
runtime_error *prVar3;
__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI;
shared_ptr local_78 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [16];
long local_60;
long local_58 [3];
Location local_40 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8];
parseLogicalNot();
if (*(long *)in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016dafa to 0016db08 has its CatchHandler @ 0016db87 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'logical and\' expression");
/* try { // try from 0016db09 to 0016db1e has its CatchHandler @ 0016db85 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0016db33 to 0016db48 has its CatchHandler @ 0016db74 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_);
}
}
/* try { // try from 0016da0c to 0016da18 has its CatchHandler @ 0016db94 */
get_location();
while( true ) {
/* try { // try from 0016da28 to 0016da3c has its CatchHandler @ 0016dbb9 */
consumeToken((string *)&local_60);
lVar1 = local_58[0];
std::__cxx11::string::~string((string *)&local_60);
if (lVar1 == 0) {
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70);
return;
}
/* try { // try from 0016da4f to 0016da59 has its CatchHandler @ 0016dba8 */
parseLogicalNot();
if (local_60 == 0) break;
/* try { // try from 0016da6a to 0016da7f has its CatchHandler @ 0016dbaa */
std::
make_shared<minja::BinaryOpExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_40,local_78,in_RDI,(Op *)&local_60);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
(in_RDI,(__shared_ptr *)local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_58);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016dac8 to 0016dad6 has its CatchHandler @ 0016db9b */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'and\' expression");
/* try { // try from 0016dad7 to 0016daec has its CatchHandler @ 0016db99 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
|
|
63,711 |
mysql_select_db
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int STDCALL
mysql_select_db(MYSQL *mysql, const char *db)
{
int error;
if (!db)
return 1;
if ((error=ma_simple_command(mysql, COM_INIT_DB, db,
(uint) strlen(db),0,0)))
return(error);
free(mysql->db);
mysql->db=strdup(db);
return(0);
}
|
O0
|
c
|
mysql_select_db:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4eb70
movl $0x1, -0x4(%rbp)
jmp 0x4ebe5
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38410
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl %eax, %eax
movl %eax, %ecx
movl $0x2, %esi
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x48a20
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x4ebb7
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4ebe5
movq -0x10(%rbp), %rax
movq 0x2e8(%rax), %rdi
callq 0x381b0
movq -0x18(%rbp), %rdi
callq 0x38030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x2e8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
|
mysql_select_db:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0
jnz short loc_4EB70
mov [rbp+var_4], 1
jmp short loc_4EBE5
loc_4EB70:
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
call _strlen
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_28]
mov eax, eax
mov ecx, eax
mov esi, 2
xor r8d, r8d
xor eax, eax
mov r9d, eax
call ma_simple_command
mov [rbp+var_1C], eax
cmp eax, 0
jz short loc_4EBB7
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp short loc_4EBE5
loc_4EBB7:
mov rax, [rbp+var_10]
mov rdi, [rax+2E8h]
call _free
mov rdi, [rbp+var_18]
call _strdup
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+2E8h], rcx
mov [rbp+var_4], 0
loc_4EBE5:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mysql_select_db(long long a1, long long a2)
{
unsigned int v2; // eax
unsigned int v4; // [rsp+14h] [rbp-1Ch]
if ( a2 )
{
v2 = strlen(a2);
v4 = ma_simple_command(a1, 2u, a2, v2, 0, 0LL);
if ( v4 )
{
return v4;
}
else
{
free(*(_QWORD *)(a1 + 744));
*(_QWORD *)(a1 + 744) = strdup(a2);
return 0;
}
}
else
{
return 1;
}
}
|
mysql_select_db:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0014eb70
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014ebe5
LAB_0014eb70:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00138410
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x28]
MOV EAX,EAX
MOV ECX,EAX
MOV ESI,0x2
XOR R8D,R8D
XOR EAX,EAX
MOV R9D,EAX
CALL 0x00148a20
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JZ 0x0014ebb7
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014ebe5
LAB_0014ebb7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x2e8]
CALL 0x001381b0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00138030
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x2e8],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_0014ebe5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int mysql_select_db(long param_1,char *param_2)
{
size_t sVar1;
char *pcVar2;
int4 local_c;
if (param_2 == (char *)0x0) {
local_c = 1;
}
else {
sVar1 = strlen(param_2);
local_c = ma_simple_command(param_1,2,param_2,sVar1 & 0xffffffff,0,0);
if (local_c == 0) {
free(*(void **)(param_1 + 0x2e8));
pcVar2 = strdup(param_2);
*(char **)(param_1 + 0x2e8) = pcVar2;
local_c = 0;
}
}
return local_c;
}
|
|
63,712 |
mysql_select_db
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
int STDCALL
mysql_select_db(MYSQL *mysql, const char *db)
{
int error;
if (!db)
return 1;
if ((error=ma_simple_command(mysql, COM_INIT_DB, db,
(uint) strlen(db),0,0)))
return(error);
free(mysql->db);
mysql->db=strdup(db);
return(0);
}
|
O3
|
c
|
mysql_select_db:
testq %rsi, %rsi
je 0x48674
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x37410
movl %eax, %ecx
movq 0x4d0(%rbx), %rax
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *0x10(%rax)
testl %eax, %eax
jne 0x4866f
movq 0x2e8(%rbx), %rdi
callq 0x37190
movq %r14, %rdi
callq 0x37030
movq %rax, 0x2e8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %eax
retq
|
mysql_select_db:
test rsi, rsi
jz short loc_48674
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
mov ecx, eax
mov rax, [rbx+4D0h]
mov rdi, rbx
mov esi, 2
mov rdx, r14
xor r8d, r8d
xor r9d, r9d
call qword ptr [rax+10h]
test eax, eax
jnz short loc_4866F
mov rdi, [rbx+2E8h]
call _free
mov rdi, r14
call _strdup
mov [rbx+2E8h], rax
xor eax, eax
loc_4866F:
pop rbx
pop r14
pop rbp
retn
loc_48674:
mov eax, 1
retn
|
long long mysql_select_db(long long a1, long long a2)
{
unsigned int v2; // eax
long long result; // rax
if ( !a2 )
return 1LL;
v2 = strlen(a2);
result = (*(long long ( **)(long long, long long, long long, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 1232) + 16LL))(
a1,
2LL,
a2,
v2,
0LL,
0LL);
if ( !(_DWORD)result )
{
free(*(_QWORD *)(a1 + 744));
*(_QWORD *)(a1 + 744) = strdup(a2);
return 0LL;
}
return result;
}
|
mysql_select_db:
TEST RSI,RSI
JZ 0x00148674
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00137410
MOV ECX,EAX
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RDI,RBX
MOV ESI,0x2
MOV RDX,R14
XOR R8D,R8D
XOR R9D,R9D
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JNZ 0x0014866f
MOV RDI,qword ptr [RBX + 0x2e8]
CALL 0x00137190
MOV RDI,R14
CALL 0x00137030
MOV qword ptr [RBX + 0x2e8],RAX
XOR EAX,EAX
LAB_0014866f:
POP RBX
POP R14
POP RBP
RET
LAB_00148674:
MOV EAX,0x1
RET
|
int8 mysql_select_db(long param_1,char *param_2)
{
size_t sVar1;
int8 uVar2;
char *pcVar3;
if (param_2 != (char *)0x0) {
sVar1 = strlen(param_2);
uVar2 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x10))
(param_1,2,param_2,sVar1 & 0xffffffff,0,0);
if ((int)uVar2 == 0) {
free(*(void **)(param_1 + 0x2e8));
pcVar3 = strdup(param_2);
*(char **)(param_1 + 0x2e8) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
return 1;
}
|
|
63,713 |
WrapSafeFNMatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
ng-log[P]ng-log/src/logging_unittest.cc
|
static bool WrapSafeFNMatch(string pattern, string str) {
pattern += "abc";
str += "defgh";
return SafeFNMatch_(pattern.data(), pattern.size() - 3, str.data(),
str.size() - 5);
}
|
O1
|
cpp
|
WrapSafeFNMatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1f1db(%rip), %rsi # 0x3272d
callq 0x8c50
leaq 0x20e46(%rip), %rsi # 0x343a4
movq %rbx, %rdi
callq 0x8c50
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq $-0x3, %rsi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
addq $-0x5, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x31754
|
_ZL15WrapSafeFNMatchNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rsi, aAbc; "abc"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rsi, aDefgh; "defgh"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rdi, [r14]; this
mov rsi, [r14+8]
add rsi, 0FFFFFFFFFFFFFFFDh; char *
mov rdx, [rbx]; unsigned __int64
mov rcx, [rbx+8]
add rcx, 0FFFFFFFFFFFFFFFBh; char *
add rsp, 8
pop rbx
pop r14
jmp _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
|
long long WrapSafeFNMatch(long long a1, unsigned long long *a2)
{
unsigned long long v2; // r8
std::string::append(a1, "abc");
std::string::append(a2, "defgh");
return nglog::tools::SafeFNMatch_(
*(nglog::tools **)a1,
(const char *)(*(_QWORD *)(a1 + 8) - 3LL),
*a2,
(const char *)(a2[1] - 5),
v2);
}
|
WrapSafeFNMatch:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RSI,[0x13272d]
CALL 0x00108c50
LEA RSI,[0x1343a4]
MOV RDI,RBX
CALL 0x00108c50
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
ADD RSI,-0x3
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
ADD RCX,-0x5
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00131754
|
/* WrapSafeFNMatch(std::__cxx11::string, std::__cxx11::string) */
void WrapSafeFNMatch(char *param_1,char *param_2)
{
std::__cxx11::string::append(param_1);
std::__cxx11::string::append(param_2);
nglog::tools::SafeFNMatch_
(*(char **)param_1,*(long *)(param_1 + 8) - 3,*(char **)param_2,
*(long *)(param_2 + 8) - 5);
return;
}
|
|
63,714 |
WrapSafeFNMatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
ng-log[P]ng-log/src/logging_unittest.cc
|
static bool WrapSafeFNMatch(string pattern, string str) {
pattern += "abc";
str += "defgh";
return SafeFNMatch_(pattern.data(), pattern.size() - 3, str.data(),
str.size() - 5);
}
|
O3
|
cpp
|
WrapSafeFNMatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1ed1b(%rip), %rsi # 0x3172d
callq 0x8c50
leaq 0x20986(%rip), %rsi # 0x333a4
movq %rbx, %rdi
callq 0x8c50
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq $-0x3, %rsi
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
addq $-0x5, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x30684
|
_ZL15WrapSafeFNMatchNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rsi, aAbc; "abc"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rsi, aDefgh; "defgh"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rdi, [r14]; this
mov rsi, [r14+8]
add rsi, 0FFFFFFFFFFFFFFFDh; char *
mov rdx, [rbx]; unsigned __int64
mov rcx, [rbx+8]
add rcx, 0FFFFFFFFFFFFFFFBh; char *
add rsp, 8
pop rbx
pop r14
jmp _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
|
long long WrapSafeFNMatch(long long a1, unsigned long long *a2)
{
unsigned long long v2; // r8
std::string::append(a1, "abc");
std::string::append(a2, "defgh");
return nglog::tools::SafeFNMatch_(
*(nglog::tools **)a1,
(const char *)(*(_QWORD *)(a1 + 8) - 3LL),
*a2,
(const char *)(a2[1] - 5),
v2);
}
|
WrapSafeFNMatch:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RSI,[0x13172d]
CALL 0x00108c50
LEA RSI,[0x1333a4]
MOV RDI,RBX
CALL 0x00108c50
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
ADD RSI,-0x3
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
ADD RCX,-0x5
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00130684
|
/* WrapSafeFNMatch(std::__cxx11::string, std::__cxx11::string) */
void WrapSafeFNMatch(char *param_1,char *param_2)
{
std::__cxx11::string::append(param_1);
std::__cxx11::string::append(param_2);
nglog::tools::SafeFNMatch_
(*(char **)param_1,*(long *)(param_1 + 8) - 3,*(char **)param_2,
*(long *)(param_2 + 8) - 5);
return;
}
|
|
63,715 |
ma_invalidate_stmts
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void ma_invalidate_stmts(MYSQL *mysql, const char *function_name)
{
if (mysql->stmts)
{
LIST *li_stmt= mysql->stmts;
for (; li_stmt; li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
stmt->mysql= NULL;
SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, function_name);
}
mysql->stmts= NULL;
}
}
|
O3
|
c
|
ma_invalidate_stmts:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x4c8(%rdi), %r12
testq %r12, %r12
je 0x1db16
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq 0x312f6(%rip), %rax # 0x4ed90
movq (%rax), %r15
leaq 0x312fc(%rip), %r13 # 0x4eda0
movq 0x10(%r12), %rbx
movq $0x0, 0x38(%rbx)
movl $0x808, 0x108(%rbx) # imm = 0x808
leaq 0x30d(%rbx), %rdi
movl $0x5, %edx
movq %r15, %rsi
callq 0x13220
movb $0x0, 0x312(%rbx)
movq %r14, %rsi
testq %r14, %r14
jne 0x1dae5
movq 0x1c0(%r13), %rsi
leaq 0x10c(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb $0x0, 0x30b(%rbx)
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1daa4
movq -0x30(%rbp), %rax
movq $0x0, 0x4c8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_invalidate_stmts:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, [rdi+4C8h]
test r12, r12
jz loc_1DB16
mov r14, rsi
mov [rbp+var_30], rdi
lea rax, SQLSTATE_UNKNOWN
mov r15, [rax]
lea r13, client_errors
loc_1DAA4:
mov rbx, [r12+10h]
mov qword ptr [rbx+38h], 0
mov dword ptr [rbx+108h], 808h
lea rdi, [rbx+30Dh]
mov edx, 5
mov rsi, r15
call _strncpy
mov byte ptr [rbx+312h], 0
mov rsi, r14
test r14, r14
jnz short loc_1DAE5
mov rsi, [r13+1C0h]
loc_1DAE5:
lea rdi, [rbx+10Ch]
mov edx, 200h
call _strncpy
mov byte ptr [rbx+30Bh], 0
mov r12, [r12+8]
test r12, r12
jnz short loc_1DAA4
mov rax, [rbp+var_30]
mov qword ptr [rax+4C8h], 0
loc_1DB16:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_invalidate_stmts(long long a1, char *a2)
{
long long v2; // r12
char *v4; // r15
long long v5; // rbx
char *v6; // rsi
long long result; // rax
v2 = *(_QWORD *)(a1 + 1224);
if ( v2 )
{
v4 = SQLSTATE_UNKNOWN;
do
{
v5 = *(_QWORD *)(v2 + 16);
*(_QWORD *)(v5 + 56) = 0LL;
*(_DWORD *)(v5 + 264) = 2056;
strncpy(v5 + 781, v4, 5LL);
*(_BYTE *)(v5 + 786) = 0;
v6 = a2;
if ( !a2 )
v6 = client_errors[56];
strncpy(v5 + 268, v6, 512LL);
*(_BYTE *)(v5 + 779) = 0;
v2 = *(_QWORD *)(v2 + 8);
}
while ( v2 );
result = a1;
*(_QWORD *)(a1 + 1224) = 0LL;
}
return result;
}
|
ma_invalidate_stmts:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,qword ptr [RDI + 0x4c8]
TEST R12,R12
JZ 0x0011db16
MOV R14,RSI
MOV qword ptr [RBP + -0x30],RDI
LEA RAX,[0x14ed90]
MOV R15,qword ptr [RAX]
LEA R13,[0x14eda0]
LAB_0011daa4:
MOV RBX,qword ptr [R12 + 0x10]
MOV qword ptr [RBX + 0x38],0x0
MOV dword ptr [RBX + 0x108],0x808
LEA RDI,[RBX + 0x30d]
MOV EDX,0x5
MOV RSI,R15
CALL 0x00113220
MOV byte ptr [RBX + 0x312],0x0
MOV RSI,R14
TEST R14,R14
JNZ 0x0011dae5
MOV RSI,qword ptr [R13 + 0x1c0]
LAB_0011dae5:
LEA RDI,[RBX + 0x10c]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],0x0
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x0011daa4
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x4c8],0x0
LAB_0011db16:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ma_invalidate_stmts(long param_1,char *param_2)
{
long lVar1;
int *__src;
char *__src_00;
long lVar2;
__src = SQLSTATE_UNKNOWN;
lVar2 = *(long *)(param_1 + 0x4c8);
if (lVar2 != 0) {
do {
lVar1 = *(long *)(lVar2 + 0x10);
*(int8 *)(lVar1 + 0x38) = 0;
*(int4 *)(lVar1 + 0x108) = 0x808;
strncpy((char *)(lVar1 + 0x30d),__src,5);
*(int1 *)(lVar1 + 0x312) = 0;
__src_00 = param_2;
if (param_2 == (char *)0x0) {
__src_00 = PTR_s_Server_closed_statement_due_to_a_0014ef60;
}
strncpy((char *)(lVar1 + 0x10c),__src_00,0x200);
*(int1 *)(lVar1 + 0x30b) = 0;
lVar2 = *(long *)(lVar2 + 8);
} while (lVar2 != 0);
*(int8 *)(param_1 + 0x4c8) = 0;
}
return;
}
|
|
63,716 |
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*)
|
eloqsql/mysys/lf_hash.cc
|
static int initialize_bucket(LF_HASH *hash, LF_SLIST **node,
uint bucket, LF_PINS *pins)
{
uint parent= my_clear_highest_bit(bucket);
LF_SLIST *dummy= (LF_SLIST *)my_malloc(key_memory_lf_slist,
sizeof(LF_SLIST), MYF(MY_WME));
LF_SLIST **tmp= 0, *cur;
LF_SLIST **el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, parent);
if (unlikely(!el || !dummy))
return -1;
if (*el == NULL && bucket &&
unlikely(initialize_bucket(hash, el, parent, pins)))
{
my_free(dummy);
return -1;
}
dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */
dummy->key= dummy_key;
dummy->keylen= 0;
if ((cur= l_insert(el, hash->charset, dummy, pins, LF_HASH_UNIQUE)))
{
my_free(dummy);
dummy= cur;
}
my_atomic_casptr((void **)node, (void **)(char*) &tmp, dummy);
/*
note that if the CAS above failed (after l_insert() succeeded),
it would mean that some other thread has executed l_insert() for
the same dummy node, its l_insert() failed, it picked up our
dummy node (in "dummy= cur") and executed the same CAS as above.
Which means that even if CAS above failed we don't need to retry,
and we should not free(dummy) - there's no memory leak here
*/
return 0;
}
|
O3
|
cpp
|
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x40(%rbp)
movl %edx, %r12d
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
movl %edx, %eax
shrl %eax
movl %edx, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %r15d
shrl $0x10, %r15d
orl %eax, %r15d
andl %edx, %r15d
leaq 0xbe2179(%rip), %rax # 0xc12b34
movl (%rax), %edi
pushq $0x20
popq %rsi
pushq $0x10
popq %rdx
callq 0xa7081
movq %rax, %r13
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3065a
pushq $-0x1
popq %r14
testq %rax, %rax
je 0x30a9a
testq %r13, %r13
je 0x30a9a
movq %rax, %rbx
testl %r12d, %r12d
je 0x30a02
cmpq $0x0, (%rbx)
je 0x30aac
movl $0xff, %eax
movl %r12d, %ecx
andl %eax, %ecx
leaq 0xba64d(%rip), %rdx # 0xeb060
movzbl (%rdx,%rcx), %ecx
shll $0x18, %ecx
movl %r12d, %esi
shrl $0x8, %esi
andl %eax, %esi
movzbl (%rdx,%rsi), %esi
shll $0x10, %esi
orl %ecx, %esi
movl %r12d, %ecx
shrl $0x10, %ecx
andl %eax, %ecx
movzbl (%rdx,%rcx), %eax
shll $0x8, %eax
orl %esi, %eax
shrl $0x18, %r12d
movzbl (%rdx,%r12), %ecx
orl %eax, %ecx
movl %ecx, 0x18(%r13)
leaq 0xb0b23(%rip), %rax # 0xe1575
movq %rax, 0x8(%r13)
andq $0x0, 0x10(%r13)
movq -0x38(%rbp), %rax
movq 0xa8(%rax), %rsi
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r13, %rdx
movq -0x40(%rbp), %rcx
callq 0xad76d
testq %rax, %rax
je 0x30a8c
movq %rax, %rbx
movq %r13, %rdi
callq 0xa72ae
movq %rbx, %r13
movq -0x30(%rbp), %rcx
xorl %r14d, %r14d
xorl %eax, %eax
lock
cmpxchgq %r13, (%rcx)
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
movq -0x40(%rbp), %rcx
callq 0x30968
testl %eax, %eax
je 0x30a02
movq %r13, %rdi
callq 0xa72ae
jmp 0x30a9a
|
_ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], rcx
mov r12d, edx
mov [rbp+var_30], rsi
mov rbx, rdi
mov eax, edx
shr eax, 1
mov ecx, edx
shr ecx, 2
or ecx, eax
mov eax, ecx
shr eax, 2
or eax, ecx
mov ecx, eax
shr ecx, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or eax, ecx
mov r15d, eax
shr r15d, 10h
or r15d, eax
and r15d, edx
lea rax, key_memory_lf_slist
mov edi, [rax]
push 20h ; ' '
pop rsi
push 10h
pop rdx
call my_malloc
mov r13, rax
mov [rbp+var_38], rbx
mov rdi, rbx
mov esi, r15d
call lf_dynarray_lvalue
push 0FFFFFFFFFFFFFFFFh
pop r14
test rax, rax
jz loc_30A9A
test r13, r13
jz loc_30A9A
mov rbx, rax
test r12d, r12d
jz short loc_30A02
cmp qword ptr [rbx], 0
jz loc_30AAC
loc_30A02:
mov eax, 0FFh
mov ecx, r12d
and ecx, eax
lea rdx, _my_bits_reverse_table
movzx ecx, byte ptr [rdx+rcx]
shl ecx, 18h
mov esi, r12d
shr esi, 8
and esi, eax
movzx esi, byte ptr [rdx+rsi]
shl esi, 10h
or esi, ecx
mov ecx, r12d
shr ecx, 10h
and ecx, eax
movzx eax, byte ptr [rdx+rcx]
shl eax, 8
or eax, esi
shr r12d, 18h
movzx ecx, byte ptr [rdx+r12]
or ecx, eax
mov [r13+18h], ecx
lea rax, aUsageSOptions+15h; ""
mov [r13+8], rax
and qword ptr [r13+10h], 0
mov rax, [rbp+var_38]
mov rsi, [rax+0A8h]
push 1
pop r8
mov rdi, rbx
mov rdx, r13
mov rcx, [rbp+var_40]
call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint)
test rax, rax
jz short loc_30A8C
mov rbx, rax
mov rdi, r13
call my_free
mov r13, rbx
loc_30A8C:
mov rcx, [rbp+var_30]
xor r14d, r14d
xor eax, eax
lock cmpxchg [rcx], r13
loc_30A9A:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_30AAC:
mov rdi, [rbp+var_38]
mov rsi, rbx
mov edx, r15d
mov rcx, [rbp+var_40]
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
test eax, eax
jz loc_30A02
mov rdi, r13
call my_free
jmp short loc_30A9A
|
long long initialize_bucket(long long a1, volatile signed long long *a2, unsigned int a3, long long a4)
{
unsigned int v5; // ecx
unsigned int v6; // r15d
signed long long v7; // r13
_QWORD *v8; // rax
unsigned int v9; // r14d
_QWORD *v10; // rbx
long long v11; // rax
signed long long v12; // rbx
v5 = (a3 >> 1) | (a3 >> 2) | (((a3 >> 1) | (a3 >> 2)) >> 2) | (((a3 >> 1) | (a3 >> 2) | (((a3 >> 1) | (a3 >> 2)) >> 2)) >> 4);
v6 = a3 & (v5 | (v5 >> 8) | ((v5 | (v5 >> 8)) >> 16));
v7 = my_malloc(key_memory_lf_slist, 32LL, 16LL);
v8 = (_QWORD *)lf_dynarray_lvalue(a1, v6);
v9 = -1;
if ( v8 && v7 )
{
v10 = v8;
if ( a3 && !*v8 && (unsigned int)initialize_bucket(a1, v8, v6, a4) )
{
my_free(v7);
}
else
{
*(_DWORD *)(v7 + 24) = (my_bits_reverse_table[(unsigned __int8)a3] << 24) | (my_bits_reverse_table[BYTE1(a3)] << 16) | (my_bits_reverse_table[BYTE2(a3)] << 8) | my_bits_reverse_table[HIBYTE(a3)];
*(_QWORD *)(v7 + 8) = "";
*(_QWORD *)(v7 + 16) = 0LL;
v11 = l_insert(v10, *(_QWORD *)(a1 + 168), v7, a4, 1LL);
if ( v11 )
{
v12 = v11;
my_free(v7);
v7 = v12;
}
v9 = 0;
_InterlockedCompareExchange64(a2, v7, 0LL);
}
}
return v9;
}
|
initialize_bucket:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],RCX
MOV R12D,EDX
MOV qword ptr [RBP + -0x30],RSI
MOV RBX,RDI
MOV EAX,EDX
SHR EAX,0x1
MOV ECX,EDX
SHR ECX,0x2
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x2
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x4
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x8
OR EAX,ECX
MOV R15D,EAX
SHR R15D,0x10
OR R15D,EAX
AND R15D,EDX
LEA RAX,[0xd12b34]
MOV EDI,dword ptr [RAX]
PUSH 0x20
POP RSI
PUSH 0x10
POP RDX
CALL 0x001a7081
MOV R13,RAX
MOV qword ptr [RBP + -0x38],RBX
MOV RDI,RBX
MOV ESI,R15D
CALL 0x0013065a
PUSH -0x1
POP R14
TEST RAX,RAX
JZ 0x00130a9a
TEST R13,R13
JZ 0x00130a9a
MOV RBX,RAX
TEST R12D,R12D
JZ 0x00130a02
CMP qword ptr [RBX],0x0
JZ 0x00130aac
LAB_00130a02:
MOV EAX,0xff
MOV ECX,R12D
AND ECX,EAX
LEA RDX,[0x1eb060]
MOVZX ECX,byte ptr [RDX + RCX*0x1]
SHL ECX,0x18
MOV ESI,R12D
SHR ESI,0x8
AND ESI,EAX
MOVZX ESI,byte ptr [RDX + RSI*0x1]
SHL ESI,0x10
OR ESI,ECX
MOV ECX,R12D
SHR ECX,0x10
AND ECX,EAX
MOVZX EAX,byte ptr [RDX + RCX*0x1]
SHL EAX,0x8
OR EAX,ESI
SHR R12D,0x18
MOVZX ECX,byte ptr [RDX + R12*0x1]
OR ECX,EAX
MOV dword ptr [R13 + 0x18],ECX
LEA RAX,[0x1e1575]
MOV qword ptr [R13 + 0x8],RAX
AND qword ptr [R13 + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0xa8]
PUSH 0x1
POP R8
MOV RDI,RBX
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x40]
CALL 0x001ad76d
TEST RAX,RAX
JZ 0x00130a8c
MOV RBX,RAX
MOV RDI,R13
CALL 0x001a72ae
MOV R13,RBX
LAB_00130a8c:
MOV RCX,qword ptr [RBP + -0x30]
XOR R14D,R14D
XOR EAX,EAX
CMPXCHG.LOCK qword ptr [RCX],R13
LAB_00130a9a:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00130aac:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RBX
MOV EDX,R15D
MOV RCX,qword ptr [RBP + -0x40]
CALL 0x00130968
TEST EAX,EAX
JZ 0x00130a02
MOV RDI,R13
CALL 0x001a72ae
JMP 0x00130a9a
|
/* initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*) */
int4 initialize_bucket(st_lf_hash *param_1,LF_SLIST **param_2,uint param_3,LF_PINS *param_4)
{
int iVar1;
LF_SLIST *pLVar2;
LF_SLIST **ppLVar3;
LF_SLIST *pLVar4;
uint uVar5;
int4 uVar6;
uVar5 = param_3 >> 2 | param_3 >> 1;
uVar5 = uVar5 >> 2 | uVar5;
uVar5 = uVar5 >> 4 | uVar5;
uVar5 = uVar5 >> 8 | uVar5;
uVar5 = (uVar5 >> 0x10 | uVar5) & param_3;
pLVar2 = (LF_SLIST *)my_malloc(key_memory_lf_slist,0x20,0x10);
ppLVar3 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar5);
uVar6 = 0xffffffff;
if ((ppLVar3 != (LF_SLIST **)0x0) && (pLVar2 != (LF_SLIST *)0x0)) {
if ((param_3 == 0) ||
((*ppLVar3 != (LF_SLIST *)0x0 ||
(iVar1 = initialize_bucket(param_1,ppLVar3,uVar5,param_4), iVar1 == 0)))) {
*(uint *)(pLVar2 + 0x18) =
(uint)(byte)_my_bits_reverse_table[param_3 >> 0x18] |
(uint)(byte)_my_bits_reverse_table[param_3 >> 0x10 & 0xff] << 8 |
(uint)(byte)_my_bits_reverse_table[param_3 >> 8 & 0xff] << 0x10 |
(uint)(byte)_my_bits_reverse_table[param_3 & 0xff] << 0x18;
*(char **)(pLVar2 + 8) = "";
*(int8 *)(pLVar2 + 0x10) = 0;
pLVar4 = (LF_SLIST *)l_insert(ppLVar3,*(charset_info_st **)(param_1 + 0xa8),pLVar2,param_4,1);
if (pLVar4 != (LF_SLIST *)0x0) {
my_free(pLVar2);
pLVar2 = pLVar4;
}
uVar6 = 0;
LOCK();
if (*param_2 == (LF_SLIST *)0x0) {
*param_2 = pLVar2;
}
UNLOCK();
}
else {
my_free(pLVar2);
}
}
return uVar6;
}
|
|
63,717 |
set_page_bits
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool set_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page, uint fill_pattern)
{
pgcache_page_no_t bitmap_page;
uint offset_page, offset, tmp, org_tmp, used_offset;
uchar *data;
DBUG_ENTER("set_page_bits");
DBUG_ASSERT(fill_pattern <= 7);
bitmap_page= page - page % bitmap->pages_covered;
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset_page= (uint) (page - bitmap->page - 1);
/*
Mark place used by reading/writing 2 bytes at a time to handle
bitmaps in overlapping bytes
*/
offset_page*= 3;
offset= offset_page & 7;
data= bitmap->map + offset_page / 8;
org_tmp= tmp= uint2korr(data);
tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset);
if (tmp == org_tmp)
DBUG_RETURN(0); /* No changes */
/*
Take care to not write bytes outside of bitmap.
fill_pattern is 3 bits, so we need to write two bytes
if bit position we write to is > (8-3)
*/
if (offset > 5)
int2store(data, tmp);
else
data[0]= tmp;
/*
Reset full_head_size or full_tail_size if we are releasing data before
it. Increase used_size if we are allocating data.
*/
used_offset= (uint) (data - bitmap->map);
if (fill_pattern < 4)
set_if_smaller(bitmap->full_head_size, used_offset);
if (fill_pattern == 0 || (fill_pattern > 4 && fill_pattern < 7))
set_if_smaller(bitmap->full_tail_size, used_offset);
if (fill_pattern != 0)
{
/* Calulcate which was the last changed byte */
used_offset+= offset > 5 ? 2 : 1;
set_if_bigger(bitmap->used_size, used_offset);
}
_ma_check_bitmap(bitmap);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
if (fill_pattern != FULL_HEAD_PAGE && fill_pattern != FULL_TAIL_PAGE)
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
/*
Note that if the condition above is false (page is full), and all pages of
this bitmap are now full, and that bitmap page was
first_bitmap_with_space, we don't modify first_bitmap_with_space, indeed
its value still tells us where to start our search for a bitmap with space
(which is for sure after this full one).
That does mean that first_bitmap_with_space is only a lower bound.
*/
DBUG_RETURN(0);
}
|
O0
|
c
|
set_page_bits:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
jmp 0x64589
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
movq -0x60(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x645df
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x63a90
movsbl %al, %eax
cmpl $0x0, %eax
je 0x645df
jmp 0x645d6
movb $0x1, -0x1(%rbp)
jmp 0x6476d
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x10(%rcx), %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
imull $0x3, -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x3c(%rbp)
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl -0x38(%rbp), %ecx
movl $0x7, %edx
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl -0x24(%rbp), %edx
movl -0x38(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x6465c
jmp 0x64653
movb $0x0, -0x1(%rbp)
jmp 0x6476d
cmpl $0x5, -0x38(%rbp)
jbe 0x6467b
jmp 0x64664
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0x58(%rbp), %rax
movw %cx, (%rax)
jmp 0x64686
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
cmpl $0x4, -0x24(%rbp)
jae 0x646ba
jmp 0x646a0
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x646b6
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x646b8
jmp 0x646ba
cmpl $0x0, -0x24(%rbp)
je 0x646cc
cmpl $0x4, -0x24(%rbp)
jbe 0x646e8
cmpl $0x7, -0x24(%rbp)
jae 0x646e8
jmp 0x646ce
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x646e4
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x646e6
jmp 0x646e8
cmpl $0x0, -0x24(%rbp)
je 0x64721
movl -0x38(%rbp), %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x5, %edx
cmoval %ecx, %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x44(%rbp), %eax
jae 0x6471d
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6471f
jmp 0x64721
jmp 0x64723
jmp 0x64725
movq -0x18(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x6472f
cmpl $0x4, -0x24(%rbp)
je 0x64767
cmpl $0x7, -0x24(%rbp)
je 0x64767
jmp 0x6473d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xd0(%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x64763
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x64765
jmp 0x64767
jmp 0x64769
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
set_page_bits:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
jmp short $+2
loc_64589:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx+138h]
mov rax, [rbp+var_60]
sub rax, rdx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_645DF
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_645DF
jmp short $+2
loc_645D6:
mov [rbp+var_1], 1
jmp loc_6476D
loc_645DF:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, [rcx+10h]
sub rax, 1
mov [rbp+var_34], eax
imul eax, [rbp+var_34], 3
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
and eax, 7
mov [rbp+var_38], eax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_34]
shr ecx, 3
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movzx eax, word ptr [rax]
mov [rbp+var_3C], eax
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, [rbp+var_38]
mov edx, 7
shl edx, cl
mov ecx, edx
xor ecx, 0FFFFFFFFh
and eax, ecx
mov edx, [rbp+var_24]
mov ecx, [rbp+var_38]
shl edx, cl
mov ecx, edx
or eax, ecx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_40]
jnz short loc_6465C
jmp short $+2
loc_64653:
mov [rbp+var_1], 0
jmp loc_6476D
loc_6465C:
cmp [rbp+var_38], 5
jbe short loc_6467B
jmp short $+2
loc_64664:
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_58]
mov [rax], cx
jmp short loc_64686
loc_6467B:
mov eax, [rbp+var_3C]
mov cl, al
mov rax, [rbp+var_50]
mov [rax], cl
loc_64686:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
sub rax, rcx
mov [rbp+var_44], eax
cmp [rbp+var_24], 4
jnb short loc_646BA
jmp short $+2
loc_646A0:
mov rax, [rbp+var_18]
mov eax, [rax+28h]
cmp eax, [rbp+var_44]
jbe short loc_646B6
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+28h], ecx
loc_646B6:
jmp short $+2
loc_646B8:
jmp short $+2
loc_646BA:
cmp [rbp+var_24], 0
jz short loc_646CC
cmp [rbp+var_24], 4
jbe short loc_646E8
cmp [rbp+var_24], 7
jnb short loc_646E8
loc_646CC:
jmp short $+2
loc_646CE:
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
cmp eax, [rbp+var_44]
jbe short loc_646E4
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+2Ch], ecx
loc_646E4:
jmp short $+2
loc_646E6:
jmp short $+2
loc_646E8:
cmp [rbp+var_24], 0
jz short loc_64721
mov edx, [rbp+var_38]
mov eax, 1
mov ecx, 2
cmp edx, 5
cmova eax, ecx
add eax, [rbp+var_44]
mov [rbp+var_44], eax
mov rax, [rbp+var_18]
mov eax, [rax+24h]
cmp eax, [rbp+var_44]
jnb short loc_6471D
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+24h], ecx
loc_6471D:
jmp short $+2
loc_6471F:
jmp short $+2
loc_64721:
jmp short $+2
loc_64723:
jmp short $+2
loc_64725:
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_6472F:
cmp [rbp+var_24], 4
jz short loc_64767
cmp [rbp+var_24], 7
jz short loc_64767
jmp short $+2
loc_6473D:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+0D0h]
cmp rax, [rbp+var_30]
jbe short loc_64763
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_64763:
jmp short $+2
loc_64765:
jmp short $+2
loc_64767:
jmp short $+2
loc_64769:
mov [rbp+var_1], 0
loc_6476D:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
|
char set_page_bits(long long *a1, long long a2, unsigned long long a3, unsigned int a4)
{
int v4; // eax
_BYTE *v6; // [rsp+10h] [rbp-50h]
unsigned int v7; // [rsp+1Ch] [rbp-44h]
unsigned int v8; // [rsp+1Ch] [rbp-44h]
int v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+24h] [rbp-3Ch]
unsigned int v11; // [rsp+28h] [rbp-38h]
unsigned int v12; // [rsp+2Ch] [rbp-34h]
unsigned long long v13; // [rsp+30h] [rbp-30h]
int v15; // [rsp+40h] [rbp-20h]
v15 = a3;
v13 = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v13 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v13) )
return 1;
v12 = 3 * (v15 - *(_DWORD *)(a2 + 16) - 1);
v11 = v12 & 7;
v6 = (_BYTE *)((v12 >> 3) + *(_QWORD *)(a2 + 8));
v9 = *(unsigned __int16 *)v6;
v10 = (a4 << (v12 & 7)) | ~(7 << (v12 & 7)) & v9;
if ( v10 == v9 )
return 0;
if ( v11 <= 5 )
*v6 = v10;
else
*(_WORD *)v6 = v10;
v7 = (_DWORD)v6 - *(_QWORD *)(a2 + 8);
if ( a4 < 4 && *(_DWORD *)(a2 + 40) > v7 )
*(_DWORD *)(a2 + 40) = v7;
if ( (!a4 || a4 > 4 && a4 < 7) && *(_DWORD *)(a2 + 44) > v7 )
*(_DWORD *)(a2 + 44) = v7;
if ( a4 )
{
v4 = 1;
if ( v11 > 5 )
v4 = 2;
v8 = v7 + v4;
if ( *(_DWORD *)(a2 + 36) < v8 )
*(_DWORD *)(a2 + 36) = v8;
}
*(_BYTE *)(a2 + 32) = 1;
if ( a4 != 4 && a4 != 7 && *(_QWORD *)(*a1 + 208) > v13 )
*(_QWORD *)(*a1 + 208) = v13;
return 0;
}
|
set_page_bits:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
JMP 0x00164589
LAB_00164589:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,RDX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x001645df
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00163a90
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001645df
JMP 0x001645d6
LAB_001645d6:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016476d
LAB_001645df:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x10]
SUB RAX,0x1
MOV dword ptr [RBP + -0x34],EAX
IMUL EAX,dword ptr [RBP + -0x34],0x3
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x7
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x34]
SHR ECX,0x3
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,dword ptr [RBP + -0x38]
MOV EDX,0x7
SHL EDX,CL
MOV ECX,EDX
XOR ECX,0xffffffff
AND EAX,ECX
MOV EDX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x38]
SHL EDX,CL
MOV ECX,EDX
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x0016465c
JMP 0x00164653
LAB_00164653:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016476d
LAB_0016465c:
CMP dword ptr [RBP + -0x38],0x5
JBE 0x0016467b
JMP 0x00164664
LAB_00164664:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x58]
MOV word ptr [RAX],CX
JMP 0x00164686
LAB_0016467b:
MOV EAX,dword ptr [RBP + -0x3c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],CL
LAB_00164686:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x24],0x4
JNC 0x001646ba
JMP 0x001646a0
LAB_001646a0:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x001646b6
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],ECX
LAB_001646b6:
JMP 0x001646b8
LAB_001646b8:
JMP 0x001646ba
LAB_001646ba:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x001646cc
CMP dword ptr [RBP + -0x24],0x4
JBE 0x001646e8
CMP dword ptr [RBP + -0x24],0x7
JNC 0x001646e8
LAB_001646cc:
JMP 0x001646ce
LAB_001646ce:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x001646e4
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],ECX
LAB_001646e4:
JMP 0x001646e6
LAB_001646e6:
JMP 0x001646e8
LAB_001646e8:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00164721
MOV EDX,dword ptr [RBP + -0x38]
MOV EAX,0x1
MOV ECX,0x2
CMP EDX,0x5
CMOVA EAX,ECX
ADD EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x24]
CMP EAX,dword ptr [RBP + -0x44]
JNC 0x0016471d
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
LAB_0016471d:
JMP 0x0016471f
LAB_0016471f:
JMP 0x00164721
LAB_00164721:
JMP 0x00164723
LAB_00164723:
JMP 0x00164725
LAB_00164725:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x0016472f
LAB_0016472f:
CMP dword ptr [RBP + -0x24],0x4
JZ 0x00164767
CMP dword ptr [RBP + -0x24],0x7
JZ 0x00164767
JMP 0x0016473d
LAB_0016473d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xd0]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00164763
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_00164763:
JMP 0x00164765
LAB_00164765:
JMP 0x00164767
LAB_00164767:
JMP 0x00164769
LAB_00164769:
MOV byte ptr [RBP + -0x1],0x0
LAB_0016476d:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 set_page_bits(long *param_1,long param_2,ulong param_3,uint param_4)
{
char cVar1;
uint uVar2;
uint uVar3;
int iVar4;
ulong uVar5;
ushort *puVar6;
int1 local_9;
uVar5 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if ((uVar5 == *(ulong *)(param_2 + 0x10)) ||
(cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar5), cVar1 == '\0')) {
uVar2 = (((int)param_3 - (int)*(int8 *)(param_2 + 0x10)) + -1) * 3;
uVar3 = uVar2 & 7;
puVar6 = (ushort *)(*(long *)(param_2 + 8) + (ulong)(uVar2 >> 3));
uVar2 = (uint)*puVar6 & (7 << (sbyte)uVar3 ^ 0xffffffffU) | param_4 << (sbyte)uVar3;
if (uVar2 == *puVar6) {
local_9 = 0;
}
else {
if (uVar3 < 6) {
*(char *)puVar6 = (char)uVar2;
}
else {
*puVar6 = (ushort)uVar2;
}
uVar2 = (int)puVar6 - (int)*(int8 *)(param_2 + 8);
if ((param_4 < 4) && (uVar2 < *(uint *)(param_2 + 0x28))) {
*(uint *)(param_2 + 0x28) = uVar2;
}
if (((param_4 == 0) || ((4 < param_4 && (param_4 < 7)))) &&
(uVar2 < *(uint *)(param_2 + 0x2c))) {
*(uint *)(param_2 + 0x2c) = uVar2;
}
if (param_4 != 0) {
iVar4 = 1;
if (5 < uVar3) {
iVar4 = 2;
}
if (*(uint *)(param_2 + 0x24) < iVar4 + uVar2) {
*(uint *)(param_2 + 0x24) = iVar4 + uVar2;
}
}
*(int1 *)(param_2 + 0x20) = 1;
if (((param_4 != 4) && (param_4 != 7)) && (uVar5 < *(ulong *)(*param_1 + 0xd0))) {
*(ulong *)(*param_1 + 0xd0) = uVar5;
}
local_9 = 0;
}
}
else {
local_9 = 1;
}
return local_9;
}
|
|
63,718 |
my_wc_mb_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gbk_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gbk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x48eab
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x48f24
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x48ecb
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x48f24
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x491f0
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x48ee7
movl $0x0, -0x4(%rbp)
jmp 0x48f24
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x48efe
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x48f24
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_gbk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_48EAB
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_48F24
loc_48EAB:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_48ECB
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_48F24
loc_48ECB:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gbk_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_48EE7
mov [rbp+var_4], 0
jmp short loc_48F24
loc_48EE7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_48EFE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_48F24
loc_48EFE:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_48F24:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gbk_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gbk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00148eab
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00148f24
LAB_00148eab:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x00148ecb
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00148f24
LAB_00148ecb:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x001491f0
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00148ee7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00148f24
LAB_00148ee7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00148efe
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00148f24
LAB_00148efe:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00148f24:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_gbk_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
63,719 |
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>>::key() const
|
monkey531[P]llama/common/json.hpp
|
const typename object_t::key_type& key() const
{
JSON_ASSERT(m_object != nullptr);
if (JSON_HEDLEY_LIKELY(m_object->is_object()))
{
return m_it.object_iterator->first;
}
JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object));
}
|
O2
|
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>>::key() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0x812fc
movq %rdi, %r14
cmpb $0x1, (%rax)
jne 0x812ab
movq 0x8(%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x33f66(%rip), %rsi # 0xb5223
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27d88
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0xcf, %esi
callq 0x44308
xorl %ebp, %ebp
leaq 0x7bc0b(%rip), %rsi # 0xfcef8
leaq -0x4017c(%rip), %rdx # 0x41178
movq %rbx, %rdi
callq 0x23f00
leaq 0x2fbf9(%rip), %rdi # 0xb0efc
leaq 0x29f2a(%rip), %rdx # 0xab234
leaq 0x34e9c(%rip), %rcx # 0xb61ad
movl $0x3519, %esi # imm = 0x3519
xorl %eax, %eax
callq 0x23eb0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241c8
testb %bpl, %bpl
jne 0x81334
jmp 0x8133c
movq %rax, %r14
movq %rbx, %rdi
callq 0x236a0
movq %r14, %rdi
callq 0x23f80
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov rax, [rdi]
test rax, rax
jz short loc_812FC
mov r14, rdi
cmp byte ptr [rax], 1
jnz short loc_812AB
mov rax, [r14+8]
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_812AB:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"...
lea rdi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 0CFh; 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
loc_812FC:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 3519h
xor eax, eax
call _ggml_abort
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_81334
jmp short loc_8133C
mov r14, rax
loc_81334:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8133C:
mov rdi, r14
call __Unwind_Resume
|
long long 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>>::key(
_QWORD *a1)
{
void *v1; // rbx
char v2; // bp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator *exception; // rbx
long long v5; // r14
_QWORD v6[7]; // [rsp+10h] [rbp-38h] BYREF
if ( !*a1 )
{
v5 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13593LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
std::string::~string(v6);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v5);
}
if ( *(_BYTE *)*a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::invalid_iterator *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v6, (long long)"cannot use key() for non-object iterators");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
207,
(long long)v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return a1[1];
}
|
key:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001812fc
MOV R14,RDI
CMP byte ptr [RAX],0x1
JNZ 0x001812ab
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001812ab:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_001812b6:
LEA RSI,[0x1b5223]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00127d88
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_001812d2:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0xcf
CALL 0x00144308
XOR EBP,EBP
LEA RSI,[0x1fcef8]
LEA RDX,[0x141178]
MOV RDI,RBX
CALL 0x00123f00
LAB_001812fc:
LEA RDI,[0x1b0efc]
LEA RDX,[0x1ab234]
LEA RCX,[0x1b61ad]
MOV ESI,0x3519
XOR EAX,EAX
CALL 0x00123eb0
|
/* 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> >::key() const */
int8 __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>>
::key(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)
{
int8 uVar1;
allocator local_39;
string local_38 [32];
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3519,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
if (**(char **)this == '\x01') {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
/* try { // try from 001812b6 to 001812cb has its CatchHandler @ 00181331 */
std::__cxx11::string::string<std::allocator<char>>
(local_38,"cannot use key() for non-object iterators",&local_39);
/* try { // try from 001812d2 to 001812fb has its CatchHandler @ 0018131d */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xcf,local_38,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception);
}
|
|
63,720 |
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&)
|
monkey531[P]llama/common/minja.hpp
|
Context(Value && values, const std::shared_ptr<Context> & parent = nullptr) : values_(std::move(values)), parent_(parent) {
if (!values_.is_object()) throw std::runtime_error("Context values must be an object: " + values_.dump());
}
|
O2
|
cpp
|
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x88896(%rip), %rax # 0xfd140
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x18(%rdi), %r14
movq %r14, %rdi
callq 0x62eb8
leaq 0x68(%rbx), %rdi
movq %r15, %rsi
callq 0x74b6e
cmpq $0x0, 0x38(%rbx)
je 0x748dd
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r15
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x6320c
leaq 0x40a31(%rip), %rsi # 0xb5330
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x588a2
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x23e50
xorl %ebp, %ebp
movq 0x896cb(%rip), %rsi # 0xfdff0
movq 0x8962c(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f30
movq %rax, %r12
leaq 0x20(%rsp), %rdi
callq 0x241e8
jmp 0x74949
movq %rax, %r12
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x241e8
testb %bpl, %bpl
jne 0x7495b
jmp 0x74963
movq %rax, %r12
movq %r15, %rdi
callq 0x236b0
leaq 0x70(%rbx), %rdi
callq 0x4fa78
movq %r14, %rdi
callq 0x6301e
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x6400a
movq %r12, %rdi
callq 0x23fb0
|
_ZN5minja7ContextC2EONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r15, rdx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context
add rax, 10h
mov [rdi], rax
lea r14, [rdi+18h]
mov rdi, r14
call _ZN5minja5ValueC2EOS0_; minja::Value::Value(minja::Value&&)
lea rdi, [rbx+68h]
mov rsi, r15
call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EEC2ERKS4_; std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> const&)
cmp qword ptr [rbx+38h], 0
jz short loc_748DD
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_748DD:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContextValuesM; "Context values must be an object: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r15
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r12, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_74949
mov r12, rax
mov bpl, 1
loc_74949:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7495B
jmp short loc_74963
mov r12, rax
loc_7495B:
mov rdi, r15; void *
call ___cxa_free_exception
loc_74963:
lea rdi, [rbx+70h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rbx, 10h
mov rdi, rbx
call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count()
mov rdi, r12
call __Unwind_Resume
|
long long minja::Context::Context(long long a1, long long a2, long long a3)
{
long long result; // rax
void *exception; // r15
_BYTE v6[32]; // [rsp+0h] [rbp-68h] BYREF
_BYTE v7[72]; // [rsp+20h] [rbp-48h] BYREF
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)a1 = &`vtable for'minja::Context + 2;
minja::Value::Value(a1 + 24, a2);
result = std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(a1 + 104, a3);
if ( !*(_QWORD *)(a1 + 56) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, a1 + 24, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Context values must be an object: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
|
Context:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R15,RDX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x1fd140]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
LEA R14,[RDI + 0x18]
MOV RDI,R14
CALL 0x00162eb8
LEA RDI,[RBX + 0x68]
MOV RSI,R15
CALL 0x00174b6e
CMP qword ptr [RBX + 0x38],0x0
JZ 0x001748dd
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001748dd:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R15,RAX
LAB_001748e8:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0016320c
LAB_001748f8:
LEA RSI,[0x1b5330]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001588a2
MOV BPL,0x1
LAB_0017490f:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x00123e50
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f30
|
/* minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) */
void __thiscall minja::Context::Context(Context *this,Value *param_1,shared_ptr *param_2)
{
runtime_error *this_00;
int1 auStack_68 [32];
string local_48 [32];
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__Context_001fd150;
Value::Value((Value *)(this + 0x18),param_1);
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr
((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)(this + 0x68),
(__shared_ptr *)param_2);
if (*(long *)(this + 0x38) != 0) {
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001748e8 to 001748f7 has its CatchHandler @ 00174958 */
Value::dump_abi_cxx11_((int)auStack_68,SUB81((Value *)(this + 0x18),0));
/* try { // try from 001748f8 to 0017490b has its CatchHandler @ 00174943 */
std::operator+((char *)local_48,(string *)"Context values must be an object: ");
/* try { // try from 0017490f to 00174933 has its CatchHandler @ 00174934 */
std::runtime_error::runtime_error(this_00,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
|
|
63,721 |
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&)
|
monkey531[P]llama/common/minja.hpp
|
Context(Value && values, const std::shared_ptr<Context> & parent = nullptr) : values_(std::move(values)), parent_(parent) {
if (!values_.is_object()) throw std::runtime_error("Context values must be an object: " + values_.dump());
}
|
O3
|
cpp
|
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x8e6ed(%rip), %rax # 0x12b140
addq $0x10, %rax
movq %rax, (%rdi)
movups %xmm0, 0x18(%rdi)
xorl %r13d, %r13d
movq %r13, 0x30(%rdi)
movups 0x10(%rsi), %xmm0
movq %r13, 0x18(%rsi)
movups %xmm0, 0x28(%rdi)
movq %r13, 0x10(%rsi)
movq %r13, 0x40(%rdi)
movups 0x20(%rsi), %xmm0
movq %r13, 0x28(%rsi)
movups %xmm0, 0x38(%rdi)
movq %r13, 0x20(%rsi)
movq %r13, 0x50(%rdi)
movups 0x30(%rsi), %xmm0
movq %r13, 0x38(%rsi)
movups %xmm0, 0x48(%rdi)
movq %r13, 0x30(%rsi)
leaq 0x58(%rdi), %r12
leaq 0x40(%rsi), %rdi
movups 0x40(%rsi), %xmm0
movups %xmm0, 0x58(%rbx)
xorl %esi, %esi
callq 0x58aa4
movb $0x0, 0x40(%r15)
movq %r13, 0x48(%r15)
movq %r12, %rdi
movl $0x1, %esi
callq 0x58aa4
movq (%r14), %rax
movq %rax, 0x68(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x9caf3
movq 0x8f4a3(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x9caef
incl 0x8(%rax)
jmp 0x9caf3
lock
incl 0x8(%rax)
cmpq $0x0, 0x38(%rbx)
je 0x9cb09
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbx), %r14
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x866e8
leaq 0x5480b(%rip), %rsi # 0xf1340
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x78e09
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x1ae30
xorl %ebp, %ebp
movq 0x8f493(%rip), %rsi # 0x12bff0
movq 0x8f3fc(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af30
movq %rax, %r12
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9cb8a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9cba5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x9cbcf
jmp 0x9cbd7
movq %rax, %r12
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9cbcf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x9cbcf
movq %rax, %r12
movq %r15, %rdi
callq 0x1a690
movq 0x70(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
je 0x9cbe9
callq 0x6d9b6
movq %r14, %rdi
callq 0x863c6
movq %rbx, %rdi
callq 0x9cc02
movq %r12, %rdi
callq 0x1afb0
nop
|
_ZN5minja7ContextC2EONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context
add rax, 10h
mov [rdi], rax
movups xmmword ptr [rdi+18h], xmm0
xor r13d, r13d
mov [rdi+30h], r13
movups xmm0, xmmword ptr [rsi+10h]
mov [rsi+18h], r13
movups xmmword ptr [rdi+28h], xmm0
mov [rsi+10h], r13
mov [rdi+40h], r13
movups xmm0, xmmword ptr [rsi+20h]
mov [rsi+28h], r13
movups xmmword ptr [rdi+38h], xmm0
mov [rsi+20h], r13
mov [rdi+50h], r13
movups xmm0, xmmword ptr [rsi+30h]
mov [rsi+38h], r13
movups xmmword ptr [rdi+48h], xmm0
mov [rsi+30h], r13
lea r12, [rdi+58h]
lea rdi, [rsi+40h]
movups xmm0, xmmword ptr [rsi+40h]
movups xmmword ptr [rbx+58h], xmm0
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15+40h], 0
mov [r15+48h], r13
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, [r14]
mov [rbx+68h], rax
mov rax, [r14+8]
mov [rbx+70h], rax
test rax, rax
jz short loc_9CAF3
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9CAEF
inc dword ptr [rax+8]
jmp short loc_9CAF3
loc_9CAEF:
lock inc dword ptr [rax+8]
loc_9CAF3:
cmp qword ptr [rbx+38h], 0
jz short loc_9CB09
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9CB09:
lea r14, [rbx+18h]
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rdi, [rsp+78h+var_70]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContextValuesM; "Context values must be an object: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, r15
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r12, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9CB8A
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9CB8A:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9CBA5
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9CBA5:
test bpl, bpl
jnz short loc_9CBCF
jmp short loc_9CBD7
mov r12, rax
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9CBCF
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9CBCF
mov r12, rax
loc_9CBCF:
mov rdi, r15; void *
call ___cxa_free_exception
loc_9CBD7:
mov rdi, [rbx+70h]
add rbx, 8
test rdi, rdi
jz short loc_9CBE9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9CBE9:
mov rdi, r14; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja7ContextEED2Ev; std::enable_shared_from_this<minja::Context>::~enable_shared_from_this()
mov rdi, r12
call __Unwind_Resume
|
long long minja::Context::Context(long long a1, long long a2, _QWORD *a3)
{
__int128 v4; // xmm0
__int128 v5; // xmm0
__int128 v6; // xmm0
long long result; // rax
void *exception; // r15
_BYTE v9[16]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v10[16]; // [rsp+28h] [rbp-50h] BYREF
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)a1 = &`vtable for'minja::Context + 2;
*(_OWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
v4 = *(_OWORD *)(a2 + 16);
*(_QWORD *)(a2 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = v4;
*(_QWORD *)(a2 + 16) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
v5 = *(_OWORD *)(a2 + 32);
*(_QWORD *)(a2 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = v5;
*(_QWORD *)(a2 + 32) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v6 = *(_OWORD *)(a2 + 48);
*(_QWORD *)(a2 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = v6;
*(_QWORD *)(a2 + 48) = 0LL;
*(_OWORD *)(a1 + 88) = *(_OWORD *)(a2 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64));
*(_BYTE *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 88));
*(_QWORD *)(a1 + 104) = *a3;
result = a3[1];
*(_QWORD *)(a1 + 112) = result;
if ( result )
{
if ( _libc_single_threaded )
++*(_DWORD *)(result + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(result + 8));
}
if ( !*(_QWORD *)(a1 + 56) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, a1 + 24, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Context values must be an object: ", (long long)v9);
std::runtime_error::runtime_error(exception, v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
|
Context:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x22b140]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOVUPS xmmword ptr [RDI + 0x18],XMM0
XOR R13D,R13D
MOV qword ptr [RDI + 0x30],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x10]
MOV qword ptr [RSI + 0x18],R13
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV qword ptr [RSI + 0x10],R13
MOV qword ptr [RDI + 0x40],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x20]
MOV qword ptr [RSI + 0x28],R13
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV qword ptr [RSI + 0x20],R13
MOV qword ptr [RDI + 0x50],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x30]
MOV qword ptr [RSI + 0x38],R13
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOV qword ptr [RSI + 0x30],R13
LEA R12,[RDI + 0x58]
LEA RDI,[RSI + 0x40]
MOVUPS XMM0,xmmword ptr [RSI + 0x40]
MOVUPS xmmword ptr [RBX + 0x58],XMM0
XOR ESI,ESI
CALL 0x00158aa4
MOV byte ptr [R15 + 0x40],0x0
MOV qword ptr [R15 + 0x48],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x00158aa4
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x68],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x70],RAX
TEST RAX,RAX
JZ 0x0019caf3
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x0019caef
INC dword ptr [RAX + 0x8]
JMP 0x0019caf3
LAB_0019caef:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019caf3:
CMP qword ptr [RBX + 0x38],0x0
JZ 0x0019cb09
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019cb09:
LEA R14,[RBX + 0x18]
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_0019cb1a:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001866e8
LAB_0019cb2e:
LEA RSI,[0x1f1340]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00178e09
MOV BPL,0x1
LAB_0019cb47:
LEA RSI,[RSP + 0x28]
MOV RDI,R15
CALL 0x0011ae30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af30
|
/* minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) */
void __thiscall minja::Context::Context(Context *this,Value *param_1,shared_ptr *param_2)
{
long lVar1;
int8 uVar2;
runtime_error *this_00;
int1 local_70 [32];
string local_50 [32];
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__Context_0022b150;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x30) = 0;
uVar2 = *(int8 *)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(this + 0x28) = *(int8 *)(param_1 + 0x10);
*(int8 *)(this + 0x30) = uVar2;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(this + 0x40) = 0;
uVar2 = *(int8 *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x20);
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(this + 0x50) = 0;
uVar2 = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x38) = 0;
*(int8 *)(this + 0x48) = *(int8 *)(param_1 + 0x30);
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)(param_1 + 0x30) = 0;
uVar2 = *(int8 *)(param_1 + 0x48);
*(int8 *)(this + 0x58) = *(int8 *)(param_1 + 0x40);
*(int8 *)(this + 0x60) = uVar2;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)param_1 + '@'));
param_1[0x40] = (Value)0x0;
*(int8 *)(param_1 + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + 'X'));
*(int8 *)(this + 0x68) = *(int8 *)param_2;
lVar1 = *(long *)(param_2 + 8);
*(long *)(this + 0x70) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
if (*(long *)(this + 0x38) != 0) {
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019cb1a to 0019cb2d has its CatchHandler @ 0019cbcc */
Value::dump_abi_cxx11_((int)local_70,(bool)((char)this + '\x18'));
/* try { // try from 0019cb2e to 0019cb43 has its CatchHandler @ 0019cbac */
std::operator+((char *)local_50,(string *)"Context values must be an object: ");
/* try { // try from 0019cb47 to 0019cb6b has its CatchHandler @ 0019cb6c */
std::runtime_error::runtime_error(this_00,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
|
|
63,722 |
ma_init_dynamic_array
|
eloqsql/libmariadb/libmariadb/ma_array.c
|
my_bool ma_init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
uint init_alloc, uint alloc_increment CALLER_INFO_PROTO)
{
if (!alloc_increment)
{
alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
if (!init_alloc)
init_alloc=alloc_increment;
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
if (!(array->buffer=(char*) malloc(element_size*init_alloc)))
{
array->max_element=0;
return(TRUE);
}
return(FALSE);
}
|
O0
|
c
|
ma_init_dynamic_array:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xa7475
movl $0x1ff8, %eax # imm = 0x1FF8
xorl %edx, %edx
divl -0x14(%rbp)
cmpl $0x10, %eax
jbe 0xa7449
movl $0x1ff8, %eax # imm = 0x1FF8
xorl %edx, %edx
divl -0x14(%rbp)
movl %eax, -0x20(%rbp)
jmp 0xa7453
movl $0x10, %eax
movl %eax, -0x20(%rbp)
jmp 0xa7453
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x8, -0x18(%rbp)
jbe 0xa7473
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
shll %ecx
cmpl %ecx, %eax
jbe 0xa7473
movl -0x18(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0xa7475
cmpl $0x0, -0x18(%rbp)
jne 0xa7481
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x14(%rbp), %eax
imull -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %edi
callq 0x60aa0
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0xa74d8
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xa74dc
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_init_dynamic_array:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_1C], ecx
cmp [rbp+var_1C], 0
jnz short loc_A7475
mov eax, 1FF8h
xor edx, edx
div [rbp+var_14]
cmp eax, 10h
jbe short loc_A7449
mov eax, 1FF8h
xor edx, edx
div [rbp+var_14]
mov [rbp+var_20], eax
jmp short loc_A7453
loc_A7449:
mov eax, 10h
mov [rbp+var_20], eax
jmp short $+2
loc_A7453:
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
cmp [rbp+var_18], 8
jbe short loc_A7473
mov eax, [rbp+var_1C]
mov ecx, [rbp+var_18]
shl ecx, 1
cmp eax, ecx
jbe short loc_A7473
mov eax, [rbp+var_18]
shl eax, 1
mov [rbp+var_1C], eax
loc_A7473:
jmp short $+2
loc_A7475:
cmp [rbp+var_18], 0
jnz short loc_A7481
mov eax, [rbp+var_1C]
mov [rbp+var_18], eax
loc_A7481:
mov rax, [rbp+var_10]
mov dword ptr [rax+8], 0
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov eax, [rbp+var_14]
imul eax, [rbp+var_18]
mov eax, eax
mov edi, eax
call _malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_A74D8
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 0
mov [rbp+var_1], 1
jmp short loc_A74DC
loc_A74D8:
mov [rbp+var_1], 0
loc_A74DC:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_init_dynamic_array(long long a1, unsigned int a2, unsigned int a3, int a4)
{
long long v4; // rax
unsigned int v6; // [rsp+0h] [rbp-20h]
int v7; // [rsp+4h] [rbp-1Ch]
unsigned int v8; // [rsp+8h] [rbp-18h]
v8 = a3;
v7 = a4;
if ( !a4 )
{
v6 = 0x1FF8 / a2 <= 0x10 ? 16 : 0x1FF8 / a2;
v7 = v6;
if ( a3 > 8 && v6 > 2 * a3 )
v7 = 2 * a3;
}
if ( !a3 )
v8 = v7;
*(_DWORD *)(a1 + 8) = 0;
*(_DWORD *)(a1 + 12) = v8;
*(_DWORD *)(a1 + 16) = v7;
*(_DWORD *)(a1 + 20) = a2;
v4 = malloc(v8 * a2);
*(_QWORD *)a1 = v4;
if ( v4 )
return 0;
*(_DWORD *)(a1 + 12) = 0;
return 1;
}
|
ma_init_dynamic_array:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x1c],ECX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x001a7475
MOV EAX,0x1ff8
XOR EDX,EDX
DIV dword ptr [RBP + -0x14]
CMP EAX,0x10
JBE 0x001a7449
MOV EAX,0x1ff8
XOR EDX,EDX
DIV dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001a7453
LAB_001a7449:
MOV EAX,0x10
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001a7453
LAB_001a7453:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x18],0x8
JBE 0x001a7473
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,dword ptr [RBP + -0x18]
SHL ECX,0x1
CMP EAX,ECX
JBE 0x001a7473
MOV EAX,dword ptr [RBP + -0x18]
SHL EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_001a7473:
JMP 0x001a7475
LAB_001a7475:
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x001a7481
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x18],EAX
LAB_001a7481:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],0x0
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x18]
MOV EAX,EAX
MOV EDI,EAX
CALL 0x00160aa0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001a74d8
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a74dc
LAB_001a74d8:
MOV byte ptr [RBP + -0x1],0x0
LAB_001a74dc:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
bool ma_init_dynamic_array(int8 *param_1,uint param_2,uint param_3,uint param_4)
{
void *pvVar1;
uint local_28;
uint local_24;
uint local_20;
local_24 = param_4;
if (param_4 == 0) {
if ((uint)(0x1ff8 / (ulong)param_2) < 0x11) {
local_28 = 0x10;
}
else {
local_28 = (uint)(0x1ff8 / (ulong)param_2);
}
local_24 = local_28;
if ((8 < param_3) && (param_3 * 2 < local_28)) {
local_24 = param_3 << 1;
}
}
local_20 = param_3;
if (param_3 == 0) {
local_20 = local_24;
}
*(int4 *)(param_1 + 1) = 0;
*(uint *)((long)param_1 + 0xc) = local_20;
*(uint *)(param_1 + 2) = local_24;
*(uint *)((long)param_1 + 0x14) = param_2;
pvVar1 = malloc((ulong)(param_2 * local_20));
*param_1 = pvVar1;
if (pvVar1 == (void *)0x0) {
*(int4 *)((long)param_1 + 0xc) = 0;
}
return pvVar1 == (void *)0x0;
}
|
|
63,723 |
decltype(auto) coro::sync_wait<coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>, std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&>(coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>&&)
|
AlayaLite/build_O3/_deps/libcoro-src/include/coro/sync_wait.hpp
|
auto sync_wait(awaitable_type&& a) -> decltype(auto)
{
detail::sync_wait_event e{};
auto task = detail::make_sync_wait_task(std::forward<awaitable_type>(a));
task.promise().start(e);
e.wait();
if constexpr (std::is_void_v<return_type>)
{
task.promise().result();
return;
}
else if constexpr (std::is_reference_v<return_type>)
{
return task.promise().result();
}
else if constexpr (std::is_move_assignable_v<return_type>)
{
// issue-242
// For non-trivial types (or possibly types that don't fit in a register)
// the compiler will end up calling the ~return_type() when the promise
// is destructed at the end of sync_wait(). This causes the return_type
// object to also be destructed causing the final return/move from
// sync_wait() to be a 'use after free' bug. To work around this the result
// must be moved off the promise object before the promise is destructed.
// Other solutions could be heap allocating the return_type but that has
// other downsides, for now it is determined that a double move is an
// acceptable solution to work around this bug.
auto result = std::move(task).promise().result();
return result;
}
else
{
return task.promise().result();
}
}
|
O3
|
cpp
|
decltype(auto) coro::sync_wait<coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>, std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>&&>(coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>>&&):
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3cc4
leaq -0x17c(%rip), %rax # 0x2de5
leaq 0x70(%rsp), %rbx
movq %rax, -0x10(%rbx)
leaq -0xbc(%rip), %rax # 0x2eb5
movq %rax, -0x8(%rbx)
movq %r14, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movb $0x0, 0x38(%rbx)
movq %r15, (%rbx)
leaq 0x60(%rsp), %rdi
callq 0x2de5
movq %rsp, %rdi
callq 0x3d48
movq %rbx, %rdi
callq 0x34f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x35e8
leaq 0x28(%rsp), %rdi
callq 0x2270
movq %r14, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x35e8
leaq 0x28(%rsp), %rdi
callq 0x2270
movq %r14, %rdi
callq 0x2260
|
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_:
push r15
push r14
push rbx
sub rsp, 0B0h
mov r14, rdi
mov r15, rsp
mov rdi, r15; this
xor esi, esi; bool
call _ZN4coro6detail15sync_wait_eventC2Eb; coro::detail::sync_wait_event::sync_wait_event(bool)
lea rax, _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
lea rbx, [rsp+0C8h+var_58]
mov [rbx-10h], rax
lea rax, _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__cleanup
mov [rbx-8], rax
mov [rbx+30h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov qword ptr [rbx+18h], 0
mov byte ptr [rbx+38h], 0
mov [rbx], r15
lea rdi, [rsp+0C8h+var_68]
call _ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
mov rdi, rsp; this
call _ZN4coro6detail15sync_wait_event4waitEv; coro::detail::sync_wait_event::wait(void)
mov rdi, rbx
call _ZNR4coro6detail22sync_wait_task_promiseIOSt6vectorINS0_13when_all_taskIvEESaIS4_EEE6resultEv; coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::result(void)
mov r14, rax
mov rdi, rbx
call _ZN4coro6detail22sync_wait_task_promiseIOSt6vectorINS0_13when_all_taskIvEESaIS4_EEED2Ev; coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::~sync_wait_task_promise()
lea rdi, [rsp+0C8h+var_A0]; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rax, r14
add rsp, 0B0h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx
call _ZN4coro6detail22sync_wait_task_promiseIOSt6vectorINS0_13when_all_taskIvEESaIS4_EEED2Ev; coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::~sync_wait_task_promise()
lea rdi, [rsp+arg_20]; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rdi, r14
call __Unwind_Resume
|
long long ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_(
long long a1)
{
long long v1; // r14
_BYTE v3[40]; // [rsp+0h] [rbp-C8h] BYREF
_BYTE v4[56]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v5[2]; // [rsp+60h] [rbp-68h] BYREF
_BYTE *v6; // [rsp+70h] [rbp-58h] BYREF
__int128 v7; // [rsp+78h] [rbp-50h]
long long v8; // [rsp+88h] [rbp-40h]
long long v9; // [rsp+A0h] [rbp-28h]
char v10; // [rsp+A8h] [rbp-20h]
coro::detail::sync_wait_event::sync_wait_event((coro::detail::sync_wait_event *)v3, 0);
v5[0] = ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume;
v5[1] = ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__cleanup;
v9 = a1;
v7 = 0LL;
v8 = 0LL;
v10 = 0;
v6 = v3;
ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume((long long)v5);
coro::detail::sync_wait_event::wait((coro::detail::sync_wait_event *)v3);
v1 = coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::result(&v6);
coro::detail::sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>> &&>::~sync_wait_task_promise(&v6);
std::condition_variable::~condition_variable((std::condition_variable *)v4);
return v1;
}
|
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xb0
MOV R14,RDI
MOV R15,RSP
MOV RDI,R15
XOR ESI,ESI
CALL 0x00103cc4
LEA RAX,[0x102de5]
LEA RBX,[RSP + 0x70]
MOV qword ptr [RBX + -0x10],RAX
LEA RAX,[0x102eb5]
MOV qword ptr [RBX + -0x8],RAX
MOV qword ptr [RBX + 0x30],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV qword ptr [RBX + 0x18],0x0
MOV byte ptr [RBX + 0x38],0x0
MOV qword ptr [RBX],R15
LAB_00102f8f:
LEA RDI,[RSP + 0x60]
CALL 0x00102de5
MOV RDI,RSP
CALL 0x00103d48
MOV RDI,RBX
CALL 0x001034f0
LAB_00102fa9:
MOV R14,RAX
MOV RDI,RBX
CALL 0x001035e8
LEA RDI,[RSP + 0x28]
CALL 0x00102270
MOV RAX,R14
ADD RSP,0xb0
POP RBX
POP R14
POP R15
RET
|
int8
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_
(int8 param_1)
{
int8 uVar1;
sync_wait_event asStack_c8 [40];
condition_variable local_a0 [56];
code *local_68;
code *local_60;
int1 *local_58;
int8 local_50;
int8 uStack_48;
int8 local_40;
int8 local_28;
int1 local_20;
coro::detail::sync_wait_event::sync_wait_event(asStack_c8,false);
local_68 =
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
;
local_60 =
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__cleanup
;
local_50 = 0;
uStack_48 = 0;
local_40 = 0;
local_20 = 0;
/* try { // try from 00102f8f to 00102fa8 has its CatchHandler @ 00102fce */
local_58 = asStack_c8;
local_28 = param_1;
_ZN4coro6detailL19make_sync_wait_taskITkNS_8concepts9awaitableENS0_24when_all_ready_awaitableISt6vectorINS0_13when_all_taskIvEESaIS6_EEEEOS8_EENS0_14sync_wait_taskIT0_EEOT__resume
(&local_68);
coro::detail::sync_wait_event::wait(asStack_c8);
uVar1 = coro::detail::
sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
::result((sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
*)&local_58);
coro::detail::
sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
::~sync_wait_task_promise
((sync_wait_task_promise<std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>&&>
*)&local_58);
std::condition_variable::~condition_variable(local_a0);
return uVar1;
}
|
|
63,724 |
my_strnxfrm_latin1_de
|
eloqsql/strings/ctype-latin1.c
|
static size_t
my_strnxfrm_latin1_de(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar* src, size_t srclen, uint flags)
{
uchar *de= dst + dstlen;
const uchar *se= src + srclen;
uchar *d0= dst;
for ( ; src < se && dst < de && nweights; src++, nweights--)
{
uchar chr= combo1map[*src];
*dst++= chr;
if ((chr= combo2map[*src]) && dst < de && nweights > 1)
{
*dst++= chr;
nweights--;
}
}
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0);
}
|
O3
|
c
|
my_strnxfrm_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rax
movl %ecx, %r10d
movq %rdx, %rcx
movl 0x10(%rbp), %r9d
addq %rsi, %rcx
testq %rax, %rax
jle 0xb5ccf
addq %r8, %rax
leaq 0x170c67(%rip), %r11 # 0x2268d0
leaq 0x170d60(%rip), %rbx # 0x2269d0
movq %rsi, %r14
cmpq %rcx, %r14
jae 0xb5cd4
testl %r10d, %r10d
je 0xb5cd4
movzbl (%r8), %edx
movb (%rdx,%r11), %r15b
leaq 0x1(%r14), %rdx
movb %r15b, (%r14)
movzbl (%r8), %r15d
movb (%r15,%rbx), %r15b
testb %r15b, %r15b
je 0xb5cbf
cmpq %rcx, %rdx
setb %r12b
cmpl $0x2, %r10d
setae %r13b
andb %r12b, %r13b
cmpb $0x1, %r13b
jne 0xb5cbf
movb %r15b, 0x1(%r14)
addq $0x2, %r14
decl %r10d
movq %r14, %rdx
incq %r8
decl %r10d
movq %rdx, %r14
cmpq %rax, %r8
jb 0xb5c73
jmp 0xb5cd7
movq %rsi, %rdx
jmp 0xb5cd7
movq %r14, %rdx
movl $0x0, (%rsp)
movl %r10d, %r8d
callq 0xb7a60
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_latin1_de:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rax, r9
mov r10d, ecx
mov rcx, rdx
mov r9d, [rbp+arg_0]
add rcx, rsi
test rax, rax
jle short loc_B5CCF
add rax, r8
lea r11, combo1map
lea rbx, combo2map
mov r14, rsi
loc_B5C73:
cmp r14, rcx
jnb short loc_B5CD4
test r10d, r10d
jz short loc_B5CD4
movzx edx, byte ptr [r8]
mov r15b, [rdx+r11]
lea rdx, [r14+1]
mov [r14], r15b
movzx r15d, byte ptr [r8]
mov r15b, [r15+rbx]
test r15b, r15b
jz short loc_B5CBF
cmp rdx, rcx
setb r12b
cmp r10d, 2
setnb r13b
and r13b, r12b
cmp r13b, 1
jnz short loc_B5CBF
mov [r14+1], r15b
add r14, 2
dec r10d
mov rdx, r14
loc_B5CBF:
inc r8
dec r10d
mov r14, rdx
cmp r8, rax
jb short loc_B5C73
jmp short loc_B5CD7
loc_B5CCF:
mov rdx, rsi
jmp short loc_B5CD7
loc_B5CD4:
mov rdx, r14
loc_B5CD7:
mov [rsp+30h+var_30], 0
mov r8d, r10d
call my_strxfrm_pad_desc_and_reverse
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strnxfrm_latin1_de(
int a1,
_BYTE *a2,
long long a3,
unsigned int a4,
unsigned __int8 *a5,
long long a6,
int a7)
{
unsigned long long v8; // rcx
unsigned __int8 *v9; // rax
_BYTE *v10; // r14
_BYTE *v11; // rdx
unsigned __int8 v12; // r15
v8 = (unsigned long long)&a2[a3];
if ( a6 <= 0 )
{
LODWORD(v11) = (_DWORD)a2;
}
else
{
v9 = &a5[a6];
v10 = a2;
while ( (unsigned long long)v10 < v8 && a4 )
{
v11 = v10 + 1;
*v10 = combo1map[*a5];
v12 = combo2map[*a5];
if ( v12 && (unsigned long long)v11 < v8 && a4 >= 2 )
{
v10[1] = v12;
--a4;
v11 = v10 + 2;
}
++a5;
--a4;
v10 = v11;
if ( a5 >= v9 )
return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0);
}
LODWORD(v11) = (_DWORD)v10;
}
return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0);
}
|
my_strnxfrm_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,R9
MOV R10D,ECX
MOV RCX,RDX
MOV R9D,dword ptr [RBP + 0x10]
ADD RCX,RSI
TEST RAX,RAX
JLE 0x001b5ccf
ADD RAX,R8
LEA R11,[0x3268d0]
LEA RBX,[0x3269d0]
MOV R14,RSI
LAB_001b5c73:
CMP R14,RCX
JNC 0x001b5cd4
TEST R10D,R10D
JZ 0x001b5cd4
MOVZX EDX,byte ptr [R8]
MOV R15B,byte ptr [RDX + R11*0x1]
LEA RDX,[R14 + 0x1]
MOV byte ptr [R14],R15B
MOVZX R15D,byte ptr [R8]
MOV R15B,byte ptr [R15 + RBX*0x1]
TEST R15B,R15B
JZ 0x001b5cbf
CMP RDX,RCX
SETC R12B
CMP R10D,0x2
SETNC R13B
AND R13B,R12B
CMP R13B,0x1
JNZ 0x001b5cbf
MOV byte ptr [R14 + 0x1],R15B
ADD R14,0x2
DEC R10D
MOV RDX,R14
LAB_001b5cbf:
INC R8
DEC R10D
MOV R14,RDX
CMP R8,RAX
JC 0x001b5c73
JMP 0x001b5cd7
LAB_001b5ccf:
MOV RDX,RSI
JMP 0x001b5cd7
LAB_001b5cd4:
MOV RDX,R14
LAB_001b5cd7:
MOV dword ptr [RSP],0x0
MOV R8D,R10D
CALL 0x001b7a60
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_strnxfrm_latin1_de
(int8 param_1,int1 *param_2,long param_3,uint param_4,byte *param_5,
long param_6,int4 param_7)
{
ulong in_RAX;
byte *pbVar1;
int1 *puVar2;
int1 *puVar3;
int1 *puVar4;
puVar2 = param_2 + param_3;
puVar4 = param_2;
if (0 < param_6) {
pbVar1 = param_5 + param_6;
puVar3 = param_2;
do {
puVar4 = puVar3;
if ((puVar2 <= puVar3) || (param_4 == 0)) break;
puVar4 = puVar3 + 1;
*puVar3 = combo1map[*param_5];
if ((combo2map[*param_5] != '\0') && (1 < param_4 && puVar4 < puVar2)) {
puVar3[1] = combo2map[*param_5];
puVar4 = puVar3 + 2;
param_4 = param_4 - 1;
}
param_5 = param_5 + 1;
param_4 = param_4 - 1;
puVar3 = puVar4;
} while (param_5 < pbVar1);
}
my_strxfrm_pad_desc_and_reverse
(param_1,param_2,puVar4,puVar2,param_4,param_7,in_RAX & 0xffffffff00000000);
return;
}
|
|
63,725 |
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*)
|
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/vm.cpp
|
evmc_set_option_result set_option(evmc_vm* c_vm, char const* c_name, char const* c_value) noexcept
{
const auto name = (c_name != nullptr) ? std::string_view{c_name} : std::string_view{};
const auto value = (c_value != nullptr) ? std::string_view{c_value} : std::string_view{};
auto& vm = *static_cast<VM*>(c_vm);
if (name == "advanced")
{
c_vm->execute = evmone::advanced::execute;
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "cgoto")
{
#if EVMONE_CGOTO_SUPPORTED
if (value == "no")
{
vm.cgoto = false;
return EVMC_SET_OPTION_SUCCESS;
}
return EVMC_SET_OPTION_INVALID_VALUE;
#else
return EVMC_SET_OPTION_INVALID_NAME;
#endif
}
else if (name == "trace")
{
vm.add_tracer(create_instruction_tracer(std::clog));
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "histogram")
{
vm.add_tracer(create_histogram_tracer(std::clog));
return EVMC_SET_OPTION_SUCCESS;
}
else if (name == "validate_eof")
{
vm.validate_eof = true;
return EVMC_SET_OPTION_SUCCESS;
}
return EVMC_SET_OPTION_INVALID_NAME;
}
|
O3
|
cpp
|
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2e3ea
movq %r14, %rdi
callq 0x210d0
movq %rax, %r12
jmp 0x2e3ed
xorl %r12d, %r12d
testq %r15, %r15
je 0x2e404
movq %r15, %rdi
callq 0x210d0
cmpq $0x2, %rax
sete %r13b
jmp 0x2e407
xorl %r13d, %r13d
movl $0x1, %ebp
leaq -0x5(%r12), %rax
cmpq $0x7, %rax
ja 0x2e504
leaq 0x527d6(%rip), %rcx # 0x80bf8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5291d(%rip), %rsi # 0x80d4f
movq %r14, %rdi
movq %r12, %rdx
callq 0x21210
testl %eax, %eax
je 0x2e515
movl $0x63617274, %eax # imm = 0x63617274
xorl (%r14), %eax
movzbl 0x4(%r14), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
jne 0x2e504
movq 0x8fb2c(%rip), %rsi # 0xbdf90
leaq 0x10(%rsp), %rdi
callq 0x498ff
addq $0x58, %rbx
movq %rbx, %rax
movq (%rbx), %rcx
leaq 0x8(%rcx), %rbx
testq %rcx, %rcx
jne 0x2e472
movq 0x10(%rsp), %rcx
jmp 0x2e4c7
leaq 0x528cf(%rip), %rsi # 0x80d5e
movq %r14, %rdi
movq %r12, %rdx
callq 0x21210
testl %eax, %eax
jne 0x2e504
movq 0x8faeb(%rip), %rsi # 0xbdf90
leaq 0x8(%rsp), %rdi
callq 0x497ec
addq $0x58, %rbx
movq %rbx, %rax
movq (%rbx), %rcx
leaq 0x8(%rcx), %rbx
testq %rcx, %rcx
jne 0x2e4b3
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x2e502
movabsq $0x6465636e61766461, %rax # imm = 0x6465636E61766461
cmpq %rax, (%r14)
jne 0x2e504
leaq 0xc98(%rip), %rax # 0x2f17a
movq %rax, 0x20(%rbx)
jmp 0x2e502
leaq 0x52879(%rip), %rsi # 0x80d68
movq %r14, %rdi
movq %r12, %rdx
callq 0x21210
testl %eax, %eax
jne 0x2e504
movb $0x1, 0x39(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, %ebp
testb %r13b, %r13b
je 0x2e504
cmpw $0x6f6e, (%r15) # imm = 0x6F6E
jne 0x2e504
movb $0x0, 0x38(%rbx)
jmp 0x2e502
movq %rax, %rdi
callq 0x2e015
nop
|
_ZN6evmone12_GLOBAL__N_110set_optionEP7evmc_vmPKcS4_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
test rsi, rsi
jz short loc_2E3EA
mov rdi, r14
call _strlen
mov r12, rax
jmp short loc_2E3ED
loc_2E3EA:
xor r12d, r12d
loc_2E3ED:
test r15, r15
jz short loc_2E404
mov rdi, r15
call _strlen
cmp rax, 2
setz r13b
jmp short loc_2E407
loc_2E404:
xor r13d, r13d
loc_2E407:
mov ebp, 1
lea rax, [r12-5]; switch 8 cases
cmp rax, 7
ja def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
lea rcx, jpt_2E429
movsxd rax, ds:(jpt_2E429 - 80BF8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2E42B:
lea rsi, aCgoto; jumptable 000000000002E429 case 5
mov rdi, r14
mov rdx, r12
call _bcmp
test eax, eax
jz loc_2E515
mov eax, 63617274h
xor eax, [r14]
movzx ecx, byte ptr [r14+4]
xor ecx, 65h
or ecx, eax
jnz def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
mov rsi, cs:_ZSt4clog_ptr
lea rdi, [rsp+48h+var_38]
call _ZN6evmone25create_instruction_tracerERSo; evmone::create_instruction_tracer(std::ostream &)
add rbx, 58h ; 'X'
loc_2E472:
mov rax, rbx
mov rcx, [rbx]
lea rbx, [rcx+8]
test rcx, rcx
jnz short loc_2E472
mov rcx, [rsp+48h+var_38]
jmp short loc_2E4C7
loc_2E488:
lea rsi, aHistogram; jumptable 000000000002E429 case 9
mov rdi, r14
mov rdx, r12
call _bcmp
test eax, eax
jnz short def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
mov rsi, cs:_ZSt4clog_ptr
lea rdi, [rsp+48h+var_40]
call _ZN6evmone23create_histogram_tracerERSo; evmone::create_histogram_tracer(std::ostream &)
add rbx, 58h ; 'X'
loc_2E4B3:
mov rax, rbx
mov rcx, [rbx]
lea rbx, [rcx+8]
test rcx, rcx
jnz short loc_2E4B3
mov rcx, [rsp+48h+var_40]
loc_2E4C7:
mov [rax], rcx
jmp short loc_2E502
loc_2E4CC:
mov rax, 6465636E61766461h; jumptable 000000000002E429 case 8
cmp [r14], rax
jnz short def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
lea rax, _ZN6evmone8advanced7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm; evmone::advanced::execute(evmc_vm *,evmc_host_interface const*,evmc_host_context *,evmc_revision,evmc_message const*,uchar const*,ulong)
mov [rbx+20h], rax
jmp short loc_2E502
loc_2E4E8:
lea rsi, aValidateEof; jumptable 000000000002E429 case 12
mov rdi, r14
mov rdx, r12
call _bcmp
test eax, eax
jnz short def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
mov byte ptr [rbx+39h], 1
loc_2E502:
xor ebp, ebp
def_2E429:
mov eax, ebp; jumptable 000000000002E429 default case, cases 6,7,10,11
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2E515:
mov ebp, 2
test r13b, r13b
jz short def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
cmp word ptr [r15], 6F6Eh
jnz short def_2E429; jumptable 000000000002E429 default case, cases 6,7,10,11
mov byte ptr [rbx+38h], 0
jmp short loc_2E502
mov rdi, rax
call __clang_call_terminate
|
long long evmone::`anonymous namespace'::set_option(long long a1, long long a2, _WORD *a3)
{
long long v4; // r12
bool v5; // r13
unsigned int v6; // ebp
_QWORD *v7; // rbx
_QWORD *v8; // rax
long long v9; // rcx
long long v10; // rcx
_QWORD *v11; // rbx
long long v12; // rcx
long long v14; // [rsp+8h] [rbp-40h] BYREF
_QWORD v15[7]; // [rsp+10h] [rbp-38h] BYREF
if ( a2 )
v4 = strlen(a2);
else
v4 = 0LL;
if ( a3 )
v5 = strlen(a3) == 2;
else
v5 = 0;
v6 = 1;
switch ( v4 )
{
case 5LL:
if ( (unsigned int)bcmp(a2, "cgoto", v4) )
{
if ( !(*(_DWORD *)a2 ^ 0x63617274 | *(unsigned __int8 *)(a2 + 4) ^ 0x65) )
{
evmone::create_instruction_tracer(v15, &std::clog);
v7 = (_QWORD *)(a1 + 88);
do
{
v8 = v7;
v9 = *v7;
v7 = (_QWORD *)(*v7 + 8LL);
}
while ( v9 );
v10 = v15[0];
goto LABEL_17;
}
}
else
{
v6 = 2;
if ( v5 && *a3 == 28526 )
{
*(_BYTE *)(a1 + 56) = 0;
goto LABEL_22;
}
}
break;
case 8LL:
if ( *(_QWORD *)a2 == 0x6465636E61766461LL )
{
*(_QWORD *)(a1 + 32) = evmone::advanced::execute;
goto LABEL_22;
}
break;
case 9LL:
if ( !(unsigned int)bcmp(a2, "histogram", v4) )
{
evmone::create_histogram_tracer(&v14, &std::clog);
v11 = (_QWORD *)(a1 + 88);
do
{
v8 = v11;
v12 = *v11;
v11 = (_QWORD *)(*v11 + 8LL);
}
while ( v12 );
v10 = v14;
LABEL_17:
*v8 = v10;
goto LABEL_22;
}
break;
case 12LL:
if ( !(unsigned int)bcmp(a2, "validate_eof", v4) )
{
*(_BYTE *)(a1 + 57) = 1;
LABEL_22:
v6 = 0;
}
break;
default:
return v6;
}
return v6;
}
|
set_option:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
TEST RSI,RSI
JZ 0x0012e3ea
MOV RDI,R14
CALL 0x001210d0
MOV R12,RAX
JMP 0x0012e3ed
LAB_0012e3ea:
XOR R12D,R12D
LAB_0012e3ed:
TEST R15,R15
JZ 0x0012e404
MOV RDI,R15
CALL 0x001210d0
CMP RAX,0x2
SETZ R13B
JMP 0x0012e407
LAB_0012e404:
XOR R13D,R13D
LAB_0012e407:
MOV EBP,0x1
LEA RAX,[R12 + -0x5]
CMP RAX,0x7
JA 0x0012e504
LEA RCX,[0x180bf8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
LEA RSI,[0x180d4f]
MOV RDI,R14
MOV RDX,R12
CALL 0x00121210
TEST EAX,EAX
JZ 0x0012e515
MOV EAX,0x63617274
XOR EAX,dword ptr [R14]
MOVZX ECX,byte ptr [R14 + 0x4]
XOR ECX,0x65
OR ECX,EAX
JNZ 0x0012e504
LAB_0012e45d:
MOV RSI,qword ptr [0x001bdf90]
LEA RDI,[RSP + 0x10]
CALL 0x001498ff
ADD RBX,0x58
LAB_0012e472:
MOV RAX,RBX
MOV RCX,qword ptr [RBX]
LEA RBX,[RCX + 0x8]
TEST RCX,RCX
JNZ 0x0012e472
MOV RCX,qword ptr [RSP + 0x10]
JMP 0x0012e4c7
caseD_9:
LEA RSI,[0x180d5e]
MOV RDI,R14
MOV RDX,R12
CALL 0x00121210
TEST EAX,EAX
JNZ 0x0012e504
MOV RSI,qword ptr [0x001bdf90]
LEA RDI,[RSP + 0x8]
CALL 0x001497ec
ADD RBX,0x58
LAB_0012e4b3:
MOV RAX,RBX
MOV RCX,qword ptr [RBX]
LEA RBX,[RCX + 0x8]
TEST RCX,RCX
JNZ 0x0012e4b3
MOV RCX,qword ptr [RSP + 0x8]
LAB_0012e4c7:
MOV qword ptr [RAX],RCX
JMP 0x0012e502
caseD_8:
MOV RAX,0x6465636e61766461
CMP qword ptr [R14],RAX
JNZ 0x0012e504
LEA RAX,[0x12f17a]
MOV qword ptr [RBX + 0x20],RAX
JMP 0x0012e502
caseD_c:
LEA RSI,[0x180d68]
MOV RDI,R14
MOV RDX,R12
CALL 0x00121210
TEST EAX,EAX
JNZ 0x0012e504
MOV byte ptr [RBX + 0x39],0x1
LAB_0012e502:
XOR EBP,EBP
caseD_6:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012e515:
MOV EBP,0x2
TEST R13B,R13B
JZ 0x0012e504
CMP word ptr [R15],0x6f6e
JNZ 0x0012e504
MOV byte ptr [RBX + 0x38],0x0
JMP 0x0012e502
|
/* evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*) */
int8 evmone::(anonymous_namespace)::set_option(evmc_vm *param_1,char *param_2,char *param_3)
{
evmc_vm *peVar1;
int iVar2;
size_t __n;
size_t sVar3;
evmc_vm *peVar4;
int8 uVar5;
bool bVar6;
long local_40;
long local_38;
if (param_2 == (char *)0x0) {
__n = 0;
}
else {
__n = strlen(param_2);
}
if (param_3 == (char *)0x0) {
bVar6 = false;
}
else {
sVar3 = strlen(param_3);
bVar6 = sVar3 == 2;
}
uVar5 = 1;
switch(__n) {
case 5:
iVar2 = bcmp(param_2,&DAT_00180d4f,__n);
if (iVar2 != 0) {
if (param_2[4] != 'e' || *(int *)param_2 != 0x63617274) {
return 1;
}
/* try { // try from 0012e45d to 0012e4ae has its CatchHandler @ 0012e52d */
create_instruction_tracer((ostream *)&local_38);
peVar1 = param_1 + 0x58;
do {
peVar4 = peVar1;
local_40 = local_38;
peVar1 = (evmc_vm *)(*(long *)peVar4 + 8);
} while (*(long *)peVar4 != 0);
goto LAB_0012e4c7;
}
if (!bVar6) {
return 2;
}
if (*(short *)param_3 != 0x6f6e) {
return 2;
}
param_1[0x38] = (evmc_vm)0x0;
break;
default:
goto switchD_0012e429_caseD_6;
case 8:
if (*(long *)param_2 != 0x6465636e61766461) {
return 1;
}
*(code **)(param_1 + 0x20) = advanced::execute;
break;
case 9:
iVar2 = bcmp(param_2,"histogram",__n);
if (iVar2 != 0) {
return 1;
}
create_histogram_tracer((evmone *)&local_40,(ostream *)PTR_clog_001bdf90);
peVar1 = param_1 + 0x58;
do {
peVar4 = peVar1;
peVar1 = (evmc_vm *)(*(long *)peVar4 + 8);
} while (*(long *)peVar4 != 0);
LAB_0012e4c7:
*(long *)peVar4 = local_40;
break;
case 0xc:
iVar2 = bcmp(param_2,"validate_eof",__n);
if (iVar2 != 0) {
return 1;
}
param_1[0x39] = (evmc_vm)0x1;
}
uVar5 = 0;
switchD_0012e429_caseD_6:
return uVar5;
}
|
|
63,726 |
google::protobuf::compiler::objectivec::EnumGenerator::~EnumGenerator()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
|
EnumGenerator::~EnumGenerator() {}
|
O3
|
cpp
|
google::protobuf::compiler::objectivec::EnumGenerator::~EnumGenerator():
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
leaq 0x78(%rbx), %rax
cmpq %rax, %rdi
je 0xeacd2
callq 0x1f4a0
leaq 0x38(%rbx), %rdi
callq 0xec042
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xeace9
callq 0x1f4a0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xeacf8
popq %rbx
jmp 0x1f4a0
popq %rbx
retq
|
_ZN6google8protobuf8compiler10objectivec13EnumGeneratorD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+68h]; void *
lea rax, [rbx+78h]
cmp rdi, rax
jz short loc_EACD2
call __ZdlPv; operator delete(void *)
loc_EACD2:
lea rdi, [rbx+38h]
call _ZNSt8_Rb_treeIPKN6google8protobuf19EnumValueDescriptorES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EED2Ev; std::_Rb_tree<google::protobuf::EnumValueDescriptor const*,google::protobuf::EnumValueDescriptor const*,std::_Identity<google::protobuf::EnumValueDescriptor const*>,std::less<google::protobuf::EnumValueDescriptor const*>,std::allocator<google::protobuf::EnumValueDescriptor const*>>::~_Rb_tree()
mov rdi, [rbx+20h]; void *
test rdi, rdi
jz short loc_EACE9
call __ZdlPv; operator delete(void *)
loc_EACE9:
mov rdi, [rbx+8]; void *
test rdi, rdi
jz short loc_EACF8
pop rbx
jmp __ZdlPv; operator delete(void *)
loc_EACF8:
pop rbx
retn
|
void google::protobuf::compiler::objectivec::EnumGenerator::~EnumGenerator(
google::protobuf::compiler::objectivec::EnumGenerator *this)
{
char *v2; // rdi
void *v3; // rdi
void *v4; // rdi
v2 = (char *)*((_QWORD *)this + 13);
if ( v2 != (char *)this + 120 )
operator delete(v2);
std::_Rb_tree<google::protobuf::EnumValueDescriptor const*,google::protobuf::EnumValueDescriptor const*,std::_Identity<google::protobuf::EnumValueDescriptor const*>,std::less<google::protobuf::EnumValueDescriptor const*>,std::allocator<google::protobuf::EnumValueDescriptor const*>>::~_Rb_tree((char *)this + 56);
v3 = (void *)*((_QWORD *)this + 4);
if ( v3 )
operator delete(v3);
v4 = (void *)*((_QWORD *)this + 1);
if ( v4 )
operator delete(v4);
}
|
~EnumGenerator:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x68]
LEA RAX,[RBX + 0x78]
CMP RDI,RAX
JZ 0x001eacd2
CALL 0x0011f4a0
LAB_001eacd2:
LEA RDI,[RBX + 0x38]
CALL 0x001ec042
MOV RDI,qword ptr [RBX + 0x20]
TEST RDI,RDI
JZ 0x001eace9
CALL 0x0011f4a0
LAB_001eace9:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x001eacf8
POP RBX
JMP 0x0011f4a0
LAB_001eacf8:
POP RBX
RET
|
/* google::protobuf::compiler::objectivec::EnumGenerator::~EnumGenerator() */
void __thiscall
google::protobuf::compiler::objectivec::EnumGenerator::~EnumGenerator(EnumGenerator *this)
{
if (*(EnumGenerator **)(this + 0x68) != this + 0x78) {
operator_delete(*(EnumGenerator **)(this + 0x68));
}
std::
_Rb_tree<google::protobuf::EnumValueDescriptor_const*,google::protobuf::EnumValueDescriptor_const*,std::_Identity<google::protobuf::EnumValueDescriptor_const*>,std::less<google::protobuf::EnumValueDescriptor_const*>,std::allocator<google::protobuf::EnumValueDescriptor_const*>>
::~_Rb_tree((_Rb_tree<google::protobuf::EnumValueDescriptor_const*,google::protobuf::EnumValueDescriptor_const*,std::_Identity<google::protobuf::EnumValueDescriptor_const*>,std::less<google::protobuf::EnumValueDescriptor_const*>,std::allocator<google::protobuf::EnumValueDescriptor_const*>>
*)(this + 0x38));
if (*(void **)(this + 0x20) != (void *)0x0) {
operator_delete(*(void **)(this + 0x20));
}
if (*(void **)(this + 8) != (void *)0x0) {
operator_delete(*(void **)(this + 8));
return;
}
return;
}
|
|
63,727 |
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment()
|
llama.cpp/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<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x21640
cmpl $0x2f, %eax
je 0x85589
cmpl $0x2a, %eax
jne 0x855a6
movq %rbx, %rdi
callq 0x21640
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x855af
cmpl $0x2a, %eax
jne 0x8555d
movq %rbx, %rdi
callq 0x21640
cmpl $0x2f, %eax
je 0x855a2
movq %rbx, %rdi
callq 0x85e18
jmp 0x8555d
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x21640
incl %eax
cmpl $0xf, %eax
jae 0x8558e
btl %eax, %ebp
jae 0x8558e
movb $0x1, %al
jmp 0x855bc
leaq 0x944f1(%rip), %rax # 0x119a9e
jmp 0x855b6
leaq 0x944c2(%rip), %rax # 0x119a78
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_85589
cmp eax, 2Ah ; '*'
jnz short loc_855A6
loc_8555D:
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_855AF
cmp eax, 2Ah ; '*'
jnz short loc_8555D
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_855A2
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_8555D
loc_85589:
mov ebp, 4803h
loc_8558E:
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_8558E
bt ebp, eax
jnb short loc_8558E
loc_855A2:
mov al, 1
jmp short loc_855BC
loc_855A6:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_855B6
loc_855AF:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_855B6:
mov [rbx+70h], rax
xor eax, eax
loc_855BC:
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 0x00121640
CMP EAX,0x2f
JZ 0x00185589
CMP EAX,0x2a
JNZ 0x001855a6
LAB_0018555d:
MOV RDI,RBX
CALL 0x00121640
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x001855af
CMP EAX,0x2a
JNZ 0x0018555d
MOV RDI,RBX
CALL 0x00121640
CMP EAX,0x2f
JZ 0x001855a2
MOV RDI,RBX
CALL 0x00185e18
JMP 0x0018555d
LAB_00185589:
MOV EBP,0x4803
LAB_0018558e:
MOV RDI,RBX
CALL 0x00121640
INC EAX
CMP EAX,0xf
JNC 0x0018558e
BT EBP,EAX
JNC 0x0018558e
LAB_001855a2:
MOV AL,0x1
JMP 0x001855bc
LAB_001855a6:
LEA RAX,[0x219a9e]
JMP 0x001855b6
LAB_001855af:
LEA RAX,[0x219a78]
LAB_001855b6:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_001855bc:
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_001855a2:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_001855a2;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
|
|
63,728 |
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;
}
|
O3
|
c
|
my_casedn_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0xc4639
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0xc4637
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0xc4600
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0xc4600
leaq (%r9,%r9,2), %r9
movl 0x4(%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0xc4637
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0xc4637
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x8(%rsi), %r9
addq $0x4, %rcx
addq $0x4, %rsi
cmpq %rdx, %r9
jbe 0xc45af
popq %rbx
popq %rbp
retq
|
my_casedn_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_C4639
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_C45AF:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_C4637
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_C4600
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_C4600
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4+4]
loc_C4600:
cmp rcx, r8
ja short loc_C4637
cmp ebx, offset unk_10FFFF
ja short loc_C4637
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+8]
add rcx, 4
add rsi, 4
cmp r9, rdx
jbe loc_C45AF
loc_C4637:
pop rbx
pop rbp
locret_C4639:
retn
|
long long my_casedn_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned __int8 *v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
unsigned __int8 *v14; // r9
result = a3;
if ( a3 >= 4 )
{
v6 = &a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11 + 4);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
v14 = a2 + 8;
v9 += 4LL;
a2 += 4;
}
while ( v14 <= v6 );
}
return result;
}
|
my_casedn_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x001c4639
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_001c45af:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x001c4637
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x001c4600
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x001c4600
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4 + 0x4]
LAB_001c4600:
CMP RCX,R8
JA 0x001c4637
CMP EBX,0x10ffff
JA 0x001c4637
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x8]
ADD RCX,0x4
ADD RSI,0x4
CMP R9,RDX
JBE 0x001c45af
LAB_001c4637:
POP RBX
POP RBP
LAB_001c4639:
RET
|
void my_casedn_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
byte *pbVar1;
byte *pbVar2;
ulong *puVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
if (3 < param_3) {
pbVar2 = param_2 + param_3;
puVar3 = *(ulong **)(param_1 + 0x78);
uVar5 = param_4 + 4;
while (uVar7 = (uint)param_2[1] << 0x10 | (uint)*param_2 << 0x18, uVar7 < 0x110000) {
uVar6 = (ulong)CONCAT11(param_2[2],param_2[3]) | (ulong)uVar7;
if ((uVar6 <= *puVar3) && (lVar4 = *(long *)(puVar3[1] + (uVar6 >> 8) * 8), lVar4 != 0)) {
uVar6 = (ulong)*(uint *)(lVar4 + 4 + (ulong)param_2[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar5) {
return;
}
if (0x10ffff < (uint)uVar6) {
return;
}
*(int1 *)(uVar5 - 4) = 0;
*(char *)(uVar5 - 3) = (char)(uVar6 >> 0x10);
*(char *)(uVar5 - 2) = (char)(uVar6 >> 8);
*(char *)(uVar5 - 1) = (char)uVar6;
pbVar1 = param_2 + 8;
uVar5 = uVar5 + 4;
param_2 = param_2 + 4;
if (pbVar2 < pbVar1) {
return;
}
}
}
return;
}
|
|
63,729 |
js_default_module_normalize_name
|
bluesky950520[P]quickjs/quickjs.c
|
static char *js_default_module_normalize_name(JSContext *ctx,
const char *base_name,
const char *name)
{
char *filename, *p;
const char *r;
int cap;
int len;
if (name[0] != '.') {
/* if no initial dot, the module name is not modified */
return js_strdup(ctx, name);
}
p = strrchr(base_name, '/');
if (p)
len = p - base_name;
else
len = 0;
cap = len + strlen(name) + 1 + 1;
filename = js_malloc(ctx, cap);
if (!filename)
return NULL;
memcpy(filename, base_name, len);
filename[len] = '\0';
/* we only normalize the leading '..' or '.' */
r = name;
for(;;) {
if (r[0] == '.' && r[1] == '/') {
r += 2;
} else if (r[0] == '.' && r[1] == '.' && r[2] == '/') {
/* remove the last path element of filename, except if "."
or ".." */
if (filename[0] == '\0')
break;
p = strrchr(filename, '/');
if (!p)
p = filename;
else
p++;
if (!strcmp(p, ".") || !strcmp(p, ".."))
break;
if (p > filename)
p--;
*p = '\0';
r += 3;
} else {
break;
}
}
if (filename[0] != '\0')
js__pstrcat(filename, cap, "/");
js__pstrcat(filename, cap, r);
// printf("normalize: %s %s -> %s\n", base_name, name, filename);
return filename;
}
|
O0
|
c
|
js_default_module_normalize_name:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
je 0x745f9
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x22000
movq %rax, 0x40(%rsp)
jmp 0x74802
movq 0x30(%rsp), %rdi
movl $0x2f, %esi
callq 0xe300
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x74628
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x8(%rsp)
jmp 0x74630
movl $0x0, 0x8(%rsp)
movslq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
callq 0xe240
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
addq $0x1, %rax
addq $0x1, %rax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x21cb0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x74683
movq $0x0, 0x40(%rsp)
jmp 0x74802
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
movslq 0x8(%rsp), %rdx
callq 0xe5b0
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x746dd
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x746dd
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
jmp 0x747be
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x747ba
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0x747ba
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x2f, %eax
jne 0x747ba
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x74724
jmp 0x747c3
movq 0x20(%rsp), %rdi
movl $0x2f, %esi
callq 0xe300
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x7474c
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x7475a
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x9b4f4(%rip), %rsi # 0x10fc5a
callq 0xe510
cmpl $0x0, %eax
je 0x74786
movq 0x18(%rsp), %rdi
leaq 0x9b4dd(%rip), %rsi # 0x10fc59
callq 0xe510
cmpl $0x0, %eax
jne 0x74788
jmp 0x747c3
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x747a2
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq 0x10(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x10(%rsp)
jmp 0x747bc
jmp 0x747c3
jmp 0x747be
jmp 0x746af
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x747e5
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
leaq 0x95318(%rip), %rdx # 0x109af8
callq 0x1e1d0
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x1e1d0
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
|
js_default_module_normalize_name:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_20], rdx
mov rax, [rsp+48h+var_20]
movzx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jz short loc_745F9
mov rdi, [rsp+48h+var_10]
mov rsi, [rsp+48h+var_20]
call js_strdup
mov [rsp+48h+var_8], rax
jmp loc_74802
loc_745F9:
mov rdi, [rsp+48h+var_18]
mov esi, 2Fh ; '/'
call _strrchr
mov [rsp+48h+var_30], rax
cmp [rsp+48h+var_30], 0
jz short loc_74628
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_18]
sub rax, rcx
mov [rsp+48h+var_40], eax
jmp short loc_74630
loc_74628:
mov [rsp+48h+var_40], 0
loc_74630:
movsxd rax, [rsp+48h+var_40]
mov [rsp+48h+var_48], rax
mov rdi, [rsp+48h+var_20]
call _strlen
mov rcx, rax
mov rax, [rsp+48h+var_48]
add rax, rcx
add rax, 1
add rax, 1
mov [rsp+48h+var_3C], eax
mov rdi, [rsp+48h+var_10]
movsxd rsi, [rsp+48h+var_3C]
call js_malloc
mov [rsp+48h+var_28], rax
cmp [rsp+48h+var_28], 0
jnz short loc_74683
mov [rsp+48h+var_8], 0
jmp loc_74802
loc_74683:
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_18]
movsxd rdx, [rsp+48h+var_40]
call _memcpy
mov rax, [rsp+48h+var_28]
movsxd rcx, [rsp+48h+var_40]
mov byte ptr [rax+rcx], 0
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_38], rax
loc_746AF:
mov rax, [rsp+48h+var_38]
movzx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz short loc_746DD
mov rax, [rsp+48h+var_38]
movzx eax, byte ptr [rax+1]
cmp eax, 2Fh ; '/'
jnz short loc_746DD
mov rax, [rsp+48h+var_38]
add rax, 2
mov [rsp+48h+var_38], rax
jmp loc_747BE
loc_746DD:
mov rax, [rsp+48h+var_38]
movzx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_747BA
mov rax, [rsp+48h+var_38]
movzx eax, byte ptr [rax+1]
cmp eax, 2Eh ; '.'
jnz loc_747BA
mov rax, [rsp+48h+var_38]
movzx eax, byte ptr [rax+2]
cmp eax, 2Fh ; '/'
jnz loc_747BA
mov rax, [rsp+48h+var_28]
movzx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_74724
jmp loc_747C3
loc_74724:
mov rdi, [rsp+48h+var_28]
mov esi, 2Fh ; '/'
call _strrchr
mov [rsp+48h+var_30], rax
cmp [rsp+48h+var_30], 0
jnz short loc_7474C
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_30], rax
jmp short loc_7475A
loc_7474C:
mov rax, [rsp+48h+var_30]
add rax, 1
mov [rsp+48h+var_30], rax
loc_7475A:
mov rdi, [rsp+48h+var_30]
lea rsi, aMissingBinding+19h; "."
call _strcmp
cmp eax, 0
jz short loc_74786
mov rdi, [rsp+48h+var_30]
lea rsi, aMissingBinding+18h; ".."
call _strcmp
cmp eax, 0
jnz short loc_74788
loc_74786:
jmp short loc_747C3
loc_74788:
mov rax, [rsp+48h+var_30]
cmp rax, [rsp+48h+var_28]
jbe short loc_747A2
mov rax, [rsp+48h+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_30], rax
loc_747A2:
mov rax, [rsp+48h+var_30]
mov byte ptr [rax], 0
mov rax, [rsp+48h+var_38]
add rax, 3
mov [rsp+48h+var_38], rax
jmp short loc_747BC
loc_747BA:
jmp short loc_747C3
loc_747BC:
jmp short $+2
loc_747BE:
jmp loc_746AF
loc_747C3:
mov rax, [rsp+48h+var_28]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_747E5
mov rdi, [rsp+48h+var_28]
mov esi, [rsp+48h+var_3C]
lea rdx, asc_109AF7+1; "/"
call js__pstrcat
loc_747E5:
mov rdi, [rsp+48h+var_28]
mov esi, [rsp+48h+var_3C]
mov rdx, [rsp+48h+var_38]
call js__pstrcat
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_8], rax
loc_74802:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long js_default_module_normalize_name(long long a1, long long a2, char *a3)
{
int v3; // eax
int v5; // [rsp+8h] [rbp-40h]
int v6; // [rsp+Ch] [rbp-3Ch]
char *i; // [rsp+10h] [rbp-38h]
long long v8; // [rsp+18h] [rbp-30h]
long long v9; // [rsp+18h] [rbp-30h]
_BYTE *v10; // [rsp+18h] [rbp-30h]
_BYTE *v11; // [rsp+20h] [rbp-28h]
if ( *a3 != 46 )
return js_strdup(a1, (long long)a3);
v8 = strrchr(a2, 47LL);
if ( v8 )
v5 = v8 - a2;
else
v5 = 0;
v6 = strlen(a3) + v5 + 2;
v11 = (_BYTE *)js_malloc(a1, v6);
if ( !v11 )
return 0LL;
memcpy(v11, a2, v5);
v11[v5] = 0;
for ( i = a3; ; i += 3 )
{
while ( *i == 46 && i[1] == 47 )
i += 2;
if ( *i != 46 || i[1] != 46 || i[2] != 47 || !*v11 )
break;
v9 = strrchr(v11, 47LL);
if ( v9 )
{
v10 = (_BYTE *)(v9 + 1);
v3 = strcmp(v10, ".");
}
else
{
v10 = v11;
v3 = strcmp(v11, ".");
}
if ( !v3 || !(unsigned int)strcmp(v10, "..") )
break;
if ( v10 > v11 )
--v10;
*v10 = 0;
}
if ( *v11 )
js__pstrcat((long long)v11, v6, "/");
js__pstrcat((long long)v11, v6, i);
return (long long)v11;
}
|
js_default_module_normalize_name:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2e
JZ 0x001745f9
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00122000
MOV qword ptr [RSP + 0x40],RAX
JMP 0x00174802
LAB_001745f9:
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,0x2f
CALL 0x0010e300
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00174628
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
SUB RAX,RCX
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00174630
LAB_00174628:
MOV dword ptr [RSP + 0x8],0x0
LAB_00174630:
MOVSXD RAX,dword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0010e240
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,RCX
ADD RAX,0x1
ADD RAX,0x1
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RSI,dword ptr [RSP + 0xc]
CALL 0x00121cb0
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x00174683
MOV qword ptr [RSP + 0x40],0x0
JMP 0x00174802
LAB_00174683:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x30]
MOVSXD RDX,dword ptr [RSP + 0x8]
CALL 0x0010e5b0
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
LAB_001746af:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x001746dd
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x2f
JNZ 0x001746dd
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x2
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001747be
LAB_001746dd:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x001747ba
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x2e
JNZ 0x001747ba
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0x2f
JNZ 0x001747ba
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00174724
JMP 0x001747c3
LAB_00174724:
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,0x2f
CALL 0x0010e300
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x0017474c
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0017475a
LAB_0017474c:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
LAB_0017475a:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20fc5a]
CALL 0x0010e510
CMP EAX,0x0
JZ 0x00174786
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20fc59]
CALL 0x0010e510
CMP EAX,0x0
JNZ 0x00174788
LAB_00174786:
JMP 0x001747c3
LAB_00174788:
MOV RAX,qword ptr [RSP + 0x18]
CMP RAX,qword ptr [RSP + 0x20]
JBE 0x001747a2
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x18],RAX
LAB_001747a2:
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x3
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001747bc
LAB_001747ba:
JMP 0x001747c3
LAB_001747bc:
JMP 0x001747be
LAB_001747be:
JMP 0x001746af
LAB_001747c3:
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001747e5
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0xc]
LEA RDX,[0x209af8]
CALL 0x0011e1d0
LAB_001747e5:
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0xc]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011e1d0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
LAB_00174802:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
char * js_default_module_normalize_name(int8 param_1,char *param_2,char *param_3)
{
int iVar1;
int iVar2;
char *pcVar3;
size_t sVar4;
int local_40;
char *local_38;
char *local_30;
char *local_8;
if (*param_3 == '.') {
pcVar3 = strrchr(param_2,0x2f);
if (pcVar3 == (char *)0x0) {
local_40 = 0;
}
else {
local_40 = (int)pcVar3 - (int)param_2;
}
sVar4 = strlen(param_3);
iVar1 = local_40 + (int)sVar4 + 2;
local_8 = (char *)js_malloc(param_1,(long)iVar1);
if (local_8 == (char *)0x0) {
local_8 = (char *)0x0;
}
else {
memcpy(local_8,param_2,(long)local_40);
local_8[local_40] = '\0';
local_38 = param_3;
while( true ) {
for (; (*local_38 == '.' && (local_38[1] == '/')); local_38 = local_38 + 2) {
}
if ((*local_38 != '.') ||
(((local_38[1] != '.' || (local_38[2] != '/')) || (*local_8 == '\0')))) break;
pcVar3 = strrchr(local_8,0x2f);
local_30 = local_8;
if (pcVar3 != (char *)0x0) {
local_30 = pcVar3 + 1;
}
iVar2 = strcmp(local_30,".");
if ((iVar2 == 0) || (iVar2 = strcmp(local_30,".."), iVar2 == 0)) break;
if (local_8 < local_30) {
local_30 = local_30 + -1;
}
*local_30 = '\0';
local_38 = local_38 + 3;
}
if (*local_8 != '\0') {
js__pstrcat(local_8,iVar1,&DAT_00209af8);
}
js__pstrcat(local_8,iVar1,local_38);
}
}
else {
local_8 = (char *)js_strdup(param_1,param_3);
}
return local_8;
}
|
|
63,730 |
testing::internal::CmpHelperSTRCASENE(char const*, char const*, char const*, char const*)
|
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
const char* s2_expression, const char* s1,
const char* s2) {
if (!String::CaseInsensitiveCStringEquals(s1, s2)) {
return AssertionSuccess();
} else {
return AssertionFailure()
<< "Expected: (" << s1_expression << ") != (" << s2_expression
<< ") (ignoring case), actual: \"" << s1 << "\" vs \"" << s2 << "\"";
}
}
|
O0
|
cpp
|
testing::internal::CmpHelperSTRCASENE(char const*, char const*, char const*, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x301f0
testb $0x1, %al
jne 0x30419
movq -0x58(%rbp), %rdi
callq 0x1f090
jmp 0x3052f
leaq -0x38(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x1f0c0
movq -0x68(%rbp), %rdi
leaq 0x41314(%rip), %rsi # 0x71745
callq 0x18a60
movq %rax, -0x60(%rbp)
jmp 0x3043c
movq -0x60(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x18ae0
movq %rax, -0x70(%rbp)
jmp 0x3044f
movq -0x70(%rbp), %rdi
leaq 0x441a6(%rip), %rsi # 0x74600
callq 0x4e580
movq %rax, -0x78(%rbp)
jmp 0x30465
movq -0x78(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x18ae0
movq %rax, -0x80(%rbp)
jmp 0x30478
movq -0x80(%rbp), %rdi
leaq 0x4418b(%rip), %rsi # 0x7460e
callq 0x4ef00
movq %rax, -0x88(%rbp)
jmp 0x30491
movq -0x88(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x18ae0
movq %rax, -0x90(%rbp)
jmp 0x304aa
movq -0x90(%rbp), %rdi
leaq 0x4414f(%rip), %rsi # 0x74607
callq 0x4e580
movq %rax, -0x98(%rbp)
jmp 0x304c6
movq -0x98(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x18ae0
movq %rax, -0xa0(%rbp)
jmp 0x304df
movq -0xa0(%rbp), %rdi
leaq 0x44b79(%rip), %rsi # 0x75066
callq 0x4e600
movq %rax, -0xa8(%rbp)
jmp 0x304fb
movq -0xa8(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x1eec0
jmp 0x3050d
leaq -0x38(%rbp), %rdi
callq 0x13ef0
jmp 0x3052f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x13ef0
jmp 0x3053c
movq -0x50(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xbcd0
nopw %cs:(%rax,%rax)
|
_ZN7testing8internal18CmpHelperSTRCASENEEPKcS2_S2_S2_:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_58], rdi
mov rax, rdi
mov [rbp+var_50], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_28]; char *
call _ZN7testing8internal6String28CaseInsensitiveCStringEqualsEPKcS3_; testing::internal::String::CaseInsensitiveCStringEquals(char const*,char const*)
test al, 1
jnz short loc_30419
mov rdi, [rbp+var_58]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_3052F
loc_30419:
lea rdi, [rbp+var_38]; this
mov [rbp+var_68], rdi
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
mov rdi, [rbp+var_68]
lea rsi, aExpected; "Expected: ("
call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&)
mov [rbp+var_60], rax
jmp short $+2
loc_3043C:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_10]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rbp+var_70], rax
jmp short $+2
loc_3044F:
mov rdi, [rbp+var_70]
lea rsi, asc_74600; ") != ("
call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&)
mov [rbp+var_78], rax
jmp short $+2
loc_30465:
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_18]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rbp+var_80], rax
jmp short $+2
loc_30478:
mov rdi, [rbp+var_80]
lea rsi, aIgnoringCaseAc; ") (ignoring case), actual: \""
call _ZN7testing15AssertionResultlsIA29_cEERS0_RKT_; testing::AssertionResult::operator<<<char [29]>(char [29] const&)
mov [rbp+var_88], rax
jmp short $+2
loc_30491:
mov rdi, [rbp+var_88]
lea rsi, [rbp+var_20]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rbp+var_90], rax
jmp short $+2
loc_304AA:
mov rdi, [rbp+var_90]
lea rsi, aVs_0; "\" vs \""
call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&)
mov [rbp+var_98], rax
jmp short $+2
loc_304C6:
mov rdi, [rbp+var_98]
lea rsi, [rbp+var_28]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rbp+var_A0], rax
jmp short $+2
loc_304DF:
mov rdi, [rbp+var_A0]
lea rsi, aFailure_0+0Fh; "\""
call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&)
mov [rbp+var_A8], rax
jmp short $+2
loc_304FB:
mov rsi, [rbp+var_A8]; testing::AssertionResult *
mov rdi, [rbp+var_58]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_3050D:
lea rdi, [rbp+var_38]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_3052F
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_38]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_3053C
loc_3052F:
mov rax, [rbp+var_50]
add rsp, 0B0h
pop rbp
retn
loc_3053C:
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
testing::internal * testing::internal::CmpHelperSTRCASENE(
testing::internal *this,
const char *a2,
const char *a3,
testing::internal::String *a4,
char *a5)
{
testing::AssertionResult *v6; // [rsp+8h] [rbp-A8h]
testing::AssertionResult *v7; // [rsp+10h] [rbp-A0h]
testing::AssertionResult *v8; // [rsp+18h] [rbp-98h]
testing::AssertionResult *v9; // [rsp+20h] [rbp-90h]
testing::AssertionResult *v10; // [rsp+28h] [rbp-88h]
testing::AssertionResult *v11; // [rsp+30h] [rbp-80h]
testing::AssertionResult *v12; // [rsp+38h] [rbp-78h]
testing::AssertionResult *v13; // [rsp+40h] [rbp-70h]
testing::AssertionResult *v14; // [rsp+50h] [rbp-60h]
_BYTE v15[16]; // [rsp+78h] [rbp-38h] BYREF
char *v16; // [rsp+88h] [rbp-28h] BYREF
testing::internal::String *v17; // [rsp+90h] [rbp-20h] BYREF
const char *v18; // [rsp+98h] [rbp-18h] BYREF
_QWORD v19[2]; // [rsp+A0h] [rbp-10h] BYREF
v19[1] = this;
v19[0] = a2;
v18 = a3;
v17 = a4;
v16 = a5;
if ( testing::internal::String::CaseInsensitiveCStringEquals(a4, a5, a3) )
{
testing::AssertionFailure((testing *)v15);
v14 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v15, (long long)"Expected: (");
v13 = testing::AssertionResult::operator<<<char const*>(v14, (long long)v19);
v12 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [7]>(v13, ") != (");
v11 = testing::AssertionResult::operator<<<char const*>(v12, (long long)&v18);
v10 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [29]>(
v11,
") (ignoring case), actual: \"");
v9 = testing::AssertionResult::operator<<<char const*>(v10, (long long)&v17);
v8 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [7]>(v9, "\" vs \"");
v7 = testing::AssertionResult::operator<<<char const*>(v8, (long long)&v16);
v6 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v7, "\"");
testing::AssertionResult::AssertionResult(this, v6);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v15);
}
else
{
testing::AssertionSuccess(this);
}
return this;
}
|
CmpHelperSTRCASENE:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001301f0
TEST AL,0x1
JNZ 0x00130419
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0011f090
JMP 0x0013052f
LAB_00130419:
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x68],RDI
CALL 0x0011f0c0
MOV RDI,qword ptr [RBP + -0x68]
LAB_0013042a:
LEA RSI,[0x171745]
CALL 0x00118a60
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0013043c
LAB_0013043c:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x10]
CALL 0x00118ae0
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0013044f
LAB_0013044f:
MOV RDI,qword ptr [RBP + -0x70]
LEA RSI,[0x174600]
CALL 0x0014e580
MOV qword ptr [RBP + -0x78],RAX
JMP 0x00130465
LAB_00130465:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x18]
CALL 0x00118ae0
MOV qword ptr [RBP + -0x80],RAX
JMP 0x00130478
LAB_00130478:
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[0x17460e]
CALL 0x0014ef00
MOV qword ptr [RBP + -0x88],RAX
JMP 0x00130491
LAB_00130491:
MOV RDI,qword ptr [RBP + -0x88]
LEA RSI,[RBP + -0x20]
CALL 0x00118ae0
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001304aa
LAB_001304aa:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[0x174607]
CALL 0x0014e580
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001304c6
LAB_001304c6:
MOV RDI,qword ptr [RBP + -0x98]
LEA RSI,[RBP + -0x28]
CALL 0x00118ae0
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001304df
LAB_001304df:
MOV RDI,qword ptr [RBP + -0xa0]
LEA RSI,[0x175066]
CALL 0x0014e600
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x001304fb
LAB_001304fb:
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0011eec0
LAB_0013050b:
JMP 0x0013050d
LAB_0013050d:
LEA RDI,[RBP + -0x38]
CALL 0x00113ef0
JMP 0x0013052f
LAB_0013052f:
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0xb0
POP RBP
RET
|
/* testing::internal::CmpHelperSTRCASENE(char const*, char const*, char const*, char const*) */
internal * __thiscall
testing::internal::CmpHelperSTRCASENE
(internal *this,char *param_1,char *param_2,char *param_3,char *param_4)
{
ulong uVar1;
AssertionResult *pAVar2;
testing local_40 [16];
char *local_30;
char *local_28;
char *local_20;
char *local_18;
internal *local_10;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
uVar1 = String::CaseInsensitiveCStringEquals(param_3,param_4);
if ((uVar1 & 1) == 0) {
AssertionSuccess((testing *)this);
}
else {
AssertionFailure(local_40);
/* try { // try from 0013042a to 0013050a has its CatchHandler @ 00130518 */
pAVar2 = AssertionResult::operator<<((AssertionResult *)local_40,"Expected: (");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_18);
pAVar2 = AssertionResult::operator<<(pAVar2,") != (");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_20);
pAVar2 = AssertionResult::operator<<(pAVar2,") (ignoring case), actual: \"");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_28);
pAVar2 = AssertionResult::operator<<(pAVar2,"\" vs \"");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_30);
pAVar2 = AssertionResult::operator<<(pAVar2,"\"");
AssertionResult::AssertionResult((AssertionResult *)this,pAVar2);
AssertionResult::~AssertionResult((AssertionResult *)local_40);
}
return this;
}
|
|
63,731 |
flush_partitioned_key_cache_blocks
|
eloqsql/mysys/mf_keycache.c
|
static
int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache,
File file, void *file_extra,
enum flush_type type)
{
uint i;
uint partitions= keycache->partitions;
int err= 0;
ulonglong *dirty_part_map= (ulonglong *) file_extra;
DBUG_ENTER("partitioned_flush_key_blocks");
DBUG_PRINT("enter", ("keycache: %p", keycache));
for (i= 0; i < partitions; i++)
{
SIMPLE_KEY_CACHE_CB *partition= keycache->partition_array[i];
if ((type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) &&
!((*dirty_part_map) & ((ulonglong) 1 << i)))
continue;
err|= MY_TEST(flush_simple_key_cache_blocks(partition, file, 0, type));
}
*dirty_part_map= 0;
DBUG_RETURN(err);
}
|
O0
|
c
|
flush_partitioned_key_cache_blocks:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xe97c1
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xe9842
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0xe97ef
cmpl $0x3, -0x1c(%rbp)
jne 0xe980f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xe980f
jmp 0xe9837
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
callq 0xe7d80
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xe97c8
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
flush_partitioned_key_cache_blocks:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short $+2
loc_E97C1:
mov [rbp+var_20], 0
loc_E97C8:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_24]
jnb short loc_E9842
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
cmp [rbp+var_1C], 0
jz short loc_E97EF
cmp [rbp+var_1C], 3
jnz short loc_E980F
loc_E97EF:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jnz short loc_E980F
jmp short loc_E9837
loc_E980F:
mov rdi, [rbp+var_38]
mov esi, [rbp+var_C]
mov ecx, [rbp+var_1C]
xor eax, eax
mov edx, eax
call flush_simple_key_cache_blocks
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
or eax, [rbp+var_28]
mov [rbp+var_28], eax
loc_E9837:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_E97C8
loc_E9842:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov eax, [rbp+var_28]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
|
long long flush_partitioned_key_cache_blocks(long long a1, unsigned int a2, _QWORD *a3, unsigned int a4)
{
unsigned int v6; // [rsp+18h] [rbp-28h]
unsigned int v7; // [rsp+1Ch] [rbp-24h]
unsigned int i; // [rsp+20h] [rbp-20h]
v7 = *(_DWORD *)(a1 + 28);
v6 = 0;
for ( i = 0; i < v7; ++i )
{
if ( a4 && a4 != 3 || ((1LL << i) & *a3) != 0 )
v6 |= (unsigned int)flush_simple_key_cache_blocks(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, 0LL, a4) != 0;
}
*a3 = 0LL;
return v6;
}
|
flush_partitioned_key_cache_blocks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e97c1
LAB_001e97c1:
MOV dword ptr [RBP + -0x20],0x0
LAB_001e97c8:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001e9842
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x001e97ef
CMP dword ptr [RBP + -0x1c],0x3
JNZ 0x001e980f
LAB_001e97ef:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JNZ 0x001e980f
JMP 0x001e9837
LAB_001e980f:
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [RBP + -0x1c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001e7d80
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x28],EAX
LAB_001e9837:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001e97c8
LAB_001e9842:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
byte flush_partitioned_key_cache_blocks(long param_1,int4 param_2,ulong *param_3,int param_4)
{
uint uVar1;
byte bVar2;
int iVar3;
uint local_28;
uVar1 = *(uint *)(param_1 + 0x1c);
bVar2 = 0;
for (local_28 = 0; local_28 < uVar1; local_28 = local_28 + 1) {
if (((param_4 != 0) && (param_4 != 3)) || ((*param_3 & 1L << ((byte)local_28 & 0x3f)) != 0)) {
iVar3 = flush_simple_key_cache_blocks
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_28 * 8),param_2,0,
param_4);
bVar2 = iVar3 != 0 | bVar2;
}
}
*param_3 = 0;
return bVar2;
}
|
|
63,732 |
ggml_gallocr_set_parse_seq
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c
|
void ggml_gallocr_set_parse_seq(ggml_gallocr_t galloc, const int * list, int n) {
free(galloc->parse_seq);
galloc->parse_seq = malloc(sizeof(int) * n);
for (int i = 0; i < n; i++) {
galloc->parse_seq[i] = list[i];
}
galloc->parse_seq_len = n;
}
|
O2
|
c
|
ggml_gallocr_set_parse_seq:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0xa710
movslq %ebx, %r12
leaq (,%r12,4), %rdi
callq 0xa7e0
movq %rax, 0x30(%r14)
xorl %ecx, %ecx
testl %r12d, %r12d
movl $0x0, %edx
cmovgl %ebx, %edx
cmpq %rcx, %rdx
je 0x8f0e3
movl (%r15,%rcx,4), %esi
movl %esi, (%rax,%rcx,4)
incq %rcx
jmp 0x8f0d2
movl %ebx, 0x38(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
ggml_gallocr_set_parse_seq:
push r15
push r14
push r12
push rbx
push rax
mov ebx, edx
mov r15, rsi
mov r14, rdi
mov rdi, [rdi+30h]
call _free
movsxd r12, ebx
lea rdi, ds:0[r12*4]
call _malloc
mov [r14+30h], rax
xor ecx, ecx
test r12d, r12d
mov edx, 0
cmovg edx, ebx
loc_8F0D2:
cmp rdx, rcx
jz short loc_8F0E3
mov esi, [r15+rcx*4]
mov [rax+rcx*4], esi
inc rcx
jmp short loc_8F0D2
loc_8F0E3:
mov [r14+38h], ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long ggml_gallocr_set_parse_seq(long long a1, long long a2, int a3)
{
long long result; // rax
long long v5; // rcx
long long v6; // rdx
free(*(_QWORD *)(a1 + 48));
result = malloc(4LL * a3);
*(_QWORD *)(a1 + 48) = result;
v5 = 0LL;
v6 = 0LL;
if ( a3 > 0 )
v6 = (unsigned int)a3;
while ( v6 != v5 )
{
*(_DWORD *)(result + 4 * v5) = *(_DWORD *)(a2 + 4 * v5);
++v5;
}
*(_DWORD *)(a1 + 56) = a3;
return result;
}
|
ggml_gallocr_set_parse_seq:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x30]
CALL 0x0010a710
MOVSXD R12,EBX
LEA RDI,[R12*0x4]
CALL 0x0010a7e0
MOV qword ptr [R14 + 0x30],RAX
XOR ECX,ECX
TEST R12D,R12D
MOV EDX,0x0
CMOVG EDX,EBX
LAB_0018f0d2:
CMP RDX,RCX
JZ 0x0018f0e3
MOV ESI,dword ptr [R15 + RCX*0x4]
MOV dword ptr [RAX + RCX*0x4],ESI
INC RCX
JMP 0x0018f0d2
LAB_0018f0e3:
MOV dword ptr [R14 + 0x38],EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void ggml_gallocr_set_parse_seq(long param_1,long param_2,uint param_3)
{
void *pvVar1;
ulong uVar2;
ulong uVar3;
free(*(void **)(param_1 + 0x30));
pvVar1 = malloc((long)(int)param_3 * 4);
*(void **)(param_1 + 0x30) = pvVar1;
uVar2 = 0;
uVar3 = 0;
if (0 < (int)param_3) {
uVar3 = (ulong)param_3;
}
for (; uVar3 != uVar2; uVar2 = uVar2 + 1) {
*(int4 *)((long)pvVar1 + uVar2 * 4) = *(int4 *)(param_2 + uVar2 * 4);
}
*(uint *)(param_1 + 0x38) = param_3;
return;
}
|
|
63,733 |
create_logfile_by_number_no_cache
|
eloqsql/storage/maria/ma_loghandler.c
|
static File create_logfile_by_number_no_cache(uint32 file_no)
{
File file;
char path[FN_REFLEN];
DBUG_ENTER("create_logfile_by_number_no_cache");
if (translog_status != TRANSLOG_OK)
DBUG_RETURN(-1);
/* TODO: add O_DIRECT to open flags (when buffer is aligned) */
if ((file= mysql_file_create(key_file_translog,
translog_filename_by_fileno(file_no, path),
0, O_BINARY | O_RDWR | O_CLOEXEC, MYF(MY_WME))) < 0)
{
DBUG_PRINT("error", ("Error %d during creating file '%s'", errno, path));
translog_stop_writing();
DBUG_RETURN(-1);
}
if (sync_log_dir >= TRANSLOG_SYNC_DIR_NEWFILE &&
sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD)))
{
DBUG_PRINT("error", ("Error %d during syncing directory '%s'",
errno, log_descriptor.directory));
mysql_file_close(file, MYF(0));
translog_stop_writing();
DBUG_RETURN(-1);
}
DBUG_PRINT("info", ("File: '%s' handler: %d", path, file));
DBUG_RETURN(file);
}
|
O0
|
c
|
create_logfile_by_number_no_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x218(%rbp)
cmpl $0x1, 0x44fe8b(%rip) # 0x47eb80
je 0x2ed08
jmp 0x2ecf9
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x2ede1
leaq 0x44fdf5(%rip), %rax # 0x47eb04
movl (%rax), %eax
movl %eax, -0x220(%rbp)
movl -0x218(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x2baf0
movl -0x220(%rbp), %edi
movq %rax, %rcx
leaq 0x128671(%rip), %rsi # 0x1573aa
movl $0x3df, %edx # imm = 0x3DF
xorl %r8d, %r8d
movl $0x80002, %r9d # imm = 0x80002
movq $0x10, (%rsp)
callq 0x35370
movl %eax, -0x21c(%rbp)
cmpl $0x0, %eax
jge 0x2ed74
jmp 0x2ed61
jmp 0x2ed63
callq 0x2bab0
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x2ede1
cmpq $0x1, 0x29589c(%rip) # 0x2c4618
jb 0x2edcf
movl 0x4512fc(%rip), %edx # 0x480080
leaq 0x12861f(%rip), %rdi # 0x1573aa
movl $0x3e6, %esi # imm = 0x3E6
movl $0x30, %ecx
callq 0x35460
cmpl $0x0, %eax
je 0x2edcf
jmp 0x2eda1
jmp 0x2eda3
movl -0x21c(%rbp), %edx
leaq 0x1285fa(%rip), %rdi # 0x1573aa
movl $0x3ea, %esi # imm = 0x3EA
xorl %eax, %eax
movl %eax, %ecx
callq 0x2c190
callq 0x2bab0
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x2ede1
jmp 0x2edd1
jmp 0x2edd3
jmp 0x2edd5
movl -0x21c(%rbp), %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, -0x224(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2ee0e
movl -0x224(%rbp), %eax
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
|
create_logfile_by_number_no_cache:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], edi
cmp cs:translog_status, 1
jz short loc_2ED08
jmp short $+2
loc_2ECF9:
mov [rbp+var_214], 0FFFFFFFFh
jmp loc_2EDE1
loc_2ED08:
lea rax, key_file_translog
mov eax, [rax]
mov [rbp+var_220], eax
mov edi, [rbp+var_218]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov edi, [rbp+var_220]
mov rcx, rax
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3DFh
xor r8d, r8d
mov r9d, 80002h
mov [rsp+230h+var_230], 10h
call inline_mysql_file_create
mov [rbp+var_21C], eax
cmp eax, 0
jge short loc_2ED74
jmp short $+2
loc_2ED61:
jmp short $+2
loc_2ED63:
call translog_stop_writing
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_2EDE1
loc_2ED74:
cmp cs:sync_log_dir, 1
jb short loc_2EDCF
mov edx, cs:dword_480080
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E6h
mov ecx, 30h ; '0'
call inline_mysql_file_sync
cmp eax, 0
jz short loc_2EDCF
jmp short $+2
loc_2EDA1:
jmp short $+2
loc_2EDA3:
mov edx, [rbp+var_21C]
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3EAh
xor eax, eax
mov ecx, eax
call inline_mysql_file_close
call translog_stop_writing
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_2EDE1
loc_2EDCF:
jmp short $+2
loc_2EDD1:
jmp short $+2
loc_2EDD3:
jmp short $+2
loc_2EDD5:
mov eax, [rbp+var_21C]
mov [rbp+var_214], eax
loc_2EDE1:
mov eax, [rbp+var_214]
mov [rbp+var_224], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2EE0E
mov eax, [rbp+var_224]
add rsp, 230h
pop rbp
retn
loc_2EE0E:
call ___stack_chk_fail
|
long long create_logfile_by_number_no_cache(
unsigned int a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6)
{
int v6; // eax
int v8; // [rsp+10h] [rbp-220h]
signed int v9; // [rsp+14h] [rbp-21Ch]
_BYTE v11[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v12; // [rsp+228h] [rbp-8h]
v12 = __readfsqword(0x28u);
if ( translog_status == 1 )
{
v8 = key_file_translog;
v6 = translog_filename_by_fileno(a1, (long long)v11, a3, a4, a5, a6);
v9 = inline_mysql_file_create(
v8,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
991,
v6,
0,
524290,
16LL);
if ( v9 >= 0 )
{
if ( sync_log_dir
&& (unsigned int)inline_mysql_file_sync(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
998LL,
(unsigned int)dword_480080,
48LL) )
{
inline_mysql_file_close(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x3EAu,
v9,
0LL);
translog_stop_writing();
return (unsigned int)-1;
}
else
{
return (unsigned int)v9;
}
}
else
{
translog_stop_writing();
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
|
create_logfile_by_number_no_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x218],EDI
CMP dword ptr [0x0057eb80],0x1
JZ 0x0012ed08
JMP 0x0012ecf9
LAB_0012ecf9:
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x0012ede1
LAB_0012ed08:
LEA RAX,[0x57eb04]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x220],EAX
MOV EDI,dword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x0012baf0
MOV EDI,dword ptr [RBP + -0x220]
MOV RCX,RAX
LEA RSI,[0x2573aa]
MOV EDX,0x3df
XOR R8D,R8D
MOV R9D,0x80002
MOV qword ptr [RSP],0x10
CALL 0x00135370
MOV dword ptr [RBP + -0x21c],EAX
CMP EAX,0x0
JGE 0x0012ed74
JMP 0x0012ed61
LAB_0012ed61:
JMP 0x0012ed63
LAB_0012ed63:
CALL 0x0012bab0
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x0012ede1
LAB_0012ed74:
CMP qword ptr [0x003c4618],0x1
JC 0x0012edcf
MOV EDX,dword ptr [0x00580080]
LEA RDI,[0x2573aa]
MOV ESI,0x3e6
MOV ECX,0x30
CALL 0x00135460
CMP EAX,0x0
JZ 0x0012edcf
JMP 0x0012eda1
LAB_0012eda1:
JMP 0x0012eda3
LAB_0012eda3:
MOV EDX,dword ptr [RBP + -0x21c]
LEA RDI,[0x2573aa]
MOV ESI,0x3ea
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0012c190
CALL 0x0012bab0
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x0012ede1
LAB_0012edcf:
JMP 0x0012edd1
LAB_0012edd1:
JMP 0x0012edd3
LAB_0012edd3:
JMP 0x0012edd5
LAB_0012edd5:
MOV EAX,dword ptr [RBP + -0x21c]
MOV dword ptr [RBP + -0x214],EAX
LAB_0012ede1:
MOV EAX,dword ptr [RBP + -0x214]
MOV dword ptr [RBP + -0x224],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012ee0e
MOV EAX,dword ptr [RBP + -0x224]
ADD RSP,0x230
POP RBP
RET
LAB_0012ee0e:
CALL 0x0012a250
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int create_logfile_by_number_no_cache(int4 param_1)
{
int4 uVar1;
int iVar2;
int8 uVar3;
long in_FS_OFFSET;
int local_21c;
int1 local_218 [520];
long local_10;
uVar1 = key_file_translog;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (translog_status == 1) {
uVar3 = translog_filename_by_fileno(param_1,local_218);
local_21c = inline_mysql_file_create
(uVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x3df,uVar3,0,0x80002,0x10);
if (local_21c < 0) {
translog_stop_writing();
local_21c = -1;
}
else if ((sync_log_dir != 0) &&
(iVar2 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c"
,0x3e6,_DAT_00580080,0x30), iVar2 != 0)) {
inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x3ea,
local_21c,0);
translog_stop_writing();
local_21c = -1;
}
}
else {
local_21c = -1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_21c;
}
|
|
63,734 |
psi_rwlock_rdlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1c985e(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf9f50
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xf68b0
leaq 0x1c981b(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_rwlock_rdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_F68B0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_F68B0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[53])(v5, v4);
return v4;
}
|
psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f9f50
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001f68b0
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001f68b0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
63,735 |
bf_isqrt
|
bluesky950520[P]quickjs/libbf.c
|
limb_t bf_isqrt(limb_t a)
{
limb_t s, r;
int k;
if (a == 0)
return 0;
k = clz(a) & ~1;
s = mp_sqrtrem1(&r, a << k);
s >>= (k >> 1);
return s;
}
|
O2
|
c
|
bf_isqrt:
testq %rdi, %rdi
je 0x750c2
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rsi
bsrq %rdi, %rbx
xorq $0x3f, %rbx
movl %ebx, %ecx
andb $0x3e, %cl
shlq %cl, %rsi
leaq 0x8(%rsp), %rdi
callq 0x750c5
shrl %ebx
movl %ebx, %ecx
shrq %cl, %rax
addq $0x10, %rsp
popq %rbx
retq
xorl %eax, %eax
retq
|
bf_isqrt:
test rdi, rdi
jz short loc_750C2
push rbx
sub rsp, 10h
mov rsi, rdi
bsr rbx, rdi
xor rbx, 3Fh
mov ecx, ebx
and cl, 3Eh
shl rsi, cl
lea rdi, [rsp+18h+var_10]
call mp_sqrtrem1
shr ebx, 1
mov ecx, ebx
shr rax, cl
add rsp, 10h
pop rbx
retn
loc_750C2:
xor eax, eax
retn
|
unsigned long long bf_isqrt(unsigned long long a1)
{
unsigned long long v1; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-10h] BYREF
if ( !a1 )
return 0LL;
_BitScanReverse64(&v1, a1);
return (unsigned long long)mp_sqrtrem1(v3, a1 << ((v1 ^ 0x3F) & 0x3E)) >> (((unsigned int)v1 ^ 0x3F) >> 1);
}
|
bf_isqrt:
TEST RDI,RDI
JZ 0x001750c2
PUSH RBX
SUB RSP,0x10
MOV RSI,RDI
BSR RBX,RDI
XOR RBX,0x3f
MOV ECX,EBX
AND CL,0x3e
SHL RSI,CL
LEA RDI,[RSP + 0x8]
CALL 0x001750c5
SHR EBX,0x1
MOV ECX,EBX
SHR RAX,CL
ADD RSP,0x10
POP RBX
RET
LAB_001750c2:
XOR EAX,EAX
RET
|
ulong bf_isqrt(ulong param_1)
{
ulong uVar1;
ulong uVar2;
int1 auStack_10 [8];
if (param_1 != 0) {
uVar1 = 0x3f;
if (param_1 != 0) {
for (; param_1 >> uVar1 == 0; uVar1 = uVar1 - 1) {
}
}
uVar2 = mp_sqrtrem1(auStack_10,param_1 << ((byte)(uVar1 ^ 0x3f) & 0x3e));
return uVar2 >> ((byte)((uint)(uVar1 ^ 0x3f) >> 1) & 0x3f);
}
return 0;
}
|
|
63,736 |
r3d_primitive_load_quad
|
r3d/src/details/r3d_primitives.c
|
r3d_primitive_t r3d_primitive_load_quad(void)
{
static const float VERTICES[] =
{
// Positions Normals Texcoords
-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
-1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
};
static const unsigned short INDICES[] =
{
0, 1, 2, // First triangle (bottom-left, bottom-right, top-left)
1, 3, 2 // Second triangle (bottom-right, top-right, top-left)
};
r3d_primitive_t quad = { 0 };
quad.vao = rlLoadVertexArray();
rlEnableVertexArray(quad.vao);
quad.ebo = rlLoadVertexBufferElement(INDICES, sizeof(INDICES), false);
quad.vbo = rlLoadVertexBuffer(VERTICES, sizeof(VERTICES), false);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION, 3, RL_FLOAT, false, 8 * sizeof(float), 0);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD, 2, RL_FLOAT, false, 8 * sizeof(float), 6 * sizeof(float));
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL, 3, RL_FLOAT, false, 8 * sizeof(float), 3 * sizeof(float));
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL);
rlDisableVertexArray();
return quad;
}
|
O3
|
c
|
r3d_primitive_load_quad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x1e554
movl %eax, %ebx
movl %eax, %edi
callq 0x1e48d
leaq 0x92cdd(%rip), %rdi # 0x163010
movl $0xc, %esi
xorl %edx, %edx
callq 0x1e350
movl %eax, %r14d
leaq 0x92c47(%rip), %rdi # 0x162f90
movl $0x80, %esi
xorl %edx, %edx
callq 0x1e2e7
movl %eax, %r15d
xorl %edi, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
callq 0x1e587
movl $0x1, %edi
movl $0x2, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0x20, %r8d
movl $0x18, %r9d
callq 0x1e587
movl $0x2, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0x20, %r8d
movl $0xc, %r9d
callq 0x1e587
xorl %edi, %edi
callq 0x1e4c5
movl $0x1, %edi
callq 0x1e4c5
movl $0x2, %edi
callq 0x1e4c5
callq 0x1e4ad
shlq $0x20, %r15
movl %ebx, %eax
orq %r15, %rax
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
r3d_primitive_load_quad:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
call rlLoadVertexArray
mov ebx, eax
mov edi, eax
call rlEnableVertexArray
lea rdi, r3d_primitive_load_quad_INDICES
mov esi, 0Ch
xor edx, edx
call rlLoadVertexBufferElement
mov r14d, eax
lea rdi, r3d_primitive_load_quad_VERTICES
mov esi, 80h
xor edx, edx
call rlLoadVertexBuffer
mov r15d, eax
xor edi, edi
mov esi, 3
mov edx, 1406h
xor ecx, ecx
mov r8d, 20h ; ' '
xor r9d, r9d
call rlSetVertexAttribute
mov edi, 1
mov esi, 2
mov edx, 1406h
xor ecx, ecx
mov r8d, 20h ; ' '
mov r9d, 18h
call rlSetVertexAttribute
mov edi, 2
mov esi, 3
mov edx, 1406h
xor ecx, ecx
mov r8d, 20h ; ' '
mov r9d, 0Ch
call rlSetVertexAttribute
xor edi, edi
call rlEnableVertexAttribute
mov edi, 1
call rlEnableVertexAttribute
mov edi, 2
call rlEnableVertexAttribute
call rlDisableVertexArray
shl r15, 20h
mov eax, ebx
or rax, r15
mov edx, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long r3d_primitive_load_quad(long long a1)
{
long long VertexArray; // rbx
long long VertexBuffer; // r15
VertexArray = (unsigned int)rlLoadVertexArray(a1);
rlEnableVertexArray(VertexArray);
rlLoadVertexBufferElement((long long)&r3d_primitive_load_quad_INDICES, 12, 0);
VertexBuffer = (unsigned int)rlLoadVertexBuffer((long long)&r3d_primitive_load_quad_VERTICES, 128, 0);
rlSetVertexAttribute(0LL, 3LL, 5126LL, 0LL, 32LL, 0);
rlSetVertexAttribute(1LL, 2LL, 5126LL, 0LL, 32LL, 24);
rlSetVertexAttribute(2LL, 3LL, 5126LL, 0LL, 32LL, 12);
rlEnableVertexAttribute(0LL);
rlEnableVertexAttribute(1LL);
rlEnableVertexAttribute(2LL);
rlDisableVertexArray();
return (VertexBuffer << 32) | (unsigned int)VertexArray;
}
|
r3d_primitive_load_quad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CALL 0x0011e554
MOV EBX,EAX
MOV EDI,EAX
CALL 0x0011e48d
LEA RDI,[0x263010]
MOV ESI,0xc
XOR EDX,EDX
CALL 0x0011e350
MOV R14D,EAX
LEA RDI,[0x262f90]
MOV ESI,0x80
XOR EDX,EDX
CALL 0x0011e2e7
MOV R15D,EAX
XOR EDI,EDI
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0x20
XOR R9D,R9D
CALL 0x0011e587
MOV EDI,0x1
MOV ESI,0x2
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0x20
MOV R9D,0x18
CALL 0x0011e587
MOV EDI,0x2
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0x20
MOV R9D,0xc
CALL 0x0011e587
XOR EDI,EDI
CALL 0x0011e4c5
MOV EDI,0x1
CALL 0x0011e4c5
MOV EDI,0x2
CALL 0x0011e4c5
CALL 0x0011e4ad
SHL R15,0x20
MOV EAX,EBX
OR RAX,R15
MOV EDX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int1 [16] r3d_primitive_load_quad(void)
{
int4 uVar1;
int4 uVar2;
int1 auVar3 [16];
auVar3._0_4_ = rlLoadVertexArray();
rlEnableVertexArray(auVar3._0_4_);
uVar1 = rlLoadVertexBufferElement(r3d_primitive_load_quad_INDICES,0xc,0);
uVar2 = rlLoadVertexBuffer(r3d_primitive_load_quad_VERTICES,0x80,0);
rlSetVertexAttribute(0,3,0x1406,0,0x20,0);
rlSetVertexAttribute(1,2,0x1406,0,0x20,0x18);
rlSetVertexAttribute(2,3,0x1406,0,0x20,0xc);
rlEnableVertexAttribute(0);
rlEnableVertexAttribute(1);
rlEnableVertexAttribute(2);
rlDisableVertexArray();
auVar3._4_4_ = uVar2;
auVar3._8_4_ = uVar1;
auVar3._12_4_ = 0;
return auVar3;
}
|
|
63,737 |
ma_nommap_pread
|
eloqsql/storage/maria/ma_dynrec.c
|
size_t _ma_nommap_pread(MARIA_HA *info, uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags);
}
|
O3
|
c
|
ma_nommap_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
movl 0x480(%rdi), %ebx
leaq 0x34777e(%rip), %rax # 0x3aea18
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x672dc
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0xbfbd0
movq %rax, %rbx
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x347732(%rip), %rax # 0x3aea18
movq (%rax), %rax
leaq 0x94777(%rip), %rdx # 0xfba67
movq %r15, %rdi
movq %r14, %rsi
movl $0xa2, %ecx
callq *0x210(%rax)
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r12
movq %r12, %r8
callq 0xbfbd0
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r14
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r12b
cmovneq %r14, %rsi
leaq 0x3476dd(%rip), %rax # 0x3aea18
movq (%rax), %rax
movq %r15, %rdi
callq *0x218(%rax)
jmp 0x672ca
|
_ma_nommap_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], r8
mov r12, rcx
mov r14, rdx
mov r13, rsi
mov ebx, [rdi+480h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_672DC
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r8, [rbp+var_30]
call my_pread
mov rbx, rax
loc_672CA:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_672DC:
mov r15, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 0A2h
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r12, [rbp+var_30]
mov r8, r12
call my_pread
mov rbx, rax
xor esi, esi
test rax, rax
cmovnz r14, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r12b, 6
cmovnz rsi, r14
lea rax, PSI_server
mov rax, [rax]
mov rdi, r15
call qword ptr [rax+218h]
jmp short loc_672CA
|
long long ma_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rbx
long long v11; // r15
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
long long v13; // [rsp+50h] [rbp-30h]
v13 = a5;
v7 = *(_DWORD *)(a1 + 1152);
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL);
if ( !v8 )
return my_pread(v7, a2, a3, a4, v13);
v11 = v8;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v8,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
162LL);
v9 = my_pread(v7, a2, a3, a4, v13);
((void ( *)(long long))PSI_server[67])(v11);
return v9;
}
|
_ma_nommap_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],R8
MOV R12,RCX
MOV R14,RDX
MOV R13,RSI
MOV EBX,dword ptr [RDI + 0x480]
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001672dc
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001bfbd0
MOV RBX,RAX
LAB_001672ca:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001672dc:
MOV R15,RAX
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1fba67]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0xa2
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV R8,R12
CALL 0x001bfbd0
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R14,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R12B,0x6
CMOVNZ RSI,R14
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
MOV RDI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x001672ca
|
long _ma_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5)
{
int4 uVar1;
ulong uVar2;
long lVar3;
long lVar4;
long lVar5;
int1 local_80 [72];
ulong local_38;
uVar1 = *(int4 *)(param_1 + 0x480);
local_38 = param_5;
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6);
if (lVar3 == 0) {
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
0xa2);
uVar2 = local_38;
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
if (lVar4 != 0) {
param_3 = 0;
}
lVar5 = 0;
if (lVar4 != -1) {
lVar5 = lVar4;
}
if ((uVar2 & 6) != 0) {
lVar5 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar3,lVar5);
}
return lVar4;
}
|
|
63,738 |
js_operator_instanceof
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_operator_instanceof(JSContext *ctx, JSValue *sp)
{
JSValue op1, op2;
BOOL ret;
op1 = sp[-2];
op2 = sp[-1];
ret = JS_IsInstanceOf(ctx, op1, op2);
if (ret < 0)
return ret;
JS_FreeValue(ctx, op1);
JS_FreeValue(ctx, op2);
sp[-2] = js_bool(ret);
return 0;
}
|
O0
|
c
|
js_operator_instanceof:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq -0x20(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq -0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq -0x10(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
callq 0x2e0a0
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jge 0x6d16f
movl 0x1c(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x6d1d4
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x23c90
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x23c90
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movl 0x1c(%rsp), %edi
callq 0x57250
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, -0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, -0x18(%rax)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
|
js_operator_instanceof:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov rax, [rsp+58h+var_18]
mov rcx, [rax-20h]
mov [rsp+58h+var_28], rcx
mov rax, [rax-18h]
mov [rsp+58h+var_20], rax
mov rax, [rsp+58h+var_18]
mov rcx, [rax-10h]
mov [rsp+58h+var_38], rcx
mov rax, [rax-8]
mov [rsp+58h+var_30], rax
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_28]
mov rdx, [rsp+58h+var_20]
mov rcx, [rsp+58h+var_38]
mov r8, [rsp+58h+var_30]
call JS_IsInstanceOf
mov [rsp+58h+var_3C], eax
cmp [rsp+58h+var_3C], 0
jge short loc_6D16F
mov eax, [rsp+58h+var_3C]
mov [rsp+58h+var_4], eax
jmp short loc_6D1D4
loc_6D16F:
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_28]
mov rdx, [rsp+58h+var_20]
call JS_FreeValue
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_38]
mov rdx, [rsp+58h+var_30]
call JS_FreeValue
mov rax, [rsp+58h+var_18]
mov [rsp+58h+var_58], rax
mov edi, [rsp+58h+var_3C]
call js_bool
mov rcx, rax
mov rax, [rsp+58h+var_58]
mov [rsp+58h+var_50], rcx
mov [rsp+58h+var_48], rdx
mov rcx, [rsp+58h+var_50]
mov [rax-20h], rcx
mov rcx, [rsp+58h+var_48]
mov [rax-18h], rcx
mov [rsp+58h+var_4], 0
loc_6D1D4:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long js_operator_instanceof(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rdx
int IsInstanceOf; // [rsp+1Ch] [rbp-3Ch]
long long v13; // [rsp+20h] [rbp-38h]
long long v14; // [rsp+28h] [rbp-30h]
long long v15; // [rsp+30h] [rbp-28h]
long long v16; // [rsp+38h] [rbp-20h]
v15 = *(_QWORD *)(a2 - 32);
v16 = *(_QWORD *)(a2 - 24);
v13 = *(_QWORD *)(a2 - 16);
v14 = *(_QWORD *)(a2 - 8);
IsInstanceOf = JS_IsInstanceOf(a1, v15, v16, v13, v14, a3, a4, a5, a6, a7, a8, a9, a10);
if ( IsInstanceOf >= 0 )
{
JS_FreeValue(a1, v15, v16);
JS_FreeValue(a1, v13, v14);
*(_QWORD *)(a2 - 32) = js_bool(IsInstanceOf);
*(_QWORD *)(a2 - 24) = v10;
return 0;
}
else
{
return (unsigned int)IsInstanceOf;
}
}
|
js_operator_instanceof:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + -0x20]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + -0x10]
MOV qword ptr [RSP + 0x20],RCX
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,qword ptr [RSP + 0x28]
CALL 0x0012e0a0
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x0
JGE 0x0016d16f
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x0016d1d4
LAB_0016d16f:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP],RAX
MOV EDI,dword ptr [RSP + 0x1c]
CALL 0x00157250
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + -0x20],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + -0x18],RCX
MOV dword ptr [RSP + 0x54],0x0
LAB_0016d1d4:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
int js_operator_instanceof(int8 param_1,long param_2)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
int local_4;
uVar1 = *(int8 *)(param_2 + -0x20);
uVar2 = *(int8 *)(param_2 + -0x18);
uVar3 = *(int8 *)(param_2 + -0x10);
uVar4 = *(int8 *)(param_2 + -8);
local_4 = JS_IsInstanceOf(param_1,uVar1,uVar2,uVar3,uVar4);
if (-1 < local_4) {
JS_FreeValue(param_1,uVar1,uVar2);
JS_FreeValue(param_1,uVar3,uVar4);
auVar5 = js_bool(local_4);
*(int1 (*) [16])(param_2 + -0x20) = auVar5;
local_4 = 0;
}
return local_4;
}
|
|
63,739 |
common_chat_apply_template[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::string common_chat_apply_template(
const common_chat_template & tmpl,
const std::vector<common_chat_msg> & msgs,
bool add_ass,
bool use_jinja) {
if (use_jinja) {
auto messages = json::array();
for (const auto & msg : msgs) {
messages.push_back({{"role", msg.role}, {"content", msg.content}});
}
common_chat_inputs inputs;
inputs.messages = messages;
inputs.add_generation_prompt = add_ass;
return common_chat_params_init(tmpl, inputs).prompt;
}
int alloc_size = 0;
std::vector<llama_chat_message> chat;
for (const auto & msg : msgs) {
chat.push_back({msg.role.c_str(), msg.content.c_str()});
alloc_size += (msg.role.size() + msg.content.size()) * 1.25;
}
std::vector<char> buf(alloc_size);
// run the first time to get the total output length
int32_t res = llama_chat_apply_template(tmpl.source().c_str(), chat.data(), chat.size(), add_ass, buf.data(), buf.size());
// error: chat template is not supported
if (res < 0) {
// if the custom "tmpl" is not supported, we throw an error
// this is a bit redundant (for good), since we're not sure if user validated the custom template with llama_chat_verify_template()
throw std::runtime_error("this custom template is not supported");
}
// if it turns out that our buffer is too small, we resize it
if ((size_t) res > buf.size()) {
buf.resize(res);
res = llama_chat_apply_template(tmpl.source().c_str(), chat.data(), chat.size(), add_ass, buf.data(), buf.size());
}
std::string formatted_chat(buf.data(), res);
return formatted_chat;
}
|
O2
|
cpp
|
common_chat_apply_template[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
testl %r8d, %r8d
je 0x72fd2
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x78506
movq (%r15), %r14
movq 0x8(%r15), %rax
movq %rax, 0x28(%rsp)
leaq 0xf8(%rsp), %r15
leaq 0xe0(%rsp), %rbp
pushq $0x2
popq %rbx
pushq $0x18
popq %r13
cmpq 0x28(%rsp), %r14
je 0x73143
leaq 0x30(%rsp), %rdi
leaq 0x5d8e7(%rip), %rsi # 0xd07ec
callq 0x7851a
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x786e8
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %rdx
callq 0x7852a
leaq 0xa0(%rsp), %rdi
leaq 0x5d8c0(%rip), %rsi # 0xd07f6
callq 0x78542
leaq 0x20(%r14), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x786e8
movq %r15, %rdi
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdx
callq 0x7852a
leaq 0x18(%rsp), %rdi
movq %rbp, %r12
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x785e6
movq %r13, %rbp
leaq (%rsp,%rbp), %rdi
addq $0xe0, %rdi
callq 0x64c70
addq $-0x18, %rbp
cmpq $-0x18, %rbp
jne 0x72f75
movq %r13, %rbp
leaq (%rsp,%rbp), %rdi
addq $0xa0, %rdi
callq 0x64c70
addq $-0x18, %rbp
cmpq $-0x18, %rbp
jne 0x72f92
movq %r13, %rbp
leaq (%rsp,%rbp), %rdi
addq $0x30, %rdi
callq 0x64c70
addq $-0x18, %rbp
cmpq $-0x18, %rbp
jne 0x72faf
addq $0x78, %r14
movq %r12, %rbp
jmp 0x72eee
xorpd %xmm0, %xmm0
leaq 0xe0(%rsp), %rbx
andq $0x0, 0x10(%rbx)
movapd %xmm0, (%rbx)
movq (%r15), %r12
movq 0x8(%r15), %r15
xorl %ebp, %ebp
leaq 0x30(%rsp), %r14
cmpq %r15, %r12
je 0x7305d
movq (%r12), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%r12), %rax
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa6114
movq 0x28(%r12), %rax
addq 0x8(%r12), %rax
movq %rax, %xmm0
punpckldq 0x52b91(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x52b99(%rip), %xmm0 # 0xc5bd0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cvtsi2sd %ebp, %xmm0
mulsd 0x5cda9(%rip), %xmm1 # 0xcfdf8
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %ebp
addq $0x78, %r12
jmp 0x72ff5
movslq %ebp, %rsi
leaq 0x30(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x4295c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0x30(%rsp), %r8
movl 0x38(%rsp), %r9d
subl %r8d, %r9d
movzbl 0x4(%rsp), %ebx
movl %ebx, %ecx
callq 0x272e0
movq 0x10(%rsp), %r14
testl %eax, %eax
js 0x731e6
movl %eax, %ecx
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
subq %rsi, %rdx
cmpq %rcx, %rdx
jae 0x73112
leaq 0x30(%rsp), %rdi
movq %rcx, %rsi
callq 0x786f8
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0x30(%rsp), %r8
movl 0x38(%rsp), %r9d
subl %r8d, %r9d
movl %ebx, %ecx
callq 0x272e0
movq 0x30(%rsp), %rsi
movslq %eax, %rdx
leaq 0x10(%r14), %rax
movq %rax, (%r14)
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2ba38
leaq 0x30(%rsp), %rdi
callq 0x429fe
leaq 0xe0(%rsp), %rdi
callq 0xa60e0
jmp 0x731d1
leaq 0x30(%rsp), %rdi
callq 0x784c2
leaq 0xd0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x69646
leaq 0x30(%rsp), %rbx
leaq 0xd0(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67582
movq %r14, %rdi
callq 0x64c70
movl 0x4(%rsp), %eax
movb %al, 0x68(%rbx)
leaq 0xe0(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0xb5d06
leaq 0xe8(%rsp), %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x80052
leaq 0xe0(%rsp), %rdi
callq 0x78552
leaq 0x30(%rsp), %rdi
callq 0x78588
leaq 0x18(%rsp), %rdi
callq 0x64c70
movq %r14, %rax
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %r14
leaq 0x5d649(%rip), %rsi # 0xd0841
movq %rax, %rdi
callq 0x26420
movq 0xadde9(%rip), %rsi # 0x120ff0
movq 0xadd4a(%rip), %rdx # 0x120f58
movq %r14, %rdi
callq 0x275b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x268f0
jmp 0x73253
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x78552
jmp 0x7323a
jmp 0x73237
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x78588
jmp 0x73324
jmp 0x73250
jmp 0x73336
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x429fe
jmp 0x73339
movq %rax, %rbx
jmp 0x732de
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x64c70
jmp 0x732de
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x732a4
movq %rax, %rbx
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xe0, %rdi
callq 0x64c70
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x73288
xorl %ebp, %ebp
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xa0, %rdi
callq 0x64c70
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x732a8
jmp 0x732e1
movq %rax, %rbx
jmp 0x73324
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x64c70
jmp 0x73324
movq %rax, %rbx
movq %rbp, %r15
movb $0x1, %bpl
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
callq 0x64c70
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x732e5
leaq 0xe0(%rsp), %r14
cmpq %r15, %r14
setne %al
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x73324
addq $-0x18, %r15
movq %r15, %rdi
callq 0x64c70
cmpq %r14, %r15
jne 0x73313
leaq 0x18(%rsp), %rdi
callq 0x64c70
movq %rbx, %rdi
callq 0x27660
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xa60e0
jmp 0x7332e
|
_Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 168h
mov [rsp+198h+var_194], ecx
mov r15, rdx
mov [rsp+198h+var_190], rsi
mov [rsp+198h+var_188], rdi
test r8d, r8d
jz loc_72FD2
lea rdi, [rsp+198h+var_180]
xor esi, esi
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5arrayESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::array(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov r14, [r15]
mov rax, [r15+8]
mov [rsp+198h+var_170], rax
lea r15, [rsp+198h+var_A0]
lea rbp, [rsp+198h+var_B8]
push 2
pop rbx
push 18h
pop r13
loc_72EEE:
cmp r14, [rsp+198h+var_170]
jz loc_73143
lea rdi, [rsp+198h+var_168]
lea rsi, aRole; "role"
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
lea rdi, [rsp+198h+var_150]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
mov rdi, rbp
lea rsi, [rsp+198h+var_168]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>)
lea rdi, [rsp+198h+var_F8]
lea rsi, aContent; "content"
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
lea rsi, [r14+20h]
lea rdi, [rsp+198h+var_E0]
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
mov rdi, r15
lea rsi, [rsp+198h+var_F8]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>)
lea rdi, [rsp+198h+var_180]
mov r12, rbp
mov rsi, rbp
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backESt16initializer_listINS0_6detail8json_refISD_EEE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::push_back(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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 rbp, r13
loc_72F75:
lea rdi, [rsp+rbp+198h+var_198]
add rdi, 0E0h
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add rbp, 0FFFFFFFFFFFFFFE8h
cmp rbp, 0FFFFFFFFFFFFFFE8h
jnz short loc_72F75
mov rbp, r13
loc_72F92:
lea rdi, [rsp+rbp+198h+var_198]
add rdi, 0A0h
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add rbp, 0FFFFFFFFFFFFFFE8h
cmp rbp, 0FFFFFFFFFFFFFFE8h
jnz short loc_72F92
mov rbp, r13
loc_72FAF:
lea rdi, [rsp+rbp+198h+var_198]
add rdi, 30h ; '0'
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add rbp, 0FFFFFFFFFFFFFFE8h
cmp rbp, 0FFFFFFFFFFFFFFE8h
jnz short loc_72FAF
add r14, 78h ; 'x'
mov rbp, r12
jmp loc_72EEE
loc_72FD2:
xorpd xmm0, xmm0
lea rbx, [rsp+198h+var_B8]
and qword ptr [rbx+10h], 0
movapd xmmword ptr [rbx], xmm0
mov r12, [r15]
mov r15, [r15+8]
xor ebp, ebp
lea r14, [rsp+198h+var_168]
loc_72FF5:
cmp r12, r15
jz short loc_7305D
mov rax, [r12]
mov [rsp+198h+var_168], rax
mov rax, [r12+20h]
mov [rsp+198h+var_160], rax
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorI18llama_chat_messageSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_chat_message>::emplace_back<llama_chat_message>(llama_chat_message &&)
mov rax, [r12+28h]
add rax, [r12+8]
movq xmm0, rax
punpckldq xmm0, cs:xmmword_C5BC0
subpd xmm0, cs:xmmword_C5BD0
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
cvtsi2sd xmm0, ebp
mulsd xmm1, cs:qword_CFDF8
addsd xmm1, xmm0
cvttsd2si ebp, xmm1
add r12, 78h ; 'x'
jmp short loc_72FF5
loc_7305D:
movsxd rsi, ebp
lea rdi, [rsp+198h+var_168]
lea rdx, [rsp+198h+var_F8]
call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&)
mov rax, [rsp+198h+var_190]
mov rdi, [rax+10h]
mov rsi, [rsp+198h+var_B8]
mov rdx, [rsp+198h+var_B0]
sub rdx, rsi
sar rdx, 4
mov r8, [rsp+198h+var_168]
mov r9d, dword ptr [rsp+198h+var_160]
sub r9d, r8d
movzx ebx, byte ptr [rsp+198h+var_194]
mov ecx, ebx
call _llama_chat_apply_template
mov r14, [rsp+198h+var_188]
test eax, eax
js loc_731E6
mov ecx, eax
mov rsi, [rsp+198h+var_168]
mov rdx, [rsp+198h+var_160]
sub rdx, rsi
cmp rdx, rcx
jnb short loc_73112
lea rdi, [rsp+198h+var_168]
mov rsi, rcx
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rax, [rsp+198h+var_190]
mov rdi, [rax+10h]
mov rsi, [rsp+198h+var_B8]
mov rdx, [rsp+198h+var_B0]
sub rdx, rsi
sar rdx, 4
mov r8, [rsp+198h+var_168]
mov r9d, dword ptr [rsp+198h+var_160]
sub r9d, r8d
mov ecx, ebx
call _llama_chat_apply_template
mov rsi, [rsp+198h+var_168]
loc_73112:
movsxd rdx, eax
lea rax, [r14+10h]
mov [r14], rax
add rdx, rsi
mov rdi, r14
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+198h+var_168]
call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base()
lea rdi, [rsp+198h+var_B8]
call _ZNSt12_Vector_baseI18llama_chat_messageSaIS0_EED2Ev; std::_Vector_base<llama_chat_message>::~_Vector_base()
jmp loc_731D1
loc_73143:
lea rdi, [rsp+198h+var_168]; this
call _ZN18common_chat_inputsC2Ev; common_chat_inputs::common_chat_inputs(void)
lea rdi, [rsp+198h+var_C8]
lea rsi, [rsp+198h+var_180]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rbx, [rsp+198h+var_168]
lea r14, [rsp+198h+var_C8]
mov rdi, rbx
mov rsi, r14
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, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov eax, [rsp+198h+var_194]
mov [rbx+68h], al
lea rdi, [rsp+198h+var_B8]; this
mov rsi, [rsp+198h+var_190]; common_chat_inputs *
mov rdx, rbx
call _Z23common_chat_params_initRKN5minja13chat_templateERK18common_chat_inputs; common_chat_params_init(minja::chat_template const&,common_chat_inputs const&)
lea rsi, [rsp+198h+var_B0]
mov r14, [rsp+198h+var_188]
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
lea rdi, [rsp+198h+var_B8]; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
lea rdi, [rsp+198h+var_168]; this
call _ZN18common_chat_inputsD2Ev; common_chat_inputs::~common_chat_inputs()
lea rdi, [rsp+198h+var_180]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_731D1:
mov rax, r14
add rsp, 168h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_731E6:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aThisCustomTemp; "this custom template is not supported"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_73253
mov rbx, rax
lea rdi, [rsp+198h+var_B8]; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
jmp short loc_7323A
jmp short $+2
loc_73237:
mov rbx, rax
loc_7323A:
lea rdi, [rsp+198h+var_168]; this
call _ZN18common_chat_inputsD2Ev; common_chat_inputs::~common_chat_inputs()
jmp loc_73324
jmp short loc_73250
jmp loc_73336
loc_73250:
mov rbx, rax
loc_73253:
lea rdi, [rsp+198h+var_168]
call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base()
jmp loc_73339
mov rbx, rax
jmp short loc_732DE
mov rbx, rax
lea rdi, [rsp+198h+var_F8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_732DE
mov rbx, rax
mov bpl, 1
jmp short loc_732A4
mov rbx, rax
push 18h
pop r14
loc_73288:
lea rdi, [rsp+r14+198h+var_198]
add rdi, 0E0h
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_73288
xor ebp, ebp
loc_732A4:
push 18h
pop r14
loc_732A8:
lea rdi, [rsp+r14+198h+var_198]
add rdi, 0A0h
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_732A8
jmp short loc_732E1
mov rbx, rax
jmp short loc_73324
mov rbx, rax
lea rdi, [rsp+198h+var_168]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_73324
mov rbx, rax
mov r15, rbp
loc_732DE:
mov bpl, 1
loc_732E1:
push 18h
pop r14
loc_732E5:
lea rdi, [rsp+r14+198h+var_198]
add rdi, 30h ; '0'
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_732E5
lea r14, [rsp+198h+var_B8]
cmp r14, r15
setnz al
and bpl, al
cmp bpl, 1
jnz short loc_73324
loc_73313:
add r15, 0FFFFFFFFFFFFFFE8h
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
cmp r15, r14
jnz short loc_73313
loc_73324:
lea rdi, [rsp+198h+var_180]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_7332E:
mov rdi, rbx
call __Unwind_Resume
loc_73336:
mov rbx, rax
loc_73339:
lea rdi, [rsp+198h+var_B8]
call _ZNSt12_Vector_baseI18llama_chat_messageSaIS0_EED2Ev; std::_Vector_base<llama_chat_message>::~_Vector_base()
jmp short loc_7332E
|
_QWORD * common_chat_apply_template[abi:cxx11](
_QWORD *a1,
common_chat_inputs *a2,
_QWORD *a3,
unsigned __int8 a4,
int a5)
{
_QWORD *v6; // r14
__int128 *v7; // rbp
__int128 *v8; // r12
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long i; // rbp
long long j; // rbp
long long k; // rbp
_QWORD *v15; // r12
_QWORD *v16; // r15
int v17; // ebp
__m128d v18; // xmm0
int v19; // eax
_QWORD *v20; // r14
_BYTE *v21; // rsi
std::runtime_error *exception; // r14
int v24; // [rsp+0h] [rbp-198h]
unsigned __int8 v25; // [rsp+4h] [rbp-194h]
common_chat_inputs *v26; // [rsp+8h] [rbp-190h]
_QWORD *v27; // [rsp+10h] [rbp-188h]
unsigned __int8 v28[16]; // [rsp+18h] [rbp-180h] BYREF
_QWORD *v29; // [rsp+28h] [rbp-170h]
_BYTE *v30; // [rsp+30h] [rbp-168h] BYREF
long long v31; // [rsp+38h] [rbp-160h]
_BYTE v32[88]; // [rsp+48h] [rbp-150h] BYREF
_BYTE v33[24]; // [rsp+A0h] [rbp-F8h] BYREF
char v34[24]; // [rsp+B8h] [rbp-E0h] BYREF
unsigned __int8 v35[16]; // [rsp+D0h] [rbp-C8h] BYREF
__int128 v36; // [rsp+E0h] [rbp-B8h] BYREF
long long v37; // [rsp+F0h] [rbp-A8h]
char v38[160]; // [rsp+F8h] [rbp-A0h] BYREF
v25 = a4;
v26 = a2;
v27 = a1;
if ( a5 )
{
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>::array(
v28,
0LL,
0LL);
v6 = (_QWORD *)*a3;
v29 = (_QWORD *)a3[1];
v7 = &v36;
while ( v6 != v29 )
{
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_(
&v30,
"role");
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_(
v32,
v6);
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref(
v7,
&v30,
2LL);
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_(
v33,
"content");
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_(
v34,
v6 + 4);
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref(
v38,
v33,
2LL);
v8 = v7;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
(unsigned int)v28,
(_DWORD)v7,
2,
v9,
v10,
v11,
v24,
(char)v26,
(_DWORD)v27,
v28[0]);
for ( i = 24LL; i != -24; i -= 24LL )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v36 + i);
for ( j = 24LL; j != -24; j -= 24LL )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v33[j]);
for ( k = 3LL; k != -3; k -= 3LL )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&(&v30)[k]);
v6 += 15;
v7 = v8;
}
common_chat_inputs::common_chat_inputs((common_chat_inputs *)&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>::basic_json(
v35,
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=(
(long long)&v30,
(long long)v35);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v35);
v32[80] = v25;
common_chat_params_init((const minja::chat_template *)&v36, v26);
v20 = v27;
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v27,
(char *)&v36 + 8);
common_chat_params::~common_chat_params((common_chat_params *)&v36);
common_chat_inputs::~common_chat_inputs((common_chat_inputs *)&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>::~basic_json((long long)v28);
}
else
{
v37 = 0LL;
v36 = 0LL;
v15 = (_QWORD *)*a3;
v16 = (_QWORD *)a3[1];
v17 = 0;
while ( v15 != v16 )
{
v30 = (_BYTE *)*v15;
v31 = v15[4];
std::vector<llama_chat_message>::emplace_back<llama_chat_message>(&v36, &v30);
v18 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32((__m128i)(unsigned long long)(v15[1] + v15[5]), (__m128i)xmmword_C5BC0),
(__m128d)xmmword_C5BD0);
v17 = (int)((_mm_unpackhi_pd(v18, v18).m128d_f64[0] + v18.m128d_f64[0]) * 1.25 + (double)v17);
v15 += 15;
}
std::vector<char>::vector((long long)&v30, v17, (long long)v33);
v19 = llama_chat_apply_template(
*((_QWORD *)a2 + 2),
v36,
(long long)(*((_QWORD *)&v36 + 1) - v36) >> 4,
v25,
v30,
(unsigned int)(v31 - (_DWORD)v30));
v20 = a1;
if ( v19 < 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "this custom template is not supported");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v21 = v30;
if ( v31 - (long long)v30 < (unsigned long long)(unsigned int)v19 )
{
std::vector<char>::resize(&v30, (unsigned int)v19);
v19 = llama_chat_apply_template(
*((_QWORD *)v26 + 2),
v36,
(long long)(*((_QWORD *)&v36 + 1) - v36) >> 4,
v25,
v30,
(unsigned int)(v31 - (_DWORD)v30));
v21 = v30;
}
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, v21, (long long)&v21[v19]);
std::_Vector_base<char>::~_Vector_base(&v30);
std::_Vector_base<llama_chat_message>::~_Vector_base(&v36);
}
return v20;
}
|
common_chat_apply_template[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x168
MOV dword ptr [RSP + 0x4],ECX
MOV R15,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDI
TEST R8D,R8D
JZ 0x00172fd2
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00178506
MOV R14,qword ptr [R15]
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
LEA R15,[RSP + 0xf8]
LEA RBP,[RSP + 0xe0]
PUSH 0x2
POP RBX
PUSH 0x18
POP R13
LAB_00172eee:
CMP R14,qword ptr [RSP + 0x28]
JZ 0x00173143
LAB_00172ef9:
LEA RDI,[RSP + 0x30]
LEA RSI,[0x1d07ec]
CALL 0x0017851a
LAB_00172f0a:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x001786e8
LAB_00172f17:
MOV RDI,RBP
LEA RSI,[RSP + 0x30]
MOV RDX,RBX
CALL 0x0017852a
LAB_00172f27:
LEA RDI,[RSP + 0xa0]
LEA RSI,[0x1d07f6]
CALL 0x00178542
LEA RSI,[R14 + 0x20]
LAB_00172f3f:
LEA RDI,[RSP + 0xb8]
CALL 0x001786e8
LAB_00172f4c:
MOV RDI,R15
LEA RSI,[RSP + 0xa0]
MOV RDX,RBX
CALL 0x0017852a
LAB_00172f5f:
LEA RDI,[RSP + 0x18]
MOV R12,RBP
MOV RSI,RBP
MOV RDX,RBX
CALL 0x001785e6
MOV RBP,R13
LAB_00172f75:
LEA RDI,[RSP + RBP*0x1]
ADD RDI,0xe0
CALL 0x00164c70
ADD RBP,-0x18
CMP RBP,-0x18
JNZ 0x00172f75
MOV RBP,R13
LAB_00172f92:
LEA RDI,[RSP + RBP*0x1]
ADD RDI,0xa0
CALL 0x00164c70
ADD RBP,-0x18
CMP RBP,-0x18
JNZ 0x00172f92
MOV RBP,R13
LAB_00172faf:
LEA RDI,[RSP + RBP*0x1]
ADD RDI,0x30
CALL 0x00164c70
ADD RBP,-0x18
CMP RBP,-0x18
JNZ 0x00172faf
ADD R14,0x78
MOV RBP,R12
JMP 0x00172eee
LAB_00172fd2:
XORPD XMM0,XMM0
LEA RBX,[RSP + 0xe0]
AND qword ptr [RBX + 0x10],0x0
MOVAPD xmmword ptr [RBX],XMM0
MOV R12,qword ptr [R15]
MOV R15,qword ptr [R15 + 0x8]
XOR EBP,EBP
LEA R14,[RSP + 0x30]
LAB_00172ff5:
CMP R12,R15
JZ 0x0017305d
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [R12 + 0x20]
MOV qword ptr [RSP + 0x38],RAX
LAB_0017300d:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001a6114
MOV RAX,qword ptr [R12 + 0x28]
ADD RAX,qword ptr [R12 + 0x8]
MOVQ XMM0,RAX
PUNPCKLDQ XMM0,xmmword ptr [0x001c5bc0]
SUBPD XMM0,xmmword ptr [0x001c5bd0]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
CVTSI2SD XMM0,EBP
MULSD XMM1,qword ptr [0x001cfdf8]
ADDSD XMM1,XMM0
CVTTSD2SI EBP,XMM1
ADD R12,0x78
JMP 0x00172ff5
LAB_0017305d:
MOVSXD RSI,EBP
LAB_00173060:
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0xa0]
CALL 0x0014295c
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xe8]
SUB RDX,RSI
SAR RDX,0x4
MOV R8,qword ptr [RSP + 0x30]
MOV R9D,dword ptr [RSP + 0x38]
SUB R9D,R8D
LAB_0017309f:
MOVZX EBX,byte ptr [RSP + 0x4]
MOV ECX,EBX
CALL 0x001272e0
MOV R14,qword ptr [RSP + 0x10]
TEST EAX,EAX
JS 0x001731e6
MOV ECX,EAX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
SUB RDX,RSI
CMP RDX,RCX
JNC 0x00173112
LEA RDI,[RSP + 0x30]
MOV RSI,RCX
CALL 0x001786f8
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xe8]
SUB RDX,RSI
SAR RDX,0x4
MOV R8,qword ptr [RSP + 0x30]
MOV R9D,dword ptr [RSP + 0x38]
SUB R9D,R8D
MOV ECX,EBX
CALL 0x001272e0
MOV RSI,qword ptr [RSP + 0x30]
LAB_00173112:
MOVSXD RDX,EAX
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
ADD RDX,RSI
LAB_0017311f:
MOV RDI,R14
CALL 0x0012ba38
LEA RDI,[RSP + 0x30]
CALL 0x001429fe
LEA RDI,[RSP + 0xe0]
CALL 0x001a60e0
JMP 0x001731d1
LAB_00173143:
LEA RDI,[RSP + 0x30]
CALL 0x001784c2
LAB_0017314d:
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0x18]
CALL 0x00169646
LEA RBX,[RSP + 0x30]
LEA R14,[RSP + 0xd0]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00167582
MOV RDI,R14
CALL 0x00164c70
MOV EAX,dword ptr [RSP + 0x4]
MOV byte ptr [RBX + 0x68],AL
LAB_00173186:
LEA RDI,[RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBX
CALL 0x001b5d06
LEA RSI,[RSP + 0xe8]
LAB_001731a3:
MOV R14,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x00180052
LAB_001731b0:
LEA RDI,[RSP + 0xe0]
CALL 0x00178552
LEA RDI,[RSP + 0x30]
CALL 0x00178588
LEA RDI,[RSP + 0x18]
CALL 0x00164c70
LAB_001731d1:
MOV RAX,R14
ADD RSP,0x168
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001731e6:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV R14,RAX
LAB_001731f1:
LEA RSI,[0x1d0841]
MOV RDI,RAX
CALL 0x00126420
LAB_00173200:
MOV RSI,qword ptr [0x00220ff0]
MOV RDX,qword ptr [0x00220f58]
MOV RDI,R14
CALL 0x001275b0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_chat_apply_template[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg,
std::allocator<common_chat_msg> > const&, bool, bool) */
chat_template *
common_chat_apply_template_abi_cxx11_
(chat_template *param_1,vector *param_2,bool param_3,bool param_4)
{
long *plVar1;
long lVar2;
uint uVar3;
runtime_error *this;
int7 in_register_00000011;
long *plVar4;
int iVar5;
long lVar6;
long lVar7;
int in_R8D;
long lVar8;
int1 auVar9 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_180 [16];
long local_170;
long local_168;
long local_160;
int1 local_150 [80];
int1 local_100;
allocator local_f8 [24];
int1 local_e0 [24];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_c8 [16];
long local_b8;
long alStack_b0 [2];
int1 local_a0 [112];
plVar4 = (long *)CONCAT71(in_register_00000011,param_3);
if (in_R8D == 0) {
alStack_b0[1] = 0;
local_b8 = 0;
alStack_b0[0] = 0;
plVar1 = (long *)plVar4[1];
iVar5 = 0;
for (plVar4 = (long *)*plVar4; plVar4 != plVar1; plVar4 = plVar4 + 0xf) {
local_168 = *plVar4;
local_160 = plVar4[4];
/* try { // try from 0017300d to 00173017 has its CatchHandler @ 00173336 */
std::vector<llama_chat_message,std::allocator<llama_chat_message>>::
emplace_back<llama_chat_message>
((vector<llama_chat_message,std::allocator<llama_chat_message>> *)&local_b8,
(llama_chat_message *)&local_168);
lVar8 = plVar4[5] + plVar4[1];
auVar9._8_4_ = (int)((ulong)lVar8 >> 0x20);
auVar9._0_8_ = lVar8;
auVar9._12_4_ = DAT_001c5bc0._4_4_;
iVar5 = (int)(((auVar9._8_8_ - _UNK_001c5bd8) +
((double)CONCAT44((int4)DAT_001c5bc0,(int)lVar8) - _DAT_001c5bd0)) *
_DAT_001cfdf8 + (double)iVar5);
}
/* try { // try from 00173060 to 00173071 has its CatchHandler @ 0017324b */
std::vector<char,std::allocator<char>>::vector
((vector<char,std::allocator<char>> *)&local_168,(long)iVar5,local_f8);
/* try { // try from 0017309f to 0017310c has its CatchHandler @ 00173250 */
uVar3 = llama_chat_apply_template
(*(int8 *)(param_2 + 0x10),local_b8,alStack_b0[0] - local_b8 >> 4,
param_4,local_168,(int)local_160 - (int)local_168);
if ((int)uVar3 < 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001731f1 to 001731ff has its CatchHandler @ 00173216 */
std::runtime_error::runtime_error(this,"this custom template is not supported");
/* try { // try from 00173200 to 00173215 has its CatchHandler @ 00173250 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00220ff0,PTR__runtime_error_00220f58);
}
if ((ulong)(local_160 - local_168) < (ulong)uVar3) {
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)&local_168,(ulong)uVar3);
uVar3 = llama_chat_apply_template
(*(int8 *)(param_2 + 0x10),local_b8,alStack_b0[0] - local_b8 >> 4,
param_4,local_168,(int)local_160 - (int)local_168);
}
*(chat_template **)param_1 = param_1 + 0x10;
/* try { // try from 0017311f to 00173126 has its CatchHandler @ 00173249 */
std::__cxx11::string::_M_construct<char_const*>(param_1,local_168,(int)uVar3 + local_168);
std::_Vector_base<char,std::allocator<char>>::~_Vector_base
((_Vector_base<char,std::allocator<char>> *)&local_168);
std::_Vector_base<llama_chat_message,std::allocator<llama_chat_message>>::~_Vector_base
((_Vector_base<llama_chat_message,std::allocator<llama_chat_message>> *)&local_b8);
}
else {
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>
::array(local_180,0,0);
local_170 = plVar4[1];
lVar2 = 0x18;
for (lVar8 = *plVar4; lVar8 != local_170; lVar8 = lVar8 + 0x78) {
/* try { // try from 00172ef9 to 00172f09 has its CatchHandler @ 001732c4 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
(&local_168,&DAT_001d07ec);
/* try { // try from 00172f0a to 00172f16 has its CatchHandler @ 001732c9 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
(local_150,lVar8);
/* try { // try from 00172f17 to 00172f26 has its CatchHandler @ 001732d8 */
nlohmann::json_abi_v3_11_3::detail::
json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_ref(&local_b8,&local_168,2);
/* try { // try from 00172f27 to 00172f3a has its CatchHandler @ 00173262 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
(local_f8,"content");
/* try { // try from 00172f3f to 00172f4b has its CatchHandler @ 00173267 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
(local_e0,lVar8 + 0x20);
/* try { // try from 00172f4c to 00172f5e has its CatchHandler @ 00173279 */
nlohmann::json_abi_v3_11_3::detail::
json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_ref(local_a0,local_f8,2);
/* try { // try from 00172f5f to 00172f71 has its CatchHandler @ 00173281 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(local_180,&local_b8,2);
lVar6 = lVar2;
do {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)((long)&local_b8 + lVar6));
lVar6 = lVar6 + -0x18;
lVar7 = lVar2;
} while (lVar6 != -0x18);
do {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_f8 + lVar7));
lVar7 = lVar7 + -0x18;
lVar6 = lVar2;
} while (lVar7 != -0x18);
do {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)((long)&local_168 + lVar6));
lVar6 = lVar6 + -0x18;
} while (lVar6 != -0x18);
}
common_chat_inputs::common_chat_inputs((common_chat_inputs *)&local_168);
/* try { // try from 0017314d to 0017315e has its CatchHandler @ 00173237 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_c8,local_180);
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_168,local_c8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_c8);
/* try { // try from 00173186 to 0017319a has its CatchHandler @ 00173235 */
local_100 = param_4;
common_chat_params_init((chat_template *)&local_b8,(common_chat_inputs *)param_2);
/* try { // try from 001731a3 to 001731af has its CatchHandler @ 00173223 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1,alStack_b0);
common_chat_params::~common_chat_params((common_chat_params *)&local_b8);
common_chat_inputs::~common_chat_inputs((common_chat_inputs *)&local_168);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_180);
}
return param_1;
}
|
|
63,740 |
run_plugin_auth
|
eloqsql/libmariadb/plugins/auth/my_auth.c
|
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
const char *data_plugin, const char *db)
{
const char *auth_plugin_name= NULL;
auth_plugin_t *auth_plugin;
MCPVIO_EXT mpvio;
ulong pkt_length;
int res;
/* determine the default/initial plugin to use */
if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH)
{
if (mysql->options.extension && mysql->options.extension->default_auth)
auth_plugin_name= mysql->options.extension->default_auth;
else if (data_plugin)
auth_plugin_name= data_plugin;
}
if (!auth_plugin_name)
{
if (mysql->server_capabilities & CLIENT_PROTOCOL_41)
auth_plugin_name= native_password_plugin_name;
else
auth_plugin_name= "mysql_old_password";
}
if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql,
auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN)))
auth_plugin= &dummy_fallback_client_plugin;
mysql->net.last_errno= 0; /* just in case */
if (data_plugin && strcmp(data_plugin, auth_plugin_name))
{
/* data was prepared for a different plugin, so we don't
send any data */
data= 0;
data_len= 0;
}
mpvio.mysql_change_user= data_plugin == 0;
mpvio.cached_server_reply.pkt= (uchar*)data;
mpvio.cached_server_reply.pkt_len= data_len;
mpvio.read_packet= client_mpvio_read_packet;
mpvio.write_packet= client_mpvio_write_packet;
mpvio.info= client_mpvio_info;
mpvio.mysql= mysql;
mpvio.packets_read= mpvio.packets_written= 0;
mpvio.db= db;
retry:
mpvio.plugin= auth_plugin;
if (auth_plugin_name &&
mysql->options.extension &&
mysql->options.extension->restricted_auth)
{
if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name))
{
my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin);
return 1;
}
}
mysql->net.read_pos[0]= 0;
res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
if ((res == CR_ERROR && !mysql->net.buff) ||
(res > CR_OK && mysql->net.read_pos[0] != 254))
{
/*
the plugin returned an error. write it down in mysql,
unless the error code is CR_ERROR and mysql->net.last_errno
is already set (the plugin has done it)
*/
if (res > CR_ERROR)
my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0);
else
if (!mysql->net.last_errno) {
my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0);
}
return 1;
}
/* read the OK packet (or use the cached value in mysql->net.read_pos */
if (res == CR_OK)
pkt_length= ma_net_safe_read(mysql);
else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */
pkt_length= mpvio.last_read_packet_len;
if (pkt_length == packet_error)
{
if (mysql->net.last_errno == CR_SERVER_LOST)
my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN,
ER(CR_SERVER_LOST_EXTENDED),
"reading authorization packet",
errno);
return 1;
}
if (mysql->net.read_pos[0] == 254)
{
/* The server asked to use a different authentication plugin */
if (pkt_length == 1)
{
/* old "use short scramble" packet */
auth_plugin_name= old_password_plugin_name;
mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff;
mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1;
}
else
{
/* new "use different plugin" packet */
uint len;
auth_plugin_name= (char*)mysql->net.read_pos + 1;
len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */
mpvio.cached_server_reply.pkt_len= pkt_length - len - 2;
mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2;
}
if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql,
auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN)))
auth_plugin= &dummy_fallback_client_plugin;
goto retry;
}
/*
net->read_pos[0] should always be 0 here if the server implements
the protocol correctly
*/
if (mysql->net.read_pos[0] == 0)
return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length);
return 1;
}
|
O3
|
c
|
run_plugin_auth:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r15
movl %edx, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x370(%rdi), %rax
btl $0x13, %eax
jb 0x17e57
btl $0x9, %eax
leaq 0x20232(%rip), %rax # 0x3807c
leaq 0x201af(%rip), %r12 # 0x38000
cmovaeq %rax, %r12
jmp 0x17e74
movq 0x480(%rbx), %rcx
testq %rcx, %rcx
je 0x17e6c
movq 0x8(%rcx), %r12
testq %r12, %r12
jne 0x17e74
movq %r15, %r12
testq %r15, %r15
je 0x17e3f
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x17a60
movq %rax, %r13
testq %rax, %rax
jne 0x17e93
leaq 0x331d5(%rip), %r13 # 0x4b068
movl $0x0, 0x90(%rbx)
testq %r15, %r15
je 0x17ebd
movq %r15, %rdi
movq %r12, %rsi
callq 0x17800
xorl %ecx, %ecx
testl %eax, %eax
movl -0x30(%rbp), %eax
cmovnel %ecx, %eax
cmovneq %rcx, %r14
jmp 0x17ec0
movl -0x30(%rbp), %eax
movq %r15, -0x30(%rbp)
testq %r15, %r15
leaq -0x88(%rbp), %rcx
sete 0x48(%rcx)
movq %r14, 0x30(%rcx)
movl %eax, 0x38(%rcx)
leaq 0x22a(%rip), %rax # 0x1810a
movq %rax, (%rcx)
leaq 0x2c2(%rip), %rax # 0x181ac
movq %rax, 0x8(%rcx)
leaq 0xa41(%rip), %rax # 0x18936
movq %rax, 0x10(%rcx)
movq %rbx, 0x18(%rcx)
movq $0x0, 0x40(%rcx)
movq -0x38(%rbp), %rax
movq %rax, 0x28(%rcx)
leaq 0x48e(%rbx), %r15
movq %r13, -0x68(%rbp)
movq 0x480(%rbx), %rax
testq %rax, %rax
je 0x17f41
movq 0x150(%rax), %rdi
testq %rdi, %rdi
je 0x17f41
movq %r12, %rsi
callq 0x17110
testq %rax, %rax
je 0x180b9
movq 0x20(%rbx), %rax
movb $0x0, (%rax)
leaq -0x88(%rbp), %rdi
movq %rbx, %rsi
callq *0x58(%r13)
testl %eax, %eax
je 0x17f6a
js 0x17f83
movq 0x20(%rbx), %rcx
cmpb $-0x2, (%rcx)
je 0x17f88
jmp 0x180da
cmpq $0x0, 0x8(%rbx)
je 0x1808d
movq 0x20(%rbx), %rax
cmpb $-0x2, (%rax)
je 0x17f88
jmp 0x1808d
cmpl $-0x1, %eax
je 0x18003
movslq -0x3c(%rbp), %r14
movq 0x20(%rbx), %r13
movzbl (%r13), %eax
cmpl $0xfe, %eax
jne 0x18073
movl $0x15, %eax
movq %r15, %rcx
leaq 0x200cd(%rip), %r12 # 0x3807c
cmpq $0x1, %r14
je 0x17fd4
leaq 0x1(%r13), %r12
movq %r12, %rdi
callq 0x17250
movl %eax, %ecx
subl %eax, %r14d
addl $-0x2, %r14d
addq %r13, %rcx
addq $0x2, %rcx
movl %r14d, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x50(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x17a60
movq %rax, %r13
testq %rax, %rax
jne 0x17f14
leaq 0x3306a(%rip), %r13 # 0x4b068
jmp 0x17f14
movq %rbx, %rdi
callq 0x1c93b
movq %rax, %r14
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r14
jne 0x17f8c
movl $0x1, %r14d
cmpl $0x7dd, 0x90(%rbx) # imm = 0x7DD
jne 0x180f8
leaq 0x33d17(%rip), %rax # 0x4bd50
movq (%rax), %r15
leaq 0x33d1d(%rip), %rax # 0x4bd60
movq 0x1b8(%rax), %r12
callq 0x17050
movl (%rax), %r9d
leaq 0x20036(%rip), %r8 # 0x3808f
movq %rbx, %rdi
movl $0x7dd, %esi # imm = 0x7DD
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x1cbd5
jmp 0x180f8
testl %eax, %eax
jne 0x180f2
incq %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x21c22
movl %eax, %r14d
jmp 0x180f8
movl $0x1, %r14d
cmpl $0x0, 0x90(%rbx)
jne 0x180f8
leaq 0x33cad(%rip), %rax # 0x4bd50
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7d0, %esi # imm = 0x7D0
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1cbd5
jmp 0x180f8
leaq 0x33c90(%rip), %rax # 0x4bd50
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x1392, %esi # imm = 0x1392
xorl %ecx, %ecx
movq -0x30(%rbp), %r8
xorl %eax, %eax
callq 0x1cbd5
jmp 0x180f2
leaq 0x33c6f(%rip), %rcx # 0x4bd50
movq (%rcx), %rdx
movq %rbx, %rdi
movl %eax, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1cbd5
movl $0x1, %r14d
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
run_plugin_auth:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rbp+var_38], r8
mov r15, rcx
mov dword ptr [rbp+var_30], edx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+370h]
bt eax, 13h
jb short loc_17E57
loc_17E3F:
bt eax, 9
lea rax, aMysqlOldPasswo; "mysql_old_password"
lea r12, aMysqlNativePas; "mysql_native_password"
cmovnb r12, rax
jmp short loc_17E74
loc_17E57:
mov rcx, [rbx+480h]
test rcx, rcx
jz short loc_17E6C
mov r12, [rcx+8]
test r12, r12
jnz short loc_17E74
loc_17E6C:
mov r12, r15
test r15, r15
jz short loc_17E3F
loc_17E74:
mov rdi, rbx
mov rsi, r12
mov edx, 2
call _mysql_client_find_plugin@libmariadbclient_18
mov r13, rax
test rax, rax
jnz short loc_17E93
lea r13, dummy_fallback_client_plugin
loc_17E93:
mov dword ptr [rbx+90h], 0
test r15, r15
jz short loc_17EBD
mov rdi, r15
mov rsi, r12
call _strcmp
xor ecx, ecx
test eax, eax
mov eax, dword ptr [rbp+var_30]
cmovnz eax, ecx
cmovnz r14, rcx
jmp short loc_17EC0
loc_17EBD:
mov eax, dword ptr [rbp+var_30]
loc_17EC0:
mov [rbp+var_30], r15
test r15, r15
lea rcx, [rbp+var_88]
setz byte ptr [rcx+48h]
mov [rcx+30h], r14
mov [rcx+38h], eax
lea rax, client_mpvio_read_packet
mov [rcx], rax
lea rax, client_mpvio_write_packet
mov [rcx+8], rax
lea rax, client_mpvio_info
mov [rcx+10h], rax
mov [rcx+18h], rbx
mov qword ptr [rcx+40h], 0
mov rax, [rbp+var_38]
mov [rcx+28h], rax
lea r15, [rbx+48Eh]
loc_17F14:
mov [rbp+var_68], r13
mov rax, [rbx+480h]
test rax, rax
jz short loc_17F41
mov rdi, [rax+150h]
test rdi, rdi
jz short loc_17F41
mov rsi, r12
call _strstr
test rax, rax
jz loc_180B9
loc_17F41:
mov rax, [rbx+20h]
mov byte ptr [rax], 0
lea rdi, [rbp+var_88]
mov rsi, rbx
call qword ptr [r13+58h]
test eax, eax
jz short loc_17F6A
js short loc_17F83
mov rcx, [rbx+20h]
cmp byte ptr [rcx], 0FEh
jz short loc_17F88
jmp loc_180DA
loc_17F6A:
cmp qword ptr [rbx+8], 0
jz loc_1808D
mov rax, [rbx+20h]
cmp byte ptr [rax], 0FEh
jz short loc_17F88
jmp loc_1808D
loc_17F83:
cmp eax, 0FFFFFFFFh
jz short loc_18003
loc_17F88:
movsxd r14, [rbp+var_3C]
loc_17F8C:
mov r13, [rbx+20h]
movzx eax, byte ptr [r13+0]
cmp eax, 0FEh
jnz loc_18073
mov eax, 15h
mov rcx, r15
lea r12, aMysqlOldPasswo; "mysql_old_password"
cmp r14, 1
jz short loc_17FD4
lea r12, [r13+1]
mov rdi, r12
call _strlen
mov ecx, eax
sub r14d, eax
add r14d, 0FFFFFFFEh
add rcx, r13
add rcx, 2
mov eax, r14d
loc_17FD4:
mov [rbp+var_58], rcx
mov [rbp+var_50], eax
mov rdi, rbx
mov rsi, r12
mov edx, 2
call _mysql_client_find_plugin@libmariadbclient_18
mov r13, rax
test rax, rax
jnz loc_17F14
lea r13, dummy_fallback_client_plugin
jmp loc_17F14
loc_18003:
mov rdi, rbx
call ma_net_safe_read
mov r14, rax
mov eax, 0FFFFFFFFh
cmp r14, rax
jnz loc_17F8C
mov r14d, 1
cmp dword ptr [rbx+90h], 7DDh
jnz loc_180F8
lea rax, SQLSTATE_UNKNOWN
mov r15, [rax]
lea rax, client_errors
mov r12, [rax+1B8h]
call ___errno_location
mov r9d, [rax]
lea r8, aReadingAuthori; "reading authorization packet"
mov rdi, rbx
mov esi, 7DDh
mov rdx, r15
mov rcx, r12
xor eax, eax
call my_set_error
jmp loc_180F8
loc_18073:
test eax, eax
jnz short loc_180F2
inc r13
mov rdi, rbx
mov rsi, r13
mov rdx, r14
call ma_read_ok_packet
mov r14d, eax
jmp short loc_180F8
loc_1808D:
mov r14d, 1
cmp dword ptr [rbx+90h], 0
jnz short loc_180F8
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7D0h
xor ecx, ecx
xor eax, eax
call my_set_error
jmp short loc_180F8
loc_180B9:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 1392h
xor ecx, ecx
mov r8, [rbp+var_30]
xor eax, eax
call my_set_error
jmp short loc_180F2
loc_180DA:
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rdi, rbx
mov esi, eax
xor ecx, ecx
xor eax, eax
call my_set_error
loc_180F2:
mov r14d, 1
loc_180F8:
mov eax, r14d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long run_plugin_auth(long long a1, long long a2, int a3, const char *a4, long long a5)
{
long long v8; // rax
const char *v9; // r12
long long v10; // rcx
long long ( **plugin_libmariadbclient_18)(_QWORD *, long long); // r13
bool v12; // zf
int v13; // eax
long long v14; // rax
long long v15; // rdi
int v16; // r9d
int v17; // eax
long long v18; // rdx
int v19; // r8d
int v20; // r9d
long long v21; // r14
_BYTE *v22; // r13
int v23; // eax
long long v24; // rcx
int v25; // eax
unsigned int v26; // r14d
int v27; // r15d
char *v28; // r12
_DWORD *v29; // rax
_QWORD v31[6]; // [rsp+8h] [rbp-88h] BYREF
long long v32; // [rsp+38h] [rbp-58h]
int v33; // [rsp+40h] [rbp-50h]
long long v34; // [rsp+48h] [rbp-48h]
bool v35; // [rsp+50h] [rbp-40h]
int v36; // [rsp+54h] [rbp-3Ch]
long long v37; // [rsp+58h] [rbp-38h]
const char *v38; // [rsp+60h] [rbp-30h]
v37 = a5;
LODWORD(v38) = a3;
v8 = *(_QWORD *)(a1 + 880);
if ( (v8 & 0x80000) == 0
|| ((v10 = *(_QWORD *)(a1 + 1152)) == 0 || (v9 = *(const char **)(v10 + 8)) == 0LL) && (v9 = a4) == 0LL )
{
v9 = "mysql_native_password";
if ( (v8 & 0x200) == 0 )
v9 = "mysql_old_password";
}
plugin_libmariadbclient_18 = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin_libmariadbclient_18(
a1,
v9,
2LL);
if ( !plugin_libmariadbclient_18 )
plugin_libmariadbclient_18 = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin;
*(_DWORD *)(a1 + 144) = 0;
if ( a4 )
{
v12 = (unsigned int)strcmp(a4, v9) == 0;
v13 = (int)v38;
if ( !v12 )
{
v13 = 0;
a2 = 0LL;
}
}
else
{
v13 = (int)v38;
}
v38 = a4;
v35 = a4 == 0LL;
v32 = a2;
v33 = v13;
v31[0] = client_mpvio_read_packet;
v31[1] = client_mpvio_write_packet;
v31[2] = client_mpvio_info;
v31[3] = a1;
v34 = 0LL;
v31[5] = v37;
while ( 1 )
{
v31[4] = plugin_libmariadbclient_18;
v14 = *(_QWORD *)(a1 + 1152);
if ( v14 )
{
v15 = *(_QWORD *)(v14 + 336);
if ( v15 )
{
if ( !strstr(v15, v9) )
{
my_set_error(a1, 5010, (_DWORD)SQLSTATE_UNKNOWN, 0, (_DWORD)v38, v16);
return 1;
}
}
}
**(_BYTE **)(a1 + 32) = 0;
v17 = plugin_libmariadbclient_18[11](v31, a1);
if ( !v17 )
break;
if ( v17 >= 0 )
{
if ( **(_BYTE **)(a1 + 32) != 0xFE )
{
my_set_error(a1, v17, (_DWORD)SQLSTATE_UNKNOWN, 0, v19, v20);
return 1;
}
goto LABEL_27;
}
if ( v17 != -1 )
goto LABEL_27;
v21 = ma_net_safe_read(a1);
if ( v21 == 0xFFFFFFFFLL )
{
v26 = 1;
if ( *(_DWORD *)(a1 + 144) == 2013 )
{
v27 = (int)SQLSTATE_UNKNOWN;
v28 = client_errors[55];
v29 = (_DWORD *)__errno_location();
my_set_error(a1, 2013, v27, (_DWORD)v28, (unsigned int)"reading authorization packet", *v29);
}
return v26;
}
LABEL_28:
v22 = *(_BYTE **)(a1 + 32);
if ( (unsigned __int8)*v22 != 254 )
{
if ( !*v22 )
return (unsigned int)ma_read_ok_packet(a1, v22 + 1, v21);
return 1;
}
v23 = 21;
v24 = a1 + 1166;
v9 = "mysql_old_password";
if ( v21 != 1 )
{
v9 = v22 + 1;
v25 = strlen(v22 + 1, a1, v18, v24);
v24 = (long long)&v22[v25 + 2];
v23 = v21 - v25 - 2;
}
v32 = v24;
v33 = v23;
plugin_libmariadbclient_18 = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin_libmariadbclient_18(
a1,
v9,
2LL);
if ( !plugin_libmariadbclient_18 )
plugin_libmariadbclient_18 = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin;
}
if ( *(_QWORD *)(a1 + 8) && **(_BYTE **)(a1 + 32) == 0xFE )
{
LABEL_27:
v21 = v36;
goto LABEL_28;
}
v26 = 1;
if ( !*(_DWORD *)(a1 + 144) )
my_set_error(a1, 2000, (_DWORD)SQLSTATE_UNKNOWN, 0, v19, v20);
return v26;
}
|
run_plugin_auth:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x38],R8
MOV R15,RCX
MOV dword ptr [RBP + -0x30],EDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x370]
BT EAX,0x13
JC 0x00117e57
LAB_00117e3f:
BT EAX,0x9
LEA RAX,[0x13807c]
LEA R12,[0x138000]
CMOVNC R12,RAX
JMP 0x00117e74
LAB_00117e57:
MOV RCX,qword ptr [RBX + 0x480]
TEST RCX,RCX
JZ 0x00117e6c
MOV R12,qword ptr [RCX + 0x8]
TEST R12,R12
JNZ 0x00117e74
LAB_00117e6c:
MOV R12,R15
TEST R15,R15
JZ 0x00117e3f
LAB_00117e74:
MOV RDI,RBX
MOV RSI,R12
MOV EDX,0x2
CALL 0x00117a60
MOV R13,RAX
TEST RAX,RAX
JNZ 0x00117e93
LEA R13,[0x14b068]
LAB_00117e93:
MOV dword ptr [RBX + 0x90],0x0
TEST R15,R15
JZ 0x00117ebd
MOV RDI,R15
MOV RSI,R12
CALL 0x00117800
XOR ECX,ECX
TEST EAX,EAX
MOV EAX,dword ptr [RBP + -0x30]
CMOVNZ EAX,ECX
CMOVNZ R14,RCX
JMP 0x00117ec0
LAB_00117ebd:
MOV EAX,dword ptr [RBP + -0x30]
LAB_00117ec0:
MOV qword ptr [RBP + -0x30],R15
TEST R15,R15
LEA RCX,[RBP + -0x88]
SETZ byte ptr [RCX + 0x48]
MOV qword ptr [RCX + 0x30],R14
MOV dword ptr [RCX + 0x38],EAX
LEA RAX,[0x11810a]
MOV qword ptr [RCX],RAX
LEA RAX,[0x1181ac]
MOV qword ptr [RCX + 0x8],RAX
LEA RAX,[0x118936]
MOV qword ptr [RCX + 0x10],RAX
MOV qword ptr [RCX + 0x18],RBX
MOV qword ptr [RCX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX + 0x28],RAX
LEA R15,[RBX + 0x48e]
LAB_00117f14:
MOV qword ptr [RBP + -0x68],R13
MOV RAX,qword ptr [RBX + 0x480]
TEST RAX,RAX
JZ 0x00117f41
MOV RDI,qword ptr [RAX + 0x150]
TEST RDI,RDI
JZ 0x00117f41
MOV RSI,R12
CALL 0x00117110
TEST RAX,RAX
JZ 0x001180b9
LAB_00117f41:
MOV RAX,qword ptr [RBX + 0x20]
MOV byte ptr [RAX],0x0
LEA RDI,[RBP + -0x88]
MOV RSI,RBX
CALL qword ptr [R13 + 0x58]
TEST EAX,EAX
JZ 0x00117f6a
JS 0x00117f83
MOV RCX,qword ptr [RBX + 0x20]
CMP byte ptr [RCX],0xfe
JZ 0x00117f88
JMP 0x001180da
LAB_00117f6a:
CMP qword ptr [RBX + 0x8],0x0
JZ 0x0011808d
MOV RAX,qword ptr [RBX + 0x20]
CMP byte ptr [RAX],0xfe
JZ 0x00117f88
JMP 0x0011808d
LAB_00117f83:
CMP EAX,-0x1
JZ 0x00118003
LAB_00117f88:
MOVSXD R14,dword ptr [RBP + -0x3c]
LAB_00117f8c:
MOV R13,qword ptr [RBX + 0x20]
MOVZX EAX,byte ptr [R13]
CMP EAX,0xfe
JNZ 0x00118073
MOV EAX,0x15
MOV RCX,R15
LEA R12,[0x13807c]
CMP R14,0x1
JZ 0x00117fd4
LEA R12,[R13 + 0x1]
MOV RDI,R12
CALL 0x00117250
MOV ECX,EAX
SUB R14D,EAX
ADD R14D,-0x2
ADD RCX,R13
ADD RCX,0x2
MOV EAX,R14D
LAB_00117fd4:
MOV qword ptr [RBP + -0x58],RCX
MOV dword ptr [RBP + -0x50],EAX
MOV RDI,RBX
MOV RSI,R12
MOV EDX,0x2
CALL 0x00117a60
MOV R13,RAX
TEST RAX,RAX
JNZ 0x00117f14
LEA R13,[0x14b068]
JMP 0x00117f14
LAB_00118003:
MOV RDI,RBX
CALL 0x0011c93b
MOV R14,RAX
MOV EAX,0xffffffff
CMP R14,RAX
JNZ 0x00117f8c
MOV R14D,0x1
CMP dword ptr [RBX + 0x90],0x7dd
JNZ 0x001180f8
LEA RAX,[0x14bd50]
MOV R15,qword ptr [RAX]
LEA RAX,[0x14bd60]
MOV R12,qword ptr [RAX + 0x1b8]
CALL 0x00117050
MOV R9D,dword ptr [RAX]
LEA R8,[0x13808f]
MOV RDI,RBX
MOV ESI,0x7dd
MOV RDX,R15
MOV RCX,R12
XOR EAX,EAX
CALL 0x0011cbd5
JMP 0x001180f8
LAB_00118073:
TEST EAX,EAX
JNZ 0x001180f2
INC R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R14
CALL 0x00121c22
MOV R14D,EAX
JMP 0x001180f8
LAB_0011808d:
MOV R14D,0x1
CMP dword ptr [RBX + 0x90],0x0
JNZ 0x001180f8
LEA RAX,[0x14bd50]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7d0
XOR ECX,ECX
XOR EAX,EAX
CALL 0x0011cbd5
JMP 0x001180f8
LAB_001180b9:
LEA RAX,[0x14bd50]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x1392
XOR ECX,ECX
MOV R8,qword ptr [RBP + -0x30]
XOR EAX,EAX
CALL 0x0011cbd5
JMP 0x001180f2
LAB_001180da:
LEA RCX,[0x14bd50]
MOV RDX,qword ptr [RCX]
MOV RDI,RBX
MOV ESI,EAX
XOR ECX,ECX
XOR EAX,EAX
CALL 0x0011cbd5
LAB_001180f2:
MOV R14D,0x1
LAB_001180f8:
MOV EAX,R14D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
run_plugin_auth(long param_1,char *param_2,int4 param_3,char *param_4,int8 param_5)
{
char *pcVar1;
int *puVar2;
int *puVar3;
uint uVar4;
int iVar5;
int4 uVar6;
int1 *puVar7;
size_t sVar8;
int *piVar9;
char *pcVar10;
char *pcVar11;
long lVar12;
code *local_90;
code *local_88;
code *local_80;
long local_78;
int1 *local_70;
int8 local_68;
char *local_60;
int local_58;
int8 local_50;
int1 local_48;
int local_44;
int8 local_40;
char *local_38;
local_38 = (char *)CONCAT44(local_38._4_4_,param_3);
uVar4 = (uint)*(int8 *)(param_1 + 0x370);
if ((((uVar4 >> 0x13 & 1) == 0) ||
(((*(long *)(param_1 + 0x480) == 0 ||
(pcVar11 = *(char **)(*(long *)(param_1 + 0x480) + 8), pcVar11 == (char *)0x0)) &&
(pcVar11 = param_4, param_4 == (char *)0x0)))) &&
(pcVar11 = "mysql_native_password", (uVar4 >> 9 & 1) == 0)) {
pcVar11 = "mysql_old_password";
}
local_40 = param_5;
puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2);
if (puVar7 == (int1 *)0x0) {
puVar7 = dummy_fallback_client_plugin;
}
*(int4 *)(param_1 + 0x90) = 0;
local_60 = param_2;
if (param_4 == (char *)0x0) {
local_58 = (int)local_38;
}
else {
iVar5 = strcmp(param_4,pcVar11);
local_58 = (int)local_38;
if (iVar5 != 0) {
local_60 = (char *)0x0;
local_58 = 0;
}
}
local_48 = param_4 == (char *)0x0;
local_90 = client_mpvio_read_packet;
local_88 = client_mpvio_write_packet;
local_80 = client_mpvio_info;
local_50 = 0;
local_68 = local_40;
local_78 = param_1;
local_38 = param_4;
do {
local_70 = puVar7;
if (((*(long *)(param_1 + 0x480) != 0) &&
(pcVar1 = *(char **)(*(long *)(param_1 + 0x480) + 0x150), pcVar1 != (char *)0x0)) &&
(pcVar11 = strstr(pcVar1,pcVar11), pcVar11 == (char *)0x0)) {
my_set_error(param_1,0x1392,SQLSTATE_UNKNOWN,0,local_38);
goto LAB_001180f2;
}
**(int1 **)(param_1 + 0x20) = 0;
iVar5 = (**(code **)(puVar7 + 0x58))(&local_90,param_1);
if (iVar5 == 0) {
if ((*(long *)(param_1 + 8) == 0) || (**(char **)(param_1 + 0x20) != -2)) {
if (*(int *)(param_1 + 0x90) != 0) {
return 1;
}
my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0);
return 1;
}
LAB_00117f88:
lVar12 = (long)local_44;
}
else {
if (-1 < iVar5) {
if (**(char **)(param_1 + 0x20) == -2) goto LAB_00117f88;
my_set_error(param_1,iVar5,SQLSTATE_UNKNOWN,0);
goto LAB_001180f2;
}
if (iVar5 != -1) goto LAB_00117f88;
lVar12 = ma_net_safe_read(param_1);
puVar3 = PTR_s_Lost_connection_to_server_at___s_0014bf18;
puVar2 = SQLSTATE_UNKNOWN;
if (lVar12 == 0xffffffff) {
if (*(int *)(param_1 + 0x90) != 0x7dd) {
return 1;
}
piVar9 = __errno_location();
my_set_error(param_1,0x7dd,puVar2,puVar3,"reading authorization packet",*piVar9);
return 1;
}
}
pcVar1 = *(char **)(param_1 + 0x20);
if (*pcVar1 != -2) {
if (*pcVar1 == '\0') {
uVar6 = ma_read_ok_packet(param_1,pcVar1 + 1,lVar12);
}
else {
LAB_001180f2:
uVar6 = 1;
}
return uVar6;
}
iVar5 = 0x15;
pcVar11 = "mysql_old_password";
pcVar10 = (char *)(param_1 + 0x48e);
if (lVar12 != 1) {
pcVar11 = pcVar1 + 1;
sVar8 = strlen(pcVar11);
iVar5 = ((int)lVar12 - (int)sVar8) + -2;
pcVar10 = pcVar1 + (sVar8 & 0xffffffff) + 2;
}
local_60 = pcVar10;
local_58 = iVar5;
puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2);
if (puVar7 == (int1 *)0x0) {
puVar7 = dummy_fallback_client_plugin;
}
} while( true );
}
|
|
63,741 |
thr_unlock
|
eloqsql/mysys/thr_lock.c
|
void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags)
{
THR_LOCK *lock=data->lock;
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: %p thread: %lu lock: %p",
data, (ulong) data->owner->thread_id,
lock));
mysql_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock", lock_type, 0);
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else if (lock_type <= TL_READ_NO_INSERT)
lock->read.last=data->prev;
else if (lock_type == TL_WRITE_DELAYED && data->cond)
{
/*
This only happens in extreme circumstances when a
write delayed lock that is waiting for a lock
*/
lock->write_wait.last=data->prev; /* Put it on wait queue */
}
else
lock->write.last=data->prev;
if (unlock_flags & THR_UNLOCK_UPDATE_STATUS)
{
/* External lock was not called; Update or restore status */
if (lock_type >= TL_WRITE_CONCURRENT_INSERT)
{
if (lock->update_status)
(*lock->update_status)(data->status_param);
}
else
{
if (lock->restore_status)
(*lock->restore_status)(data->status_param);
}
}
if (lock_type == TL_READ_NO_INSERT)
lock->read_no_write_count--;
data->type=TL_UNLOCK; /* Mark unlocked */
wake_up_waiters(lock);
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
thr_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r15
movq 0x18(%rdi), %r14
movl 0x40(%rdi), %r13d
leaq 0x18(%r14), %rbx
cmpq $0x0, 0x58(%r14)
jne 0xa27c6
movq %rbx, %rdi
callq 0x29200
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0xa271d
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rax)
jmp 0xa2758
cmpl $0x5, %r13d
jg 0xa272d
movq 0x10(%r15), %rax
movq %rax, 0x78(%r14)
jmp 0xa2758
cmpl $0x9, %r13d
jne 0xa274d
cmpq $0x0, 0x20(%r15)
je 0xa274d
movq 0x10(%r15), %rax
movq %rax, 0x88(%r14)
testb $0x1, %r12b
jne 0xa2764
jmp 0xa2797
movq 0x10(%r15), %rax
movq %rax, 0x98(%r14)
testb $0x1, %r12b
je 0xa278a
cmpl $0x8, %r13d
jl 0xa2778
movq 0xc0(%r14), %rax
testq %rax, %rax
je 0xa2797
movq 0x28(%r15), %rdi
callq *%rax
jmp 0xa2797
movq 0xc8(%r14), %rax
testq %rax, %rax
je 0xa278a
movq 0x28(%r15), %rdi
callq *%rax
cmpl $0x5, %r13d
jne 0xa2797
decl 0xa8(%r14)
movl $0x0, 0x40(%r15)
movq %r14, %rdi
callq 0xa27f1
movq 0x58(%r14), %rdi
testq %rdi, %rdi
jne 0xa27df
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291c0
leaq 0x39e69(%rip), %rsi # 0xdc636
movq %rbx, %rdi
movl $0x3c0, %edx # imm = 0x3C0
callq 0x2eb6f
jmp 0xa2703
leaq 0x2e382a(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa27b0
|
thr_unlock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, esi
mov r15, rdi
mov r14, [rdi+18h]
mov r13d, [rdi+40h]
lea rbx, [r14+18h]
cmp qword ptr [r14+58h], 0
jnz loc_A27C6
mov rdi, rbx
call _pthread_mutex_lock
loc_A2703:
mov rax, [r15+8]
mov rcx, [r15+10h]
mov [rcx], rax
test rax, rax
jz short loc_A271D
mov rcx, [r15+10h]
mov [rax+10h], rcx
jmp short loc_A2758
loc_A271D:
cmp r13d, 5
jg short loc_A272D
mov rax, [r15+10h]
mov [r14+78h], rax
jmp short loc_A2758
loc_A272D:
cmp r13d, 9
jnz short loc_A274D
cmp qword ptr [r15+20h], 0
jz short loc_A274D
mov rax, [r15+10h]
mov [r14+88h], rax
test r12b, 1
jnz short loc_A2764
jmp short loc_A2797
loc_A274D:
mov rax, [r15+10h]
mov [r14+98h], rax
loc_A2758:
test r12b, 1
jz short loc_A278A
cmp r13d, 8
jl short loc_A2778
loc_A2764:
mov rax, [r14+0C0h]
test rax, rax
jz short loc_A2797
mov rdi, [r15+28h]
call rax
jmp short loc_A2797
loc_A2778:
mov rax, [r14+0C8h]
test rax, rax
jz short loc_A278A
mov rdi, [r15+28h]
call rax
loc_A278A:
cmp r13d, 5
jnz short loc_A2797
dec dword ptr [r14+0A8h]
loc_A2797:
mov dword ptr [r15+40h], 0
mov rdi, r14
call wake_up_waiters
mov rdi, [r14+58h]
test rdi, rdi
jnz short loc_A27DF
loc_A27B0:
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_A27C6:
lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 3C0h
call psi_mutex_lock
jmp loc_A2703
loc_A27DF:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A27B0
|
long long thr_unlock(long long a1, char a2)
{
long long v2; // r14
int v3; // r13d
long long v4; // rax
void ( *v5)(_QWORD); // rax
void ( *v6)(_QWORD); // rax
long long v7; // rdi
v2 = *(_QWORD *)(a1 + 24);
v3 = *(_DWORD *)(a1 + 64);
if ( *(_QWORD *)(v2 + 88) )
psi_mutex_lock(v2 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x3C0u);
else
pthread_mutex_lock(v2 + 24);
v4 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v4;
if ( v4 )
{
*(_QWORD *)(v4 + 16) = *(_QWORD *)(a1 + 16);
}
else if ( v3 > 5 )
{
if ( v3 == 9 && *(_QWORD *)(a1 + 32) )
{
*(_QWORD *)(v2 + 136) = *(_QWORD *)(a1 + 16);
if ( (a2 & 1) == 0 )
goto LABEL_20;
goto LABEL_14;
}
*(_QWORD *)(v2 + 152) = *(_QWORD *)(a1 + 16);
}
else
{
*(_QWORD *)(v2 + 120) = *(_QWORD *)(a1 + 16);
}
if ( (a2 & 1) != 0 )
{
if ( v3 >= 8 )
{
LABEL_14:
v5 = *(void ( **)(_QWORD))(v2 + 192);
if ( v5 )
v5(*(_QWORD *)(a1 + 40));
goto LABEL_20;
}
v6 = *(void ( **)(_QWORD))(v2 + 200);
if ( v6 )
v6(*(_QWORD *)(a1 + 40));
}
if ( v3 == 5 )
--*(_DWORD *)(v2 + 168);
LABEL_20:
*(_DWORD *)(a1 + 64) = 0;
wake_up_waiters(v2);
v7 = *(_QWORD *)(v2 + 88);
if ( v7 )
((void ( *)(long long))PSI_server[44])(v7);
return pthread_mutex_unlock(v2 + 24);
}
|
thr_unlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,ESI
MOV R15,RDI
MOV R14,qword ptr [RDI + 0x18]
MOV R13D,dword ptr [RDI + 0x40]
LEA RBX,[R14 + 0x18]
CMP qword ptr [R14 + 0x58],0x0
JNZ 0x001a27c6
MOV RDI,RBX
CALL 0x00129200
LAB_001a2703:
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,qword ptr [R15 + 0x10]
MOV qword ptr [RCX],RAX
TEST RAX,RAX
JZ 0x001a271d
MOV RCX,qword ptr [R15 + 0x10]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001a2758
LAB_001a271d:
CMP R13D,0x5
JG 0x001a272d
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x78],RAX
JMP 0x001a2758
LAB_001a272d:
CMP R13D,0x9
JNZ 0x001a274d
CMP qword ptr [R15 + 0x20],0x0
JZ 0x001a274d
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x88],RAX
TEST R12B,0x1
JNZ 0x001a2764
JMP 0x001a2797
LAB_001a274d:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x98],RAX
LAB_001a2758:
TEST R12B,0x1
JZ 0x001a278a
CMP R13D,0x8
JL 0x001a2778
LAB_001a2764:
MOV RAX,qword ptr [R14 + 0xc0]
TEST RAX,RAX
JZ 0x001a2797
MOV RDI,qword ptr [R15 + 0x28]
CALL RAX
JMP 0x001a2797
LAB_001a2778:
MOV RAX,qword ptr [R14 + 0xc8]
TEST RAX,RAX
JZ 0x001a278a
MOV RDI,qword ptr [R15 + 0x28]
CALL RAX
LAB_001a278a:
CMP R13D,0x5
JNZ 0x001a2797
DEC dword ptr [R14 + 0xa8]
LAB_001a2797:
MOV dword ptr [R15 + 0x40],0x0
MOV RDI,R14
CALL 0x001a27f1
MOV RDI,qword ptr [R14 + 0x58]
TEST RDI,RDI
JNZ 0x001a27df
LAB_001a27b0:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291c0
LAB_001a27c6:
LEA RSI,[0x1dc636]
MOV RDI,RBX
MOV EDX,0x3c0
CALL 0x0012eb6f
JMP 0x001a2703
LAB_001a27df:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a27b0
|
void thr_unlock(long param_1,uint param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(param_1 + 0x18);
iVar1 = *(int *)(param_1 + 0x40);
__mutex = (pthread_mutex_t *)(lVar2 + 0x18);
if (*(long *)(lVar2 + 0x58) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x3c0);
}
lVar3 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar3;
if (lVar3 == 0) {
if (iVar1 < 6) {
*(int8 *)(lVar2 + 0x78) = *(int8 *)(param_1 + 0x10);
goto LAB_001a2758;
}
if ((iVar1 != 9) || (*(long *)(param_1 + 0x20) == 0)) {
*(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10);
goto LAB_001a2758;
}
*(int8 *)(lVar2 + 0x88) = *(int8 *)(param_1 + 0x10);
if ((param_2 & 1) == 0) goto LAB_001a2797;
LAB_001a2764:
if (*(code **)(lVar2 + 0xc0) != (code *)0x0) {
(**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28));
}
}
else {
*(int8 *)(lVar3 + 0x10) = *(int8 *)(param_1 + 0x10);
LAB_001a2758:
if ((param_2 & 1) != 0) {
if (7 < iVar1) goto LAB_001a2764;
if (*(code **)(lVar2 + 200) != (code *)0x0) {
(**(code **)(lVar2 + 200))(*(int8 *)(param_1 + 0x28));
}
}
if (iVar1 == 5) {
*(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + -1;
}
}
LAB_001a2797:
*(int4 *)(param_1 + 0x40) = 0;
wake_up_waiters(lVar2);
if (*(long *)(lVar2 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
|
|
63,742 |
js_std_dump_error1
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_dump_error1(JSContext *ctx, JSValue exception_val)
{
JSValue val;
BOOL is_error;
is_error = JS_IsError(ctx, exception_val);
js_dump_obj(ctx, stderr, exception_val);
if (is_error) {
val = JS_GetPropertyStr(ctx, exception_val, "stack");
if (!JS_IsUndefined(val)) {
js_dump_obj(ctx, stderr, val);
}
JS_FreeValue(ctx, val);
}
}
|
O0
|
c
|
js_std_dump_error1:
subq $0x48, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x36ee0
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
movq 0x123aa9(%rip), %rax # 0x133ff0
movq (%rax), %rsi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
callq 0x105f0
cmpl $0x0, 0x1c(%rsp)
je 0x105df
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0xf7dcc(%rip), %rcx # 0x108342
callq 0x30bc0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x10670
cmpl $0x0, %eax
jne 0x105cb
movq 0x30(%rsp), %rdi
movq 0x123a37(%rip), %rax # 0x133ff0
movq (%rax), %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x105f0
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x229d0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_std_dump_error1:
sub rsp, 48h
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_8], rdx
mov [rsp+48h+var_18], rdi
mov rdi, [rsp+48h+var_18]
mov rsi, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
call JS_IsError
mov [rsp+48h+var_2C], eax
mov rdi, [rsp+48h+var_18]
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov rdx, [rsp+48h+var_10]
mov rcx, [rsp+48h+var_8]
call js_dump_obj
cmp [rsp+48h+var_2C], 0
jz short loc_105DF
mov rdi, [rsp+48h+var_18]
mov rsi, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
lea rcx, aStack; "stack"
call JS_GetPropertyStr
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_20], rax
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_20]
call JS_IsUndefined
cmp eax, 0
jnz short loc_105CB
mov rdi, [rsp+48h+var_18]
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov rdx, [rsp+48h+var_28]
mov rcx, [rsp+48h+var_20]
call js_dump_obj
loc_105CB:
mov rdi, [rsp+48h+var_18]
mov rsi, [rsp+48h+var_28]
mov rdx, [rsp+48h+var_20]
call JS_FreeValue
loc_105DF:
add rsp, 48h
retn
|
long long js_std_dump_error1(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rdx
long long PropertyStr; // [rsp+8h] [rbp-40h]
int IsError; // [rsp+1Ch] [rbp-2Ch]
long long v7; // [rsp+28h] [rbp-20h]
IsError = JS_IsError(a1, a2, a3);
result = js_dump_obj(a1, stderr, a2, a3);
if ( IsError )
{
PropertyStr = JS_GetPropertyStr(a1, a2, a3, "stack");
v7 = v4;
if ( !(unsigned int)JS_IsUndefined(PropertyStr, v4) )
js_dump_obj(a1, stderr, PropertyStr, v7);
return JS_FreeValue(a1, PropertyStr, v7);
}
return result;
}
|
js_std_dump_error1:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x30],RDI
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x00136ee0
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [0x00233ff0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
CALL 0x001105f0
CMP dword ptr [RSP + 0x1c],0x0
JZ 0x001105df
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
LEA RCX,[0x208342]
CALL 0x00130bc0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00110670
CMP EAX,0x0
JNZ 0x001105cb
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [0x00233ff0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
CALL 0x001105f0
LAB_001105cb:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x001229d0
LAB_001105df:
ADD RSP,0x48
RET
|
void js_std_dump_error1(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
iVar1 = JS_IsError(param_1,param_2,param_3);
js_dump_obj(param_1,*(int8 *)PTR_stderr_00233ff0,param_2,param_3);
if (iVar1 != 0) {
auVar4 = JS_GetPropertyStr(param_1,param_2,param_3,"stack");
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsUndefined(uVar2,uVar3);
if (iVar1 == 0) {
js_dump_obj(param_1,*(int8 *)PTR_stderr_00233ff0,uVar2,uVar3);
}
JS_FreeValue(param_1,uVar2,uVar3);
}
return;
}
|
|
63,743 |
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 0x3cc19
subl %ecx, %r13d
leaq 0x893b6(%rip), %rax # 0xc5f90
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 0x3c3fc
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 0x3cc32
movl (%r15), %eax
subl %r13d, %ecx
movl %ecx, 0x4(%r15)
shrl %cl, %eax
movl 0x24(%rdi), %ecx
leaq 0x89361(%rip), %rsi # 0xc5f90
andl (%rsi,%rcx,4), %eax
movl %eax, %r13d
leaq (%rdx,%r13), %rax
cmpq %rbx, %rax
jbe 0x3cc55
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 0x3cc6c
leaq (%rbx,%r14), %rcx
movq %r15, %rsi
callq 0x3c5b9
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 0x27320
|
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_3CC19
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_3CC32
loc_3CC19:
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_3CC32:
mov r13d, eax
lea rax, [rdx+r13]
cmp rax, rbx
jbe short loc_3CC55
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3CC55:
mov r14, r13
neg r14
cmp rax, rbx
jz short loc_3CC6C
lea rcx, [rbx+r14]
mov rsi, r15
call decode_bytes
loc_3CC6C:
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 0x0013cc19
SUB R13D,ECX
LEA RAX,[0x1c5f90]
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 0x0013c3fc
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 0x0013cc32
LAB_0013cc19:
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,[0x1c5f90]
AND EAX,dword ptr [RSI + RCX*0x4]
LAB_0013cc32:
MOV R13D,EAX
LEA RAX,[RDX + R13*0x1]
CMP RAX,RBX
JBE 0x0013cc55
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013cc55:
MOV R14,R13
NEG R14
CMP RAX,RBX
JZ 0x0013cc6c
LEA RCX,[RBX + R14*0x1]
MOV RSI,R15
CALL 0x0013c5b9
LAB_0013cc6c:
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 0x00127320
|
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;
}
|
|
63,744 |
fn_ext2
|
eloqsql/mysys/mf_fn_ext.c
|
char *fn_ext2(const char *name)
{
register const char *pos, *gpos;
DBUG_ENTER("fn_ext");
DBUG_PRINT("mfunkt",("name: '%s'",name));
#if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL)
{
char buff[FN_REFLEN];
size_t res_length;
gpos= name+ dirname_part(buff,(char*) name, &res_length);
}
#else
if (!(gpos= strrchr(name, FN_LIBCHAR)))
gpos= name;
#endif
// locate the last occurrence of FN_EXTCHAR
pos= strrchr(gpos, FN_EXTCHAR);
DBUG_RETURN((char*) (pos ? pos : strend(gpos)));
}
|
O3
|
c
|
fn_ext2:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x2f, %esi
callq 0x24330
movq %rax, %rbx
testq %rax, %rax
cmoveq %r14, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x24330
testq %rax, %rax
je 0x2a4ae
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5dd08
nop
|
fn_ext2:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdi
mov esi, 2Fh ; '/'
call _strrchr
mov rbx, rax
test rax, rax
cmovz rbx, r14
mov rdi, rbx
mov esi, 2Eh ; '.'
call _strrchr
test rax, rax
jz short loc_2A4AE
pop rbx
pop r14
pop rbp
retn
loc_2A4AE:
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp strend
|
long long fn_ext2(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = strrchr(a1, 47LL);
if ( !v1 )
v1 = a1;
result = strrchr(v1, 46LL);
if ( !result )
return strend(v1);
return result;
}
|
fn_ext2:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDI
MOV ESI,0x2f
CALL 0x00124330
MOV RBX,RAX
TEST RAX,RAX
CMOVZ RBX,R14
MOV RDI,RBX
MOV ESI,0x2e
CALL 0x00124330
TEST RAX,RAX
JZ 0x0012a4ae
POP RBX
POP R14
POP RBP
RET
LAB_0012a4ae:
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0015dd08
|
void fn_ext2(char *param_1)
{
char *__s;
char *pcVar1;
__s = strrchr(param_1,0x2f);
if (__s == (char *)0x0) {
__s = param_1;
}
pcVar1 = strrchr(__s,0x2e);
if (pcVar1 != (char *)0x0) {
return;
}
strend(__s);
return;
}
|
|
63,745 |
CLI::ArgumentMismatch::TypedAtLeast(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
|
static ArgumentMismatch TypedAtLeast(std::string name, int num, std::string type) {
return ArgumentMismatch(name + ": " + std::to_string(num) + " required " + type + " missing");
}
|
O1
|
cpp
|
CLI::ArgumentMismatch::TypedAtLeast(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x178c0
leaq 0x106fd(%rip), %rsi # 0x37c47
movq %r12, %rdi
callq 0x77e0
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x275af
movl $0x4, %r12d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x275a6
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x275ac
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x275af
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x27573
addl $-0x3, %r12d
jmp 0x275af
addl $-0x2, %r12d
jmp 0x275af
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x74d0
movl %r15d, %edi
addq 0x48(%rsp), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x17a2f
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x18(%rsp), %rbp
cmpq %rbp, %rcx
je 0x27608
movq 0x18(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x27623
movl $0xf, %esi
cmpq %r13, 0x48(%rsp)
je 0x2761e
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x27634
movq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x7140
jmp 0x27642
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x74a0
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x27666
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x2766c
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x10593(%rip), %rsi # 0x37c23
leaq 0x28(%rsp), %rdi
callq 0x77e0
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x276c1
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x276c8
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x7140
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x27720
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x27727
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x101c3(%rip), %rsi # 0x37910
callq 0x77e0
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x27783
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x2778b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0xa8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x17950
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x277cf
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x277ec
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x27803
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7430
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2781e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x27835
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2784c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x27886
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x27886
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x278a8
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x278a8
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x278c4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x278c4
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x278e4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x278e4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x27902
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x27902
jmp 0x278ff
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2791e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
|
_ZN3CLI16ArgumentMismatch12TypedAtLeastENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS6_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r14, rcx
mov r15d, edx
mov rbx, rdi
lea rax, [rsp+0F8h+var_E0]
mov [rax-10h], rax
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
lea r12, [rsp+0F8h+var_F0]
mov rdi, r12
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aOnlyPartiallyS+19h; ": "
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov ebp, r15d
neg ebp
cmovs ebp, r15d
mov r12d, 1
cmp ebp, 0Ah
jb short loc_275AF
mov r12d, 4
mov eax, 0D1B71759h
mov ecx, ebp
loc_27573:
cmp ecx, 63h ; 'c'
jbe short loc_275A6
cmp ecx, 3E7h
jbe short loc_275AC
cmp ecx, 2710h
jb short loc_275AF
mov edx, ecx
imul rdx, rax
shr rdx, 2Dh
add r12d, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_27573
add r12d, 0FFFFFFFDh
jmp short loc_275AF
loc_275A6:
add r12d, 0FFFFFFFEh
jmp short loc_275AF
loc_275AC:
dec r12d
loc_275AF:
shr r15d, 1Fh
lea esi, [r12+r15]
lea r13, [rsp+0F8h+var_A0]
mov [r13-10h], r13
lea rdi, [rsp+0F8h+var_B0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov edi, r15d
add rdi, [rsp+0F8h+var_B0]
mov esi, r12d
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rcx, [rsp+0F8h+var_F0]
mov r8, [rsp+0F8h+var_E8]
mov rdx, [rsp+0F8h+var_A8]
lea rax, [rdx+r8]
mov esi, 0Fh
lea rbp, [rsp+0F8h+var_E0]
cmp rcx, rbp
jz short loc_27608
mov rsi, [rsp+0F8h+var_E0]
loc_27608:
cmp rax, rsi
jbe short loc_27623
mov esi, 0Fh
cmp [rsp+0F8h+var_B0], r13
jz short loc_2761E
mov rsi, [rsp+0F8h+var_A0]
loc_2761E:
cmp rax, rsi
jbe short loc_27634
loc_27623:
mov rsi, [rsp+0F8h+var_B0]
lea rdi, [rsp+0F8h+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_27642
loc_27634:
lea rdi, [rsp+0F8h+var_B0]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_27642:
lea rdx, [rsp+0F8h+var_C0]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_27666
mov [rsp+0F8h+var_D0], rsi
mov rdx, [rcx]
mov [rsp+0F8h+var_C0], rdx
jmp short loc_2766C
loc_27666:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_2766C:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0F8h+var_C8], rsi; __int64
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, aRequired_1; " required "
lea rdi, [rsp+0F8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+0F8h+var_80]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_276C1
mov [rsp+0F8h+var_90], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_80], rdx
jmp short loc_276C8
loc_276C1:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_276C8:
mov rdx, [rax+8]
lea rdi, [rsp+0F8h+var_90]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r14]
mov rdx, [r14+8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea r14, [rsp+0F8h+var_60]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_27720
mov [rsp+0F8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_60], rdx
jmp short loc_27727
loc_27720:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_27727:
mov rdx, [rax+8]
lea rdi, [rsp+0F8h+var_70]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aMissing; " missing"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r12, [rsp+0F8h+var_40]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_27783
mov [rsp+0F8h+var_50], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_40], rdx
jmp short loc_2778B
loc_27783:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_2778B:
mov rdx, [rax+8]
lea rsi, [rsp+0F8h+var_50]
mov [rsi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rbx; int
call _ZN3CLI16ArgumentMismatchC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::ArgumentMismatch::ArgumentMismatch(std::string)
mov rdi, [rsp+0F8h+var_50]; void *
cmp rdi, r12
jz short loc_277CF
mov rsi, [rsp+0F8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_277CF:
mov rdi, [rsp+0F8h+var_70]; void *
cmp rdi, r14
jz short loc_277EC
mov rsi, [rsp+0F8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_277EC:
mov rdi, [rsp+0F8h+var_90]; void *
cmp rdi, r15
jz short loc_27803
mov rsi, [rsp+0F8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27803:
lea rax, [rsp+0F8h+var_C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2781E
mov rsi, [rsp+0F8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2781E:
mov rdi, [rsp+0F8h+var_B0]; void *
cmp rdi, r13
jz short loc_27835
mov rsi, [rsp+0F8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27835:
mov rdi, [rsp+0F8h+var_F0]; void *
cmp rdi, rbp
jz short loc_2784C
mov rsi, [rsp+0F8h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2784C:
mov rax, rbx
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_A0]; void *
cmp rdi, r12
jz short loc_27886
mov rsi, [rsp+arg_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_27886
mov rbx, rax
loc_27886:
mov rdi, [rsp+arg_80]; void *
cmp rdi, r14
jz short loc_278A8
mov rsi, [rsp+arg_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_278A8
mov rbx, rax
loc_278A8:
mov rdi, [rsp+arg_60]; void *
cmp rdi, r15
jz short loc_278C4
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_278C4
mov rbx, rax
loc_278C4:
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_278E4
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_278E4
mov rbx, rax
loc_278E4:
mov rdi, [rsp+arg_40]; void *
cmp rdi, r13
jz short loc_27902
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_27902
jmp short $+2
loc_278FF:
mov rbx, rax
loc_27902:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_2791E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2791E:
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::ArgumentMismatch::TypedAtLeast(long long a1, long long a2, int a3, _QWORD *a4)
{
unsigned int v6; // ebp
int v7; // r12d
unsigned int v8; // ecx
bool v9; // cc
unsigned int v10; // r15d
char *v11; // rax
unsigned long long v12; // rsi
unsigned long long v13; // rsi
void **v14; // rax
__int128 *v15; // rcx
long long v16; // rax
__int128 *v17; // rcx
long long v18; // rax
__int128 *v19; // rcx
long long v20; // rax
_OWORD *v21; // rcx
void *v23[2]; // [rsp+8h] [rbp-F0h] BYREF
_QWORD v24[2]; // [rsp+18h] [rbp-E0h] BYREF
void *v25[2]; // [rsp+28h] [rbp-D0h] BYREF
__int128 v26; // [rsp+38h] [rbp-C0h] BYREF
void *v27; // [rsp+48h] [rbp-B0h] BYREF
long long v28; // [rsp+50h] [rbp-A8h]
_QWORD v29[2]; // [rsp+58h] [rbp-A0h] BYREF
void *v30[2]; // [rsp+68h] [rbp-90h] BYREF
__int128 v31; // [rsp+78h] [rbp-80h] BYREF
void *v32[2]; // [rsp+88h] [rbp-70h] BYREF
__int128 v33; // [rsp+98h] [rbp-60h] BYREF
void *v34[2]; // [rsp+A8h] [rbp-50h] BYREF
_OWORD v35[4]; // [rsp+B8h] [rbp-40h] BYREF
v23[0] = v24;
std::string::_M_construct<char *>(v23, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
std::string::append(v23, ": ");
v6 = -a3;
if ( a3 > 0 )
v6 = a3;
v7 = 1;
if ( v6 >= 0xA )
{
v7 = 4;
v8 = v6;
while ( 1 )
{
if ( v8 <= 0x63 )
{
v7 -= 2;
goto LABEL_12;
}
if ( v8 <= 0x3E7 )
break;
if ( v8 < 0x2710 )
goto LABEL_12;
v7 += 4;
v9 = v8 <= 0x1869F;
v8 /= 0x2710u;
if ( v9 )
{
v7 -= 3;
goto LABEL_12;
}
}
--v7;
}
LABEL_12:
v10 = (unsigned int)a3 >> 31;
v27 = v29;
std::string::_M_construct(&v27, v7 + v10, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v27 + v10, v7, v6);
v11 = (char *)v23[1] + v28;
v12 = 15LL;
if ( v23[0] != v24 )
v12 = v24[0];
if ( (unsigned long long)v11 <= v12 )
goto LABEL_18;
v13 = 15LL;
if ( v27 != v29 )
v13 = v29[0];
if ( (unsigned long long)v11 <= v13 )
v14 = (void **)std::string::replace(&v27, 0LL, 0LL);
else
LABEL_18:
v14 = (void **)std::string::_M_append(v23, v27, v28);
v25[0] = &v26;
v15 = (__int128 *)(v14 + 2);
if ( *v14 == v14 + 2 )
{
v26 = *v15;
}
else
{
v25[0] = *v14;
*(_QWORD *)&v26 = *(_QWORD *)v15;
}
v25[1] = v14[1];
*v14 = v15;
v14[1] = 0LL;
*(_BYTE *)v15 = 0;
v16 = std::string::append(v25, " required ");
v30[0] = &v31;
v17 = (__int128 *)(v16 + 16);
if ( *(_QWORD *)v16 == v16 + 16 )
{
v31 = *v17;
}
else
{
v30[0] = *(void **)v16;
*(_QWORD *)&v31 = *(_QWORD *)v17;
}
v30[1] = *(void **)(v16 + 8);
*(_QWORD *)v16 = v17;
*(_QWORD *)(v16 + 8) = 0LL;
*(_BYTE *)(v16 + 16) = 0;
v18 = std::string::_M_append(v30, *a4, a4[1]);
v32[0] = &v33;
v19 = (__int128 *)(v18 + 16);
if ( *(_QWORD *)v18 == v18 + 16 )
{
v33 = *v19;
}
else
{
v32[0] = *(void **)v18;
*(_QWORD *)&v33 = *(_QWORD *)v19;
}
v32[1] = *(void **)(v18 + 8);
*(_QWORD *)v18 = v19;
*(_QWORD *)(v18 + 8) = 0LL;
*(_BYTE *)(v18 + 16) = 0;
v20 = std::string::append(v32, " missing");
v34[0] = v35;
v21 = (_OWORD *)(v20 + 16);
if ( *(_QWORD *)v20 == v20 + 16 )
{
v35[0] = *v21;
}
else
{
v34[0] = *(void **)v20;
*(_QWORD *)&v35[0] = *(_QWORD *)v21;
}
v34[1] = *(void **)(v20 + 8);
*(_QWORD *)v20 = v21;
*(_QWORD *)(v20 + 8) = 0LL;
*(_BYTE *)(v20 + 16) = 0;
CLI::ArgumentMismatch::ArgumentMismatch(a1, (long long)v34);
if ( v34[0] != v35 )
operator delete(v34[0], *(_QWORD *)&v35[0] + 1LL);
if ( v32[0] != &v33 )
operator delete(v32[0], v33 + 1);
if ( v30[0] != &v31 )
operator delete(v30[0], v31 + 1);
if ( v25[0] != &v26 )
operator delete(v25[0], v26 + 1);
if ( v27 != v29 )
operator delete(v27, v29[0] + 1LL);
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
return a1;
}
|
TypedAtLeast:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R14,RCX
MOV R15D,EDX
MOV RBX,RDI
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,RAX
CALL 0x001178c0
LAB_00127543:
LEA RSI,[0x137c47]
MOV RDI,R12
CALL 0x001077e0
MOV EBP,R15D
NEG EBP
CMOVS EBP,R15D
MOV R12D,0x1
CMP EBP,0xa
JC 0x001275af
MOV R12D,0x4
MOV EAX,0xd1b71759
MOV ECX,EBP
LAB_00127573:
CMP ECX,0x63
JBE 0x001275a6
CMP ECX,0x3e7
JBE 0x001275ac
CMP ECX,0x2710
JC 0x001275af
MOV EDX,ECX
IMUL RDX,RAX
SHR RDX,0x2d
ADD R12D,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x00127573
ADD R12D,-0x3
JMP 0x001275af
LAB_001275a6:
ADD R12D,-0x2
JMP 0x001275af
LAB_001275ac:
DEC R12D
LAB_001275af:
SHR R15D,0x1f
LEA ESI,[R12 + R15*0x1]
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
LAB_001275c0:
LEA RDI,[RSP + 0x48]
MOV EDX,0x2d
CALL 0x001074d0
MOV EDI,R15D
ADD RDI,qword ptr [RSP + 0x48]
MOV ESI,R12D
MOV EDX,EBP
CALL 0x00117a2f
MOV RCX,qword ptr [RSP + 0x8]
MOV R8,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
LEA RBP,[RSP + 0x18]
CMP RCX,RBP
JZ 0x00127608
MOV RSI,qword ptr [RSP + 0x18]
LAB_00127608:
CMP RAX,RSI
JBE 0x00127623
MOV ESI,0xf
CMP qword ptr [RSP + 0x48],R13
JZ 0x0012761e
MOV RSI,qword ptr [RSP + 0x58]
LAB_0012761e:
CMP RAX,RSI
JBE 0x00127634
LAB_00127623:
MOV RSI,qword ptr [RSP + 0x48]
LAB_00127628:
LEA RDI,[RSP + 0x8]
CALL 0x00107140
JMP 0x00127642
LAB_00127634:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001074a0
LAB_00127642:
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x00127666
MOV qword ptr [RSP + 0x28],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0012766c
LAB_00127666:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0012766c:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_00127689:
LEA RSI,[0x137c23]
LEA RDI,[RSP + 0x28]
CALL 0x001077e0
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001276c1
MOV qword ptr [RSP + 0x68],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x78],RDX
JMP 0x001276c8
LAB_001276c1:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_001276c8:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x68]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_001276eb:
CALL 0x00107140
LEA R14,[RSP + 0x98]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00127720
MOV qword ptr [RSP + 0x88],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x98],RDX
JMP 0x00127727
LAB_00127720:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_00127727:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x88]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00127746:
LEA RSI,[0x137910]
CALL 0x001077e0
LEA R12,[RSP + 0xb8]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00127783
MOV qword ptr [RSP + 0xa8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0xb8],RDX
JMP 0x0012778b
LAB_00127783:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0012778b:
MOV RDX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xa8]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001277aa:
MOV RDI,RBX
CALL 0x00117950
LAB_001277b2:
MOV RDI,qword ptr [RSP + 0xa8]
CMP RDI,R12
JZ 0x001277cf
MOV RSI,qword ptr [RSP + 0xb8]
INC RSI
CALL 0x00107430
LAB_001277cf:
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,R14
JZ 0x001277ec
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x00107430
LAB_001277ec:
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R15
JZ 0x00127803
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00107430
LAB_00127803:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0012781e
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00107430
LAB_0012781e:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x00127835
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00107430
LAB_00127835:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x0012784c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
LAB_0012784c:
MOV RAX,RBX
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CLI::ArgumentMismatch::TypedAtLeast(std::__cxx11::string, int, std::__cxx11::string) */
ArgumentMismatch * __thiscall
CLI::ArgumentMismatch::TypedAtLeast
(ArgumentMismatch *this,long *param_2,uint param_3,ulong *param_4)
{
uint uVar1;
int8 *puVar2;
long *plVar3;
uint uVar4;
long *plVar5;
ulong uVar6;
uint uVar7;
uint uVar8;
ulong *local_f0;
long local_e8;
ulong local_e0 [2];
long *local_d0;
int8 local_c8;
long local_c0;
int8 uStack_b8;
ulong *local_b0;
long local_a8;
ulong local_a0 [2];
long *local_90;
long local_88;
long local_80;
long lStack_78;
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50;
long local_48;
long local_40;
int4 uStack_38;
int4 uStack_34;
local_f0 = local_e0;
std::__cxx11::string::_M_construct<char*>(&local_f0,*param_2,param_2[1] + *param_2);
/* try { // try from 00127543 to 00127551 has its CatchHandler @ 001278ff */
std::__cxx11::string::append((char *)&local_f0);
uVar7 = -param_3;
if (0 < (int)param_3) {
uVar7 = param_3;
}
uVar8 = 1;
if (9 < uVar7) {
uVar6 = (ulong)uVar7;
uVar1 = 4;
do {
uVar8 = uVar1;
uVar4 = (uint)uVar6;
if (uVar4 < 100) {
uVar8 = uVar8 - 2;
goto LAB_001275af;
}
if (uVar4 < 1000) {
uVar8 = uVar8 - 1;
goto LAB_001275af;
}
if (uVar4 < 10000) goto LAB_001275af;
uVar6 = uVar6 / 10000;
uVar1 = uVar8 + 4;
} while (99999 < uVar4);
uVar8 = uVar8 + 1;
}
LAB_001275af:
/* try { // try from 001275c0 to 001275ce has its CatchHandler @ 001278fd */
local_b0 = local_a0;
std::__cxx11::string::_M_construct((ulong)&local_b0,(char)uVar8 - (char)((int)param_3 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((ulong)(param_3 >> 0x1f) + (long)local_b0),uVar8,uVar7);
uVar6 = 0xf;
if (local_f0 != local_e0) {
uVar6 = local_e0[0];
}
if (uVar6 < (ulong)(local_a8 + local_e8)) {
uVar6 = 0xf;
if (local_b0 != local_a0) {
uVar6 = local_a0[0];
}
if ((ulong)(local_a8 + local_e8) <= uVar6) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_b0,0,(char *)0x0,(ulong)local_f0);
goto LAB_00127642;
}
}
/* try { // try from 00127628 to 00127641 has its CatchHandler @ 001278e1 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_f0,(ulong)local_b0);
LAB_00127642:
local_d0 = &local_c0;
plVar3 = puVar2 + 2;
if ((long *)*puVar2 == plVar3) {
local_c0 = *plVar3;
uStack_b8 = puVar2[3];
}
else {
local_c0 = *plVar3;
local_d0 = (long *)*puVar2;
}
local_c8 = puVar2[1];
*puVar2 = plVar3;
puVar2[1] = 0;
*(int1 *)plVar3 = 0;
/* try { // try from 00127689 to 00127699 has its CatchHandler @ 001278c1 */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_d0);
plVar5 = plVar3 + 2;
if ((long *)*plVar3 == plVar5) {
local_80 = *plVar5;
lStack_78 = plVar3[3];
local_90 = &local_80;
}
else {
local_80 = *plVar5;
local_90 = (long *)*plVar3;
}
local_88 = plVar3[1];
*plVar3 = (long)plVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 001276eb to 001276ef has its CatchHandler @ 001278a5 */
plVar3 = (long *)std::__cxx11::string::_M_append((char *)&local_90,*param_4);
plVar5 = plVar3 + 2;
if ((long *)*plVar3 == plVar5) {
local_60 = *plVar5;
lStack_58 = plVar3[3];
local_70 = &local_60;
}
else {
local_60 = *plVar5;
local_70 = (long *)*plVar3;
}
local_68 = plVar3[1];
*plVar3 = (long)plVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 00127746 to 00127751 has its CatchHandler @ 00127883 */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_70);
plVar5 = plVar3 + 2;
if ((long *)*plVar3 == plVar5) {
local_40 = *plVar5;
uStack_38 = (int4)plVar3[3];
uStack_34 = *(int4 *)((long)plVar3 + 0x1c);
local_50 = &local_40;
}
else {
local_40 = *plVar5;
local_50 = (long *)*plVar3;
}
local_48 = plVar3[1];
*plVar3 = (long)plVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 001277aa to 001277b1 has its CatchHandler @ 00127861 */
ArgumentMismatch(this);
if (local_50 != &local_40) {
operator_delete(local_50,local_40 + 1);
}
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
if (local_f0 != local_e0) {
operator_delete(local_f0,local_e0[0] + 1);
}
return this;
}
|
|
63,746 |
r3d_billboard_mode_y
|
r3d/src/details/r3d_billboard.c
|
void r3d_billboard_mode_y(Matrix* model, const Matrix* invView)
{
// Extract position
Vector3 position = { model->m12, model->m13, model->m14 };
// Extract original scales
float scaleX = Vector3Length((Vector3) { model->m0, model->m1, model->m2 });
float scaleY = Vector3Length((Vector3) { model->m4, model->m5, model->m6 });
float scaleZ = Vector3Length((Vector3) { model->m8, model->m9, model->m10 });
// Preserve the original Y-axis
Vector3 upVector = Vector3Normalize((Vector3) { model->m4, model->m5, model->m6 });
// Compute look direction
Vector3 lookDirection = Vector3Normalize(Vector3Subtract((Vector3) { invView->m12, invView->m13, invView->m14 }, position));
// Compute right vector
Vector3 rightVector = Vector3Normalize(Vector3CrossProduct(upVector, lookDirection));
// Compute front vector
Vector3 frontVector = Vector3Normalize(Vector3CrossProduct(rightVector, upVector));
// Construct new model matrix with preserved scales
model->m0 = rightVector.x * scaleX;
model->m1 = rightVector.y * scaleX;
model->m2 = rightVector.z * scaleX;
model->m4 = upVector.x * scaleY;
model->m5 = upVector.y * scaleY;
model->m6 = upVector.z * scaleY;
model->m8 = frontVector.x * scaleZ;
model->m9 = frontVector.y * scaleZ;
model->m10 = frontVector.z * scaleZ;
}
|
O3
|
c
|
r3d_billboard_mode_y:
pushq %rbp
movq %rsp, %rbp
movss 0xc(%rdi), %xmm4
movss 0x1c(%rdi), %xmm3
movss 0x2c(%rdi), %xmm8
movss 0x4(%rdi), %xmm1
movss 0x14(%rdi), %xmm6
movss 0x24(%rdi), %xmm0
movaps %xmm6, %xmm2
mulss %xmm6, %xmm2
movaps %xmm1, %xmm5
mulss %xmm1, %xmm5
addss %xmm2, %xmm5
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
addss %xmm5, %xmm2
sqrtss %xmm2, %xmm7
xorps %xmm5, %xmm5
ucomiss %xmm5, %xmm7
movss %xmm7, -0x4(%rbp)
jne 0xd0f36
jnp 0xd0f53
movss 0x110d2(%rip), %xmm2 # 0xe2010
divss %xmm7, %xmm2
mulss %xmm2, %xmm1
mulss %xmm2, %xmm6
unpcklps %xmm6, %xmm1 # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
mulss %xmm2, %xmm0
jmp 0xd0f56
unpcklps %xmm6, %xmm1 # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
movss 0xc(%rsi), %xmm6
movss 0x1c(%rsi), %xmm9
movss 0x2c(%rsi), %xmm7
subss %xmm8, %xmm7
subss %xmm4, %xmm6
subss %xmm3, %xmm9
movaps %xmm9, %xmm2
mulss %xmm9, %xmm2
movaps %xmm6, %xmm3
mulss %xmm6, %xmm3
addss %xmm2, %xmm3
movaps %xmm7, %xmm2
mulss %xmm7, %xmm2
addss %xmm3, %xmm2
sqrtss %xmm2, %xmm2
ucomiss %xmm5, %xmm2
jne 0xd0f9e
jnp 0xd0fbd
movss 0x1106a(%rip), %xmm3 # 0xe2010
divss %xmm2, %xmm3
mulss %xmm3, %xmm6
mulss %xmm3, %xmm9
unpcklps %xmm9, %xmm6 # xmm6 = xmm6[0],xmm9[0],xmm6[1],xmm9[1]
mulss %xmm3, %xmm7
jmp 0xd0fc1
unpcklps %xmm9, %xmm6 # xmm6 = xmm6[0],xmm9[0],xmm6[1],xmm9[1]
movaps %xmm1, %xmm3
shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1]
movaps %xmm6, %xmm4
shufps $0x55, %xmm6, %xmm4 # xmm4 = xmm4[1,1],xmm6[1,1]
movaps %xmm0, %xmm2
mulss %xmm4, %xmm2
movaps %xmm3, %xmm5
mulss %xmm7, %xmm5
subss %xmm2, %xmm5
mulss %xmm1, %xmm7
movaps %xmm0, %xmm8
mulss %xmm6, %xmm8
subss %xmm7, %xmm8
mulss %xmm3, %xmm6
movaps %xmm3, %xmm7
xorps 0x112ef(%rip), %xmm7 # 0xe22f0
mulss %xmm1, %xmm4
subss %xmm6, %xmm4
movaps %xmm8, %xmm2
mulss %xmm8, %xmm2
movaps %xmm5, %xmm6
mulss %xmm5, %xmm6
addss %xmm2, %xmm6
movaps %xmm4, %xmm2
mulss %xmm4, %xmm2
addss %xmm6, %xmm2
xorps %xmm6, %xmm6
sqrtss %xmm2, %xmm6
xorps %xmm13, %xmm13
ucomiss %xmm13, %xmm6
jne 0xd103b
jnp 0xd105a
movss 0x10fcd(%rip), %xmm2 # 0xe2010
divss %xmm6, %xmm2
mulss %xmm2, %xmm5
mulss %xmm2, %xmm8
unpcklps %xmm8, %xmm5 # xmm5 = xmm5[0],xmm8[0],xmm5[1],xmm8[1]
mulss %xmm2, %xmm4
jmp 0xd105e
unpcklps %xmm8, %xmm5 # xmm5 = xmm5[0],xmm8[0],xmm5[1],xmm8[1]
movss (%rdi), %xmm9
movss 0x10(%rdi), %xmm11
movss 0x20(%rdi), %xmm10
movss 0x8(%rdi), %xmm12
movaps %xmm5, %xmm8
shufps $0x55, %xmm5, %xmm8 # xmm8 = xmm8[1,1],xmm5[1,1]
mulss %xmm4, %xmm7
movaps %xmm1, %xmm2
mulss %xmm8, %xmm2
movaps %xmm8, %xmm6
mulss %xmm0, %xmm6
addss %xmm7, %xmm6
movss %xmm0, -0x8(%rbp)
movaps %xmm0, %xmm7
mulss %xmm5, %xmm7
movaps %xmm4, %xmm14
mulss %xmm1, %xmm14
subss %xmm7, %xmm14
movaps %xmm5, %xmm7
mulss %xmm3, %xmm7
subss %xmm2, %xmm7
movaps %xmm14, %xmm2
mulss %xmm14, %xmm2
movaps %xmm6, %xmm15
mulss %xmm6, %xmm15
addss %xmm2, %xmm15
movaps %xmm7, %xmm2
mulss %xmm7, %xmm2
addss %xmm15, %xmm2
movss 0x18(%rdi), %xmm15
sqrtss %xmm2, %xmm2
ucomiss %xmm13, %xmm2
movss 0x28(%rdi), %xmm13
jne 0xd10f6
jnp 0xd1115
movss 0x10f12(%rip), %xmm0 # 0xe2010
divss %xmm2, %xmm0
mulss %xmm0, %xmm6
mulss %xmm0, %xmm14
unpcklps %xmm14, %xmm6 # xmm6 = xmm6[0],xmm14[0],xmm6[1],xmm14[1]
mulss %xmm0, %xmm7
jmp 0xd1119
unpcklps %xmm14, %xmm6 # xmm6 = xmm6[0],xmm14[0],xmm6[1],xmm14[1]
mulss %xmm15, %xmm15
mulss %xmm12, %xmm12
addss %xmm15, %xmm12
mulss %xmm13, %xmm13
addss %xmm12, %xmm13
xorps %xmm12, %xmm12
sqrtss %xmm13, %xmm12
mulss %xmm11, %xmm11
mulss %xmm9, %xmm9
addss %xmm11, %xmm9
mulss %xmm10, %xmm10
addss %xmm9, %xmm10
xorps %xmm0, %xmm0
sqrtss %xmm10, %xmm0
mulss %xmm0, %xmm8
mulss %xmm0, %xmm4
mulss %xmm5, %xmm0
movss %xmm0, (%rdi)
movss %xmm8, 0x10(%rdi)
movss %xmm4, 0x20(%rdi)
movss -0x4(%rbp), %xmm2
movaps %xmm2, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rdi)
mulss %xmm2, %xmm3
movss %xmm3, 0x14(%rdi)
movss -0x8(%rbp), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, 0x24(%rdi)
movaps %xmm12, %xmm0
mulss %xmm6, %xmm0
movss %xmm0, 0x8(%rdi)
shufps $0x55, %xmm6, %xmm6 # xmm6 = xmm6[1,1,1,1]
mulss %xmm12, %xmm6
movss %xmm6, 0x18(%rdi)
mulss %xmm12, %xmm7
movss %xmm7, 0x28(%rdi)
popq %rbp
retq
nop
|
r3d_billboard_mode_y:
push rbp
mov rbp, rsp
movss xmm4, dword ptr [rdi+0Ch]
movss xmm3, dword ptr [rdi+1Ch]
movss xmm8, dword ptr [rdi+2Ch]
movss xmm1, dword ptr [rdi+4]
movss xmm6, dword ptr [rdi+14h]
movss xmm0, dword ptr [rdi+24h]
movaps xmm2, xmm6
mulss xmm2, xmm6
movaps xmm5, xmm1
mulss xmm5, xmm1
addss xmm5, xmm2
movaps xmm2, xmm0
mulss xmm2, xmm0
addss xmm2, xmm5
sqrtss xmm7, xmm2
xorps xmm5, xmm5
ucomiss xmm7, xmm5
movss [rbp+var_4], xmm7
jnz short loc_D0F36
jnp short loc_D0F53
loc_D0F36:
movss xmm2, cs:dword_E2010
divss xmm2, xmm7
mulss xmm1, xmm2
mulss xmm6, xmm2
unpcklps xmm1, xmm6
mulss xmm0, xmm2
jmp short loc_D0F56
loc_D0F53:
unpcklps xmm1, xmm6
loc_D0F56:
movss xmm6, dword ptr [rsi+0Ch]
movss xmm9, dword ptr [rsi+1Ch]
movss xmm7, dword ptr [rsi+2Ch]
subss xmm7, xmm8
subss xmm6, xmm4
subss xmm9, xmm3
movaps xmm2, xmm9
mulss xmm2, xmm9
movaps xmm3, xmm6
mulss xmm3, xmm6
addss xmm3, xmm2
movaps xmm2, xmm7
mulss xmm2, xmm7
addss xmm2, xmm3
sqrtss xmm2, xmm2
ucomiss xmm2, xmm5
jnz short loc_D0F9E
jnp short loc_D0FBD
loc_D0F9E:
movss xmm3, cs:dword_E2010
divss xmm3, xmm2
mulss xmm6, xmm3
mulss xmm9, xmm3
unpcklps xmm6, xmm9
mulss xmm7, xmm3
jmp short loc_D0FC1
loc_D0FBD:
unpcklps xmm6, xmm9
loc_D0FC1:
movaps xmm3, xmm1
shufps xmm3, xmm1, 55h ; 'U'
movaps xmm4, xmm6
shufps xmm4, xmm6, 55h ; 'U'
movaps xmm2, xmm0
mulss xmm2, xmm4
movaps xmm5, xmm3
mulss xmm5, xmm7
subss xmm5, xmm2
mulss xmm7, xmm1
movaps xmm8, xmm0
mulss xmm8, xmm6
subss xmm8, xmm7
mulss xmm6, xmm3
movaps xmm7, xmm3
xorps xmm7, cs:xmmword_E22F0
mulss xmm4, xmm1
subss xmm4, xmm6
movaps xmm2, xmm8
mulss xmm2, xmm8
movaps xmm6, xmm5
mulss xmm6, xmm5
addss xmm6, xmm2
movaps xmm2, xmm4
mulss xmm2, xmm4
addss xmm2, xmm6
xorps xmm6, xmm6
sqrtss xmm6, xmm2
xorps xmm13, xmm13
ucomiss xmm6, xmm13
jnz short loc_D103B
jnp short loc_D105A
loc_D103B:
movss xmm2, cs:dword_E2010
divss xmm2, xmm6
mulss xmm5, xmm2
mulss xmm8, xmm2
unpcklps xmm5, xmm8
mulss xmm4, xmm2
jmp short loc_D105E
loc_D105A:
unpcklps xmm5, xmm8
loc_D105E:
movss xmm9, dword ptr [rdi]
movss xmm11, dword ptr [rdi+10h]
movss xmm10, dword ptr [rdi+20h]
movss xmm12, dword ptr [rdi+8]
movaps xmm8, xmm5
shufps xmm8, xmm5, 55h ; 'U'
mulss xmm7, xmm4
movaps xmm2, xmm1
mulss xmm2, xmm8
movaps xmm6, xmm8
mulss xmm6, xmm0
addss xmm6, xmm7
movss [rbp+var_8], xmm0
movaps xmm7, xmm0
mulss xmm7, xmm5
movaps xmm14, xmm4
mulss xmm14, xmm1
subss xmm14, xmm7
movaps xmm7, xmm5
mulss xmm7, xmm3
subss xmm7, xmm2
movaps xmm2, xmm14
mulss xmm2, xmm14
movaps xmm15, xmm6
mulss xmm15, xmm6
addss xmm15, xmm2
movaps xmm2, xmm7
mulss xmm2, xmm7
addss xmm2, xmm15
movss xmm15, dword ptr [rdi+18h]
sqrtss xmm2, xmm2
ucomiss xmm2, xmm13
movss xmm13, dword ptr [rdi+28h]
jnz short loc_D10F6
jnp short loc_D1115
loc_D10F6:
movss xmm0, cs:dword_E2010
divss xmm0, xmm2
mulss xmm6, xmm0
mulss xmm14, xmm0
unpcklps xmm6, xmm14
mulss xmm7, xmm0
jmp short loc_D1119
loc_D1115:
unpcklps xmm6, xmm14
loc_D1119:
mulss xmm15, xmm15
mulss xmm12, xmm12
addss xmm12, xmm15
mulss xmm13, xmm13
addss xmm13, xmm12
xorps xmm12, xmm12
sqrtss xmm12, xmm13
mulss xmm11, xmm11
mulss xmm9, xmm9
addss xmm9, xmm11
mulss xmm10, xmm10
addss xmm10, xmm9
xorps xmm0, xmm0
sqrtss xmm0, xmm10
mulss xmm8, xmm0
mulss xmm4, xmm0
mulss xmm0, xmm5
movss dword ptr [rdi], xmm0
movss dword ptr [rdi+10h], xmm8
movss dword ptr [rdi+20h], xmm4
movss xmm2, [rbp+var_4]
movaps xmm0, xmm2
mulss xmm0, xmm1
movss dword ptr [rdi+4], xmm0
mulss xmm3, xmm2
movss dword ptr [rdi+14h], xmm3
movss xmm0, [rbp+var_8]
mulss xmm0, xmm2
movss dword ptr [rdi+24h], xmm0
movaps xmm0, xmm12
mulss xmm0, xmm6
movss dword ptr [rdi+8], xmm0
shufps xmm6, xmm6, 55h ; 'U'
mulss xmm6, xmm12
movss dword ptr [rdi+18h], xmm6
mulss xmm7, xmm12
movss dword ptr [rdi+28h], xmm7
pop rbp
retn
|
void r3d_billboard_mode_y(long long a1, long long a2)
{
__m128 v2; // xmm1
__m128 v3; // xmm6
__m128 v4; // xmm0
float v5; // xmm7_4
__m128 v6; // xmm1
float v7; // xmm7_4
__m128 v8; // xmm6
__m128 v9; // xmm9
float v10; // xmm2_4
__m128 v11; // xmm6
__m128 v12; // xmm3
__m128 v13; // xmm5
__m128 v14; // xmm8
__m128 v15; // xmm4
float v16; // xmm6_4
__m128 v17; // xmm5
__m128 v18; // xmm8
__m128 v19; // xmm6
__m128 v20; // xmm14
float v21; // xmm7_4
float v22; // xmm2_4
__m128 v23; // xmm6
float v24; // xmm12_4
float v25; // xmm0_4
float v26; // [rsp+0h] [rbp-8h]
float v27; // [rsp+4h] [rbp-4h]
v2 = (__m128)*(unsigned int *)(a1 + 4);
v3 = (__m128)*(unsigned int *)(a1 + 20);
v4 = (__m128)*(unsigned int *)(a1 + 36);
v5 = fsqrt(
(float)(v4.m128_f32[0] * v4.m128_f32[0])
+ (float)((float)(v2.m128_f32[0] * v2.m128_f32[0]) + (float)(v3.m128_f32[0] * v3.m128_f32[0])));
v27 = v5;
if ( v5 == 0.0 )
{
v6 = _mm_unpacklo_ps(v2, v3);
}
else
{
v2.m128_f32[0] = v2.m128_f32[0] * (float)(1.0 / v5);
v3.m128_f32[0] = v3.m128_f32[0] * (float)(1.0 / v5);
v6 = _mm_unpacklo_ps(v2, v3);
v4.m128_f32[0] = v4.m128_f32[0] * (float)(1.0 / v5);
}
v8 = (__m128)*(unsigned int *)(a2 + 12);
v9 = (__m128)*(unsigned int *)(a2 + 28);
v7 = *(float *)(a2 + 44) - *(float *)(a1 + 44);
v8.m128_f32[0] = v8.m128_f32[0] - *(float *)(a1 + 12);
v9.m128_f32[0] = v9.m128_f32[0] - *(float *)(a1 + 28);
v10 = fsqrt(
(float)(v7 * v7)
+ (float)((float)(v8.m128_f32[0] * v8.m128_f32[0]) + (float)(v9.m128_f32[0] * v9.m128_f32[0])));
if ( v10 == 0.0 )
{
v11 = _mm_unpacklo_ps(v8, v9);
}
else
{
v8.m128_f32[0] = v8.m128_f32[0] * (float)(1.0 / v10);
v9.m128_f32[0] = v9.m128_f32[0] * (float)(1.0 / v10);
v11 = _mm_unpacklo_ps(v8, v9);
v7 = v7 * (float)(1.0 / v10);
}
v12 = _mm_shuffle_ps(v6, v6, 85);
v15 = _mm_shuffle_ps(v11, v11, 85);
v13 = v12;
v13.m128_f32[0] = (float)(v12.m128_f32[0] * v7) - (float)(v4.m128_f32[0] * v15.m128_f32[0]);
v14 = v4;
v14.m128_f32[0] = (float)(v4.m128_f32[0] * v11.m128_f32[0]) - (float)(v7 * v6.m128_f32[0]);
v15.m128_f32[0] = (float)(v15.m128_f32[0] * v6.m128_f32[0]) - (float)(v11.m128_f32[0] * v12.m128_f32[0]);
v16 = fsqrt(
(float)(v15.m128_f32[0] * v15.m128_f32[0])
+ (float)((float)(v13.m128_f32[0] * v13.m128_f32[0]) + (float)(v14.m128_f32[0] * v14.m128_f32[0])));
if ( v16 == 0.0 )
{
v17 = _mm_unpacklo_ps(v13, v14);
}
else
{
v13.m128_f32[0] = v13.m128_f32[0] * (float)(1.0 / v16);
v14.m128_f32[0] = v14.m128_f32[0] * (float)(1.0 / v16);
v17 = _mm_unpacklo_ps(v13, v14);
v15.m128_f32[0] = v15.m128_f32[0] * (float)(1.0 / v16);
}
v18 = _mm_shuffle_ps(v17, v17, 85);
v19 = v18;
v19.m128_f32[0] = (float)(v18.m128_f32[0] * v4.m128_f32[0]) + (float)((float)-v12.m128_f32[0] * v15.m128_f32[0]);
v26 = v4.m128_f32[0];
v20 = v15;
v20.m128_f32[0] = (float)(v15.m128_f32[0] * v6.m128_f32[0]) - (float)(v4.m128_f32[0] * v17.m128_f32[0]);
v21 = (float)(v17.m128_f32[0] * v12.m128_f32[0]) - (float)(v6.m128_f32[0] * v18.m128_f32[0]);
v22 = fsqrt(
(float)(v21 * v21)
+ (float)((float)(v19.m128_f32[0] * v19.m128_f32[0]) + (float)(v20.m128_f32[0] * v20.m128_f32[0])));
if ( v22 == 0.0 )
{
v23 = _mm_unpacklo_ps(v19, v20);
}
else
{
v19.m128_f32[0] = v19.m128_f32[0] * (float)(1.0 / v22);
v20.m128_f32[0] = v20.m128_f32[0] * (float)(1.0 / v22);
v23 = _mm_unpacklo_ps(v19, v20);
v21 = v21 * (float)(1.0 / v22);
}
v24 = fsqrt(
(float)(*(float *)(a1 + 40) * *(float *)(a1 + 40))
+ (float)((float)(*(float *)(a1 + 8) * *(float *)(a1 + 8)) + (float)(*(float *)(a1 + 24) * *(float *)(a1 + 24))));
v25 = fsqrt(
(float)(*(float *)(a1 + 32) * *(float *)(a1 + 32))
+ (float)((float)(*(float *)a1 * *(float *)a1) + (float)(*(float *)(a1 + 16) * *(float *)(a1 + 16))));
*(float *)a1 = v25 * v17.m128_f32[0];
*(float *)(a1 + 16) = v18.m128_f32[0] * v25;
*(float *)(a1 + 32) = v15.m128_f32[0] * v25;
*(float *)(a1 + 4) = v27 * v6.m128_f32[0];
*(float *)(a1 + 20) = v12.m128_f32[0] * v27;
*(float *)(a1 + 36) = v26 * v27;
*(float *)(a1 + 8) = v24 * v23.m128_f32[0];
*(float *)(a1 + 24) = _mm_shuffle_ps(v23, v23, 85).m128_f32[0] * v24;
*(float *)(a1 + 40) = v21 * v24;
}
|
r3d_billboard_mode_y:
PUSH RBP
MOV RBP,RSP
MOVSS XMM4,dword ptr [RDI + 0xc]
MOVSS XMM3,dword ptr [RDI + 0x1c]
MOVSS XMM8,dword ptr [RDI + 0x2c]
MOVSS XMM1,dword ptr [RDI + 0x4]
MOVSS XMM6,dword ptr [RDI + 0x14]
MOVSS XMM0,dword ptr [RDI + 0x24]
MOVAPS XMM2,XMM6
MULSS XMM2,XMM6
MOVAPS XMM5,XMM1
MULSS XMM5,XMM1
ADDSS XMM5,XMM2
MOVAPS XMM2,XMM0
MULSS XMM2,XMM0
ADDSS XMM2,XMM5
SQRTSS XMM7,XMM2
XORPS XMM5,XMM5
UCOMISS XMM7,XMM5
MOVSS dword ptr [RBP + -0x4],XMM7
JNZ 0x001d0f36
JNP 0x001d0f53
LAB_001d0f36:
MOVSS XMM2,dword ptr [0x001e2010]
DIVSS XMM2,XMM7
MULSS XMM1,XMM2
MULSS XMM6,XMM2
UNPCKLPS XMM1,XMM6
MULSS XMM0,XMM2
JMP 0x001d0f56
LAB_001d0f53:
UNPCKLPS XMM1,XMM6
LAB_001d0f56:
MOVSS XMM6,dword ptr [RSI + 0xc]
MOVSS XMM9,dword ptr [RSI + 0x1c]
MOVSS XMM7,dword ptr [RSI + 0x2c]
SUBSS XMM7,XMM8
SUBSS XMM6,XMM4
SUBSS XMM9,XMM3
MOVAPS XMM2,XMM9
MULSS XMM2,XMM9
MOVAPS XMM3,XMM6
MULSS XMM3,XMM6
ADDSS XMM3,XMM2
MOVAPS XMM2,XMM7
MULSS XMM2,XMM7
ADDSS XMM2,XMM3
SQRTSS XMM2,XMM2
UCOMISS XMM2,XMM5
JNZ 0x001d0f9e
JNP 0x001d0fbd
LAB_001d0f9e:
MOVSS XMM3,dword ptr [0x001e2010]
DIVSS XMM3,XMM2
MULSS XMM6,XMM3
MULSS XMM9,XMM3
UNPCKLPS XMM6,XMM9
MULSS XMM7,XMM3
JMP 0x001d0fc1
LAB_001d0fbd:
UNPCKLPS XMM6,XMM9
LAB_001d0fc1:
MOVAPS XMM3,XMM1
SHUFPS XMM3,XMM1,0x55
MOVAPS XMM4,XMM6
SHUFPS XMM4,XMM6,0x55
MOVAPS XMM2,XMM0
MULSS XMM2,XMM4
MOVAPS XMM5,XMM3
MULSS XMM5,XMM7
SUBSS XMM5,XMM2
MULSS XMM7,XMM1
MOVAPS XMM8,XMM0
MULSS XMM8,XMM6
SUBSS XMM8,XMM7
MULSS XMM6,XMM3
MOVAPS XMM7,XMM3
XORPS XMM7,xmmword ptr [0x001e22f0]
MULSS XMM4,XMM1
SUBSS XMM4,XMM6
MOVAPS XMM2,XMM8
MULSS XMM2,XMM8
MOVAPS XMM6,XMM5
MULSS XMM6,XMM5
ADDSS XMM6,XMM2
MOVAPS XMM2,XMM4
MULSS XMM2,XMM4
ADDSS XMM2,XMM6
XORPS XMM6,XMM6
SQRTSS XMM6,XMM2
XORPS XMM13,XMM13
UCOMISS XMM6,XMM13
JNZ 0x001d103b
JNP 0x001d105a
LAB_001d103b:
MOVSS XMM2,dword ptr [0x001e2010]
DIVSS XMM2,XMM6
MULSS XMM5,XMM2
MULSS XMM8,XMM2
UNPCKLPS XMM5,XMM8
MULSS XMM4,XMM2
JMP 0x001d105e
LAB_001d105a:
UNPCKLPS XMM5,XMM8
LAB_001d105e:
MOVSS XMM9,dword ptr [RDI]
MOVSS XMM11,dword ptr [RDI + 0x10]
MOVSS XMM10,dword ptr [RDI + 0x20]
MOVSS XMM12,dword ptr [RDI + 0x8]
MOVAPS XMM8,XMM5
SHUFPS XMM8,XMM5,0x55
MULSS XMM7,XMM4
MOVAPS XMM2,XMM1
MULSS XMM2,XMM8
MOVAPS XMM6,XMM8
MULSS XMM6,XMM0
ADDSS XMM6,XMM7
MOVSS dword ptr [RBP + -0x8],XMM0
MOVAPS XMM7,XMM0
MULSS XMM7,XMM5
MOVAPS XMM14,XMM4
MULSS XMM14,XMM1
SUBSS XMM14,XMM7
MOVAPS XMM7,XMM5
MULSS XMM7,XMM3
SUBSS XMM7,XMM2
MOVAPS XMM2,XMM14
MULSS XMM2,XMM14
MOVAPS XMM15,XMM6
MULSS XMM15,XMM6
ADDSS XMM15,XMM2
MOVAPS XMM2,XMM7
MULSS XMM2,XMM7
ADDSS XMM2,XMM15
MOVSS XMM15,dword ptr [RDI + 0x18]
SQRTSS XMM2,XMM2
UCOMISS XMM2,XMM13
MOVSS XMM13,dword ptr [RDI + 0x28]
JNZ 0x001d10f6
JNP 0x001d1115
LAB_001d10f6:
MOVSS XMM0,dword ptr [0x001e2010]
DIVSS XMM0,XMM2
MULSS XMM6,XMM0
MULSS XMM14,XMM0
UNPCKLPS XMM6,XMM14
MULSS XMM7,XMM0
JMP 0x001d1119
LAB_001d1115:
UNPCKLPS XMM6,XMM14
LAB_001d1119:
MULSS XMM15,XMM15
MULSS XMM12,XMM12
ADDSS XMM12,XMM15
MULSS XMM13,XMM13
ADDSS XMM13,XMM12
XORPS XMM12,XMM12
SQRTSS XMM12,XMM13
MULSS XMM11,XMM11
MULSS XMM9,XMM9
ADDSS XMM9,XMM11
MULSS XMM10,XMM10
ADDSS XMM10,XMM9
XORPS XMM0,XMM0
SQRTSS XMM0,XMM10
MULSS XMM8,XMM0
MULSS XMM4,XMM0
MULSS XMM0,XMM5
MOVSS dword ptr [RDI],XMM0
MOVSS dword ptr [RDI + 0x10],XMM8
MOVSS dword ptr [RDI + 0x20],XMM4
MOVSS XMM2,dword ptr [RBP + -0x4]
MOVAPS XMM0,XMM2
MULSS XMM0,XMM1
MOVSS dword ptr [RDI + 0x4],XMM0
MULSS XMM3,XMM2
MOVSS dword ptr [RDI + 0x14],XMM3
MOVSS XMM0,dword ptr [RBP + -0x8]
MULSS XMM0,XMM2
MOVSS dword ptr [RDI + 0x24],XMM0
MOVAPS XMM0,XMM12
MULSS XMM0,XMM6
MOVSS dword ptr [RDI + 0x8],XMM0
SHUFPS XMM6,XMM6,0x55
MULSS XMM6,XMM12
MOVSS dword ptr [RDI + 0x18],XMM6
MULSS XMM7,XMM12
MOVSS dword ptr [RDI + 0x28],XMM7
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_billboard_mode_y(float *param_1,long param_2)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
float fVar11;
float fVar12;
fVar2 = param_1[1];
fVar5 = param_1[5];
fVar1 = param_1[9];
fVar7 = SQRT(fVar1 * fVar1 + fVar2 * fVar2 + fVar5 * fVar5);
if ((fVar7 != 0.0) || (NAN(fVar7))) {
fVar3 = DAT_001e2010 / fVar7;
fVar2 = fVar2 * fVar3;
fVar5 = fVar5 * fVar3;
fVar1 = fVar1 * fVar3;
}
fVar8 = *(float *)(param_2 + 0x2c) - param_1[0xb];
fVar6 = *(float *)(param_2 + 0xc) - param_1[3];
fVar10 = *(float *)(param_2 + 0x1c) - param_1[7];
fVar3 = SQRT(fVar8 * fVar8 + fVar6 * fVar6 + fVar10 * fVar10);
if ((fVar3 != 0.0) || (NAN(fVar3))) {
fVar3 = DAT_001e2010 / fVar3;
fVar6 = fVar6 * fVar3;
fVar10 = fVar10 * fVar3;
fVar8 = fVar8 * fVar3;
}
fVar4 = fVar5 * fVar8 - fVar1 * fVar10;
fVar8 = fVar1 * fVar6 - fVar8 * fVar2;
fVar6 = fVar10 * fVar2 - fVar6 * fVar5;
fVar3 = SQRT(fVar6 * fVar6 + fVar4 * fVar4 + fVar8 * fVar8);
if ((fVar3 != 0.0) || (NAN(fVar3))) {
fVar3 = DAT_001e2010 / fVar3;
fVar4 = fVar4 * fVar3;
fVar8 = fVar8 * fVar3;
fVar6 = fVar6 * fVar3;
}
fVar10 = fVar8 * fVar1 + (float)((uint)fVar5 ^ _DAT_001e22f0) * fVar6;
fVar12 = fVar6 * fVar2 - fVar1 * fVar4;
fVar9 = fVar4 * fVar5 - fVar2 * fVar8;
fVar3 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar12 * fVar12);
if ((fVar3 != 0.0) || (NAN(fVar3))) {
fVar3 = DAT_001e2010 / fVar3;
fVar10 = fVar10 * fVar3;
fVar12 = fVar12 * fVar3;
fVar9 = fVar9 * fVar3;
}
fVar11 = SQRT(param_1[10] * param_1[10] + param_1[2] * param_1[2] + param_1[6] * param_1[6]);
fVar3 = SQRT(param_1[8] * param_1[8] + *param_1 * *param_1 + param_1[4] * param_1[4]);
*param_1 = fVar3 * fVar4;
param_1[4] = fVar8 * fVar3;
param_1[8] = fVar6 * fVar3;
param_1[1] = fVar7 * fVar2;
param_1[5] = fVar5 * fVar7;
param_1[9] = fVar1 * fVar7;
param_1[2] = fVar11 * fVar10;
param_1[6] = fVar12 * fVar11;
param_1[10] = fVar9 * fVar11;
return;
}
|
|
63,747 |
bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval, 993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&, (anonymous namespace)::WordBreakPropertyInterval*)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/string.cpp
|
bool Bisearch(uint32_t ucs, const std::array<C, N>& table, C* out) {
if (ucs < table.front().first || ucs > table.back().last) { // NOLINT
return false;
}
int min = 0;
int max = N - 1;
while (max >= min) {
const int mid = (min + max) / 2;
if (ucs > table[mid].last) { // NOLINT
min = mid + 1;
} else if (ucs < table[mid].first) { // NOLINT
max = mid - 1;
} else {
*out = table[mid]; // NOLINT
return true;
}
}
return false;
}
|
O0
|
cpp
|
bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval, 993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&, (anonymous namespace)::WordBreakPropertyInterval*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8e440
movq %rax, %rcx
movl -0x28(%rbp), %eax
cmpl (%rcx), %eax
jb 0x8d5b6
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8e460
movq %rax, %rcx
movl -0x2c(%rbp), %eax
cmpl 0x4(%rcx), %eax
jbe 0x8d5bf
movb $0x0, -0x1(%rbp)
jmp 0x8d66c
movl $0x0, -0x1c(%rbp)
movl $0x3e0, -0x20(%rbp) # imm = 0x3E0
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x8d668
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x8e480
movq %rax, %rcx
movl -0x30(%rbp), %eax
cmpl 0x4(%rcx), %eax
jbe 0x8d613
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8d663
movl -0x8(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x8e480
movq %rax, %rcx
movl -0x34(%rbp), %eax
cmpl (%rcx), %eax
jae 0x8d63b
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8d661
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x8e480
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x8d66c
jmp 0x8d663
jmp 0x8d5cd
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN12_GLOBAL__N_18BisearchINS_25WordBreakPropertyIntervalELm993EEEbjRKSt5arrayIT_XT0_EEPS3_:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov eax, [rbp+var_8]
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
call _ZNKSt5arrayIN12_GLOBAL__N_125WordBreakPropertyIntervalELm993EE5frontEv; std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::front(void)
mov rcx, rax
mov eax, [rbp+var_28]
cmp eax, [rcx]
jb short loc_8D5B6
mov eax, [rbp+var_8]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_10]
call _ZNKSt5arrayIN12_GLOBAL__N_125WordBreakPropertyIntervalELm993EE4backEv; std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::back(void)
mov rcx, rax
mov eax, [rbp+var_2C]
cmp eax, [rcx+4]
jbe short loc_8D5BF
loc_8D5B6:
mov [rbp+var_1], 0
jmp loc_8D66C
loc_8D5BF:
mov [rbp+var_1C], 0
mov [rbp+var_20], 3E0h
loc_8D5CD:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_1C]
jl loc_8D668
mov eax, [rbp+var_1C]
add eax, [rbp+var_20]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_24], eax
mov eax, [rbp+var_8]
mov [rbp+var_30], eax
mov rdi, [rbp+var_10]
movsxd rsi, [rbp+var_24]
call _ZNKSt5arrayIN12_GLOBAL__N_125WordBreakPropertyIntervalELm993EEixEm; std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::operator[](ulong)
mov rcx, rax
mov eax, [rbp+var_30]
cmp eax, [rcx+4]
jbe short loc_8D613
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_8D663
loc_8D613:
mov eax, [rbp+var_8]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
movsxd rsi, [rbp+var_24]
call _ZNKSt5arrayIN12_GLOBAL__N_125WordBreakPropertyIntervalELm993EEixEm; std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::operator[](ulong)
mov rcx, rax
mov eax, [rbp+var_34]
cmp eax, [rcx]
jnb short loc_8D63B
mov eax, [rbp+var_24]
sub eax, 1
mov [rbp+var_20], eax
jmp short loc_8D661
loc_8D63B:
mov rdi, [rbp+var_10]
movsxd rsi, [rbp+var_24]
call _ZNKSt5arrayIN12_GLOBAL__N_125WordBreakPropertyIntervalELm993EEixEm; std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_18]
mov rdx, [rcx]
mov [rax], rdx
mov ecx, [rcx+8]
mov [rax+8], ecx
mov [rbp+var_1], 1
jmp short loc_8D66C
loc_8D661:
jmp short $+2
loc_8D663:
jmp loc_8D5CD
loc_8D668:
mov [rbp+var_1], 0
loc_8D66C:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
|
char `anonymous namespace'::Bisearch<`anonymous namespace'::WordBreakPropertyInterval,993ul>(
unsigned int a1,
long long a2,
long long a3)
{
long long v3; // rdx
long long v4; // rdx
long long v5; // rdx
long long v6; // rcx
int v8; // [rsp+1Ch] [rbp-24h]
int v9; // [rsp+20h] [rbp-20h]
int v10; // [rsp+24h] [rbp-1Ch]
if ( a1 < *(_DWORD *)std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::front(a2)
|| a1 > *(_DWORD *)(std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::back(a2) + 4) )
{
return 0;
}
v10 = 0;
v9 = 992;
while ( v9 >= v10 )
{
v3 = (unsigned int)((v9 + v10) >> 31);
LODWORD(v3) = (v9 + v10) % 2;
v8 = (v9 + v10) / 2;
if ( a1 <= *(_DWORD *)(std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::operator[](a2, v8, v3) + 4) )
{
if ( a1 >= *(_DWORD *)std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::operator[](a2, v8, v4) )
{
v6 = std::array<`anonymous namespace'::WordBreakPropertyInterval,993ul>::operator[](a2, v8, v5);
*(_QWORD *)a3 = *(_QWORD *)v6;
*(_DWORD *)(a3 + 8) = *(_DWORD *)(v6 + 8);
return 1;
}
v9 = v8 - 1;
}
else
{
v10 = v8 + 1;
}
}
return 0;
}
|
Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0018e440
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX]
JC 0x0018d5b6
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0018e460
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RCX + 0x4]
JBE 0x0018d5bf
LAB_0018d5b6:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0018d66c
LAB_0018d5bf:
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x20],0x3e0
LAB_0018d5cd:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x1c]
JL 0x0018d668
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,dword ptr [RBP + -0x20]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x30],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RSI,dword ptr [RBP + -0x24]
CALL 0x0018e480
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RCX + 0x4]
JBE 0x0018d613
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0018d663
LAB_0018d613:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RSI,dword ptr [RBP + -0x24]
CALL 0x0018e480
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RCX]
JNC 0x0018d63b
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0018d661
LAB_0018d63b:
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RSI,dword ptr [RBP + -0x24]
CALL 0x0018e480
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV ECX,dword ptr [RCX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0018d66c
LAB_0018d661:
JMP 0x0018d663
LAB_0018d663:
JMP 0x0018d5cd
LAB_0018d668:
MOV byte ptr [RBP + -0x1],0x0
LAB_0018d66c:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* bool (anonymous namespace)::Bisearch<(anonymous namespace)::WordBreakPropertyInterval,
993ul>(unsigned int, std::array<(anonymous namespace)::WordBreakPropertyInterval, 993ul> const&,
(anonymous namespace)::WordBreakPropertyInterval*) */
bool (anonymous_namespace)::Bisearch<(anonymous_namespace)::WordBreakPropertyInterval,993ul>
(uint param_1,array *param_2,WordBreakPropertyInterval *param_3)
{
int iVar1;
uint *puVar2;
long lVar3;
int8 *puVar4;
int local_28;
int local_24;
puVar2 = (uint *)std::array<(anonymous_namespace)::WordBreakPropertyInterval,993ul>::front
((array<(anonymous_namespace)::WordBreakPropertyInterval,993ul> *)
param_2);
if ((*puVar2 <= param_1) &&
(lVar3 = std::array<(anonymous_namespace)::WordBreakPropertyInterval,993ul>::back
((array<(anonymous_namespace)::WordBreakPropertyInterval,993ul> *)param_2),
param_1 <= *(uint *)(lVar3 + 4))) {
local_24 = 0;
local_28 = 0x3e0;
while (local_24 <= local_28) {
iVar1 = (local_24 + local_28) / 2;
lVar3 = std::array<(anonymous_namespace)::WordBreakPropertyInterval,993ul>::operator[]
((array<(anonymous_namespace)::WordBreakPropertyInterval,993ul> *)param_2,
(long)iVar1);
if (*(uint *)(lVar3 + 4) < param_1) {
local_24 = iVar1 + 1;
}
else {
puVar2 = (uint *)std::array<(anonymous_namespace)::WordBreakPropertyInterval,993ul>::
operator[]((array<(anonymous_namespace)::WordBreakPropertyInterval,993ul> *
)param_2,(long)iVar1);
if (*puVar2 <= param_1) {
puVar4 = (int8 *)
std::array<(anonymous_namespace)::WordBreakPropertyInterval,993ul>::operator[]
((array<(anonymous_namespace)::WordBreakPropertyInterval,993ul> *)
param_2,(long)iVar1);
*(int8 *)param_3 = *puVar4;
*(int4 *)(param_3 + 8) = *(int4 *)(puVar4 + 1);
return true;
}
local_28 = iVar1 + -1;
}
}
}
return false;
}
|
|
63,748 |
blst_pairing_merge
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/aggregate.c
|
BLST_ERROR blst_pairing_merge(PAIRING *ctx, const PAIRING *ctx1)
{
if ((ctx->ctrl & MIN_SIG_OR_PK) != AGGR_UNDEFINED
&& (ctx1->ctrl & MIN_SIG_OR_PK) != AGGR_UNDEFINED
&& (ctx->ctrl & ctx1->ctrl & MIN_SIG_OR_PK) == 0)
return BLST_AGGR_TYPE_MISMATCH;
/* context producers are expected to have called blst_pairing_commit */
if (ctx->nelems || ctx1->nelems)
return BLST_AGGR_TYPE_MISMATCH;
ctx->ctrl |= ctx1->ctrl & MIN_SIG_OR_PK;
switch (ctx->ctrl & MIN_SIG_OR_PK) {
case AGGR_MIN_SIG:
if (ctx->ctrl & ctx1->ctrl & AGGR_SIGN_SET) {
POINTonE1_dadd(&ctx->AggrSign.e1, &ctx->AggrSign.e1,
&ctx1->AggrSign.e1, NULL);
} else if (ctx1->ctrl & AGGR_SIGN_SET) {
ctx->ctrl |= AGGR_SIGN_SET;
vec_copy(&ctx->AggrSign.e1, &ctx1->AggrSign.e1,
sizeof(ctx->AggrSign.e1));
}
break;
case AGGR_MIN_PK:
if (ctx->ctrl & ctx1->ctrl & AGGR_SIGN_SET) {
POINTonE2_dadd(&ctx->AggrSign.e2, &ctx->AggrSign.e2,
&ctx1->AggrSign.e2, NULL);
} else if (ctx1->ctrl & AGGR_SIGN_SET) {
ctx->ctrl |= AGGR_SIGN_SET;
vec_copy(&ctx->AggrSign.e2, &ctx1->AggrSign.e2,
sizeof(ctx->AggrSign.e2));
}
break;
case AGGR_UNDEFINED:
break;
default:
return BLST_AGGR_TYPE_MISMATCH;
}
if (ctx->ctrl & ctx1->ctrl & AGGR_GT_SET) {
mul_fp12(ctx->GT, ctx->GT, ctx1->GT);
} else if (ctx1->ctrl & AGGR_GT_SET) {
ctx->ctrl |= AGGR_GT_SET;
vec_copy(ctx->GT, ctx1->GT, sizeof(ctx->GT));
}
return BLST_SUCCESS;
}
|
O3
|
c
|
blst_pairing_merge:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movl %eax, %ecx
andl $0x3, %ecx
je 0x2124a
movl (%rbx), %edx
testb $0x3, %dl
setne %sil
testl %edx, %ecx
sete %cl
movl $0x4, %r15d
testb %cl, %sil
jne 0x2134f
movl $0x4, %r15d
cmpl $0x0, 0x4(%r14)
jne 0x2134f
cmpl $0x0, 0x4(%rbx)
jne 0x2134f
movl (%rbx), %ecx
andl $0x3, %ecx
orl %eax, %ecx
movl %ecx, (%r14)
movl %ecx, %edx
andl $0x3, %edx
leaq 0x1e505(%rip), %rsi # 0x3f780
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movl (%rbx), %edx
andl %edx, %eax
testb $0x10, %al
je 0x212c4
movl $0x258, %edx # imm = 0x258
leaq (%r14,%rdx), %rdi
addq %rbx, %rdx
movq %rdi, %rsi
xorl %ecx, %ecx
callq 0x197f0
jmp 0x21303
movl (%rbx), %edx
andl %edx, %eax
testb $0x10, %al
je 0x212e2
movl $0x258, %edx # imm = 0x258
leaq (%r14,%rdx), %rdi
addq %rbx, %rdx
movq %rdi, %rsi
xorl %ecx, %ecx
callq 0x1c8af
jmp 0x21303
testb $0x10, %dl
je 0x21303
orl $0x10, %ecx
movl %ecx, (%r14)
movl $0x258, %esi # imm = 0x258
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
movl $0x90, %edx
jmp 0x212fe
testb $0x10, %dl
je 0x21303
orl $0x10, %ecx
movl %ecx, (%r14)
movl $0x258, %esi # imm = 0x258
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
movl $0x120, %edx # imm = 0x120
callq 0x5060
movl (%r14), %eax
movl (%rbx), %ecx
andl $0x20, %ecx
testl %eax, %ecx
je 0x2132a
addq $0x18, %r14
addq $0x18, %rbx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1ee00
xorl %r15d, %r15d
jmp 0x2134f
xorl %r15d, %r15d
testl %ecx, %ecx
je 0x2134f
orl $0x20, %eax
movl %eax, (%r14)
addq $0x18, %r14
addq $0x18, %rbx
movl $0x240, %edx # imm = 0x240
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5060
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
blst_pairing_merge:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov eax, [rdi]
mov ecx, eax
and ecx, 3
jz short loc_2124A
mov edx, [rbx]
test dl, 3
setnz sil
test ecx, edx
setz cl
mov r15d, 4
test sil, cl
jnz loc_2134F; jumptable 0000000000021282 case 3
loc_2124A:
mov r15d, 4
cmp dword ptr [r14+4], 0
jnz loc_2134F; jumptable 0000000000021282 case 3
cmp dword ptr [rbx+4], 0
jnz loc_2134F; jumptable 0000000000021282 case 3
mov ecx, [rbx]
and ecx, 3
or ecx, eax
mov [r14], ecx
mov edx, ecx
and edx, 3
lea rsi, jpt_21282
movsxd rdx, ds:(jpt_21282 - 3F780h)[rsi+rdx*4]; switch 4 cases
add rdx, rsi
jmp rdx; switch jump
loc_21284:
mov edx, [rbx]; jumptable 0000000000021282 case 1
and eax, edx
test al, 10h
jz short loc_212C4
mov edx, 258h
lea rdi, [r14+rdx]
add rdx, rbx
mov rsi, rdi
xor ecx, ecx
call POINTonE1_dadd
jmp short loc_21303; jumptable 0000000000021282 case 0
loc_212A4:
mov edx, [rbx]; jumptable 0000000000021282 case 2
and eax, edx
test al, 10h
jz short loc_212E2
mov edx, 258h
lea rdi, [r14+rdx]
add rdx, rbx
mov rsi, rdi
xor ecx, ecx
call POINTonE2_dadd
jmp short loc_21303; jumptable 0000000000021282 case 0
loc_212C4:
test dl, 10h
jz short loc_21303; jumptable 0000000000021282 case 0
or ecx, 10h
mov [r14], ecx
mov esi, 258h
lea rdi, [r14+rsi]
add rsi, rbx
mov edx, 90h
jmp short loc_212FE
loc_212E2:
test dl, 10h
jz short loc_21303; jumptable 0000000000021282 case 0
or ecx, 10h
mov [r14], ecx
mov esi, 258h
lea rdi, [r14+rsi]
add rsi, rbx
mov edx, 120h
loc_212FE:
call _memcpy
loc_21303:
mov eax, [r14]; jumptable 0000000000021282 case 0
mov ecx, [rbx]
and ecx, 20h
test ecx, eax
jz short loc_2132A
add r14, 18h
add rbx, 18h
mov rdi, r14
mov rsi, r14
mov rdx, rbx
call mul_fp12
xor r15d, r15d
jmp short loc_2134F; jumptable 0000000000021282 case 3
loc_2132A:
xor r15d, r15d
test ecx, ecx
jz short loc_2134F; jumptable 0000000000021282 case 3
or eax, 20h
mov [r14], eax
add r14, 18h
add rbx, 18h
mov edx, 240h
mov rdi, r14
mov rsi, rbx
call _memcpy
loc_2134F:
mov eax, r15d; jumptable 0000000000021282 case 3
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long blst_pairing_merge(int *a1, _DWORD *a2)
{
int v4; // eax
unsigned int v5; // r15d
int v6; // ecx
_DWORD *v7; // rdi
_DWORD *v8; // rsi
long long v9; // rdx
int v10; // ecx
v4 = *a1;
if ( (*a1 & 3) == 0 || (v5 = 4, (*a2 & *a1 & 3) != 0 || (*a2 & 3) == 0) )
{
v5 = 4;
if ( !a1[1] && !a2[1] )
{
v6 = v4 | *a2 & 3;
*a1 = v6;
switch ( v6 & 3 )
{
case 0:
goto LABEL_15;
case 1:
if ( ((unsigned __int8)*a2 & (unsigned __int8)v4 & 0x10) != 0 )
{
POINTonE1_dadd((long long)(a1 + 150), (long long)(a1 + 150), (long long)(a2 + 150), 0LL);
goto LABEL_15;
}
if ( (*a2 & 0x10) == 0 )
goto LABEL_15;
*a1 = v6 | 0x10;
v7 = a1 + 150;
v8 = a2 + 150;
v9 = 144LL;
goto LABEL_14;
case 2:
if ( ((unsigned __int8)*a2 & (unsigned __int8)v4 & 0x10) != 0 )
{
POINTonE2_dadd((long long)(a1 + 150), (long long)(a1 + 150), (long long)(a2 + 150), 0LL);
}
else if ( (*a2 & 0x10) != 0 )
{
*a1 = v6 | 0x10;
v7 = a1 + 150;
v8 = a2 + 150;
v9 = 288LL;
LABEL_14:
memcpy(v7, v8, v9);
}
LABEL_15:
v10 = *a2 & 0x20;
if ( (*a1 & v10) != 0 )
{
mul_fp12((long long)(a1 + 6), (long long)(a1 + 6), (long long)(a2 + 6));
v5 = 0;
}
else
{
v5 = 0;
if ( v10 )
{
*a1 |= 0x20u;
memcpy(a1 + 6, a2 + 6, 576LL);
}
}
break;
case 3:
return v5;
}
}
}
return v5;
}
|
blst_pairing_merge:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV EAX,dword ptr [RDI]
MOV ECX,EAX
AND ECX,0x3
JZ 0x0012124a
MOV EDX,dword ptr [RBX]
TEST DL,0x3
SETNZ SIL
TEST ECX,EDX
SETZ CL
MOV R15D,0x4
TEST SIL,CL
JNZ 0x0012134f
LAB_0012124a:
MOV R15D,0x4
CMP dword ptr [R14 + 0x4],0x0
JNZ 0x0012134f
CMP dword ptr [RBX + 0x4],0x0
JNZ 0x0012134f
MOV ECX,dword ptr [RBX]
AND ECX,0x3
OR ECX,EAX
MOV dword ptr [R14],ECX
MOV EDX,ECX
AND EDX,0x3
LEA RSI,[0x13f780]
MOVSXD RDX,dword ptr [RSI + RDX*0x4]
ADD RDX,RSI
JMP RDX
LAB_0012134f:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 blst_pairing_merge(uint *param_1,uint *param_2)
{
uint uVar1;
uint uVar2;
int8 uVar3;
uVar1 = *param_1;
if (((((uVar1 & 3) == 0) || ((*param_2 & 3) == 0 || (uVar1 & 3 & *param_2) != 0)) &&
(param_1[1] == 0)) && (param_2[1] == 0)) {
uVar2 = *param_2;
*param_1 = uVar2 & 3 | uVar1;
/* WARNING: Could not recover jumptable at 0x00121282. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*(code *)(&DAT_0013f780 + *(int *)(&DAT_0013f780 + (ulong)(uVar2 & 3 | uVar1 & 3) * 4))
)(param_1,&DAT_0013f780,
&DAT_0013f780 + *(int *)(&DAT_0013f780 + (ulong)(uVar2 & 3 | uVar1 & 3) * 4));
return uVar3;
}
return 4;
}
|
|
63,749 |
CLI::ExtrasError::~ExtrasError()
|
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
|
explicit ExtrasError(std::vector<std::string> args)
: ExtrasError((args.size() > 1 ? "The following arguments were not expected: "
: "The following argument was not expected: ") +
detail::rjoin(args, " "),
ExitCodes::ExtrasError) {}
|
O1
|
cpp
|
CLI::ExtrasError::~ExtrasError():
pushq %rbx
movq %rdi, %rbx
leaq 0x24d4d(%rip), %rax # 0x491f0
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x244be
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7490
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x7430
|
_ZN3CLI11ExtrasErrorD0Ev:
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_244BE
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_244BE:
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::ExtrasError::~ExtrasError(CLI::ExtrasError *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);
}
|
~ExtrasError:
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 0x001244be
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_001244be:
MOV RDI,RBX
CALL 0x00107490
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x00107430
|
/* CLI::ExtrasError::~ExtrasError() */
void __thiscall CLI::ExtrasError::~ExtrasError(ExtrasError *this)
{
*(int ***)this = &PTR__Error_001491f0;
if (*(ExtrasError **)(this + 0x18) != this + 0x28) {
operator_delete(*(ExtrasError **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
std::runtime_error::~runtime_error((runtime_error *)this);
operator_delete(this,0x38);
return;
}
|
|
63,750 |
ftparser_alloc_param
|
eloqsql/storage/myisam/ft_parser.c
|
MYSQL_FTPARSER_PARAM* ftparser_alloc_param(MI_INFO *info)
{
if (!info->ftparser_param)
{
/*
. info->ftparser_param can not be zero after the initialization,
because it always includes built-in fulltext parser. And built-in
parser can be called even if the table has no fulltext indexes and
no varchar/text fields.
ftb_find_relevance... parser (ftb_find_relevance_parse,
ftb_find_relevance_add_word) calls ftb_check_phrase... parser
(ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2.
*/
info->ftparser_param= (MYSQL_FTPARSER_PARAM *)
my_malloc(mi_key_memory_FTPARSER_PARAM,
MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) * info->s->ftkeys,
MYF(MY_WME | MY_ZEROFILL));
init_alloc_root(mi_key_memory_ft_memroot, &info->ft_memroot,
FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
return info->ftparser_param;
}
|
O3
|
c
|
ftparser_alloc_param:
movq 0xd0(%rdi), %rax
testq %rax, %rax
je 0x933d0
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xbbfa4c(%rip), %rax # 0xc52e2c
movl (%rax), %edi
movq (%rbx), %rax
movl 0x34c(%rax), %esi
shlq $0x7, %rsi
movl $0x30, %edx
callq 0xc3acd
movq %rax, 0xd0(%rbx)
leaq 0xbbfa29(%rip), %rax # 0xc52e30
movl (%rax), %edi
leaq 0x90(%rbx), %rsi
movl $0x10000, %edx # imm = 0x10000
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xbde94
movq 0xd0(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
ftparser_alloc_param:
mov rax, [rdi+0D0h]
test rax, rax
jz short loc_933D0
retn
loc_933D0:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rax, mi_key_memory_FTPARSER_PARAM
mov edi, [rax]
mov rax, [rbx]
mov esi, [rax+34Ch]
shl rsi, 7
mov edx, 30h ; '0'
call my_malloc
mov [rbx+0D0h], rax
lea rax, mi_key_memory_ft_memroot
mov edi, [rax]
lea rsi, [rbx+90h]
mov edx, 10000h
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rax, [rbx+0D0h]
add rsp, 8
pop rbx
pop rbp
retn
|
long long ftparser_alloc_param(_QWORD *a1)
{
long long result; // rax
result = a1[26];
if ( !result )
{
a1[26] = my_malloc(mi_key_memory_FTPARSER_PARAM, (unsigned long long)*(unsigned int *)(*a1 + 844LL) << 7, 48LL);
init_alloc_root(mi_key_memory_ft_memroot, a1 + 18, 0x10000LL, 0LL, 0LL);
return a1[26];
}
return result;
}
|
ftparser_alloc_param:
MOV RAX,qword ptr [RDI + 0xd0]
TEST RAX,RAX
JZ 0x001933d0
RET
LAB_001933d0:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0xd52e2c]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBX]
MOV ESI,dword ptr [RAX + 0x34c]
SHL RSI,0x7
MOV EDX,0x30
CALL 0x001c3acd
MOV qword ptr [RBX + 0xd0],RAX
LEA RAX,[0xd52e30]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x90]
MOV EDX,0x10000
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001bde94
MOV RAX,qword ptr [RBX + 0xd0]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
long ftparser_alloc_param(long *param_1)
{
long lVar1;
int8 in_R9;
long lVar2;
lVar2 = param_1[0x1a];
if (lVar2 != 0) {
return lVar2;
}
lVar1 = my_malloc(mi_key_memory_FTPARSER_PARAM,(ulong)*(uint *)(*param_1 + 0x34c) << 7,0x30);
param_1[0x1a] = lVar1;
init_alloc_root(mi_key_memory_ft_memroot,param_1 + 0x12,0x10000,0,0,in_R9,lVar2);
return param_1[0x1a];
}
|
|
63,751 |
common_chat_params_init_without_tools(minja::chat_template const&, templates_params const&)
|
llama.cpp/common/chat.cpp
|
static common_chat_params common_chat_params_init_without_tools(const common_chat_template & tmpl, const struct templates_params & inputs) {
common_chat_params data;
data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
data.format = COMMON_CHAT_FORMAT_CONTENT_ONLY;
data.grammar_lazy = false;
if (!inputs.json_schema.is_null()) {
if (!inputs.grammar.empty()) {
throw std::runtime_error("Either \"json_schema\" or \"grammar\" can be specified, but not both");
}
data.grammar = json_schema_to_grammar(inputs.json_schema);
} else {
data.grammar = inputs.grammar;
}
return data;
}
|
O3
|
cpp
|
common_chat_params_init_without_tools(minja::chat_template const&, templates_params const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
movb %al, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movq %rax, 0x90(%rdi)
movzbl 0x10(%rdx), %eax
testl %eax, %eax
je 0x9b210
cmpl $0x2, %eax
je 0x9b1f3
cmpl $0x1, %eax
jne 0x9b200
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x9b210
leaq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x88de4
jmp 0x9b23d
leaq 0x8(%rsp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x84b96
movq %r12, %rdi
movl $0x1, %esi
callq 0x84b96
movzbl 0x60(%r14), %ebp
leaq 0x38(%rsp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x84b96
movq %r12, %rdi
movl $0x1, %esi
callq 0x84b96
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %r8d
movq %r12, %r9
callq 0x9c0d1
leaq 0x8(%rbx), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x208c0
movq (%r15), %rdi
leaq 0x28(%rsp), %r13
cmpq %r13, %rdi
je 0x9b2b5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x28(%rbx), %r15
leaq 0x38(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x84b96
movq %r12, %rdi
callq 0x892b0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x84b96
movq %r12, %rdi
callq 0x892b0
movl $0x0, (%rbx)
movb $0x0, 0x48(%rbx)
cmpb $0x0, 0x28(%r14)
je 0x9b339
cmpq $0x0, 0x48(%r14)
jne 0x9b357
addq $0x28, %r14
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xfc93c
leaq 0x18(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x208c0
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x9b348
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0x9b348
addq $0x40, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x21320
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %r15
leaq 0x850ab(%rip), %rsi # 0x120416
movq %rax, %rdi
callq 0x20420
movq 0xc6c46(%rip), %rsi # 0x161fc0
movq 0xc6bff(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a50
movq %rax, %r14
movq %r15, %rdi
callq 0x20f10
jmp 0x9b3d0
jmp 0x9b39a
jmp 0x9b39a
movq %rax, %r14
jmp 0x9b3d0
movq %rax, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x84b96
movq %r15, %rdi
callq 0x892b0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x84b96
movq %r15, %rdi
callq 0x892b0
movq %rbx, %rdi
callq 0xb1562
movq %r14, %rdi
callq 0x20af0
|
_ZL37common_chat_params_init_without_toolsRKN5minja13chat_templateERK16templates_params:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
lea rax, [rdi+18h]
mov [rdi+8], rax
xor eax, eax
mov [rdi+10h], rax
mov [rdi+18h], al
lea rcx, [rdi+38h]
mov [rdi+28h], rcx
mov [rdi+30h], rax
mov [rdi+38h], al
mov [rdi+48h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
movups xmmword ptr [rdi+80h], xmm0
mov [rdi+90h], rax
movzx eax, byte ptr [rdx+10h]
test eax, eax
jz short loc_9B210
cmp eax, 2
jz short loc_9B1F3
cmp eax, 1
jnz short loc_9B200
loc_9B1F3:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_9B210
loc_9B200:
lea rsi, [r14+10h]
lea rdi, [rsp+78h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_9B23D
loc_9B210:
lea r12, [rsp+78h+var_70]
mov byte ptr [r12], 0
mov qword ptr [r12+8], 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 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)
loc_9B23D:
movzx ebp, byte ptr [r14+60h]
lea r12, [rsp+78h+var_40]
mov byte ptr [r12], 0
mov qword ptr [r12+8], 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 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)
lea rdi, [rsp+78h+var_60]
lea rcx, [rsp+78h+var_70]
mov rsi, r15
mov rdx, r14
mov r8d, ebp
mov r9, r12
call _ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_; apply(minja::chat_template const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rdi, [rbx+8]
lea r15, [rsp+78h+var_60]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; void *
lea r13, [rsp+78h+var_50]
cmp rdi, r13
jz short loc_9B2B5
mov rsi, [rsp+78h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B2B5:
lea r15, [rbx+28h]
lea r12, [rsp+78h+var_40]
mov rdi, r12
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, r12
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 r12, [rsp+78h+var_70]
mov rdi, r12
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, r12
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 dword ptr [rbx], 0
mov byte ptr [rbx+48h], 0
cmp byte ptr [r14+28h], 0
jz short loc_9B339
cmp qword ptr [r14+48h], 0
jnz short loc_9B357
add r14, 28h ; '('
lea rdi, [rsp+78h+var_60]
mov rsi, r14
xor edx, edx
call _Z22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEb; json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rbx, [rsp+78h+var_60]
mov rdi, r15
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_9B348
mov rsi, [rsp+78h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9B348
loc_9B339:
add r14, 40h ; '@'
mov rdi, r15
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_9B348:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9B357:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aEitherJsonSche; "Either \"json_schema\" or \"grammar\" c"...
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
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_9B3D0
jmp short loc_9B39A
jmp short $+2
loc_9B39A:
mov r14, rax
jmp short loc_9B3D0
mov r14, rax
lea r15, [rsp+78h+var_40]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea r15, [rsp+78h+var_70]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_9B3D0:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
|
void common_chat_params_init_without_tools(long long a1, int a2, long long a3)
{
int v4; // eax
int v5; // ebp
std::runtime_error *exception; // r15
char v7[8]; // [rsp+8h] [rbp-70h] BYREF
long long v8; // [rsp+10h] [rbp-68h]
void *v9[2]; // [rsp+18h] [rbp-60h] BYREF
_QWORD v10[2]; // [rsp+28h] [rbp-50h] BYREF
char v11[8]; // [rsp+38h] [rbp-40h] BYREF
long long v12; // [rsp+40h] [rbp-38h]
*(_DWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = a1 + 24;
*(_QWORD *)(a1 + 16) = 0LL;
*(_BYTE *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 40) = a1 + 56;
*(_QWORD *)(a1 + 48) = 0LL;
*(_BYTE *)(a1 + 56) = 0;
*(_BYTE *)(a1 + 72) = 0;
*(_OWORD *)(a1 + 80) = 0LL;
*(_OWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = 0LL;
v4 = *(unsigned __int8 *)(a3 + 16);
if ( !*(_BYTE *)(a3 + 16) || (v4 == 2 || v4 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
v7[0] = 0;
v8 = 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(v7);
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(v7);
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned __int8 *)v7,
(unsigned __int8 *)(a3 + 16));
}
v5 = *(unsigned __int8 *)(a3 + 96);
v11[0] = 0;
v12 = 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(v11);
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(v11);
apply((unsigned int)v9, a2, a3, (unsigned int)v7, v5, (unsigned int)v11);
std::string::operator=(a1 + 8, v9);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
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(v11);
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(v11);
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(v7);
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(v7);
*(_DWORD *)a1 = 0;
*(_BYTE *)(a1 + 72) = 0;
if ( *(_BYTE *)(a3 + 40) )
{
if ( *(_QWORD *)(a3 + 72) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(
exception,
"Either \"json_schema\" or \"grammar\" can be specified, but not both");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
json_schema_to_grammar(v9, a3 + 40, 0LL);
std::string::operator=(a1 + 40, v9);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
}
else
{
std::string::_M_assign(a1 + 40, a3 + 64);
}
}
|
common_chat_params_init_without_tools:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
LEA RAX,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x38]
MOV qword ptr [RDI + 0x28],RCX
MOV qword ptr [RDI + 0x30],RAX
MOV byte ptr [RDI + 0x38],AL
MOV byte ptr [RDI + 0x48],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOVUPS xmmword ptr [RDI + 0x80],XMM0
MOV qword ptr [RDI + 0x90],RAX
MOVZX EAX,byte ptr [RDX + 0x10]
TEST EAX,EAX
JZ 0x0019b210
CMP EAX,0x2
JZ 0x0019b1f3
CMP EAX,0x1
JNZ 0x0019b200
LAB_0019b1f3:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x0019b210
LAB_0019b200:
LEA RSI,[R14 + 0x10]
LEA RDI,[RSP + 0x8]
CALL 0x00188de4
JMP 0x0019b23d
LAB_0019b210:
LEA R12,[RSP + 0x8]
MOV byte ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x00184b96
MOV RDI,R12
MOV ESI,0x1
CALL 0x00184b96
LAB_0019b23d:
MOVZX EBP,byte ptr [R14 + 0x60]
LEA R12,[RSP + 0x38]
MOV byte ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x0
MOV RDI,R12
MOV ESI,0x1
CALL 0x00184b96
MOV RDI,R12
MOV ESI,0x1
CALL 0x00184b96
LAB_0019b26f:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x8]
MOV RSI,R15
MOV RDX,R14
MOV R8D,EBP
MOV R9,R12
CALL 0x0019c0d1
LEA RDI,[RBX + 0x8]
LEA R15,[RSP + 0x18]
MOV RSI,R15
CALL 0x001208c0
MOV RDI,qword ptr [R15]
LEA R13,[RSP + 0x28]
CMP RDI,R13
JZ 0x0019b2b5
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00120180
LAB_0019b2b5:
LEA R15,[RBX + 0x28]
LEA R12,[RSP + 0x38]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00184b96
MOV RDI,R12
CALL 0x001892b0
LEA R12,[RSP + 0x8]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00184b96
MOV RDI,R12
CALL 0x001892b0
MOV dword ptr [RBX],0x0
MOV byte ptr [RBX + 0x48],0x0
CMP byte ptr [R14 + 0x28],0x0
JZ 0x0019b339
CMP qword ptr [R14 + 0x48],0x0
JNZ 0x0019b357
LAB_0019b2ff:
ADD R14,0x28
LEA RDI,[RSP + 0x18]
MOV RSI,R14
XOR EDX,EDX
CALL 0x001fc93c
LEA RBX,[RSP + 0x18]
MOV RDI,R15
MOV RSI,RBX
CALL 0x001208c0
MOV RDI,qword ptr [RBX]
CMP RDI,R13
JZ 0x0019b348
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00120180
JMP 0x0019b348
LAB_0019b339:
ADD R14,0x40
LAB_0019b33d:
MOV RDI,R15
MOV RSI,R14
CALL 0x00121320
LAB_0019b348:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019b357:
MOV EDI,0x10
CALL 0x00120650
MOV R15,RAX
LAB_0019b364:
LEA RSI,[0x220416]
MOV RDI,RAX
CALL 0x00120420
LAB_0019b373:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a50
|
/* common_chat_params_init_without_tools(minja::chat_template const&, templates_params const&) */
void common_chat_params_init_without_tools(chat_template *param_1,templates_params *param_2)
{
basic_json bVar1;
runtime_error *this;
basic_json *in_RDX;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_70 [8];
int8 local_68;
long *local_60 [2];
long local_50 [2];
data local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
*(chat_template **)(param_1 + 8) = param_1 + 0x18;
*(int8 *)(param_1 + 0x10) = 0;
param_1[0x18] = (chat_template)0x0;
*(chat_template **)(param_1 + 0x28) = param_1 + 0x38;
*(int8 *)(param_1 + 0x30) = 0;
param_1[0x38] = (chat_template)0x0;
param_1[0x48] = (chat_template)0x0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x88) = 0;
*(int8 *)(param_1 + 0x90) = 0;
bVar1 = in_RDX[0x10];
if ((bVar1 == (basic_json)0x0) ||
(((bVar1 == (basic_json)0x2 || (bVar1 == (basic_json)0x1)) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_70[0] = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
local_68 = 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_70,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_70,0));
}
else {
/* try { // try from 0019b200 to 0019b20d has its CatchHandler @ 0019b396 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_70,in_RDX + 0x10);
}
bVar1 = in_RDX[0x60];
local_40[0] = (data)0x0;
local_38 = 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_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
/* try { // try from 0019b26f to 0019b289 has its CatchHandler @ 0019b39f */
apply((chat_template *)local_60,(basic_json *)param_2,in_RDX,SUB81(local_70,0),
(basic_json *)(ulong)(byte)bVar1);
std::__cxx11::string::operator=((string *)(param_1 + 8),(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_70,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_70);
*(int4 *)param_1 = 0;
param_1[0x48] = (chat_template)0x0;
if (in_RDX[0x28] == (basic_json)0x0) {
/* try { // try from 0019b33d to 0019b347 has its CatchHandler @ 0019b39a */
std::__cxx11::string::_M_assign((string *)(param_1 + 0x28));
}
else {
if (*(long *)(in_RDX + 0x48) != 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019b364 to 0019b372 has its CatchHandler @ 0019b389 */
std::runtime_error::runtime_error
(this,"Either \"json_schema\" or \"grammar\" can be specified, but not both");
/* try { // try from 0019b373 to 0019b388 has its CatchHandler @ 0019b39a */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
/* try { // try from 0019b2ff to 0019b311 has its CatchHandler @ 0019b398 */
json_schema_to_grammar((basic_json *)local_60,(bool)((char)in_RDX + '('));
std::__cxx11::string::operator=((string *)(param_1 + 0x28),(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
return;
}
|
|
63,752 |
my_hash_sort_bin
|
eloqsql/strings/ctype-bin.c
|
void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2)
{
const uchar *end = key + len;
ulong tmp1= *nr1;
ulong tmp2= *nr2;
for (; key < end ; key++)
{
MY_HASH_ADD(tmp1, tmp2, (uint) *key);
}
*nr1= tmp1;
*nr2= tmp2;
}
|
O3
|
c
|
my_hash_sort_bin:
movq (%rcx), %rax
movq (%r8), %rdi
testq %rdx, %rdx
jle 0x34017
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
movl %eax, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rax, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rax
addq $0x3, %rdi
incq %rsi
cmpq %rdx, %rsi
jb 0x33feb
popq %rbp
movq %rax, (%rcx)
movq %rdi, (%r8)
retq
|
my_hash_sort_bin:
mov rax, [rcx]
mov rdi, [r8]
test rdx, rdx
jle short loc_34017
push rbp
mov rbp, rsp
add rdx, rsi
loc_33FEB:
mov r9d, eax
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rax
shl r9, 8
add r9, r10
xor rax, r9
add rdi, 3
inc rsi
cmp rsi, rdx
jb short loc_33FEB
pop rbp
loc_34017:
mov [rcx], rax
mov [r8], rdi
retn
|
long long my_hash_sort_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long result; // rax
long long v6; // rdi
unsigned __int8 *v7; // rdx
result = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = &a2[a3];
do
{
result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8);
v6 += 3LL;
++a2;
}
while ( a2 < v7 );
}
*a4 = result;
*a5 = v6;
return result;
}
|
my_hash_sort_bin:
MOV RAX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
TEST RDX,RDX
JLE 0x00134017
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_00133feb:
MOV R9D,EAX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RAX
SHL R9,0x8
ADD R9,R10
XOR RAX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RDX
JC 0x00133feb
POP RBP
LAB_00134017:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_bin(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
ulong uVar1;
byte *pbVar2;
long lVar3;
uVar1 = *param_4;
lVar3 = *param_5;
if (0 < param_3) {
pbVar2 = param_2 + param_3;
do {
uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3);
lVar3 = lVar3 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar1;
*param_5 = lVar3;
return;
}
|
|
63,753 |
str2int
|
eloqsql/strings/str2int.c
|
char *str2int(register const char *src, register int radix, long int lower,
long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
long limit; /* "largest" possible valid input */
long scale; /* the amount to multiply next digit by */
long sofar; /* the running value */
register int d; /* (negative of) next digit */
char *start;
int digits[32]; /* Room for numbers */
/* Make sure *val is sensible in case of error */
*val = 0;
/* Check that the radix is in the range 2..36 */
#ifndef DBUG_OFF
if (radix < 2 || radix > 36) {
errno=EDOM;
return NullS;
}
#endif
/* The basic problem is: how do we handle the conversion of
a number without resorting to machine-specific code to
check for overflow? Obviously, we have to ensure that
no calculation can overflow. We are guaranteed that the
"lower" and "upper" arguments are valid machine integers.
On sign-and-magnitude, twos-complement, and ones-complement
machines all, if +|n| is representable, so is -|n|, but on
twos complement machines the converse is not true. So the
"maximum" representable number has a negative representative.
Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest"
number we are concerned with. */
/* Calculate Limit using Scale as a scratch variable */
if ((limit = lower) > 0) limit = -limit;
if ((scale = upper) > 0) scale = -scale;
if (scale < limit) limit = scale;
/* Skip leading spaces and check for a sign.
Note: because on a 2s complement machine MinLong is a valid
integer but |MinLong| is not, we have to keep the current
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
/* Skip leading zeros so that we never compute a power of radix
in scale that we won't have a need for. Otherwise sticking
enough 0s in front of a number could cause the multiplication
to overflow when it neededn't.
*/
start=(char*) src;
while (*src == '0') src++;
/* Move over the remaining digits. We have to convert from left
to left in order to avoid overflow. Answer is after last digit.
*/
for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ;
/* Check that there is at least one digit */
if (start == src) {
errno=EDOM;
return NullS;
}
/* The invariant we want to maintain is that src is just
to the right of n digits, we've converted k digits to
sofar, scale = -radix**k, and scale < sofar < 0. Now
if the final number is to be within the original
Limit, we must have (to the left)*scale+sofar >= Limit,
or (to the left)*scale >= Limit-sofar, i.e. the digits
to the left of src must form an integer <= (Limit-sofar)/(scale).
In particular, this is true of the next digit. In our
incremental calculation of Limit,
IT IS VITAL that (-|N|)/(-|D|) = |N|/|D|
*/
for (sofar = 0, scale = -1; --n >= 1;)
{
if ((long) -(d=digits[n]) < limit) {
errno=ERANGE;
return NullS;
}
limit = (limit+d)/radix, sofar += d*scale; scale *= radix;
}
if (n == 0)
{
if ((long) -(d=digits[n]) < limit) /* get last digit */
{
errno=ERANGE;
return NullS;
}
sofar+=d*scale;
}
/* Now it might still happen that sofar = -32768 or its equivalent,
so we can't just multiply by the sign and check that the result
is in the range lower..upper. All of this caution is a right
pain in the neck. If only there were a standard routine which
says generate thus and such a signal on integer overflow...
But not enough machines can do it *SIGH*.
*/
if (sign < 0)
{
if (sofar < -LONG_MAX || (sofar= -sofar) > upper)
{
errno=ERANGE;
return NullS;
}
}
else if (sofar < lower)
{
errno=ERANGE;
return NullS;
}
*val = sofar;
errno=0; /* indicate that all went well */
return (char*) src;
}
|
O3
|
c
|
str2int:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r9
movq $0x0, (%r8)
movq %rdx, %rax
negq %rax
cmovsq %rdx, %rax
movq %rcx, %rdx
negq %rdx
cmovnsq %rcx, %rdx
leaq 0x2d4ef5(%rip), %r10 # 0x3abf20
movq 0x40(%r10), %r11
movzbl (%rdi), %r10d
incq %rdi
testb $0x8, 0x1(%r11,%r10)
jne 0xd702f
negq %rax
cmpq %rax, %rdx
cmovlq %rdx, %rax
cmpl $0x2b, %r10d
je 0xd705c
cmpl $0x2d, %r10d
jne 0xd7059
xorl %r10d, %r10d
jmp 0xd705f
decq %rdi
movb $0x1, %r10b
leaq -0x1(%rdi), %rbx
movb 0x1(%rbx), %r14b
incq %rbx
cmpb $0x30, %r14b
je 0xd7063
xorl %r11d, %r11d
xorl %edx, %edx
leal -0x30(%r14), %r15d
cmpb $0x9, %r15b
ja 0xd7085
movzbl %r15b, %r15d
jmp 0xd70b1
leal -0x41(%r14), %r15d
cmpb $0x19, %r15b
ja 0xd7099
movzbl %r14b, %r15d
addl $-0x37, %r15d
jmp 0xd70b1
leal -0x61(%r14), %r12d
movl $0x7f, %r15d
cmpb $0x19, %r12b
ja 0xd70b1
movzbl %r14b, %r15d
addl $-0x57, %r15d
movl %r15d, -0xa0(%rbp,%rdx,4)
cmpl %esi, %r15d
jge 0xd70d3
cmpq $0x13, %rdx
ja 0xd70d3
incq %rdx
movb 0x1(%rbx), %r14b
incq %rbx
incl %r11d
jmp 0xd7075
cmpq %rdi, %rbx
je 0xd711b
cmpq $0x2, %rdx
jb 0xd7123
movslq %esi, %r14
movq $-0x1, %rdi
xorl %esi, %esi
decl %r11d
movslq -0xa0(%rbp,%r11,4), %r15
movq %r15, %rdx
negq %rdx
cmpq %rdx, %rax
jg 0xd715e
addq %r15, %rax
cqto
idivq %r14
imulq %rdi, %r15
addq %r15, %rsi
imulq %r14, %rdi
cmpl $0x1, %r11d
jg 0xd70ea
jmp 0xd7130
movl $0x21, %r14d
jmp 0xd7164
xorl %esi, %esi
decl %edx
jne 0xd7149
movq $-0x1, %rdi
movslq -0xa0(%rbp), %rdx
movq %rdx, %r11
negq %r11
cmpq %r11, %rax
jg 0xd715e
imulq %rdx, %rdi
addq %rdi, %rsi
testb %r10b, %r10b
je 0xd7181
negq %rsi
seto %al
cmpq %rcx, %rsi
setg %cl
orb %al, %cl
je 0xd7186
movl $0x22, %r14d
xorl %ebx, %ebx
callq 0x297b0
movl %r14d, (%rax)
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq %r9, %rsi
jl 0xd715e
movq %rsi, (%r8)
xorl %r14d, %r14d
jmp 0xd7166
nop
|
str2int:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov r9, rdx
mov qword ptr [r8], 0
mov rax, rdx
neg rax
cmovs rax, rdx
mov rdx, rcx
neg rdx
cmovns rdx, rcx
lea r10, my_charset_latin1
mov r11, [r10+40h]
loc_D702F:
movzx r10d, byte ptr [rdi]
inc rdi
test byte ptr [r11+r10+1], 8
jnz short loc_D702F
neg rax
cmp rdx, rax
cmovl rax, rdx
cmp r10d, 2Bh ; '+'
jz short loc_D705C
cmp r10d, 2Dh ; '-'
jnz short loc_D7059
xor r10d, r10d
jmp short loc_D705F
loc_D7059:
dec rdi
loc_D705C:
mov r10b, 1
loc_D705F:
lea rbx, [rdi-1]
loc_D7063:
mov r14b, [rbx+1]
inc rbx
cmp r14b, 30h ; '0'
jz short loc_D7063
xor r11d, r11d
xor edx, edx
loc_D7075:
lea r15d, [r14-30h]
cmp r15b, 9
ja short loc_D7085
movzx r15d, r15b
jmp short loc_D70B1
loc_D7085:
lea r15d, [r14-41h]
cmp r15b, 19h
ja short loc_D7099
movzx r15d, r14b
add r15d, 0FFFFFFC9h
jmp short loc_D70B1
loc_D7099:
lea r12d, [r14-61h]
mov r15d, 7Fh
cmp r12b, 19h
ja short loc_D70B1
movzx r15d, r14b
add r15d, 0FFFFFFA9h
loc_D70B1:
mov [rbp+rdx*4+var_A0], r15d
cmp r15d, esi
jge short loc_D70D3
cmp rdx, 13h
ja short loc_D70D3
inc rdx
mov r14b, [rbx+1]
inc rbx
inc r11d
jmp short loc_D7075
loc_D70D3:
cmp rbx, rdi
jz short loc_D711B
cmp rdx, 2
jb short loc_D7123
movsxd r14, esi
mov rdi, 0FFFFFFFFFFFFFFFFh
xor esi, esi
loc_D70EA:
dec r11d
movsxd r15, [rbp+r11*4+var_A0]
mov rdx, r15
neg rdx
cmp rax, rdx
jg short loc_D715E
add rax, r15
cqo
idiv r14
imul r15, rdi
add rsi, r15
imul rdi, r14
cmp r11d, 1
jg short loc_D70EA
jmp short loc_D7130
loc_D711B:
mov r14d, 21h ; '!'
jmp short loc_D7164
loc_D7123:
xor esi, esi
dec edx
jnz short loc_D7149
mov rdi, 0FFFFFFFFFFFFFFFFh
loc_D7130:
movsxd rdx, [rbp+var_A0]
mov r11, rdx
neg r11
cmp rax, r11
jg short loc_D715E
imul rdi, rdx
add rsi, rdi
loc_D7149:
test r10b, r10b
jz short loc_D7181
neg rsi
seto al
cmp rsi, rcx
setnle cl
or cl, al
jz short loc_D7186
loc_D715E:
mov r14d, 22h ; '"'
loc_D7164:
xor ebx, ebx
loc_D7166:
call ___errno_location
mov [rax], r14d
mov rax, rbx
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_D7181:
cmp rsi, r9
jl short loc_D715E
loc_D7186:
mov [r8], rsi
xor r14d, r14d
jmp short loc_D7166
|
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5)
{
long long v6; // rax
long long v7; // rdx
long long v8; // r10
long long v9; // rax
char v10; // r10
long long v11; // rbx
unsigned __int8 v12; // r14
long long v13; // r11
unsigned long long i; // rdx
int v15; // r15d
long long v16; // r14
long long v17; // rsi
long long v18; // r15
int v19; // r14d
_DWORD v21[40]; // [rsp+0h] [rbp-A0h]
*a5 = 0LL;
v6 = -a3;
if ( a3 > 0 )
v6 = a3;
v7 = -a4;
if ( a4 <= 0 )
v7 = a4;
do
v8 = *(unsigned __int8 *)a1++;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 );
v9 = -v6;
if ( v7 < v9 )
v9 = v7;
if ( (_DWORD)v8 != 43 )
{
if ( (_DWORD)v8 == 45 )
{
v10 = 0;
goto LABEL_13;
}
--a1;
}
v10 = 1;
LABEL_13:
v11 = a1 - 1;
do
v12 = *(_BYTE *)++v11;
while ( v12 == 48 );
LODWORD(v13) = 0;
for ( i = 0LL; ; ++i )
{
LOBYTE(v15) = v12 - 48;
if ( (unsigned __int8)(v12 - 48) > 9u )
{
if ( (unsigned __int8)(v12 - 65) > 0x19u )
{
v15 = 127;
if ( (unsigned __int8)(v12 - 97) <= 0x19u )
v15 = v12 - 87;
}
else
{
v15 = v12 - 55;
}
}
else
{
v15 = (unsigned __int8)v15;
}
v21[i] = v15;
if ( v15 >= a2 || i > 0x13 )
break;
v12 = *(_BYTE *)++v11;
LODWORD(v13) = v13 + 1;
}
if ( v11 != a1 )
{
if ( i >= 2 )
{
v16 = a2;
a1 = -1LL;
v17 = 0LL;
while ( 1 )
{
v13 = (unsigned int)(v13 - 1);
v18 = (int)v21[v13];
if ( v9 > -v18 )
goto LABEL_38;
v9 = (v18 + v9) / v16;
v17 += a1 * v18;
a1 *= v16;
if ( (int)v13 <= 1 )
goto LABEL_34;
}
}
v17 = 0LL;
if ( (_DWORD)i == 1 )
{
a1 = -1LL;
LABEL_34:
if ( v9 > -(long long)v21[0] )
goto LABEL_38;
a1 *= v21[0];
v17 += a1;
}
if ( v10 )
{
v17 = -v17;
if ( __OFSUB__(v17, 1LL) || v17 > a4 )
{
LABEL_38:
v19 = 34;
goto LABEL_39;
}
}
else if ( v17 < a3 )
{
goto LABEL_38;
}
*a5 = v17;
v19 = 0;
goto LABEL_40;
}
v19 = 33;
LABEL_39:
v11 = 0LL;
LABEL_40:
*(_DWORD *)__errno_location(a1) = v19;
return v11;
}
|
str2int:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x80
MOV R9,RDX
MOV qword ptr [R8],0x0
MOV RAX,RDX
NEG RAX
CMOVS RAX,RDX
MOV RDX,RCX
NEG RDX
CMOVNS RDX,RCX
LEA R10,[0x4abf20]
MOV R11,qword ptr [R10 + 0x40]
LAB_001d702f:
MOVZX R10D,byte ptr [RDI]
INC RDI
TEST byte ptr [R11 + R10*0x1 + 0x1],0x8
JNZ 0x001d702f
NEG RAX
CMP RDX,RAX
CMOVL RAX,RDX
CMP R10D,0x2b
JZ 0x001d705c
CMP R10D,0x2d
JNZ 0x001d7059
XOR R10D,R10D
JMP 0x001d705f
LAB_001d7059:
DEC RDI
LAB_001d705c:
MOV R10B,0x1
LAB_001d705f:
LEA RBX,[RDI + -0x1]
LAB_001d7063:
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
CMP R14B,0x30
JZ 0x001d7063
XOR R11D,R11D
XOR EDX,EDX
LAB_001d7075:
LEA R15D,[R14 + -0x30]
CMP R15B,0x9
JA 0x001d7085
MOVZX R15D,R15B
JMP 0x001d70b1
LAB_001d7085:
LEA R15D,[R14 + -0x41]
CMP R15B,0x19
JA 0x001d7099
MOVZX R15D,R14B
ADD R15D,-0x37
JMP 0x001d70b1
LAB_001d7099:
LEA R12D,[R14 + -0x61]
MOV R15D,0x7f
CMP R12B,0x19
JA 0x001d70b1
MOVZX R15D,R14B
ADD R15D,-0x57
LAB_001d70b1:
MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D
CMP R15D,ESI
JGE 0x001d70d3
CMP RDX,0x13
JA 0x001d70d3
INC RDX
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
INC R11D
JMP 0x001d7075
LAB_001d70d3:
CMP RBX,RDI
JZ 0x001d711b
CMP RDX,0x2
JC 0x001d7123
MOVSXD R14,ESI
MOV RDI,-0x1
XOR ESI,ESI
LAB_001d70ea:
DEC R11D
MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0]
MOV RDX,R15
NEG RDX
CMP RAX,RDX
JG 0x001d715e
ADD RAX,R15
CQO
IDIV R14
IMUL R15,RDI
ADD RSI,R15
IMUL RDI,R14
CMP R11D,0x1
JG 0x001d70ea
JMP 0x001d7130
LAB_001d711b:
MOV R14D,0x21
JMP 0x001d7164
LAB_001d7123:
XOR ESI,ESI
DEC EDX
JNZ 0x001d7149
MOV RDI,-0x1
LAB_001d7130:
MOVSXD RDX,dword ptr [RBP + -0xa0]
MOV R11,RDX
NEG R11
CMP RAX,R11
JG 0x001d715e
IMUL RDI,RDX
ADD RSI,RDI
LAB_001d7149:
TEST R10B,R10B
JZ 0x001d7181
NEG RSI
SETO AL
CMP RSI,RCX
SETG CL
OR CL,AL
JZ 0x001d7186
LAB_001d715e:
MOV R14D,0x22
LAB_001d7164:
XOR EBX,EBX
LAB_001d7166:
CALL 0x001297b0
MOV dword ptr [RAX],R14D
MOV RAX,RBX
ADD RSP,0x80
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001d7181:
CMP RSI,R9
JL 0x001d715e
LAB_001d7186:
MOV qword ptr [R8],RSI
XOR R14D,R14D
JMP 0x001d7166
|
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5)
{
long lVar1;
int *piVar2;
ulong uVar3;
byte *pbVar4;
long lVar5;
byte *pbVar6;
long lVar7;
ulong uVar8;
byte bVar9;
int iVar10;
uint uVar11;
long lVar12;
bool bVar13;
uint local_a8 [32];
*param_5 = 0;
lVar5 = -param_3;
if (0 < param_3) {
lVar5 = param_3;
}
lVar7 = -param_4;
if (param_4 < 1) {
lVar7 = param_4;
}
do {
pbVar4 = param_1;
bVar9 = *pbVar4;
param_1 = pbVar4 + 1;
} while ((PTR_ctype_latin1_004abf60[(ulong)bVar9 + 1] & 8) != 0);
lVar1 = -lVar5;
if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) {
lVar1 = lVar7;
}
pbVar6 = param_1;
if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) {
bVar13 = true;
}
else {
bVar13 = false;
pbVar6 = param_1;
}
pbVar4 = pbVar6 + -1;
do {
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
} while (bVar9 == 0x30);
uVar8 = 0;
uVar3 = 0;
while( true ) {
if ((byte)(bVar9 - 0x30) < 10) {
uVar11 = (uint)(byte)(bVar9 - 0x30);
}
else if ((byte)(bVar9 + 0xbf) < 0x1a) {
uVar11 = bVar9 - 0x37;
}
else {
uVar11 = 0x7f;
if ((byte)(bVar9 + 0x9f) < 0x1a) {
uVar11 = bVar9 - 0x57;
}
}
local_a8[uVar3] = uVar11;
if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break;
uVar3 = uVar3 + 1;
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
uVar8 = (ulong)((int)uVar8 + 1);
}
if (pbVar4 == pbVar6) {
iVar10 = 0x21;
}
else {
if (uVar3 < 2) {
lVar5 = 0;
if ((int)uVar3 == 1) {
lVar7 = -1;
goto LAB_001d7130;
}
LAB_001d7149:
if (bVar13) {
lVar7 = -lVar5;
bVar13 = -param_4 == lVar5;
lVar5 = lVar7;
if (bVar13 || lVar7 < param_4) {
LAB_001d7186:
*param_5 = lVar5;
iVar10 = 0;
goto LAB_001d7166;
}
}
else if (param_3 <= lVar5) goto LAB_001d7186;
}
else {
lVar7 = -1;
lVar5 = 0;
do {
uVar11 = (int)uVar8 - 1;
uVar8 = (ulong)uVar11;
lVar12 = (long)(int)local_a8[uVar8];
if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_001d715e;
lVar1 = (lVar1 + lVar12) / (long)param_2;
lVar5 = lVar5 + lVar12 * lVar7;
lVar7 = lVar7 * param_2;
} while (1 < (int)uVar11);
LAB_001d7130:
lVar12 = (long)(int)local_a8[0];
if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) {
lVar5 = lVar5 + lVar7 * lVar12;
goto LAB_001d7149;
}
}
LAB_001d715e:
iVar10 = 0x22;
}
pbVar4 = (byte *)0x0;
LAB_001d7166:
piVar2 = __errno_location();
*piVar2 = iVar10;
return pbVar4;
}
|
|
63,754 |
isOverLaps(Ship const&, int, char, unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/RandomShips/RandomShips.cpp
|
static bool isOverLaps(const Ship& existingShip, int newLen, char newOrient, uint64_t newX, uint64_t newY) {
for (int j = 0; j < newLen; ++j) {
uint64_t cellX = (newOrient == 'h') ? (newX + j) : newX;
uint64_t cellY = (newOrient == 'v') ? (newY + j) : newY;
for (int k = 0; k < existingShip.len; ++k) {
uint64_t exX = (existingShip.orientation == 'h') ? (existingShip.x + k) : existingShip.x;
uint64_t exY = (existingShip.orientation == 'v') ? (existingShip.y + k) : existingShip.y;
if (std::abs((long long)cellX - (long long)exX) <= 1 &&
std::abs((long long)cellY - (long long)exY) <= 1) {
return true;
}
}
}
return false;
}
|
O0
|
cpp
|
isOverLaps(Ship const&, int, char, unsigned long, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3a264
movsbl -0x15(%rbp), %eax
cmpl $0x68, %eax
jne 0x3a15c
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
jmp 0x3a164
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x76, %eax
jne 0x3a186
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
jmp 0x3a18e
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3a254
movq -0x10(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x68, %eax
jne 0x3a1ce
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
jmp 0x3a1da
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x76, %eax
jne 0x3a204
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x44(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0x3a210
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
subq -0x50(%rbp), %rdi
callq 0x3ae40
cmpq $0x1, %rax
jg 0x3a244
movq -0x40(%rbp), %rdi
subq -0x58(%rbp), %rdi
callq 0x3ae40
cmpq $0x1, %rax
jg 0x3a244
movb $0x1, -0x1(%rbp)
jmp 0x3a268
jmp 0x3a246
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3a19d
jmp 0x3a256
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3a136
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL10isOverLapsRK4Shipicmm:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, dl
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_15], al
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], 0
loc_3A136:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_14]
jge loc_3A264
movsx eax, [rbp+var_15]
cmp eax, 68h ; 'h'
jnz short loc_3A15C
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_60], rax
jmp short loc_3A164
loc_3A15C:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_3A164:
mov rax, [rbp+var_60]
mov [rbp+var_38], rax
movsx eax, [rbp+var_15]
cmp eax, 76h ; 'v'
jnz short loc_3A186
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_68], rax
jmp short loc_3A18E
loc_3A186:
mov rax, [rbp+var_28]
mov [rbp+var_68], rax
loc_3A18E:
mov rax, [rbp+var_68]
mov [rbp+var_40], rax
mov [rbp+var_44], 0
loc_3A19D:
mov eax, [rbp+var_44]
mov rcx, [rbp+var_10]
cmp eax, [rcx]
jge loc_3A254
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+4]
cmp eax, 68h ; 'h'
jnz short loc_3A1CE
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_44]
add rax, rcx
mov [rbp+var_70], rax
jmp short loc_3A1DA
loc_3A1CE:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_70], rax
loc_3A1DA:
mov rax, [rbp+var_70]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+4]
cmp eax, 76h ; 'v'
jnz short loc_3A204
mov rax, [rbp+var_10]
mov rax, [rax+10h]
movsxd rcx, [rbp+var_44]
add rax, rcx
mov [rbp+var_78], rax
jmp short loc_3A210
loc_3A204:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_78], rax
loc_3A210:
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
mov rdi, [rbp+var_38]
sub rdi, [rbp+var_50]; __int64
call _ZSt3absx; std::abs(long long)
cmp rax, 1
jg short loc_3A244
mov rdi, [rbp+var_40]
sub rdi, [rbp+var_58]; __int64
call _ZSt3absx; std::abs(long long)
cmp rax, 1
jg short loc_3A244
mov [rbp+var_1], 1
jmp short loc_3A268
loc_3A244:
jmp short $+2
loc_3A246:
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp loc_3A19D
loc_3A254:
jmp short $+2
loc_3A256:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_3A136
loc_3A264:
mov [rbp+var_1], 0
loc_3A268:
mov al, [rbp+var_1]
and al, 1
add rsp, 80h
pop rbp
retn
|
char isOverLaps(const Ship *a1, int a2, char a3, long long a4, long long a5)
{
long long v6; // [rsp+8h] [rbp-78h]
long long v7; // [rsp+10h] [rbp-70h]
long long v8; // [rsp+18h] [rbp-68h]
long long v9; // [rsp+20h] [rbp-60h]
int j; // [rsp+3Ch] [rbp-44h]
int i; // [rsp+54h] [rbp-2Ch]
for ( i = 0; i < a2; ++i )
{
if ( a3 == 104 )
v9 = i + a4;
else
v9 = a4;
if ( a3 == 118 )
v8 = i + a5;
else
v8 = a5;
for ( j = 0; j < *(_DWORD *)a1; ++j )
{
if ( *((_BYTE *)a1 + 4) == 104 )
v7 = j + *((_QWORD *)a1 + 1);
else
v7 = *((_QWORD *)a1 + 1);
if ( *((_BYTE *)a1 + 4) == 118 )
v6 = j + *((_QWORD *)a1 + 2);
else
v6 = *((_QWORD *)a1 + 2);
if ( std::abs(v9 - v7) <= 1 && std::abs(v8 - v6) <= 1 )
return 1;
}
}
return 0;
}
|
isOverLaps:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,DL
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV byte ptr [RBP + -0x15],AL
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],0x0
LAB_0013a136:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x0013a264
MOVSX EAX,byte ptr [RBP + -0x15]
CMP EAX,0x68
JNZ 0x0013a15c
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0013a164
LAB_0013a15c:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_0013a164:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x38],RAX
MOVSX EAX,byte ptr [RBP + -0x15]
CMP EAX,0x76
JNZ 0x0013a186
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
JMP 0x0013a18e
LAB_0013a186:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x68],RAX
LAB_0013a18e:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x44],0x0
LAB_0013a19d:
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX]
JGE 0x0013a254
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x4]
CMP EAX,0x68
JNZ 0x0013a1ce
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0013a1da
LAB_0013a1ce:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x70],RAX
LAB_0013a1da:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x4]
CMP EAX,0x76
JNZ 0x0013a204
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0013a210
LAB_0013a204:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x78],RAX
LAB_0013a210:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x38]
SUB RDI,qword ptr [RBP + -0x50]
CALL 0x0013ae40
CMP RAX,0x1
JG 0x0013a244
MOV RDI,qword ptr [RBP + -0x40]
SUB RDI,qword ptr [RBP + -0x58]
CALL 0x0013ae40
CMP RAX,0x1
JG 0x0013a244
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013a268
LAB_0013a244:
JMP 0x0013a246
LAB_0013a246:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0013a19d
LAB_0013a254:
JMP 0x0013a256
LAB_0013a256:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013a136
LAB_0013a264:
MOV byte ptr [RBP + -0x1],0x0
LAB_0013a268:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x80
POP RBP
RET
|
/* isOverLaps(Ship const&, int, char, unsigned long, unsigned long) */
int1 isOverLaps(Ship *param_1,int param_2,char param_3,ulong param_4,ulong param_5)
{
long lVar1;
long local_80;
long local_78;
ulong local_70;
ulong local_68;
int local_4c;
int local_34;
local_34 = 0;
do {
if (param_2 <= local_34) {
return 0;
}
local_68 = param_4;
if (param_3 == 'h') {
local_68 = param_4 + (long)local_34;
}
local_70 = param_5;
if (param_3 == 'v') {
local_70 = param_5 + (long)local_34;
}
for (local_4c = 0; local_4c < *(int *)param_1; local_4c = local_4c + 1) {
if (param_1[4] == (Ship)0x68) {
local_78 = *(long *)(param_1 + 8) + (long)local_4c;
}
else {
local_78 = *(long *)(param_1 + 8);
}
if (param_1[4] == (Ship)0x76) {
local_80 = *(long *)(param_1 + 0x10) + (long)local_4c;
}
else {
local_80 = *(long *)(param_1 + 0x10);
}
lVar1 = std::abs(local_68 - local_78);
if ((lVar1 < 2) && (lVar1 = std::abs(local_70 - local_80), lVar1 < 2)) {
return 1;
}
}
local_34 = local_34 + 1;
} while( true );
}
|
|
63,755 |
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*)
|
hkr04[P]cpp-mcp/common/json.hpp
|
reference operator[](T* key)
{
return operator[](typename object_t::key_type(key));
}
|
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>& 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 0xae38
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd2e4
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb1eb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8580
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 0xb214
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8580
movq %rbx, %rdi
callq 0x8960
|
_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_B1EB
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B1EB:
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_B214
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B214:
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,
long long 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 0x0010ae38
LAB_0010b1c2:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010d2e4
LAB_0010b1cd:
MOV RBX,RAX
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0010b1eb
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00108580
LAB_0010b1eb:
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 0010b1c2 to 0010b1cc has its CatchHandler @ 0010b1f6 */
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;
}
|
|
63,756 |
vemit_tap
|
eloqsql/unittest/mytap/tap.c
|
static void
vemit_tap(int pass, char const *fmt, va_list ap)
{
fprintf(tapout, "%sok %d%s",
pass ? "" : "not ",
++g_test.last,
(fmt && *fmt) ? " - " : "");
if (fmt && *fmt)
vfprintf(tapout, fmt, ap);
fflush(tapout);
}
|
O3
|
c
|
vemit_tap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
movq 0x2c9e78(%rip), %r15 # 0x2effb0
movq (%r15), %rdi
testl %eax, %eax
leaq 0x3728b(%rip), %rcx # 0x5d3cf
leaq 0x3acab(%rip), %rax # 0x60df6
cmovneq %rax, %rcx
movl 0x340be6(%rip), %r8d # 0x366d3c
incl %r8d
movl %r8d, 0x340bdc(%rip) # 0x366d3c
testq %rsi, %rsi
je 0x261a7
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x0, (%rsi)
leaq 0x3725f(%rip), %r9 # 0x5d3d4
cmoveq %rax, %r9
leaq 0x37245(%rip), %rdx # 0x5d3c5
movl $0x1, %esi
xorl %eax, %eax
callq 0x24560
cmpb $0x0, (%r14)
je 0x261c1
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x240e0
jmp 0x261c1
leaq 0x37217(%rip), %rdx # 0x5d3c5
leaq 0x3ac41(%rip), %r9 # 0x60df6
movl $0x1, %esi
xorl %eax, %eax
callq 0x24560
movq (%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24380
|
vemit_tap:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov eax, edi
mov r15, cs:stdout_ptr
mov rdi, [r15]
test eax, eax
lea rcx, aNot; "not "
lea rax, asc_60DF2+4; ""
cmovnz rcx, rax
mov r8d, cs:dword_366D3C
inc r8d
mov cs:dword_366D3C, r8d
test rsi, rsi
jz short loc_261A7
mov rbx, rdx
mov r14, rsi
cmp byte ptr [rsi], 0
lea r9, asc_5D3D4; " - "
cmovz r9, rax
lea rdx, aSokDS; "%sok %d%s"
mov esi, 1
xor eax, eax
call ___fprintf_chk
cmp byte ptr [r14], 0
jz short loc_261C1
mov rdi, [r15]
mov esi, 1
mov rdx, r14
mov rcx, rbx
call ___vfprintf_chk
jmp short loc_261C1
loc_261A7:
lea rdx, aSokDS; "%sok %d%s"
lea r9, asc_60DF2+4; ""
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_261C1:
mov rdi, [r15]
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _fflush
|
long long vemit_tap(int a1, _BYTE *a2, long long a3)
{
const char *v3; // rcx
int v4; // r8d
const char *v6; // r9
v3 = "not ";
if ( a1 )
v3 = "";
v4 = ++dword_366D3C;
if ( a2 )
{
v6 = " - ";
if ( !*a2 )
v6 = "";
__fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, v6);
if ( *a2 )
__vfprintf_chk(stdout, 1LL, a2, a3);
}
else
{
__fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, "");
}
return fflush(stdout);
}
|
vemit_tap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,EDI
MOV R15,qword ptr [0x003effb0]
MOV RDI,qword ptr [R15]
TEST EAX,EAX
LEA RCX,[0x15d3cf]
LEA RAX,[0x160df6]
CMOVNZ RCX,RAX
MOV R8D,dword ptr [0x00466d3c]
INC R8D
MOV dword ptr [0x00466d3c],R8D
TEST RSI,RSI
JZ 0x001261a7
MOV RBX,RDX
MOV R14,RSI
CMP byte ptr [RSI],0x0
LEA R9,[0x15d3d4]
CMOVZ R9,RAX
LEA RDX,[0x15d3c5]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00124560
CMP byte ptr [R14],0x0
JZ 0x001261c1
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,R14
MOV RCX,RBX
CALL 0x001240e0
JMP 0x001261c1
LAB_001261a7:
LEA RDX,[0x15d3c5]
LEA R9,[0x160df6]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00124560
LAB_001261c1:
MOV RDI,qword ptr [R15]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00124380
|
void vemit_tap(int param_1,char *param_2,int8 param_3)
{
int *puVar1;
int *puVar2;
int *puVar3;
puVar1 = PTR_stdout_003effb0;
puVar2 = &DAT_0015d3cf;
if (param_1 != 0) {
puVar2 = &DAT_00160df6;
}
DAT_00466d3c = DAT_00466d3c + 1;
if (param_2 == (char *)0x0) {
__fprintf_chk(*(int8 *)PTR_stdout_003effb0,1,"%sok %d%s",puVar2,DAT_00466d3c,&DAT_00160df6
);
}
else {
puVar3 = &DAT_0015d3d4;
if (*param_2 == '\0') {
puVar3 = &DAT_00160df6;
}
__fprintf_chk(*(int8 *)PTR_stdout_003effb0,1,"%sok %d%s",puVar2,DAT_00466d3c,puVar3);
if (*param_2 != '\0') {
__vfprintf_chk(*(int8 *)puVar1,1,param_2,param_3);
}
}
fflush(*(FILE **)puVar1);
return;
}
|
|
63,757 |
my_strnxfrm_unicode_full_bin_internal
|
eloqsql/strings/ctype-utf8.c
|
size_t
my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs,
uchar *dst, uchar *de, uint *nweights,
const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
uchar *dst0= dst;
DBUG_ASSERT(src || !se);
DBUG_ASSERT(cs->state & MY_CS_BINSORT);
for (; dst < de && *nweights; (*nweights)--)
{
int res;
if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0)
break;
src+= res;
*dst++= (uchar) (wc >> 16);
if (dst < de)
{
*dst++= (uchar) ((wc >> 8) & 0xFF);
if (dst < de)
*dst++= (uchar) (wc & 0xFF);
}
}
return dst - dst0;
}
|
O3
|
c
|
my_strnxfrm_unicode_full_bin_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movq %rsi, %rax
movq %rsi, -0x38(%rbp)
cmpq %rdx, %rsi
jae 0x4f359
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movl (%rcx), %ecx
movq -0x38(%rbp), %r14
testl %ecx, %ecx
je 0x4f356
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq -0x40(%rbp), %rcx
callq *0x28(%rax)
testl %eax, %eax
jle 0x4f356
movl %eax, %ecx
movb -0x2e(%rbp), %dl
leaq 0x1(%r14), %rax
movb %dl, (%r14)
cmpq %r13, %rax
jae 0x4f33d
movb -0x2f(%rbp), %dl
leaq 0x2(%r14), %rax
movb %dl, 0x1(%r14)
cmpq %r13, %rax
jae 0x4f33d
movb -0x30(%rbp), %al
movb %al, 0x2(%r14)
addq $0x3, %r14
movq %r14, %rax
movl %ecx, %ecx
addq %rcx, %r15
movl (%r12), %ecx
decl %ecx
movl %ecx, (%r12)
movq %rax, %r14
cmpq %r13, %rax
jb 0x4f2ee
jmp 0x4f359
movq %r14, %rax
subq -0x38(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnxfrm_unicode_full_bin_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r9
mov rax, rsi
mov [rbp+var_38], rsi
cmp rsi, rdx
jnb short loc_4F359
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
mov ecx, [rcx]
mov r14, [rbp+var_38]
loc_4F2EE:
test ecx, ecx
jz short loc_4F356
mov rax, [rbx+0B8h]
mov rdi, rbx
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, [rbp+var_40]
call qword ptr [rax+28h]
test eax, eax
jle short loc_4F356
mov ecx, eax
mov dl, [rbp+var_2E]
lea rax, [r14+1]
mov [r14], dl
cmp rax, r13
jnb short loc_4F33D
mov dl, [rbp+var_2F]
lea rax, [r14+2]
mov [r14+1], dl
cmp rax, r13
jnb short loc_4F33D
mov al, [rbp+var_30]
mov [r14+2], al
add r14, 3
mov rax, r14
loc_4F33D:
mov ecx, ecx
add r15, rcx
mov ecx, [r12]
dec ecx
mov [r12], ecx
mov r14, rax
cmp rax, r13
jb short loc_4F2EE
jmp short loc_4F359
loc_4F356:
mov rax, r14
loc_4F359:
sub rax, [rbp+var_38]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strnxfrm_unicode_full_bin_internal(
long long a1,
_BYTE *a2,
unsigned long long a3,
int *a4,
long long a5,
long long a6)
{
_BYTE *v6; // rax
int v10; // ecx
_BYTE *v11; // r14
int v12; // eax
unsigned int v13; // ecx
_BYTE v16[48]; // [rsp+10h] [rbp-30h] BYREF
v6 = a2;
if ( (unsigned long long)a2 < a3 )
{
v10 = *a4;
v11 = a2;
while ( v10 )
{
v12 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v16,
a5,
a6);
if ( v12 <= 0 )
break;
v13 = v12;
v6 = v11 + 1;
*v11 = v16[2];
if ( (unsigned long long)(v11 + 1) < a3 )
{
v6 = v11 + 2;
v11[1] = v16[1];
if ( (unsigned long long)(v11 + 2) < a3 )
{
v11[2] = v16[0];
v6 = v11 + 3;
}
}
a5 += v13;
v10 = *a4 - 1;
*a4 = v10;
v11 = v6;
if ( (unsigned long long)v6 >= a3 )
return v6 - a2;
}
v6 = v11;
}
return v6 - a2;
}
|
my_strnxfrm_unicode_full_bin_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R9
MOV RAX,RSI
MOV qword ptr [RBP + -0x38],RSI
CMP RSI,RDX
JNC 0x0014f359
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
MOV ECX,dword ptr [RCX]
MOV R14,qword ptr [RBP + -0x38]
LAB_0014f2ee:
TEST ECX,ECX
JZ 0x0014f356
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x0014f356
MOV ECX,EAX
MOV DL,byte ptr [RBP + -0x2e]
LEA RAX,[R14 + 0x1]
MOV byte ptr [R14],DL
CMP RAX,R13
JNC 0x0014f33d
MOV DL,byte ptr [RBP + -0x2f]
LEA RAX,[R14 + 0x2]
MOV byte ptr [R14 + 0x1],DL
CMP RAX,R13
JNC 0x0014f33d
MOV AL,byte ptr [RBP + -0x30]
MOV byte ptr [R14 + 0x2],AL
ADD R14,0x3
MOV RAX,R14
LAB_0014f33d:
MOV ECX,ECX
ADD R15,RCX
MOV ECX,dword ptr [R12]
DEC ECX
MOV dword ptr [R12],ECX
MOV R14,RAX
CMP RAX,R13
JC 0x0014f2ee
JMP 0x0014f359
LAB_0014f356:
MOV RAX,R14
LAB_0014f359:
SUB RAX,qword ptr [RBP + -0x38]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin_internal
(long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5,
int8 param_6)
{
uint uVar1;
int iVar2;
int1 *puVar3;
int1 *puVar4;
int1 local_38;
int1 local_37;
int1 local_36;
puVar4 = param_2;
if (param_2 < param_3) {
iVar2 = *param_4;
puVar3 = param_2;
do {
puVar4 = puVar3;
if ((iVar2 == 0) ||
(uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_38,param_5,param_6)
, (int)uVar1 < 1)) break;
puVar4 = puVar3 + 1;
*puVar3 = local_36;
if (puVar4 < param_3) {
puVar4 = puVar3 + 2;
puVar3[1] = local_37;
if (puVar4 < param_3) {
puVar3[2] = local_38;
puVar4 = puVar3 + 3;
}
}
param_5 = param_5 + (ulong)uVar1;
iVar2 = *param_4 + -1;
*param_4 = iVar2;
puVar3 = puVar4;
} while (puVar4 < param_3);
}
return (long)puVar4 - (long)param_2;
}
|
|
63,758 |
GoodASM::identify()
|
goodasm/goodasm.cpp
|
QVector<GAGraderGrade> GoodASM::identify(){
/* This function works by reconfiguring the disassembler
* into each language and grader, then testing to see if
* the binary is a match.
*/
QVector<GAGraderGrade> matches;
setLanguage(""); //Ensure list is populated.
setGrader(""); //Ensure list is populated.
//Collect the scores of each grader.
foreach(auto g, graders){
//For all languages.
if(g->stable)
matches.append(g->scores(this));
}
return matches;
}
|
O3
|
cpp
|
GoodASM::identify():
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x18970
leaq 0x1032d9(%rip), %rsi # 0x11a0c8
leaq -0x30(%rbp), %rdi
callq 0xe710
jmp 0x16dfa
movq -0xb8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x117a0
jmp 0x16e0c
leaq -0x30(%rbp), %rdi
callq 0xe770
leaq 0x1032ac(%rip), %rsi # 0x11a0c8
leaq -0x58(%rbp), %rdi
callq 0xe710
jmp 0x16e27
movq -0xb8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x12670
jmp 0x16e39
leaq -0x58(%rbp), %rdi
callq 0xe770
movq -0xb8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
leaq -0x88(%rbp), %rdi
callq 0xec20
jmp 0x16e5e
jmp 0x16e60
leaq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rsi
callq 0xec60
movb %al, -0xc9(%rbp)
jmp 0x16e83
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x16ef6
jmp 0x16e8f
leaq -0x88(%rbp), %rdi
callq 0xecc0
jmp 0x16fa3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x16fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xe770
jmp 0x16fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xe770
jmp 0x16fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x16f95
leaq -0x70(%rbp), %rdi
callq 0xec80
movq %rax, -0xd8(%rbp)
jmp 0x16f08
movq -0xd8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x16f83
movq -0xb8(%rbp), %rdx
movq -0x98(%rbp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq -0xb0(%rbp), %rdi
callq *%rax
jmp 0x16f46
movq -0xc8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x18990
jmp 0x16f5b
leaq -0xb0(%rbp), %rdi
callq 0xeab0
jmp 0x16f83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xeab0
jmp 0x16f95
jmp 0x16f85
leaq -0x70(%rbp), %rdi
callq 0xeca0
jmp 0x16f90
jmp 0x16e60
leaq -0x88(%rbp), %rdi
callq 0xecc0
jmp 0x16fc9
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x16fb9
movq -0xc8(%rbp), %rdi
callq 0xeab0
movq -0xc0(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xc8(%rbp), %rdi
callq 0xeab0
movq -0x38(%rbp), %rdi
callq 0x7210
nop
|
_ZN7GoodASM8identifyEv:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_C8], rdi
mov rax, rdi
mov [rbp+var_C0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_B8], rax
mov [rbp+var_11], 0
call _ZN5QListI13GAGraderGradeEC2Ev; QList<GAGraderGrade>::QList(void)
lea rsi, byte_11A0C8; char *
lea rdi, [rbp+var_30]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_16DFA:
mov rdi, [rbp+var_B8]
lea rsi, [rbp+var_30]
call _ZN7GoodASM11setLanguageE7QString; GoodASM::setLanguage(QString)
jmp short $+2
loc_16E0C:
lea rdi, [rbp+var_30]; this
call _ZN7QStringD2Ev; QString::~QString()
lea rsi, byte_11A0C8; char *
lea rdi, [rbp+var_58]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_16E27:
mov rdi, [rbp+var_B8]
lea rsi, [rbp+var_58]
call _ZN7GoodASM9setGraderE7QString; GoodASM::setGrader(QString)
jmp short $+2
loc_16E39:
lea rdi, [rbp+var_58]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rsi, [rbp+var_B8]
add rsi, 120h
lea rdi, [rbp+var_88]
call _ZN9QtPrivate21qMakeForeachContainerIR5QListIP8GAGraderEEENS_17QForeachContainerINSt5decayIT_E4typeEEEOS8_; QtPrivate::qMakeForeachContainer<QList<GAGrader *> &>(QList<GAGrader *> &&&)
jmp short $+2
loc_16E5E:
jmp short $+2
loc_16E60:
lea rdi, [rbp+var_70]
mov rax, [rbp+var_68]
mov [rbp+var_90], rax
mov rsi, [rbp+var_90]
call _ZNK5QListIP8GAGraderE14const_iteratorneES3_; QList<GAGrader *>::const_iterator::operator!=(QList<GAGrader *>::const_iterator)
mov [rbp+var_C9], al
jmp short $+2
loc_16E83:
mov al, [rbp+var_C9]
test al, 1
jnz short loc_16EF6
jmp short $+2
loc_16E8F:
lea rdi, [rbp+var_88]
call _ZN9QtPrivate17QForeachContainerI5QListIP8GAGraderEED2Ev; QtPrivate::QForeachContainer<QList<GAGrader *>>::~QForeachContainer()
jmp loc_16FA3
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_16FC9
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_30]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_16FC9
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_58]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_16FC9
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_16F95
loc_16EF6:
lea rdi, [rbp+var_70]
call _ZNK5QListIP8GAGraderE14const_iteratordeEv; QList<GAGrader *>::const_iterator::operator*(void)
mov [rbp+var_D8], rax
jmp short $+2
loc_16F08:
mov rax, [rbp+var_D8]
mov rax, [rax]
mov [rbp+var_98], rax
mov rax, [rbp+var_98]
cmp dword ptr [rax+20h], 0
jz short loc_16F83
mov rdx, [rbp+var_B8]
mov rsi, [rbp+var_98]
mov rax, [rsi]
mov rax, [rax+20h]
lea rdi, [rbp+var_B0]
call rax
jmp short $+2
loc_16F46:
mov rdi, [rbp+var_C8]
lea rsi, [rbp+var_B0]
call _ZN5QListI13GAGraderGradeE6appendEOS1_; QList<GAGraderGrade>::append(QList<GAGraderGrade>&&)
jmp short $+2
loc_16F5B:
lea rdi, [rbp+var_B0]
call _ZN5QListI13GAGraderGradeED2Ev; QList<GAGraderGrade>::~QList()
jmp short loc_16F83
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_B0]
call _ZN5QListI13GAGraderGradeED2Ev; QList<GAGraderGrade>::~QList()
jmp short loc_16F95
loc_16F83:
jmp short $+2
loc_16F85:
lea rdi, [rbp+var_70]
call _ZN5QListIP8GAGraderE14const_iteratorppEv; QList<GAGrader *>::const_iterator::operator++(void)
jmp short $+2
loc_16F90:
jmp loc_16E60
loc_16F95:
lea rdi, [rbp+var_88]
call _ZN9QtPrivate17QForeachContainerI5QListIP8GAGraderEED2Ev; QtPrivate::QForeachContainer<QList<GAGrader *>>::~QForeachContainer()
jmp short loc_16FC9
loc_16FA3:
mov [rbp+var_11], 1
test [rbp+var_11], 1
jnz short loc_16FB9
mov rdi, [rbp+var_C8]
call _ZN5QListI13GAGraderGradeED2Ev; QList<GAGraderGrade>::~QList()
loc_16FB9:
mov rax, [rbp+var_C0]
add rsp, 0E0h
pop rbp
retn
loc_16FC9:
mov rdi, [rbp+var_C8]
call _ZN5QListI13GAGraderGradeED2Ev; QList<GAGraderGrade>::~QList()
mov rdi, [rbp+var_38]
call __Unwind_Resume
|
GoodASM * GoodASM::identify(GoodASM *this, GoodASM *a2)
{
_BYTE v3[24]; // [rsp+30h] [rbp-B0h] BYREF
_DWORD *v4; // [rsp+48h] [rbp-98h]
long long v5; // [rsp+50h] [rbp-90h]
_BYTE v6[24]; // [rsp+58h] [rbp-88h] BYREF
long long v7; // [rsp+70h] [rbp-70h] BYREF
long long v8; // [rsp+78h] [rbp-68h]
_BYTE v9[28]; // [rsp+88h] [rbp-58h] BYREF
_BYTE v10[31]; // [rsp+B0h] [rbp-30h] BYREF
char v11; // [rsp+CFh] [rbp-11h]
GoodASM *v12; // [rsp+D0h] [rbp-10h]
GoodASM *v13; // [rsp+D8h] [rbp-8h]
v13 = this;
v12 = a2;
v11 = 0;
QList<GAGraderGrade>::QList();
QString::QString((QString *)v10, &byte_11A0C8);
GoodASM::setLanguage(a2, (long long)v10);
QString::~QString((QString *)v10);
QString::QString((QString *)v9, &byte_11A0C8);
GoodASM::setGrader(a2, (long long)v9);
QString::~QString((QString *)v9);
QtPrivate::qMakeForeachContainer<QList<GAGrader *> &>((long long)v6, (long long)a2 + 288);
while ( 1 )
{
v5 = v8;
if ( !QList<GAGrader *>::const_iterator::operator!=(&v7, v8) )
break;
v4 = *(_DWORD **)QList<GAGrader *>::const_iterator::operator*((long long)&v7);
if ( v4[8] )
{
(*(void ( **)(_BYTE *, _DWORD *, GoodASM *))(*(_QWORD *)v4 + 32LL))(v3, v4, a2);
QList<GAGraderGrade>::append(this, v3);
QList<GAGraderGrade>::~QList((long long)v3);
}
QList<GAGrader *>::const_iterator::operator++(&v7);
}
QtPrivate::QForeachContainer<QList<GAGrader *>>::~QForeachContainer((long long)v6);
v11 = 1;
return this;
}
|
identify:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0xc8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xc0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xb8],RAX
MOV byte ptr [RBP + -0x11],0x0
CALL 0x00118970
LAB_00116de8:
LEA RSI,[0x21a0c8]
LEA RDI,[RBP + -0x30]
CALL 0x0010e710
JMP 0x00116dfa
LAB_00116dfa:
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[RBP + -0x30]
CALL 0x001117a0
JMP 0x00116e0c
LAB_00116e0c:
LEA RDI,[RBP + -0x30]
CALL 0x0010e770
LAB_00116e15:
LEA RSI,[0x21a0c8]
LEA RDI,[RBP + -0x58]
CALL 0x0010e710
JMP 0x00116e27
LAB_00116e27:
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[RBP + -0x58]
CALL 0x00112670
JMP 0x00116e39
LAB_00116e39:
LEA RDI,[RBP + -0x58]
CALL 0x0010e770
MOV RSI,qword ptr [RBP + -0xb8]
ADD RSI,0x120
LAB_00116e50:
LEA RDI,[RBP + -0x88]
CALL 0x0010ec20
JMP 0x00116e5e
LAB_00116e5e:
JMP 0x00116e60
LAB_00116e60:
LEA RDI,[RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x90],RAX
MOV RSI,qword ptr [RBP + -0x90]
LAB_00116e76:
CALL 0x0010ec60
MOV byte ptr [RBP + -0xc9],AL
JMP 0x00116e83
LAB_00116e83:
MOV AL,byte ptr [RBP + -0xc9]
TEST AL,0x1
JNZ 0x00116ef6
JMP 0x00116e8f
LAB_00116e8f:
LEA RDI,[RBP + -0x88]
CALL 0x0010ecc0
JMP 0x00116fa3
LAB_00116ef6:
LEA RDI,[RBP + -0x70]
CALL 0x0010ec80
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x00116f08
LAB_00116f08:
MOV RAX,qword ptr [RBP + -0xd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x98]
CMP dword ptr [RAX + 0x20],0x0
JZ 0x00116f83
MOV RDX,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x20]
LEA RDI,[RBP + -0xb0]
CALL RAX
JMP 0x00116f46
LAB_00116f46:
MOV RDI,qword ptr [RBP + -0xc8]
LEA RSI,[RBP + -0xb0]
CALL 0x00118990
JMP 0x00116f5b
LAB_00116f5b:
LEA RDI,[RBP + -0xb0]
CALL 0x0010eab0
JMP 0x00116f83
LAB_00116f83:
JMP 0x00116f85
LAB_00116f85:
LEA RDI,[RBP + -0x70]
LAB_00116f89:
CALL 0x0010eca0
LAB_00116f8e:
JMP 0x00116f90
LAB_00116f90:
JMP 0x00116e60
LAB_00116fa3:
MOV byte ptr [RBP + -0x11],0x1
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x00116fb9
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x0010eab0
LAB_00116fb9:
MOV RAX,qword ptr [RBP + -0xc0]
ADD RSP,0xe0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00116fad) */
/* GoodASM::identify() */
QList<GAGraderGrade> * GoodASM::identify(void)
{
byte bVar1;
GoodASM *in_RSI;
QList<GAGraderGrade> *in_RDI;
QList local_b8 [24];
long *local_a0;
int8 local_98;
QtPrivate local_90 [24];
const_iterator local_78 [8];
int8 local_70;
QString local_60 [40];
QString local_38 [31];
int1 local_19;
local_19 = 0;
QList<GAGraderGrade>::QList(in_RDI);
/* try { // try from 00116de8 to 00116df7 has its CatchHandler @ 00116ea0 */
QString::QString(local_38,"");
/* try { // try from 00116dfa to 00116e09 has its CatchHandler @ 00116eb1 */
setLanguage(in_RSI,local_38);
QString::~QString(local_38);
/* try { // try from 00116e15 to 00116e24 has its CatchHandler @ 00116ea0 */
QString::QString(local_60,"");
/* try { // try from 00116e27 to 00116e36 has its CatchHandler @ 00116ecb */
setGrader(in_RSI,local_60);
QString::~QString(local_60);
/* try { // try from 00116e50 to 00116e5b has its CatchHandler @ 00116ea0 */
QtPrivate::qMakeForeachContainer<QList<GAGrader*>&>(local_90,(QList *)(in_RSI + 0x120));
while( true ) {
local_98 = local_70;
/* try { // try from 00116e76 to 00116f43 has its CatchHandler @ 00116ee5 */
bVar1 = QList<GAGrader*>::const_iterator::operator!=(local_78,local_70);
if ((bVar1 & 1) == 0) break;
local_a0 = (long *)QList<GAGrader*>::const_iterator::operator*(local_78);
local_a0 = (long *)*local_a0;
if ((int)local_a0[4] != 0) {
(**(code **)(*local_a0 + 0x20))(local_b8,local_a0,in_RSI);
/* try { // try from 00116f46 to 00116f58 has its CatchHandler @ 00116f69 */
QList<GAGraderGrade>::append(in_RDI,local_b8);
QList<GAGraderGrade>::~QList((QList<GAGraderGrade> *)local_b8);
}
/* try { // try from 00116f89 to 00116f8d has its CatchHandler @ 00116ee5 */
QList<GAGrader*>::const_iterator::operator++(local_78);
}
QtPrivate::QForeachContainer<QList<GAGrader*>>::~QForeachContainer
((QForeachContainer<QList<GAGrader*>> *)local_90);
return in_RDI;
}
|
|
63,759 |
bitmap_union
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits == map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ |= *from++;
}
|
O3
|
c
|
bitmap_union:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
ja 0x9e0ac
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movl (%rdx), %esi
orl %esi, (%rax)
addq $0x4, %rdx
addq $0x4, %rax
cmpq %rcx, %rax
jbe 0x9e09a
popq %rbp
retq
|
bitmap_union:
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rax, rcx
ja short locret_9E0AC
push rbp
mov rbp, rsp
mov rdx, [rsi]
loc_9E09A:
mov esi, [rdx]
or [rax], esi
add rdx, 4
add rax, 4
cmp rax, rcx
jbe short loc_9E09A
pop rbp
locret_9E0AC:
retn
|
_DWORD * bitmap_union(long long a1, _DWORD **a2)
{
_DWORD *result; // rax
unsigned long long v3; // rcx
_DWORD *v4; // rdx
result = *(_DWORD **)a1;
v3 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)a1 <= v3 )
{
v4 = *a2;
do
*result++ |= *v4++;
while ( (unsigned long long)result <= v3 );
}
return result;
}
|
bitmap_union:
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RAX,RCX
JA 0x0019e0ac
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
LAB_0019e09a:
MOV ESI,dword ptr [RDX]
OR dword ptr [RAX],ESI
ADD RDX,0x4
ADD RAX,0x4
CMP RAX,RCX
JBE 0x0019e09a
POP RBP
LAB_0019e0ac:
RET
|
void bitmap_union(int8 *param_1,int8 *param_2)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
puVar2 = (uint *)*param_1;
puVar1 = (uint *)param_1[1];
if (puVar2 <= puVar1) {
puVar3 = (uint *)*param_2;
do {
*puVar2 = *puVar2 | *puVar3;
puVar3 = puVar3 + 1;
puVar2 = puVar2 + 1;
} while (puVar2 <= puVar1);
}
return;
}
|
|
63,760 |
CLI::TypeValidator<double>::TypeValidator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)::operator()[abi:cxx11](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Validators.hpp
|
explicit TypeValidator(const std::string &validator_name)
: Validator(validator_name, [](std::string &input_string) {
using CLI::detail::lexical_cast;
auto val = DesiredType();
if(!lexical_cast(input_string, val)) {
return std::string("Failed parsing ") + input_string + " as a " + detail::type_name<DesiredType>();
}
return std::string();
}) {}
|
O3
|
cpp
|
CLI::TypeValidator<double>::TypeValidator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)::operator()[abi:cxx11](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x60(%rsp), %rsi
movq $0x0, (%rsi)
movq %rdx, %rdi
callq 0x17107
testb %al, %al
je 0x2d72b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x2d88b
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xa7c0(%rip), %rsi # 0x37efc
leaq 0xa7c8(%rip), %rdx # 0x37f0b
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x11f90
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x7140
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d785
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2d78c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa75f(%rip), %rsi # 0x37f0c
callq 0x77e0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d7d9
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x2d7e0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa710(%rip), %rsi # 0x37f13
callq 0x77e0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x2d82a
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x2d830
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2d85e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7430
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2d874
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d88b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2d8b9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x2d8b9
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2d8d4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x2d8d4
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d8eb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
nop
|
_ZZN3CLI13TypeValidatorIdEC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENKUlRS7_E_clB5cxx11ESA_:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov rbx, rdi
lea rsi, [rsp+88h+var_28]
mov qword ptr [rsi], 0
mov rdi, rdx
call _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_
test al, al
jz short loc_2D72B
lea rax, [rbx+10h]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
jmp loc_2D88B
loc_2D72B:
lea r12, [rsp+88h+var_38]
mov [r12-10h], r12
lea rsi, aFailedParsing; "Failed parsing "
lea rdx, aFailedParsing+0Fh; ""
lea r15, [rsp+88h+var_48]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea r14, [rsp+88h+var_78]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_2D785
mov [rsp+88h+var_88], rdx
mov rdx, [rcx]
mov [rsp+88h+var_78], rdx
jmp short loc_2D78C
loc_2D785:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_2D78C:
mov rdx, [rax+8]
mov rdi, rsp
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aAsA; " as a "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+88h+var_58]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_2D7D9
mov [rsp+88h+var_68], rdx
mov rdx, [rcx]
mov [rsp+88h+var_58], rdx
jmp short loc_2D7E0
loc_2D7D9:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_2D7E0:
mov rdx, [rax+8]
lea rdi, [rsp+88h+var_68]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aFloat; "FLOAT"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_2D82A
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_2D830
loc_2D82A:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_2D830:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+88h+var_68]; void *
cmp rdi, r15
jz short loc_2D85E
mov rsi, [rsp+88h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2D85E:
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r14
jz short loc_2D874
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2D874:
mov rdi, [rsp+88h+var_48]; void *
cmp rdi, r12
jz short loc_2D88B
mov rsi, [rsp+88h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2D88B:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_2D8B9
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2D8B9
mov rbx, rax
loc_2D8B9:
mov rdi, [rsp+0]; void *
cmp rdi, r14
jz short loc_2D8D4
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2D8D4
mov rbx, rax
loc_2D8D4:
mov rdi, [rsp+arg_38]; void *
cmp rdi, r12
jz short loc_2D8EB
mov rsi, [rsp+arg_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2D8EB:
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::TypeValidator<double>::TypeValidator(std::string const&)::{lambda(std::string&)#1}::operator()[abi:cxx11](
long long a1,
int a2,
_QWORD *a3)
{
long long v4; // rax
__int128 *v5; // rcx
long long v6; // rax
__int128 *v7; // rcx
long long v8; // rax
_OWORD *v9; // rcx
void *v11[2]; // [rsp+0h] [rbp-88h] BYREF
__int128 v12; // [rsp+10h] [rbp-78h] BYREF
void *v13[2]; // [rsp+20h] [rbp-68h] BYREF
__int128 v14; // [rsp+30h] [rbp-58h] BYREF
void *v15[2]; // [rsp+40h] [rbp-48h] BYREF
_QWORD v16[2]; // [rsp+50h] [rbp-38h] BYREF
double v17[5]; // [rsp+60h] [rbp-28h] BYREF
v17[0] = 0.0;
if ( ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_(
a3,
v17) )
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
}
else
{
v15[0] = v16;
std::string::_M_construct<char const*>((long long)v15, "Failed parsing ", (long long)"");
v4 = std::string::_M_append(v15, *a3, a3[1]);
v11[0] = &v12;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v12 = *v5;
}
else
{
v11[0] = *(void **)v4;
*(_QWORD *)&v12 = *(_QWORD *)v5;
}
v11[1] = *(void **)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
v6 = std::string::append(v11, " as a ");
v13[0] = &v14;
v7 = (__int128 *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
v14 = *v7;
}
else
{
v13[0] = *(void **)v6;
*(_QWORD *)&v14 = *(_QWORD *)v7;
}
v13[1] = *(void **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = std::string::append(v13, "FLOAT");
*(_QWORD *)a1 = a1 + 16;
v9 = (_OWORD *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
*(_OWORD *)(a1 + 16) = *v9;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v8;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v9;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
}
return a1;
}
|
string&)_const:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV RBX,RDI
LEA RSI,[RSP + 0x60]
MOV qword ptr [RSI],0x0
MOV RDI,RDX
CALL 0x00117107
TEST AL,AL
JZ 0x0012d72b
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
JMP 0x0012d88b
LAB_0012d72b:
LEA R12,[RSP + 0x50]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x137efc]
LEA RDX,[0x137f0b]
LEA R15,[RSP + 0x40]
MOV RDI,R15
CALL 0x00111f90
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_0012d757:
MOV RDI,R15
CALL 0x00107140
LEA R14,[RSP + 0x10]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0012d785
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
JMP 0x0012d78c
LAB_0012d785:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_0012d78c:
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0012d7a6:
LEA RSI,[0x137f0c]
CALL 0x001077e0
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0012d7d9
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
JMP 0x0012d7e0
LAB_0012d7d9:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_0012d7e0:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0012d7fc:
LEA RSI,[0x137f13]
CALL 0x001077e0
LAB_0012d808:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x0012d82a
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x0012d830
LAB_0012d82a:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0012d830:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x0012d85e
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00107430
LAB_0012d85e:
MOV RDI,qword ptr [RSP]
CMP RDI,R14
JZ 0x0012d874
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00107430
LAB_0012d874:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,R12
JZ 0x0012d88b
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x00107430
LAB_0012d88b:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* CLI::TypeValidator<double>::TypeValidator(std::__cxx11::string
const&)::{lambda(std::__cxx11::string&)#1}::operator()[abi:cxx11](std::__cxx11::string&) const */
long * CLI::TypeValidator<double>::TypeValidator(std::__cxx11::string_const&)::
{lambda(std::__cxx11::string&)#1}::operator()::string___const
(long *param_1,int8 param_2,ulong *param_3)
{
long lVar1;
char cVar2;
long *plVar3;
int8 *puVar4;
long *plVar5;
long *local_88;
long local_80;
long local_78;
long lStack_70;
long *local_68;
long local_60;
long local_58;
long lStack_50;
long *local_48 [2];
long local_38 [2];
int8 local_28;
local_28 = 0;
cVar2 = _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_
(param_3);
if (cVar2 == '\0') {
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char_const*>(local_48,"Failed parsing ","");
/* try { // try from 0012d757 to 0012d75e has its CatchHandler @ 0012d8d1 */
plVar3 = (long *)std::__cxx11::string::_M_append((char *)local_48,*param_3);
plVar5 = plVar3 + 2;
if ((long *)*plVar3 == plVar5) {
local_78 = *plVar5;
lStack_70 = plVar3[3];
local_88 = &local_78;
}
else {
local_78 = *plVar5;
local_88 = (long *)*plVar3;
}
local_80 = plVar3[1];
*plVar3 = (long)plVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 0012d7a6 to 0012d7b1 has its CatchHandler @ 0012d8b6 */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_88);
plVar5 = plVar3 + 2;
if ((long *)*plVar3 == plVar5) {
local_58 = *plVar5;
lStack_50 = plVar3[3];
local_68 = &local_58;
}
else {
local_58 = *plVar5;
local_68 = (long *)*plVar3;
}
local_60 = plVar3[1];
*plVar3 = (long)plVar5;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 0012d7fc to 0012d807 has its CatchHandler @ 0012d89a */
puVar4 = (int8 *)std::__cxx11::string::append((char *)&local_68);
*param_1 = (long)(param_1 + 2);
plVar3 = puVar4 + 2;
if ((long *)*puVar4 == plVar3) {
lVar1 = puVar4[3];
param_1[2] = *plVar3;
param_1[3] = lVar1;
}
else {
*param_1 = (long)*puVar4;
param_1[2] = *plVar3;
}
param_1[1] = puVar4[1];
*puVar4 = plVar3;
puVar4[1] = 0;
*(int1 *)(puVar4 + 2) = 0;
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
}
else {
*param_1 = (long)(param_1 + 2);
param_1[1] = 0;
*(int1 *)(param_1 + 2) = 0;
}
return param_1;
}
|
|
63,761 |
Bitmap<64u>::Iterator::operator++(int)
|
eloqsql/sql/sql_bitmap.h
|
int operator++(int)
{
for (;;)
{
int nextbit= tmi++;
if (nextbit != Table_map_iterator::BITMAP_END)
return offset + nextbit;
if (offset + BITS_PER_ELEMENT >= map.length())
return BITMAP_END;
offset += BITS_PER_ELEMENT;
tmi= Table_map_iterator(map.buffer[offset / BITS_PER_ELEMENT]);
}
}
|
O0
|
c
|
Bitmap<64u>::Iterator::operator++(int):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x8ce9d0
movl %eax, -0x18(%rbp)
cmpl $0x40, -0x18(%rbp)
je 0x8ce93e
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8ce99b
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x40, %ecx
movl %ecx, -0x2c(%rbp)
movq (%rax), %rdi
callq 0x8ce9f0
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jb 0x8ce965
movl $0x40, -0x4(%rbp)
jmp 0x8ce99b
movq -0x28(%rbp), %rcx
movl 0x8(%rcx), %eax
addl $0x40, %eax
movl %eax, 0x8(%rcx)
movq (%rcx), %rax
movl 0x8(%rcx), %ecx
shrl $0x6, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rsi
leaq -0x20(%rbp), %rdi
callq 0x8ce9b0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x8ce917
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN6BitmapILj64EE8IteratorppEi:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_8CE917:
mov rdi, [rbp+var_28]
add rdi, 10h
xor esi, esi
call _ZN18Table_map_iteratorppEi; Table_map_iterator::operator++(int)
mov [rbp+var_18], eax
cmp [rbp+var_18], 40h ; '@'
jz short loc_8CE93E
mov rax, [rbp+var_28]
mov eax, [rax+8]
add eax, [rbp+var_18]
mov [rbp+var_4], eax
jmp short loc_8CE99B
loc_8CE93E:
mov rax, [rbp+var_28]
mov ecx, [rax+8]
add ecx, 40h ; '@'
mov [rbp+var_2C], ecx
mov rdi, [rax]
call _ZNK6BitmapILj64EE6lengthEv; Bitmap<64u>::length(void)
mov ecx, eax
mov eax, [rbp+var_2C]
cmp eax, ecx
jb short loc_8CE965
mov [rbp+var_4], 40h ; '@'
jmp short loc_8CE99B
loc_8CE965:
mov rcx, [rbp+var_28]
mov eax, [rcx+8]
add eax, 40h ; '@'
mov [rcx+8], eax
mov rax, [rcx]
mov ecx, [rcx+8]
shr ecx, 6
mov ecx, ecx
mov rsi, [rax+rcx*8]; unsigned __int64
lea rdi, [rbp+var_20]; this
call _ZN18Table_map_iteratorC2Ey; Table_map_iterator::Table_map_iterator(ulong long)
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
mov [rax+10h], rcx
jmp loc_8CE917
loc_8CE99B:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long Bitmap<64u>::Iterator::operator++(long long a1, int a2)
{
unsigned int v3; // [rsp+4h] [rbp-2Ch]
long long v4; // [rsp+10h] [rbp-20h] BYREF
int v5; // [rsp+18h] [rbp-18h]
int v6; // [rsp+1Ch] [rbp-14h]
long long v7; // [rsp+20h] [rbp-10h]
v7 = a1;
v6 = a2;
while ( 1 )
{
v5 = Table_map_iterator::operator++(a1 + 16, 0LL);
if ( v5 != 64 )
return (unsigned int)(v5 + *(_DWORD *)(a1 + 8));
v3 = *(_DWORD *)(a1 + 8) + 64;
if ( v3 >= (unsigned int)Bitmap<64u>::length(*(_QWORD *)a1) )
break;
*(_DWORD *)(a1 + 8) += 64;
Table_map_iterator::Table_map_iterator(
(Table_map_iterator *)&v4,
*(_QWORD *)(*(_QWORD *)a1 + 8LL * (*(_DWORD *)(a1 + 8) >> 6)));
*(_QWORD *)(a1 + 16) = v4;
}
return 64;
}
|
__cxx_global_var_init.11:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x26cb804]
MOV ESI,0x20
CALL 0x008fd550
POP RBP
RET
|
void __cxx_global_var_init_11(void)
{
time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_TRUNCATE,0x20);
return;
}
|
|
63,762 |
Catch::XmlWriter::ScopedElement::operator=(Catch::XmlWriter::ScopedElement&&)
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept {
if ( m_writer ) {
m_writer->endElement();
}
m_writer = other.m_writer;
other.m_writer = nullptr;
m_fmt = other.m_fmt;
other.m_fmt = XmlFormatting::None;
return *this;
}
|
O3
|
cpp
|
Catch::XmlWriter::ScopedElement::operator=(Catch::XmlWriter::ScopedElement&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x6430c
movl $0x3, %esi
callq 0x18cd0
movq (%r14), %rax
movq %rax, (%rbx)
movq $0x0, (%r14)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movl $0x0, 0x8(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x1f2c3
nop
|
_ZN5Catch9XmlWriter13ScopedElementaSEOS1_:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]; this
test rdi, rdi
jz short loc_6430C
mov esi, 3
call _ZN5Catch9XmlWriter10endElementENS_13XmlFormattingE; Catch::XmlWriter::endElement(Catch::XmlFormatting)
loc_6430C:
mov rax, [r14]
mov [rbx], rax
mov qword ptr [r14], 0
mov eax, [r14+8]
mov [rbx+8], eax
mov dword ptr [r14+8], 0
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov rdi, rax
call __clang_call_terminate
|
long long Catch::XmlWriter::ScopedElement::operator=(long long a1, long long a2)
{
Catch::XmlWriter *v3; // rdi
v3 = *(Catch::XmlWriter **)a1;
if ( v3 )
Catch::XmlWriter::endElement(v3, 3);
*(_QWORD *)a1 = *(_QWORD *)a2;
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a1 + 8) = *(_DWORD *)(a2 + 8);
*(_DWORD *)(a2 + 8) = 0;
return a1;
}
|
operator=:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0016430c
LAB_00164302:
MOV ESI,0x3
CALL 0x00118cd0
LAB_0016430c:
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX],RAX
MOV qword ptr [R14],0x0
MOV EAX,dword ptr [R14 + 0x8]
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [R14 + 0x8],0x0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* Catch::XmlWriter::ScopedElement::TEMPNAMEPLACEHOLDERVALUE(Catch::XmlWriter::ScopedElement&&) */
ScopedElement * __thiscall
Catch::XmlWriter::ScopedElement::operator=(ScopedElement *this,ScopedElement *param_1)
{
if (*(XmlWriter **)this != (XmlWriter *)0x0) {
/* try { // try from 00164302 to 0016430b has its CatchHandler @ 00164333 */
endElement(*(XmlWriter **)this,3);
}
*(int8 *)this = *(int8 *)param_1;
*(int8 *)param_1 = 0;
*(int4 *)(this + 8) = *(int4 *)(param_1 + 8);
*(int4 *)(param_1 + 8) = 0;
return this;
}
|
|
63,763 |
my_once_alloc
|
eloqsql/mysys/my_once.c
|
void* my_once_alloc(size_t Size, myf MyFlags)
{
size_t get_size, max_left;
uchar* point;
reg1 USED_MEM *next;
reg2 USED_MEM **prev;
Size= ALIGN_SIZE(Size);
prev= &my_once_root_block;
max_left=0;
for (next=my_once_root_block ; next && next->left < Size ; next= next->next)
{
if (next->left > max_left)
max_left=next->left;
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
get_size= Size+ALIGN_SIZE(sizeof(USED_MEM));
if (max_left*4 < my_once_extra && get_size < my_once_extra)
get_size=my_once_extra; /* Normal alloc */
if ((next = (USED_MEM*) malloc(get_size)) == 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
return((uchar*) 0);
}
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
next->next= 0;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM));
*prev=next;
}
point= (uchar*) ((char*) next+ (next->size-next->left));
next->left-= Size;
if (MyFlags & MY_ZEROFILL)
bzero(point, Size);
return((void*) point);
}
|
O3
|
c
|
my_once_alloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x7, %r14
andq $-0x8, %r14
leaq 0xb68b55(%rip), %r13 # 0xc0a1d0
movq (%r13), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xa16a6
movq %rcx, %r13
movq 0x8(%rcx), %rcx
cmpq %r14, %rcx
jae 0xa16ef
cmpq %rax, %rcx
cmovaq %rcx, %rax
movq (%r13), %rcx
testq %rcx, %rcx
jne 0xa1686
shlq $0x2, %rax
leaq 0x18(%r14), %rcx
leaq 0x2e647f(%rip), %rdx # 0x387b30
movl (%rdx), %edx
cmpq %rdx, %rcx
movq %rdx, %r15
cmovaq %rcx, %r15
cmpq %rdx, %rax
cmovaeq %rcx, %r15
movq %r15, %rdi
callq 0x296f0
testq %rax, %rax
je 0xa1720
movq $0x0, (%rax)
movq %r15, 0x10(%rax)
addq $-0x18, %r15
movq %r15, 0x8(%rax)
movq %rax, (%r13)
movq 0x8(%rax), %rcx
movq %rax, %r13
movq 0x10(%r13), %r12
subq %rcx, %r12
addq %r13, %r12
subq %r14, %rcx
movq %rcx, 0x8(%r13)
testb $0x20, %bl
je 0xa174c
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292a0
callq 0x29790
movl (%rax), %r14d
callq 0xa2f56
movl %r14d, (%rax)
xorl %r12d, %r12d
testb $0x18, %bl
je 0xa174c
movl $0x1004, %esi # imm = 0x1004
movl $0x5, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x9f467
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_once_alloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add r14, 7
and r14, 0FFFFFFFFFFFFFFF8h
lea r13, my_once_root_block
mov rcx, [r13+0]
xor eax, eax
test rcx, rcx
jz short loc_A16A6
loc_A1686:
mov r13, rcx
mov rcx, [rcx+8]
cmp rcx, r14
jnb short loc_A16EF
cmp rcx, rax
cmova rax, rcx
mov rcx, [r13+0]
test rcx, rcx
jnz short loc_A1686
shl rax, 2
loc_A16A6:
lea rcx, [r14+18h]
lea rdx, my_once_extra
mov edx, [rdx]
cmp rcx, rdx
mov r15, rdx
cmova r15, rcx
cmp rax, rdx
cmovnb r15, rcx
mov rdi, r15
call _malloc
test rax, rax
jz short loc_A1720
mov qword ptr [rax], 0
mov [rax+10h], r15
add r15, 0FFFFFFFFFFFFFFE8h
mov [rax+8], r15
mov [r13+0], rax
mov rcx, [rax+8]
mov r13, rax
loc_A16EF:
mov r12, [r13+10h]
sub r12, rcx
add r12, r13
sub rcx, r14
mov [r13+8], rcx
test bl, 20h
jz short loc_A174C
mov rdi, r12
xor esi, esi
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_A1720:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
xor r12d, r12d
test bl, 18h
jz short loc_A174C
mov esi, 1004h
mov edi, 5
mov rdx, r15
xor eax, eax
call my_error
loc_A174C:
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_once_alloc(long long a1, char a2)
{
unsigned long long v2; // r14
_QWORD *v3; // r13
_QWORD *v4; // rcx
unsigned long long v5; // rax
unsigned long long v6; // rcx
unsigned long long v7; // r15
_QWORD *v8; // rax
char *v9; // r12
int v11; // r14d
v2 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v3 = &my_once_root_block;
v4 = (_QWORD *)my_once_root_block;
v5 = 0LL;
if ( my_once_root_block )
{
while ( 1 )
{
v3 = v4;
v6 = v4[1];
if ( v6 >= v2 )
break;
if ( v6 > v5 )
v5 = v6;
v4 = (_QWORD *)*v3;
if ( !*v3 )
{
v5 *= 4LL;
goto LABEL_7;
}
}
}
else
{
LABEL_7:
v7 = my_once_extra;
if ( v2 + 24 > my_once_extra )
v7 = v2 + 24;
if ( v5 >= my_once_extra )
v7 = v2 + 24;
v8 = (_QWORD *)malloc(v7);
if ( !v8 )
{
v11 = *(_DWORD *)__errno_location(v7);
*(_DWORD *)my_thread_var(v7) = v11;
v9 = 0LL;
if ( (a2 & 0x18) != 0 )
my_error(5u, 4100LL, v7);
return (long long)v9;
}
*v8 = 0LL;
v8[2] = v7;
v8[1] = v7 - 24;
*v3 = v8;
v6 = v8[1];
v3 = v8;
}
v9 = (char *)v3 + v3[2] - v6;
v3[1] = v6 - v2;
if ( (a2 & 0x20) != 0 )
return memset(v9, 0LL, v2);
return (long long)v9;
}
|
my_once_alloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD R14,0x7
AND R14,-0x8
LEA R13,[0xd0a1d0]
MOV RCX,qword ptr [R13]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x001a16a6
LAB_001a1686:
MOV R13,RCX
MOV RCX,qword ptr [RCX + 0x8]
CMP RCX,R14
JNC 0x001a16ef
CMP RCX,RAX
CMOVA RAX,RCX
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JNZ 0x001a1686
SHL RAX,0x2
LAB_001a16a6:
LEA RCX,[R14 + 0x18]
LEA RDX,[0x487b30]
MOV EDX,dword ptr [RDX]
CMP RCX,RDX
MOV R15,RDX
CMOVA R15,RCX
CMP RAX,RDX
CMOVNC R15,RCX
MOV RDI,R15
CALL 0x001296f0
TEST RAX,RAX
JZ 0x001a1720
MOV qword ptr [RAX],0x0
MOV qword ptr [RAX + 0x10],R15
ADD R15,-0x18
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [R13],RAX
MOV RCX,qword ptr [RAX + 0x8]
MOV R13,RAX
LAB_001a16ef:
MOV R12,qword ptr [R13 + 0x10]
SUB R12,RCX
ADD R12,R13
SUB RCX,R14
MOV qword ptr [R13 + 0x8],RCX
TEST BL,0x20
JZ 0x001a174c
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292a0
LAB_001a1720:
CALL 0x00129790
MOV R14D,dword ptr [RAX]
CALL 0x001a2f56
MOV dword ptr [RAX],R14D
XOR R12D,R12D
TEST BL,0x18
JZ 0x001a174c
MOV ESI,0x1004
MOV EDI,0x5
MOV RDX,R15
XOR EAX,EAX
CALL 0x0019f467
LAB_001a174c:
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * my_once_alloc(long param_1,ulong param_2)
{
int iVar1;
int8 *puVar2;
ulong uVar3;
int8 *puVar4;
int *piVar5;
ulong uVar6;
ulong uVar7;
void *pvVar8;
int8 *puVar9;
ulong __n;
ulong __size;
__n = param_1 + 7U & 0xfffffffffffffff8;
uVar3 = 0;
puVar2 = my_once_root_block;
puVar9 = &my_once_root_block;
if (my_once_root_block != (int8 *)0x0) {
do {
puVar4 = puVar2;
uVar6 = puVar4[1];
if (__n <= uVar6) goto LAB_001a16ef;
if (uVar3 < uVar6) {
uVar3 = uVar6;
}
puVar2 = (int8 *)*puVar4;
} while ((int8 *)*puVar4 != (int8 *)0x0);
uVar3 = uVar3 << 2;
puVar9 = puVar4;
}
uVar6 = __n + 0x18;
uVar7 = (ulong)my_once_extra;
__size = uVar7;
if (uVar7 < uVar6) {
__size = uVar6;
}
if (uVar7 <= uVar3) {
__size = uVar6;
}
puVar4 = (int8 *)malloc(__size);
if (puVar4 == (int8 *)0x0) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
pvVar8 = (void *)0x0;
if ((param_2 & 0x18) != 0) {
my_error(5,0x1004,__size);
}
}
else {
*puVar4 = 0;
puVar4[2] = __size;
puVar4[1] = __size - 0x18;
*puVar9 = puVar4;
uVar6 = puVar4[1];
LAB_001a16ef:
pvVar8 = (void *)((puVar4[2] - uVar6) + (long)puVar4);
puVar4[1] = uVar6 - __n;
if ((param_2 & 0x20) != 0) {
pvVar8 = memset(pvVar8,0,__n);
return pvVar8;
}
}
return pvVar8;
}
|
|
63,764 |
js_finrec_register
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_finrec_register(JSContext *ctx, JSValue this_val, int argc, JSValue *argv)
{
JSFinalizationRegistryData *frd = JS_GetOpaque2(ctx, this_val, JS_CLASS_FINALIZATION_REGISTRY);
if (!frd)
return JS_EXCEPTION;
JSValue target = argv[0];
JSValue held_val = argv[1];
// The function length needs to return 2, so the 3rd argument won't be initialized.
JSValue token = argc > 2 ? argv[2] : JS_UNDEFINED;
if (!is_valid_weakref_target(target))
return JS_ThrowTypeError(ctx, "invalid target");
if (js_same_value(ctx, target, this_val))
return JS_UNDEFINED;
if (!JS_IsUndefined(held_val) && js_same_value(ctx, target, held_val))
return JS_ThrowTypeError(ctx, "held value cannot be the target");
if (!JS_IsUndefined(token) && !is_valid_weakref_target(token))
return JS_ThrowTypeError(ctx, "invalid unregister token");
JSFinRecEntry *fre = js_malloc(ctx, sizeof(*fre));
if (!fre)
return JS_EXCEPTION;
JSWeakRefRecord *wr = js_malloc(ctx, sizeof(*wr));
if (!wr) {
js_free(ctx, fre);
return JS_EXCEPTION;
}
fre->obj = this_val;
fre->target = target;
fre->held_val = js_dup(held_val);
fre->token = js_dup(token);
list_add_tail(&fre->link, &frd->entries);
wr->kind = JS_WEAK_REF_KIND_FINALIZATION_REGISTRY_ENTRY;
wr->u.fin_rec_entry = fre;
insert_weakref_record(target, wr);
return JS_UNDEFINED;
}
|
O3
|
c
|
js_finrec_register:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rdi, %r14
cmpl $-0x1, %r12d
jne 0x86e22
movq %rsi, %rbp
cmpw $0x3b, 0x6(%rsi)
jne 0x86e22
movq 0x30(%rbp), %rdx
testq %rdx, %rdx
je 0x86e22
movq 0x8(%r8), %rbx
cmpl $0x3, %ecx
jl 0x86e49
movq 0x20(%r8), %rax
movq 0x28(%r8), %rcx
movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000
andq %rax, %rsi
movl %eax, %r9d
jmp 0x86e53
movq %r14, %rdi
movl $0x3b, %esi
callq 0x27cf7
movl $0x6, %r13d
xorl %eax, %eax
movq %r13, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %ecx
xorl %r9d, %r9d
xorl %esi, %esi
movq (%r8), %r15
movq 0x10(%r8), %rdi
movq 0x18(%r8), %r8
cmpl $-0x1, %ebx
je 0x86e88
cmpl $-0x8, %ebx
jne 0x86e75
movq 0x4(%r15), %rax
shrq $0x3e, %rax
cmpl $0x2, %eax
jne 0x86e88
leaq 0x1e8e0(%rip), %rsi # 0xa575c
movq %r14, %rdi
xorl %eax, %eax
callq 0x22d8b
jmp 0x86e2f
movq %r9, 0x30(%rsp)
movq %r8, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, (%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r12, %r8
callq 0x26ae5
movl $0x3, %r13d
testl %eax, %eax
jne 0x86e35
movq %r15, 0x10(%rsp)
cmpl $0x3, 0x8(%rsp)
je 0x86efa
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x26ae5
testl %eax, %eax
je 0x86efa
leaq 0x1e87e(%rip), %rsi # 0xa5776
jmp 0x86e7c
movq (%rsp), %r15
orq 0x30(%rsp), %r15
movq 0x20(%rsp), %rax
cmpl $0x3, %eax
je 0x86f30
cmpl $-0x8, %eax
je 0x86f23
cmpl $-0x1, %eax
je 0x86f30
leaq 0x1e878(%rip), %rsi # 0xa5796
jmp 0x86e7c
movq 0x4(%r15), %rax
shrq $0x3e, %rax
cmpl $0x2, %eax
je 0x86f17
movl $0x50, %esi
movq %r14, %rdi
callq 0xee12
testq %rax, %rax
je 0x86e2f
movq %rax, (%rsp)
movl $0x18, %esi
movq %r14, %rdi
callq 0xee12
testq %rax, %rax
je 0x86fed
movq (%rsp), %r9
movq %rbp, 0x10(%r9)
movq %r12, 0x18(%r9)
movq 0x10(%rsp), %rsi
movq %rsi, 0x20(%r9)
movq %rbx, 0x28(%r9)
movq 0x8(%rsp), %r8
cmpl $-0x9, %r8d
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
jb 0x86f95
incl (%rdi)
movq %rdi, 0x30(%r9)
movq %r8, 0x38(%r9)
cmpl $-0x9, %ecx
jb 0x86fa5
incl (%r15)
movq %r15, 0x40(%r9)
movq %rcx, 0x48(%r9)
movq (%rdx), %rcx
movq %r9, 0x8(%rcx)
movq %rcx, (%r9)
movq %rdx, 0x8(%r9)
movq %r9, (%rdx)
movl $0x2, (%rax)
movq %r9, 0x10(%rax)
movl $0x28, %ecx
cmpl $-0x1, %ebx
je 0x86fdc
cmpl $-0x8, %ebx
jne 0x8701d
movl $0x10, %ecx
movq (%rsi,%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rsi,%rcx)
jmp 0x86e35
movq 0x18(%r14), %rbx
decq 0x28(%rbx)
movq (%rsp), %r14
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x30(%rbx), %rcx
movq 0x40(%rbx), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%rbx)
movq %r14, %rsi
callq *0x10(%rbx)
jmp 0x86e2f
callq 0xe090
|
js_finrec_register:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rdx
mov r14, rdi
cmp r12d, 0FFFFFFFFh
jnz short loc_86E22
mov rbp, rsi
cmp word ptr [rsi+6], 3Bh ; ';'
jnz short loc_86E22
mov rdx, [rbp+30h]
test rdx, rdx
jz short loc_86E22
mov rbx, [r8+8]
cmp ecx, 3
jl short loc_86E49
mov rax, [r8+20h]
mov rcx, [r8+28h]
mov rsi, 0FFFFFFFF00000000h
and rsi, rax
mov r9d, eax
jmp short loc_86E53
loc_86E22:
mov rdi, r14
mov esi, 3Bh ; ';'
call JS_ThrowTypeErrorInvalidClass
loc_86E2F:
mov r13d, 6
loc_86E35:
xor eax, eax
mov rdx, r13
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_86E49:
mov ecx, 3
xor r9d, r9d
xor esi, esi
loc_86E53:
mov r15, [r8]
mov rdi, [r8+10h]
mov r8, [r8+18h]
cmp ebx, 0FFFFFFFFh
jz short loc_86E88
cmp ebx, 0FFFFFFF8h
jnz short loc_86E75
mov rax, [r15+4]
shr rax, 3Eh
cmp eax, 2
jnz short loc_86E88
loc_86E75:
lea rsi, aInvalidTarget; "invalid target"
loc_86E7C:
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_86E2F
loc_86E88:
mov [rsp+68h+var_38], r9
mov [rsp+68h+var_60], r8
mov [rsp+68h+var_50], rdi
mov [rsp+68h+var_68], rsi
mov [rsp+68h+var_48], rcx
mov [rsp+68h+var_40], rdx
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov rcx, rbp
mov r8, r12
call js_same_value
mov r13d, 3
test eax, eax
jnz loc_86E35
mov [rsp+68h+var_58], r15
cmp dword ptr [rsp+68h+var_60], 3
jz short loc_86EFA
mov rdi, r14
mov rsi, [rsp+68h+var_58]
mov rdx, rbx
mov rcx, [rsp+68h+var_50]
mov r8, [rsp+68h+var_60]
call js_same_value
test eax, eax
jz short loc_86EFA
lea rsi, aHeldValueCanno; "held value cannot be the target"
jmp short loc_86E7C
loc_86EFA:
mov r15, [rsp+68h+var_68]
or r15, [rsp+68h+var_38]
mov rax, [rsp+68h+var_48]
cmp eax, 3
jz short loc_86F30
cmp eax, 0FFFFFFF8h
jz short loc_86F23
cmp eax, 0FFFFFFFFh
jz short loc_86F30
loc_86F17:
lea rsi, aInvalidUnregis; "invalid unregister token"
jmp loc_86E7C
loc_86F23:
mov rax, [r15+4]
shr rax, 3Eh
cmp eax, 2
jz short loc_86F17
loc_86F30:
mov esi, 50h ; 'P'
mov rdi, r14
call js_malloc
test rax, rax
jz loc_86E2F
mov [rsp+68h+var_68], rax
mov esi, 18h
mov rdi, r14
call js_malloc
test rax, rax
jz loc_86FED
mov r9, [rsp+68h+var_68]
mov [r9+10h], rbp
mov [r9+18h], r12
mov rsi, [rsp+68h+var_58]
mov [r9+20h], rsi
mov [r9+28h], rbx
mov r8, [rsp+68h+var_60]
cmp r8d, 0FFFFFFF7h
mov rdx, [rsp+68h+var_40]
mov rcx, [rsp+68h+var_48]
mov rdi, [rsp+68h+var_50]
jb short loc_86F95
inc dword ptr [rdi]
loc_86F95:
mov [r9+30h], rdi
mov [r9+38h], r8
cmp ecx, 0FFFFFFF7h
jb short loc_86FA5
inc dword ptr [r15]
loc_86FA5:
mov [r9+40h], r15
mov [r9+48h], rcx
mov rcx, [rdx]
mov [rcx+8], r9
mov [r9], rcx
mov [r9+8], rdx
mov [rdx], r9
mov dword ptr [rax], 2
mov [rax+10h], r9
mov ecx, 28h ; '('
cmp ebx, 0FFFFFFFFh
jz short loc_86FDC
cmp ebx, 0FFFFFFF8h
jnz short loc_8701D
mov ecx, 10h
loc_86FDC:
mov rdx, [rsi+rcx]
mov [rax+8], rdx
mov [rsi+rcx], rax
jmp loc_86E35
loc_86FED:
mov rbx, [r14+18h]
dec qword ptr [rbx+28h]
mov r14, [rsp+68h+var_68]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+30h]
mov rdi, [rbx+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rcx
mov rsi, r14
call qword ptr [rbx+10h]
jmp loc_86E2F
loc_8701D:
call _abort
|
long long js_finrec_register(
long long a1,
long long a2,
long long a3,
int a4,
long long *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13)
{
long long v16; // rdx
long long v17; // rbx
long long v18; // rcx
unsigned long long v19; // rsi
long long v20; // r9
long long v22; // r15
_DWORD *v23; // rdi
long long v24; // r8
const char *v25; // rsi
_DWORD *v26; // r15
long long v27; // rax
long long v28; // rax
long long v29; // rcx
long long v30; // rcx
long long v31; // rbx
long long v32; // rax
long long v33; // rdi
char v34; // [rsp+0h] [rbp-68h]
_QWORD *v35; // [rsp+0h] [rbp-68h]
long long v36; // [rsp+8h] [rbp-60h]
long long v37; // [rsp+10h] [rbp-58h]
long long v38; // [rsp+20h] [rbp-48h]
long long *v39; // [rsp+28h] [rbp-40h]
long long v40; // [rsp+30h] [rbp-38h]
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 59 && (v16 = *(_QWORD *)(a2 + 48)) != 0 )
{
v17 = a5[1];
if ( a4 < 3 )
{
v18 = 3LL;
v20 = 0LL;
v19 = 0LL;
}
else
{
v18 = a5[5];
v19 = a5[4] & 0xFFFFFFFF00000000LL;
v20 = (unsigned int)a5[4];
}
v22 = *a5;
v23 = (_DWORD *)a5[2];
v24 = a5[3];
if ( (_DWORD)v17 != -1 && ((_DWORD)v17 != -8 || *(_QWORD *)(v22 + 4) >> 62 == 2) )
{
v25 = "invalid target";
LABEL_13:
JS_ThrowTypeError(a1, (long long)v25, v16, v18, v24, v20, a6, a7, a8, a9, a10, a11, a12, a13, v34);
return 0LL;
}
v40 = v20;
v36 = v24;
v34 = v19;
v38 = v18;
v39 = (long long *)v16;
if ( (unsigned int)js_same_value(a1, (_DWORD *)v22, v17, (_DWORD *)a2, a3) )
return 0LL;
v37 = v22;
if ( (_DWORD)v36 != 3 && (unsigned int)js_same_value(a1, (_DWORD *)v22, v17, v23, v36) )
{
v25 = "held value cannot be the target";
goto LABEL_13;
}
v26 = (_DWORD *)(v40 | v19);
if ( (_DWORD)v38 != 3 )
{
if ( (_DWORD)v38 == -8 )
{
if ( *(_QWORD *)&byte_4[v40 | v19] >> 62 == 2 )
goto LABEL_21;
}
else if ( (_DWORD)v38 != -1 )
{
LABEL_21:
v25 = "invalid unregister token";
goto LABEL_13;
}
}
v27 = js_malloc(a1, 80LL);
if ( v27 )
{
v35 = (_QWORD *)v27;
v28 = js_malloc(a1, 24LL);
if ( v28 )
{
v35[2] = a2;
v35[3] = a3;
v35[4] = v37;
v35[5] = v17;
if ( (unsigned int)v36 >= 0xFFFFFFF7 )
++*v23;
v35[6] = v23;
v35[7] = v36;
if ( (unsigned int)v38 >= 0xFFFFFFF7 )
++*v26;
v35[8] = v26;
v35[9] = v38;
v29 = *v39;
*(_QWORD *)(v29 + 8) = v35;
*v35 = v29;
v35[1] = v39;
*v39 = (long long)v35;
*(_DWORD *)v28 = 2;
*(_QWORD *)(v28 + 16) = v35;
v30 = 40LL;
if ( (_DWORD)v17 != -1 )
v30 = 16LL;
*(_QWORD *)(v28 + 8) = *(_QWORD *)(v37 + v30);
*(_QWORD *)(v37 + v30) = v28;
}
else
{
v31 = *(_QWORD *)(a1 + 24);
--*(_QWORD *)(v31 + 40);
v32 = (*(long long ( **)(_QWORD *))(v31 + 32))(v35);
v33 = *(_QWORD *)(v31 + 64);
*(_QWORD *)(v31 + 48) = *(_QWORD *)(v31 + 48) - v32 - 8;
(*(void ( **)(long long, _QWORD *))(v31 + 16))(v33, v35);
}
}
}
else
{
JS_ThrowTypeErrorInvalidClass(a1, 59, a6, a7, a8, a9, *(double *)a10.m128_u64, *(double *)a11.m128_u64, a12, a13);
}
return 0LL;
}
|
js_finrec_register:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RDX
MOV R14,RDI
CMP R12D,-0x1
JNZ 0x00186e22
MOV RBP,RSI
CMP word ptr [RSI + 0x6],0x3b
JNZ 0x00186e22
MOV RDX,qword ptr [RBP + 0x30]
TEST RDX,RDX
JZ 0x00186e22
MOV RBX,qword ptr [R8 + 0x8]
CMP ECX,0x3
JL 0x00186e49
MOV RAX,qword ptr [R8 + 0x20]
MOV RCX,qword ptr [R8 + 0x28]
MOV RSI,-0x100000000
AND RSI,RAX
MOV R9D,EAX
JMP 0x00186e53
LAB_00186e22:
MOV RDI,R14
MOV ESI,0x3b
CALL 0x00127cf7
LAB_00186e2f:
MOV R13D,0x6
LAB_00186e35:
XOR EAX,EAX
MOV RDX,R13
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00186e49:
MOV ECX,0x3
XOR R9D,R9D
XOR ESI,ESI
LAB_00186e53:
MOV R15,qword ptr [R8]
MOV RDI,qword ptr [R8 + 0x10]
MOV R8,qword ptr [R8 + 0x18]
CMP EBX,-0x1
JZ 0x00186e88
CMP EBX,-0x8
JNZ 0x00186e75
MOV RAX,qword ptr [R15 + 0x4]
SHR RAX,0x3e
CMP EAX,0x2
JNZ 0x00186e88
LAB_00186e75:
LEA RSI,[0x1a575c]
LAB_00186e7c:
MOV RDI,R14
XOR EAX,EAX
CALL 0x00122d8b
JMP 0x00186e2f
LAB_00186e88:
MOV qword ptr [RSP + 0x30],R9
MOV qword ptr [RSP + 0x8],R8
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP],RSI
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x28],RDX
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV RCX,RBP
MOV R8,R12
CALL 0x00126ae5
MOV R13D,0x3
TEST EAX,EAX
JNZ 0x00186e35
MOV qword ptr [RSP + 0x10],R15
CMP dword ptr [RSP + 0x8],0x3
JZ 0x00186efa
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x8]
CALL 0x00126ae5
TEST EAX,EAX
JZ 0x00186efa
LEA RSI,[0x1a5776]
JMP 0x00186e7c
LAB_00186efa:
MOV R15,qword ptr [RSP]
OR R15,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,0x3
JZ 0x00186f30
CMP EAX,-0x8
JZ 0x00186f23
CMP EAX,-0x1
JZ 0x00186f30
LAB_00186f17:
LEA RSI,[0x1a5796]
JMP 0x00186e7c
LAB_00186f23:
MOV RAX,qword ptr [R15 + 0x4]
SHR RAX,0x3e
CMP EAX,0x2
JZ 0x00186f17
LAB_00186f30:
MOV ESI,0x50
MOV RDI,R14
CALL 0x0010ee12
TEST RAX,RAX
JZ 0x00186e2f
MOV qword ptr [RSP],RAX
MOV ESI,0x18
MOV RDI,R14
CALL 0x0010ee12
TEST RAX,RAX
JZ 0x00186fed
MOV R9,qword ptr [RSP]
MOV qword ptr [R9 + 0x10],RBP
MOV qword ptr [R9 + 0x18],R12
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [R9 + 0x20],RSI
MOV qword ptr [R9 + 0x28],RBX
MOV R8,qword ptr [RSP + 0x8]
CMP R8D,-0x9
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x18]
JC 0x00186f95
INC dword ptr [RDI]
LAB_00186f95:
MOV qword ptr [R9 + 0x30],RDI
MOV qword ptr [R9 + 0x38],R8
CMP ECX,-0x9
JC 0x00186fa5
INC dword ptr [R15]
LAB_00186fa5:
MOV qword ptr [R9 + 0x40],R15
MOV qword ptr [R9 + 0x48],RCX
MOV RCX,qword ptr [RDX]
MOV qword ptr [RCX + 0x8],R9
MOV qword ptr [R9],RCX
MOV qword ptr [R9 + 0x8],RDX
MOV qword ptr [RDX],R9
MOV dword ptr [RAX],0x2
MOV qword ptr [RAX + 0x10],R9
MOV ECX,0x28
CMP EBX,-0x1
JZ 0x00186fdc
CMP EBX,-0x8
JNZ 0x0018701d
MOV ECX,0x10
LAB_00186fdc:
MOV RDX,qword ptr [RSI + RCX*0x1]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RSI + RCX*0x1],RAX
JMP 0x00186e35
LAB_00186fed:
MOV RBX,qword ptr [R14 + 0x18]
DEC qword ptr [RBX + 0x28]
MOV R14,qword ptr [RSP]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RBX + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [RBX + 0x30],RCX
MOV RSI,R14
CALL qword ptr [RBX + 0x10]
JMP 0x00186e2f
LAB_0018701d:
CALL 0x0010e090
|
int1 [16]
js_finrec_register(long param_1,long param_2,long param_3,int param_4,long *param_5)
{
long *plVar1;
long lVar2;
int *piVar3;
long lVar4;
int1 auVar5 [16];
int iVar6;
uint uVar7;
long *plVar8;
int4 *puVar9;
long lVar10;
long lVar11;
int iVar12;
ulong uVar13;
char *pcVar14;
ulong uVar15;
ulong uVar16;
int *piVar17;
uint local_60;
if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 0x3b)) &&
(plVar1 = *(long **)(param_2 + 0x30), plVar1 != (long *)0x0)) {
lVar11 = param_5[1];
if (param_4 < 3) {
lVar10 = 3;
uVar15 = 0;
uVar13 = 0;
}
else {
lVar10 = param_5[5];
uVar13 = param_5[4] & 0xffffffff00000000;
uVar15 = param_5[4] & 0xffffffff;
}
lVar2 = *param_5;
piVar3 = (int *)param_5[2];
lVar4 = param_5[3];
iVar12 = (int)lVar11;
if ((iVar12 == -1) ||
((iVar12 == -8 && ((uint)((ulong)*(int8 *)(lVar2 + 4) >> 0x3e) != 2)))) {
iVar6 = js_same_value(param_1,lVar2,lVar11,param_2,param_3);
uVar16 = 3;
if (iVar6 != 0) goto LAB_00186e35;
local_60 = (uint)lVar4;
if (local_60 != 3) {
iVar6 = js_same_value(param_1,lVar2,lVar11,piVar3,lVar4);
if (iVar6 != 0) {
pcVar14 = "held value cannot be the target";
goto LAB_00186e7c;
}
}
piVar17 = (int *)(uVar13 | uVar15);
uVar7 = (uint)lVar10;
if (uVar7 == 3) {
LAB_00186f30:
plVar8 = (long *)js_malloc(param_1,0x50);
if (plVar8 != (long *)0x0) {
puVar9 = (int4 *)js_malloc(param_1,0x18);
if (puVar9 != (int4 *)0x0) {
plVar8[2] = param_2;
plVar8[3] = param_3;
plVar8[4] = lVar2;
plVar8[5] = lVar11;
if (0xfffffff6 < local_60) {
*piVar3 = *piVar3 + 1;
}
plVar8[6] = (long)piVar3;
plVar8[7] = lVar4;
if (0xfffffff6 < uVar7) {
*piVar17 = *piVar17 + 1;
}
plVar8[8] = (long)piVar17;
plVar8[9] = lVar10;
lVar11 = *plVar1;
*(long **)(lVar11 + 8) = plVar8;
*plVar8 = lVar11;
plVar8[1] = (long)plVar1;
*plVar1 = (long)plVar8;
*puVar9 = 2;
*(long **)(puVar9 + 4) = plVar8;
lVar11 = 0x28;
if (iVar12 != -1) {
if (iVar12 != -8) {
/* WARNING: Subroutine does not return */
abort();
}
lVar11 = 0x10;
}
*(int8 *)(puVar9 + 2) = *(int8 *)(lVar2 + lVar11);
*(int4 **)(lVar2 + lVar11) = puVar9;
goto LAB_00186e35;
}
lVar11 = *(long *)(param_1 + 0x18);
*(long *)(lVar11 + 0x28) = *(long *)(lVar11 + 0x28) + -1;
lVar10 = (**(code **)(lVar11 + 0x20))(plVar8);
*(long *)(lVar11 + 0x30) = (*(long *)(lVar11 + 0x30) - lVar10) + -8;
(**(code **)(lVar11 + 0x10))(*(int8 *)(lVar11 + 0x40),plVar8);
}
goto LAB_00186e2f;
}
if (uVar7 == 0xfffffff8) {
if ((uint)((ulong)*(int8 *)(piVar17 + 1) >> 0x3e) != 2) goto LAB_00186f30;
}
else if (uVar7 == 0xffffffff) goto LAB_00186f30;
pcVar14 = "invalid unregister token";
}
else {
pcVar14 = "invalid target";
}
LAB_00186e7c:
JS_ThrowTypeError(param_1,pcVar14);
}
else {
JS_ThrowTypeErrorInvalidClass(param_1,0x3b);
}
LAB_00186e2f:
uVar16 = 6;
LAB_00186e35:
auVar5._8_8_ = 0;
auVar5._0_8_ = uVar16;
return auVar5 << 0x40;
}
|
|
63,765 |
metrics::UnixSocketExporter::start()
|
nickolajgrishuk[P]metricz-cpp/examples/../include/metrics_exporter.hpp
|
void start() override {
if (running_)
return;
server_.Get("/metrics", [this](const httplib::Request&, httplib::Response& res) {
res.set_content(registry_.serialize(), "text/plain");
});
running_ = true;
server_thread_ = std::thread([this]() {
#ifdef CPPHTTPLIB_USE_UNIX_DOMAIN_SOCKET
server_.set_mount_point("/");
if (!server_.bind_to_unix_domain_socket(socket_path_.c_str())) {
std::cerr << "Failed to bind to unix domain socket: " << socket_path_ << std::endl;
return;
}
server_.listen();
#endif
});
}
|
O2
|
cpp
|
metrics::UnixSocketExporter::start():
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpb $0x0, 0x30(%rdi)
jne 0x95b5
movq %rdi, %rbx
leaq 0x1f055(%rip), %rsi # 0x28586
leaq 0x8(%rsp), %r14
movq %rsp, %rdx
movq %r14, %rdi
callq 0x8220
leaq 0x38(%rbx), %rdi
leaq 0x28(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0xbef3(%rip), %rax # 0x1544c
movq %rax, 0x18(%rdx)
leaq 0xbeee(%rip), %rax # 0x15452
movq %rax, 0x10(%rdx)
movq %r14, %rsi
callq 0xab14
leaq 0x28(%rsp), %rdi
callq 0x249a4
leaq 0x8(%rsp), %rdi
callq 0x8ac8
movb $0x1, 0x30(%rbx)
movq %rsp, %rsi
movq %rbx, (%rsi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x153e4
addq $0x328, %rbx # imm = 0x328
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac02
movq %r14, %rdi
callq 0xa95a
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x249a4
leaq 0x8(%rsp), %rdi
callq 0x8ac8
movq %rbx, %rdi
callq 0x89d0
|
_ZN7metrics18UnixSocketExporter5startEv:
push r14
push rbx
sub rsp, 48h
cmp byte ptr [rdi+30h], 0
jnz loc_95B5
mov rbx, rdi
lea rsi, aMetrics_0; "/metrics"
lea r14, [rsp+58h+var_50]
mov rdx, rsp
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
lea rdi, [rbx+38h]
lea rdx, [rsp+58h+var_30]
and qword ptr [rdx+8], 0
mov [rdx], rbx
lea rax, _ZNSt17_Function_handlerIFvRKN7httplib7RequestERNS0_8ResponseEEZN7metrics18UnixSocketExporter5startEvEUlS3_S5_E_E9_M_invokeERKSt9_Any_dataS3_S5_; std::_Function_handler<void ()(httplib::Request const&,httplib::Response &),metrics::UnixSocketExporter::start(void)::{lambda(httplib::Request const&,httplib::Response &)#1}>::_M_invoke(std::_Any_data const&,httplib::Request const&,httplib::Response &)
mov [rdx+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRKN7httplib7RequestERNS0_8ResponseEEZN7metrics18UnixSocketExporter5startEvEUlS3_S5_E_E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation; std::_Function_handler<void ()(httplib::Request const&,httplib::Response &),metrics::UnixSocketExporter::start(void)::{lambda(httplib::Request const&,httplib::Response &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rdx+10h], rax
mov rsi, r14
call _ZN7httplib6Server3GetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvRKNS_7RequestERNS_8ResponseEEE; httplib::Server::Get(std::string const&,std::function<void ()(httplib::Request const&,httplib::Response &)>)
lea rdi, [rsp+58h+var_30]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+58h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov byte ptr [rbx+30h], 1
mov rsi, rsp
mov [rsi], rbx
lea r14, [rsp+58h+var_50]
mov rdi, r14
call _ZNSt6threadC2IZN7metrics18UnixSocketExporter5startEvEUlvE_JEvEEOT_DpOT0_
add rbx, 328h
mov rdi, rbx
mov rsi, r14
call _ZNSt6threadaSEOS_; std::thread::operator=(std::thread&&)
mov rdi, r14; this
call _ZNSt6threadD2Ev; std::thread::~thread()
loc_95B5:
add rsp, 48h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_20]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
void metrics::UnixSocketExporter::start(metrics::UnixSocketExporter *this)
{
int v1; // ecx
int v2; // r8d
int v3; // r9d
metrics::UnixSocketExporter *v4; // [rsp+0h] [rbp-58h] BYREF
_DWORD v5[6]; // [rsp+8h] [rbp-50h] BYREF
char v6; // [rsp+20h] [rbp-38h]
_QWORD v7[6]; // [rsp+28h] [rbp-30h] BYREF
if ( !*((_BYTE *)this + 48) )
{
std::string::basic_string(v5, "/metrics", &v4);
v7[1] = 0LL;
v7[0] = this;
v7[3] = std::_Function_handler<void ()(httplib::Request const&,httplib::Response &),metrics::UnixSocketExporter::start(void)::{lambda(httplib::Request const&,httplib::Response &)#1}>::_M_invoke;
v7[2] = std::_Function_handler<void ()(httplib::Request const&,httplib::Response &),metrics::UnixSocketExporter::start(void)::{lambda(httplib::Request const&,httplib::Response &)#1}>::_M_manager;
httplib::Server::Get(
(_DWORD)this + 56,
(unsigned int)v5,
(unsigned int)v7,
v1,
v2,
v3,
(char)v4,
v5[0],
v5[2],
v5[4],
v6);
std::_Function_base::~_Function_base((std::_Function_base *)v7);
std::string::~string(v5);
*((_BYTE *)this + 48) = 1;
v4 = this;
ZNSt6threadC2IZN7metrics18UnixSocketExporter5startEvEUlvE_JEvEEOT_DpOT0_(v5);
std::thread::operator=((char *)this + 808, v5);
std::thread::~thread((std::thread *)v5);
}
}
|
start:
PUSH R14
PUSH RBX
SUB RSP,0x48
CMP byte ptr [RDI + 0x30],0x0
JNZ 0x001095b5
MOV RBX,RDI
LEA RSI,[0x128586]
LEA R14,[RSP + 0x8]
MOV RDX,RSP
MOV RDI,R14
CALL 0x00108220
LEA RDI,[RBX + 0x38]
LEA RDX,[RSP + 0x28]
AND qword ptr [RDX + 0x8],0x0
MOV qword ptr [RDX],RBX
LEA RAX,[0x11544c]
MOV qword ptr [RDX + 0x18],RAX
LEA RAX,[0x115452]
MOV qword ptr [RDX + 0x10],RAX
LAB_00109568:
MOV RSI,R14
CALL 0x0010ab14
LAB_00109570:
LEA RDI,[RSP + 0x28]
CALL 0x001249a4
LEA RDI,[RSP + 0x8]
CALL 0x00108ac8
MOV byte ptr [RBX + 0x30],0x1
MOV RSI,RSP
MOV qword ptr [RSI],RBX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001153e4
ADD RBX,0x328
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010ac02
MOV RDI,R14
CALL 0x0010a95a
LAB_001095b5:
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* metrics::UnixSocketExporter::start() */
void __thiscall metrics::UnixSocketExporter::start(UnixSocketExporter *this)
{
UnixSocketExporter *local_58;
string local_50 [32];
UnixSocketExporter *local_30;
int8 local_28;
code *local_20;
code *local_18;
if (this[0x30] == (UnixSocketExporter)0x0) {
std::__cxx11::string::string(local_50,"/metrics",(allocator *)&local_58);
local_28 = 0;
local_18 = std::
_Function_handler<void(httplib::Request_const&,httplib::Response&),metrics::UnixSocketExporter::start()::{lambda(httplib::Request_const&,httplib::Response&)#1}>
::_M_invoke;
local_20 = std::
_Function_handler<void(httplib::Request_const&,httplib::Response&),metrics::UnixSocketExporter::start()::{lambda(httplib::Request_const&,httplib::Response&)#1}>
::_M_manager;
local_30 = this;
/* try { // try from 00109568 to 0010956f has its CatchHandler @ 001095bd */
httplib::Server::Get((Server *)(this + 0x38),local_50);
std::_Function_base::~_Function_base((_Function_base *)&local_30);
std::__cxx11::string::~string(local_50);
this[0x30] = (UnixSocketExporter)0x1;
local_58 = this;
std::thread::thread<metrics::UnixSocketExporter::start()::_lambda()_1_,,void>
((thread *)local_50,(_lambda___1_ *)&local_58);
std::thread::operator=((thread *)(this + 0x328),(thread *)local_50);
std::thread::~thread((thread *)local_50);
}
return;
}
|
|
63,766 |
google::protobuf::RepeatedField<int>::Resize(int, int const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
|
inline void RepeatedField<Element>::Resize(int new_size, const Element& value) {
GOOGLE_DCHECK_GE(new_size, 0);
if (new_size > current_size_) {
Reserve(new_size);
std::fill(&elements()[current_size_], &elements()[new_size], value);
}
current_size_ = new_size;
}
|
O0
|
c
|
google::protobuf::RepeatedField<int>::Resize(int, int const&):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x189a70
jmp 0x189b08
movl 0x7c(%rsp), %eax
movb $0x0, 0x37(%rsp)
cmpl $0x0, %eax
jl 0x189a80
jmp 0x189ad0
leaq 0x25a629(%rip), %rdx # 0x3e40b0
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x3, %esi
movl $0x283, %ecx # imm = 0x283
callq 0x19a670
movq 0x8(%rsp), %rdi
movb $0x1, 0x37(%rsp)
leaq 0x25a849(%rip), %rsi # 0x3e42fa
callq 0x199f30
movq %rax, 0x10(%rsp)
jmp 0x189abd
movq 0x10(%rsp), %rsi
leaq 0x23(%rsp), %rdi
callq 0x19a0e0
jmp 0x189ace
jmp 0x189ad0
testb $0x1, 0x37(%rsp)
jne 0x189ad9
jmp 0x189ae3
leaq 0x38(%rsp), %rdi
callq 0x19a6b0
jmp 0x189a65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x189afc
jmp 0x189b06
leaq 0x38(%rsp), %rdi
callq 0x19a6b0
jmp 0x189b75
movq 0x18(%rsp), %rcx
movl 0x7c(%rsp), %eax
cmpl (%rcx), %eax
jle 0x189b62
movq 0x18(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0x187a80
movq 0x18(%rsp), %rdi
callq 0x188940
movq 0x18(%rsp), %rdi
movslq (%rdi), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
callq 0x188940
movq (%rsp), %rdi
movq %rax, %rsi
movslq 0x7c(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0x8c3b0
movq 0x18(%rsp), %rax
movl 0x7c(%rsp), %ecx
movl %ecx, (%rax)
addq $0x88, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x90db0
nop
|
_ZN6google8protobuf13RepeatedFieldIlE6ResizeEiRKl:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_C], esi
mov [rsp+88h+var_18], rdx
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_70], rax
loc_189A65:
xor eax, eax
test al, 1
jnz short loc_189A70
jmp loc_189B08
loc_189A70:
mov eax, [rsp+88h+var_C]
mov [rsp+88h+var_51], 0
cmp eax, 0
jl short loc_189A80
jmp short loc_189AD0
loc_189A80:
lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+88h+var_50]
mov [rsp+88h+var_80], rdi
mov esi, 3
mov ecx, 283h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+88h+var_80]
mov [rsp+88h+var_51], 1
lea rsi, aCheckFailedNew_0; "CHECK failed: (new_size) >= (0): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+88h+var_78], rax
jmp short $+2
loc_189ABD:
mov rsi, [rsp+88h+var_78]
lea rdi, [rsp+88h+var_65]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_189ACE:
jmp short $+2
loc_189AD0:
test [rsp+88h+var_51], 1
jnz short loc_189AD9
jmp short loc_189AE3
loc_189AD9:
lea rdi, [rsp+88h+var_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_189AE3:
jmp short loc_189A65
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
test [rsp+arg_2F], 1
jnz short loc_189AFC
jmp short loc_189B06
loc_189AFC:
lea rdi, [rsp+arg_30]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_189B06:
jmp short loc_189B75
loc_189B08:
mov rcx, [rsp+88h+var_70]
mov eax, [rsp+88h+var_C]
cmp eax, [rcx]
jle short loc_189B62
mov rdi, [rsp+88h+var_70]
mov esi, [rsp+88h+var_C]
call _ZN6google8protobuf13RepeatedFieldIlE7ReserveEi; google::protobuf::RepeatedField<long>::Reserve(int)
mov rdi, [rsp+88h+var_70]
call _ZNK6google8protobuf13RepeatedFieldIlE8elementsEv; google::protobuf::RepeatedField<long>::elements(void)
mov rdi, [rsp+88h+var_70]
movsxd rcx, dword ptr [rdi]
shl rcx, 3
add rax, rcx
mov [rsp+88h+var_88], rax
call _ZNK6google8protobuf13RepeatedFieldIlE8elementsEv; google::protobuf::RepeatedField<long>::elements(void)
mov rdi, [rsp+88h+var_88]
mov rsi, rax
movsxd rax, [rsp+88h+var_C]
shl rax, 3
add rsi, rax
mov rdx, [rsp+88h+var_18]
call __ZSt4fillIPllEvT_S1_RKT0_; std::fill<long *,long>(long *,long *,long const&)
loc_189B62:
mov rax, [rsp+88h+var_70]
mov ecx, [rsp+88h+var_C]
mov [rax], ecx
add rsp, 88h
retn
loc_189B75:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
|
unsigned int * google::protobuf::RepeatedField<long>::Resize(unsigned int *a1, signed int a2, long long a3)
{
long long v3; // rax
unsigned int *result; // rax
long long v5; // [rsp+0h] [rbp-88h]
if ( a2 > (int)*a1 )
{
google::protobuf::RepeatedField<long>::Reserve(a1, (unsigned int)a2);
v5 = 8LL * (int)*a1 + google::protobuf::RepeatedField<long>::elements((long long)a1);
v3 = google::protobuf::RepeatedField<long>::elements((long long)a1);
std::fill<long *,long>(v5, 8LL * a2 + v3, a3);
}
result = a1;
*a1 = a2;
return result;
}
| |||
63,767 |
google::protobuf::RepeatedField<int>::Resize(int, int const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
|
inline void RepeatedField<Element>::Resize(int new_size, const Element& value) {
GOOGLE_DCHECK_GE(new_size, 0);
if (new_size > current_size_) {
Reserve(new_size);
std::fill(&elements()[current_size_], &elements()[new_size], value);
}
current_size_ = new_size;
}
|
O3
|
c
|
google::protobuf::RepeatedField<int>::Resize(int, int const&):
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
cmpl %esi, (%rdi)
jge 0x7f17b
movq %rdx, %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x7ebd0
movslq (%r14), %rdi
cmpl %ebx, %edi
je 0x7f17b
movslq %ebx, %rdx
subq %rdi, %rdx
addq 0x8(%r14), %rdi
movzbl (%r15), %esi
callq 0x2c970
movl %ebx, (%r14)
popq %rbx
popq %r14
popq %r15
retq
|
_ZN6google8protobuf13RepeatedFieldIbE6ResizeEiRKb:
push r15
push r14
push rbx
mov ebx, esi
mov r14, rdi
cmp [rdi], esi
jge short loc_7F17B
mov r15, rdx
mov rdi, r14
mov esi, ebx
call _ZN6google8protobuf13RepeatedFieldIbE7ReserveEi; google::protobuf::RepeatedField<bool>::Reserve(int)
movsxd rdi, dword ptr [r14]
cmp edi, ebx
jz short loc_7F17B
movsxd rdx, ebx
sub rdx, rdi
add rdi, [r14+8]
movzx esi, byte ptr [r15]
call _memset
loc_7F17B:
mov [r14], ebx
pop rbx
pop r14
pop r15
retn
|
long long google::protobuf::RepeatedField<bool>::Resize(int *a1, int a2, unsigned __int8 *a3)
{
long long result; // rax
long long v6; // rdi
if ( *a1 < a2 )
{
result = google::protobuf::RepeatedField<bool>::Reserve(a1, a2);
v6 = *a1;
if ( (_DWORD)v6 != a2 )
result = memset(*((_QWORD *)a1 + 1) + v6, *a3, a2 - v6);
}
*a1 = a2;
return result;
}
|
Resize:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV R14,RDI
CMP dword ptr [RDI],ESI
JGE 0x0017f17b
MOV R15,RDX
MOV RDI,R14
MOV ESI,EBX
CALL 0x0017ebd0
MOVSXD RDI,dword ptr [R14]
CMP EDI,EBX
JZ 0x0017f17b
MOVSXD RDX,EBX
SUB RDX,RDI
ADD RDI,qword ptr [R14 + 0x8]
MOVZX ESI,byte ptr [R15]
CALL 0x0012c970
LAB_0017f17b:
MOV dword ptr [R14],EBX
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::RepeatedField<bool>::Resize(int, bool const&) */
void __thiscall
google::protobuf::RepeatedField<bool>::Resize(RepeatedField<bool> *this,int param_1,bool *param_2)
{
int iVar1;
if (*(int *)this < param_1) {
Reserve(this,param_1);
iVar1 = *(int *)this;
if (iVar1 != param_1) {
memset((void *)((long)iVar1 + *(long *)(this + 8)),(uint)*param_2,(long)param_1 - (long)iVar1)
;
}
}
*(int *)this = param_1;
return;
}
|
|
63,768 |
translog_read_record_header
|
eloqsql/storage/maria/ma_loghandler.c
|
int translog_read_record_header(LSN lsn, TRANSLOG_HEADER_BUFFER *buff)
{
TRANSLOG_PAGE_SIZE_BUFF psize_buff;
uchar *page;
translog_size_t res, page_offset= LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE;
PAGECACHE_BLOCK_LINK *direct_link;
TRANSLOG_ADDRESS addr;
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_read_record_header");
DBUG_PRINT("enter", ("LSN: " LSN_FMT, LSN_IN_PARTS(lsn)));
DBUG_ASSERT(LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE != 0);
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
buff->lsn= lsn;
buff->groups_no= 0;
data.addr= &addr;
data.was_recovered= 0;
addr= lsn;
addr-= page_offset; /* offset decreasing */
res= (!(page= translog_get_page(&data, psize_buff.buffer, &direct_link))) ?
RECHEADER_READ_ERROR :
translog_read_record_header_from_buffer(page, page_offset, buff, 0);
translog_free_link(direct_link);
DBUG_RETURN(res);
}
|
O3
|
c
|
translog_read_record_header:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x2030, %rsp # imm = 0x2030
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq %rdi, (%rsi)
movl $0x0, 0x418(%rsi)
leaq -0x2028(%rbp), %rax
leaq -0x2038(%rbp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
movq %r14, %rcx
andq $-0x2000, %rcx # imm = 0xE000
movq %rcx, (%rax)
leaq -0x2018(%rbp), %rsi
leaq -0x2020(%rbp), %rdx
callq 0x34388
testq %rax, %rax
je 0x34d39
andl $0x1fff, %r14d # imm = 0x1FFF
movq %rax, %rdi
movl %r14d, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x35e7c
movl %eax, %ebx
jmp 0x34d3e
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq -0x2020(%rbp), %rdi
callq 0x35e4a
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0x34d67
movl %ebx, %eax
addq $0x2030, %rsp # imm = 0x2030
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29260
|
translog_read_record_header:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 2030h
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
mov [rsi], rdi
mov dword ptr [rsi+418h], 0
lea rax, [rbp+var_2028]
lea rdi, [rbp+var_2038]
mov [rdi], rax
mov byte ptr [rdi+8], 0
mov rcx, r14
and rcx, 0FFFFFFFFFFFFE000h
mov [rax], rcx
lea rsi, [rbp+var_2018]
lea rdx, [rbp+var_2020]
call translog_get_page
test rax, rax
jz short loc_34D39
and r14d, 1FFFh
mov rdi, rax
mov esi, r14d
mov rdx, rbx
xor ecx, ecx
call translog_read_record_header_from_buffer
mov ebx, eax
jmp short loc_34D3E
loc_34D39:
mov ebx, 0FFFFFFFFh
loc_34D3E:
mov rdi, [rbp+var_2020]
call translog_free_link
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_34D67
mov eax, ebx
add rsp, 2030h
pop rbx
pop r14
pop rbp
retn
loc_34D67:
call ___stack_chk_fail
|
long long translog_read_record_header(long long a1, long long a2)
{
long long page; // rax
unsigned int record_header_from_buffer; // ebx
unsigned long long *v5; // [rsp+8h] [rbp-2038h] BYREF
char v6; // [rsp+10h] [rbp-2030h]
unsigned long long v7; // [rsp+18h] [rbp-2028h] BYREF
long long v8; // [rsp+20h] [rbp-2020h] BYREF
_BYTE v9[8192]; // [rsp+28h] [rbp-2018h] BYREF
unsigned long long v10; // [rsp+2028h] [rbp-18h]
v10 = __readfsqword(0x28u);
*(_QWORD *)a2 = a1;
*(_DWORD *)(a2 + 1048) = 0;
v5 = &v7;
v6 = 0;
v7 = a1 & 0xFFFFFFFFFFFFE000LL;
page = translog_get_page((long long **)&v5, (long long)v9, &v8);
if ( page )
record_header_from_buffer = translog_read_record_header_from_buffer(page, a1 & 0x1FFF, a2, 0LL);
else
record_header_from_buffer = -1;
translog_free_link(v8);
return record_header_from_buffer;
}
|
translog_read_record_header:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x2030
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RSI],RDI
MOV dword ptr [RSI + 0x418],0x0
LEA RAX,[RBP + -0x2028]
LEA RDI,[RBP + -0x2038]
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
MOV RCX,R14
AND RCX,-0x2000
MOV qword ptr [RAX],RCX
LEA RSI,[RBP + -0x2018]
LEA RDX,[RBP + -0x2020]
CALL 0x00134388
TEST RAX,RAX
JZ 0x00134d39
AND R14D,0x1fff
MOV RDI,RAX
MOV ESI,R14D
MOV RDX,RBX
XOR ECX,ECX
CALL 0x00135e7c
MOV EBX,EAX
JMP 0x00134d3e
LAB_00134d39:
MOV EBX,0xffffffff
LAB_00134d3e:
MOV RDI,qword ptr [RBP + -0x2020]
CALL 0x00135e4a
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00134d67
MOV EAX,EBX
ADD RSP,0x2030
POP RBX
POP R14
POP RBP
RET
LAB_00134d67:
CALL 0x00129260
|
int4 translog_read_record_header(ulong param_1,ulong *param_2)
{
int4 uVar1;
long lVar2;
long in_FS_OFFSET;
ulong *local_2040;
int1 local_2038;
ulong local_2030;
int8 local_2028;
int1 local_2020 [8192];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
*param_2 = param_1;
*(int4 *)(param_2 + 0x83) = 0;
local_2040 = &local_2030;
local_2038 = 0;
local_2030 = param_1 & 0xffffffffffffe000;
lVar2 = translog_get_page(&local_2040,local_2020,&local_2028);
if (lVar2 == 0) {
uVar1 = 0xffffffff;
}
else {
uVar1 = translog_read_record_header_from_buffer(lVar2,(uint)param_1 & 0x1fff,param_2,0);
}
translog_free_link(local_2028);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
63,769 |
my_numchars_mb
|
eloqsql/strings/ctype-mb.c
|
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
}
|
O3
|
c
|
my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
jae 0x3a835
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
movl $0x1, %r13d
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovbl %r13d, %eax
cmovll %r13d, %eax
addq %rax, %r15
incq %r14
cmpq %rbx, %r15
jb 0x3a806
jmp 0x3a838
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_numchars_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp rsi, rdx
jnb short loc_3A835
mov rbx, rdx
mov r15, rsi
mov r12, rdi
xor r14d, r14d
mov r13d, 1
loc_3A806:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovb eax, r13d
cmovl eax, r13d
add r15, rax
inc r14
cmp r15, rbx
jb short loc_3A806
jmp short loc_3A838
loc_3A835:
xor r14d, r14d
loc_3A838:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v4; // r15
long long v5; // r14
long long v6; // rax
bool v7; // cc
if ( a2 >= a3 )
return 0LL;
v4 = a2;
v5 = 0LL;
do
{
v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
a3);
v7 = (int)v6 < 2;
if ( (unsigned int)v6 < 2 )
v6 = 1LL;
if ( v7 )
v6 = 1LL;
v4 += v6;
++v5;
}
while ( v4 < a3 );
return v5;
}
|
my_numchars_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP RSI,RDX
JNC 0x0013a835
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
XOR R14D,R14D
MOV R13D,0x1
LAB_0013a806:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVC EAX,R13D
CMOVL EAX,R13D
ADD R15,RAX
INC R14
CMP R15,RBX
JC 0x0013a806
JMP 0x0013a838
LAB_0013a835:
XOR R14D,R14D
LAB_0013a838:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_numchars_mb(long param_1,ulong param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
if (param_2 < param_3) {
lVar3 = 0;
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar2 = (ulong)uVar1;
if (uVar1 < 2) {
uVar2 = 1;
}
if ((int)uVar1 < 2) {
uVar2 = 1;
}
param_2 = param_2 + uVar2;
lVar3 = lVar3 + 1;
} while (param_2 < param_3);
}
else {
lVar3 = 0;
}
return lVar3;
}
|
|
63,770 |
pfs_drop_sp_v1
|
eloqsql/storage/perfschema/pfs.cc
|
void pfs_drop_sp_v1(uint sp_type,
const char* schema_name,
uint schema_name_length,
const char* object_name,
uint object_name_length)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return;
if (object_name_length > COL_OBJECT_NAME_SIZE)
object_name_length= COL_OBJECT_NAME_SIZE;
if (schema_name_length > COL_OBJECT_SCHEMA_SIZE)
schema_name_length= COL_OBJECT_SCHEMA_SIZE;
drop_program(pfs_thread,
sp_type_to_object_type(sp_type),
object_name, object_name_length,
schema_name, schema_name_length);
}
|
O0
|
cpp
|
pfs_drop_sp_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
callq 0x48dd0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4fc67
jmp 0x4fcab
cmpl $0x40, -0x24(%rbp)
jbe 0x4fc74
movl $0x40, -0x24(%rbp)
cmpl $0x40, -0x14(%rbp)
jbe 0x4fc81
movl $0x40, -0x14(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x4(%rbp), %edi
callq 0x4fa20
movq -0x38(%rbp), %rdi
movl %eax, %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %r8
movl -0x14(%rbp), %r9d
callq 0x386a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
pfs_drop_sp_v1:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4FC67
jmp short loc_4FCAB
loc_4FC67:
cmp [rbp+var_24], 40h ; '@'
jbe short loc_4FC74
mov [rbp+var_24], 40h ; '@'
loc_4FC74:
cmp [rbp+var_14], 40h ; '@'
jbe short loc_4FC81
mov [rbp+var_14], 40h ; '@'
loc_4FC81:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
mov edi, [rbp+var_4]; unsigned int
call _ZL22sp_type_to_object_typej; sp_type_to_object_type(uint)
mov rdi, [rbp+var_38]
mov esi, eax
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_10]
mov r9d, [rbp+var_14]
call _Z12drop_programP10PFS_thread16enum_object_typePKcjS3_j; drop_program(PFS_thread *,enum_object_type,char const*,uint,char const*,uint)
loc_4FCAB:
add rsp, 40h
pop rbp
retn
|
unsigned long long pfs_drop_sp_v1(int a1, long long a2, unsigned int a3, long long a4, unsigned int a5)
{
unsigned long long result; // rax
char v6; // al
PFS_thread *THR_PFS; // [rsp+10h] [rbp-30h]
THR_PFS = (PFS_thread *)my_thread_get_THR_PFS();
result = THR_PFS == 0LL;
if ( THR_PFS )
{
if ( a5 > 0x40 )
a5 = 64;
if ( a3 > 0x40 )
a3 = 64;
v6 = sp_type_to_object_type(a1);
return drop_program(THR_PFS, v6, a4, a5, a2, a3);
}
return result;
}
|
pfs_drop_sp_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
CALL 0x00148dd0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014fc67
JMP 0x0014fcab
LAB_0014fc67:
CMP dword ptr [RBP + -0x24],0x40
JBE 0x0014fc74
MOV dword ptr [RBP + -0x24],0x40
LAB_0014fc74:
CMP dword ptr [RBP + -0x14],0x40
JBE 0x0014fc81
MOV dword ptr [RBP + -0x14],0x40
LAB_0014fc81:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x0014fa20
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x10]
MOV R9D,dword ptr [RBP + -0x14]
CALL 0x001386a0
LAB_0014fcab:
ADD RSP,0x40
POP RBP
RET
|
void pfs_drop_sp_v1(uint param_1,int8 param_2,uint param_3,int8 param_4,uint param_5)
{
int4 uVar1;
long lVar2;
int4 local_2c;
int4 local_1c;
lVar2 = my_thread_get_THR_PFS();
if (lVar2 != 0) {
local_2c = param_5;
if (0x40 < param_5) {
local_2c = 0x40;
}
local_1c = param_3;
if (0x40 < param_3) {
local_1c = 0x40;
}
uVar1 = sp_type_to_object_type(param_1);
drop_program(lVar2,uVar1,param_4,local_2c,param_2,local_1c);
}
return;
}
|
|
63,771 |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&)
|
monkey531[P]llama/common/./json.hpp
|
inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x8a670
leaq 0xc12f2(%rip), %rcx # 0x14b90c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl 0x8(%r14), %eax
cvtsi2ss %eax, %xmm0
jmp 0x8a663
movq 0x8(%r14), %rax
testq %rax, %rax
js 0x8a64e
cvtsi2ss %rax, %xmm0
jmp 0x8a663
cvtsd2ss 0x8(%r14), %xmm0
jmp 0x8a663
cvtsi2ssq 0x8(%r14), %xmm0
jmp 0x8a663
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
movq %r14, %rdi
callq 0x578fc
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xc3795(%rip), %rsi # 0x14de29
leaq 0x10(%rsp), %rdi
callq 0x5ee3d
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x576a8
xorl %ebp, %ebp
leaq 0x11e291(%rip), %rsi # 0x1a8950
leaq -0xb632(%rip), %rdx # 0x7f094
movq %rbx, %rdi
callq 0x202e0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a6f4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x8a6f4
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8a701
movq %rbx, %rdi
callq 0x1f7e0
movq %r14, %rdi
callq 0x20380
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_8A621; jumptable 000000000008A621 default case
lea rcx, jpt_8A621
movsxd rax, ds:(jpt_8A621 - 14B90Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_8A623:
movsx eax, byte ptr [r14+8]; jumptable 000000000008A621 case 4
cvtsi2ss xmm0, eax
jmp short loc_8A663
loc_8A62E:
mov rax, [r14+8]; jumptable 000000000008A621 case 6
test rax, rax
js short loc_8A64E
cvtsi2ss xmm0, rax
jmp short loc_8A663
loc_8A63E:
cvtsd2ss xmm0, qword ptr [r14+8]; jumptable 000000000008A621 case 7
jmp short loc_8A663
loc_8A646:
cvtsi2ss xmm0, qword ptr [r14+8]; jumptable 000000000008A621 case 5
jmp short loc_8A663
loc_8A64E:
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
loc_8A663:
movss dword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_8A621:
mov edi, 20h ; ' '; jumptable 000000000008A621 default case
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8A6F4
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8A6F4
mov r14, rax
mov bpl, 1
loc_8A6F4:
test bpl, bpl
jz short loc_8A701
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8A701:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
float *a2)
{
long long result; // rax
float v3; // xmm0_4
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
result = (unsigned int)*a1 - 4;
switch ( *a1 )
{
case 4u:
result = (unsigned int)(char)a1[8];
v3 = (float)(int)result;
break;
case 5u:
v3 = (float)(int)*((_QWORD *)a1 + 1);
break;
case 6u:
result = *((_QWORD *)a1 + 1);
if ( result < 0 )
{
result = (*((_QWORD *)a1 + 1) >> 1) | *((_QWORD *)a1 + 1) & 1LL;
v3 = (float)(int)result + (float)(int)result;
}
else
{
v3 = (float)(int)result;
}
break;
case 7u:
v3 = *((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*a2 = v3;
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x0018a670
LEA RCX,[0x24b90c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOVSX EAX,byte ptr [R14 + 0x8]
CVTSI2SS XMM0,EAX
JMP 0x0018a663
caseD_6:
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JS 0x0018a64e
CVTSI2SS XMM0,RAX
JMP 0x0018a663
caseD_7:
CVTSD2SS XMM0,qword ptr [R14 + 0x8]
JMP 0x0018a663
caseD_5:
CVTSI2SS XMM0,qword ptr [R14 + 0x8]
JMP 0x0018a663
LAB_0018a64e:
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
OR RAX,RCX
CVTSI2SS XMM0,RAX
ADDSS XMM0,XMM0
LAB_0018a663:
MOVSS dword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
MOV RDI,R14
CALL 0x001578fc
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018a68d:
LEA RSI,[0x24de29]
LEA RDI,[RSP + 0x10]
CALL 0x0015ee3d
MOV BPL,0x1
LAB_0018a6a1:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001576a8
XOR EBP,EBP
LEA RSI,[0x2a8950]
LEA RDX,[0x17f094]
MOV RDI,RBX
CALL 0x001202e0
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,float *param_2)
{
ulong uVar1;
int8 uVar2;
float fVar3;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
fVar3 = (float)(int)(char)param_1[8];
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
fVar3 = (float)*(long *)(param_1 + 8);
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(ulong *)(param_1 + 8);
if ((long)uVar1 < 0) {
fVar3 = (float)uVar1;
}
else {
fVar3 = (float)(long)uVar1;
}
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
fVar3 = (float)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0018a68d to 0018a69d has its CatchHandler @ 0018a6ee */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0018a6a1 to 0018a6cd has its CatchHandler @ 0018a6ce */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = fVar3;
return;
}
|
|
63,772 |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&)
|
monkey531[P]llama/common/./json.hpp
|
inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x88576
leaq 0xbd38c(%rip), %rcx # 0x1458ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl 0x8(%r14), %eax
cvtsi2ss %eax, %xmm0
jmp 0x88569
movq 0x8(%r14), %rax
testq %rax, %rax
js 0x88554
cvtsi2ss %rax, %xmm0
jmp 0x88569
cvtsd2ss 0x8(%r14), %xmm0
jmp 0x88569
cvtsi2ssq 0x8(%r14), %xmm0
jmp 0x88569
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
movq %r14, %rdi
callq 0x568fa
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xbf7e4(%rip), %rsi # 0x147d7e
leaq 0x10(%rsp), %rdi
callq 0x5da83
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x566a6
xorl %ebp, %ebp
leaq 0x11a3eb(%rip), %rsi # 0x1a29b0
leaq -0xb60e(%rip), %rdx # 0x7cfbe
movq %rbx, %rdi
callq 0x202e0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x885f2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1fae0
testb %bpl, %bpl
jne 0x885fc
jmp 0x88604
movq %rax, %r14
movq %rbx, %rdi
callq 0x1f7e0
movq %r14, %rdi
callq 0x20380
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_88527; jumptable 0000000000088527 default case
lea rcx, jpt_88527
movsxd rax, ds:(jpt_88527 - 1458ACh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_88529:
movsx eax, byte ptr [r14+8]; jumptable 0000000000088527 case 4
cvtsi2ss xmm0, eax
jmp short loc_88569
loc_88534:
mov rax, [r14+8]; jumptable 0000000000088527 case 6
test rax, rax
js short loc_88554
cvtsi2ss xmm0, rax
jmp short loc_88569
loc_88544:
cvtsd2ss xmm0, qword ptr [r14+8]; jumptable 0000000000088527 case 7
jmp short loc_88569
loc_8854C:
cvtsi2ss xmm0, qword ptr [r14+8]; jumptable 0000000000088527 case 5
jmp short loc_88569
loc_88554:
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
loc_88569:
movss dword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_88527:
mov edi, 20h ; ' '; jumptable 0000000000088527 default case
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_885F2
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_885F2:
test bpl, bpl
jnz short loc_885FC
jmp short loc_88604
mov r14, rax
loc_885FC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_88604:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
float *a2)
{
long long result; // rax
float v3; // xmm0_4
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
result = (unsigned int)*a1 - 4;
switch ( *a1 )
{
case 4u:
result = (unsigned int)(char)a1[8];
v3 = (float)(int)result;
break;
case 5u:
v3 = (float)(int)*((_QWORD *)a1 + 1);
break;
case 6u:
result = *((_QWORD *)a1 + 1);
if ( result < 0 )
{
result = (*((_QWORD *)a1 + 1) >> 1) | *((_QWORD *)a1 + 1) & 1LL;
v3 = (float)(int)result + (float)(int)result;
}
else
{
v3 = (float)(int)result;
}
break;
case 7u:
v3 = *((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*a2 = v3;
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x00188576
LEA RCX,[0x2458ac]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOVSX EAX,byte ptr [R14 + 0x8]
CVTSI2SS XMM0,EAX
JMP 0x00188569
caseD_6:
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JS 0x00188554
CVTSI2SS XMM0,RAX
JMP 0x00188569
caseD_7:
CVTSD2SS XMM0,qword ptr [R14 + 0x8]
JMP 0x00188569
caseD_5:
CVTSI2SS XMM0,qword ptr [R14 + 0x8]
JMP 0x00188569
LAB_00188554:
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
OR RAX,RCX
CVTSI2SS XMM0,RAX
ADDSS XMM0,XMM0
LAB_00188569:
MOVSS dword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
MOV RDI,R14
CALL 0x001568fa
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00188593:
LEA RSI,[0x247d7e]
LEA RDI,[RSP + 0x10]
CALL 0x0015da83
MOV BPL,0x1
LAB_001885a7:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001566a6
XOR EBP,EBP
LEA RSI,[0x2a29b0]
LEA RDX,[0x17cfbe]
MOV RDI,RBX
CALL 0x001202e0
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,float *param_2)
{
ulong uVar1;
int8 uVar2;
float fVar3;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
fVar3 = (float)(int)(char)param_1[8];
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
fVar3 = (float)*(long *)(param_1 + 8);
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(ulong *)(param_1 + 8);
if ((long)uVar1 < 0) {
fVar3 = (float)uVar1;
}
else {
fVar3 = (float)(long)uVar1;
}
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
fVar3 = (float)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00188593 to 001885a3 has its CatchHandler @ 001885f9 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001885a7 to 001885d3 has its CatchHandler @ 001885d4 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = fVar3;
return;
}
|
|
63,773 |
nglog::GetStackTrace[abi:cxx11]()
|
ng-log[P]ng-log/src/utilities.cc
|
std::string GetStackTrace() {
std::string stacktrace;
DumpStackTrace(1, DebugWriteToString, &stacktrace);
return stacktrace;
}
|
O1
|
cpp
|
nglog::GetStackTrace[abi:cxx11]():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x13f(%rip), %rdi # 0x224c2
movq %rbx, %rsi
callq 0x223b2
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x223aa
movq (%r15), %rsi
incq %rsi
callq 0x949c
movq %r14, %rdi
callq 0x7950
|
_ZN5nglog13GetStackTraceB5cxx11Ev:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
lea rdi, _ZN5nglogL18DebugWriteToStringEPKcPv; this
mov rsi, rbx; int
call _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_; nglog::DumpStackTrace(int,void (*)(char const*,void *),void *)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_223AA
mov rsi, [r15]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_223AA:
mov rdi, r14
call __Unwind_Resume
|
long long nglog::GetStackTrace[abi:cxx11](long long a1, long long a2, void (*a3)(const char *, void *), void *a4)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
nglog::DumpStackTrace((nglog *)nglog::DebugWriteToString, a1, a3, a4);
return a1;
}
|
GetStackTrace[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0012237c:
LEA RDI,[0x1224c2]
MOV RSI,RBX
CALL 0x001223b2
LAB_0012238b:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* nglog::GetStackTrace[abi:cxx11]() */
void nglog::GetStackTrace_abi_cxx11_(void)
{
void *in_RDX;
_func_void_char_ptr_void_ptr *in_RDI;
*(_func_void_char_ptr_void_ptr **)in_RDI = in_RDI + 0x10;
*(int8 *)(in_RDI + 8) = 0;
in_RDI[0x10] = (code)0x0;
/* try { // try from 0012237c to 0012238a has its CatchHandler @ 00122394 */
DumpStackTrace(0x1224c2,in_RDI,in_RDX);
return;
}
|
|
63,774 |
google::protobuf::internal::ExtensionSet::RegisterMessageExtension(google::protobuf::MessageLite const*, int, unsigned char, bool, bool, google::protobuf::MessageLite const*, char const* (*)(char const*, google::protobuf::internal::ParseContext*))
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
|
void ExtensionSet::RegisterMessageExtension(const MessageLite* extendee,
int number, FieldType type,
bool is_repeated, bool is_packed,
const MessageLite* prototype,
LazyEagerVerifyFnType verify_func) {
GOOGLE_CHECK(type == WireFormatLite::TYPE_MESSAGE ||
type == WireFormatLite::TYPE_GROUP);
ExtensionInfo info(extendee, number, type, is_repeated, is_packed,
verify_func);
info.message_info = {prototype};
Register(info);
}
|
O3
|
cpp
|
google::protobuf::internal::ExtensionSet::RegisterMessageExtension(google::protobuf::MessageLite const*, int, unsigned char, bool, bool, google::protobuf::MessageLite const*, char const* (*)(char const*, google::protobuf::internal::ParseContext*)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
movl %r15d, %eax
andb $-0x2, %al
cmpb $0xa, %al
je 0xb3060
leaq 0xb8048(%rip), %rdx # 0x16b06c
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
movl $0xb1, %ecx
callq 0x857c2
leaq 0xb8173(%rip), %rsi # 0x16b1b2
leaq 0x10(%rsp), %rdi
callq 0x852c0
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x8539a
leaq 0x10(%rsp), %rdi
callq 0x857e0
movq 0x80(%rsp), %rax
leaq 0x10(%rsp), %rdi
movq %r13, (%rdi)
movl %r12d, 0x8(%rdi)
movb %r15b, 0xc(%rdi)
movb %r14b, 0xd(%rdi)
movb %bpl, 0xe(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rbx, 0x10(%rdi)
callq 0xb2ba1
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb30a5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x857e0
movq %rbx, %rdi
callq 0x2e220
|
_ZN6google8protobuf8internal12ExtensionSet24RegisterMessageExtensionEPKNS0_11MessageLiteEihbbS5_PFPKcS7_PNS1_12ParseContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, r9
mov ebp, r8d
mov r14d, ecx
mov r15d, edx
mov r12d, esi
mov r13, rdi
mov eax, r15d
and al, 0FEh
cmp al, 0Ah
jz short loc_B3060
lea rdx, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+78h+var_68]
mov esi, 3
mov ecx, 0B1h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedTyp_3; "CHECK failed: type == WireFormatLite::T"...
lea rdi, [rsp+78h+var_68]
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+78h+var_69]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+78h+var_68]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_B3060:
mov rax, [rsp+78h+arg_0]
lea rdi, [rsp+78h+var_68]
mov [rdi], r13
mov [rdi+8], r12d
mov [rdi+0Ch], r15b
mov [rdi+0Dh], r14b
mov [rdi+0Eh], bpl
xorps xmm0, xmm0
movups xmmword ptr [rdi+18h], xmm0
mov [rdi+28h], rax
mov [rdi+10h], rbx
call _ZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoE; google::protobuf::internal::`anonymous namespace'::Register(google::protobuf::internal::ExtensionInfo const&)
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_B30A5:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
|
void google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
google::protobuf::internal::ExtensionSet *this,
const google::protobuf::MessageLite *a2,
char a3,
char a4,
char a5,
long long a6,
const google::protobuf::MessageLite *a7)
{
google::protobuf::internal::LogMessage *v11; // rax
char v12; // [rsp+Fh] [rbp-69h] BYREF
google::protobuf::internal::ExtensionSet *v13; // [rsp+10h] [rbp-68h] BYREF
int v14; // [rsp+18h] [rbp-60h]
char v15; // [rsp+1Ch] [rbp-5Ch]
char v16; // [rsp+1Dh] [rbp-5Bh]
char v17; // [rsp+1Eh] [rbp-5Ah]
long long v18; // [rsp+20h] [rbp-58h]
__int128 v19; // [rsp+28h] [rbp-50h]
const google::protobuf::MessageLite *v20; // [rsp+38h] [rbp-40h]
if ( (a3 & 0xFE) != 0xA )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)&v13,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc",
177);
v11 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)&v13,
(long long)"CHECK failed: type == WireFormatLite::TYPE_MESSAGE || typ"
"e == WireFormatLite::TYPE_GROUP: ");
google::protobuf::internal::LogFinisher::operator=((long long)&v12, v11);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v13);
}
v13 = this;
v14 = (int)a2;
v15 = a3;
v16 = a4;
v17 = a5;
v19 = 0LL;
v20 = a7;
v18 = a6;
google::protobuf::internal::`anonymous namespace'::Register((long long)&v13);
}
|
RegisterMessageExtension:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,R9
MOV EBP,R8D
MOV R14D,ECX
MOV R15D,EDX
MOV R12D,ESI
MOV R13,RDI
MOV EAX,R15D
AND AL,0xfe
CMP AL,0xa
JZ 0x001b3060
LEA RDX,[0x26b06c]
LEA RDI,[RSP + 0x10]
MOV ESI,0x3
MOV ECX,0xb1
CALL 0x001857c2
LAB_001b3038:
LEA RSI,[0x26b1b2]
LEA RDI,[RSP + 0x10]
CALL 0x001852c0
LAB_001b3049:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x0018539a
LAB_001b3056:
LEA RDI,[RSP + 0x10]
CALL 0x001857e0
LAB_001b3060:
MOV RAX,qword ptr [RSP + 0x80]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R13
MOV dword ptr [RDI + 0x8],R12D
MOV byte ptr [RDI + 0xc],R15B
MOV byte ptr [RDI + 0xd],R14B
MOV byte ptr [RDI + 0xe],BPL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV qword ptr [RDI + 0x28],RAX
MOV qword ptr [RDI + 0x10],RBX
CALL 0x001b2ba1
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::internal::ExtensionSet::RegisterMessageExtension(google::protobuf::MessageLite
const*, int, unsigned char, bool, bool, google::protobuf::MessageLite const*, char const*
(*)(char const*, google::protobuf::internal::ParseContext*)) */
void google::protobuf::internal::ExtensionSet::RegisterMessageExtension
(MessageLite *param_1,int param_2,uchar param_3,bool param_4,bool param_5,
MessageLite *param_6,_func_char_ptr_char_ptr_ParseContext_ptr *param_7)
{
LogMessage *pLVar1;
LogFinisher local_69;
MessageLite *local_68;
int local_60;
uchar local_5c;
int1 local_5b;
int1 local_5a;
MessageLite *local_58;
int8 local_50;
int8 uStack_48;
_func_char_ptr_char_ptr_ParseContext_ptr *local_40;
if ((param_3 & 0xfe) != 10) {
LogMessage::LogMessage
((LogMessage *)&local_68,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc"
,0xb1);
/* try { // try from 001b3038 to 001b3048 has its CatchHandler @ 001b30a5 */
pLVar1 = (LogMessage *)
LogMessage::operator<<
((LogMessage *)&local_68,
"CHECK failed: type == WireFormatLite::TYPE_MESSAGE || type == WireFormatLite::TYPE_GROUP: "
);
/* try { // try from 001b3049 to 001b3055 has its CatchHandler @ 001b30a3 */
LogFinisher::operator=(&local_69,pLVar1);
LogMessage::~LogMessage((LogMessage *)&local_68);
}
local_50 = 0;
uStack_48 = 0;
local_40 = param_7;
local_68 = param_1;
local_60 = param_2;
local_5c = param_3;
local_5b = param_4;
local_5a = param_5;
local_58 = param_6;
(anonymous_namespace)::Register((ExtensionInfo *)&local_68);
return;
}
|
|
63,775 |
mi_keydef_write
|
eloqsql/storage/myisam/mi_open.c
|
uint mi_keydef_write(File file, MI_KEYDEF *keydef)
{
uchar buff[MI_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++ = (uchar) keydef->keysegs;
*ptr++ = keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr +=2;
mi_int2store(ptr,keydef->block_length); ptr +=2;
mi_int2store(ptr,keydef->keylength); ptr +=2;
mi_int2store(ptr,keydef->minlength); ptr +=2;
mi_int2store(ptr,keydef->maxlength); ptr +=2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
|
O0
|
c
|
mi_keydef_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
leaq -0x14(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb 0x8(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movb 0xc(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x2c(%rbp)
movb -0x2c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xe(%rax), %eax
movl %eax, -0x30(%rbp)
movb -0x30(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2f(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x34(%rbp)
movb -0x34(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x33(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x38(%rbp)
movb -0x38(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x37(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x16(%rax), %eax
movl %eax, -0x3c(%rbp)
movb -0x3c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x3b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %r8
subq %rcx, %r8
leaq 0x9a1ba(%rip), %rdi # 0x153b7f
movl $0x476, %esi # imm = 0x476
movl $0x4, %r9d
callq 0xb8b00
testq %rax, %rax
setne %al
movzbl %al, %eax
movl %eax, -0x40(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb99fc
movl -0x40(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
mi_keydef_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], edi
mov [rbp+var_20], rsi
lea rcx, [rbp+var_14]
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov dl, [rax+8]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
mov dl, [rax+0Ch]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_2C], eax
mov dl, byte ptr [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_2C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Eh]
mov [rbp+var_30], eax
mov dl, byte ptr [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_30+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
mov [rbp+var_34], eax
mov dl, byte ptr [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_34+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+14h]
mov [rbp+var_38], eax
mov dl, byte ptr [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_38+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+16h]
mov [rbp+var_3C], eax
mov dl, byte ptr [rbp+var_3C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_3C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov edx, [rbp+var_18]
mov r8, [rbp+var_28]
sub r8, rcx
lea rdi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 476h
mov r9d, 4
call inline_mysql_file_write_2
test rax, rax
setnz al
movzx eax, al
mov [rbp+var_40], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_B99FC
mov eax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_B99FC:
call ___stack_chk_fail
|
_BOOL8 mi_keydef_write(unsigned int a1, long long a2)
{
__int16 v2; // kr00_2
__int16 v3; // kr02_2
__int16 v4; // kr04_2
__int16 v5; // kr06_2
__int16 v6; // kr08_2
_BYTE v8[12]; // [rsp+2Ch] [rbp-14h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 8);
v8[1] = *(_BYTE *)(a2 + 12);
v2 = *(_WORD *)(a2 + 10);
v8[2] = HIBYTE(v2);
v8[3] = v2;
v3 = *(_WORD *)(a2 + 14);
v8[4] = HIBYTE(v3);
v8[5] = v3;
v4 = *(_WORD *)(a2 + 18);
v8[6] = HIBYTE(v4);
v8[7] = v4;
v5 = *(_WORD *)(a2 + 20);
v8[8] = HIBYTE(v5);
v8[9] = v5;
v6 = *(_WORD *)(a2 + 22);
v8[10] = HIBYTE(v6);
v8[11] = v6;
return inline_mysql_file_write_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x476u,
a1,
(long long)v8,
12LL,
4LL) != 0;
}
|
mi_keydef_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x20],RSI
LEA RCX,[RBP + -0x14]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x2c],EAX
MOV DL,byte ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xe]
MOV dword ptr [RBP + -0x30],EAX
MOV DL,byte ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2f]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x34],EAX
MOV DL,byte ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x33]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x38],EAX
MOV DL,byte ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x37]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x16]
MOV dword ptr [RBP + -0x3c],EAX
MOV DL,byte ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x3b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV EDX,dword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
SUB R8,RCX
LEA RDI,[0x253b7f]
MOV ESI,0x476
MOV R9D,0x4
CALL 0x001b8b00
TEST RAX,RAX
SETNZ AL
MOVZX EAX,AL
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001b99fc
MOV EAX,dword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
LAB_001b99fc:
CALL 0x0012a270
|
bool mi_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_44;
int1 uStack_43;
int1 local_40;
int1 uStack_3f;
int1 local_3c;
int1 uStack_3b;
int1 local_38;
int1 uStack_37;
int1 local_34;
int1 uStack_33;
int1 local_1c;
int1 local_1b;
int1 local_1a;
int1 local_19;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1c = *(int1 *)(param_2 + 8);
local_1b = *(int1 *)(param_2 + 0xc);
local_34 = (int1)*(int2 *)(param_2 + 10);
local_19 = local_34;
uStack_33 = (int1)((ushort)*(int2 *)(param_2 + 10) >> 8);
local_1a = uStack_33;
local_38 = (int1)*(int2 *)(param_2 + 0xe);
local_17 = local_38;
uStack_37 = (int1)((ushort)*(int2 *)(param_2 + 0xe) >> 8);
local_18 = uStack_37;
local_3c = (int1)*(int2 *)(param_2 + 0x12);
local_15 = local_3c;
uStack_3b = (int1)((ushort)*(int2 *)(param_2 + 0x12) >> 8);
local_16 = uStack_3b;
local_40 = (int1)*(int2 *)(param_2 + 0x14);
local_13 = local_40;
uStack_3f = (int1)((ushort)*(int2 *)(param_2 + 0x14) >> 8);
local_14 = uStack_3f;
local_44 = (int1)*(int2 *)(param_2 + 0x16);
local_11 = local_44;
uStack_43 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8);
local_12 = uStack_43;
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x476,
param_1,&local_1c,(long)&local_10 - (long)&local_1c,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return lVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
63,776 |
js_string_fromCharCode
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_fromCharCode(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int i;
StringBuffer b_s, *b = &b_s;
// shortcut for single argument common case
if (argc == 1 && JS_VALUE_GET_TAG(argv[0]) == JS_TAG_INT) {
uint16_t c16 = JS_VALUE_GET_INT(argv[0]);
return js_new_string_char(ctx, c16);
}
string_buffer_init(ctx, b, argc);
for(i = 0; i < argc; i++) {
int32_t c;
if (JS_ToInt32(ctx, &c, argv[i]) || string_buffer_putc16(b, c & 0xffff)) {
string_buffer_free(b);
return JS_EXCEPTION;
}
}
return string_buffer_end(b);
}
|
O0
|
c
|
js_string_fromCharCode:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x1, 0x4c(%rsp)
jne 0xd26e5
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, %eax
jne 0xd26e5
movq 0x40(%rsp), %rax
movl (%rax), %eax
movw %ax, 0xe(%rsp)
movq 0x50(%rsp), %rdi
movzwl 0xe(%rsp), %esi
callq 0x60450
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0xd278f
movq 0x50(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x4c(%rsp), %edx
callq 0x50640
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0xd277b
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x8(%rsp), %rsi
callq 0x38f20
cmpl $0x0, %eax
jne 0xd274f
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
andl $0xffff, %esi # imm = 0xFFFF
callq 0x7e690
cmpl $0x0, %eax
je 0xd276c
movq 0x10(%rsp), %rdi
callq 0x524b0
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0xd278f
jmp 0xd276e
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0xd2700
movq 0x10(%rsp), %rdi
callq 0x4db00
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nop
|
js_string_fromCharCode:
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
lea rax, [rsp+78h+var_60]
mov [rsp+78h+var_68], rax
cmp [rsp+78h+var_2C], 1
jnz short loc_D26E5
mov rax, [rsp+78h+var_38]
mov rax, [rax+8]
cmp eax, 0
jnz short loc_D26E5
mov rax, [rsp+78h+var_38]
mov eax, [rax]
mov [rsp+78h+var_6A], ax
mov rdi, [rsp+78h+var_28]
movzx esi, [rsp+78h+var_6A]
call js_new_string_char
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp loc_D278F
loc_D26E5:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_68]
mov edx, [rsp+78h+var_2C]
call string_buffer_init
mov [rsp+78h+var_3C], 0
loc_D2700:
mov eax, [rsp+78h+var_3C]
cmp eax, [rsp+78h+var_2C]
jge short loc_D277B
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
movsxd rcx, [rsp+78h+var_3C]
shl rcx, 4
add rax, rcx
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+78h+var_70]
call JS_ToInt32
cmp eax, 0
jnz short loc_D274F
mov rdi, [rsp+78h+var_68]
mov esi, [rsp+78h+var_70]
and esi, 0FFFFh
call string_buffer_putc16
cmp eax, 0
jz short loc_D276C
loc_D274F:
mov rdi, [rsp+78h+var_68]
call string_buffer_free
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp short loc_D278F
loc_D276C:
jmp short $+2
loc_D276E:
mov eax, [rsp+78h+var_3C]
add eax, 1
mov [rsp+78h+var_3C], eax
jmp short loc_D2700
loc_D277B:
mov rdi, [rsp+78h+var_68]
call string_buffer_end
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
loc_D278F:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
|
long long js_string_fromCharCode(long long a1, long long a2, long long a3, signed int a4, long long a5)
{
long long v5; // rdx
long long v6; // rdx
int v8; // [rsp+8h] [rbp-70h] BYREF
long long *v9; // [rsp+10h] [rbp-68h]
char v10; // [rsp+18h] [rbp-60h] BYREF
signed int i; // [rsp+3Ch] [rbp-3Ch]
long long v12; // [rsp+40h] [rbp-38h]
signed int v13; // [rsp+4Ch] [rbp-2Ch]
long long v14; // [rsp+50h] [rbp-28h]
long long v15; // [rsp+58h] [rbp-20h]
long long v16; // [rsp+60h] [rbp-18h]
long long v17; // [rsp+68h] [rbp-10h]
long long v18; // [rsp+70h] [rbp-8h]
v15 = a2;
v16 = a3;
v14 = a1;
v13 = a4;
v12 = a5;
v9 = (long long *)&v10;
if ( a4 != 1 || (unsigned int)*(_QWORD *)(v12 + 8) )
{
string_buffer_init(v14, (long long)v9, v13);
for ( i = 0; i < v13; ++i )
{
if ( (unsigned int)JS_ToInt32(v14, (long long)&v8, *(_DWORD **)(16LL * i + v12), *(_QWORD *)(16LL * i + v12 + 8))
|| (unsigned int)string_buffer_putc16((long long)v9, (unsigned __int16)v8) )
{
string_buffer_free(v9);
LODWORD(v17) = 0;
v18 = 6LL;
return v17;
}
}
v17 = string_buffer_end((long long)v9);
v18 = v6;
}
else
{
v17 = js_new_string_char(v14, *(_DWORD *)v12);
v18 = v5;
}
return v17;
}
|
js_string_fromCharCode:
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
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
CMP dword ptr [RSP + 0x4c],0x1
JNZ 0x001d26e5
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x8]
CMP EAX,0x0
JNZ 0x001d26e5
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
MOV word ptr [RSP + 0xe],AX
MOV RDI,qword ptr [RSP + 0x50]
MOVZX ESI,word ptr [RSP + 0xe]
CALL 0x00160450
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x001d278f
LAB_001d26e5:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x4c]
CALL 0x00150640
MOV dword ptr [RSP + 0x3c],0x0
LAB_001d2700:
MOV EAX,dword ptr [RSP + 0x3c]
CMP EAX,dword ptr [RSP + 0x4c]
JGE 0x001d277b
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x00138f20
CMP EAX,0x0
JNZ 0x001d274f
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x8]
AND ESI,0xffff
CALL 0x0017e690
CMP EAX,0x0
JZ 0x001d276c
LAB_001d274f:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001524b0
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x001d278f
LAB_001d276c:
JMP 0x001d276e
LAB_001d276e:
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x001d2700
LAB_001d277b:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0014db00
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
LAB_001d278f:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
js_string_fromCharCode
(int8 param_1,int8 param_2,int8 param_3,int param_4,int4 *param_5)
{
int iVar1;
int1 auVar2 [16];
uint local_70;
int2 local_6a;
int1 *local_68;
int1 local_60 [36];
int local_3c;
int4 *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_68 = local_60;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
if ((param_4 == 1) && ((int)*(int8 *)(param_5 + 2) == 0)) {
local_6a = (int2)*param_5;
auVar2 = js_new_string_char(param_1,local_6a);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
else {
string_buffer_init(param_1,local_68,param_4);
for (local_3c = 0; local_3c < local_2c; local_3c = local_3c + 1) {
iVar1 = JS_ToInt32(local_28,&local_70,*(int8 *)(local_38 + (long)local_3c * 4),
*(int8 *)((long)(local_38 + (long)local_3c * 4) + 8));
if (iVar1 != 0) {
LAB_001d274f:
string_buffer_free(local_68);
local_10 = 0;
local_8 = 6;
goto LAB_001d278f;
}
iVar1 = string_buffer_putc16(local_68,local_70 & 0xffff);
if (iVar1 != 0) goto LAB_001d274f;
}
auVar2 = string_buffer_end(local_68);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
LAB_001d278f:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
63,777 |
nglog::TruncateStdoutStderr()
|
ng-log[P]ng-log/src/logging.cc
|
static uint32 MaxLogSize() {
return (FLAGS_max_log_size > 0 && FLAGS_max_log_size < 4096
? FLAGS_max_log_size
: 1);
}
|
O2
|
cpp
|
nglog::TruncateStdoutStderr():
pushq %rbx
leaq 0x23cd0(%rip), %rax # 0x31bc4
movl (%rax), %eax
leal -0x1(%rax), %ecx
shll $0x14, %eax
cmpl $0xfff, %ecx # imm = 0xFFF
movl $0x100000, %ebx # imm = 0x100000
cmovbl %eax, %ebx
leaq 0x12bbe(%rip), %rdi # 0x20acf
movl $0x100000, %edx # imm = 0x100000
movq %rbx, %rsi
callq 0xd967
leaq 0x12bba(%rip), %rdi # 0x20adf
movl $0x100000, %edx # imm = 0x100000
movq %rbx, %rsi
popq %rbx
jmp 0xd967
|
_ZN5nglog20TruncateStdoutStderrEv:
push rbx
lea rax, _ZN3fLU18FLAGS_max_log_sizeE; fLU::FLAGS_max_log_size
mov eax, [rax]
lea ecx, [rax-1]; unsigned __int64
shl eax, 14h
cmp ecx, 0FFFh
mov ebx, 100000h
cmovb ebx, eax
lea rdi, aProcSelfFd1; "/proc/self/fd/1"
mov edx, 100000h; unsigned __int64
mov rsi, rbx; char *
call _ZN5nglog15TruncateLogFileEPKcmm; nglog::TruncateLogFile(char const*,ulong,ulong)
lea rdi, aProcSelfFd2; "/proc/self/fd/2"
mov edx, 100000h; unsigned __int64
mov rsi, rbx; char *
pop rbx
jmp _ZN5nglog15TruncateLogFileEPKcmm; nglog::TruncateLogFile(char const*,ulong,ulong)
|
long long nglog::TruncateStdoutStderr(nglog *this)
{
long long v1; // rbx
v1 = 0x100000LL;
if ( (unsigned int)(fLU::FLAGS_max_log_size - 1) < 0xFFF )
v1 = (unsigned int)(fLU::FLAGS_max_log_size << 20);
nglog::TruncateLogFile((nglog *)"/proc/self/fd/1", (const char *)v1, 0x100000LL);
return nglog::TruncateLogFile((nglog *)"/proc/self/fd/2", (const char *)v1, 0x100000LL);
}
|
TruncateStdoutStderr:
PUSH RBX
LEA RAX,[0x131bc4]
MOV EAX,dword ptr [RAX]
LEA ECX,[RAX + -0x1]
SHL EAX,0x14
CMP ECX,0xfff
MOV EBX,0x100000
CMOVC EBX,EAX
LEA RDI,[0x120acf]
MOV EDX,0x100000
MOV RSI,RBX
CALL 0x0010d967
LEA RDI,[0x120adf]
MOV EDX,0x100000
MOV RSI,RBX
POP RBX
JMP 0x0010d967
|
/* nglog::TruncateStdoutStderr() */
void nglog::TruncateStdoutStderr(void)
{
ulong uVar1;
uVar1 = 0x100000;
if (fLU::FLAGS_max_log_size - 1U < 0xfff) {
uVar1 = (ulong)(uint)(fLU::FLAGS_max_log_size << 0x14);
}
TruncateLogFile("/proc/self/fd/1",uVar1,0x100000);
TruncateLogFile("/proc/self/fd/2",uVar1,0x100000);
return;
}
|
|
63,778 |
JS_ReadRegExp
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_ReadRegExp(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSString *pattern;
JSString *bc;
pattern = JS_ReadString(s);
if (!pattern)
return JS_EXCEPTION;
bc = JS_ReadString(s);
if (!bc) {
js_free_string(ctx->rt, pattern);
return JS_EXCEPTION;
}
if (bc->is_wide_char) {
js_free_string(ctx->rt, pattern);
js_free_string(ctx->rt, bc);
return JS_ThrowInternalError(ctx, "bad regexp bytecode");
}
if (is_be())
lre_byte_swap(bc->u.str8, bc->len, /*is_byte_swapped*/TRUE);
return js_regexp_constructor_internal(ctx, JS_UNDEFINED,
JS_MKPTR(JS_TAG_STRING, pattern),
JS_MKPTR(JS_TAG_STRING, bc));
}
|
O1
|
c
|
JS_ReadRegExp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r12
movq (%rdi), %r14
callq 0x45afb
movl $0x6, %ebx
testq %rax, %rax
je 0x46cb6
movq %rax, %r15
movq %r12, %rdi
callq 0x45afb
testq %rax, %rax
je 0x46c1b
movq %rax, %r12
testb $-0x80, 0x7(%rax)
jne 0x46c62
movq %r12, 0x18(%rsp)
movq $-0x7, 0x20(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x3, %edx
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rcx
movq $-0x7, %r8
callq 0x3f71a
movq %rdx, %rbx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r15d
jmp 0x46d29
movq 0x18(%r14), %r14
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x46cb6
movq 0x4(%r15), %rax
shrq $0x3e, %rax
jne 0x46cab
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
jmp 0x46cb6
movabsq $0x4000000000000000, %rbp # imm = 0x4000000000000000
movq 0x18(%r14), %r13
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x46cc6
cmpq %rbp, 0x4(%r15)
jae 0x46cbb
decq 0x28(%r13)
movq %r15, %rdi
callq *0x20(%r13)
movq 0x30(%r13), %rcx
movq 0x40(%r13), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r13)
movq %r15, %rsi
callq *0x10(%r13)
jmp 0x46cc6
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b863
xorl %r15d, %r15d
jmp 0x46d27
movq %r13, %rdi
movq %r15, %rsi
callq 0x3b863
movq 0x18(%r14), %r15
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x46d13
cmpq %rbp, 0x4(%r12)
jae 0x46d08
decq 0x28(%r15)
movq %r12, %rdi
callq *0x20(%r15)
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r15)
movq %r12, %rsi
callq *0x10(%r15)
jmp 0x46d13
movq %r15, %rdi
movq %r12, %rsi
callq 0x3b863
leaq 0x58d03(%rip), %rsi # 0x9fa1d
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22693
xorl %ecx, %ecx
orq %rcx, %r15
movq %r15, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
JS_ReadRegExp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdi
mov r14, [rdi]
call JS_ReadString
mov ebx, 6
test rax, rax
jz loc_46CB6
mov r15, rax
mov rdi, r12
call JS_ReadString
test rax, rax
jz short loc_46C1B
mov r12, rax
test byte ptr [rax+7], 80h
jnz loc_46C62
mov qword ptr [rsp+58h+var_40], r12
mov qword ptr [rsp+58h+var_40+8], 0FFFFFFFFFFFFFFF9h
movups xmm0, [rsp+58h+var_40]
movups [rsp+58h+var_58], xmm0
mov edx, 3
mov rdi, r14
xor esi, esi
mov rcx, r15
mov r8, 0FFFFFFFFFFFFFFF9h
call js_regexp_constructor_internal
mov rbx, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r15d, eax
jmp loc_46D29
loc_46C1B:
mov r14, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg loc_46CB6
mov rax, [r15+4]
shr rax, 3Eh
jnz short loc_46CAB
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
jmp short loc_46CB6
loc_46C62:
mov rbp, 4000000000000000h
mov r13, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_46CC6
cmp [r15+4], rbp
jnb short loc_46CBB
dec qword ptr [r13+28h]
mov rdi, r15
call qword ptr [r13+20h]
mov rcx, [r13+30h]
mov rdi, [r13+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r13+30h], rcx
mov rsi, r15
call qword ptr [r13+10h]
jmp short loc_46CC6
loc_46CAB:
mov rdi, r14
mov rsi, r15
call JS_FreeAtomStruct
loc_46CB6:
xor r15d, r15d
jmp short loc_46D27
loc_46CBB:
mov rdi, r13
mov rsi, r15
call JS_FreeAtomStruct
loc_46CC6:
mov r15, [r14+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_46D13
cmp [r12+4], rbp
jnb short loc_46D08
dec qword ptr [r15+28h]
mov rdi, r12
call qword ptr [r15+20h]
mov rcx, [r15+30h]
mov rdi, [r15+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r15+30h], rcx
mov rsi, r12
call qword ptr [r15+10h]
jmp short loc_46D13
loc_46D08:
mov rdi, r15
mov rsi, r12
call JS_FreeAtomStruct
loc_46D13:
lea rsi, aBadRegexpBytec; "bad regexp bytecode"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowInternalError
loc_46D27:
xor ecx, ecx
loc_46D29:
or r15, rcx
mov rax, r15
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long JS_ReadRegExp(
long long *a1,
long long a2,
long long a3,
int a4,
unsigned long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // r14
long long String; // rax
long long v15; // rdx
int v16; // ecx
unsigned long long v17; // r8
double v18; // xmm4_8
double v19; // xmm5_8
long long v20; // r15
long long v21; // rax
long long v22; // rdx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // r12
unsigned long long v28; // rax
unsigned long long v29; // rcx
long long v30; // r15
long long v31; // r14
int v32; // eax
long long v33; // rax
long long v34; // rdi
long long v35; // r13
int v36; // eax
long long v37; // rax
long long v38; // rdi
long long v39; // r15
int v40; // eax
long long v41; // rcx
long long v42; // rax
long long v43; // rdi
char v45; // [rsp+0h] [rbp-58h]
__m128 v46; // [rsp+18h] [rbp-40h]
v13 = *a1;
String = JS_ReadString((long long)a1, a6, a7, a8, a9, a10, a11, a12, a13, a2, a3, a4, a5);
if ( !String )
{
LABEL_12:
v30 = 0LL;
LABEL_19:
v29 = 0LL;
return v29 | v30;
}
v20 = String;
v21 = JS_ReadString((long long)a1, a6, a7, a8, a9, v18, v19, a12, a13, a2, v15, v16, v17);
if ( !v21 )
{
v31 = *(_QWORD *)(v13 + 24);
v32 = (*(_DWORD *)v20)--;
if ( v32 <= 1 )
{
if ( *(_QWORD *)(v20 + 4) >> 62 )
{
JS_FreeAtomStruct(v31, v20);
}
else
{
--*(_QWORD *)(v31 + 40);
v33 = (*(long long ( **)(long long))(v31 + 32))(v20);
v34 = *(_QWORD *)(v31 + 64);
*(_QWORD *)(v31 + 48) = *(_QWORD *)(v31 + 48) - v33 - 8;
(*(void ( **)(long long, long long))(v31 + 16))(v34, v20);
}
}
goto LABEL_12;
}
v27 = v21;
if ( *(char *)(v21 + 7) < 0 )
{
v35 = *(_QWORD *)(v13 + 24);
v36 = (*(_DWORD *)v20)--;
if ( v36 <= 1 )
{
if ( *(_QWORD *)(v20 + 4) >= 0x4000000000000000uLL )
{
JS_FreeAtomStruct(v35, v20);
}
else
{
--*(_QWORD *)(v35 + 40);
v37 = (*(long long ( **)(long long))(v35 + 32))(v20);
v38 = *(_QWORD *)(v35 + 64);
*(_QWORD *)(v35 + 48) = *(_QWORD *)(v35 + 48) - v37 - 8;
(*(void ( **)(long long, long long))(v35 + 16))(v38, v20);
}
}
v39 = *(_QWORD *)(v13 + 24);
v40 = *(_DWORD *)v27;
v41 = (unsigned int)(*(_DWORD *)v27 - 1);
*(_DWORD *)v27 = v41;
if ( v40 <= 1 )
{
if ( *(_QWORD *)(v27 + 4) >= 0x4000000000000000uLL )
{
JS_FreeAtomStruct(v39, v27);
}
else
{
--*(_QWORD *)(v39 + 40);
v42 = (*(long long ( **)(long long))(v39 + 32))(v27);
v43 = *(_QWORD *)(v39 + 64);
*(_QWORD *)(v39 + 48) = *(_QWORD *)(v39 + 48) - v42 - 8;
(*(void ( **)(long long, long long))(v39 + 16))(v43, v27);
}
}
v30 = 0LL;
JS_ThrowInternalError(
v13,
(long long)"bad regexp bytecode",
v22,
v41,
v23,
v24,
a6,
a7,
a8,
a9,
v25,
v26,
a12,
a13,
v45);
goto LABEL_19;
}
v46.m128_u64[0] = v21;
v46.m128_u64[1] = -7LL;
v28 = js_regexp_constructor_internal(
v13,
0LL,
3LL,
(_DWORD *)v20,
-7LL,
v24,
v46,
a7,
a8,
a9,
v25,
v26,
a12,
a13,
(_DWORD *)v21,
-7LL);
v29 = v28 & 0xFFFFFFFF00000000LL;
v30 = (unsigned int)v28;
return v29 | v30;
}
|
JS_ReadRegExp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDI
MOV R14,qword ptr [RDI]
CALL 0x00145afb
MOV EBX,0x6
TEST RAX,RAX
JZ 0x00146cb6
MOV R15,RAX
MOV RDI,R12
CALL 0x00145afb
TEST RAX,RAX
JZ 0x00146c1b
MOV R12,RAX
TEST byte ptr [RAX + 0x7],0x80
JNZ 0x00146c62
MOV qword ptr [RSP + 0x18],R12
MOV qword ptr [RSP + 0x20],-0x7
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RSP],XMM0
MOV EDX,0x3
MOV RDI,R14
XOR ESI,ESI
MOV RCX,R15
MOV R8,-0x7
CALL 0x0013f71a
MOV RBX,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV R15D,EAX
JMP 0x00146d29
LAB_00146c1b:
MOV R14,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x00146cb6
MOV RAX,qword ptr [R15 + 0x4]
SHR RAX,0x3e
JNZ 0x00146cab
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
JMP 0x00146cb6
LAB_00146c62:
MOV RBP,0x4000000000000000
MOV R13,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x00146cc6
CMP qword ptr [R15 + 0x4],RBP
JNC 0x00146cbb
DEC qword ptr [R13 + 0x28]
MOV RDI,R15
CALL qword ptr [R13 + 0x20]
MOV RCX,qword ptr [R13 + 0x30]
MOV RDI,qword ptr [R13 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R13 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R13 + 0x10]
JMP 0x00146cc6
LAB_00146cab:
MOV RDI,R14
MOV RSI,R15
CALL 0x0013b863
LAB_00146cb6:
XOR R15D,R15D
JMP 0x00146d27
LAB_00146cbb:
MOV RDI,R13
MOV RSI,R15
CALL 0x0013b863
LAB_00146cc6:
MOV R15,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x00146d13
CMP qword ptr [R12 + 0x4],RBP
JNC 0x00146d08
DEC qword ptr [R15 + 0x28]
MOV RDI,R12
CALL qword ptr [R15 + 0x20]
MOV RCX,qword ptr [R15 + 0x30]
MOV RDI,qword ptr [R15 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R15 + 0x30],RCX
MOV RSI,R12
CALL qword ptr [R15 + 0x10]
JMP 0x00146d13
LAB_00146d08:
MOV RDI,R15
MOV RSI,R12
CALL 0x0013b863
LAB_00146d13:
LEA RSI,[0x19fa1d]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00122693
LAB_00146d27:
XOR ECX,ECX
LAB_00146d29:
OR R15,RCX
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_ReadRegExp(long *param_1)
{
int iVar1;
long lVar2;
int *piVar3;
int *piVar4;
long lVar5;
long lVar6;
ulong uVar7;
int8 uVar8;
int8 in_R9;
ulong uVar9;
int1 auVar10 [16];
int4 local_40;
lVar2 = *param_1;
piVar3 = (int *)JS_ReadString();
uVar8 = 6;
if (piVar3 != (int *)0x0) {
piVar4 = (int *)JS_ReadString(param_1);
if (piVar4 == (int *)0x0) {
lVar2 = *(long *)(lVar2 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
if (*(ulong *)(piVar3 + 1) >> 0x3e == 0) {
*(long *)(lVar2 + 0x28) = *(long *)(lVar2 + 0x28) + -1;
lVar5 = (**(code **)(lVar2 + 0x20))(piVar3);
*(long *)(lVar2 + 0x30) = (*(long *)(lVar2 + 0x30) - lVar5) + -8;
(**(code **)(lVar2 + 0x10))(*(int8 *)(lVar2 + 0x40),piVar3);
}
else {
JS_FreeAtomStruct(lVar2,piVar3);
}
}
}
else {
if ((*(byte *)((long)piVar4 + 7) & 0x80) == 0) {
local_40 = SUB84(piVar4,0);
auVar10 = js_regexp_constructor_internal
(lVar2,0,3,piVar3,0xfffffffffffffff9,in_R9,local_40,0xfffffff9);
uVar8 = auVar10._8_8_;
uVar7 = auVar10._0_8_ & 0xffffffff00000000;
uVar9 = auVar10._0_8_ & 0xffffffff;
goto LAB_00146d29;
}
lVar5 = *(long *)(lVar2 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
if (*(ulong *)(piVar3 + 1) < 0x4000000000000000) {
*(long *)(lVar5 + 0x28) = *(long *)(lVar5 + 0x28) + -1;
lVar6 = (**(code **)(lVar5 + 0x20))(piVar3);
*(long *)(lVar5 + 0x30) = (*(long *)(lVar5 + 0x30) - lVar6) + -8;
(**(code **)(lVar5 + 0x10))(*(int8 *)(lVar5 + 0x40),piVar3);
}
else {
JS_FreeAtomStruct(lVar5,piVar3);
}
}
lVar5 = *(long *)(lVar2 + 0x18);
iVar1 = *piVar4;
*piVar4 = iVar1 + -1;
if (iVar1 < 2) {
if (*(ulong *)(piVar4 + 1) < 0x4000000000000000) {
*(long *)(lVar5 + 0x28) = *(long *)(lVar5 + 0x28) + -1;
lVar6 = (**(code **)(lVar5 + 0x20))(piVar4);
*(long *)(lVar5 + 0x30) = (*(long *)(lVar5 + 0x30) - lVar6) + -8;
(**(code **)(lVar5 + 0x10))(*(int8 *)(lVar5 + 0x40),piVar4);
}
else {
JS_FreeAtomStruct(lVar5,piVar4);
}
}
JS_ThrowInternalError(lVar2,"bad regexp bytecode");
}
}
uVar9 = 0;
uVar7 = 0;
LAB_00146d29:
auVar10._8_8_ = uVar8;
auVar10._0_8_ = uVar9 | uVar7;
return auVar10;
}
|
|
63,779 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Options)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::refine(Options refineOptions) {
// This will become redundant when/if assigned on construction:
assert(_parent && _child);
_uniform = !refineOptions._sparse;
_faceVertsFirst = refineOptions._faceVertsFirst;
// We may soon have an option here to suppress refinement of FVar channels...
bool refineOptions_ignoreFVarChannels = false;
bool optionallyRefineFVar = (_parent->getNumFVarChannels() > 0) && !refineOptions_ignoreFVarChannels;
//
// Initialize the parent-to-child and reverse child-to-parent mappings and propagate
// component tags to the new child components:
//
populateParentToChildMapping();
initializeChildComponentCounts();
populateChildToParentMapping();
propagateComponentTags();
//
// Subdivide the topology -- populating only those of the 6 relations specified
// (though we do require the vertex-face relation for refining FVar channels):
//
Relations relationsToPopulate;
if (refineOptions._minimalTopology) {
relationsToPopulate.setAll(false);
relationsToPopulate._faceVertices = true;
} else {
relationsToPopulate.setAll(true);
}
if (optionallyRefineFVar) {
relationsToPopulate._vertexFaces = true;
}
subdivideTopology(relationsToPopulate);
//
// Subdivide the sharpness values and face-varying channels:
// - note there is some dependency of the vertex tag/Rule for semi-sharp vertices
//
subdivideSharpnessValues();
if (optionallyRefineFVar) {
subdivideFVarChannels();
}
// Various debugging support:
//
//printf("Vertex refinement to level %d completed...\n", _child->getDepth());
//_child->print();
//printf(" validating refinement to level %d...\n", _child->getDepth());
//_child->validateTopology();
//assert(_child->validateTopology());
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Options):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %esi, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, 0x8(%rcx)
movb %al, -0x19(%rbp)
je 0xfe4f2
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xfe4fb
jmp 0xfe4fd
jmp 0xfe51c
leaq 0xed7a8(%rip), %rdi # 0x1ebcac
leaq 0xed6dd(%rip), %rsi # 0x1ebbe8
movl $0x78, %edx
leaq 0xed7a7(%rip), %rcx # 0x1ebcbe
callq 0xc9440
movq -0x28(%rbp), %rax
movb -0x4(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl $0x0, %ecx
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movb %cl, 0x24(%rax)
movb -0x4(%rbp), %cl
shrb %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x25(%rax)
movb $0x0, -0x11(%rbp)
movq 0x8(%rax), %rdi
callq 0xd1020
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
jle 0xfe570
movb -0x11(%rbp), %al
xorb $-0x1, %al
movb %al, -0x29(%rbp)
movq -0x28(%rbp), %rdi
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x12(%rbp)
callq 0xd23c0
movq -0x28(%rbp), %rdi
callq 0xcbd20
movq -0x28(%rbp), %rdi
callq 0xc8210
movq -0x28(%rbp), %rdi
callq 0xd39d0
movb -0x4(%rbp), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xfe5c3
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xd5160
movb -0x18(%rbp), %al
andb $-0x2, %al
orb $0x1, %al
movb %al, -0x18(%rbp)
jmp 0xfe5d1
leaq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xd5160
testb $0x1, -0x12(%rbp)
je 0xfe5e1
movb -0x18(%rbp), %al
andb $-0x11, %al
orb $0x10, %al
movb %al, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xd7460
movq -0x28(%rbp), %rdi
callq 0xc8a20
testb $0x1, -0x12(%rbp)
je 0xfe606
movq -0x28(%rbp), %rdi
callq 0xc53f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement6refineENS3_7OptionsE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], esi
mov [rbp+var_10], rdi
mov rcx, [rbp+var_10]
mov [rbp+var_28], rcx
xor eax, eax
cmp qword ptr [rcx+8], 0
mov [rbp+var_19], al
jz short loc_FE4F2
mov rax, [rbp+var_28]
cmp qword ptr [rax+10h], 0
setnz al
mov [rbp+var_19], al
loc_FE4F2:
mov al, [rbp+var_19]
test al, 1
jnz short loc_FE4FB
jmp short loc_FE4FD
loc_FE4FB:
jmp short loc_FE51C
loc_FE4FD:
lea rdi, aParentChild; "_parent && _child"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov edx, 78h ; 'x'
lea rcx, aVoidOpensubdiv_5; "void OpenSubdiv::v3_6_0::Vtr::internal:"...
call ___assert_fail
loc_FE51C:
mov rax, [rbp+var_28]
mov cl, byte ptr [rbp+var_4]
and cl, 1
movzx ecx, cl
cmp ecx, 0
setnz cl
xor cl, 0FFh
and cl, 1
mov [rax+24h], cl
mov cl, byte ptr [rbp+var_4]
shr cl, 1
and cl, 1
movzx ecx, cl
cmp ecx, 0
setnz cl
and cl, 1
mov [rax+25h], cl
mov [rbp+var_11], 0
mov rdi, [rax+8]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level18getNumFVarChannelsEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarChannels(void)
mov ecx, eax
xor eax, eax
cmp ecx, 0
mov [rbp+var_29], al
jle short loc_FE570
mov al, [rbp+var_11]
xor al, 0FFh
mov [rbp+var_29], al
loc_FE570:
mov rdi, [rbp+var_28]; this
mov al, [rbp+var_29]
and al, 1
mov [rbp+var_12], al
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateParentToChildMappingEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateParentToChildMapping(void)
mov rdi, [rbp+var_28]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement30initializeChildComponentCountsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::initializeChildComponentCounts(void)
mov rdi, [rbp+var_28]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateChildToParentMappingEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(void)
mov rdi, [rbp+var_28]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22propagateComponentTagsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::propagateComponentTags(void)
mov al, byte ptr [rbp+var_4]
shr al, 2
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_FE5C3
lea rdi, [rbp+var_18]; this
xor esi, esi; bool
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement9Relations6setAllEb; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations::setAll(bool)
mov al, [rbp+var_18]
and al, 0FEh
or al, 1
mov [rbp+var_18], al
jmp short loc_FE5D1
loc_FE5C3:
lea rdi, [rbp+var_18]; this
mov esi, 1; bool
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement9Relations6setAllEb; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations::setAll(bool)
loc_FE5D1:
test [rbp+var_12], 1
jz short loc_FE5E1
mov al, [rbp+var_18]
and al, 0EFh
or al, 10h
mov [rbp+var_18], al
loc_FE5E1:
mov rdi, [rbp+var_28]; this
lea rsi, [rbp+var_18]; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations *
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17subdivideTopologyERKNS3_9RelationsE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideTopology(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations const&)
mov rdi, [rbp+var_28]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideSharpnessValuesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues(void)
test [rbp+var_12], 1
jz short loc_FE606
mov rdi, [rbp+var_28]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement21subdivideFVarChannelsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideFVarChannels(void)
loc_FE606:
add rsp, 30h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(long long a1, int a2)
{
int NumFVarChannels; // eax
long long result; // rax
char v4; // [rsp+7h] [rbp-29h]
bool v5; // [rsp+17h] [rbp-19h]
_BYTE v6[6]; // [rsp+18h] [rbp-18h] BYREF
char v7; // [rsp+1Eh] [rbp-12h]
char v8; // [rsp+1Fh] [rbp-11h]
long long v9; // [rsp+20h] [rbp-10h]
int v10; // [rsp+2Ch] [rbp-4h]
v10 = a2;
v9 = a1;
v5 = 0;
if ( *(_QWORD *)(a1 + 8) )
v5 = *(_QWORD *)(a1 + 16) != 0LL;
if ( !v5 )
__assert_fail(
"_parent && _child",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp",
120LL,
"void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(Options)");
*(_BYTE *)(a1 + 36) = (v10 & 1) == 0;
*(_BYTE *)(a1 + 37) = (v10 & 2) != 0;
v8 = 0;
NumFVarChannels = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarChannels(*(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(a1 + 8));
v4 = 0;
if ( NumFVarChannels > 0 )
v4 = ~v8;
v7 = v4 & 1;
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateParentToChildMapping((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::initializeChildComponentCounts((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::propagateComponentTags((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
if ( (v10 & 4) != 0 )
{
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations::setAll(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations *)v6,
0);
v6[0] = v6[0] & 0xFE | 1;
}
else
{
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations::setAll(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations *)v6,
1);
}
if ( (v7 & 1) != 0 )
v6[0] = v6[0] & 0xEF | 0x10;
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideTopology(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1,
(const OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations *)v6);
result = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideSharpnessValues((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
if ( (v7 & 1) != 0 )
return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideFVarChannels((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
return result;
}
|
refine:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],ESI
MOV qword ptr [RBP + -0x10],RDI
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP qword ptr [RCX + 0x8],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x001fe4f2
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x10],0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_001fe4f2:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x001fe4fb
JMP 0x001fe4fd
LAB_001fe4fb:
JMP 0x001fe51c
LAB_001fe4fd:
LEA RDI,[0x2ebcac]
LEA RSI,[0x2ebbe8]
MOV EDX,0x78
LEA RCX,[0x2ebcbe]
CALL 0x001c9440
LAB_001fe51c:
MOV RAX,qword ptr [RBP + -0x28]
MOV CL,byte ptr [RBP + -0x4]
AND CL,0x1
MOVZX ECX,CL
CMP ECX,0x0
SETNZ CL
XOR CL,0xff
AND CL,0x1
MOV byte ptr [RAX + 0x24],CL
MOV CL,byte ptr [RBP + -0x4]
SHR CL,0x1
AND CL,0x1
MOVZX ECX,CL
CMP ECX,0x0
SETNZ CL
AND CL,0x1
MOV byte ptr [RAX + 0x25],CL
MOV byte ptr [RBP + -0x11],0x0
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001d1020
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x29],AL
JLE 0x001fe570
MOV AL,byte ptr [RBP + -0x11]
XOR AL,0xff
MOV byte ptr [RBP + -0x29],AL
LAB_001fe570:
MOV RDI,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOV byte ptr [RBP + -0x12],AL
CALL 0x001d23c0
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001cbd20
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001c8210
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001d39d0
MOV AL,byte ptr [RBP + -0x4]
SHR AL,0x2
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001fe5c3
LEA RDI,[RBP + -0x18]
XOR ESI,ESI
CALL 0x001d5160
MOV AL,byte ptr [RBP + -0x18]
AND AL,0xfe
OR AL,0x1
MOV byte ptr [RBP + -0x18],AL
JMP 0x001fe5d1
LAB_001fe5c3:
LEA RDI,[RBP + -0x18]
MOV ESI,0x1
CALL 0x001d5160
LAB_001fe5d1:
TEST byte ptr [RBP + -0x12],0x1
JZ 0x001fe5e1
MOV AL,byte ptr [RBP + -0x18]
AND AL,0xef
OR AL,0x10
MOV byte ptr [RBP + -0x18],AL
LAB_001fe5e1:
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x18]
CALL 0x001d7460
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001c8a20
TEST byte ptr [RBP + -0x12],0x1
JZ 0x001fe606
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001c53f0
LAB_001fe606:
ADD RSP,0x30
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Options)
*/
void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(Refinement *this,uint param_2)
{
int iVar1;
bool bVar2;
byte local_31;
Relations local_20 [6];
byte local_1a;
byte local_19;
Refinement *local_18;
uint local_c;
bVar2 = false;
if (*(long *)(this + 8) != 0) {
bVar2 = *(long *)(this + 0x10) != 0;
}
local_18 = this;
local_c = param_2;
if (!bVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("_parent && _child",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp"
,0x78,"void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(Options)");
}
local_c._0_1_ = (byte)param_2;
this[0x24] = (Refinement)(((param_2 & 1) != 0 ^ 0xffU) & 1);
this[0x25] = (Refinement)(((byte)local_c >> 1 & 1) != 0);
local_19 = 0;
iVar1 = Level::getNumFVarChannels(*(Level **)(this + 8));
local_31 = 0;
if (0 < iVar1) {
local_31 = local_19 ^ 0xff;
}
local_1a = local_31 & 1;
populateParentToChildMapping(this);
initializeChildComponentCounts(this);
populateChildToParentMapping(this);
propagateComponentTags(this);
if (((byte)local_c >> 2 & 1) == 0) {
Relations::setAll(local_20,true);
}
else {
Relations::setAll(local_20,false);
local_20[0] = (Relations)((byte)local_20[0] & 0xfe | 1);
}
if ((local_1a & 1) != 0) {
local_20[0] = (Relations)((byte)local_20[0] & 0xef | 0x10);
}
subdivideTopology(this,local_20);
subdivideSharpnessValues(this);
if ((local_1a & 1) != 0) {
subdivideFVarChannels(this);
}
return;
}
|
|
63,780 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Options)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::refine(Options refineOptions) {
// This will become redundant when/if assigned on construction:
assert(_parent && _child);
_uniform = !refineOptions._sparse;
_faceVertsFirst = refineOptions._faceVertsFirst;
// We may soon have an option here to suppress refinement of FVar channels...
bool refineOptions_ignoreFVarChannels = false;
bool optionallyRefineFVar = (_parent->getNumFVarChannels() > 0) && !refineOptions_ignoreFVarChannels;
//
// Initialize the parent-to-child and reverse child-to-parent mappings and propagate
// component tags to the new child components:
//
populateParentToChildMapping();
initializeChildComponentCounts();
populateChildToParentMapping();
propagateComponentTags();
//
// Subdivide the topology -- populating only those of the 6 relations specified
// (though we do require the vertex-face relation for refining FVar channels):
//
Relations relationsToPopulate;
if (refineOptions._minimalTopology) {
relationsToPopulate.setAll(false);
relationsToPopulate._faceVertices = true;
} else {
relationsToPopulate.setAll(true);
}
if (optionallyRefineFVar) {
relationsToPopulate._vertexFaces = true;
}
subdivideTopology(relationsToPopulate);
//
// Subdivide the sharpness values and face-varying channels:
// - note there is some dependency of the vertex tag/Rule for semi-sharp vertices
//
subdivideSharpnessValues();
if (optionallyRefineFVar) {
subdivideFVarChannels();
}
// Various debugging support:
//
//printf("Vertex refinement to level %d completed...\n", _child->getDepth());
//_child->print();
//printf(" validating refinement to level %d...\n", _child->getDepth());
//_child->validateTopology();
//assert(_child->validateTopology());
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Options):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x4a4ae
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x4a4ae
movl %esi, %ebp
movl %ebp, %ecx
notb %cl
andb $0x1, %cl
movb %cl, 0x24(%rbx)
movl %ebp, %ecx
shrb %cl
andb $0x1, %cl
movb %cl, 0x25(%rbx)
movq 0x1d0(%rax), %r14
subq 0x1c8(%rax), %r14
shrq $0x3, %r14
movq %rbx, %rdi
callq 0x3b1a0
movl 0x28(%rbx), %eax
movq 0x10(%rbx), %rcx
movl %eax, (%rcx)
movl 0x30(%rbx), %eax
addl 0x2c(%rbx), %eax
movl %eax, 0x4(%rcx)
movl 0x38(%rbx), %eax
addl 0x34(%rbx), %eax
addl 0x3c(%rbx), %eax
movl %eax, 0x8(%rcx)
movq %rbx, %rdi
callq 0x391b0
movq %rbx, %rdi
callq 0x3b5f0
andl $0x4, %ebp
xorl %eax, %eax
cmpl $0x1, %ebp
sbbl %eax, %eax
orb $0x1, %al
movb %al, 0xc(%rsp)
testl %r14d, %r14d
jle 0x4a481
orb $0x10, %al
leaq 0xc(%rsp), %rsi
movb %al, (%rsi)
movq %rbx, %rdi
callq 0x3c2b0
movq %rbx, %rdi
callq 0x3a250
movq %rbx, %rdi
callq 0x3a330
movq %rbx, %rdi
callq 0x3c130
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x38730
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x3c2b0
movq %rbx, %rdi
callq 0x3a250
movq %rbx, %rdi
callq 0x3a330
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3c130
leaq 0x6c7f2(%rip), %rdi # 0xb6ca7
leaq 0x6c727(%rip), %rsi # 0xb6be3
leaq 0x6c7f6(%rip), %rcx # 0xb6cb9
movl $0x78, %edx
callq 0x39540
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement6refineENS3_7OptionsE:
push rbp
push r14
push rbx
sub rsp, 10h
mov rax, [rdi+8]
test rax, rax
jz loc_4A4AE
mov rbx, rdi
cmp qword ptr [rdi+10h], 0
jz loc_4A4AE
mov ebp, esi
mov ecx, ebp
not cl
and cl, 1
mov [rbx+24h], cl
mov ecx, ebp
shr cl, 1
and cl, 1
mov [rbx+25h], cl
mov r14, [rax+1D0h]
sub r14, [rax+1C8h]
shr r14, 3
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateParentToChildMappingEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateParentToChildMapping(void)
mov eax, [rbx+28h]
mov rcx, [rbx+10h]
mov [rcx], eax
mov eax, [rbx+30h]
add eax, [rbx+2Ch]
mov [rcx+4], eax
mov eax, [rbx+38h]
add eax, [rbx+34h]
add eax, [rbx+3Ch]
mov [rcx+8], eax
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateChildToParentMappingEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22propagateComponentTagsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::propagateComponentTags(void)
and ebp, 4
xor eax, eax
cmp ebp, 1
sbb eax, eax
or al, 1
mov [rsp+28h+var_1C], al
test r14d, r14d
jle short loc_4A481
or al, 10h
lea rsi, [rsp+28h+var_1C]
mov [rsi], al
mov rdi, rbx
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17subdivideTopologyERKNS3_9RelationsE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideTopology(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations const&)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22subdivideEdgeSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideVertexSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27reclassifySemisharpVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(void)
mov rdi, rbx; this
add rsp, 10h
pop rbx
pop r14
pop rbp
jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement21subdivideFVarChannelsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideFVarChannels(void)
loc_4A481:
lea rsi, [rsp+28h+var_1C]
mov rdi, rbx
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17subdivideTopologyERKNS3_9RelationsE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideTopology(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Relations const&)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement22subdivideEdgeSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement24subdivideVertexSharpnessEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(void)
mov rdi, rbx; this
add rsp, 10h
pop rbx
pop r14
pop rbp
jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27reclassifySemisharpVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(void)
loc_4A4AE:
lea rdi, aParentChild; "_parent && _child"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_5; "void OpenSubdiv::v3_6_0::Vtr::internal:"...
mov edx, 78h ; 'x'
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this,
char a2)
{
long long v2; // rax
long long v3; // r14
_DWORD *v4; // rcx
int v5; // ebp
_BYTE v7[28]; // [rsp+Ch] [rbp-1Ch] BYREF
v2 = *((_QWORD *)this + 1);
if ( !v2 || !*((_QWORD *)this + 2) )
__assert_fail(
"_parent && _child",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp",
120LL,
"void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(Options)");
*((_BYTE *)this + 36) = (a2 & 1) == 0;
*((_BYTE *)this + 37) = (a2 & 2) != 0;
v3 = (*(_QWORD *)(v2 + 464) - *(_QWORD *)(v2 + 456)) >> 3;
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateParentToChildMapping(this);
v4 = (_DWORD *)*((_QWORD *)this + 2);
*v4 = *((_DWORD *)this + 10);
v4[1] = *((_DWORD *)this + 11) + *((_DWORD *)this + 12);
v4[2] = *((_DWORD *)this + 15) + *((_DWORD *)this + 13) + *((_DWORD *)this + 14);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(this);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::propagateComponentTags(this);
v5 = a2 & 4;
v7[0] = v5 == 0 ? -1 : 1;
if ( (int)v3 <= 0 )
{
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideTopology(this, v7);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(this);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(this);
return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(this);
}
else
{
v7[0] = v5 == 0 ? -1 : 0x11;
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideTopology(this, v7);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideEdgeSharpness(this);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideVertexSharpness(this);
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(this);
return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::subdivideFVarChannels(this);
}
}
|
refine:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr [RDI + 0x8]
TEST RAX,RAX
JZ 0x0014a4ae
MOV RBX,RDI
CMP qword ptr [RDI + 0x10],0x0
JZ 0x0014a4ae
MOV EBP,ESI
MOV ECX,EBP
NOT CL
AND CL,0x1
MOV byte ptr [RBX + 0x24],CL
MOV ECX,EBP
SHR CL,0x1
AND CL,0x1
MOV byte ptr [RBX + 0x25],CL
MOV R14,qword ptr [RAX + 0x1d0]
SUB R14,qword ptr [RAX + 0x1c8]
SHR R14,0x3
MOV RDI,RBX
CALL 0x0013b1a0
MOV EAX,dword ptr [RBX + 0x28]
MOV RCX,qword ptr [RBX + 0x10]
MOV dword ptr [RCX],EAX
MOV EAX,dword ptr [RBX + 0x30]
ADD EAX,dword ptr [RBX + 0x2c]
MOV dword ptr [RCX + 0x4],EAX
MOV EAX,dword ptr [RBX + 0x38]
ADD EAX,dword ptr [RBX + 0x34]
ADD EAX,dword ptr [RBX + 0x3c]
MOV dword ptr [RCX + 0x8],EAX
MOV RDI,RBX
CALL 0x001391b0
MOV RDI,RBX
CALL 0x0013b5f0
AND EBP,0x4
XOR EAX,EAX
CMP EBP,0x1
SBB EAX,EAX
OR AL,0x1
MOV byte ptr [RSP + 0xc],AL
TEST R14D,R14D
JLE 0x0014a481
OR AL,0x10
LEA RSI,[RSP + 0xc]
MOV byte ptr [RSI],AL
MOV RDI,RBX
CALL 0x0013c2b0
MOV RDI,RBX
CALL 0x0013a250
MOV RDI,RBX
CALL 0x0013a330
MOV RDI,RBX
CALL 0x0013c130
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
JMP 0x00138730
LAB_0014a481:
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x0013c2b0
MOV RDI,RBX
CALL 0x0013a250
MOV RDI,RBX
CALL 0x0013a330
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
JMP 0x0013c130
LAB_0014a4ae:
LEA RDI,[0x1b6ca7]
LEA RSI,[0x1b6be3]
LEA RCX,[0x1b6cb9]
MOV EDX,0x78
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::Options)
*/
void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(Refinement *this,byte param_2)
{
long lVar1;
long lVar2;
int4 *puVar3;
byte bVar4;
Relations local_1c [4];
lVar1 = *(long *)(this + 8);
if ((lVar1 != 0) && (*(long *)(this + 0x10) != 0)) {
this[0x24] = (Refinement)(~param_2 & 1);
this[0x25] = (Refinement)(param_2 >> 1 & 1);
lVar2 = *(long *)(lVar1 + 0x1d0);
lVar1 = *(long *)(lVar1 + 0x1c8);
populateParentToChildMapping(this);
puVar3 = *(int4 **)(this + 0x10);
*puVar3 = *(int4 *)(this + 0x28);
puVar3[1] = *(int *)(this + 0x30) + *(int *)(this + 0x2c);
puVar3[2] = *(int *)(this + 0x38) + *(int *)(this + 0x34) + *(int *)(this + 0x3c);
populateChildToParentMapping(this);
propagateComponentTags(this);
bVar4 = -((param_2 & 4) == 0);
local_1c[0] = (Relations)(bVar4 | 1);
if (0 < (int)((ulong)(lVar2 - lVar1) >> 3)) {
local_1c[0] = (Relations)(bVar4 | 0x11);
subdivideTopology(this,local_1c);
subdivideEdgeSharpness(this);
subdivideVertexSharpness(this);
reclassifySemisharpVertices(this);
subdivideFVarChannels(this);
return;
}
subdivideTopology(this,local_1c);
subdivideEdgeSharpness(this);
subdivideVertexSharpness(this);
reclassifySemisharpVertices(this);
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("_parent && _child",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp"
,0x78,"void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::refine(Options)");
}
|
|
63,781 |
my_numcells_eucjp
|
eloqsql/strings/ctype-ujis.c
|
static
size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O0
|
c
|
my_numcells_eucjp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xb2632
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8e, %eax
jne 0xb25be
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0xb262d
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8f, %eax
jne 0xb25e6
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x28(%rbp)
jmp 0xb262b
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xb2611
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0xb2629
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xb262b
jmp 0xb262d
jmp 0xb2588
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
|
my_numcells_eucjp:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov [rbp+var_20], 0
loc_B2588:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb loc_B2632
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 8Eh
jnz short loc_B25BE
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
jmp short loc_B262D
loc_B25BE:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 8Fh
jnz short loc_B25E6
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 3
mov [rbp+var_28], rax
jmp short loc_B262B
loc_B25E6:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_B2611
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
jmp short loc_B2629
loc_B2611:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_B2629:
jmp short $+2
loc_B262B:
jmp short $+2
loc_B262D:
jmp loc_B2588
loc_B2632:
mov rax, [rbp+var_20]
pop rbp
retn
|
long long my_numcells_eucjp(long long a1, _BYTE *a2, unsigned long long a3)
{
long long v5; // [rsp+10h] [rbp-20h]
v5 = 0LL;
while ( (unsigned long long)a2 < a3 )
{
if ( (unsigned __int8)*a2 == 142 )
{
++v5;
a2 += 2;
}
else if ( (unsigned __int8)*a2 == 143 )
{
v5 += 2LL;
a2 += 3;
}
else if ( (*a2 & 0x80) != 0 )
{
v5 += 2LL;
a2 += 2;
}
else
{
++v5;
++a2;
}
}
return v5;
}
|
my_numcells_eucjp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x20],0x0
LAB_001b2588:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001b2632
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x8e
JNZ 0x001b25be
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b262d
LAB_001b25be:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x8f
JNZ 0x001b25e6
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x3
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b262b
LAB_001b25e6:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001b2611
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b2629
LAB_001b2611:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_001b2629:
JMP 0x001b262b
LAB_001b262b:
JMP 0x001b262d
LAB_001b262d:
JMP 0x001b2588
LAB_001b2632:
MOV RAX,qword ptr [RBP + -0x20]
POP RBP
RET
|
long my_numcells_eucjp(int8 param_1,byte *param_2,byte *param_3)
{
byte *local_30;
long local_28;
local_28 = 0;
local_30 = param_2;
while (local_30 < param_3) {
if (*local_30 == 0x8e) {
local_28 = local_28 + 1;
local_30 = local_30 + 2;
}
else if (*local_30 == 0x8f) {
local_28 = local_28 + 2;
local_30 = local_30 + 3;
}
else if ((*local_30 & 0x80) == 0) {
local_28 = local_28 + 1;
local_30 = local_30 + 1;
}
else {
local_28 = local_28 + 2;
local_30 = local_30 + 2;
}
}
return local_28;
}
|
|
63,782 |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
monkey531[P]llama/common/./json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O0
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0xa1b90
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa4f67
jmp 0xa5019
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0xa04c0
movq %rax, 0x20(%rsp)
leaq 0x127d3a(%rip), %rsi # 0x1ccccb
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xa0410
jmp 0xa4fa2
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq 0x28(%rsp), %rdx
callq 0xa0260
jmp 0xa4fbd
movq 0x8(%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0x1ad12a(%rip), %rsi # 0x2520f8
leaq -0x4a65(%rip), %rdx # 0xa0570
callq 0x508f0
jmp 0xa503f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xa5004
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x13(%rsp)
jne 0xa500d
jmp 0xa5017
movq 0x8(%rsp), %rdi
callq 0x50c40
jmp 0xa5035
movq 0x50(%rsp), %rdi
callq 0xa5040
movq %rax, %rsi
movq 0x48(%rsp), %rdi
callq 0x50fe0
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x50940
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov qword ptr [rsp+58h+var_10], rsi; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_stringEv; 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>::is_string(void)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_A4F67
jmp loc_A5019
loc_A4F67:
mov [rsp+58h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_50], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+58h+var_38], rax; int
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
jmp short $+2
loc_A4FA2:
mov rdi, [rsp+58h+var_50]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Eh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_A4FBD:
mov rdi, [rsp+58h+var_50]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_A503F
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_A5004
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A5004:
test [rsp+arg_B], 1
jnz short loc_A500D
jmp short loc_A5017
loc_A500D:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_A5017:
jmp short loc_A5035
loc_A5019:
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov rsi, rax
mov rdi, qword ptr [rsp+58h+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
add rsp, 58h
retn
loc_A5035:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
loc_A503F:
nop
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
_BYTE *a1,
long long a2)
{
long long v2; // rax
void *exception; // [rsp+8h] [rbp-50h]
int v5[2]; // [rsp+20h] [rbp-38h] BYREF
_BYTE v6[32]; // [rsp+28h] [rbp-30h] BYREF
int v7[2]; // [rsp+48h] [rbp-10h]
char v8[8]; // [rsp+50h] [rbp-8h]
*(_QWORD *)v8 = a1;
*(_QWORD *)v7 = a2;
if ( !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>::is_string(a1) )
{
exception = __cxa_allocate_exception(0x20uLL);
*(_QWORD *)v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v8);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be string, but is ",
(long long)v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
(long long)exception,
302,
(long long)v6,
*(long long *)v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
v2 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v8);
return std::string::operator=(*(_QWORD *)v7, v2);
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001a1b90
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001a4f67
JMP 0x001a5019
LAB_001a4f67:
MOV byte ptr [RSP + 0x13],0x1
MOV EDI,0x20
CALL 0x00150540
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001a04c0
MOV qword ptr [RSP + 0x20],RAX
LAB_001a4f8a:
LEA RSI,[0x2ccccb]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x20]
CALL 0x001a0410
JMP 0x001a4fa2
LAB_001a4fa2:
MOV RDI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x50]
LAB_001a4fac:
MOV ESI,0x12e
LEA RDX,[RSP + 0x28]
CALL 0x001a0260
JMP 0x001a4fbd
LAB_001a4fbd:
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x13],0x0
LEA RSI,[0x3520f8]
LEA RDX,[0x1a0570]
CALL 0x001508f0
LAB_001a5019:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001a5040
MOV RSI,RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00150fe0
ADD RSP,0x58
RET
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
string *psVar1;
int8 uVar2;
byte bVar3;
char *local_38;
detail local_30 [32];
string_t *local_10;
basic_json *local_8;
local_10 = param_2;
local_8 = param_1;
bVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::is_string((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
if (((bVar3 ^ 0xff) & 1) == 0) {
psVar1 = (string *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
std::__cxx11::string::operator=((string *)local_10,psVar1);
return;
}
uVar2 = __cxa_allocate_exception(0x20);
local_38 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_8);
/* try { // try from 001a4f8a to 001a4f9f has its CatchHandler @ 001a4fdc */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_30,"type must be string, but is ",&local_38);
/* try { // try from 001a4fac to 001a4fd9 has its CatchHandler @ 001a4fec */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_30,local_8);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&type_error::typeinfo,type_error::~type_error);
}
|
|
63,783 |
minja::TextTemplateToken::TextTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/minja.hpp
|
TextTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, location, pre, post), text(t) {}
|
O1
|
cpp
|
minja::TextTemplateToken::TextTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x91d0d(%rip), %r15 # 0x12a2e8
addq $0x10, %r15
movq %r15, (%rdi)
movl $0x0, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x98612
movq 0x9397c(%rip), %rdi # 0x12bf80
cmpb $0x0, (%rdi)
je 0x9860e
incl 0x8(%rax)
jmp 0x98612
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rbx)
movl %edx, 0x28(%rbx)
movl %ecx, 0x2c(%rbx)
leaq 0x928c9(%rip), %rax # 0x12aef0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x30(%rbx), %rdi
leaq 0x40(%rbx), %rax
movq %rax, 0x30(%rbx)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
callq 0x210f0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x98663
callq 0x6c090
movq %r14, %rdi
callq 0x1af20
nop
|
_ZN5minja17TextTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add r15, 10h
mov [rdi], r15
mov dword ptr [rdi+8], 0
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_98612
mov rdi, cs:__libc_single_threaded_ptr
cmp byte ptr [rdi], 0
jz short loc_9860E
inc dword ptr [rax+8]
jmp short loc_98612
loc_9860E:
lock inc dword ptr [rax+8]
loc_98612:
mov rax, [rsi+10h]
mov [rbx+20h], rax
mov [rbx+28h], edx
mov [rbx+2Ch], ecx
lea rax, _ZTVN5minja17TextTemplateTokenE; `vtable for'minja::TextTemplateToken
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+30h]
lea rax, [rbx+40h]
mov [rbx+30h], rax
mov rsi, [r8]
mov rdx, [r8+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_98663
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_98663:
mov rdi, r14
call __Unwind_Resume
|
long long minja::TextTemplateToken::TextTemplateToken(long long a1, _QWORD *a2, int a3, int a4, long long a5)
{
long long v5; // rax
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 24) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::TextTemplateToken + 2;
*(_QWORD *)(a1 + 48) = a1 + 64;
return std::string::_M_construct<char *>((_QWORD *)(a1 + 48), *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8));
}
|
TextTemplateToken:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x22a2e8]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV dword ptr [RDI + 0x8],0x0
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x00198612
MOV RDI,qword ptr [0x0022bf80]
CMP byte ptr [RDI],0x0
JZ 0x0019860e
INC dword ptr [RAX + 0x8]
JMP 0x00198612
LAB_0019860e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00198612:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x20],RAX
MOV dword ptr [RBX + 0x28],EDX
MOV dword ptr [RBX + 0x2c],ECX
LEA RAX,[0x22aef0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x30]
LEA RAX,[RBX + 0x40]
MOV qword ptr [RBX + 0x30],RAX
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
ADD RDX,RSI
LAB_00198644:
CALL 0x001210f0
LAB_00198649:
POP RBX
POP R14
POP R15
RET
|
/* minja::TextTemplateToken::TextTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::__cxx11::string const&) */
void __thiscall
minja::TextTemplateToken::TextTemplateToken
(TextTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
long *param_5)
{
long lVar1;
*(int ***)this = &PTR__TemplateToken_0022a2f8;
*(int4 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__TextTemplateToken_0022af00;
*(TextTemplateToken **)(this + 0x30) = this + 0x40;
/* try { // try from 00198644 to 00198648 has its CatchHandler @ 0019864f */
std::__cxx11::string::_M_construct<char*>(this + 0x30,*param_5,param_5[1] + *param_5);
return;
}
|
|
63,784 |
my_well_formed_char_length_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_well_formed_char_length_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length= e - b;
if (nchars * 2 <= length)
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= b + (nchars * 2);
return nchars;
}
if (length % 2)
{
status->m_well_formed_error_pos= status->m_source_end_pos= e - 1;
}
else
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= e;
}
return length / 2;
}
|
O3
|
c
|
my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rcx, %rax
movq %rdx, %rcx
subq %rsi, %rcx
leaq (%rax,%rax), %rdi
cmpq %rcx, %rdi
jbe 0x69f9f
movl %ecx, %eax
andl $0x1, %eax
movq %rax, %rsi
negq %rsi
leaq -0x1(%rdx), %rdi
andq %rdi, %rsi
testq %rax, %rax
cmoveq %rdx, %rdi
movq %rsi, 0x8(%r8)
movq %rdi, (%r8)
shrq %rcx
movq %rcx, %rax
jmp 0x69fad
movq $0x0, 0x8(%r8)
addq %rdi, %rsi
movq %rsi, (%r8)
popq %rbp
retq
|
my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
mov rax, rcx
mov rcx, rdx
sub rcx, rsi
lea rdi, [rax+rax]
cmp rdi, rcx
jbe short loc_69F9F
mov eax, ecx
and eax, 1
mov rsi, rax
neg rsi
lea rdi, [rdx-1]
and rsi, rdi
test rax, rax
cmovz rdi, rdx
mov [r8+8], rsi
mov [r8], rdi
shr rcx, 1
mov rax, rcx
jmp short loc_69FAD
loc_69F9F:
mov qword ptr [r8+8], 0
add rsi, rdi
mov [r8], rsi
loc_69FAD:
pop rbp
retn
|
unsigned long long my_well_formed_char_length_ucs2(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
_QWORD *a5)
{
unsigned long long result; // rax
unsigned long long v6; // rcx
long long v7; // rdi
result = a4;
v6 = a3 - a2;
if ( 2 * result <= a3 - a2 )
{
a5[1] = 0LL;
*a5 = 2 * result + a2;
}
else
{
v7 = a3 - 1;
if ( (v6 & 1) == 0 )
v7 = a3;
a5[1] = (a3 - 1) & -(long long)(v6 & 1);
*a5 = v7;
return v6 >> 1;
}
return result;
}
|
my_well_formed_char_length_ucs2:
PUSH RBP
MOV RBP,RSP
MOV RAX,RCX
MOV RCX,RDX
SUB RCX,RSI
LEA RDI,[RAX + RAX*0x1]
CMP RDI,RCX
JBE 0x00169f9f
MOV EAX,ECX
AND EAX,0x1
MOV RSI,RAX
NEG RSI
LEA RDI,[RDX + -0x1]
AND RSI,RDI
TEST RAX,RAX
CMOVZ RDI,RDX
MOV qword ptr [R8 + 0x8],RSI
MOV qword ptr [R8],RDI
SHR RCX,0x1
MOV RAX,RCX
JMP 0x00169fad
LAB_00169f9f:
MOV qword ptr [R8 + 0x8],0x0
ADD RSI,RDI
MOV qword ptr [R8],RSI
LAB_00169fad:
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,ulong param_3,ulong param_4,ulong *param_5)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar2 = param_3 - param_2;
if (uVar2 < param_4 * 2) {
uVar1 = (ulong)((uint)uVar2 & 1);
uVar3 = param_3 - 1;
if (uVar1 == 0) {
uVar3 = param_3;
}
param_5[1] = -uVar1 & param_3 - 1;
*param_5 = uVar3;
param_4 = uVar2 >> 1;
}
else {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
}
return param_4;
}
|
|
63,785 |
PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192, PFS_buffer_default_array<PFS_table_share_index>, PFS_buffer_default_allocator<PFS_table_share_index>>::init(long)
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
int init(long max_size)
{
int i;
m_initialized= true;
m_full= true;
m_max= PFS_PAGE_COUNT * PFS_PAGE_SIZE;
m_max_page_count= PFS_PAGE_COUNT;
m_last_page_size= PFS_PAGE_SIZE;
m_lost= 0;
m_monotonic.m_u32= 0;
m_max_page_index.m_u32= 0;
for (i=0 ; i < PFS_PAGE_COUNT; i++)
{
m_pages[i]= NULL;
}
if (max_size == 0)
{
/* No allocation. */
m_max_page_count= 0;
}
else if (max_size > 0)
{
if (max_size % PFS_PAGE_SIZE == 0)
{
m_max_page_count= max_size / PFS_PAGE_SIZE;
}
else
{
m_max_page_count= max_size / PFS_PAGE_SIZE + 1;
m_last_page_size= max_size % PFS_PAGE_SIZE;
}
/* Bounded allocation. */
m_full= false;
if (m_max_page_count > PFS_PAGE_COUNT)
{
m_max_page_count= PFS_PAGE_COUNT;
m_last_page_size= PFS_PAGE_SIZE;
}
}
else
{
/* max_size = -1 means unbounded allocation */
m_full= false;
}
assert(m_max_page_count <= PFS_PAGE_COUNT);
assert(0 < m_last_page_size);
assert(m_last_page_size <= PFS_PAGE_SIZE);
pthread_mutex_init(& m_critical_section, NULL);
return 0;
}
|
O0
|
c
|
PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192, PFS_buffer_default_array<PFS_table_share_index>, PFS_buffer_default_allocator<PFS_table_share_index>>::init(long):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x1, 0x8(%rax)
movb $0x1, 0x9(%rax)
movq $0x4000000, 0x10(%rax) # imm = 0x4000000
movq $0x2000, 0x98(%rax) # imm = 0x2000
movq $0x2000, 0xa0(%rax) # imm = 0x2000
movq $0x0, (%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x58(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x2000, -0x14(%rbp) # imm = 0x2000
jge 0x457b2
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, 0xa8(%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4578a
cmpq $0x0, -0x10(%rbp)
jne 0x457cd
movq -0x20(%rbp), %rax
movq $0x0, 0x98(%rax)
jmp 0x4587e
cmpq $0x0, -0x10(%rbp)
jle 0x45874
movq -0x10(%rbp), %rax
movl $0x2000, %ecx # imm = 0x2000
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x4580a
movq -0x10(%rbp), %rax
movl $0x2000, %ecx # imm = 0x2000
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0x45843
movq -0x10(%rbp), %rax
movl $0x2000, %ecx # imm = 0x2000
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x1, %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movl $0x2000, %ecx # imm = 0x2000
cqto
idivq %rcx
movq -0x20(%rbp), %rax
movq %rdx, 0xa0(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x9(%rax)
cmpq $0x2000, 0x98(%rax) # imm = 0x2000
jbe 0x45872
movq -0x20(%rbp), %rax
movq $0x2000, 0x98(%rax) # imm = 0x2000
movq $0x2000, 0xa0(%rax) # imm = 0x2000
jmp 0x4587c
movq -0x20(%rbp), %rax
movb $0x0, 0x9(%rax)
jmp 0x4587e
movq -0x20(%rbp), %rdi
addq $0x100b0, %rdi # imm = 0x100B0
xorl %eax, %eax
movl %eax, %esi
callq 0x264f0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN29PFS_buffer_scalable_containerI21PFS_table_share_indexLi8192ELi8192E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov byte ptr [rax+8], 1
mov byte ptr [rax+9], 1
mov qword ptr [rax+10h], 4000000h
mov qword ptr [rax+98h], 2000h
mov qword ptr [rax+0A0h], 2000h
mov qword ptr [rax], 0
mov dword ptr [rax+18h], 0
mov dword ptr [rax+58h], 0
mov [rbp+var_14], 0
loc_4578A:
cmp [rbp+var_14], 2000h
jge short loc_457B2
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_14]
mov qword ptr [rax+rcx*8+0A8h], 0
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_4578A
loc_457B2:
cmp [rbp+var_10], 0
jnz short loc_457CD
mov rax, [rbp+var_20]
mov qword ptr [rax+98h], 0
jmp loc_4587E
loc_457CD:
cmp [rbp+var_10], 0
jle loc_45874
mov rax, [rbp+var_10]
mov ecx, 2000h
cqo
idiv rcx
cmp rdx, 0
jnz short loc_4580A
mov rax, [rbp+var_10]
mov ecx, 2000h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_20]
mov [rax+98h], rcx
jmp short loc_45843
loc_4580A:
mov rax, [rbp+var_10]
mov ecx, 2000h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rcx, 1
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov ecx, 2000h
cqo
idiv rcx
mov rax, [rbp+var_20]
mov [rax+0A0h], rdx
loc_45843:
mov rax, [rbp+var_20]
mov byte ptr [rax+9], 0
cmp qword ptr [rax+98h], 2000h
jbe short loc_45872
mov rax, [rbp+var_20]
mov qword ptr [rax+98h], 2000h
mov qword ptr [rax+0A0h], 2000h
loc_45872:
jmp short loc_4587C
loc_45874:
mov rax, [rbp+var_20]
mov byte ptr [rax+9], 0
loc_4587C:
jmp short $+2
loc_4587E:
mov rdi, [rbp+var_20]
add rdi, 100B0h
xor eax, eax
mov esi, eax
call _pthread_mutex_init
xor eax, eax
add rsp, 20h
pop rbp
retn
|
long long PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>::init(
long long a1,
long long a2)
{
int i; // [rsp+Ch] [rbp-14h]
*(_BYTE *)(a1 + 8) = 1;
*(_BYTE *)(a1 + 9) = 1;
*(_QWORD *)(a1 + 16) = 0x4000000LL;
*(_QWORD *)(a1 + 152) = 0x2000LL;
*(_QWORD *)(a1 + 160) = 0x2000LL;
*(_QWORD *)a1 = 0LL;
*(_DWORD *)(a1 + 24) = 0;
*(_DWORD *)(a1 + 88) = 0;
for ( i = 0; i < 0x2000; ++i )
*(_QWORD *)(a1 + 8LL * i + 168) = 0LL;
if ( a2 )
{
if ( a2 <= 0 )
{
*(_BYTE *)(a1 + 9) = 0;
}
else
{
if ( a2 % 0x2000 )
{
*(_QWORD *)(a1 + 152) = a2 / 0x2000 + 1;
*(_QWORD *)(a1 + 160) = a2 % 0x2000;
}
else
{
*(_QWORD *)(a1 + 152) = a2 / 0x2000;
}
*(_BYTE *)(a1 + 9) = 0;
if ( *(_QWORD *)(a1 + 152) > 0x2000uLL )
{
*(_QWORD *)(a1 + 152) = 0x2000LL;
*(_QWORD *)(a1 + 160) = 0x2000LL;
}
}
}
else
{
*(_QWORD *)(a1 + 152) = 0LL;
}
pthread_mutex_init(a1 + 65712, 0LL);
return 0LL;
}
|
init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV byte ptr [RAX + 0x8],0x1
MOV byte ptr [RAX + 0x9],0x1
MOV qword ptr [RAX + 0x10],0x4000000
MOV qword ptr [RAX + 0x98],0x2000
MOV qword ptr [RAX + 0xa0],0x2000
MOV qword ptr [RAX],0x0
MOV dword ptr [RAX + 0x18],0x0
MOV dword ptr [RAX + 0x58],0x0
MOV dword ptr [RBP + -0x14],0x0
LAB_0014578a:
CMP dword ptr [RBP + -0x14],0x2000
JGE 0x001457b2
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8 + 0xa8],0x0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0014578a
LAB_001457b2:
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001457cd
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],0x0
JMP 0x0014587e
LAB_001457cd:
CMP qword ptr [RBP + -0x10],0x0
JLE 0x00145874
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x2000
CQO
IDIV RCX
CMP RDX,0x0
JNZ 0x0014580a
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x2000
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],RCX
JMP 0x00145843
LAB_0014580a:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x2000
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RCX,0x1
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x2000
CQO
IDIV RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0xa0],RDX
LAB_00145843:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x9],0x0
CMP qword ptr [RAX + 0x98],0x2000
JBE 0x00145872
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],0x2000
MOV qword ptr [RAX + 0xa0],0x2000
LAB_00145872:
JMP 0x0014587c
LAB_00145874:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x9],0x0
LAB_0014587c:
JMP 0x0014587e
LAB_0014587e:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x100b0
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001264f0
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192,
PFS_buffer_default_array<PFS_table_share_index>,
PFS_buffer_default_allocator<PFS_table_share_index> >::init(long) */
int8 __thiscall
PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>
::init(PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>
*this,long param_1)
{
int local_1c;
this[8] = (PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>
)0x1;
this[9] = (PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>
)0x1;
*(int8 *)(this + 0x10) = 0x4000000;
*(int8 *)(this + 0x98) = 0x2000;
*(int8 *)(this + 0xa0) = 0x2000;
*(int8 *)this = 0;
*(int4 *)(this + 0x18) = 0;
*(int4 *)(this + 0x58) = 0;
for (local_1c = 0; local_1c < 0x2000; local_1c = local_1c + 1) {
*(int8 *)(this + (long)local_1c * 8 + 0xa8) = 0;
}
if (param_1 == 0) {
*(int8 *)(this + 0x98) = 0;
}
else if (param_1 < 1) {
this[9] = (PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>
)0x0;
}
else {
if (param_1 % 0x2000 == 0) {
*(long *)(this + 0x98) = param_1 / 0x2000;
}
else {
*(long *)(this + 0x98) = param_1 / 0x2000 + 1;
*(long *)(this + 0xa0) = param_1 % 0x2000;
}
this[9] = (PFS_buffer_scalable_container<PFS_table_share_index,8192,8192,PFS_buffer_default_array<PFS_table_share_index>,PFS_buffer_default_allocator<PFS_table_share_index>>
)0x0;
if (0x2000 < *(ulong *)(this + 0x98)) {
*(int8 *)(this + 0x98) = 0x2000;
*(int8 *)(this + 0xa0) = 0x2000;
}
}
pthread_mutex_init((pthread_mutex_t *)(this + 0x100b0),(pthread_mutexattr_t *)0x0);
return 0;
}
|
|
63,786 |
PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192, PFS_buffer_default_array<PFS_table_share_index>, PFS_buffer_default_allocator<PFS_table_share_index>>::init(long)
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
int init(long max_size)
{
int i;
m_initialized= true;
m_full= true;
m_max= PFS_PAGE_COUNT * PFS_PAGE_SIZE;
m_max_page_count= PFS_PAGE_COUNT;
m_last_page_size= PFS_PAGE_SIZE;
m_lost= 0;
m_monotonic.m_u32= 0;
m_max_page_index.m_u32= 0;
for (i=0 ; i < PFS_PAGE_COUNT; i++)
{
m_pages[i]= NULL;
}
if (max_size == 0)
{
/* No allocation. */
m_max_page_count= 0;
}
else if (max_size > 0)
{
if (max_size % PFS_PAGE_SIZE == 0)
{
m_max_page_count= max_size / PFS_PAGE_SIZE;
}
else
{
m_max_page_count= max_size / PFS_PAGE_SIZE + 1;
m_last_page_size= max_size % PFS_PAGE_SIZE;
}
/* Bounded allocation. */
m_full= false;
if (m_max_page_count > PFS_PAGE_COUNT)
{
m_max_page_count= PFS_PAGE_COUNT;
m_last_page_size= PFS_PAGE_SIZE;
}
}
else
{
/* max_size = -1 means unbounded allocation */
m_full= false;
}
assert(m_max_page_count <= PFS_PAGE_COUNT);
assert(0 < m_last_page_size);
assert(m_last_page_size <= PFS_PAGE_SIZE);
pthread_mutex_init(& m_critical_section, NULL);
return 0;
}
|
O3
|
c
|
PFS_buffer_scalable_container<PFS_table_share_index, 8192, 8192, PFS_buffer_default_array<PFS_table_share_index>, PFS_buffer_default_allocator<PFS_table_share_index>>::init(long):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movw $0x101, 0x8(%rdi) # imm = 0x101
movq $0x20000, 0x10(%rdi) # imm = 0x20000
movq $0x400, 0x98(%rdi) # imm = 0x400
movq $0x80, 0xa0(%rdi)
movq $0x0, (%rdi)
xorl %eax, %eax
movl %eax, 0x18(%rdi)
movl %eax, 0x58(%rdi)
addq $0xa8, %rdi
movl $0x2000, %edx # imm = 0x2000
xorl %esi, %esi
callq 0x261c0
testq %r14, %r14
je 0x3fe80
jle 0x3fe8d
movq %r14, %rax
shrq $0x7, %rax
andq $0x7f, %r14
je 0x3fe55
incq %rax
movq %r14, 0xa0(%rbx)
movq %rax, 0x98(%rbx)
movb $0x0, 0x9(%rbx)
cmpq $0x401, %rax # imm = 0x401
jb 0x3fe91
movq $0x400, 0x98(%rbx) # imm = 0x400
movq $0x80, 0xa0(%rbx)
jmp 0x3fe91
movq $0x0, 0x98(%rbx)
jmp 0x3fe91
movb $0x0, 0x9(%rbx)
addq $0x20b0, %rbx # imm = 0x20B0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26510
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
|
_ZN29PFS_buffer_scalable_containerI16PFS_setup_objectLi128ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov word ptr [rdi+8], 101h
mov qword ptr [rdi+10h], 20000h
mov qword ptr [rdi+98h], 400h
mov qword ptr [rdi+0A0h], 80h
mov qword ptr [rdi], 0
xor eax, eax
mov [rdi+18h], eax
mov [rdi+58h], eax
add rdi, 0A8h
mov edx, 2000h
xor esi, esi
call _memset
test r14, r14
jz short loc_3FE80
jle short loc_3FE8D
mov rax, r14
shr rax, 7
and r14, 7Fh
jz short loc_3FE55
inc rax
mov [rbx+0A0h], r14
loc_3FE55:
mov [rbx+98h], rax
mov byte ptr [rbx+9], 0
cmp rax, 401h
jb short loc_3FE91
mov qword ptr [rbx+98h], 400h
mov qword ptr [rbx+0A0h], 80h
jmp short loc_3FE91
loc_3FE80:
mov qword ptr [rbx+98h], 0
jmp short loc_3FE91
loc_3FE8D:
mov byte ptr [rbx+9], 0
loc_3FE91:
add rbx, 20B0h
mov rdi, rbx
xor esi, esi
call _pthread_mutex_init
xor eax, eax
pop rbx
pop r14
pop rbp
retn
|
long long PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>::init(
long long a1,
long long a2)
{
unsigned long long v2; // rax
*(_WORD *)(a1 + 8) = 257;
*(_QWORD *)(a1 + 16) = 0x20000LL;
*(_QWORD *)(a1 + 152) = 1024LL;
*(_QWORD *)(a1 + 160) = 128LL;
*(_QWORD *)a1 = 0LL;
*(_DWORD *)(a1 + 24) = 0;
*(_DWORD *)(a1 + 88) = 0;
memset(a1 + 168, 0LL, 0x2000LL);
if ( a2 )
{
if ( a2 <= 0 )
{
*(_BYTE *)(a1 + 9) = 0;
}
else
{
v2 = (unsigned long long)a2 >> 7;
if ( (a2 & 0x7F) != 0 )
{
++v2;
*(_QWORD *)(a1 + 160) = a2 & 0x7F;
}
*(_QWORD *)(a1 + 152) = v2;
*(_BYTE *)(a1 + 9) = 0;
if ( v2 >= 0x401 )
{
*(_QWORD *)(a1 + 152) = 1024LL;
*(_QWORD *)(a1 + 160) = 128LL;
}
}
}
else
{
*(_QWORD *)(a1 + 152) = 0LL;
}
pthread_mutex_init(a1 + 8368, 0LL);
return 0LL;
}
|
init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV word ptr [RDI + 0x8],0x101
MOV qword ptr [RDI + 0x10],0x20000
MOV qword ptr [RDI + 0x98],0x400
MOV qword ptr [RDI + 0xa0],0x80
MOV qword ptr [RDI],0x0
XOR EAX,EAX
MOV dword ptr [RDI + 0x18],EAX
MOV dword ptr [RDI + 0x58],EAX
ADD RDI,0xa8
MOV EDX,0x2000
XOR ESI,ESI
CALL 0x001261c0
TEST R14,R14
JZ 0x0013fe80
JLE 0x0013fe8d
MOV RAX,R14
SHR RAX,0x7
AND R14,0x7f
JZ 0x0013fe55
INC RAX
MOV qword ptr [RBX + 0xa0],R14
LAB_0013fe55:
MOV qword ptr [RBX + 0x98],RAX
MOV byte ptr [RBX + 0x9],0x0
CMP RAX,0x401
JC 0x0013fe91
MOV qword ptr [RBX + 0x98],0x400
MOV qword ptr [RBX + 0xa0],0x80
JMP 0x0013fe91
LAB_0013fe80:
MOV qword ptr [RBX + 0x98],0x0
JMP 0x0013fe91
LAB_0013fe8d:
MOV byte ptr [RBX + 0x9],0x0
LAB_0013fe91:
ADD RBX,0x20b0
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00126510
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_setup_object, 128, 1024,
PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>
>::init(long) */
int8 __thiscall
PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>
::init(PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>
*this,long param_1)
{
ulong uVar1;
*(int2 *)(this + 8) = 0x101;
*(int8 *)(this + 0x10) = 0x20000;
*(int8 *)(this + 0x98) = 0x400;
*(int8 *)(this + 0xa0) = 0x80;
*(int8 *)this = 0;
*(int4 *)(this + 0x18) = 0;
*(int4 *)(this + 0x58) = 0;
memset(this + 0xa8,0,0x2000);
if (param_1 == 0) {
*(int8 *)(this + 0x98) = 0;
}
else if (param_1 < 1) {
this[9] = (PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>
)0x0;
}
else {
uVar1 = (ulong)param_1 >> 7;
if ((param_1 & 0x7fU) != 0) {
uVar1 = uVar1 + 1;
*(ulong *)(this + 0xa0) = param_1 & 0x7fU;
}
*(ulong *)(this + 0x98) = uVar1;
this[9] = (PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>
)0x0;
if (0x400 < uVar1) {
*(int8 *)(this + 0x98) = 0x400;
*(int8 *)(this + 0xa0) = 0x80;
}
}
pthread_mutex_init((pthread_mutex_t *)(this + 0x20b0),(pthread_mutexattr_t *)0x0);
return 0;
}
|
|
63,787 |
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()
|
llama.cpp/common/json.hpp
|
token_type scan()
{
// initially, skip the BOM
if (position.chars_read_total == 0 && !skip_bom())
{
error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
return token_type::parse_error;
}
// read next character and ignore whitespace
skip_whitespace();
// ignore comments
while (ignore_comments && current == '/')
{
if (!scan_comment())
{
return token_type::parse_error;
}
// skip following whitespace
skip_whitespace();
}
switch (current)
{
// structural characters
case '[':
return token_type::begin_array;
case ']':
return token_type::end_array;
case '{':
return token_type::begin_object;
case '}':
return token_type::end_object;
case ':':
return token_type::name_separator;
case ',':
return token_type::value_separator;
// literals
case 't':
{
std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};
return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
}
case 'f':
{
std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};
return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
}
case 'n':
{
std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};
return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
}
// string
case '\"':
return scan_string();
// number
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return scan_number();
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
case char_traits<char_type>::eof():
return token_type::end_of_input;
// error
default:
error_message = "invalid literal";
return token_type::parse_error;
}
}
|
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():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x84a57
movq %rbx, %rdi
callq 0x84bee
testb %al, %al
je 0x84b19
movabsq $0x100002600, %r14 # imm = 0x100002600
movq %rbx, %rdi
callq 0x225bc
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x84aa1
btq %rax, %r14
jb 0x84a61
jmp 0x84aa1
movq %rbx, %rdi
callq 0x84c30
testb %al, %al
je 0x84b24
movq %rbx, %rdi
callq 0x225bc
movl 0x14(%rbx), %eax
cmpq $0x20, %rax
ja 0x84aa1
btq %rax, %r14
jb 0x84a8a
cmpl $0x2f, %eax
jne 0x84aac
cmpb $0x0, 0x10(%rbx)
jne 0x84a7a
cmpl $0x5a, %eax
jg 0x84adc
leal -0x22(%rax), %ecx
cmpl $0x18, %ecx
ja 0x84b66
leaq 0x8fe88(%rip), %rax # 0x11494c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x8519a
cmpl $0x6d, %eax
jle 0x84b31
cmpl $0x7a, %eax
jg 0x84b74
cmpl $0x6e, %eax
je 0x84bae
cmpl $0x74, %eax
jne 0x84b85
leaq 0xc(%rsp), %rsi
movl $0x65757274, (%rsi) # imm = 0x65757274
movl $0x4, %edx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x84bc6
leaq 0x96b5f(%rip), %rax # 0x11b67f
movq %rax, 0x70(%rbx)
movl $0xe, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
cmpl $0x5b, %eax
je 0x84bda
cmpl $0x5d, %eax
je 0x84be4
cmpl $0x66, %eax
jne 0x84b85
leaq 0x10(%rsp), %rsi
movb $0x65, 0x4(%rsi)
movl $0x736c6166, (%rsi) # imm = 0x736C6166
movl $0x5, %edx
movq %rbx, %rdi
movl $0x2, %ecx
jmp 0x84bc6
incl %eax
cmpl $0x2, %eax
jae 0x84b85
movl $0xf, %eax
jmp 0x84b29
cmpl $0x7b, %eax
je 0x84bd0
cmpl $0x7d, %eax
jne 0x84b85
movl $0xb, %eax
jmp 0x84b29
leaq 0x96b20(%rip), %rax # 0x11b6ac
jmp 0x84b20
movl $0xc, %eax
jmp 0x84b29
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x84d28
movl $0xd, %eax
jmp 0x84b29
leaq 0x8(%rsp), %rsi
movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E
movl $0x4, %edx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0x84cac
jmp 0x84b29
movl $0x9, %eax
jmp 0x84b29
movl $0x8, %eax
jmp 0x84b29
movl $0xa, %eax
jmp 0x84b29
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
cmp qword ptr [rdi+20h], 0
jnz short loc_84A57
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_EEEEE8skip_bomEv; 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>>>::skip_bom(void)
test al, al
jz loc_84B19
loc_84A57:
mov r14, 100002600h
loc_84A61:
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)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_84AA1
bt r14, rax
jb short loc_84A61
jmp short loc_84AA1
loc_84A7A:
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_EEEEE12scan_commentEv; 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>>>::scan_comment(void)
test al, al
jz loc_84B24
loc_84A8A:
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)
mov eax, [rbx+14h]
cmp rax, 20h ; ' '
ja short loc_84AA1
bt r14, rax
jb short loc_84A8A
loc_84AA1:
cmp eax, 2Fh ; '/'
jnz short loc_84AAC
cmp byte ptr [rbx+10h], 0
jnz short loc_84A7A
loc_84AAC:
cmp eax, 5Ah ; 'Z'
jg short loc_84ADC
lea ecx, [rax-22h]; switch 25 cases
cmp ecx, 18h
ja def_84ACB; jumptable 0000000000084ACB default case
lea rax, jpt_84ACB
movsxd rcx, ds:(jpt_84ACB - 11494Ch)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_84ACD:
mov rdi, rbx; jumptable 0000000000084ACB cases 45,48-57
add rsp, 18h
pop rbx
pop r14
jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; 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>>>::scan_number(void)
loc_84ADC:
cmp eax, 6Dh ; 'm'
jle short loc_84B31
cmp eax, 7Ah ; 'z'
jg loc_84B74
cmp eax, 6Eh ; 'n'
jz loc_84BAE
cmp eax, 74h ; 't'
jnz loc_84B85; jumptable 0000000000084ACB cases 35-43,46,47
lea rsi, [rsp+28h+var_1C]
mov dword ptr [rsi], 65757274h
mov edx, 4
mov rdi, rbx
mov ecx, 1
jmp loc_84BC6
loc_84B19:
lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "...
loc_84B20:
mov [rbx+70h], rax
loc_84B24:
mov eax, 0Eh
loc_84B29:
add rsp, 18h
pop rbx
pop r14
retn
loc_84B31:
cmp eax, 5Bh ; '['
jz loc_84BDA
cmp eax, 5Dh ; ']'
jz loc_84BE4
cmp eax, 66h ; 'f'
jnz short loc_84B85; jumptable 0000000000084ACB cases 35-43,46,47
lea rsi, [rsp+28h+var_18]
mov byte ptr [rsi+4], 65h ; 'e'
mov dword ptr [rsi], 736C6166h
mov edx, 5
mov rdi, rbx
mov ecx, 2
jmp short loc_84BC6
def_84ACB:
inc eax; jumptable 0000000000084ACB default case
cmp eax, 2
jnb short loc_84B85; jumptable 0000000000084ACB cases 35-43,46,47
mov eax, 0Fh
jmp short loc_84B29
loc_84B74:
cmp eax, 7Bh ; '{'
jz short loc_84BD0
cmp eax, 7Dh ; '}'
jnz short loc_84B85; jumptable 0000000000084ACB cases 35-43,46,47
mov eax, 0Bh
jmp short loc_84B29
loc_84B85:
lea rax, aInvalidLiteral; jumptable 0000000000084ACB cases 35-43,46,47
jmp short loc_84B20
loc_84B8E:
mov eax, 0Ch; jumptable 0000000000084ACB case 58
jmp short loc_84B29
loc_84B95:
mov rdi, rbx; jumptable 0000000000084ACB case 34
add rsp, 18h
pop rbx
pop r14
jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; 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>>>::scan_string(void)
loc_84BA4:
mov eax, 0Dh; jumptable 0000000000084ACB case 44
jmp loc_84B29
loc_84BAE:
lea rsi, [rsp+28h+var_20]
mov dword ptr [rsi], 6C6C756Eh
mov edx, 4
mov rdi, rbx
mov ecx, 3
loc_84BC6:
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; 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>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
jmp loc_84B29
loc_84BD0:
mov eax, 9
jmp loc_84B29
loc_84BDA:
mov eax, 8
jmp loc_84B29
loc_84BE4:
mov eax, 0Ah
jmp loc_84B29
|
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(
__m128i *a1)
{
long long v1; // r14
unsigned long long v2; // rax
long long result; // rax
int *v4; // rsi
long long v5; // rdx
long long v6; // rcx
const char *v7; // rax
int v8; // [rsp+8h] [rbp-20h] BYREF
int v9; // [rsp+Ch] [rbp-1Ch] BYREF
_BYTE v10[24]; // [rsp+10h] [rbp-18h] BYREF
if ( a1[2].m128i_i64[0]
|| (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(a1) )
{
v1 = 0x100002600LL;
do
{
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);
v2 = a1[1].m128i_u32[1];
}
while ( v2 <= 0x20 && _bittest64(&v1, v2) );
while ( (_DWORD)v2 == 47 && a1[1].m128i_i8[0] )
{
if ( !(unsigned __int8)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(a1) )
return 14LL;
do
{
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);
v2 = a1[1].m128i_u32[1];
}
while ( v2 <= 0x20 && _bittest64(&v1, v2) );
}
if ( (int)v2 <= 90 )
{
switch ( (int)v2 )
{
case '"':
result = 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(a1);
break;
case '#':
case '$':
case '%':
case '&':
case '\'':
case '(':
case ')':
case '*':
case '+':
case '.':
case '/':
goto LABEL_33;
case ',':
result = 13LL;
break;
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
result = 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_number(a1);
break;
case ':':
result = 12LL;
break;
default:
if ( (unsigned int)(v2 + 1) >= 2 )
goto LABEL_33;
result = 15LL;
break;
}
return result;
}
if ( (int)v2 <= 109 )
{
switch ( (_DWORD)v2 )
{
case '[':
return 8LL;
case ']':
return 10LL;
case 'f':
v4 = (int *)v10;
qmemcpy(v10, "false", 5);
v5 = 5LL;
v6 = 2LL;
return 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_literal(
a1,
v4,
v5,
v6);
}
}
else if ( (int)v2 > 122 )
{
if ( (_DWORD)v2 == 123 )
return 9LL;
if ( (_DWORD)v2 == 125 )
return 11LL;
}
else
{
if ( (_DWORD)v2 == 110 )
{
v4 = &v8;
v8 = 1819047278;
v5 = 4LL;
v6 = 3LL;
return 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_literal(
a1,
v4,
v5,
v6);
}
if ( (_DWORD)v2 == 116 )
{
v4 = &v9;
v9 = 1702195828;
v5 = 4LL;
v6 = 1LL;
return 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_literal(
a1,
v4,
v5,
v6);
}
}
LABEL_33:
v7 = "invalid literal";
}
else
{
v7 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
}
a1[7].m128i_i64[0] = (long long)v7;
return 14LL;
}
|
scan:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x00184a57
MOV RDI,RBX
CALL 0x00184bee
TEST AL,AL
JZ 0x00184b19
LAB_00184a57:
MOV R14,0x100002600
LAB_00184a61:
MOV RDI,RBX
CALL 0x001225bc
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x00184aa1
BT R14,RAX
JC 0x00184a61
JMP 0x00184aa1
LAB_00184a7a:
MOV RDI,RBX
CALL 0x00184c30
TEST AL,AL
JZ 0x00184b24
LAB_00184a8a:
MOV RDI,RBX
CALL 0x001225bc
MOV EAX,dword ptr [RBX + 0x14]
CMP RAX,0x20
JA 0x00184aa1
BT R14,RAX
JC 0x00184a8a
LAB_00184aa1:
CMP EAX,0x2f
JNZ 0x00184aac
CMP byte ptr [RBX + 0x10],0x0
JNZ 0x00184a7a
LAB_00184aac:
CMP EAX,0x5a
JG 0x00184adc
LEA ECX,[RAX + -0x22]
CMP ECX,0x18
JA 0x00184b66
LEA RAX,[0x21494c]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_2d:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x0018519a
LAB_00184adc:
CMP EAX,0x6d
JLE 0x00184b31
CMP EAX,0x7a
JG 0x00184b74
CMP EAX,0x6e
JZ 0x00184bae
CMP EAX,0x74
JNZ 0x00184b85
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x65757274
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x1
JMP 0x00184bc6
LAB_00184b19:
LEA RAX,[0x21b67f]
LAB_00184b20:
MOV qword ptr [RBX + 0x70],RAX
LAB_00184b24:
MOV EAX,0xe
LAB_00184b29:
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_00184b31:
CMP EAX,0x5b
JZ 0x00184bda
CMP EAX,0x5d
JZ 0x00184be4
CMP EAX,0x66
JNZ 0x00184b85
LEA RSI,[RSP + 0x10]
MOV byte ptr [RSI + 0x4],0x65
MOV dword ptr [RSI],0x736c6166
MOV EDX,0x5
MOV RDI,RBX
MOV ECX,0x2
JMP 0x00184bc6
default:
INC EAX
CMP EAX,0x2
JNC 0x00184b85
MOV EAX,0xf
JMP 0x00184b29
LAB_00184b74:
CMP EAX,0x7b
JZ 0x00184bd0
CMP EAX,0x7d
JNZ 0x00184b85
MOV EAX,0xb
JMP 0x00184b29
caseD_23:
LEA RAX,[0x21b6ac]
JMP 0x00184b20
caseD_3a:
MOV EAX,0xc
JMP 0x00184b29
caseD_22:
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x00184d28
caseD_2c:
MOV EAX,0xd
JMP 0x00184b29
LAB_00184bae:
LEA RSI,[RSP + 0x8]
MOV dword ptr [RSI],0x6c6c756e
MOV EDX,0x4
MOV RDI,RBX
MOV ECX,0x3
LAB_00184bc6:
CALL 0x00184cac
JMP 0x00184b29
LAB_00184bd0:
MOV EAX,0x9
JMP 0x00184b29
LAB_00184bda:
MOV EAX,0x8
JMP 0x00184b29
LAB_00184be4:
MOV EAX,0xa
JMP 0x00184b29
|
/* 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() */
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(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;
int iVar2;
ulong uVar3;
int8 uVar4;
char *pcVar5;
int8 uVar6;
int4 *puVar7;
int4 local_20;
int4 local_1c;
int4 local_18;
int1 local_14;
if ((*(long *)(this + 0x20) != 0) || (cVar1 = skip_bom(this), cVar1 != '\0')) {
do {
get(this);
uVar3 = (ulong)*(uint *)(this + 0x14);
if (0x20 < uVar3) break;
} while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0);
do {
iVar2 = (int)uVar3;
if ((iVar2 != 0x2f) ||
(this[0x10] ==
(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>>>
)0x0)) goto LAB_00184aac;
cVar1 = scan_comment(this);
if (cVar1 == '\0') goto LAB_00184b24;
do {
get(this);
uVar3 = (ulong)*(uint *)(this + 0x14);
if (0x20 < uVar3) break;
} while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0);
} while( true );
}
pcVar5 = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
goto LAB_00184b20;
LAB_00184aac:
if (0x5a < iVar2) {
if (iVar2 < 0x6e) {
if (iVar2 == 0x5b) {
return 8;
}
if (iVar2 == 0x5d) {
return 10;
}
if (iVar2 == 0x66) {
puVar7 = &local_18;
local_14 = 0x65;
local_18 = 0x736c6166;
uVar6 = 5;
uVar4 = 2;
goto LAB_00184bc6;
}
}
else if (iVar2 < 0x7b) {
if (iVar2 == 0x6e) {
puVar7 = &local_20;
local_20 = 0x6c6c756e;
uVar6 = 4;
uVar4 = 3;
LAB_00184bc6:
uVar4 = scan_literal(this,puVar7,uVar6,uVar4);
return uVar4;
}
if (iVar2 == 0x74) {
puVar7 = &local_1c;
local_1c = 0x65757274;
uVar6 = 4;
uVar4 = 1;
goto LAB_00184bc6;
}
}
else {
if (iVar2 == 0x7b) {
return 9;
}
if (iVar2 == 0x7d) {
return 0xb;
}
}
goto switchD_00184acb_caseD_23;
}
switch(iVar2) {
case 0x22:
uVar4 = scan_string(this);
return uVar4;
case 0x2c:
uVar4 = 0xd;
break;
case 0x2d:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
uVar4 = scan_number(this);
return uVar4;
case 0x3a:
uVar4 = 0xc;
break;
default:
if (iVar2 + 1U < 2) {
return 0xf;
}
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2e:
case 0x2f:
switchD_00184acb_caseD_23:
pcVar5 = "invalid literal";
LAB_00184b20:
*(char **)(this + 0x70) = pcVar5;
LAB_00184b24:
uVar4 = 0xe;
}
return uVar4;
}
|
|
63,788 |
mi_find_last_pos
|
eloqsql/storage/myisam/mi_write.c
|
static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys, length, UNINIT_VAR(last_length), key_ref_length;
uchar *end,*lastpos,*prevpos;
uchar key_buff[HA_MAX_KEY_BUFF];
DBUG_ENTER("_mi_find_last_pos");
key_ref_length=2;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
keys=length/keyinfo->keylength-2;
*return_key_length=length=keyinfo->keylength;
end=page+keys*length;
*after_key=end+length;
memcpy(key,end,length);
DBUG_RETURN(end);
}
end=page+length-key_ref_length;
DBUG_ASSERT(page < end);
*key='\0';
length=0;
lastpos=page;
do
{
prevpos=lastpos; lastpos=page;
last_length=length;
memcpy(key, key_buff, length); /* previous key */
if (!(length=(*keyinfo->get_key)(keyinfo,0,&page,key_buff)))
{
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
} while (page < end);
*return_key_length=last_length;
*after_key=lastpos;
DBUG_PRINT("exit",("returns: %p page: %p end: %p",
prevpos, page, end));
DBUG_RETURN(prevpos);
}
|
O0
|
c
|
mi_find_last_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp # imm = 0x520
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x4d0(%rbp)
movq %rsi, -0x4d8(%rbp)
movq %rdx, -0x4e0(%rbp)
movq %rcx, -0x4e8(%rbp)
movq %r8, -0x4f0(%rbp)
movl -0x4fc(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movl $0x2, -0x500(%rbp)
movq -0x4d8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x4d8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
subl -0x500(%rbp), %eax
movl %eax, -0x4f8(%rbp)
movl -0x500(%rbp), %ecx
movq -0x4d8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x4d8(%rbp)
movq -0x4d0(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
jne 0xcbe85
movl -0x4f8(%rbp), %eax
movq -0x4d0(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
xorl %edx, %edx
divl %ecx
subl $0x2, %eax
movl %eax, -0x4f4(%rbp)
movq -0x4d0(%rbp), %rax
movzwl 0x12(%rax), %ecx
movl %ecx, -0x4f8(%rbp)
movq -0x4e8(%rbp), %rax
movl %ecx, (%rax)
movq -0x4d8(%rbp), %rax
movl -0x4f4(%rbp), %ecx
imull -0x4f8(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x508(%rbp)
movq -0x508(%rbp), %rcx
movl -0x4f8(%rbp), %eax
addq %rax, %rcx
movq -0x4f0(%rbp), %rax
movq %rcx, (%rax)
movq -0x4e0(%rbp), %rdi
movq -0x508(%rbp), %rsi
movl -0x4f8(%rbp), %eax
movl %eax, %edx
callq 0x29090
movq -0x508(%rbp), %rax
movq %rax, -0x4c8(%rbp)
jmp 0xcbfbd
movq -0x4d8(%rbp), %rax
movl -0x4f8(%rbp), %ecx
addq %rcx, %rax
movl -0x500(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x508(%rbp)
jmp 0xcbeae
movq -0x4e0(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4f8(%rbp)
movq -0x4d8(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rax
movq %rax, -0x518(%rbp)
movq -0x4d8(%rbp), %rax
movq %rax, -0x510(%rbp)
movl -0x4f8(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movq -0x4e0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4f8(%rbp), %eax
movl %eax, %edx
callq 0x29090
movq -0x4d0(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x4d0(%rbp), %rdi
leaq -0x4c0(%rbp), %rcx
xorl %esi, %esi
leaq -0x4d8(%rbp), %rdx
callq *%rax
movl %eax, -0x4f8(%rbp)
cmpl $0x0, %eax
jne 0xcbf75
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xb25d0
callq 0xfa320
movl $0x7e, (%rax)
movq $0x0, -0x4c8(%rbp)
jmp 0xcbfbd
jmp 0xcbf77
movq -0x4d8(%rbp), %rax
cmpq -0x508(%rbp), %rax
jb 0xcbed0
movl -0x4fc(%rbp), %ecx
movq -0x4e8(%rbp), %rax
movl %ecx, (%rax)
movq -0x510(%rbp), %rcx
movq -0x4f0(%rbp), %rax
movq %rcx, (%rax)
jmp 0xcbfad
jmp 0xcbfaf
movq -0x518(%rbp), %rax
movq %rax, -0x4c8(%rbp)
movq -0x4c8(%rbp), %rax
movq %rax, -0x520(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xcbfed
movq -0x520(%rbp), %rax
addq $0x520, %rsp # imm = 0x520
popq %rbp
retq
callq 0x29230
nopw %cs:(%rax,%rax)
|
_mi_find_last_pos:
push rbp
mov rbp, rsp
sub rsp, 520h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_4D0], rdi
mov [rbp+var_4D8], rsi
mov [rbp+var_4E0], rdx
mov [rbp+var_4E8], rcx
mov [rbp+var_4F0], r8
mov eax, [rbp+var_4FC]
mov [rbp+var_4FC], eax
mov [rbp+var_500], 2
mov rax, [rbp+var_4D8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_4D8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
sub eax, [rbp+var_500]
mov [rbp+var_4F8], eax
mov ecx, [rbp+var_500]
mov rax, [rbp+var_4D8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_4D8], rax
mov rax, [rbp+var_4D0]
movzx eax, word ptr [rax+0Ah]
and eax, 2Eh
cmp eax, 0
jnz loc_CBE85
mov eax, [rbp+var_4F8]
mov rcx, [rbp+var_4D0]
movzx ecx, word ptr [rcx+12h]
xor edx, edx
div ecx
sub eax, 2
mov [rbp+var_4F4], eax
mov rax, [rbp+var_4D0]
movzx ecx, word ptr [rax+12h]
mov [rbp+var_4F8], ecx
mov rax, [rbp+var_4E8]
mov [rax], ecx
mov rax, [rbp+var_4D8]
mov ecx, [rbp+var_4F4]
imul ecx, [rbp+var_4F8]
mov ecx, ecx
add rax, rcx
mov [rbp+var_508], rax
mov rcx, [rbp+var_508]
mov eax, [rbp+var_4F8]
add rcx, rax
mov rax, [rbp+var_4F0]
mov [rax], rcx
mov rdi, [rbp+var_4E0]
mov rsi, [rbp+var_508]
mov eax, [rbp+var_4F8]
mov edx, eax
call _memcpy
mov rax, [rbp+var_508]
mov [rbp+var_4C8], rax
jmp loc_CBFBD
loc_CBE85:
mov rax, [rbp+var_4D8]
mov ecx, [rbp+var_4F8]
add rax, rcx
mov ecx, [rbp+var_500]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_508], rax
jmp short $+2
loc_CBEAE:
mov rax, [rbp+var_4E0]
mov byte ptr [rax], 0
mov [rbp+var_4F8], 0
mov rax, [rbp+var_4D8]
mov [rbp+var_510], rax
loc_CBED0:
mov rax, [rbp+var_510]
mov [rbp+var_518], rax
mov rax, [rbp+var_4D8]
mov [rbp+var_510], rax
mov eax, [rbp+var_4F8]
mov [rbp+var_4FC], eax
mov rdi, [rbp+var_4E0]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4F8]
mov edx, eax
call _memcpy
mov rax, [rbp+var_4D0]
mov rax, [rax+48h]
mov rdi, [rbp+var_4D0]
lea rcx, [rbp+var_4C0]
xor esi, esi
lea rdx, [rbp+var_4D8]
call rax
mov [rbp+var_4F8], eax
cmp eax, 0
jnz short loc_CBF75
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_4C8], 0
jmp short loc_CBFBD
loc_CBF75:
jmp short $+2
loc_CBF77:
mov rax, [rbp+var_4D8]
cmp rax, [rbp+var_508]
jb loc_CBED0
mov ecx, [rbp+var_4FC]
mov rax, [rbp+var_4E8]
mov [rax], ecx
mov rcx, [rbp+var_510]
mov rax, [rbp+var_4F0]
mov [rax], rcx
jmp short $+2
loc_CBFAD:
jmp short $+2
loc_CBFAF:
mov rax, [rbp+var_518]
mov [rbp+var_4C8], rax
loc_CBFBD:
mov rax, [rbp+var_4C8]
mov [rbp+var_520], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_CBFED
mov rax, [rbp+var_520]
add rsp, 520h
pop rbp
retn
loc_CBFED:
call ___stack_chk_fail
|
unsigned __int16 * mi_find_last_pos(
long long a1,
unsigned __int16 *a2,
_BYTE *a3,
unsigned int *a4,
unsigned __int16 **a5)
{
const char *v5; // rsi
unsigned __int16 *v7; // [rsp+8h] [rbp-518h]
unsigned __int16 *v8; // [rsp+10h] [rbp-510h]
char *v9; // [rsp+18h] [rbp-508h]
unsigned long long v10; // [rsp+18h] [rbp-508h]
unsigned int v11; // [rsp+24h] [rbp-4FCh]
unsigned int v12; // [rsp+28h] [rbp-4F8h]
unsigned int v13; // [rsp+28h] [rbp-4F8h]
unsigned int v14; // [rsp+28h] [rbp-4F8h]
unsigned int v15; // [rsp+2Ch] [rbp-4F4h]
unsigned __int16 *v19; // [rsp+48h] [rbp-4D8h] BYREF
long long v20; // [rsp+50h] [rbp-4D0h]
_BYTE v22[1208]; // [rsp+60h] [rbp-4C0h] BYREF
unsigned long long v23; // [rsp+518h] [rbp-8h]
v23 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v12 = (_byteswap_ushort(*a2) & 0x7FFF) - 2;
v19 = a2 + 1;
if ( (*(_WORD *)(a1 + 10) & 0x2E) != 0 )
{
v10 = (unsigned long long)v19 + v12 - 2;
*a3 = 0;
v14 = 0;
v8 = v19;
do
{
v7 = v8;
v8 = v19;
v11 = v14;
memcpy(a3, v22, v14);
v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v20 + 72))(v20, 0LL, &v19, v22);
if ( !v14 )
{
v5 = *(const char **)(*(_QWORD *)v20 + 616LL);
mi_report_error(126, (long long)v5);
*(_DWORD *)my_thread_var(126LL, v5) = 126;
return 0LL;
}
}
while ( (unsigned long long)v19 < v10 );
*a4 = v11;
*a5 = v8;
return v7;
}
else
{
v15 = v12 / *(unsigned __int16 *)(v20 + 18) - 2;
v13 = *(unsigned __int16 *)(v20 + 18);
*a4 = v13;
v9 = (char *)v19 + v13 * v15;
*a5 = (unsigned __int16 *)&v9[v13];
memcpy(a3, v9, v13);
return (unsigned __int16 *)v9;
}
}
|
_mi_find_last_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x520
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x4d0],RDI
MOV qword ptr [RBP + -0x4d8],RSI
MOV qword ptr [RBP + -0x4e0],RDX
MOV qword ptr [RBP + -0x4e8],RCX
MOV qword ptr [RBP + -0x4f0],R8
MOV EAX,dword ptr [RBP + -0x4fc]
MOV dword ptr [RBP + -0x4fc],EAX
MOV dword ptr [RBP + -0x500],0x2
MOV RAX,qword ptr [RBP + -0x4d8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x4d8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
SUB EAX,dword ptr [RBP + -0x500]
MOV dword ptr [RBP + -0x4f8],EAX
MOV ECX,dword ptr [RBP + -0x500]
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x4d8],RAX
MOV RAX,qword ptr [RBP + -0x4d0]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x2e
CMP EAX,0x0
JNZ 0x001cbe85
MOV EAX,dword ptr [RBP + -0x4f8]
MOV RCX,qword ptr [RBP + -0x4d0]
MOVZX ECX,word ptr [RCX + 0x12]
XOR EDX,EDX
DIV ECX
SUB EAX,0x2
MOV dword ptr [RBP + -0x4f4],EAX
MOV RAX,qword ptr [RBP + -0x4d0]
MOVZX ECX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x4f8],ECX
MOV RAX,qword ptr [RBP + -0x4e8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,dword ptr [RBP + -0x4f4]
IMUL ECX,dword ptr [RBP + -0x4f8]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x508],RAX
MOV RCX,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RBP + -0x4f8]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x4f0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x4e0]
MOV RSI,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RBP + -0x4f8]
MOV EDX,EAX
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x508]
MOV qword ptr [RBP + -0x4c8],RAX
JMP 0x001cbfbd
LAB_001cbe85:
MOV RAX,qword ptr [RBP + -0x4d8]
MOV ECX,dword ptr [RBP + -0x4f8]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x500]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x508],RAX
JMP 0x001cbeae
LAB_001cbeae:
MOV RAX,qword ptr [RBP + -0x4e0]
MOV byte ptr [RAX],0x0
MOV dword ptr [RBP + -0x4f8],0x0
MOV RAX,qword ptr [RBP + -0x4d8]
MOV qword ptr [RBP + -0x510],RAX
LAB_001cbed0:
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x518],RAX
MOV RAX,qword ptr [RBP + -0x4d8]
MOV qword ptr [RBP + -0x510],RAX
MOV EAX,dword ptr [RBP + -0x4f8]
MOV dword ptr [RBP + -0x4fc],EAX
MOV RDI,qword ptr [RBP + -0x4e0]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4f8]
MOV EDX,EAX
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x4d0]
LEA RCX,[RBP + -0x4c0]
XOR ESI,ESI
LEA RDX,[RBP + -0x4d8]
CALL RAX
MOV dword ptr [RBP + -0x4f8],EAX
CMP EAX,0x0
JNZ 0x001cbf75
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001b25d0
CALL 0x001fa320
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x4c8],0x0
JMP 0x001cbfbd
LAB_001cbf75:
JMP 0x001cbf77
LAB_001cbf77:
MOV RAX,qword ptr [RBP + -0x4d8]
CMP RAX,qword ptr [RBP + -0x508]
JC 0x001cbed0
MOV ECX,dword ptr [RBP + -0x4fc]
MOV RAX,qword ptr [RBP + -0x4e8]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RBP + -0x4f0]
MOV qword ptr [RAX],RCX
JMP 0x001cbfad
LAB_001cbfad:
JMP 0x001cbfaf
LAB_001cbfaf:
MOV RAX,qword ptr [RBP + -0x518]
MOV qword ptr [RBP + -0x4c8],RAX
LAB_001cbfbd:
MOV RAX,qword ptr [RBP + -0x4c8]
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001cbfed
MOV RAX,qword ptr [RBP + -0x520]
ADD RSP,0x520
POP RBP
RET
LAB_001cbfed:
CALL 0x00129230
|
byte * _mi_find_last_pos(long *param_1,byte *param_2,int1 *param_3,uint *param_4,
int8 *param_5)
{
ushort uVar1;
byte *pbVar2;
byte *pbVar3;
uint uVar4;
byte *pbVar5;
int4 *puVar6;
uint uVar7;
long in_FS_OFFSET;
byte *local_518;
uint local_500;
byte *local_4e0;
long *local_4d8;
byte *local_4d0;
int1 local_4c8 [1208];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = ((uint)param_2[1] | (*param_2 & 0x7f) << 8) - 2;
local_518 = param_2 + 2;
local_4e0 = local_518;
local_4d8 = param_1;
if ((*(ushort *)((long)param_1 + 10) & 0x2e) == 0) {
uVar1 = *(ushort *)((long)param_1 + 0x12);
uVar7 = (uint)*(ushort *)((long)param_1 + 0x12);
*param_4 = uVar7;
local_518 = local_518 + (uVar4 / uVar1 - 2) * uVar7;
*param_5 = local_518 + uVar7;
memcpy(param_3,local_518,(ulong)uVar7);
local_4d0 = local_518;
}
else {
pbVar5 = local_518 + ((ulong)uVar4 - 2);
*param_3 = 0;
local_500 = 0;
uVar4 = local_500;
do {
local_500 = uVar4;
pbVar3 = local_4e0;
pbVar2 = local_518;
local_518 = local_4e0;
memcpy(param_3,local_4c8,(ulong)local_500);
uVar4 = (*(code *)local_4d8[9])(local_4d8,0,&local_4e0,local_4c8);
if (uVar4 == 0) {
mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
local_4d0 = (byte *)0x0;
goto LAB_001cbfbd;
}
} while (local_4e0 < pbVar5);
*param_4 = local_500;
*param_5 = pbVar3;
local_4d0 = pbVar2;
}
LAB_001cbfbd:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_4d0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
63,789 |
init_weight_level
|
eloqsql/strings/ctype-uca.c
|
static my_bool
init_weight_level(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules,
MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
MY_COLL_RULE *r, *rlast;
int ncontractions= 0;
size_t i, npages= (src->maxchar + 1) / 256;
dst->maxchar= src->maxchar;
dst->levelno= src->levelno;
if (check_rules(loader, rules, dst, src))
return TRUE;
/* Allocate memory for pages and their lengths */
if (!(dst->lengths= (uchar *) (loader->once_alloc)(npages)) ||
!(dst->weights= (uint16 **) (loader->once_alloc)(npages *
sizeof(uint16 *))))
return TRUE;
/* Copy pages lengths and page pointers from the default UCA weights */
memcpy(dst->lengths, src->lengths, npages);
memcpy(dst->weights, src->weights, npages * sizeof(uint16 *));
/*
Calculate maximum lengths for the pages which will be overwritten.
Mark pages that will be otherwriten as NULL.
We'll allocate their own memory.
*/
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (!r->curr[1]) /* If not a contraction */
{
uint pagec= (r->curr[0] >> 8);
if (r->base[1]) /* Expansion */
{
/* Reserve space for maximum possible length */
dst->lengths[pagec]= MY_UCA_MAX_WEIGHT_SIZE;
}
else
{
/*
Not an expansion and not a contraction.
The page corresponding to r->curr[0] in "dst"
will need at least the same amount of weights
that r->base[0] has in "src".
*/
uint wsize= my_weight_size_on_page(src, r->base[0] >> 8);
if (dst->lengths[pagec] < wsize)
dst->lengths[pagec]= wsize;
}
dst->weights[pagec]= NULL; /* Mark that we'll overwrite this page */
}
else
ncontractions++;
}
ncontractions += (int)src->contractions.nitems;
if ((my_uca_generate_pages(loader, dst, src, (uint)npages)))
return TRUE;
if (ncontractions)
{
if (my_uca_alloc_contractions(&dst->contractions, loader, ncontractions))
return TRUE;
}
/*
Preparatory step is done at this point.
Now we have memory allocated for the pages that we'll overwrite,
and for contractions, including previous context contractions.
Also, for the pages that we'll overwrite, we have copied default weights.
Now iterate through the rules, overwrite weights for the characters
that appear in the rules, and put all contractions into contraction list.
*/
for (r= rules->rule; r < rlast; r++)
{
if (apply_one_rule(loader, rules, r, dst))
return TRUE;
}
/*
Add built-in contractions (e.g. for Thai)
*/
for (i= 0; i != src->contractions.nitems; i++)
{
MY_CONTRACTION *item= &src->contractions.item[i];
/*
TODO: calculate length from item->ch.
Generally contractions can consist of more than 2 characters.
*/
uint length= 2;
uint16 *weights= my_uca_init_one_contraction(&dst->contractions,
item->ch, length,
item->with_context);
memcpy(weights, item->weight, length * sizeof(uint16));
weights[length]= 0;
}
return FALSE;
}
|
O0
|
c
|
init_weight_level:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
shrq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x5f010
cmpl $0x0, %eax
je 0x5d731
movb $0x1, -0x1(%rbp)
jmp 0x5d9c5
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x50(%rbp), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0x5d773
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x50(%rbp), %rdi
shlq $0x3, %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x5d77c
movb $0x1, -0x1(%rbp)
jmp 0x5d9c5
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x29270
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x50(%rbp), %rdx
shlq $0x3, %rdx
callq 0x29270
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5d896
movq -0x30(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x5d878
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
shrq $0x8, %rax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5d821
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movb $0x9, (%rax,%rcx)
jmp 0x5d863
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
shrq $0x8, %rax
movl %eax, %esi
callq 0x5f100
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl -0x58(%rbp), %eax
jae 0x5d861
movl -0x58(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x5d863
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x5d881
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5d883
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x5d7d9
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rax
movl %eax, %ecx
callq 0x5f150
cmpb $0x0, %al
je 0x5d8c8
movb $0x1, -0x1(%rbp)
jmp 0x5d9c5
cmpl $0x0, -0x3c(%rbp)
je 0x5d8f2
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x5f1e0
cmpb $0x0, %al
je 0x5d8f0
movb $0x1, -0x1(%rbp)
jmp 0x5d9c5
jmp 0x5d8f2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5d93c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x5f280
cmpb $0x0, %al
je 0x5d92a
movb $0x1, -0x1(%rbp)
jmp 0x5d9c5
jmp 0x5d92c
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x5d8fe
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x5d9c1
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x58, -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x2, -0x64(%rbp)
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x60(%rbp), %rsi
movl -0x64(%rbp), %edx
movq -0x60(%rbp), %rax
movsbl 0x52(%rax), %ecx
callq 0x5f460
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x30, %rsi
movl -0x64(%rbp), %eax
movl %eax, %edx
shlq %rdx
callq 0x29270
movq -0x70(%rbp), %rax
movl -0x64(%rbp), %ecx
movw $0x0, (%rax,%rcx,2)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x5d944
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nop
|
init_weight_level:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_3C], 0
mov rax, [rbp+var_28]
mov rax, [rax]
add rax, 1
shr rax, 8
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_28]
mov ecx, [rax+30h]
mov rax, [rbp+var_20]
mov [rax+30h], ecx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call check_rules
cmp eax, 0
jz short loc_5D731
mov [rbp+var_1], 1
jmp loc_5D9C5
loc_5D731:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rdi, [rbp+var_50]
call rax
mov rcx, [rbp+var_20]
mov [rcx+8], rax
cmp rax, 0
jz short loc_5D773
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rdi, [rbp+var_50]
shl rdi, 3
call rax
mov rcx, [rbp+var_20]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_5D77C
loc_5D773:
mov [rbp+var_1], 1
jmp loc_5D9C5
loc_5D77C:
mov rax, [rbp+var_20]
mov rdi, [rax+8]
mov rax, [rbp+var_28]
mov rsi, [rax+8]
mov rdx, [rbp+var_50]
call _memcpy
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
mov rax, [rbp+var_28]
mov rsi, [rax+10h]
mov rdx, [rbp+var_50]
shl rdx, 3
call _memcpy
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_5D7D9:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_5D896
mov rax, [rbp+var_30]
cmp qword ptr [rax+58h], 0
jnz loc_5D878
mov rax, [rbp+var_30]
mov rax, [rax+50h]
shr rax, 8
mov [rbp+var_54], eax
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_5D821
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
mov byte ptr [rax+rcx], 9
jmp short loc_5D863
loc_5D821:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_30]
mov rax, [rax]
shr rax, 8
mov esi, eax
call my_weight_size_on_page
mov [rbp+var_58], eax
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
movzx eax, byte ptr [rax+rcx]
cmp eax, [rbp+var_58]
jnb short loc_5D861
mov eax, [rbp+var_58]
mov dl, al
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
mov [rax+rcx], dl
loc_5D861:
jmp short $+2
loc_5D863:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov ecx, [rbp+var_54]
mov qword ptr [rax+rcx*8], 0
jmp short loc_5D881
loc_5D878:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
loc_5D881:
jmp short $+2
loc_5D883:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_5D7D9
loc_5D896:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
add eax, [rbp+var_3C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rax, [rbp+var_50]
mov ecx, eax
call my_uca_generate_pages
cmp al, 0
jz short loc_5D8C8
mov [rbp+var_1], 1
jmp loc_5D9C5
loc_5D8C8:
cmp [rbp+var_3C], 0
jz short loc_5D8F2
mov rdi, [rbp+var_20]
add rdi, 18h
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_3C]
call my_uca_alloc_contractions
cmp al, 0
jz short loc_5D8F0
mov [rbp+var_1], 1
jmp loc_5D9C5
loc_5D8F0:
jmp short $+2
loc_5D8F2:
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
loc_5D8FE:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_5D93C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
call apply_one_rule
cmp al, 0
jz short loc_5D92A
mov [rbp+var_1], 1
jmp loc_5D9C5
loc_5D92A:
jmp short $+2
loc_5D92C:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp short loc_5D8FE
loc_5D93C:
mov [rbp+var_48], 0
loc_5D944:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_28]
cmp rax, [rcx+18h]
jz short loc_5D9C1
mov rax, [rbp+var_28]
mov rax, [rax+20h]
imul rcx, [rbp+var_48], 58h ; 'X'
add rax, rcx
mov [rbp+var_60], rax
mov [rbp+var_64], 2
mov rdi, [rbp+var_20]
add rdi, 18h
mov rsi, [rbp+var_60]
mov edx, [rbp+var_64]
mov rax, [rbp+var_60]
movsx ecx, byte ptr [rax+52h]
call my_uca_init_one_contraction
mov [rbp+var_70], rax
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_60]
add rsi, 30h ; '0'
mov eax, [rbp+var_64]
mov edx, eax
shl rdx, 1
call _memcpy
mov rax, [rbp+var_70]
mov ecx, [rbp+var_64]
mov word ptr [rax+rcx*2], 0
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_5D944
loc_5D9C1:
mov [rbp+var_1], 0
loc_5D9C5:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
|
char init_weight_level(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
long long inited; // [rsp+0h] [rbp-70h]
long long v8; // [rsp+10h] [rbp-60h]
unsigned int v9; // [rsp+18h] [rbp-58h]
unsigned int v10; // [rsp+1Ch] [rbp-54h]
unsigned long long v11; // [rsp+20h] [rbp-50h]
long long j; // [rsp+28h] [rbp-48h]
int v13; // [rsp+34h] [rbp-3Ch]
int v14; // [rsp+34h] [rbp-3Ch]
_QWORD *v15; // [rsp+38h] [rbp-38h]
_QWORD *v16; // [rsp+40h] [rbp-30h]
unsigned long long i; // [rsp+40h] [rbp-30h]
v13 = 0;
v11 = (unsigned long long)(*(_QWORD *)a4 + 1LL) >> 8;
*(_QWORD *)a3 = *(_QWORD *)a4;
*(_DWORD *)(a3 + 48) = *(_DWORD *)(a4 + 48);
if ( (unsigned int)check_rules(a1, a2, a3, a4) )
return 1;
v4 = (*(long long ( **)(unsigned long long))(a1 + 128))(v11);
*(_QWORD *)(a3 + 8) = v4;
if ( !v4 )
return 1;
v5 = (*(long long ( **)(unsigned long long))(a1 + 128))(8 * v11);
*(_QWORD *)(a3 + 16) = v5;
if ( !v5 )
return 1;
memcpy(*(_QWORD *)(a3 + 8), *(_QWORD *)(a4 + 8), v11);
memcpy(*(_QWORD *)(a3 + 16), *(_QWORD *)(a4 + 16), 8 * v11);
v16 = *(_QWORD **)(a2 + 32);
v15 = &v16[20 * *(_QWORD *)(a2 + 16)];
while ( v16 < v15 )
{
if ( v16[11] )
{
++v13;
}
else
{
v10 = v16[10] >> 8;
if ( v16[1] )
{
*(_BYTE *)(*(_QWORD *)(a3 + 8) + v10) = 9;
}
else
{
v9 = my_weight_size_on_page(a4, (unsigned int)(*v16 >> 8));
if ( *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + v10) < v9 )
*(_BYTE *)(*(_QWORD *)(a3 + 8) + v10) = v9;
}
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8LL * v10) = 0LL;
}
v16 += 20;
}
v14 = v13 + *(_QWORD *)(a4 + 24);
if ( (unsigned __int8)my_uca_generate_pages(a1, a3, a4, (unsigned int)v11) )
return 1;
if ( v14 && (unsigned __int8)my_uca_alloc_contractions(a3 + 24, a1, v14) )
return 1;
for ( i = *(_QWORD *)(a2 + 32); i < (unsigned long long)v15; i += 160LL )
{
if ( (unsigned __int8)apply_one_rule(a1, a2, i, a3) )
return 1;
}
for ( j = 0LL; j != *(_QWORD *)(a4 + 24); ++j )
{
v8 = 88 * j + *(_QWORD *)(a4 + 32);
inited = my_uca_init_one_contraction(a3 + 24, v8, 2LL, (unsigned int)*(char *)(v8 + 82));
memcpy(inited, v8 + 48, 4LL);
*(_WORD *)(inited + 4) = 0;
}
return 0;
}
|
init_weight_level:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
ADD RAX,0x1
SHR RAX,0x8
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x30],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x0015f010
CMP EAX,0x0
JZ 0x0015d731
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015d9c5
LAB_0015d731:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x50]
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x0015d773
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x50]
SHL RDI,0x3
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x0015d77c
LAB_0015d773:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015d9c5
LAB_0015d77c:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x00129270
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x50]
SHL RDX,0x3
CALL 0x00129270
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0015d7d9:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0015d896
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x58],0x0
JNZ 0x0015d878
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
SHR RAX,0x8
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0015d821
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOV byte ptr [RAX + RCX*0x1],0x9
JMP 0x0015d863
LAB_0015d821:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
SHR RAX,0x8
MOV ESI,EAX
CALL 0x0015f100
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,dword ptr [RBP + -0x58]
JNC 0x0015d861
MOV EAX,dword ptr [RBP + -0x58]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0015d861:
JMP 0x0015d863
LAB_0015d863:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x54]
MOV qword ptr [RAX + RCX*0x8],0x0
JMP 0x0015d881
LAB_0015d878:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
LAB_0015d881:
JMP 0x0015d883
LAB_0015d883:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0015d7d9
LAB_0015d896:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
ADD EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,EAX
CALL 0x0015f150
CMP AL,0x0
JZ 0x0015d8c8
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015d9c5
LAB_0015d8c8:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0015d8f2
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x3c]
CALL 0x0015f1e0
CMP AL,0x0
JZ 0x0015d8f0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015d9c5
LAB_0015d8f0:
JMP 0x0015d8f2
LAB_0015d8f2:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
LAB_0015d8fe:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0015d93c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0015f280
CMP AL,0x0
JZ 0x0015d92a
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015d9c5
LAB_0015d92a:
JMP 0x0015d92c
LAB_0015d92c:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0015d8fe
LAB_0015d93c:
MOV qword ptr [RBP + -0x48],0x0
LAB_0015d944:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x0015d9c1
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x20]
IMUL RCX,qword ptr [RBP + -0x48],0x58
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x64],0x2
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,dword ptr [RBP + -0x64]
MOV RAX,qword ptr [RBP + -0x60]
MOVSX ECX,byte ptr [RAX + 0x52]
CALL 0x0015f460
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x60]
ADD RSI,0x30
MOV EAX,dword ptr [RBP + -0x64]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x00129270
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RBP + -0x64]
MOV word ptr [RAX + RCX*0x2],0x0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0015d944
LAB_0015d9c1:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015d9c5:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 init_weight_level(long param_1,long param_2,long *param_3,long *param_4)
{
char cVar1;
int iVar2;
uint uVar3;
uint uVar4;
ulong __n;
long lVar5;
ulong *puVar6;
void *__dest;
long local_50;
int local_44;
ulong *local_38;
local_44 = 0;
__n = *param_4 + 1U >> 8;
*param_3 = *param_4;
*(int *)(param_3 + 6) = (int)param_4[6];
iVar2 = check_rules(param_1,param_2,param_3,param_4);
if (iVar2 == 0) {
lVar5 = (**(code **)(param_1 + 0x80))(__n);
param_3[1] = lVar5;
if (lVar5 != 0) {
lVar5 = (**(code **)(param_1 + 0x80))(__n << 3);
param_3[2] = lVar5;
if (lVar5 != 0) {
memcpy((void *)param_3[1],(void *)param_4[1],__n);
memcpy((void *)param_3[2],(void *)param_4[2],__n << 3);
puVar6 = (ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0);
for (local_38 = *(ulong **)(param_2 + 0x20); local_38 < puVar6; local_38 = local_38 + 0x14)
{
if (local_38[0xb] == 0) {
uVar3 = (uint)(local_38[10] >> 8);
if (local_38[1] == 0) {
uVar4 = my_weight_size_on_page(param_4,*local_38 >> 8 & 0xffffffff);
if (*(byte *)(param_3[1] + (ulong)uVar3) < uVar4) {
*(char *)(param_3[1] + (ulong)uVar3) = (char)uVar4;
}
}
else {
*(int1 *)(param_3[1] + (ulong)uVar3) = 9;
}
*(int8 *)(param_3[2] + (ulong)uVar3 * 8) = 0;
}
else {
local_44 = local_44 + 1;
}
}
local_44 = (int)param_4[3] + local_44;
cVar1 = my_uca_generate_pages(param_1,param_3,param_4,__n & 0xffffffff);
if (cVar1 == '\0') {
if ((local_44 != 0) &&
(cVar1 = my_uca_alloc_contractions(param_3 + 3,param_1,(long)local_44), cVar1 != '\0'))
{
return 1;
}
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if (puVar6 <= local_38) {
for (local_50 = 0; local_50 != param_4[3]; local_50 = local_50 + 1) {
lVar5 = param_4[4] + local_50 * 0x58;
__dest = (void *)my_uca_init_one_contraction
(param_3 + 3,lVar5,2,(int)*(char *)(lVar5 + 0x52));
memcpy(__dest,(void *)(lVar5 + 0x30),4);
*(int2 *)((long)__dest + 4) = 0;
}
return 0;
}
cVar1 = apply_one_rule(param_1,param_2,local_38,param_3);
if (cVar1 != '\0') break;
local_38 = local_38 + 0x14;
}
return 1;
}
return 1;
}
}
}
return 1;
}
|
|
63,790 |
my_uca_scanner_next_implicit
|
eloqsql/strings/ctype-uca.c
|
static inline int
my_uca_scanner_next_implicit(my_uca_scanner *scanner)
{
switch (scanner->level->levelno) {
case 0: return my_uca_scanner_next_implicit_primary(scanner);/* Primary level*/
case 1: scanner->wbeg= nochar; return 0x0020; /* Secondary level */
case 2: scanner->wbeg= nochar; return 0x0002; /* Tertiary level */
default: scanner->wbeg= nochar; break;
}
DBUG_ASSERT(0);
return 0;
}
|
O0
|
c
|
my_uca_scanner_next_implicit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x30(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x5a6e4
jmp 0x5a6d0
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x5a6f2
jmp 0x5a6da
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x5a709
jmp 0x5a720
movq -0x10(%rbp), %rdi
callq 0x5aa30
movl %eax, -0x4(%rbp)
jmp 0x5a739
movq -0x10(%rbp), %rax
leaq 0x160883(%rip), %rcx # 0x1baf80
movq %rcx, (%rax)
movl $0x20, -0x4(%rbp)
jmp 0x5a739
movq -0x10(%rbp), %rax
leaq 0x16086c(%rip), %rcx # 0x1baf80
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x5a739
movq -0x10(%rbp), %rax
leaq 0x160855(%rip), %rcx # 0x1baf80
movq %rcx, (%rax)
jmp 0x5a730
jmp 0x5a732
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_scanner_next_implicit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov eax, [rax+30h]
mov [rbp+var_14], eax
test eax, eax
jz short loc_5A6E4
jmp short $+2
loc_5A6D0:
mov eax, [rbp+var_14]
sub eax, 1
jz short loc_5A6F2
jmp short $+2
loc_5A6DA:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_5A709
jmp short loc_5A720
loc_5A6E4:
mov rdi, [rbp+var_10]
call my_uca_scanner_next_implicit_primary
mov [rbp+var_4], eax
jmp short loc_5A739
loc_5A6F2:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
mov [rbp+var_4], 20h ; ' '
jmp short loc_5A739
loc_5A709:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
mov [rbp+var_4], 2
jmp short loc_5A739
loc_5A720:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
jmp short $+2
loc_5A730:
jmp short $+2
loc_5A732:
mov [rbp+var_4], 0
loc_5A739:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long my_uca_scanner_next_implicit(_QWORD *a1)
{
int v2; // [rsp+Ch] [rbp-14h]
v2 = *(_DWORD *)(a1[3] + 48LL);
if ( v2 )
{
if ( v2 == 1 )
{
*a1 = &nochar;
return 32;
}
else
{
*a1 = &nochar;
if ( v2 == 2 )
return 2;
else
return 0;
}
}
else
{
return (unsigned int)my_uca_scanner_next_implicit_primary(a1);
}
}
|
my_uca_scanner_next_implicit:
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 + 0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x14],EAX
TEST EAX,EAX
JZ 0x0015a6e4
JMP 0x0015a6d0
LAB_0015a6d0:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
JZ 0x0015a6f2
JMP 0x0015a6da
LAB_0015a6da:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x0015a709
JMP 0x0015a720
LAB_0015a6e4:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015aa30
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015a739
LAB_0015a6f2:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2baf80]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x20
JMP 0x0015a739
LAB_0015a709:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2baf80]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0015a739
LAB_0015a720:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2baf80]
MOV qword ptr [RAX],RCX
JMP 0x0015a730
LAB_0015a730:
JMP 0x0015a732
LAB_0015a732:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015a739:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_uca_scanner_next_implicit(int8 *param_1)
{
int iVar1;
int4 local_c;
iVar1 = *(int *)(param_1[3] + 0x30);
if (iVar1 == 0) {
local_c = my_uca_scanner_next_implicit_primary(param_1);
}
else if (iVar1 == 1) {
*param_1 = &nochar;
local_c = 0x20;
}
else if (iVar1 == 2) {
*param_1 = &nochar;
local_c = 2;
}
else {
*param_1 = &nochar;
local_c = 0;
}
return local_c;
}
|
|
63,791 |
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
|
monkey531[P]llama/common/common.cpp
|
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
int seq_count = 0;
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) { seq_count++; }
}
putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]);
}
printf("\n=== Done dumping\n");
}
|
O0
|
cpp
|
common_kv_cache_dump_view(llama_kv_cache_view const&, int):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movl (%rax), %esi
movq 0x40(%rsp), %rax
movl 0x4(%rax), %edx
movq 0x40(%rsp), %rax
movl 0xc(%rax), %ecx
movq 0x40(%rsp), %rax
movl 0x8(%rax), %r8d
movq 0x40(%rsp), %rax
movl 0x10(%rax), %r9d
movq 0x40(%rsp), %rax
movl 0x14(%rax), %eax
leaq 0x11ee7a(%rip), %rdi # 0x212eef
movl %eax, (%rsp)
movb $0x0, %al
callq 0x5a0f0
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xf418b
movl 0x24(%rsp), %eax
cltd
idivl 0x3c(%rsp)
cmpl $0x0, %edx
jne 0xf40d4
movl 0x24(%rsp), %esi
leaq 0x11eeac(%rip), %rdi # 0x212f79
movb $0x0, %al
callq 0x5a0f0
movl $0x0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0xf411c
movq 0x28(%rsp), %rax
movslq 0x1c(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0xf410d
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xf410f
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xf40e4
movq $0x3e, 0x10(%rsp)
movslq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x63c00
movq (%rax), %rcx
leaq 0x11db18(%rip), %rax # 0x211c60
movsbl (%rax,%rcx), %edi
callq 0x5b390
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0xf40a3
leaq 0x11edee(%rip), %rdi # 0x212f80
movb $0x0, %al
callq 0x5a0f0
addq $0x48, %rsp
retq
nop
|
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov rax, [rsp+48h+var_8]
mov esi, [rax]
mov rax, [rsp+48h+var_8]
mov edx, [rax+4]
mov rax, [rsp+48h+var_8]
mov ecx, [rax+0Ch]
mov rax, [rsp+48h+var_8]
mov r8d, [rax+8]
mov rax, [rsp+48h+var_8]
mov r9d, [rax+10h]
mov rax, [rsp+48h+var_8]
mov eax, [rax+14h]
lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"...
mov [rsp+48h+var_48], eax
mov al, 0
call _printf
mov rax, [rsp+48h+var_8]
mov rax, [rax+18h]
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_8]
mov rax, [rax+20h]
mov [rsp+48h+var_20], rax
mov [rsp+48h+var_24], 0
loc_F40A3:
mov eax, [rsp+48h+var_24]
mov rcx, [rsp+48h+var_8]
cmp eax, [rcx]
jge loc_F418B
mov eax, [rsp+48h+var_24]
cdq
idiv [rsp+48h+var_C]
cmp edx, 0
jnz short loc_F40D4
mov esi, [rsp+48h+var_24]
lea rdi, a5d; "\n%5d: "
mov al, 0
call _printf
loc_F40D4:
mov [rsp+48h+var_28], 0
mov [rsp+48h+var_2C], 0
loc_F40E4:
mov eax, [rsp+48h+var_2C]
mov rcx, [rsp+48h+var_8]
cmp eax, [rcx+4]
jge short loc_F411C
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_2C]
cmp dword ptr [rax+rcx*4], 0
jl short loc_F410D
mov eax, [rsp+48h+var_28]
add eax, 1
mov [rsp+48h+var_28], eax
loc_F410D:
jmp short $+2
loc_F410F:
mov eax, [rsp+48h+var_2C]
add eax, 1
mov [rsp+48h+var_2C], eax
jmp short loc_F40E4
loc_F411C:
mov [rsp+48h+var_38], 3Eh ; '>'
movsxd rax, [rsp+48h+var_28]
mov [rsp+48h+var_40], rax
lea rdi, [rsp+48h+var_38]
lea rsi, [rsp+48h+var_40]
call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&)
mov rcx, [rax]
lea rax, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
movsx edi, byte ptr [rax+rcx]
call _putchar
mov eax, [rsp+48h+var_24]
add eax, 1
mov [rsp+48h+var_24], eax
mov rax, [rsp+48h+var_18]
add rax, 4
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_8]
mov ecx, [rax+4]
mov rax, [rsp+48h+var_20]
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rsp+48h+var_20], rax
jmp loc_F40A3
loc_F418B:
lea rdi, aDoneDumping; "\n=== Done dumping\n"
mov al, 0
call _printf
add rsp, 48h
retn
|
long long common_kv_cache_dump_view(int *a1, int a2)
{
_QWORD *v2; // rax
long long v4; // [rsp+8h] [rbp-40h] BYREF
long long v5; // [rsp+10h] [rbp-38h] BYREF
int i; // [rsp+1Ch] [rbp-2Ch]
int v7; // [rsp+20h] [rbp-28h]
int v8; // [rsp+24h] [rbp-24h]
long long v9; // [rsp+28h] [rbp-20h]
long long v10; // [rsp+30h] [rbp-18h]
int v11; // [rsp+3Ch] [rbp-Ch]
int *v12; // [rsp+40h] [rbp-8h]
v12 = a1;
v11 = a2;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d",
*a1,
a1[1],
a1[3],
a1[2],
a1[4],
a1[5]);
v10 = *((_QWORD *)a1 + 3);
v9 = *((_QWORD *)a1 + 4);
v8 = 0;
while ( v8 < *v12 )
{
if ( !(v8 % v11) )
printf("\n%5d: ", v8);
v7 = 0;
for ( i = 0; i < v12[1]; ++i )
{
if ( *(int *)(v9 + 4LL * i) >= 0 )
++v7;
}
v5 = 62LL;
v4 = v7;
v2 = std::min<unsigned long>(&v5, &v4);
putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[*v2]);
++v8;
v10 += 4LL;
v9 += 4LL * v12[1];
}
return printf("\n=== Done dumping\n");
}
|
__relocate_a<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*,std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*,std::allocator<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>>>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001f4100
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001f4100
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001f4100
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x18]
CALL 0x001f4090
ADD RSP,0x38
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* std::pair<long, std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > >* std::__relocate_a<std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > >*, std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > >*, std::allocator<std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > > > >(std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > >*, std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > >*, std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > >*, std::allocator<std::pair<long,
std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > >,
std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string > > > > > >&) */
pair * std::
__relocate_a<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*,std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*,std::allocator<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>>>
(pair *param_1,pair *param_2,pair *param_3,allocator *param_4)
{
pair *ppVar1;
pair *ppVar2;
pair *ppVar3;
ppVar1 = __niter_base<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*>
(param_1);
ppVar2 = __niter_base<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*>
(param_2);
ppVar3 = __niter_base<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*>
(param_3);
ppVar1 = __relocate_a_1<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*,std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>*,std::allocator<std::pair<long,std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>>>>
(ppVar1,ppVar2,ppVar3,param_4);
return ppVar1;
}
|
|
63,792 |
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
|
monkey531[P]llama/common/minja.hpp
|
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
|
O1
|
cpp
|
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movl $0x30, %edi
callq 0x1b900
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x95f55(%rip), %rcx # 0x131438
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
movq (%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x9b531
movq 0x97a55(%rip), %rcx # 0x132f78
cmpb $0x0, (%rcx)
je 0x9b52d
incl 0x8(%rax)
jmp 0x9b531
lock
incl 0x8(%rax)
leaq 0x40(%rbx), %r14
movb $0x0, 0x40(%rbx)
movq $0x0, 0x48(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x5cc84
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5cc84
movq %rax, %r14
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9b573
callq 0x26758
movq %rbx, %rdi
callq 0x8c59c
movq %r14, %rdi
callq 0x1c0d0
nop
|
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+20h], 0
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
mov rcx, rax
add rcx, 10h
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
mov [rbx+28h], rax
mov [rbx+20h], rcx
mov rax, [r14]
mov [rbx+30h], rax
mov rax, [r14+8]
mov [rbx+38h], rax
test rax, rax
jz short loc_9B531
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9B52D
inc dword ptr [rax+8]
jmp short loc_9B531
loc_9B52D:
lock inc dword ptr [rax+8]
loc_9B531:
lea r14, [rbx+40h]
mov byte ptr [rbx+40h], 0
mov qword ptr [rbx+48h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _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 r14, rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9B573
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9B573:
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::Value(long long a1, _QWORD *a2)
{
long long v2; // rax
long long result; // rax
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
v2 = operator new(0x30uLL);
*(_QWORD *)(v2 + 8) = 0x100000001LL;
*(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(v2 + 32) = 0LL;
*(_QWORD *)(a1 + 40) = v2;
*(_QWORD *)(a1 + 32) = v2 + 16;
*(_QWORD *)(a1 + 48) = *a2;
result = a2[1];
*(_QWORD *)(a1 + 56) = result;
if ( result )
{
if ( _libc_single_threaded )
++*(_DWORD *)(result + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(result + 8));
}
*(_BYTE *)(a1 + 64) = 0;
*(_QWORD *)(a1 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 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));
return result;
}
|
Value:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x20],0x0
LAB_0019b4c4:
MOV EDI,0x30
CALL 0x0011b900
LAB_0019b4ce:
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x231438]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV RCX,RAX
ADD RCX,0x10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],RCX
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x38],RAX
TEST RAX,RAX
JZ 0x0019b531
MOV RCX,qword ptr [0x00232f78]
CMP byte ptr [RCX],0x0
JZ 0x0019b52d
INC dword ptr [RAX + 0x8]
JMP 0x0019b531
LAB_0019b52d:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019b531:
LEA R14,[RBX + 0x40]
MOV byte ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015cc84
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0015cc84
|
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context>
const&, minja::ArgumentsValue&)> > const&) */
void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1)
{
long lVar1;
int8 *puVar2;
bool bVar3;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x20) = 0;
/* try { // try from 0019b4c4 to 0019b4cd has its CatchHandler @ 0019b562 */
puVar2 = (int8 *)operator_new(0x30);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_ptr_inplace_00231448;
puVar2[2] = 0;
puVar2[3] = 0;
puVar2[4] = 0;
*(int8 **)(this + 0x28) = puVar2;
*(int8 **)(this + 0x20) = puVar2 + 2;
*(int8 *)(this + 0x30) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x38) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00232f78 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
bVar3 = (bool)((char)this + '@');
this[0x40] = (Value)0x0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
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(bVar3);
return;
}
|
|
63,793 |
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const
|
monkey531[P]llama/common/minja.hpp
|
bool peekSymbols(const std::vector<std::string> & symbols) const {
for (const auto & symbol : symbols) {
if (std::distance(it, end) >= (int64_t) symbol.size() && std::string(it, it + symbol.size()) == symbol) {
return true;
}
}
return false;
}
|
O0
|
cpp
|
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x8b2b0
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x8b2e0
movq %rax, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x8b210
testb $0x1, %al
jne 0xa8f6c
jmp 0xa90e5
leaq 0xa0(%rsp), %rdi
callq 0x8bd10
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x90(%rsp)
movq 0x20(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x7b410
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rdi
callq 0x4f430
movq 0x20(%rsp), %rcx
movq %rax, %rdx
movb $0x0, 0x4e(%rsp)
movb $0x0, 0x3b(%rsp)
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x2f(%rsp)
jl 0xa906c
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rsp)
movq 0x20(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x90(%rsp), %rdi
callq 0x4f430
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x7b150
movq %rax, 0x50(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4fd90
movq 0x18(%rsp), %rcx
movb $0x1, 0x4e(%rsp)
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x60(%rsp), %rdi
callq 0x7b1e0
jmp 0xa9051
movb $0x1, 0x3b(%rsp)
movq 0x90(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x8bc70
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
movb %al, 0xf(%rsp)
testb $0x1, 0x3b(%rsp)
jne 0xa907d
jmp 0xa9087
leaq 0x60(%rsp), %rdi
callq 0x50100
testb $0x1, 0x4e(%rsp)
jne 0xa9090
jmp 0xa909a
leaq 0x4f(%rsp), %rdi
callq 0x500e0
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xa90a4
jmp 0xa90d1
movb $0x1, 0xc7(%rsp)
jmp 0xa90ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
testb $0x1, 0x4e(%rsp)
jne 0xa90c5
jmp 0xa90cf
leaq 0x4f(%rsp), %rdi
callq 0x500e0
jmp 0xa90fe
jmp 0xa90d3
leaq 0xa0(%rsp), %rdi
callq 0x8bc50
jmp 0xa8f4e
movb $0x0, 0xc7(%rsp)
movb 0xc7(%rsp), %al
andb $0x1, %al
addq $0xc8, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x4f990
nopl (%rax,%rax)
|
_ZNK5minja6Parser11peekSymbolsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_18], rsi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_98], rax
mov rax, [rsp+0C8h+var_18]
mov [rsp+0C8h+var_20], rax
mov rdi, [rsp+0C8h+var_20]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+0C8h+var_28], rax
mov rdi, [rsp+0C8h+var_20]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+0C8h+var_30], rax
loc_A8F4E:
lea rdi, [rsp+0C8h+var_28]
lea rsi, [rsp+0C8h+var_30]
call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&)
test al, 1
jnz short loc_A8F6C
jmp loc_A90E5
loc_A8F6C:
lea rdi, [rsp+0C8h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(void)
mov rcx, rax
mov rax, [rsp+0C8h+var_98]
mov [rsp+0C8h+var_38], rcx
mov rcx, [rax+20h]
mov [rsp+0C8h+var_40], rcx
mov rax, [rax+18h]
mov [rsp+0C8h+var_48], rax
mov rdi, [rsp+0C8h+var_40]
mov rsi, [rsp+0C8h+var_48]
call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEENSt15iterator_traitsIT_E15difference_typeESC_SC_; std::distance<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>)
mov [rsp+0C8h+var_A8], rax
mov rdi, [rsp+0C8h+var_38]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, [rsp+0C8h+var_A8]
mov rdx, rax
mov [rsp+0C8h+var_7A], 0
mov [rsp+0C8h+var_8D], 0
xor eax, eax
cmp rcx, rdx
mov [rsp+0C8h+var_99], al
jl loc_A906C
mov rax, [rsp+0C8h+var_98]
mov rcx, rax
add rcx, 20h ; ' '
mov [rsp+0C8h+var_B8], rcx
mov rax, [rax+20h]
mov [rsp+0C8h+var_70], rax
mov rdi, [rsp+0C8h+var_38]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+0C8h+var_B8]
mov rsi, rax
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long)
mov [rsp+0C8h+var_78], rax
lea rdi, [rsp+0C8h+var_79]
mov [rsp+0C8h+var_B0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rcx, [rsp+0C8h+var_B0]
mov [rsp+0C8h+var_7A], 1
mov rsi, [rsp+0C8h+var_70]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_68]
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_A9051:
mov [rsp+0C8h+var_8D], 1
mov rsi, [rsp+0C8h+var_38]
lea rdi, [rsp+0C8h+var_68]
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
mov [rsp+0C8h+var_99], al
loc_A906C:
mov al, [rsp+0C8h+var_99]
mov [rsp+0C8h+var_B9], al
test [rsp+0C8h+var_8D], 1
jnz short loc_A907D
jmp short loc_A9087
loc_A907D:
lea rdi, [rsp+0C8h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A9087:
test [rsp+0C8h+var_7A], 1
jnz short loc_A9090
jmp short loc_A909A
loc_A9090:
lea rdi, [rsp+0C8h+var_79]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_A909A:
mov al, [rsp+0C8h+var_B9]
test al, 1
jnz short loc_A90A4
jmp short loc_A90D1
loc_A90A4:
mov [rsp+0C8h+var_1], 1
jmp short loc_A90ED
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
test [rsp+arg_46], 1
jnz short loc_A90C5
jmp short loc_A90CF
loc_A90C5:
lea rdi, [rsp+arg_47]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_A90CF:
jmp short loc_A90FE
loc_A90D1:
jmp short $+2
loc_A90D3:
lea rdi, [rsp+0C8h+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void)
jmp loc_A8F4E
loc_A90E5:
mov [rsp+0C8h+var_1], 0
loc_A90ED:
mov al, [rsp+0C8h+var_1]
and al, 1
add rsp, 0C8h
retn
loc_A90FE:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
|
char minja::Parser::peekSymbols(long long a1, long long a2)
{
long long v2; // rsi
long long v4; // [rsp+20h] [rbp-A8h]
char v5; // [rsp+2Fh] [rbp-99h]
char v6; // [rsp+3Bh] [rbp-8Dh]
char v7; // [rsp+4Eh] [rbp-7Ah]
char v8; // [rsp+4Fh] [rbp-79h] BYREF
long long v9; // [rsp+50h] [rbp-78h]
long long v10; // [rsp+58h] [rbp-70h]
_BYTE v11[32]; // [rsp+60h] [rbp-68h] BYREF
long long v12; // [rsp+80h] [rbp-48h]
long long v13; // [rsp+88h] [rbp-40h]
long long v14; // [rsp+90h] [rbp-38h]
long long v15; // [rsp+98h] [rbp-30h] BYREF
_QWORD v16[4]; // [rsp+A0h] [rbp-28h] BYREF
v16[3] = a1;
v16[2] = a2;
v16[1] = a2;
v16[0] = std::vector<std::string>::begin(a2);
v15 = std::vector<std::string>::end(a2);
while ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)v16, (long long)&v15) )
{
v14 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*((long long)v16);
v13 = *(_QWORD *)(a1 + 32);
v12 = *(_QWORD *)(a1 + 24);
v4 = std::distance<__gnu_cxx::__normal_iterator<char const*,std::string>>(v13, v12);
v7 = 0;
v6 = 0;
v5 = 0;
if ( v4 >= std::string::size(v14) )
{
v10 = *(_QWORD *)(a1 + 32);
v2 = std::string::size(v14);
v9 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+((_QWORD *)(a1 + 32), v2);
std::allocator<char>::allocator();
v7 = 1;
std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(
(long long)v11,
v10,
v9,
(long long)&v8);
v6 = 1;
v5 = std::operator==<char>((long long)v11, v14);
}
if ( (v6 & 1) != 0 )
std::string::~string(v11);
if ( (v7 & 1) != 0 )
std::allocator<char>::~allocator(&v8);
if ( (v5 & 1) != 0 )
return 1;
__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(v16);
}
return 0;
}
|
peekSymbols:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV qword ptr [RSP + 0xb0],RSI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0018b2b0
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0018b2e0
MOV qword ptr [RSP + 0x98],RAX
LAB_001a8f4e:
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x98]
CALL 0x0018b210
TEST AL,0x1
JNZ 0x001a8f6c
JMP 0x001a90e5
LAB_001a8f6c:
LEA RDI,[RSP + 0xa0]
CALL 0x0018bd10
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x90],RCX
MOV RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x88],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x80]
CALL 0x0017b410
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0014f430
MOV RCX,qword ptr [RSP + 0x20]
MOV RDX,RAX
MOV byte ptr [RSP + 0x4e],0x0
MOV byte ptr [RSP + 0x3b],0x0
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RSP + 0x2f],AL
JL 0x001a906c
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,RAX
ADD RCX,0x20
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0014f430
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
CALL 0x0017b150
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0014fd90
MOV RCX,qword ptr [RSP + 0x18]
MOV byte ptr [RSP + 0x4e],0x1
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x50]
LAB_001a9045:
LEA RDI,[RSP + 0x60]
CALL 0x0017b1e0
LAB_001a904f:
JMP 0x001a9051
LAB_001a9051:
MOV byte ptr [RSP + 0x3b],0x1
MOV RSI,qword ptr [RSP + 0x90]
LEA RDI,[RSP + 0x60]
CALL 0x0018bc70
MOV byte ptr [RSP + 0x2f],AL
LAB_001a906c:
MOV AL,byte ptr [RSP + 0x2f]
MOV byte ptr [RSP + 0xf],AL
TEST byte ptr [RSP + 0x3b],0x1
JNZ 0x001a907d
JMP 0x001a9087
LAB_001a907d:
LEA RDI,[RSP + 0x60]
CALL 0x00150100
LAB_001a9087:
TEST byte ptr [RSP + 0x4e],0x1
JNZ 0x001a9090
JMP 0x001a909a
LAB_001a9090:
LEA RDI,[RSP + 0x4f]
CALL 0x001500e0
LAB_001a909a:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x001a90a4
JMP 0x001a90d1
LAB_001a90a4:
MOV byte ptr [RSP + 0xc7],0x1
JMP 0x001a90ed
LAB_001a90d1:
JMP 0x001a90d3
LAB_001a90d3:
LEA RDI,[RSP + 0xa0]
CALL 0x0018bc50
JMP 0x001a8f4e
LAB_001a90e5:
MOV byte ptr [RSP + 0xc7],0x0
LAB_001a90ed:
MOV AL,byte ptr [RSP + 0xc7]
AND AL,0x1
ADD RSP,0xc8
RET
|
/* minja::Parser::peekSymbols(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string
> > const&) const */
int8 __thiscall minja::Parser::peekSymbols(Parser *this,vector *param_1)
{
bool bVar1;
int7 extraout_var;
long lVar2;
long lVar3;
long lVar4;
int8 uVar5;
int7 uVar6;
int7 extraout_var_00;
byte local_99;
allocator<char> local_79;
int8 local_78;
int8 local_70;
string local_68 [32];
int8 local_48;
int8 local_40;
string *local_38;
int8 local_30;
int8 local_28;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_20;
vector *local_18;
Parser *local_10;
int1 local_1;
local_20 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1;
local_18 = param_1;
local_10 = this;
local_28 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1
);
local_30 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_20);
do {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_28,(__normal_iterator *)&local_30);
if (!bVar1) {
local_1 = 0;
uVar6 = extraout_var;
LAB_001a90ed:
return CONCAT71(uVar6,local_1);
}
local_38 = (string *)
__gnu_cxx::
__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_28);
local_40 = *(int8 *)(this + 0x20);
local_48 = *(int8 *)(this + 0x18);
lVar2 = std::distance<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(local_40,local_48);
lVar3 = std::__cxx11::string::size();
uVar5 = 0;
local_99 = 0;
if (lVar3 <= lVar2) {
local_70 = *(int8 *)(this + 0x20);
lVar4 = std::__cxx11::string::size();
local_78 = __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator+
((__normal_iterator<char_const*,std::__cxx11::string> *)(this + 0x20),
lVar4);
std::allocator<char>::allocator();
/* try { // try from 001a9045 to 001a904e has its CatchHandler @ 001a90ae */
std::__cxx11::string::
string<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,void>
(local_68,local_70,local_78,&local_79);
uVar5 = std::operator==(local_68,local_38);
local_99 = (byte)uVar5;
}
uVar6 = (int7)((ulong)uVar5 >> 8);
if (lVar3 <= lVar2) {
std::__cxx11::string::~string(local_68);
std::allocator<char>::~allocator(&local_79);
uVar6 = extraout_var_00;
}
if ((local_99 & 1) != 0) {
local_1 = 1;
goto LAB_001a90ed;
}
__gnu_cxx::
__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_28);
} while( true );
}
|
|
63,794 |
addr_resolve
|
eloqsql/mysys/my_addr_resolve.c
|
static int addr_resolve(void *ptr, my_addr_loc *loc)
{
char input[32];
size_t len;
ssize_t total_bytes_read = 0;
ssize_t extra_bytes_read = 0;
ssize_t parsed = 0;
int ret;
int filename_start = -1;
int line_number_start = -1;
poll_fds.fd = out[0];
poll_fds.events = POLLIN | POLLRDBAND;
len= my_snprintf(input, sizeof(input), "%p\n", ptr);
if (write(in[1], input, len) <= 0)
{
if (!first_error++)
fputs("Printing to addr2line failed\n", stderr);
return 3;
}
/* 500 ms should be plenty of time for addr2line to issue a response. */
/* Read in a loop till all the output from addr2line is complete. */
while (parsed == total_bytes_read &&
(ret= poll(&poll_fds, 1, 500)))
{
/* error during poll */
if (ret < 0)
return 1;
extra_bytes_read= read(out[0], output + total_bytes_read,
sizeof(output) - total_bytes_read);
if (extra_bytes_read < 0)
return 4;
/* Timeout or max bytes read. */
if (extra_bytes_read == 0)
break;
total_bytes_read += extra_bytes_read;
/* Go through the addr2line response and get the required data.
The response is structured in 2 lines. The first line contains the function
name, while the second one contains <filename>:<line number> */
for (; parsed < total_bytes_read; parsed++)
{
if (output[parsed] == '\n')
{
filename_start = parsed + 1;
output[parsed] = '\0';
}
if (filename_start != -1 && output[parsed] == ':')
{
line_number_start = parsed + 1;
output[parsed] = '\0';
break;
}
}
}
/* Response is malformed. */
if (filename_start == -1 || line_number_start == -1)
return 5;
loc->func= output;
loc->file= output + filename_start;
loc->line= atoi(output + line_number_start);
/* Addr2line was unable to extract any meaningful information. */
if (strcmp(loc->file, "??") == 0 && loc->func[0] == '?')
return 6;
loc->file= strip_path(loc->file);
return 0;
}
|
O0
|
c
|
addr_resolve:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
movl 0x11c0e60(%rip), %eax # 0x1e01d3c
movl %eax, 0x11c127e(%rip) # 0x1e02160
movw $0x81, 0x11c1279(%rip) # 0x1e02164
leaq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rcx
movl $0x20, %esi
leaq 0x183ba4(%rip), %rdx # 0xdc4aa3
movb $0x0, %al
callq 0xc8b420
movq %rax, -0x50(%rbp)
movl 0x11c0e28(%rip), %edi # 0x1e01d38
leaq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x434a70
cmpq $0x0, %rax
jg 0xc40f5b
movl 0x11c1227(%rip), %eax # 0x1e02150
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x11c121c(%rip) # 0x1e02150
cmpl $0x0, %eax
jne 0xc40f4f
movq 0x78e070(%rip), %rax # 0x13cefb0
movq (%rax), %rsi
leaq 0x1985b0(%rip), %rdi # 0xdd94fa
callq 0x433790
movl $0x3, -0x34(%rbp)
jmp 0xc41123
jmp 0xc40f5d
movq -0x68(%rbp), %rcx
xorl %eax, %eax
cmpq -0x58(%rbp), %rcx
movb %al, -0x75(%rbp)
jne 0xc40f8e
leaq 0x11c11ed(%rip), %rdi # 0x1e02160
movl $0x1, %esi
movl $0x1f4, %edx # imm = 0x1F4
callq 0x4336b0
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x75(%rbp)
movb -0x75(%rbp), %al
testb $0x1, %al
jne 0xc40f9a
jmp 0xc4107d
cmpl $0x0, -0x6c(%rbp)
jge 0xc40fac
movl $0x1, -0x34(%rbp)
jmp 0xc41123
movl 0x11c0d8a(%rip), %edi # 0x1e01d3c
leaq 0x11c11b7(%rip), %rsi # 0x1e02170
addq -0x58(%rbp), %rsi
movl $0x400, %edx # imm = 0x400
subq -0x58(%rbp), %rdx
callq 0x434330
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jge 0xc40fe2
movl $0x4, -0x34(%rbp)
jmp 0xc41123
cmpq $0x0, -0x60(%rbp)
jne 0xc40fee
jmp 0xc4107d
movq -0x60(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
jge 0xc41078
movq -0x68(%rbp), %rcx
leaq 0x11c1161(%rip), %rax # 0x1e02170
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0xc41032
movq -0x68(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x70(%rbp)
movq -0x68(%rbp), %rcx
leaq 0x11c1142(%rip), %rax # 0x1e02170
movb $0x0, (%rax,%rcx)
cmpl $-0x1, -0x70(%rbp)
je 0xc41068
movq -0x68(%rbp), %rcx
leaq 0x11c112d(%rip), %rax # 0x1e02170
movsbl (%rax,%rcx), %eax
cmpl $0x3a, %eax
jne 0xc41068
movq -0x68(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x74(%rbp)
movq -0x68(%rbp), %rcx
leaq 0x11c110e(%rip), %rax # 0x1e02170
movb $0x0, (%rax,%rcx)
jmp 0xc41078
jmp 0xc4106a
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0xc40ffa
jmp 0xc40f5d
cmpl $-0x1, -0x70(%rbp)
je 0xc41089
cmpl $-0x1, -0x74(%rbp)
jne 0xc41095
movl $0x5, -0x34(%rbp)
jmp 0xc41123
movq -0x48(%rbp), %rax
leaq 0x11c10d0(%rip), %rcx # 0x1e02170
movq %rcx, 0x8(%rax)
movslq -0x70(%rbp), %rax
leaq 0x11c10c1(%rip), %rcx # 0x1e02170
addq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movslq -0x74(%rbp), %rax
leaq 0x11c10ac(%rip), %rdi # 0x1e02170
addq %rax, %rdi
callq 0x433770
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rdi
leaq 0x1c2f63(%rip), %rsi # 0xe04046
callq 0x434520
cmpl $0x0, %eax
jne 0xc41106
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
jne 0xc41106
movl $0x6, -0x34(%rbp)
jmp 0xc41123
movq -0x48(%rbp), %rax
movq (%rax), %rdi
callq 0xc41160
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc41147
movl -0x7c(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
callq 0x433650
nopl (%rax)
|
addr_resolve:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov [rbp+var_58], 0
mov [rbp+var_60], 0
mov [rbp+var_68], 0
mov [rbp+var_70], 0FFFFFFFFh
mov [rbp+var_74], 0FFFFFFFFh
mov eax, cs:out
mov cs:poll_fds, eax
mov cs:word_1E02164, 81h
lea rdi, [rbp+var_30]
mov rcx, [rbp+var_40]
mov esi, 20h ; ' '
lea rdx, aThreadPointerP+10h; "%p\n"
mov al, 0
call my_snprintf
mov [rbp+var_50], rax
mov edi, cs:dword_1E01D38
lea rsi, [rbp+var_30]
mov rdx, [rbp+var_50]
call _write
cmp rax, 0
jg short loc_C40F5B
mov eax, cs:first_error
mov ecx, eax
add ecx, 1
mov cs:first_error, ecx
cmp eax, 0
jnz short loc_C40F4F
mov rax, cs:stderr_ptr
mov rsi, [rax]
lea rdi, aPrintingToAddr; "Printing to addr2line failed\n"
call _fputs
loc_C40F4F:
mov [rbp+var_34], 3
jmp loc_C41123
loc_C40F5B:
jmp short $+2
loc_C40F5D:
mov rcx, [rbp+var_68]
xor eax, eax
cmp rcx, [rbp+var_58]
mov [rbp+var_75], al
jnz short loc_C40F8E
lea rdi, poll_fds
mov esi, 1
mov edx, 1F4h
call _poll
mov [rbp+var_6C], eax
cmp eax, 0
setnz al
mov [rbp+var_75], al
loc_C40F8E:
mov al, [rbp+var_75]
test al, 1
jnz short loc_C40F9A
jmp loc_C4107D
loc_C40F9A:
cmp [rbp+var_6C], 0
jge short loc_C40FAC
mov [rbp+var_34], 1
jmp loc_C41123
loc_C40FAC:
mov edi, cs:out
lea rsi, output
add rsi, [rbp+var_58]
mov edx, 400h
sub rdx, [rbp+var_58]
call _read
mov [rbp+var_60], rax
cmp [rbp+var_60], 0
jge short loc_C40FE2
mov [rbp+var_34], 4
jmp loc_C41123
loc_C40FE2:
cmp [rbp+var_60], 0
jnz short loc_C40FEE
jmp loc_C4107D
loc_C40FEE:
mov rax, [rbp+var_60]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_C40FFA:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_58]
jge short loc_C41078
mov rcx, [rbp+var_68]
lea rax, output
movsx eax, byte ptr [rax+rcx]
cmp eax, 0Ah
jnz short loc_C41032
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_70], eax
mov rcx, [rbp+var_68]
lea rax, output
mov byte ptr [rax+rcx], 0
loc_C41032:
cmp [rbp+var_70], 0FFFFFFFFh
jz short loc_C41068
mov rcx, [rbp+var_68]
lea rax, output
movsx eax, byte ptr [rax+rcx]
cmp eax, 3Ah ; ':'
jnz short loc_C41068
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_74], eax
mov rcx, [rbp+var_68]
lea rax, output
mov byte ptr [rax+rcx], 0
jmp short loc_C41078
loc_C41068:
jmp short $+2
loc_C4106A:
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_68], rax
jmp short loc_C40FFA
loc_C41078:
jmp loc_C40F5D
loc_C4107D:
cmp [rbp+var_70], 0FFFFFFFFh
jz short loc_C41089
cmp [rbp+var_74], 0FFFFFFFFh
jnz short loc_C41095
loc_C41089:
mov [rbp+var_34], 5
jmp loc_C41123
loc_C41095:
mov rax, [rbp+var_48]
lea rcx, output
mov [rax+8], rcx
movsxd rax, [rbp+var_70]
lea rcx, output
add rcx, rax
mov rax, [rbp+var_48]
mov [rax], rcx
movsxd rax, [rbp+var_74]
lea rdi, output
add rdi, rax
call _atoi
mov ecx, eax
mov rax, [rbp+var_48]
mov [rax+10h], ecx
mov rax, [rbp+var_48]
mov rdi, [rax]
lea rsi, asc_E04044+2; "??"
call _strcmp
cmp eax, 0
jnz short loc_C41106
mov rax, [rbp+var_48]
mov rax, [rax+8]
movsx eax, byte ptr [rax]
cmp eax, 3Fh ; '?'
jnz short loc_C41106
mov [rbp+var_34], 6
jmp short loc_C41123
loc_C41106:
mov rax, [rbp+var_48]
mov rdi, [rax]
call strip_path
mov rcx, rax
mov rax, [rbp+var_48]
mov [rax], rcx
mov [rbp+var_34], 0
loc_C41123:
mov eax, [rbp+var_34]
mov [rbp+var_7C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C41147
mov eax, [rbp+var_7C]
add rsp, 80h
pop rbp
retn
loc_C41147:
call ___stack_chk_fail
|
long long addr_resolve(int a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
bool v8; // [rsp+Bh] [rbp-75h]
int v9; // [rsp+Ch] [rbp-74h]
int v10; // [rsp+10h] [rbp-70h]
int v11; // [rsp+14h] [rbp-6Ch]
long long v12; // [rsp+18h] [rbp-68h]
long long v13; // [rsp+20h] [rbp-60h]
long long v14; // [rsp+28h] [rbp-58h]
long long v15; // [rsp+30h] [rbp-50h]
_BYTE v17[40]; // [rsp+50h] [rbp-30h] BYREF
unsigned long long v18; // [rsp+78h] [rbp-8h]
v18 = __readfsqword(0x28u);
v14 = 0LL;
v12 = 0LL;
v10 = -1;
v9 = -1;
poll_fds = out;
word_1E02164 = 129;
v15 = my_snprintf((unsigned int)v17, 32, (unsigned int)"%p\n", a1, a5, a6);
if ( write((unsigned int)dword_1E01D38, v17, v15) > 0 )
{
while ( 1 )
{
LABEL_5:
v8 = 0;
if ( v12 == v14 )
{
v11 = poll(&poll_fds, 1LL, 500LL);
v8 = v11 != 0;
}
if ( !v8 )
break;
if ( v11 < 0 )
return 1;
v13 = read((unsigned int)out, &output[v14], 1024 - v14);
if ( v13 < 0 )
return 4;
if ( !v13 )
break;
v14 += v13;
while ( v12 < v14 )
{
if ( output[v12] == 10 )
{
v10 = v12 + 1;
output[v12] = 0;
}
if ( v10 != -1 && output[v12] == 58 )
{
v9 = v12 + 1;
output[v12] = 0;
goto LABEL_5;
}
++v12;
}
}
if ( v10 == -1 || v9 == -1 )
{
return 5;
}
else
{
a2[1] = output;
*a2 = &output[v10];
*((_DWORD *)a2 + 4) = atoi(&output[v9]);
if ( !(unsigned int)strcmp(*a2, "??") && *(_BYTE *)a2[1] == 63 )
{
return 6;
}
else
{
*a2 = strip_path(*a2);
return 0;
}
}
}
else
{
if ( !first_error++ )
fputs("Printing to addr2line failed\n", stderr);
return 3;
}
}
|
_ma_get_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x00c40f6d
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x00c40f6d
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
ADD EAX,dword ptr [RBP + -0x28]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x005333b0
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00c40feb
LAB_00c40f6d:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x744]
ADD ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX],0x0
LAB_00c40f94:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x00c40fdb
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x38]
CALL RAX
CMP EAX,0x0
JNZ 0x00c40fd9
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,0x7e
CALL 0x00bf5560
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00c40feb
LAB_00c40fd9:
JMP 0x00c40f94
LAB_00c40fdb:
JMP 0x00c40fdd
LAB_00c40fdd:
JMP 0x00c40fdf
LAB_00c40fdf:
JMP 0x00c40fe1
LAB_00c40fe1:
JMP 0x00c40fe3
LAB_00c40fe3:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00c40feb:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
void * _ma_get_key(int8 *param_1,long param_2,void *param_3)
{
int iVar1;
void *local_40;
long *local_38;
uint local_30;
uint local_2c;
void *local_28;
long local_20;
int8 *local_18;
void *local_10;
local_38 = (long *)param_1[1];
local_40 = *(void **)(param_2 + 0x10);
local_2c = *(uint *)(param_2 + 0x2c);
local_30 = *(uint *)(param_2 + 0x28);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) {
memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)local_38 + 0xaa) + local_30));
*(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740);
*(uint *)(local_18 + 2) =
(uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14);
*(int4 *)(local_18 + 3) = 0;
local_10 = (void *)((long)local_28 +
(ulong)local_30 + (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa));
}
else {
local_40 = (void *)((long)local_40 + (ulong)(*(int *)(*local_38 + 0x744) + local_30));
*(int1 *)*param_1 = 0;
do {
if (local_28 < local_40) {
return local_40;
}
iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40);
} while (iVar1 != 0);
_ma_set_fatal_error_with_share(*local_38,0x7e);
local_10 = (void *)0x0;
}
return local_10;
}
|
|
63,795 |
fini_one_value
|
eloqsql/mysys/my_getopt.c
|
static void fini_one_value(const struct my_option *option, void *variable,
longlong value __attribute__ ((unused)))
{
DBUG_ENTER("fini_one_value");
switch ((option->var_type & GET_TYPE_MASK)) {
case GET_STR_ALLOC:
my_free(*((char**) variable));
*((char**) variable)= NULL;
break;
default: /* dummy default to avoid compiler warnings */
break;
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
fini_one_value:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x3f, %eax
subl $0xa, %eax
jne 0xfd97e
jmp 0xfd965
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x102790
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0xfd980
jmp 0xfd980
jmp 0xfd982
jmp 0xfd984
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
fini_one_value:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+30h]
and eax, 3Fh
sub eax, 0Ah
jnz short loc_FD97E
jmp short $+2
loc_FD965:
mov rax, [rbp+var_10]
mov rdi, [rax]
call my_free
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
jmp short loc_FD980
loc_FD97E:
jmp short $+2
loc_FD980:
jmp short $+2
loc_FD982:
jmp short $+2
loc_FD984:
add rsp, 20h
pop rbp
retn
|
_QWORD * fini_one_value(long long a1, _QWORD *a2)
{
_QWORD *result; // rax
result = (_QWORD *)((*(_DWORD *)(a1 + 48) & 0x3Fu) - 10);
if ( (*(_DWORD *)(a1 + 48) & 0x3F) == 0xA )
{
my_free(*a2);
result = a2;
*a2 = 0LL;
}
return result;
}
|
fini_one_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x30]
AND EAX,0x3f
SUB EAX,0xa
JNZ 0x001fd97e
JMP 0x001fd965
LAB_001fd965:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00202790
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
JMP 0x001fd980
LAB_001fd97e:
JMP 0x001fd980
LAB_001fd980:
JMP 0x001fd982
LAB_001fd982:
JMP 0x001fd984
LAB_001fd984:
ADD RSP,0x20
POP RBP
RET
|
void fini_one_value(long param_1,int8 *param_2)
{
if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) {
my_free(*param_2);
*param_2 = 0;
}
return;
}
|
|
63,796 |
fini_one_value
|
eloqsql/mysys/my_getopt.c
|
static void fini_one_value(const struct my_option *option, void *variable,
longlong value __attribute__ ((unused)))
{
DBUG_ENTER("fini_one_value");
switch ((option->var_type & GET_TYPE_MASK)) {
case GET_STR_ALLOC:
my_free(*((char**) variable));
*((char**) variable)= NULL;
break;
default: /* dummy default to avoid compiler warnings */
break;
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
fini_one_value:
movl 0x30(%rdi), %eax
andl $0x3f, %eax
cmpl $0xa, %eax
jne 0xa7d24
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rdi
callq 0xaa406
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
fini_one_value:
mov eax, [rdi+30h]
and eax, 3Fh
cmp eax, 0Ah
jnz short locret_A7D24
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rsi
mov rdi, [rsi]
call my_free
mov qword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
locret_A7D24:
retn
|
long long fini_one_value(long long a1, _QWORD *a2)
{
long long result; // rax
result = *(_DWORD *)(a1 + 48) & 0x3F;
if ( (_DWORD)result == 10 )
{
result = my_free(*a2);
*a2 = 0LL;
}
return result;
}
|
fini_one_value:
MOV EAX,dword ptr [RDI + 0x30]
AND EAX,0x3f
CMP EAX,0xa
JNZ 0x001a7d24
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RDI,qword ptr [RSI]
CALL 0x001aa406
MOV qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
LAB_001a7d24:
RET
|
void fini_one_value(long param_1,int8 *param_2)
{
if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) {
my_free(*param_2);
*param_2 = 0;
}
return;
}
|
|
63,797 |
Vector3MoveTowards
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance)
{
Vector3 result = { 0 };
float dx = target.x - v.x;
float dy = target.y - v.y;
float dz = target.z - v.z;
float value = (dx*dx) + (dy*dy) + (dz*dz);
if ((value == 0) || ((maxDistance >= 0) && (value <= maxDistance*maxDistance))) return target;
float dist = sqrtf(value);
result.x = v.x + dx/dist*maxDistance;
result.y = v.y + dy/dist*maxDistance;
result.z = v.z + dz/dist*maxDistance;
return result;
}
|
O1
|
c
|
Vector3MoveTowards:
movaps %xmm0, %xmm9
movaps %xmm2, %xmm6
subps %xmm0, %xmm6
movaps %xmm6, %xmm8
shufps $0x55, %xmm6, %xmm8 # xmm8 = xmm8[1,1],xmm6[1,1]
movaps %xmm3, %xmm7
subss %xmm1, %xmm7
movaps %xmm8, %xmm0
mulss %xmm8, %xmm0
movaps %xmm6, %xmm5
mulss %xmm6, %xmm5
addss %xmm0, %xmm5
movaps %xmm7, %xmm0
mulss %xmm7, %xmm0
addss %xmm5, %xmm0
xorps %xmm5, %xmm5
ucomiss %xmm5, %xmm0
jne 0x687e5
jnp 0x688a0
ucomiss %xmm5, %xmm4
jb 0x687fa
movaps %xmm4, %xmm5
mulss %xmm4, %xmm5
ucomiss %xmm0, %xmm5
jae 0x688a0
movaps %xmm9, %xmm3
shufps $0x55, %xmm9, %xmm3 # xmm3 = xmm3[1,1],xmm9[1,1]
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jb 0x68811
sqrtss %xmm0, %xmm0
jmp 0x6886e
subq $0x58, %rsp
movss %xmm4, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movaps %xmm6, 0x40(%rsp)
movss %xmm7, 0x4(%rsp)
movaps %xmm8, 0x30(%rsp)
movaps %xmm9, 0x20(%rsp)
movaps %xmm3, 0x10(%rsp)
callq 0x99f0
movaps 0x10(%rsp), %xmm3
movaps 0x20(%rsp), %xmm9
movaps 0x30(%rsp), %xmm8
movss 0x4(%rsp), %xmm7
movaps 0x40(%rsp), %xmm6
movss 0x8(%rsp), %xmm1
movss 0xc(%rsp), %xmm4
addq $0x58, %rsp
divss %xmm0, %xmm6
mulss %xmm4, %xmm6
addss %xmm9, %xmm6
divss %xmm0, %xmm8
mulss %xmm4, %xmm8
addss %xmm3, %xmm8
unpcklps %xmm8, %xmm6 # xmm6 = xmm6[0],xmm8[0],xmm6[1],xmm8[1]
divss %xmm0, %xmm7
mulss %xmm4, %xmm7
addss %xmm1, %xmm7
movaps %xmm6, %xmm2
movaps %xmm7, %xmm3
movaps %xmm2, %xmm0
movaps %xmm3, %xmm1
retq
|
Vector3MoveTowards:
movaps xmm9, xmm0
movaps xmm6, xmm2
subps xmm6, xmm0
movaps xmm8, xmm6
shufps xmm8, xmm6, 55h ; 'U'
movaps xmm7, xmm3
subss xmm7, xmm1
movaps xmm0, xmm8
mulss xmm0, xmm8
movaps xmm5, xmm6
mulss xmm5, xmm6
addss xmm5, xmm0
movaps xmm0, xmm7
mulss xmm0, xmm7
addss xmm0, xmm5
xorps xmm5, xmm5
ucomiss xmm0, xmm5
jnz short loc_687E5
jnp loc_688A0
loc_687E5:
ucomiss xmm4, xmm5
jb short loc_687FA
movaps xmm5, xmm4
mulss xmm5, xmm4
ucomiss xmm5, xmm0
jnb loc_688A0
loc_687FA:
movaps xmm3, xmm9
shufps xmm3, xmm9, 55h ; 'U'
xorps xmm2, xmm2
ucomiss xmm0, xmm2
jb short loc_68811
sqrtss xmm0, xmm0
jmp short loc_6886E
loc_68811:
sub rsp, 58h
movss [rsp+58h+var_4C], xmm4
movss [rsp+58h+var_50], xmm1
movaps [rsp+58h+var_18], xmm6
movss [rsp+58h+var_54], xmm7
movaps [rsp+58h+var_28], xmm8
movaps [rsp+58h+var_38], xmm9
movaps [rsp+58h+var_48], xmm3
call _sqrtf
movaps xmm3, [rsp+58h+var_48]
movaps xmm9, [rsp+58h+var_38]
movaps xmm8, [rsp+58h+var_28]
movss xmm7, [rsp+58h+var_54]
movaps xmm6, [rsp+58h+var_18]
movss xmm1, [rsp+58h+var_50]
movss xmm4, [rsp+58h+var_4C]
add rsp, 58h
loc_6886E:
divss xmm6, xmm0
mulss xmm6, xmm4
addss xmm6, xmm9
divss xmm8, xmm0
mulss xmm8, xmm4
addss xmm8, xmm3
unpcklps xmm6, xmm8
divss xmm7, xmm0
mulss xmm7, xmm4
addss xmm7, xmm1
movaps xmm2, xmm6
movaps xmm3, xmm7
loc_688A0:
movaps xmm0, xmm2
movaps xmm1, xmm3
retn
|
__m128 Vector3MoveTowards(__m128 a1, float a2, __m128 a3, double a4, float a5)
{
__m128 v6; // xmm6
__m128 v7; // xmm8
double v8; // xmm0_8
float v9; // xmm3_4
float v11; // [rsp+8h] [rbp-4Ch]
v6 = _mm_sub_ps(a3, a1);
v7 = _mm_shuffle_ps(v6, v6, 85);
HIDWORD(v8) = HIDWORD(a4);
*(float *)&v8 = (float)((float)(*(float *)&a4 - a2) * (float)(*(float *)&a4 - a2))
+ (float)((float)(v6.m128_f32[0] * v6.m128_f32[0]) + (float)(v7.m128_f32[0] * v7.m128_f32[0]));
if ( *(float *)&v8 != 0.0 && (a5 < 0.0 || (float)(a5 * a5) < *(float *)&v8) )
{
LODWORD(v9) = _mm_shuffle_ps(a1, a1, 85).m128_u32[0];
if ( *(float *)&v8 < 0.0 )
{
v11 = a5;
v8 = sqrtf(v8);
a5 = v11;
}
else
{
*(float *)&v8 = fsqrt(*(float *)&v8);
}
v6.m128_f32[0] = (float)((float)(v6.m128_f32[0] / *(float *)&v8) * a5) + a1.m128_f32[0];
v7.m128_f32[0] = (float)((float)(v7.m128_f32[0] / *(float *)&v8) * a5) + v9;
return _mm_unpacklo_ps(v6, v7);
}
return a3;
}
|
Vector3MoveTowards:
MOVAPS XMM9,XMM0
MOVAPS XMM6,XMM2
SUBPS XMM6,XMM0
MOVAPS XMM8,XMM6
SHUFPS XMM8,XMM6,0x55
MOVAPS XMM7,XMM3
SUBSS XMM7,XMM1
MOVAPS XMM0,XMM8
MULSS XMM0,XMM8
MOVAPS XMM5,XMM6
MULSS XMM5,XMM6
ADDSS XMM5,XMM0
MOVAPS XMM0,XMM7
MULSS XMM0,XMM7
ADDSS XMM0,XMM5
XORPS XMM5,XMM5
UCOMISS XMM0,XMM5
JNZ 0x001687e5
JNP 0x001688a0
LAB_001687e5:
UCOMISS XMM4,XMM5
JC 0x001687fa
MOVAPS XMM5,XMM4
MULSS XMM5,XMM4
UCOMISS XMM5,XMM0
JNC 0x001688a0
LAB_001687fa:
MOVAPS XMM3,XMM9
SHUFPS XMM3,XMM9,0x55
XORPS XMM2,XMM2
UCOMISS XMM0,XMM2
JC 0x00168811
SQRTSS XMM0,XMM0
JMP 0x0016886e
LAB_00168811:
SUB RSP,0x58
MOVSS dword ptr [RSP + 0xc],XMM4
MOVSS dword ptr [RSP + 0x8],XMM1
MOVAPS xmmword ptr [RSP + 0x40],XMM6
MOVSS dword ptr [RSP + 0x4],XMM7
MOVAPS xmmword ptr [RSP + 0x30],XMM8
MOVAPS xmmword ptr [RSP + 0x20],XMM9
MOVAPS xmmword ptr [RSP + 0x10],XMM3
CALL 0x001099f0
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVAPS XMM9,xmmword ptr [RSP + 0x20]
MOVAPS XMM8,xmmword ptr [RSP + 0x30]
MOVSS XMM7,dword ptr [RSP + 0x4]
MOVAPS XMM6,xmmword ptr [RSP + 0x40]
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS XMM4,dword ptr [RSP + 0xc]
ADD RSP,0x58
LAB_0016886e:
DIVSS XMM6,XMM0
MULSS XMM6,XMM4
ADDSS XMM6,XMM9
DIVSS XMM8,XMM0
MULSS XMM8,XMM4
ADDSS XMM8,XMM3
UNPCKLPS XMM6,XMM8
DIVSS XMM7,XMM0
MULSS XMM7,XMM4
ADDSS XMM7,XMM1
MOVAPS XMM2,XMM6
MOVAPS XMM3,XMM7
LAB_001688a0:
MOVAPS XMM0,XMM2
MOVAPS XMM1,XMM3
RET
|
int8
Vector3MoveTowards(int8 param_1,float param_2,int8 param_3,float param_4,float param_5)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
fVar6 = (float)((ulong)param_3 >> 0x20);
fVar4 = (float)param_3;
fVar2 = (float)((ulong)param_1 >> 0x20);
fVar3 = fVar4 - (float)param_1;
fVar5 = fVar6 - fVar2;
fVar1 = (param_4 - param_2) * (param_4 - param_2) + fVar3 * fVar3 + fVar5 * fVar5;
if (((fVar1 != 0.0) || (NAN(fVar1))) && ((param_5 < 0.0 || (param_5 * param_5 < fVar1)))) {
if (fVar1 < 0.0) {
fVar1 = sqrtf(fVar1);
}
else {
fVar1 = SQRT(fVar1);
}
fVar4 = (fVar3 / fVar1) * param_5 + (float)param_1;
fVar6 = (fVar5 / fVar1) * param_5 + fVar2;
}
return CONCAT44(fVar6,fVar4);
}
|
|
63,798 |
Vector3MoveTowards
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance)
{
Vector3 result = { 0 };
float dx = target.x - v.x;
float dy = target.y - v.y;
float dz = target.z - v.z;
float value = (dx*dx) + (dy*dy) + (dz*dz);
if ((value == 0) || ((maxDistance >= 0) && (value <= maxDistance*maxDistance))) return target;
float dist = sqrtf(value);
result.x = v.x + dx/dist*maxDistance;
result.y = v.y + dy/dist*maxDistance;
result.z = v.z + dz/dist*maxDistance;
return result;
}
|
O2
|
c
|
Vector3MoveTowards:
movaps %xmm2, %xmm6
subps %xmm0, %xmm6
movaps %xmm3, %xmm5
subss %xmm1, %xmm5
movaps %xmm6, %xmm7
mulps %xmm6, %xmm7
shufps $0x55, %xmm7, %xmm7 # xmm7 = xmm7[1,1,1,1]
movaps %xmm6, %xmm8
mulss %xmm6, %xmm8
addss %xmm7, %xmm8
movaps %xmm5, %xmm7
mulss %xmm5, %xmm7
addss %xmm8, %xmm7
xorps %xmm8, %xmm8
ucomiss %xmm8, %xmm7
jne 0x56c21
jnp 0x56c5d
ucomiss %xmm8, %xmm4
jb 0x56c36
movaps %xmm4, %xmm8
mulss %xmm4, %xmm8
ucomiss %xmm7, %xmm8
jae 0x56c5d
sqrtss %xmm7, %xmm2
divss %xmm2, %xmm5
shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0]
divps %xmm2, %xmm6
mulss %xmm4, %xmm5
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps %xmm6, %xmm4
addps %xmm0, %xmm4
addss %xmm1, %xmm5
movaps %xmm4, %xmm2
movaps %xmm5, %xmm3
movaps %xmm2, %xmm0
movaps %xmm3, %xmm1
retq
|
Vector3MoveTowards:
movaps xmm6, xmm2
subps xmm6, xmm0
movaps xmm5, xmm3
subss xmm5, xmm1
movaps xmm7, xmm6
mulps xmm7, xmm6
shufps xmm7, xmm7, 55h ; 'U'
movaps xmm8, xmm6
mulss xmm8, xmm6
addss xmm8, xmm7
movaps xmm7, xmm5
mulss xmm7, xmm5
addss xmm7, xmm8
xorps xmm8, xmm8
ucomiss xmm7, xmm8
jnz short loc_56C21
jnp short loc_56C5D
loc_56C21:
ucomiss xmm4, xmm8
jb short loc_56C36
movaps xmm8, xmm4
mulss xmm8, xmm4
ucomiss xmm8, xmm7
jnb short loc_56C5D
loc_56C36:
sqrtss xmm2, xmm7
divss xmm5, xmm2
shufps xmm2, xmm2, 0
divps xmm6, xmm2
mulss xmm5, xmm4
shufps xmm4, xmm4, 0
mulps xmm4, xmm6
addps xmm4, xmm0
addss xmm5, xmm1
movaps xmm2, xmm4
movaps xmm3, xmm5
loc_56C5D:
movaps xmm0, xmm2
movaps xmm1, xmm3
retn
|
__m128 Vector3MoveTowards(__m128 a1, float a2, __m128 a3, float a4, __m128 a5)
{
__m128 v5; // xmm6
__m128 v6; // xmm7
float v7; // xmm7_4
v5 = _mm_sub_ps(a3, a1);
v6 = _mm_mul_ps(v5, v5);
v7 = (float)((float)(a4 - a2) * (float)(a4 - a2))
+ (float)((float)(v5.m128_f32[0] * v5.m128_f32[0]) + _mm_shuffle_ps(v6, v6, 85).m128_f32[0]);
if ( v7 != 0.0 && (a5.m128_f32[0] < 0.0 || (float)(a5.m128_f32[0] * a5.m128_f32[0]) < v7) )
{
a3.m128_f32[0] = fsqrt(v7);
return _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(a5, a5, 0), _mm_div_ps(v5, _mm_shuffle_ps(a3, a3, 0))), a1);
}
return a3;
}
|
Vector3MoveTowards:
MOVAPS XMM6,XMM2
SUBPS XMM6,XMM0
MOVAPS XMM5,XMM3
SUBSS XMM5,XMM1
MOVAPS XMM7,XMM6
MULPS XMM7,XMM6
SHUFPS XMM7,XMM7,0x55
MOVAPS XMM8,XMM6
MULSS XMM8,XMM6
ADDSS XMM8,XMM7
MOVAPS XMM7,XMM5
MULSS XMM7,XMM5
ADDSS XMM7,XMM8
XORPS XMM8,XMM8
UCOMISS XMM7,XMM8
JNZ 0x00156c21
JNP 0x00156c5d
LAB_00156c21:
UCOMISS XMM4,XMM8
JC 0x00156c36
MOVAPS XMM8,XMM4
MULSS XMM8,XMM4
UCOMISS XMM8,XMM7
JNC 0x00156c5d
LAB_00156c36:
SQRTSS XMM2,XMM7
DIVSS XMM5,XMM2
SHUFPS XMM2,XMM2,0x0
DIVPS XMM6,XMM2
MULSS XMM5,XMM4
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,XMM6
ADDPS XMM4,XMM0
ADDSS XMM5,XMM1
MOVAPS XMM2,XMM4
MOVAPS XMM3,XMM5
LAB_00156c5d:
MOVAPS XMM0,XMM2
MOVAPS XMM1,XMM3
RET
|
int8
Vector3MoveTowards(int8 param_1,float param_2,int8 param_3,float param_4,float param_5)
{
int1 auVar1 [16];
float fVar2;
float in_XMM0_Dc;
float in_XMM0_Dd;
float in_XMM2_Dc;
float in_XMM2_Dd;
float fVar3;
float fVar4;
int1 auVar5 [16];
float fVar6;
fVar4 = (float)((ulong)param_3 >> 0x20);
fVar3 = (float)param_3;
fVar2 = (float)((ulong)param_1 >> 0x20);
auVar5._0_4_ = fVar3 - (float)param_1;
auVar5._4_4_ = fVar4 - fVar2;
auVar5._8_4_ = in_XMM2_Dc - in_XMM0_Dc;
auVar5._12_4_ = in_XMM2_Dd - in_XMM0_Dd;
fVar6 = (param_4 - param_2) * (param_4 - param_2) +
auVar5._0_4_ * auVar5._0_4_ + auVar5._4_4_ * auVar5._4_4_;
if (((fVar6 != 0.0) || (NAN(fVar6))) && ((param_5 < 0.0 || (param_5 * param_5 < fVar6)))) {
fVar6 = SQRT(fVar6);
auVar1._4_4_ = fVar6;
auVar1._0_4_ = fVar6;
auVar1._8_4_ = fVar6;
auVar1._12_4_ = fVar6;
auVar5 = divps(auVar5,auVar1);
fVar3 = param_5 * auVar5._0_4_ + (float)param_1;
fVar4 = param_5 * auVar5._4_4_ + fVar2;
}
return CONCAT44(fVar4,fVar3);
}
|
|
63,799 |
Vector3MoveTowards
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector3 Vector3MoveTowards(Vector3 v, Vector3 target, float maxDistance)
{
Vector3 result = { 0 };
float dx = target.x - v.x;
float dy = target.y - v.y;
float dz = target.z - v.z;
float value = (dx*dx) + (dy*dy) + (dz*dz);
if ((value == 0) || ((maxDistance >= 0) && (value <= maxDistance*maxDistance))) return target;
float dist = sqrtf(value);
result.x = v.x + dx/dist*maxDistance;
result.y = v.y + dy/dist*maxDistance;
result.z = v.z + dz/dist*maxDistance;
return result;
}
|
O3
|
c
|
Vector3MoveTowards:
movaps %xmm2, %xmm6
subps %xmm0, %xmm6
movaps %xmm3, %xmm5
subss %xmm1, %xmm5
movaps %xmm6, %xmm7
mulps %xmm6, %xmm7
shufps $0x55, %xmm7, %xmm7 # xmm7 = xmm7[1,1,1,1]
movaps %xmm6, %xmm8
mulss %xmm6, %xmm8
addss %xmm7, %xmm8
movaps %xmm5, %xmm7
mulss %xmm5, %xmm7
addss %xmm8, %xmm7
xorps %xmm8, %xmm8
ucomiss %xmm8, %xmm7
jne 0x66bc8
jnp 0x66c07
ucomiss %xmm8, %xmm4
jb 0x66bdd
movaps %xmm4, %xmm8
mulss %xmm4, %xmm8
ucomiss %xmm7, %xmm8
jae 0x66c07
xorps %xmm2, %xmm2
sqrtss %xmm7, %xmm2
divss %xmm2, %xmm5
shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0]
divps %xmm2, %xmm6
mulss %xmm4, %xmm5
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps %xmm6, %xmm4
addps %xmm0, %xmm4
addss %xmm1, %xmm5
movaps %xmm4, %xmm2
movaps %xmm5, %xmm3
movaps %xmm2, %xmm0
movaps %xmm3, %xmm1
retq
|
Vector3MoveTowards:
movaps xmm6, xmm2
subps xmm6, xmm0
movaps xmm5, xmm3
subss xmm5, xmm1
movaps xmm7, xmm6
mulps xmm7, xmm6
shufps xmm7, xmm7, 55h ; 'U'
movaps xmm8, xmm6
mulss xmm8, xmm6
addss xmm8, xmm7
movaps xmm7, xmm5
mulss xmm7, xmm5
addss xmm7, xmm8
xorps xmm8, xmm8
ucomiss xmm7, xmm8
jnz short loc_66BC8
jnp short loc_66C07
loc_66BC8:
ucomiss xmm4, xmm8
jb short loc_66BDD
movaps xmm8, xmm4
mulss xmm8, xmm4
ucomiss xmm8, xmm7
jnb short loc_66C07
loc_66BDD:
xorps xmm2, xmm2
sqrtss xmm2, xmm7
divss xmm5, xmm2
shufps xmm2, xmm2, 0
divps xmm6, xmm2
mulss xmm5, xmm4
shufps xmm4, xmm4, 0
mulps xmm4, xmm6
addps xmm4, xmm0
addss xmm5, xmm1
movaps xmm2, xmm4
movaps xmm3, xmm5
loc_66C07:
movaps xmm0, xmm2
movaps xmm1, xmm3
retn
|
__m128 Vector3MoveTowards(__m128 a1, float a2, __m128 a3, float a4, __m128 a5)
{
__m128 v5; // xmm6
__m128 v6; // xmm7
float v7; // xmm7_4
__m128 v8; // xmm2
v5 = _mm_sub_ps(a3, a1);
v6 = _mm_mul_ps(v5, v5);
v7 = (float)((float)(a4 - a2) * (float)(a4 - a2))
+ (float)((float)(v5.m128_f32[0] * v5.m128_f32[0]) + _mm_shuffle_ps(v6, v6, 85).m128_f32[0]);
if ( v7 != 0.0 && (a5.m128_f32[0] < 0.0 || (float)(a5.m128_f32[0] * a5.m128_f32[0]) < v7) )
{
v8 = 0LL;
v8.m128_f32[0] = fsqrt(v7);
return _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(a5, a5, 0), _mm_div_ps(v5, _mm_shuffle_ps(v8, v8, 0))), a1);
}
return a3;
}
|
Vector3MoveTowards:
MOVAPS XMM6,XMM2
SUBPS XMM6,XMM0
MOVAPS XMM5,XMM3
SUBSS XMM5,XMM1
MOVAPS XMM7,XMM6
MULPS XMM7,XMM6
SHUFPS XMM7,XMM7,0x55
MOVAPS XMM8,XMM6
MULSS XMM8,XMM6
ADDSS XMM8,XMM7
MOVAPS XMM7,XMM5
MULSS XMM7,XMM5
ADDSS XMM7,XMM8
XORPS XMM8,XMM8
UCOMISS XMM7,XMM8
JNZ 0x00166bc8
JNP 0x00166c07
LAB_00166bc8:
UCOMISS XMM4,XMM8
JC 0x00166bdd
MOVAPS XMM8,XMM4
MULSS XMM8,XMM4
UCOMISS XMM8,XMM7
JNC 0x00166c07
LAB_00166bdd:
XORPS XMM2,XMM2
SQRTSS XMM2,XMM7
DIVSS XMM5,XMM2
SHUFPS XMM2,XMM2,0x0
DIVPS XMM6,XMM2
MULSS XMM5,XMM4
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,XMM6
ADDPS XMM4,XMM0
ADDSS XMM5,XMM1
MOVAPS XMM2,XMM4
MOVAPS XMM3,XMM5
LAB_00166c07:
MOVAPS XMM0,XMM2
MOVAPS XMM1,XMM3
RET
|
int8
Vector3MoveTowards(int8 param_1,float param_2,int8 param_3,float param_4,float param_5)
{
int1 auVar1 [16];
float fVar2;
float in_XMM0_Dc;
float in_XMM0_Dd;
float in_XMM2_Dc;
float in_XMM2_Dd;
float fVar3;
float fVar4;
int1 auVar5 [16];
float fVar6;
fVar4 = (float)((ulong)param_3 >> 0x20);
fVar3 = (float)param_3;
fVar2 = (float)((ulong)param_1 >> 0x20);
auVar5._0_4_ = fVar3 - (float)param_1;
auVar5._4_4_ = fVar4 - fVar2;
auVar5._8_4_ = in_XMM2_Dc - in_XMM0_Dc;
auVar5._12_4_ = in_XMM2_Dd - in_XMM0_Dd;
fVar6 = (param_4 - param_2) * (param_4 - param_2) +
auVar5._0_4_ * auVar5._0_4_ + auVar5._4_4_ * auVar5._4_4_;
if (((fVar6 != 0.0) || (NAN(fVar6))) && ((param_5 < 0.0 || (param_5 * param_5 < fVar6)))) {
fVar6 = SQRT(fVar6);
auVar1._4_4_ = fVar6;
auVar1._0_4_ = fVar6;
auVar1._8_4_ = fVar6;
auVar1._12_4_ = fVar6;
auVar5 = divps(auVar5,auVar1);
fVar3 = param_5 * auVar5._0_4_ + (float)param_1;
fVar4 = param_5 * auVar5._4_4_ + fVar2;
}
return CONCAT44(fVar4,fVar3);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.