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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
50,800 | rak_array_print | fabiosvm[P]rak/src/array.c | void rak_array_print(RakArray *arr)
{
printf("[");
int len = rak_array_len(arr);
for (int i = 0; i < len; ++i)
{
if (i > 0) printf(", ");
RakValue val = rak_array_get(arr, i);
rak_value_print(val);
}
printf("]");
} | O0 | c | rak_array_print:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xb1ab(%rip), %rdi # 0xe01e
movb $0x0, %al
callq 0x2080
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2ee1
cmpl $0x0, -0x10(%rbp)
jle 0x2ea7
leaq 0xb180(%rip), %rdi # 0xe020
movb $0x0, %al
callq 0x2080
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xb370
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2e8b
leaq 0xb13b(%rip), %rdi # 0xe023
movb $0x0, %al
callq 0x2080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| rak_array_print:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
lea rdi, asc_E01E; "["
mov al, 0
call _printf
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_C], eax
mov [rbp+var_10], 0
loc_2E8B:
mov eax, [rbp+var_10]
cmp eax, [rbp+var_C]
jge short loc_2EE1
cmp [rbp+var_10], 0
jle short loc_2EA7
lea rdi, asc_E020; ", "
mov al, 0
call _printf
loc_2EA7:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
movsxd rcx, [rbp+var_10]
shl rcx, 4
add rax, rcx
mov rcx, [rax]
mov [rbp+var_20], rcx
mov rax, [rax+8]
mov [rbp+var_18], rax
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_18]
call rak_value_print
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp short loc_2E8B
loc_2EE1:
lea rdi, asc_E023; "]"
mov al, 0
call _printf
add rsp, 20h
pop rbp
retn
| long long rak_array_print(long long a1)
{
_QWORD *v1; // rax
int i; // [rsp+10h] [rbp-10h]
int v4; // [rsp+14h] [rbp-Ch]
printf("[");
v4 = *(_DWORD *)(a1 + 12);
for ( i = 0; i < v4; ++i )
{
if ( i > 0 )
printf(", ");
v1 = (_QWORD *)(16LL * i + *(_QWORD *)(a1 + 16));
rak_value_print(*v1, v1[1]);
}
return printf("]");
}
| rak_array_print:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0x10e01e]
MOV AL,0x0
CALL 0x00102080
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x10],0x0
LAB_00102e8b:
MOV EAX,dword ptr [RBP + -0x10]
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x00102ee1
CMP dword ptr [RBP + -0x10],0x0
JLE 0x00102ea7
LEA RDI,[0x10e020]
MOV AL,0x0
CALL 0x00102080
LAB_00102ea7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RBP + -0x10]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010b370
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00102e8b
LAB_00102ee1:
LEA RDI,[0x10e023]
MOV AL,0x0
CALL 0x00102080
ADD RSP,0x20
POP RBP
RET
|
void rak_array_print(long param_1)
{
int iVar1;
int8 *puVar2;
int local_18;
printf("[");
iVar1 = *(int *)(param_1 + 0xc);
for (local_18 = 0; local_18 < iVar1; local_18 = local_18 + 1) {
if (0 < local_18) {
printf(", ");
}
puVar2 = (int8 *)(*(long *)(param_1 + 0x10) + (long)local_18 * 0x10);
rak_value_print(*puVar2,puVar2[1]);
}
printf("]");
return;
}
| |
50,801 | rak_array_print | fabiosvm[P]rak/src/array.c | void rak_array_print(RakArray *arr)
{
printf("[");
int len = rak_array_len(arr);
for (int i = 0; i < len; ++i)
{
if (i > 0) printf(", ");
RakValue val = rak_array_get(arr, i);
rak_value_print(val);
}
printf("]");
} | O2 | c | rak_array_print:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x5b
popq %rdi
callq 0x2040
movl 0xc(%rbx), %r15d
xorl %eax, %eax
testl %r15d, %r15d
cmovlel %eax, %r15d
shlq $0x4, %r15
leaq 0x6770(%rip), %r14 # 0x901e
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x28dd
testq %r12, %r12
je 0x28c5
movq %r14, %rdi
xorl %eax, %eax
callq 0x2090
movq 0x10(%rbx), %rax
movq (%rax,%r12), %rdi
movq 0x8(%rax,%r12), %rsi
callq 0x6ca0
addq $0x10, %r12
jmp 0x28b1
pushq $0x5d
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2040
| rak_array_print:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
push 5Bh ; '['
pop rdi
call _putchar
mov r15d, [rbx+0Ch]
xor eax, eax
test r15d, r15d
cmovle r15d, eax
shl r15, 4
lea r14, off_901E
xor r12d, r12d
loc_28B1:
cmp r15, r12
jz short loc_28DD
test r12, r12
jz short loc_28C5
mov rdi, r14
xor eax, eax
call _printf
loc_28C5:
mov rax, [rbx+10h]
mov rdi, [rax+r12]
mov rsi, [rax+r12+8]
call rak_value_print
add r12, 10h
jmp short loc_28B1
loc_28DD:
push 5Dh ; ']'
pop rdi
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _putchar
| long long rak_array_print(long long a1)
{
long long v1; // r15
long long v2; // r15
long long i; // r12
putchar(91LL);
v1 = *(unsigned int *)(a1 + 12);
if ( (int)v1 <= 0 )
v1 = 0LL;
v2 = 16 * v1;
for ( i = 0LL; v2 != i; i += 16LL )
{
if ( i )
printf(&off_901E);
rak_value_print(*(_QWORD *)(*(_QWORD *)(a1 + 16) + i), *(_QWORD *)(*(_QWORD *)(a1 + 16) + i + 8));
}
return putchar(93LL);
}
| rak_array_print:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
PUSH 0x5b
POP RDI
CALL 0x00102040
MOV R15D,dword ptr [RBX + 0xc]
XOR EAX,EAX
TEST R15D,R15D
CMOVLE R15D,EAX
SHL R15,0x4
LEA R14,[0x10901e]
XOR R12D,R12D
LAB_001028b1:
CMP R15,R12
JZ 0x001028dd
TEST R12,R12
JZ 0x001028c5
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102090
LAB_001028c5:
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + R12*0x1]
MOV RSI,qword ptr [RAX + R12*0x1 + 0x8]
CALL 0x00106ca0
ADD R12,0x10
JMP 0x001028b1
LAB_001028dd:
PUSH 0x5d
POP RDI
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00102040
|
void rak_array_print(long param_1)
{
uint uVar1;
long lVar2;
putchar(0x5b);
uVar1 = *(uint *)(param_1 + 0xc);
if ((int)*(uint *)(param_1 + 0xc) < 1) {
uVar1 = 0;
}
for (lVar2 = 0; (ulong)uVar1 * 0x10 != lVar2; lVar2 = lVar2 + 0x10) {
if (lVar2 != 0) {
printf(", ");
}
rak_value_print(*(int8 *)(*(long *)(param_1 + 0x10) + lVar2),
*(int8 *)(*(long *)(param_1 + 0x10) + 8 + lVar2));
}
putchar(0x5d);
return;
}
| |
50,802 | rak_array_print | fabiosvm[P]rak/src/array.c | void rak_array_print(RakArray *arr)
{
printf("[");
int len = rak_array_len(arr);
for (int i = 0; i < len; ++i)
{
if (i > 0) printf(", ");
RakValue val = rak_array_get(arr, i);
rak_value_print(val);
}
printf("]");
} | O3 | c | rak_array_print:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x5b, %edi
callq 0x2040
movslq 0xc(%rbx), %r15
testq %r15, %r15
jle 0x291c
shlq $0x4, %r15
leaq 0x772f(%rip), %r14 # 0xa01e
xorl %r12d, %r12d
testq %r12, %r12
je 0x2901
movq %r14, %rdi
xorl %eax, %eax
callq 0x2090
movq 0x10(%rbx), %rax
movq (%rax,%r12), %rdi
movq 0x8(%rax,%r12), %rsi
callq 0x83bf
addq $0x10, %r12
cmpq %r12, %r15
jne 0x28f2
movl $0x5d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2040
nopl (%rax)
| rak_array_print:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov edi, 5Bh ; '['
call _putchar
movsxd r15, dword ptr [rbx+0Ch]
test r15, r15
jle short loc_291C
shl r15, 4
lea r14, off_A01E
xor r12d, r12d
loc_28F2:
test r12, r12
jz short loc_2901
mov rdi, r14
xor eax, eax
call _printf
loc_2901:
mov rax, [rbx+10h]
mov rdi, [rax+r12]
mov rsi, [rax+r12+8]
call rak_value_print
add r12, 10h
cmp r15, r12
jnz short loc_28F2
loc_291C:
mov edi, 5Dh ; ']'
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _putchar
| long long rak_array_print(long long a1)
{
long long v1; // r15
long long v2; // r15
long long v3; // r12
putchar(91LL);
v1 = *(int *)(a1 + 12);
if ( v1 > 0 )
{
v2 = 16 * v1;
v3 = 0LL;
do
{
if ( v3 )
printf(&off_A01E);
rak_value_print(*(_QWORD *)(*(_QWORD *)(a1 + 16) + v3), *(_QWORD *)(*(_QWORD *)(a1 + 16) + v3 + 8));
v3 += 16LL;
}
while ( v2 != v3 );
}
return putchar(93LL);
}
| rak_array_print:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDI,0x5b
CALL 0x00102040
MOVSXD R15,dword ptr [RBX + 0xc]
TEST R15,R15
JLE 0x0010291c
SHL R15,0x4
LEA R14,[0x10a01e]
XOR R12D,R12D
LAB_001028f2:
TEST R12,R12
JZ 0x00102901
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102090
LAB_00102901:
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + R12*0x1]
MOV RSI,qword ptr [RAX + R12*0x1 + 0x8]
CALL 0x001083bf
ADD R12,0x10
CMP R15,R12
JNZ 0x001028f2
LAB_0010291c:
MOV EDI,0x5d
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00102040
|
void rak_array_print(long param_1)
{
int iVar1;
long lVar2;
putchar(0x5b);
iVar1 = *(int *)(param_1 + 0xc);
if (0 < (long)iVar1) {
lVar2 = 0;
do {
if (lVar2 != 0) {
printf(", ");
}
rak_value_print(*(int8 *)(*(long *)(param_1 + 0x10) + lVar2),
*(int8 *)(*(long *)(param_1 + 0x10) + 8 + lVar2));
lVar2 = lVar2 + 0x10;
} while ((long)iVar1 * 0x10 != lVar2);
}
putchar(0x5d);
return;
}
| |
50,803 | ConfigGamepadAxis::ConfigGamepadAxis(int, bool) | untodesu[P]voxelius/game/client/gamepad_axis.cc | ConfigGamepadAxis::ConfigGamepadAxis(int axis, bool inverted)
{
m_inverted = inverted;
m_gamepad_axis = axis;
m_name = get_axis_name(axis);
m_full_string = fmt::format("{}:{}", m_name, m_inverted ? 1U : 0U);
} | O1 | cpp | ConfigGamepadAxis::ConfigGamepadAxis(int, bool):
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0x205efc(%rip), %rax # 0x253770
movq %rax, (%rdi)
leaq 0x10(%rdi), %rbx
leaq 0x20(%rdi), %r15
movq %r15, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
movb %dl, 0x8(%rdi)
movl %esi, 0xc(%rdi)
movl $0x8, %ecx
leaq 0x205eef(%rip), %r9 # 0x253790
leaq 0x14c9df(%rip), %r8 # 0x19a287
movl -0x8(%rcx,%r9), %r10d
cmpl %esi, %r10d
jne 0x4d8b6
movq (%rcx,%r9), %rax
cmpl %esi, %r10d
je 0x4d8c8
addq $0x10, %rcx
cmpq $0x68, %rcx
jne 0x4d8a8
movq %r8, %rax
movq %rax, 0x30(%rdi)
leaq 0x20(%rsp), %r8
movq %rax, (%r8)
movzbl %dl, %eax
movq %rax, 0x10(%r8)
leaq 0x14c994(%rip), %rsi # 0x19a276
movq %rsp, %rdi
movl $0x5, %edx
movl $0x2c, %ecx
callq 0x147c0b
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26ac0
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4d91c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x268d0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4d93c
movq (%r15), %rsi
incq %rsi
callq 0x268d0
movq %r14, %rdi
callq 0x26fe0
| _ZN17ConfigGamepadAxisC2Eib:
push r15
push r14
push rbx
sub rsp, 40h
lea rax, off_253770
mov [rdi], rax
lea rbx, [rdi+10h]
lea r15, [rdi+20h]
mov [rdi+10h], r15
mov qword ptr [rdi+18h], 0
mov byte ptr [rdi+20h], 0
mov [rdi+8], dl
mov [rdi+0Ch], esi
mov ecx, 8
lea r9, _ZL10axis_names; axis_names
lea r8, aUnknown; "UNKNOWN"
loc_4D8A8:
mov r10d, [rcx+r9-8]
cmp r10d, esi
jnz short loc_4D8B6
mov rax, [rcx+r9]
loc_4D8B6:
cmp r10d, esi
jz short loc_4D8C8
add rcx, 10h
cmp rcx, 68h ; 'h'
jnz short loc_4D8A8
mov rax, r8
loc_4D8C8:
mov [rdi+30h], rax
lea r8, [rsp+58h+var_38]
mov [r8], rax
movzx eax, dl
mov [r8+10h], rax
lea rsi, asc_19A276; "{}:{}"
mov rdi, rsp
mov edx, 5
mov ecx, 2Ch ; ','
call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>)
mov r14, rsp
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea rax, [rsp+58h+var_48]
cmp rdi, rax
jz short loc_4D91C
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4D91C:
add rsp, 40h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_4D93C
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4D93C:
mov rdi, r14
call __Unwind_Resume
| void ConfigGamepadAxis::ConfigGamepadAxis(ConfigGamepadAxis *this, int a2, unsigned __int8 a3, double a4)
{
long long i; // rcx
const char *v5; // rax
void *v6[2]; // [rsp+0h] [rbp-58h] BYREF
long long v7; // [rsp+10h] [rbp-48h] BYREF
_QWORD v8[7]; // [rsp+20h] [rbp-38h] BYREF
*(_QWORD *)this = off_253770;
*((_QWORD *)this + 2) = (char *)this + 32;
*((_QWORD *)this + 3) = 0LL;
*((_BYTE *)this + 32) = 0;
*((_BYTE *)this + 8) = a3;
*((_DWORD *)this + 3) = a2;
for ( i = 8LL; i != 104; i += 16LL )
{
if ( *(_DWORD *)((char *)&axis_names + i - 8) == a2 )
{
v5 = *(const char **)((char *)&axis_names + i);
goto LABEL_6;
}
}
v5 = "UNKNOWN";
LABEL_6:
*((_QWORD *)this + 6) = v5;
v8[0] = v5;
v8[2] = a3;
fmt::v11::vformat[abi:cxx11](
(unsigned int)v6,
(unsigned int)"{}:{}",
5,
44,
(unsigned int)v8,
(unsigned int)&axis_names);
std::string::operator=((char *)this + 16, v6, a4);
if ( v6[0] != &v7 )
operator delete(v6[0], v7 + 1);
}
| ConfigGamepadAxis:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
LEA RAX,[0x353770]
MOV qword ptr [RDI],RAX
LEA RBX,[RDI + 0x10]
LEA R15,[RDI + 0x20]
MOV qword ptr [RDI + 0x10],R15
MOV qword ptr [RDI + 0x18],0x0
MOV byte ptr [RDI + 0x20],0x0
MOV byte ptr [RDI + 0x8],DL
MOV dword ptr [RDI + 0xc],ESI
MOV ECX,0x8
LEA R9,[0x353790]
LEA R8,[0x29a287]
LAB_0014d8a8:
MOV R10D,dword ptr [RCX + R9*0x1 + -0x8]
CMP R10D,ESI
JNZ 0x0014d8b6
MOV RAX,qword ptr [RCX + R9*0x1]
LAB_0014d8b6:
CMP R10D,ESI
JZ 0x0014d8c8
ADD RCX,0x10
CMP RCX,0x68
JNZ 0x0014d8a8
MOV RAX,R8
LAB_0014d8c8:
MOV qword ptr [RDI + 0x30],RAX
LEA R8,[RSP + 0x20]
MOV qword ptr [R8],RAX
MOVZX EAX,DL
MOV qword ptr [R8 + 0x10],RAX
LAB_0014d8db:
LEA RSI,[0x29a276]
MOV RDI,RSP
MOV EDX,0x5
MOV ECX,0x2c
CALL 0x00247c0b
LAB_0014d8f4:
MOV R14,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x00126ac0
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0014d91c
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001268d0
LAB_0014d91c:
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* ConfigGamepadAxis::ConfigGamepadAxis(int, bool) */
void __thiscall
ConfigGamepadAxis::ConfigGamepadAxis(ConfigGamepadAxis *this,int param_1,bool param_2)
{
long lVar1;
long *local_58 [2];
long local_48 [2];
char *local_38;
ulong local_28;
*(int ***)this = &PTR__ConfigGamepadAxis_00353770;
*(ConfigGamepadAxis **)(this + 0x10) = this + 0x20;
*(int8 *)(this + 0x18) = 0;
this[0x20] = (ConfigGamepadAxis)0x0;
this[8] = (ConfigGamepadAxis)param_2;
*(int *)(this + 0xc) = param_1;
lVar1 = 8;
do {
if (*(int *)((long)&PTR_get_00353788 + lVar1) == param_1) {
local_38 = *(char **)((long)&axis_names + lVar1);
goto LAB_0014d8c8;
}
lVar1 = lVar1 + 0x10;
} while (lVar1 != 0x68);
local_38 = "UNKNOWN";
LAB_0014d8c8:
*(char **)(this + 0x30) = local_38;
local_28 = (ulong)param_2;
/* try { // try from 0014d8db to 0014d8f3 has its CatchHandler @ 0014d926 */
fmt::v11::vformat_abi_cxx11_(local_58,"{}:{}",5,0x2c);
std::__cxx11::string::operator=((string *)(this + 0x10),(string *)local_58);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
return;
}
| |
50,804 | my_b_read | eloqsql/mysys/mf_iocache.c | int _my_b_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t left_length;
int res;
/* If the buffer is not empty yet, copy what is available. */
if ((left_length= (size_t) (info->read_end - info->read_pos)))
{
DBUG_ASSERT(Count > left_length);
memcpy(Buffer, info->read_pos, left_length);
Buffer+=left_length;
Count-=left_length;
}
res= info->read_function(info, Buffer, Count);
if (res && info->error >= 0)
info->error+= (int)left_length; /* update number or read bytes */
return res;
} | O3 | c | my_b_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %r14
subq %rsi, %r14
je 0x7bc6c
movq %r12, %rdi
movq %r14, %rdx
callq 0x3a0c0
addq %r14, %r12
subq %r14, %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xa0(%rbx)
testl %eax, %eax
je 0x7bc92
movl 0xe4(%rbx), %ecx
testl %ecx, %ecx
js 0x7bc92
addl %r14d, %ecx
movl %ecx, 0xe4(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _my_b_read:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rdi+10h]
mov r14, [rdi+18h]
sub r14, rsi
jz short loc_7BC6C
mov rdi, r12
mov rdx, r14
call _memcpy
add r12, r14
sub r15, r14
loc_7BC6C:
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call qword ptr [rbx+0A0h]
test eax, eax
jz short loc_7BC92
mov ecx, [rbx+0E4h]
test ecx, ecx
js short loc_7BC92
add ecx, r14d
mov [rbx+0E4h], ecx
loc_7BC92:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_b_read(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v8; // rsi
long long v9; // r14
long long result; // rax
int v11; // ecx
v8 = *(_QWORD *)(a1 + 16);
v9 = *(_QWORD *)(a1 + 24) - v8;
if ( v9 )
{
memcpy(a2, v8, v9, a4, a5, a6);
a2 += v9;
a3 -= v9;
}
result = (*(long long ( **)(long long, long long, long long))(a1 + 160))(a1, a2, a3);
if ( (_DWORD)result )
{
v11 = *(_DWORD *)(a1 + 228);
if ( v11 >= 0 )
*(_DWORD *)(a1 + 228) = v9 + v11;
}
return result;
}
| _my_b_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV R14,qword ptr [RDI + 0x18]
SUB R14,RSI
JZ 0x0017bc6c
MOV RDI,R12
MOV RDX,R14
CALL 0x0013a0c0
ADD R12,R14
SUB R15,R14
LAB_0017bc6c:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [RBX + 0xa0]
TEST EAX,EAX
JZ 0x0017bc92
MOV ECX,dword ptr [RBX + 0xe4]
TEST ECX,ECX
JS 0x0017bc92
ADD ECX,R14D
MOV dword ptr [RBX + 0xe4],ECX
LAB_0017bc92:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void _my_b_read(long param_1,void *param_2,long param_3)
{
int iVar1;
size_t __n;
__n = *(long *)(param_1 + 0x18) - (long)*(void **)(param_1 + 0x10);
if (__n != 0) {
memcpy(param_2,*(void **)(param_1 + 0x10),__n);
param_2 = (void *)((long)param_2 + __n);
param_3 = param_3 - __n;
}
iVar1 = (**(code **)(param_1 + 0xa0))(param_1,param_2,param_3);
if ((iVar1 != 0) && (-1 < *(int *)(param_1 + 0xe4))) {
*(int *)(param_1 + 0xe4) = *(int *)(param_1 + 0xe4) + (int)__n;
}
return;
}
| |
50,805 | LefDefParser::defiFill::Destroy() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiFill.cpp | void defiFill::Destroy() {
if (layerName_) free(layerName_);
if (viaName_) free(viaName_);
free((char*)(xl_));
free((char*)(yl_));
free((char*)(xh_));
free((char*)(yh_));
rectsAllocated_ = 0;
xl_ = 0;
yl_ = 0;
xh_ = 0;
yh_ = 0;
clearPoly();
if (polygons_) free((char*)(polygons_));
polygons_ = 0;
clearPts();
if (viaPts_) free((char*)(viaPts_));
viaPts_ = 0;
clear();
} | O0 | cpp | LefDefParser::defiFill::Destroy():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rax)
je 0x45e48
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
cmpq $0x0, 0x58(%rax)
je 0x45e62
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rdi
movl $0x0, 0x1c(%rdi)
movq $0x0, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
callq 0x45f30
movq 0x8(%rsp), %rax
cmpq $0x0, 0x48(%rax)
je 0x45ee5
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rdi
movq $0x0, 0x48(%rdi)
callq 0x45fd0
movq 0x8(%rsp), %rax
cmpq $0x0, 0x78(%rax)
je 0x45f11
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rdi
movq $0x0, 0x78(%rdi)
callq 0x45dc0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZN12LefDefParser8defiFill7DestroyEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
cmp qword ptr [rax+8], 0
jz short loc_45E48
mov rax, [rsp+18h+var_10]
mov rdi, [rax+8]
call _free
loc_45E48:
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+58h], 0
jz short loc_45E62
mov rax, [rsp+18h+var_10]
mov rdi, [rax+58h]
call _free
loc_45E62:
mov rax, [rsp+18h+var_10]
mov rdi, [rax+20h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+28h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+30h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+38h]
call _free
mov rdi, [rsp+18h+var_10]; this
mov dword ptr [rdi+1Ch], 0
mov qword ptr [rdi+20h], 0
mov qword ptr [rdi+28h], 0
mov qword ptr [rdi+30h], 0
mov qword ptr [rdi+38h], 0
call _ZN12LefDefParser8defiFill9clearPolyEv; LefDefParser::defiFill::clearPoly(void)
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+48h], 0
jz short loc_45EE5
mov rax, [rsp+18h+var_10]
mov rdi, [rax+48h]
call _free
loc_45EE5:
mov rdi, [rsp+18h+var_10]; this
mov qword ptr [rdi+48h], 0
call _ZN12LefDefParser8defiFill8clearPtsEv; LefDefParser::defiFill::clearPts(void)
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+78h], 0
jz short loc_45F11
mov rax, [rsp+18h+var_10]
mov rdi, [rax+78h]
call _free
loc_45F11:
mov rdi, [rsp+18h+var_10]; this
mov qword ptr [rdi+78h], 0
call _ZN12LefDefParser8defiFill5clearEv; LefDefParser::defiFill::clear(void)
add rsp, 18h
retn
| LefDefParser::defiFill * LefDefParser::defiFill::Destroy(LefDefParser::defiFill *this)
{
if ( *((_QWORD *)this + 1) )
free(*((_QWORD *)this + 1));
if ( *((_QWORD *)this + 11) )
free(*((_QWORD *)this + 11));
free(*((_QWORD *)this + 4));
free(*((_QWORD *)this + 5));
free(*((_QWORD *)this + 6));
free(*((_QWORD *)this + 7));
*((_DWORD *)this + 7) = 0;
*((_QWORD *)this + 4) = 0LL;
*((_QWORD *)this + 5) = 0LL;
*((_QWORD *)this + 6) = 0LL;
*((_QWORD *)this + 7) = 0LL;
LefDefParser::defiFill::clearPoly(this);
if ( *((_QWORD *)this + 9) )
free(*((_QWORD *)this + 9));
*((_QWORD *)this + 9) = 0LL;
LefDefParser::defiFill::clearPts(this);
if ( *((_QWORD *)this + 15) )
free(*((_QWORD *)this + 15));
*((_QWORD *)this + 15) = 0LL;
return LefDefParser::defiFill::clear(this);
}
| Destroy:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00145e48
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001072a0
LAB_00145e48:
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x00145e62
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x58]
CALL 0x001072a0
LAB_00145e62:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001072a0
MOV RDI,qword ptr [RSP + 0x8]
MOV dword ptr [RDI + 0x1c],0x0
MOV qword ptr [RDI + 0x20],0x0
MOV qword ptr [RDI + 0x28],0x0
MOV qword ptr [RDI + 0x30],0x0
MOV qword ptr [RDI + 0x38],0x0
CALL 0x00145f30
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x00145ee5
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x001072a0
LAB_00145ee5:
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RDI + 0x48],0x0
CALL 0x00145fd0
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x00145f11
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x78]
CALL 0x001072a0
LAB_00145f11:
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RDI + 0x78],0x0
CALL 0x00145dc0
ADD RSP,0x18
RET
|
/* LefDefParser::defiFill::Destroy() */
void __thiscall LefDefParser::defiFill::Destroy(defiFill *this)
{
if (*(long *)(this + 8) != 0) {
free(*(void **)(this + 8));
}
if (*(long *)(this + 0x58) != 0) {
free(*(void **)(this + 0x58));
}
free(*(void **)(this + 0x20));
free(*(void **)(this + 0x28));
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x38));
*(int4 *)(this + 0x1c) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
clearPoly(this);
if (*(long *)(this + 0x48) != 0) {
free(*(void **)(this + 0x48));
}
*(int8 *)(this + 0x48) = 0;
clearPts(this);
if (*(long *)(this + 0x78) != 0) {
free(*(void **)(this + 0x78));
}
*(int8 *)(this + 0x78) = 0;
clear(this);
return;
}
| |
50,806 | LefDefParser::defiFill::Destroy() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiFill.cpp | void defiFill::Destroy() {
if (layerName_) free(layerName_);
if (viaName_) free(viaName_);
free((char*)(xl_));
free((char*)(yl_));
free((char*)(xh_));
free((char*)(yh_));
rectsAllocated_ = 0;
xl_ = 0;
yl_ = 0;
xh_ = 0;
yh_ = 0;
clearPoly();
if (polygons_) free((char*)(polygons_));
polygons_ = 0;
clearPts();
if (viaPts_) free((char*)(viaPts_));
viaPts_ = 0;
clear();
} | O3 | cpp | LefDefParser::defiFill::Destroy():
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x2a83a
callq 0x7220
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x2a848
callq 0x7220
movq 0x20(%rbx), %rdi
callq 0x7220
movq 0x28(%rbx), %rdi
callq 0x7220
movq 0x30(%rbx), %rdi
callq 0x7220
movq 0x38(%rbx), %rdi
callq 0x7220
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rbx)
movups %xmm0, 0x1c(%rbx)
movl $0x0, 0x3c(%rbx)
movq %rbx, %rdi
callq 0x2a8ca
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x2a894
callq 0x7220
movq $0x0, 0x48(%rbx)
movq %rbx, %rdi
callq 0x2a91c
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x2a8b2
callq 0x7220
xorl %eax, %eax
movq %rax, 0x78(%rbx)
movl %eax, (%rbx)
movq %rax, 0x14(%rbx)
movl %eax, 0x50(%rbx)
movl %eax, 0x64(%rbx)
movl %eax, 0x70(%rbx)
popq %rbx
retq
nop
| _ZN12LefDefParser8defiFill7DestroyEv:
push rbx
mov rbx, rdi
mov rdi, [rdi+8]
test rdi, rdi
jz short loc_2A83A
call _free
loc_2A83A:
mov rdi, [rbx+58h]
test rdi, rdi
jz short loc_2A848
call _free
loc_2A848:
mov rdi, [rbx+20h]
call _free
mov rdi, [rbx+28h]
call _free
mov rdi, [rbx+30h]
call _free
mov rdi, [rbx+38h]
call _free
xorps xmm0, xmm0
movups xmmword ptr [rbx+2Ch], xmm0
movups xmmword ptr [rbx+1Ch], xmm0
mov dword ptr [rbx+3Ch], 0
mov rdi, rbx; this
call _ZN12LefDefParser8defiFill9clearPolyEv; LefDefParser::defiFill::clearPoly(void)
mov rdi, [rbx+48h]
test rdi, rdi
jz short loc_2A894
call _free
loc_2A894:
mov qword ptr [rbx+48h], 0
mov rdi, rbx; this
call _ZN12LefDefParser8defiFill8clearPtsEv; LefDefParser::defiFill::clearPts(void)
mov rdi, [rbx+78h]
test rdi, rdi
jz short loc_2A8B2
call _free
loc_2A8B2:
xor eax, eax
mov [rbx+78h], rax
mov [rbx], eax
mov [rbx+14h], rax
mov [rbx+50h], eax
mov [rbx+64h], eax
mov [rbx+70h], eax
pop rbx
retn
| long long LefDefParser::defiFill::Destroy(LefDefParser::defiFill *this)
{
void *v2; // rdi
void *v3; // rdi
void *v4; // rdi
void *v5; // rdi
long long result; // rax
v2 = (void *)*((_QWORD *)this + 1);
if ( v2 )
free(v2);
v3 = (void *)*((_QWORD *)this + 11);
if ( v3 )
free(v3);
free(*((void **)this + 4));
free(*((void **)this + 5));
free(*((void **)this + 6));
free(*((void **)this + 7));
*(_OWORD *)((char *)this + 44) = 0LL;
*(_OWORD *)((char *)this + 28) = 0LL;
*((_DWORD *)this + 15) = 0;
LefDefParser::defiFill::clearPoly(this);
v4 = (void *)*((_QWORD *)this + 9);
if ( v4 )
free(v4);
*((_QWORD *)this + 9) = 0LL;
LefDefParser::defiFill::clearPts(this);
v5 = (void *)*((_QWORD *)this + 15);
if ( v5 )
free(v5);
result = 0LL;
*((_QWORD *)this + 15) = 0LL;
*(_DWORD *)this = 0;
*(_QWORD *)((char *)this + 20) = 0LL;
*((_DWORD *)this + 20) = 0;
*((_DWORD *)this + 25) = 0;
*((_DWORD *)this + 28) = 0;
return result;
}
| Destroy:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
TEST RDI,RDI
JZ 0x0012a83a
CALL 0x00107220
LAB_0012a83a:
MOV RDI,qword ptr [RBX + 0x58]
TEST RDI,RDI
JZ 0x0012a848
CALL 0x00107220
LAB_0012a848:
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x30]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x38]
CALL 0x00107220
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
MOVUPS xmmword ptr [RBX + 0x1c],XMM0
MOV dword ptr [RBX + 0x3c],0x0
MOV RDI,RBX
CALL 0x0012a8ca
MOV RDI,qword ptr [RBX + 0x48]
TEST RDI,RDI
JZ 0x0012a894
CALL 0x00107220
LAB_0012a894:
MOV qword ptr [RBX + 0x48],0x0
MOV RDI,RBX
CALL 0x0012a91c
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JZ 0x0012a8b2
CALL 0x00107220
LAB_0012a8b2:
XOR EAX,EAX
MOV qword ptr [RBX + 0x78],RAX
MOV dword ptr [RBX],EAX
MOV qword ptr [RBX + 0x14],RAX
MOV dword ptr [RBX + 0x50],EAX
MOV dword ptr [RBX + 0x64],EAX
MOV dword ptr [RBX + 0x70],EAX
POP RBX
RET
|
/* LefDefParser::defiFill::Destroy() */
void __thiscall LefDefParser::defiFill::Destroy(defiFill *this)
{
if (*(void **)(this + 8) != (void *)0x0) {
free(*(void **)(this + 8));
}
if (*(void **)(this + 0x58) != (void *)0x0) {
free(*(void **)(this + 0x58));
}
free(*(void **)(this + 0x20));
free(*(void **)(this + 0x28));
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x38));
*(int8 *)(this + 0x2c) = 0;
*(int8 *)(this + 0x34) = 0;
*(int8 *)(this + 0x1c) = 0;
*(int8 *)(this + 0x24) = 0;
*(int4 *)(this + 0x3c) = 0;
clearPoly(this);
if (*(void **)(this + 0x48) != (void *)0x0) {
free(*(void **)(this + 0x48));
}
*(int8 *)(this + 0x48) = 0;
clearPts(this);
if (*(void **)(this + 0x78) != (void *)0x0) {
free(*(void **)(this + 0x78));
}
*(int8 *)(this + 0x78) = 0;
*(int4 *)this = 0;
*(int8 *)(this + 0x14) = 0;
*(int4 *)(this + 0x50) = 0;
*(int4 *)(this + 100) = 0;
*(int4 *)(this + 0x70) = 0;
return;
}
| |
50,807 | blst_scalar_from_le_bytes | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c | int blst_scalar_from_le_bytes(pow256 out, const unsigned char *bytes, size_t n)
{
size_t rem = (n - 1) % 32 + 1;
struct { vec256 out, digit; } t;
limb_t ret;
vec_zero(t.out, sizeof(t.out));
n -= rem;
limbs_from_le_bytes(t.out, bytes += n, rem);
mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0);
while (n) {
limbs_from_le_bytes(t.digit, bytes -= 32, 32);
add_mod_256(t.out, t.out, t.digit, BLS12_381_r);
mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0);
n -= 32;
}
from_mont_256(t.out, t.out, BLS12_381_r, r0);
ret = vec_is_zero(t.out, sizeof(t.out));
le_bytes_from_limbs(out, t.out, 32);
vec_zero(&t, sizeof(t));
return (int)(ret^1);
} | O3 | c | blst_scalar_from_le_bytes:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal -0x1(%rdx), %r14d
andl $0x1f, %r14d
xorl %eax, %eax
movq $0x0, -0x68(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x63bb5
leaq -0x68(%rbp), %rax
movq %r14, %r13
notq %r13
addq %r12, %r13
leaq (%r12,%r15), %rax
decq %rax
xorl %ecx, %ecx
movq %r14, %rdx
shlq $0x8, %rcx
movzbl (%rax), %esi
orq %rsi, %rcx
movq %rdx, %rsi
andq $-0x8, %rsi
movq %rcx, -0x68(%rbp,%rsi)
decq %rax
addq $-0x1, %rdx
jb 0x63be0
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
leaq 0x26fb0(%rip), %rsi # 0x8abc0
leaq 0x26a99(%rip), %rcx # 0x8a6b0
leaq -0x68(%rbp), %rdi
movq %rdi, %rdx
callq 0x74000
testq %r13, %r13
je 0x63c9e
subq %r14, %r12
addq %r12, %r15
addq $-0x2, %r15
leaq 0x26a77(%rip), %r12 # 0x8a6b0
leaq -0x68(%rbp), %r14
movl $0x1f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl -0x1f(%r15,%rax), %edx
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0x48(%rbp,%rdx)
addq $-0x1, %rax
jb 0x63c44
movq %r14, %rdi
movq %r14, %rsi
leaq -0x48(%rbp), %rdx
movq %r12, %rcx
callq 0x74700
movq %r14, %rdi
leaq 0x26f41(%rip), %rsi # 0x8abc0
movq %r14, %rdx
movq %r12, %rcx
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
callq 0x74000
addq $-0x20, %r15
addq $-0x20, %r13
jne 0x63c3d
leaq 0x26a0b(%rip), %rdx # 0x8a6b0
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %r14, %rsi
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
callq 0x74420
movl $0x20, %esi
movq %r14, %rdi
callq 0x6e900
cmpq %rbx, %r14
je 0x63cf6
xorl %ecx, %ecx
movq -0x68(%rbp,%rcx,8), %rsi
xorl %edx, %edx
movb %sil, (%rbx,%rdx)
incq %rdx
shrq $0x8, %rsi
cmpq $0x8, %rdx
jne 0x63cd9
incq %rcx
addq %rdx, %rbx
cmpq $0x4, %rcx
jne 0x63cd2
xorl %ecx, %ecx
movq $0x0, -0x68(%rbp,%rcx,8)
incq %rcx
cmpq $0x8, %rcx
jne 0x63cf8
leaq -0x68(%rbp), %rcx
xorl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_scalar_from_le_bytes:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea r14d, [rdx-1]
and r14d, 1Fh
xor eax, eax
loc_63BB5:
mov [rbp+rax*8+var_68], 0
inc rax
cmp rax, 4
jnz short loc_63BB5
lea rax, [rbp+var_68]
mov r13, r14
not r13
add r13, r12
lea rax, [r12+r15]
dec rax
xor ecx, ecx
mov rdx, r14
loc_63BE0:
shl rcx, 8
movzx esi, byte ptr [rax]
or rcx, rsi
mov rsi, rdx
and rsi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rsi+var_68], rcx
dec rax
add rdx, 0FFFFFFFFFFFFFFFFh
jb short loc_63BE0
mov r8, 0FFFFFFFEFFFFFFFFh
lea rsi, BLS12_381_rRR
lea rcx, BLS12_381_r
lea rdi, [rbp+var_68]
mov rdx, rdi
call mul_mont_sparse_256
test r13, r13
jz short loc_63C9E
sub r12, r14
add r15, r12
add r15, 0FFFFFFFFFFFFFFFEh
lea r12, BLS12_381_r
lea r14, [rbp+var_68]
loc_63C3D:
mov eax, 1Fh
xor ecx, ecx
loc_63C44:
shl rcx, 8
movzx edx, byte ptr [r15+rax-1Fh]
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx+var_48], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_63C44
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_48]
mov rcx, r12
call add_mod_256
mov rdi, r14
lea rsi, BLS12_381_rRR
mov rdx, r14
mov rcx, r12
mov r8, 0FFFFFFFEFFFFFFFFh
call mul_mont_sparse_256
add r15, 0FFFFFFFFFFFFFFE0h
add r13, 0FFFFFFFFFFFFFFE0h
jnz short loc_63C3D
loc_63C9E:
lea rdx, BLS12_381_r
lea r14, [rbp+var_68]
mov rdi, r14
mov rsi, r14
mov rcx, 0FFFFFFFEFFFFFFFFh
call from_mont_256
mov esi, 20h ; ' '
mov rdi, r14
call vec_is_zero_16x
cmp r14, rbx
jz short loc_63CF6
xor ecx, ecx
loc_63CD2:
mov rsi, [rbp+rcx*8+var_68]
xor edx, edx
loc_63CD9:
mov [rbx+rdx], sil
inc rdx
shr rsi, 8
cmp rdx, 8
jnz short loc_63CD9
inc rcx
add rbx, rdx
cmp rcx, 4
jnz short loc_63CD2
loc_63CF6:
xor ecx, ecx
loc_63CF8:
mov [rbp+rcx*8+var_68], 0
inc rcx
cmp rcx, 8
jnz short loc_63CF8
lea rcx, [rbp+var_68]
xor eax, 1
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_scalar_from_le_bytes(_QWORD *a1, long long a2, long long a3)
{
_QWORD *v4; // rbx
long long v5; // r14
long long i; // rax
long long v7; // r13
unsigned __int8 *v8; // rax
unsigned long long v9; // rcx
long long v10; // rdx
bool v11; // cf
long long v12; // r15
long long v13; // rax
unsigned long long v14; // rcx
int is_zero_16x; // eax
long long j; // rcx
unsigned long long v17; // rsi
long long k; // rdx
long long m; // rcx
_QWORD v21[4]; // [rsp+8h] [rbp-68h] BYREF
_QWORD v22[9]; // [rsp+28h] [rbp-48h] BYREF
v4 = a1;
v5 = ((_BYTE)a3 - 1) & 0x1F;
for ( i = 0LL; i != 4; ++i )
v21[i] = 0LL;
v7 = a3 + ~v5;
v8 = (unsigned __int8 *)(a3 + a2 - 1);
v9 = 0LL;
v10 = ((_BYTE)a3 - 1) & 0x1F;
do
{
v9 = *v8 | (v9 << 8);
*(_QWORD *)((char *)v21 + (v10 & 0xFFFFFFFFFFFFFFF8LL)) = v9;
--v8;
v11 = v10-- != 0;
}
while ( v11 );
mul_mont_sparse_256(v21, &BLS12_381_rRR, v21, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
if ( v7 )
{
v12 = a3 - v5 + a2 - 2;
do
{
v13 = 31LL;
v14 = 0LL;
do
{
v14 = *(unsigned __int8 *)(v12 + v13 - 31) | (v14 << 8);
*(_QWORD *)((char *)v22 + (v13 & 0xFFFFFFFFFFFFFFF8LL)) = v14;
v11 = v13-- != 0;
}
while ( v11 );
add_mod_256(v21, v21, v22, &BLS12_381_r);
mul_mont_sparse_256(v21, &BLS12_381_rRR, v21, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
v12 -= 32LL;
v7 -= 32LL;
}
while ( v7 );
}
from_mont_256(v21, v21, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
is_zero_16x = vec_is_zero_16x(v21, 32LL);
if ( v21 != a1 )
{
for ( j = 0LL; j != 4; ++j )
{
v17 = v21[j];
for ( k = 0LL; k != 8; ++k )
{
*((_BYTE *)v4 + k) = v17;
v17 >>= 8;
}
++v4;
}
}
for ( m = 0LL; m != 8; ++m )
v21[m] = 0LL;
return is_zero_16x ^ 1u;
}
| blst_scalar_from_le_bytes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R14D,[RDX + -0x1]
AND R14D,0x1f
XOR EAX,EAX
LAB_00163bb5:
MOV qword ptr [RBP + RAX*0x8 + -0x68],0x0
INC RAX
CMP RAX,0x4
JNZ 0x00163bb5
LEA RAX,[RBP + -0x68]
MOV R13,R14
NOT R13
ADD R13,R12
LEA RAX,[R12 + R15*0x1]
DEC RAX
XOR ECX,ECX
MOV RDX,R14
LAB_00163be0:
SHL RCX,0x8
MOVZX ESI,byte ptr [RAX]
OR RCX,RSI
MOV RSI,RDX
AND RSI,-0x8
MOV qword ptr [RBP + RSI*0x1 + -0x68],RCX
DEC RAX
ADD RDX,-0x1
JC 0x00163be0
MOV R8,-0x100000001
LEA RSI,[0x18abc0]
LEA RCX,[0x18a6b0]
LEA RDI,[RBP + -0x68]
MOV RDX,RDI
CALL 0x00174000
TEST R13,R13
JZ 0x00163c9e
SUB R12,R14
ADD R15,R12
ADD R15,-0x2
LEA R12,[0x18a6b0]
LEA R14,[RBP + -0x68]
LAB_00163c3d:
MOV EAX,0x1f
XOR ECX,ECX
LAB_00163c44:
SHL RCX,0x8
MOVZX EDX,byte ptr [R15 + RAX*0x1 + -0x1f]
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0x48],RCX
ADD RAX,-0x1
JC 0x00163c44
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x48]
MOV RCX,R12
CALL 0x00174700
MOV RDI,R14
LEA RSI,[0x18abc0]
MOV RDX,R14
MOV RCX,R12
MOV R8,-0x100000001
CALL 0x00174000
ADD R15,-0x20
ADD R13,-0x20
JNZ 0x00163c3d
LAB_00163c9e:
LEA RDX,[0x18a6b0]
LEA R14,[RBP + -0x68]
MOV RDI,R14
MOV RSI,R14
MOV RCX,-0x100000001
CALL 0x00174420
MOV ESI,0x20
MOV RDI,R14
CALL 0x0016e900
CMP R14,RBX
JZ 0x00163cf6
XOR ECX,ECX
LAB_00163cd2:
MOV RSI,qword ptr [RBP + RCX*0x8 + -0x68]
XOR EDX,EDX
LAB_00163cd9:
MOV byte ptr [RBX + RDX*0x1],SIL
INC RDX
SHR RSI,0x8
CMP RDX,0x8
JNZ 0x00163cd9
INC RCX
ADD RBX,RDX
CMP RCX,0x4
JNZ 0x00163cd2
LAB_00163cf6:
XOR ECX,ECX
LAB_00163cf8:
MOV qword ptr [RBP + RCX*0x8 + -0x68],0x0
INC RCX
CMP RCX,0x8
JNZ 0x00163cf8
LEA RCX,[RBP + -0x68]
XOR EAX,0x1
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint blst_scalar_from_le_bytes(ulong *param_1,long param_2,long param_3)
{
uint uVar1;
long lVar2;
byte *pbVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
bool bVar8;
ulong local_70 [8];
uVar4 = (ulong)((int)param_3 - 1U & 0x1f);
lVar2 = 0;
do {
local_70[lVar2] = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 4);
lVar2 = ~uVar4 + param_3;
pbVar3 = (byte *)(param_3 + param_2);
uVar5 = 0;
uVar6 = uVar4;
do {
pbVar3 = pbVar3 + -1;
uVar5 = uVar5 << 8 | (ulong)*pbVar3;
*(ulong *)((long)local_70 + (uVar6 & 0xfffffffffffffff8)) = uVar5;
bVar8 = uVar6 != 0;
uVar6 = uVar6 - 1;
} while (bVar8);
mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff);
if (lVar2 != 0) {
lVar7 = param_2 + (param_3 - uVar4) + -2;
do {
uVar4 = 0x1f;
uVar6 = 0;
do {
uVar6 = uVar6 << 8 | (ulong)*(byte *)(lVar7 + -0x1f + uVar4);
*(ulong *)((long)local_70 + (uVar4 & 0xfffffffffffffff8) + 0x20) = uVar6;
bVar8 = uVar4 != 0;
uVar4 = uVar4 - 1;
} while (bVar8);
add_mod_256(local_70,local_70,local_70 + 4,BLS12_381_r);
mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff);
lVar7 = lVar7 + -0x20;
lVar2 = lVar2 + -0x20;
} while (lVar2 != 0);
}
from_mont_256(local_70,local_70,BLS12_381_r);
uVar1 = vec_is_zero_16x(local_70,0x20);
if (local_70 != param_1) {
lVar2 = 0;
do {
uVar4 = local_70[lVar2];
lVar7 = 0;
do {
*(char *)((long)param_1 + lVar7) = (char)uVar4;
lVar7 = lVar7 + 1;
uVar4 = uVar4 >> 8;
} while (lVar7 != 8);
lVar2 = lVar2 + 1;
param_1 = param_1 + 1;
} while (lVar2 != 4);
}
lVar2 = 0;
do {
local_70[lVar2] = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 8);
return uVar1 ^ 1;
}
| |
50,808 | my_charlen_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0xf0)
return my_valid_mbcharlen_utf8mb3(s, e);
if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_charlen_utf8mb4:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0xcbee6
movb (%rsi), %cl
cmpb $-0x11, %cl
ja 0xcbe52
movl $0x1, %eax
testb %cl, %cl
jns 0xcbee6
cmpb $-0x3e, %cl
jb 0xcbee4
cmpb $-0x21, %cl
ja 0xcbeab
leaq 0x2(%rsi), %rcx
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %rcx
ja 0xcbee6
xorl %eax, %eax
cmpb $-0x40, 0x1(%rsi)
setl %al
addl %eax, %eax
jmp 0xcbee6
cmpb $-0xc, %cl
ja 0xcbee4
leaq 0x4(%rsi), %rdi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %rdi
ja 0xcbee6
movb 0x1(%rsi), %dl
cmpb $-0x41, %dl
jg 0xcbee4
cmpb $-0x41, 0x2(%rsi)
jg 0xcbee4
cmpb $-0x41, 0x3(%rsi)
jg 0xcbee4
cmpb $-0x10, %cl
sete %sil
cmpb $-0x70, %dl
setb %dil
movl $0x0, %eax
testb %dil, %sil
jne 0xcbee6
cmpb $-0xc, %cl
setne %al
cmpb $-0x70, %dl
setb %cl
orb %al, %cl
movzbl %cl, %eax
shll $0x2, %eax
jmp 0xcbee6
leaq 0x3(%rsi), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %rdi
ja 0xcbee6
movb 0x1(%rsi), %dl
cmpb $-0x41, %dl
jg 0xcbee4
cmpb $-0x41, 0x2(%rsi)
movl $0x0, %eax
jg 0xcbee6
xorl %eax, %eax
cmpb $-0x60, %dl
setae %al
cmpb $-0x20, %cl
leal (%rax,%rax,2), %ecx
movl $0x3, %eax
cmovel %ecx, %eax
jmp 0xcbee6
xorl %eax, %eax
popq %rbp
retq
| my_charlen_utf8mb4:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb loc_CBEE6
mov cl, [rsi]
cmp cl, 0EFh
ja short loc_CBE52
mov eax, 1
test cl, cl
jns loc_CBEE6
cmp cl, 0C2h
jb loc_CBEE4
cmp cl, 0DFh
ja short loc_CBEAB
lea rcx, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp rcx, rdx
ja loc_CBEE6
xor eax, eax
cmp byte ptr [rsi+1], 0C0h
setl al
add eax, eax
jmp loc_CBEE6
loc_CBE52:
cmp cl, 0F4h
ja loc_CBEE4
lea rdi, [rsi+4]
mov eax, 0FFFFFF98h
cmp rdi, rdx
ja short loc_CBEE6
mov dl, [rsi+1]
cmp dl, 0BFh
jg short loc_CBEE4
cmp byte ptr [rsi+2], 0BFh
jg short loc_CBEE4
cmp byte ptr [rsi+3], 0BFh
jg short loc_CBEE4
cmp cl, 0F0h
setz sil
cmp dl, 90h
setb dil
mov eax, 0
test sil, dil
jnz short loc_CBEE6
cmp cl, 0F4h
setnz al
cmp dl, 90h
setb cl
or cl, al
movzx eax, cl
shl eax, 2
jmp short loc_CBEE6
loc_CBEAB:
lea rdi, [rsi+3]
mov eax, 0FFFFFF99h
cmp rdi, rdx
ja short loc_CBEE6
mov dl, [rsi+1]
cmp dl, 0BFh
jg short loc_CBEE4
cmp byte ptr [rsi+2], 0BFh
mov eax, 0
jg short loc_CBEE6
xor eax, eax
cmp dl, 0A0h
setnb al
cmp cl, 0E0h
lea ecx, [rax+rax*2]
mov eax, 3
cmovz eax, ecx
jmp short loc_CBEE6
loc_CBEE4:
xor eax, eax
loc_CBEE6:
pop rbp
retn
| long long my_charlen_utf8mb4(long long a1, char *a2, unsigned long long a3)
{
long long result; // rax
char v4; // cl
char v5; // dl
char v6; // dl
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (unsigned __int8)*a2 <= 0xEFu )
{
result = 1LL;
if ( v4 >= 0 )
return result;
if ( (unsigned __int8)v4 >= 0xC2u )
{
if ( (unsigned __int8)v4 <= 0xDFu )
{
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
return 2 * (unsigned int)(a2[1] < -64);
return result;
}
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v6 = a2[1];
if ( v6 <= -65 )
{
result = 0LL;
if ( a2[2] <= -65 )
{
result = 3LL;
if ( v4 == -32 )
return 3 * (unsigned int)((unsigned __int8)v6 >= 0xA0u);
}
return result;
}
}
return 0LL;
}
if ( (unsigned __int8)v4 > 0xF4u )
return 0LL;
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v5 = a2[1];
if ( v5 > -65 || a2[2] > -65 || a2[3] > -65 )
return 0LL;
result = 0LL;
if ( (unsigned __int8)v5 >= 0x90u || v4 != -16 )
return 4 * (unsigned int)(v4 != -12 || (unsigned __int8)v5 < 0x90u);
return result;
}
| my_charlen_utf8mb4:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x001cbee6
MOV CL,byte ptr [RSI]
CMP CL,0xef
JA 0x001cbe52
MOV EAX,0x1
TEST CL,CL
JNS 0x001cbee6
CMP CL,0xc2
JC 0x001cbee4
CMP CL,0xdf
JA 0x001cbeab
LEA RCX,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP RCX,RDX
JA 0x001cbee6
XOR EAX,EAX
CMP byte ptr [RSI + 0x1],0xc0
SETL AL
ADD EAX,EAX
JMP 0x001cbee6
LAB_001cbe52:
CMP CL,0xf4
JA 0x001cbee4
LEA RDI,[RSI + 0x4]
MOV EAX,0xffffff98
CMP RDI,RDX
JA 0x001cbee6
MOV DL,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001cbee4
CMP byte ptr [RSI + 0x2],0xbf
JG 0x001cbee4
CMP byte ptr [RSI + 0x3],0xbf
JG 0x001cbee4
CMP CL,0xf0
SETZ SIL
CMP DL,0x90
SETC DIL
MOV EAX,0x0
TEST SIL,DIL
JNZ 0x001cbee6
CMP CL,0xf4
SETNZ AL
CMP DL,0x90
SETC CL
OR CL,AL
MOVZX EAX,CL
SHL EAX,0x2
JMP 0x001cbee6
LAB_001cbeab:
LEA RDI,[RSI + 0x3]
MOV EAX,0xffffff99
CMP RDI,RDX
JA 0x001cbee6
MOV DL,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001cbee4
CMP byte ptr [RSI + 0x2],0xbf
MOV EAX,0x0
JG 0x001cbee6
XOR EAX,EAX
CMP DL,0xa0
SETNC AL
CMP CL,0xe0
LEA ECX,[RAX + RAX*0x2]
MOV EAX,0x3
CMOVZ EAX,ECX
JMP 0x001cbee6
LAB_001cbee4:
XOR EAX,EAX
LAB_001cbee6:
POP RBP
RET
|
ulong my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
if (bVar1 < 0xf0) {
if (-1 < (char)bVar1) {
return 1;
}
if (0xc1 < bVar1) {
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
return (ulong)((uint)((char)param_2[1] < -0x40) * 2);
}
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
if ((char)param_2[1] < -0x40) {
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (bVar1 != 0xe0) {
return 3;
}
return (ulong)((uint)(0x9f < param_2[1]) * 3);
}
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar2 = param_2[1];
if ((((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) {
if (bVar1 == 0xf0 && bVar2 < 0x90) {
return 0;
}
return (ulong)(bVar2 < 0x90 || bVar1 != 0xf4) << 2;
}
}
return 0;
}
| |
50,809 | ssz_union_selector | corpus-core[P]colibri-stateless/src/util/ssz_builder.c | uint8_t ssz_union_selector(const ssz_def_t* union_types, size_t union_types_len, const char* name, const ssz_def_t** def) {
*def = NULL;
for (int i = 0; i < union_types_len; i++) {
if (union_types[i].name == name || strcmp(union_types[i].name, name) == 0) {
*def = union_types + i;
return i;
}
}
return 0;
} | O0 | c | ssz_union_selector:
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 -0x28(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1ec27
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x1ebfc
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x5250
cmpl $0x0, %eax
jne 0x1ec1a
movq -0x10(%rbp), %rcx
movslq -0x2c(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
movb %al, -0x1(%rbp)
jmp 0x1ec2b
jmp 0x1ec1c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1ebba
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ssz_union_selector:
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_28]
mov qword ptr [rax], 0
mov [rbp+var_2C], 0
loc_1EBBA:
movsxd rax, [rbp+var_2C]
cmp rax, [rbp+var_18]
jnb short loc_1EC27
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
shl rcx, 5
add rax, rcx
mov rax, [rax]
cmp rax, [rbp+var_20]
jz short loc_1EBFC
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
shl rcx, 5
add rax, rcx
mov rdi, [rax]
mov rsi, [rbp+var_20]
call _strcmp
cmp eax, 0
jnz short loc_1EC1A
loc_1EBFC:
mov rcx, [rbp+var_10]
movsxd rax, [rbp+var_2C]
shl rax, 5
add rcx, rax
mov rax, [rbp+var_28]
mov [rax], rcx
mov eax, [rbp+var_2C]
mov [rbp+var_1], al
jmp short loc_1EC2B
loc_1EC1A:
jmp short $+2
loc_1EC1C:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_1EBBA
loc_1EC27:
mov [rbp+var_1], 0
loc_1EC2B:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ssz_union_selector(long long a1, unsigned long long a2, long long a3, _QWORD *a4)
{
int i; // [rsp+4h] [rbp-2Ch]
*a4 = 0LL;
for ( i = 0; i < a2; ++i )
{
if ( *(_QWORD *)(32LL * i + a1) == a3 || !(unsigned int)strcmp(*(_QWORD *)(32LL * i + a1), a3) )
{
*a4 = 32LL * i + a1;
return i;
}
}
return 0;
}
| ssz_union_selector:
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 + -0x28]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x2c],0x0
LAB_0011ebba:
MOVSXD RAX,dword ptr [RBP + -0x2c]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0011ec27
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x5
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0011ebfc
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x5
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00105250
CMP EAX,0x0
JNZ 0x0011ec1a
LAB_0011ebfc:
MOV RCX,qword ptr [RBP + -0x10]
MOVSXD RAX,dword ptr [RBP + -0x2c]
SHL RAX,0x5
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x2c]
MOV byte ptr [RBP + -0x1],AL
JMP 0x0011ec2b
LAB_0011ec1a:
JMP 0x0011ec1c
LAB_0011ec1c:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0011ebba
LAB_0011ec27:
MOV byte ptr [RBP + -0x1],0x0
LAB_0011ec2b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int8 ssz_union_selector(long param_1,ulong param_2,char *param_3,long *param_4)
{
int iVar1;
ulong uVar2;
int4 local_34;
int1 local_9;
*param_4 = 0;
local_34 = 0;
do {
uVar2 = (ulong)(int)local_34;
if (param_2 <= uVar2) {
local_9 = 0;
LAB_0011ec2b:
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
if (*(char **)(param_1 + (long)(int)local_34 * 0x20) == param_3) {
LAB_0011ebfc:
*param_4 = param_1 + (long)(int)local_34 * 0x20;
uVar2 = (ulong)local_34;
local_9 = (int1)local_34;
goto LAB_0011ec2b;
}
iVar1 = strcmp(*(char **)(param_1 + (long)(int)local_34 * 0x20),param_3);
if (iVar1 == 0) goto LAB_0011ebfc;
local_34 = local_34 + 1;
} while( true );
}
| |
50,810 | ssz_union_selector | corpus-core[P]colibri-stateless/src/util/ssz_builder.c | uint8_t ssz_union_selector(const ssz_def_t* union_types, size_t union_types_len, const char* name, const ssz_def_t** def) {
*def = NULL;
for (int i = 0; i < union_types_len; i++) {
if (union_types[i].name == name || strcmp(union_types[i].name, name) == 0) {
*def = union_types + i;
return i;
}
}
return 0;
} | O1 | c | ssz_union_selector:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq $0x0, (%rcx)
testq %rsi, %rsi
je 0x1650e
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
xorl %ebx, %ebx
movq (%r12), %rdi
cmpq %r15, %rdi
je 0x16512
movq %r15, %rsi
callq 0x5280
testl %eax, %eax
je 0x16512
incq %rbx
addq $0x20, %r12
cmpq %rbx, %r13
jne 0x164ed
xorl %ebx, %ebx
jmp 0x16515
movq %r12, (%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| ssz_union_selector:
push r15
push r14
push r13
push r12
push rbx
mov qword ptr [rcx], 0
test rsi, rsi
jz short loc_1650E
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov r12, rdi
xor ebx, ebx
loc_164ED:
mov rdi, [r12]
cmp rdi, r15
jz short loc_16512
mov rsi, r15
call _strcmp
test eax, eax
jz short loc_16512
inc rbx
add r12, 20h ; ' '
cmp r13, rbx
jnz short loc_164ED
loc_1650E:
xor ebx, ebx
jmp short loc_16515
loc_16512:
mov [r14], r12
loc_16515:
mov eax, ebx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long ssz_union_selector(_QWORD *a1, long long a2, long long a3, _QWORD *a4)
{
long long v7; // rbx
*a4 = 0LL;
if ( a2 )
{
v7 = 0LL;
while ( *a1 != a3 && (unsigned int)strcmp(*a1, a3) )
{
++v7;
a1 += 4;
if ( a2 == v7 )
goto LABEL_6;
}
*a4 = a1;
}
else
{
LABEL_6:
LODWORD(v7) = 0;
}
return (unsigned int)v7;
}
| ssz_union_selector:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV qword ptr [RCX],0x0
TEST RSI,RSI
JZ 0x0011650e
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV R12,RDI
XOR EBX,EBX
LAB_001164ed:
MOV RDI,qword ptr [R12]
CMP RDI,R15
JZ 0x00116512
MOV RSI,R15
CALL 0x00105280
TEST EAX,EAX
JZ 0x00116512
INC RBX
ADD R12,0x20
CMP R13,RBX
JNZ 0x001164ed
LAB_0011650e:
XOR EBX,EBX
JMP 0x00116515
LAB_00116512:
MOV qword ptr [R14],R12
LAB_00116515:
MOV EAX,EBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
ulong ssz_union_selector(int8 *param_1,ulong param_2,char *param_3,int8 *param_4)
{
int iVar1;
ulong uVar2;
*param_4 = 0;
if (param_2 != 0) {
uVar2 = 0;
do {
if ((char *)*param_1 == param_3) {
LAB_00116512:
*param_4 = param_1;
goto LAB_00116515;
}
iVar1 = strcmp((char *)*param_1,param_3);
if (iVar1 == 0) goto LAB_00116512;
uVar2 = uVar2 + 1;
param_1 = param_1 + 4;
} while (param_2 != uVar2);
}
uVar2 = 0;
LAB_00116515:
return uVar2 & 0xffffffff;
}
| |
50,811 | string_get_digits | bluesky950520[P]quickjs/quickjs.c | static BOOL string_get_digits(const uint8_t *sp, int *pp, int *pval,
int min_digits, int max_digits)
{
int v = 0;
int c, p = *pp, p_start;
p_start = p;
while ((c = sp[p]) >= '0' && c <= '9') {
v = v * 10 + c - '0';
p++;
if (p - p_start == max_digits)
break;
}
if (p - p_start < min_digits)
return FALSE;
*pval = v;
*pp = p;
return TRUE;
} | O0 | c | string_get_digits:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movl %ecx, -0x24(%rsp)
movl %r8d, -0x28(%rsp)
movl $0x0, -0x2c(%rsp)
movq -0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
movl %eax, -0x38(%rsp)
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
movzbl (%rax,%rcx), %ecx
movl %ecx, -0x30(%rsp)
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x39(%rsp)
jl 0x9938c
cmpl $0x39, -0x30(%rsp)
setle %al
movb %al, -0x39(%rsp)
movb -0x39(%rsp), %al
testb $0x1, %al
jne 0x99396
jmp 0x993c3
imull $0xa, -0x2c(%rsp), %eax
addl -0x30(%rsp), %eax
subl $0x30, %eax
movl %eax, -0x2c(%rsp)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
subl -0x38(%rsp), %eax
cmpl -0x28(%rsp), %eax
jne 0x993c1
jmp 0x993c3
jmp 0x99363
movl -0x34(%rsp), %eax
subl -0x38(%rsp), %eax
cmpl -0x24(%rsp), %eax
jge 0x993db
movl $0x0, -0x4(%rsp)
jmp 0x993f9
movl -0x2c(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
movl -0x34(%rsp), %ecx
movq -0x18(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
| string_get_digits:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_20], rdx
mov [rsp+var_24], ecx
mov [rsp+var_28], r8d
mov [rsp+var_2C], 0
mov rax, [rsp+var_18]
mov eax, [rax]
mov [rsp+var_34], eax
mov eax, [rsp+var_34]
mov [rsp+var_38], eax
loc_99363:
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_34]
movzx ecx, byte ptr [rax+rcx]
mov [rsp+var_30], ecx
xor eax, eax
cmp ecx, 30h ; '0'
mov [rsp+var_39], al
jl short loc_9938C
cmp [rsp+var_30], 39h ; '9'
setle al
mov [rsp+var_39], al
loc_9938C:
mov al, [rsp+var_39]
test al, 1
jnz short loc_99396
jmp short loc_993C3
loc_99396:
imul eax, [rsp+var_2C], 0Ah
add eax, [rsp+var_30]
sub eax, 30h ; '0'
mov [rsp+var_2C], eax
mov eax, [rsp+var_34]
add eax, 1
mov [rsp+var_34], eax
mov eax, [rsp+var_34]
sub eax, [rsp+var_38]
cmp eax, [rsp+var_28]
jnz short loc_993C1
jmp short loc_993C3
loc_993C1:
jmp short loc_99363
loc_993C3:
mov eax, [rsp+var_34]
sub eax, [rsp+var_38]
cmp eax, [rsp+var_24]
jge short loc_993DB
mov [rsp+var_4], 0
jmp short loc_993F9
loc_993DB:
mov ecx, [rsp+var_2C]
mov rax, [rsp+var_20]
mov [rax], ecx
mov ecx, [rsp+var_34]
mov rax, [rsp+var_18]
mov [rax], ecx
mov [rsp+var_4], 1
loc_993F9:
mov eax, [rsp+var_4]
retn
| long long string_get_digits(long long a1, int *a2, int *a3, int a4, int a5)
{
bool v6; // [rsp+1h] [rbp-39h]
int v7; // [rsp+2h] [rbp-38h]
int v8; // [rsp+6h] [rbp-34h]
int v9; // [rsp+Eh] [rbp-2Ch]
v9 = 0;
v8 = *a2;
v7 = *a2;
do
{
v6 = 0;
if ( *(unsigned __int8 *)(a1 + v8) >= 0x30u )
v6 = *(unsigned __int8 *)(a1 + v8) <= 0x39u;
if ( !v6 )
break;
v9 = *(unsigned __int8 *)(a1 + v8++) + 10 * v9 - 48;
}
while ( v8 - v7 != a5 );
if ( v8 - v7 >= a4 )
{
*a3 = v9;
*a2 = v8;
return 1;
}
else
{
return 0;
}
}
| string_get_digits:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV qword ptr [RSP + -0x20],RDX
MOV dword ptr [RSP + -0x24],ECX
MOV dword ptr [RSP + -0x28],R8D
MOV dword ptr [RSP + -0x2c],0x0
MOV RAX,qword ptr [RSP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + -0x34],EAX
MOV EAX,dword ptr [RSP + -0x34]
MOV dword ptr [RSP + -0x38],EAX
LAB_00199363:
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x34]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + -0x30],ECX
XOR EAX,EAX
CMP ECX,0x30
MOV byte ptr [RSP + -0x39],AL
JL 0x0019938c
CMP dword ptr [RSP + -0x30],0x39
SETLE AL
MOV byte ptr [RSP + -0x39],AL
LAB_0019938c:
MOV AL,byte ptr [RSP + -0x39]
TEST AL,0x1
JNZ 0x00199396
JMP 0x001993c3
LAB_00199396:
IMUL EAX,dword ptr [RSP + -0x2c],0xa
ADD EAX,dword ptr [RSP + -0x30]
SUB EAX,0x30
MOV dword ptr [RSP + -0x2c],EAX
MOV EAX,dword ptr [RSP + -0x34]
ADD EAX,0x1
MOV dword ptr [RSP + -0x34],EAX
MOV EAX,dword ptr [RSP + -0x34]
SUB EAX,dword ptr [RSP + -0x38]
CMP EAX,dword ptr [RSP + -0x28]
JNZ 0x001993c1
JMP 0x001993c3
LAB_001993c1:
JMP 0x00199363
LAB_001993c3:
MOV EAX,dword ptr [RSP + -0x34]
SUB EAX,dword ptr [RSP + -0x38]
CMP EAX,dword ptr [RSP + -0x24]
JGE 0x001993db
MOV dword ptr [RSP + -0x4],0x0
JMP 0x001993f9
LAB_001993db:
MOV ECX,dword ptr [RSP + -0x2c]
MOV RAX,qword ptr [RSP + -0x20]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RSP + -0x34]
MOV RAX,qword ptr [RSP + -0x18]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + -0x4],0x1
LAB_001993f9:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
bool string_get_digits(long param_1,int *param_2,int *param_3,int param_4,int param_5)
{
int iVar1;
bool bVar2;
uint uVar3;
int local_34;
int local_2c;
local_2c = 0;
iVar1 = *param_2;
local_34 = iVar1;
do {
uVar3 = (uint)*(byte *)(param_1 + local_34);
if (uVar3 < 0x30 || 0x39 < uVar3) break;
local_2c = local_2c * 10 + uVar3 + -0x30;
local_34 = local_34 + 1;
} while (local_34 - iVar1 != param_5);
bVar2 = param_4 <= local_34 - iVar1;
if (bVar2) {
*param_3 = local_2c;
*param_2 = local_34;
}
return bVar2;
}
| |
50,812 | limb_to_a2 | bluesky950520[P]quickjs/libbf.c | static void limb_to_a2(char *buf, limb_t n, unsigned int radix_bits, int len)
{
int digit, i;
unsigned int mask;
mask = (1 << radix_bits) - 1;
for(i = len - 1; i >= 0; i--) {
digit = n & mask;
n >>= radix_bits;
if (digit < 10)
digit += '0';
else
digit += 'a' - 10;
buf[i] = digit;
}
} | O0 | c | limb_to_a2:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movl %ecx, -0x18(%rsp)
movl -0x14(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x24(%rsp)
movl -0x18(%rsp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rsp)
cmpl $0x0, -0x20(%rsp)
jl 0xf7148
movq -0x10(%rsp), %rax
movl -0x24(%rsp), %ecx
andq %rcx, %rax
movl %eax, -0x1c(%rsp)
movl -0x14(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x10(%rsp)
cmpl $0xa, -0x1c(%rsp)
jge 0xf711d
movl -0x1c(%rsp), %eax
addl $0x30, %eax
movl %eax, -0x1c(%rsp)
jmp 0xf7128
movl -0x1c(%rsp), %eax
addl $0x57, %eax
movl %eax, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
movb %al, %dl
movq -0x8(%rsp), %rax
movslq -0x20(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl -0x20(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0xf70df
retq
nopl (%rax)
| limb_to_a2:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_14], edx
mov [rsp+var_18], ecx
mov ecx, [rsp+var_14]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rsp+var_24], eax
mov eax, [rsp+var_18]
sub eax, 1
mov [rsp+var_20], eax
loc_F70DF:
cmp [rsp+var_20], 0
jl short locret_F7148
mov rax, [rsp+var_10]
mov ecx, [rsp+var_24]
and rax, rcx
mov [rsp+var_1C], eax
mov ecx, [rsp+var_14]
mov rax, [rsp+var_10]
mov ecx, ecx
shr rax, cl
mov [rsp+var_10], rax
cmp [rsp+var_1C], 0Ah
jge short loc_F711D
mov eax, [rsp+var_1C]
add eax, 30h ; '0'
mov [rsp+var_1C], eax
jmp short loc_F7128
loc_F711D:
mov eax, [rsp+var_1C]
add eax, 57h ; 'W'
mov [rsp+var_1C], eax
loc_F7128:
mov eax, [rsp+var_1C]
mov dl, al
mov rax, [rsp+var_8]
movsxd rcx, [rsp+var_20]
mov [rax+rcx], dl
mov eax, [rsp+var_20]
add eax, 0FFFFFFFFh
mov [rsp+var_20], eax
jmp short loc_F70DF
locret_F7148:
retn
| long long limb_to_a2(long long a1, unsigned long long a2, char a3, int a4)
{
long long result; // rax
int i; // [rsp+4h] [rbp-20h]
int v6; // [rsp+8h] [rbp-1Ch]
char v7; // [rsp+8h] [rbp-1Ch]
result = (unsigned int)(a4 - 1);
for ( i = a4 - 1; i >= 0; --i )
{
v6 = ((1 << a3) - 1) & a2;
a2 >>= a3;
if ( v6 >= 10 )
v7 = v6 + 87;
else
v7 = v6 + 48;
*(_BYTE *)(a1 + i) = v7;
result = (unsigned int)(i - 1);
}
return result;
}
| limb_to_a2:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV dword ptr [RSP + -0x14],EDX
MOV dword ptr [RSP + -0x18],ECX
MOV ECX,dword ptr [RSP + -0x14]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RSP + -0x24],EAX
MOV EAX,dword ptr [RSP + -0x18]
SUB EAX,0x1
MOV dword ptr [RSP + -0x20],EAX
LAB_001f70df:
CMP dword ptr [RSP + -0x20],0x0
JL 0x001f7148
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,dword ptr [RSP + -0x24]
AND RAX,RCX
MOV dword ptr [RSP + -0x1c],EAX
MOV ECX,dword ptr [RSP + -0x14]
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,ECX
SHR RAX,CL
MOV qword ptr [RSP + -0x10],RAX
CMP dword ptr [RSP + -0x1c],0xa
JGE 0x001f711d
MOV EAX,dword ptr [RSP + -0x1c]
ADD EAX,0x30
MOV dword ptr [RSP + -0x1c],EAX
JMP 0x001f7128
LAB_001f711d:
MOV EAX,dword ptr [RSP + -0x1c]
ADD EAX,0x57
MOV dword ptr [RSP + -0x1c],EAX
LAB_001f7128:
MOV EAX,dword ptr [RSP + -0x1c]
MOV DL,AL
MOV RAX,qword ptr [RSP + -0x8]
MOVSXD RCX,dword ptr [RSP + -0x20]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RSP + -0x20]
ADD EAX,-0x1
MOV dword ptr [RSP + -0x20],EAX
JMP 0x001f70df
LAB_001f7148:
RET
|
void limb_to_a2(long param_1,ulong param_2,byte param_3,int param_4)
{
uint uVar1;
int4 local_20;
int1 local_1c;
int8 local_10;
local_10 = param_2;
for (local_20 = param_4 + -1; -1 < local_20; local_20 = local_20 + -1) {
uVar1 = (uint)local_10 & (1 << (param_3 & 0x1f)) - 1U;
local_10 = local_10 >> (param_3 & 0x3f);
local_1c = (char)uVar1;
if ((int)uVar1 < 10) {
local_1c = local_1c + '0';
}
else {
local_1c = local_1c + 'W';
}
*(char *)(param_1 + local_20) = local_1c;
}
return;
}
| |
50,813 | Cache::log2i(unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint32_t Cache::log2i(uint32_t val) {
if (val == 0)
return uint32_t(-1);
if (val == 1)
return 0;
uint32_t ret = 0;
while (val > 1) {
val >>= 1;
ret++;
}
return ret;
} | O0 | cpp | Cache::log2i(unsigned int):
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
cmpl $0x0, -0x14(%rsp)
jne 0x535a
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x5399
cmpl $0x1, -0x14(%rsp)
jne 0x536b
movl $0x0, -0x4(%rsp)
jmp 0x5399
movl $0x0, -0x18(%rsp)
cmpl $0x1, -0x14(%rsp)
jbe 0x5391
movl -0x14(%rsp), %eax
shrl %eax
movl %eax, -0x14(%rsp)
movl -0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rsp)
jmp 0x5373
movl -0x18(%rsp), %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
| _ZN5Cache5log2iEj:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
cmp [rsp+var_14], 0
jnz short loc_535A
mov [rsp+var_4], 0FFFFFFFFh
jmp short loc_5399
loc_535A:
cmp [rsp+var_14], 1
jnz short loc_536B
mov [rsp+var_4], 0
jmp short loc_5399
loc_536B:
mov [rsp+var_18], 0
loc_5373:
cmp [rsp+var_14], 1
jbe short loc_5391
mov eax, [rsp+var_14]
shr eax, 1
mov [rsp+var_14], eax
mov eax, [rsp+var_18]
add eax, 1
mov [rsp+var_18], eax
jmp short loc_5373
loc_5391:
mov eax, [rsp+var_18]
mov [rsp+var_4], eax
loc_5399:
mov eax, [rsp+var_4]
retn
| long long Cache::log2i(Cache *this, unsigned int a2)
{
unsigned int v3; // [rsp+0h] [rbp-18h]
unsigned int v4; // [rsp+4h] [rbp-14h]
v4 = a2;
if ( a2 )
{
if ( a2 == 1 )
{
return 0;
}
else
{
v3 = 0;
while ( v4 > 1 )
{
v4 >>= 1;
++v3;
}
return v3;
}
}
else
{
return (unsigned int)-1;
}
}
| log2i:
MOV qword ptr [RSP + -0x10],RDI
MOV dword ptr [RSP + -0x14],ESI
CMP dword ptr [RSP + -0x14],0x0
JNZ 0x0010535a
MOV dword ptr [RSP + -0x4],0xffffffff
JMP 0x00105399
LAB_0010535a:
CMP dword ptr [RSP + -0x14],0x1
JNZ 0x0010536b
MOV dword ptr [RSP + -0x4],0x0
JMP 0x00105399
LAB_0010536b:
MOV dword ptr [RSP + -0x18],0x0
LAB_00105373:
CMP dword ptr [RSP + -0x14],0x1
JBE 0x00105391
MOV EAX,dword ptr [RSP + -0x14]
SHR EAX,0x1
MOV dword ptr [RSP + -0x14],EAX
MOV EAX,dword ptr [RSP + -0x18]
ADD EAX,0x1
MOV dword ptr [RSP + -0x18],EAX
JMP 0x00105373
LAB_00105391:
MOV EAX,dword ptr [RSP + -0x18]
MOV dword ptr [RSP + -0x4],EAX
LAB_00105399:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
/* Cache::log2i(unsigned int) */
int __thiscall Cache::log2i(Cache *this,uint param_1)
{
int4 local_18;
int4 local_14;
int4 local_4;
if (param_1 == 0) {
local_4 = -1;
}
else if (param_1 == 1) {
local_4 = 0;
}
else {
local_18 = 0;
for (local_14 = param_1; 1 < local_14; local_14 = local_14 >> 1) {
local_18 = local_18 + 1;
}
local_4 = local_18;
}
return local_4;
}
| |
50,814 | Cache::log2i(unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint32_t Cache::log2i(uint32_t val) {
if (val == 0)
return uint32_t(-1);
if (val == 1)
return 0;
uint32_t ret = 0;
while (val > 1) {
val >>= 1;
ret++;
}
return ret;
} | O1 | cpp | Cache::log2i(unsigned int):
testl %esi, %esi
je 0x4122
xorl %eax, %eax
cmpl $0x1, %esi
je 0x4121
cmpl $0x2, %esi
jb 0x4121
xorl %eax, %eax
movl %esi, %ecx
shrl %ecx
incl %eax
cmpl $0x3, %esi
movl %ecx, %esi
ja 0x4116
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
| _ZN5Cache5log2iEj:
test esi, esi
jz short loc_4122
xor eax, eax
cmp esi, 1
jz short locret_4121
cmp esi, 2
jb short locret_4121
xor eax, eax
mov ecx, esi
loc_4116:
shr ecx, 1
inc eax
cmp esi, 3
mov esi, ecx
ja short loc_4116
locret_4121:
retn
loc_4122:
mov eax, 0FFFFFFFFh
retn
| long long Cache::log2i(Cache *this, unsigned int a2)
{
long long result; // rax
unsigned int v3; // ecx
bool v4; // cc
if ( !a2 )
return 0xFFFFFFFFLL;
result = 0LL;
if ( a2 != 1 )
{
LODWORD(result) = 0;
v3 = a2;
do
{
v3 >>= 1;
result = (unsigned int)(result + 1);
v4 = a2 <= 3;
a2 = v3;
}
while ( !v4 );
}
return result;
}
| log2i:
TEST ESI,ESI
JZ 0x00104122
XOR EAX,EAX
CMP ESI,0x1
JZ 0x00104121
CMP ESI,0x2
JC 0x00104121
XOR EAX,EAX
MOV ECX,ESI
LAB_00104116:
SHR ECX,0x1
INC EAX
CMP ESI,0x3
MOV ESI,ECX
JA 0x00104116
LAB_00104121:
RET
LAB_00104122:
MOV EAX,0xffffffff
RET
|
/* Cache::log2i(unsigned int) */
int __thiscall Cache::log2i(Cache *this,uint param_1)
{
bool bVar1;
int iVar2;
if (param_1 != 0) {
iVar2 = 0;
if ((param_1 != 1) && (1 < param_1)) {
iVar2 = 0;
do {
iVar2 = iVar2 + 1;
bVar1 = 3 < param_1;
param_1 = param_1 >> 1;
} while (bVar1);
}
return iVar2;
}
return -1;
}
| |
50,815 | Cache::log2i(unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint32_t Cache::log2i(uint32_t val) {
if (val == 0)
return uint32_t(-1);
if (val == 1)
return 0;
uint32_t ret = 0;
while (val > 1) {
val >>= 1;
ret++;
}
return ret;
} | O3 | cpp | Cache::log2i(unsigned int):
testl %esi, %esi
je 0x4011
xorl %eax, %eax
cmpl $0x1, %esi
je 0x4010
movl %esi, %ecx
shrl %ecx
incl %eax
cmpl $0x3, %esi
movl %ecx, %esi
ja 0x4005
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
nop
| _ZN5Cache5log2iEj:
test esi, esi
jz short loc_4011
xor eax, eax
cmp esi, 1
jz short locret_4010
mov ecx, esi
loc_4005:
shr ecx, 1
inc eax
cmp esi, 3
mov esi, ecx
ja short loc_4005
locret_4010:
retn
loc_4011:
mov eax, 0FFFFFFFFh
retn
| long long Cache::log2i(Cache *this, unsigned int a2)
{
long long result; // rax
unsigned int v3; // ecx
bool v4; // cc
if ( !a2 )
return 0xFFFFFFFFLL;
result = 0LL;
if ( a2 != 1 )
{
v3 = a2;
do
{
v3 >>= 1;
result = (unsigned int)(result + 1);
v4 = a2 <= 3;
a2 = v3;
}
while ( !v4 );
}
return result;
}
| log2i:
TEST ESI,ESI
JZ 0x00104011
XOR EAX,EAX
CMP ESI,0x1
JZ 0x00104010
MOV ECX,ESI
LAB_00104005:
SHR ECX,0x1
INC EAX
CMP ESI,0x3
MOV ESI,ECX
JA 0x00104005
LAB_00104010:
RET
LAB_00104011:
MOV EAX,0xffffffff
RET
|
/* Cache::log2i(unsigned int) */
int __thiscall Cache::log2i(Cache *this,uint param_1)
{
bool bVar1;
int iVar2;
if (param_1 == 0) {
return -1;
}
iVar2 = 0;
if (param_1 != 1) {
do {
iVar2 = iVar2 + 1;
bVar1 = 3 < param_1;
param_1 = param_1 >> 1;
} while (bVar1);
}
return iVar2;
}
| |
50,816 | ma_pvio_read | eloqsql/libmariadb/libmariadb/ma_pvio.c | ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r= -1;
if (!pvio)
return -1;
if (IS_PVIO_ASYNC_ACTIVE(pvio))
{
r=
#if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL)
(pvio->ctls) ? ma_tls_read_async(pvio, buffer, length) :
#endif
(ssize_t)ma_pvio_read_async(pvio, buffer, length);
goto end;
}
else
{
if (IS_PVIO_ASYNC(pvio))
{
/*
If switching from non-blocking to blocking API usage, set the socket
back to blocking mode.
*/
my_bool old_mode;
ma_pvio_blocking(pvio, TRUE, &old_mode);
}
}
/* secure connection */
#ifdef HAVE_TLS
if (pvio->ctls)
{
r= ma_pvio_tls_read(pvio->ctls, buffer, length);
goto end;
}
#endif
if (pvio->methods->read)
r= pvio->methods->read(pvio, buffer, length);
end:
if (pvio_callback)
{
void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length);
LIST *p= pvio_callback;
while (p)
{
callback= p->data;
callback(0, pvio->mysql, buffer, r);
p= p->next;
}
}
if (r > 0)
pvio->bytes_read+= r;
return r;
} | O0 | c | ma_pvio_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x47200
movq $-0x1, -0x8(%rbp)
jmp 0x473a8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x47297
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x47297
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x47297
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x47297
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x47275
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5b170
movq %rax, -0x48(%rbp)
jmp 0x4728a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x473c0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x47333
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x472dc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x472dc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x472dc
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq -0x29(%rbp), %rdx
callq 0x47540
jmp 0x472de
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x47304
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x481d0
movq %rax, -0x28(%rbp)
jmp 0x47333
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x47331
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movq %rax, -0x28(%rbp)
jmp 0x47333
leaq 0x3a2486(%rip), %rax # 0x3e97c0
cmpq $0x0, (%rax)
je 0x47389
leaq 0x3a2479(%rip), %rax # 0x3e97c0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x47387
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %edi, %edi
callq *%rax
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x4734e
jmp 0x47389
cmpq $0x0, -0x28(%rbp)
jle 0x473a0
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
cmp [rbp+var_10], 0
jnz short loc_47200
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_473A8
loc_47200:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz loc_47297
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_47297
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_47297
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+28h]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_47297
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_47275
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_tls_read_async
mov [rbp+var_48], rax
jmp short loc_4728A
loc_47275:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_read_async
mov [rbp+var_48], rax
loc_4728A:
mov rax, [rbp+var_48]
mov [rbp+var_28], rax
jmp loc_47333
loc_47297:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_472DC
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_472DC
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_472DC
mov rdi, [rbp+var_10]
mov esi, 1
lea rdx, [rbp+var_29]
call ma_pvio_blocking
loc_472DC:
jmp short $+2
loc_472DE:
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_47304
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_tls_read
mov [rbp+var_28], rax
jmp short loc_47333
loc_47304:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp qword ptr [rax+10h], 0
jz short loc_47331
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rax, [rax+10h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_28], rax
loc_47331:
jmp short $+2
loc_47333:
lea rax, pvio_callback
cmp qword ptr [rax], 0
jz short loc_47389
lea rax, pvio_callback
mov rax, [rax]
mov [rbp+var_40], rax
loc_4734E:
cmp [rbp+var_40], 0
jz short loc_47387
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rsi, [rcx+40h]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
xor edi, edi
call rax
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_40], rax
jmp short loc_4734E
loc_47387:
jmp short $+2
loc_47389:
cmp [rbp+var_28], 0
jle short loc_473A0
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+60h]
mov [rax+60h], rcx
loc_473A0:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_473A8:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long ma_pvio_read(_QWORD *a1, long long a2, long long a3)
{
long long async; // [rsp+8h] [rbp-48h]
long long i; // [rsp+10h] [rbp-40h]
char v6; // [rsp+27h] [rbp-29h] BYREF
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-18h]
_QWORD *v10; // [rsp+40h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = -1LL;
if ( !a1 )
return -1LL;
if ( v10[8]
&& *(_QWORD *)(v10[8] + 1152LL)
&& *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL)
&& *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) + 20LL) )
{
if ( v10[7] )
async = ma_tls_read_async(v10, v9, v8);
else
async = ma_pvio_read_async(v10, v9, v8);
v7 = async;
}
else
{
if ( v10[8] && *(_QWORD *)(v10[8] + 1152LL) && *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) )
ma_pvio_blocking(v10, 1LL, &v6);
if ( v10[7] )
{
v7 = ma_pvio_tls_read(v10[7], v9, v8);
}
else if ( *(_QWORD *)(v10[9] + 16LL) )
{
v7 = (*(long long ( **)(_QWORD *, long long, long long))(v10[9] + 16LL))(v10, v9, v8);
}
}
if ( pvio_callback )
{
for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) )
(*(void ( **)(_QWORD, _QWORD, long long, long long))(i + 16))(0LL, v10[8], v9, v7);
}
if ( v7 > 0 )
v10[12] += v7;
return v7;
}
| ma_pvio_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],-0x1
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00147200
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001473a8
LAB_00147200:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00147297
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00147297
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00147297
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x00147297
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00147275
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0015b170
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0014728a
LAB_00147275:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001473c0
MOV qword ptr [RBP + -0x48],RAX
LAB_0014728a:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00147333
LAB_00147297:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001472dc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x001472dc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001472dc
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
LEA RDX,[RBP + -0x29]
CALL 0x00147540
LAB_001472dc:
JMP 0x001472de
LAB_001472de:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00147304
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001481d0
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00147333
LAB_00147304:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00147331
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x28],RAX
LAB_00147331:
JMP 0x00147333
LAB_00147333:
LEA RAX,[0x4e97c0]
CMP qword ptr [RAX],0x0
JZ 0x00147389
LEA RAX,[0x4e97c0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0014734e:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00147387
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDI,EDI
CALL RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0014734e
LAB_00147387:
JMP 0x00147389
LAB_00147389:
CMP qword ptr [RBP + -0x28],0x0
JLE 0x001473a0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x60]
MOV qword ptr [RAX + 0x60],RCX
LAB_001473a0:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001473a8:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long ma_pvio_read(long param_1,int8 param_2,int8 param_3)
{
long local_50;
long local_48;
int1 local_31;
long local_30;
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_30 = -1;
if (param_1 == 0) {
local_10 = -1;
}
else {
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((((*(long *)(param_1 + 0x40) == 0) || (*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0))
|| (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) == 0)) ||
(*(char *)(*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) + 0x14) == '\0')) {
if (((*(long *)(param_1 + 0x40) != 0) && (*(long *)(*(long *)(param_1 + 0x40) + 0x480) != 0))
&& (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) != 0)) {
ma_pvio_blocking(param_1,1,&local_31);
}
if (*(long *)(local_18 + 0x38) == 0) {
if (*(long *)(*(long *)(local_18 + 0x48) + 0x10) != 0) {
local_30 = (**(code **)(*(long *)(local_18 + 0x48) + 0x10))(local_18,local_20,local_28);
}
}
else {
local_30 = ma_pvio_tls_read(*(int8 *)(local_18 + 0x38),local_20,local_28);
}
}
else {
if (*(long *)(param_1 + 0x38) == 0) {
local_50 = ma_pvio_read_async(param_1,param_2,param_3);
}
else {
local_50 = ma_tls_read_async(param_1,param_2,param_3);
}
local_30 = local_50;
}
if (pvio_callback != 0) {
for (local_48 = pvio_callback; local_48 != 0; local_48 = *(long *)(local_48 + 8)) {
(**(code **)(local_48 + 0x10))(0,*(int8 *)(local_18 + 0x40),local_20,local_30);
}
}
if (0 < local_30) {
*(long *)(local_18 + 0x60) = local_30 + *(long *)(local_18 + 0x60);
}
local_10 = local_30;
}
return local_10;
}
| |
50,817 | myisam_log_command | eloqsql/storage/myisam/mi_log.c | void _myisam_log_command(enum myisam_log_commands command, MI_INFO *info,
const uchar *buffert, uint length, int result)
{
uchar buff[9];
int error,old_errno;
ulong pid=(ulong) GETPID();
old_errno=my_errno;
buff[0]=(char) command;
mi_int2store(buff+1,info->dfile);
mi_int4store(buff+3,pid);
mi_int2store(buff+7,result);
mysql_mutex_lock(&THR_LOCK_myisam);
error=my_lock(myisam_log_file,F_WRLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
(void) mysql_file_write(myisam_log_file, buff, sizeof(buff), MYF(0));
if (buffert)
(void) mysql_file_write(myisam_log_file, buffert, length, MYF(0));
if (!error)
error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
mysql_mutex_unlock(&THR_LOCK_myisam);
my_errno=old_errno;
} | O0 | c | myisam_log_command:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
cmpl $0x1, 0xbc871a(%rip) # 0xc7a608
jne 0xb1efd
movq 0xbc8709(%rip), %rax # 0xc7a600
movq %rax, -0x60(%rbp)
jmp 0xb1f06
callq 0xf6690
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x18(%rbp), %eax
movb %al, -0x11(%rbp)
movq -0x20(%rbp), %rax
movl 0x1c0(%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movb %al, -0xf(%rbp)
movl -0x44(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x10(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb %al, -0xb(%rbp)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, -0xc(%rbp)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, -0xd(%rbp)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, -0xe(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movb %al, -0x9(%rbp)
movl -0x54(%rbp), %eax
shrl $0x8, %eax
movb %al, -0xa(%rbp)
leaq 0xbd143a(%rip), %rdi # 0xc833c0
leaq 0xa1ba3(%rip), %rsi # 0x153b30
movl $0x69, %edx
callq 0xb1c80
leaq 0x20d212(%rip), %rax # 0x2bf1b0
movl (%rax), %edi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r8d
movq %rcx, %rdx
callq 0xf3500
movl %eax, -0x34(%rbp)
leaq 0x20d1ef(%rip), %rax # 0x2bf1b0
movl (%rax), %edx
leaq -0x11(%rbp), %rcx
leaq 0xa1b62(%rip), %rdi # 0x153b30
movl $0x6b, %esi
movl $0x9, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0xb1cf0
cmpq $0x0, -0x28(%rbp)
je 0xb2013
leaq 0x20d1bf(%rip), %rax # 0x2bf1b0
movl (%rax), %edx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %eax
movl %eax, %r8d
leaq 0xa1b2c(%rip), %rdi # 0x153b30
movl $0x6d, %esi
xorl %eax, %eax
movl %eax, %r9d
callq 0xb1cf0
cmpl $0x0, -0x34(%rbp)
jne 0xb203c
leaq 0x20d190(%rip), %rax # 0x2bf1b0
movl (%rax), %edi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r8d
movq %rcx, %rdx
callq 0xf3500
movl %eax, -0x34(%rbp)
leaq 0xbd137d(%rip), %rdi # 0xc833c0
callq 0xb1e60
movl -0x38(%rbp), %eax
movl %eax, -0x64(%rbp)
callq 0xf6090
movl -0x64(%rbp), %ecx
movl %ecx, (%rax)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2070
addq $0x70, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| _myisam_log_command:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], edi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov [rbp+var_2C], ecx
mov [rbp+var_30], r8d
cmp cs:log_type, 1
jnz short loc_B1EFD
mov rax, cs:myisam_pid
mov [rbp+var_60], rax
jmp short loc_B1F06
loc_B1EFD:
call my_thread_dbug_id
mov [rbp+var_60], rax
loc_B1F06:
mov rax, [rbp+var_60]
mov [rbp+var_40], rax
call _my_thread_var
mov eax, [rax]
mov [rbp+var_38], eax
mov eax, [rbp+var_18]
mov [rbp+var_11], al
mov rax, [rbp+var_20]
mov eax, [rax+1C0h]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
mov [rbp+var_F], al
mov eax, [rbp+var_44]
shr eax, 8
mov [rbp+var_10], al
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov [rbp+var_B], al
mov rax, [rbp+var_50]
shr rax, 8
mov [rbp+var_C], al
mov rax, [rbp+var_50]
shr rax, 10h
mov [rbp+var_D], al
mov rax, [rbp+var_50]
shr rax, 18h
mov [rbp+var_E], al
mov eax, [rbp+var_30]
mov [rbp+var_54], eax
mov eax, [rbp+var_54]
mov [rbp+var_9], al
mov eax, [rbp+var_54]
shr eax, 8
mov [rbp+var_A], al
lea rdi, THR_LOCK_myisam
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 69h ; 'i'
call inline_mysql_mutex_lock_18
lea rax, myisam_log_file
mov edi, [rax]
mov esi, 1
xor eax, eax
mov ecx, eax
mov r8d, 20h ; ' '
mov rdx, rcx
call my_lock
mov [rbp+var_34], eax
lea rax, myisam_log_file
mov edx, [rax]
lea rcx, [rbp+var_11]
lea rdi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 6Bh ; 'k'
mov r8d, 9
xor eax, eax
mov r9d, eax
call inline_mysql_file_write_1
cmp [rbp+var_28], 0
jz short loc_B2013
lea rax, myisam_log_file
mov edx, [rax]
mov rcx, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r8d, eax
lea rdi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 6Dh ; 'm'
xor eax, eax
mov r9d, eax
call inline_mysql_file_write_1
loc_B2013:
cmp [rbp+var_34], 0
jnz short loc_B203C
lea rax, myisam_log_file
mov edi, [rax]
mov esi, 2
xor eax, eax
mov ecx, eax
mov r8d, 20h ; ' '
mov rdx, rcx
call my_lock
mov [rbp+var_34], eax
loc_B203C:
lea rdi, THR_LOCK_myisam
call inline_mysql_mutex_unlock_19
mov eax, [rbp+var_38]
mov [rbp+var_64], eax
call _my_thread_var
mov ecx, [rbp+var_64]
mov [rax], ecx
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_B2070
add rsp, 70h
pop rbp
retn
loc_B2070:
call ___stack_chk_fail
| unsigned long long myisam_log_command(long long a1, long long a2, long long a3, unsigned int a4, __int16 a5)
{
__int16 v5; // kr00_2
const char *v6; // rsi
int v8; // [rsp+10h] [rbp-60h]
int v9; // [rsp+38h] [rbp-38h]
int v10; // [rsp+3Ch] [rbp-34h]
_BYTE v14[9]; // [rsp+5Fh] [rbp-11h] BYREF
unsigned long long v15; // [rsp+68h] [rbp-8h]
v15 = __readfsqword(0x28u);
if ( log_type == 1 )
v8 = myisam_pid;
else
v8 = my_thread_dbug_id();
v9 = *(_DWORD *)my_thread_var(a1, (const char *)a2);
v14[0] = a1;
v5 = *(_DWORD *)(a2 + 448);
v14[1] = HIBYTE(v5);
v14[2] = v5;
v14[5] = BYTE1(v8);
v14[6] = v8;
v14[3] = HIBYTE(v8);
v14[4] = BYTE2(v8);
v14[7] = HIBYTE(a5);
v14[8] = a5;
inline_mysql_mutex_lock_18(
(long long)&THR_LOCK_myisam,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",
0x69u);
v10 = my_lock(myisam_log_file, 1LL, 0LL, 0LL, 32LL);
v6 = (_BYTE *)(&qword_68 + 3);
inline_mysql_file_write_1(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",
0x6Bu,
myisam_log_file,
(long long)v14,
9LL,
0LL);
if ( a3 )
{
v6 = (_BYTE *)(&qword_68 + 5);
inline_mysql_file_write_1(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",
0x6Du,
myisam_log_file,
a3,
a4,
0LL);
}
if ( !v10 )
{
v6 = (_BYTE *)(&dword_0 + 2);
my_lock(myisam_log_file, 2LL, 0LL, 0LL, 32LL);
}
inline_mysql_mutex_unlock_19((long long)&THR_LOCK_myisam);
*(_DWORD *)my_thread_var(&THR_LOCK_myisam, v6) = v9;
return __readfsqword(0x28u);
}
| _myisam_log_command:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RBP + -0x2c],ECX
MOV dword ptr [RBP + -0x30],R8D
CMP dword ptr [0x00d7a608],0x1
JNZ 0x001b1efd
MOV RAX,qword ptr [0x00d7a600]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001b1f06
LAB_001b1efd:
CALL 0x001f6690
MOV qword ptr [RBP + -0x60],RAX
LAB_001b1f06:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x1c0]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV byte ptr [RBP + -0xf],AL
MOV EAX,dword ptr [RBP + -0x44]
SHR EAX,0x8
MOV byte ptr [RBP + -0x10],AL
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV byte ptr [RBP + -0xd],AL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV byte ptr [RBP + -0xe],AL
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x54],EAX
MOV EAX,dword ptr [RBP + -0x54]
MOV byte ptr [RBP + -0x9],AL
MOV EAX,dword ptr [RBP + -0x54]
SHR EAX,0x8
MOV byte ptr [RBP + -0xa],AL
LEA RDI,[0xd833c0]
LEA RSI,[0x253b30]
MOV EDX,0x69
CALL 0x001b1c80
LEA RAX,[0x3bf1b0]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x20
MOV RDX,RCX
CALL 0x001f3500
MOV dword ptr [RBP + -0x34],EAX
LEA RAX,[0x3bf1b0]
MOV EDX,dword ptr [RAX]
LEA RCX,[RBP + -0x11]
LEA RDI,[0x253b30]
MOV ESI,0x6b
MOV R8D,0x9
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001b1cf0
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001b2013
LEA RAX,[0x3bf1b0]
MOV EDX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV R8D,EAX
LEA RDI,[0x253b30]
MOV ESI,0x6d
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001b1cf0
LAB_001b2013:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x001b203c
LEA RAX,[0x3bf1b0]
MOV EDI,dword ptr [RAX]
MOV ESI,0x2
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x20
MOV RDX,RCX
CALL 0x001f3500
MOV dword ptr [RBP + -0x34],EAX
LAB_001b203c:
LEA RDI,[0xd833c0]
CALL 0x001b1e60
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x64],EAX
CALL 0x001f6090
MOV ECX,dword ptr [RBP + -0x64]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001b2070
ADD RSP,0x70
POP RBP
RET
LAB_001b2070:
CALL 0x0012a270
|
void _myisam_log_command(int1 param_1,long param_2,long param_3,int4 param_4,
int4 param_5)
{
int4 uVar1;
int iVar2;
int4 *puVar3;
long in_FS_OFFSET;
int4 local_68;
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);
if (log_type == 1) {
local_68 = (int4)myisam_pid;
}
else {
local_68 = my_thread_dbug_id();
}
puVar3 = (int4 *)_my_thread_var();
uVar1 = *puVar3;
local_17 = (int1)*(int4 *)(param_2 + 0x1c0);
local_18 = (int1)((uint)*(int4 *)(param_2 + 0x1c0) >> 8);
local_13 = (int1)local_68;
local_14 = (int1)((uint)local_68 >> 8);
local_15 = (int1)((uint)local_68 >> 0x10);
local_16 = (int1)((uint)local_68 >> 0x18);
local_11 = (int1)param_5;
local_12 = (int1)((uint)param_5 >> 8);
local_19 = param_1;
inline_mysql_mutex_lock
(THR_LOCK_myisam,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x69
);
iVar2 = my_lock(myisam_log_file,1,0,0,0x20);
inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x6b,myisam_log_file
,&local_19,9,0);
if (param_3 != 0) {
inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x6d,
myisam_log_file,param_3,param_4,0);
}
if (iVar2 == 0) {
my_lock(myisam_log_file,2,0,0,0x20);
}
inline_mysql_mutex_unlock(THR_LOCK_myisam);
puVar3 = (int4 *)_my_thread_var();
*puVar3 = uVar1;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
50,818 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O0 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
callq 0x2efd0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x2f512
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x24230
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x2f514
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strndup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_2F512
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_2F512:
jmp short $+2
loc_2F514:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // [rsp+8h] [rbp-28h]
v5 = my_malloc(a1, a3 + 1, a4);
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v5 + a3) = 0;
}
return v5;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012efd0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x0012f512
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00124230
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0012f512:
JMP 0x0012f514
LAB_0012f514:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
void * my_strndup(int4 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
50,819 | 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>::at<char const (&) [11], 0>(char const (&) [11]) | llama.cpp/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xc09d9
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xc09c3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21fb0
testl %eax, %eax
je 0xc09b8
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xc0999
jmp 0xc09bb
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xc0a37
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x21660
movq %rax, %rbx
movq %r14, %rdi
callq 0x2e874
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x650fa(%rip), %rsi # 0x125af5
leaq 0x20(%rsp), %rdi
callq 0x8ffe9
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x2e618
xorl %ebp, %ebp
leaq 0xaaf62(%rip), %rsi # 0x16b988
leaq -0x8f223(%rip), %rdx # 0x3180a
movq %rbx, %rdi
callq 0x21a80
jmp 0xc0ab0
movl $0x20, %edi
callq 0x21660
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x21690
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x3a58a
leaq 0x6509f(%rip), %rsi # 0x125b0b
leaq 0x6509e(%rip), %rcx # 0x125b11
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x90071
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x33644
xorl %ebp, %ebp
leaq 0xaaf4f(%rip), %rsi # 0x16b9f0
leaq -0x8f29e(%rip), %rdx # 0x3180a
movq %rbx, %rdi
callq 0x21a80
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc0ace
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc0b19
movq 0x10(%rsp), %rsi
jmp 0xc0b11
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc0b23
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xc0b23
jmp 0xc0b20
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc0b19
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0xc0b23
jmp 0xc0b2b
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f50
movq %r14, %rdi
callq 0x21b20
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_C09D9
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_C09C3
loc_C0999:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_C09B8
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_C0999
jmp short loc_C09BB
loc_C09B8:
mov rax, rbx
loc_C09BB:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_C09C3:
cmp rax, rbx
jz short loc_C0A37
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_C09D9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_C0AB0
loc_C0A37:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_C0AB0:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C0ACE
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C0ACE:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_C0B19
mov rsi, [rsp+68h+var_58]
jmp short loc_C0B11
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_C0B23
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C0B23
jmp short loc_C0B20
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C0B19
mov rsi, [rsp+68h+var_38]
loc_C0B11:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C0B19:
test bpl, bpl
jnz short loc_C0B23
jmp short loc_C0B2B
loc_C0B20:
mov r14, rax
loc_C0B23:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C0B2B:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
0x130u,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001c09d9
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001c09c3
LAB_001c0999:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00121fb0
TEST EAX,EAX
JZ 0x001c09b8
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001c0999
JMP 0x001c09bb
LAB_001c09b8:
MOV RAX,RBX
LAB_001c09bb:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001c09c3:
CMP RAX,RBX
JZ 0x001c0a37
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001c09d9:
MOV EDI,0x20
CALL 0x00121660
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012e874
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001c09f4:
LEA RSI,[0x225af5]
LEA RDI,[RSP + 0x20]
CALL 0x0018ffe9
MOV BPL,0x1
LAB_001c0a08:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0012e618
XOR EBP,EBP
LEA RSI,[0x26b988]
LEA RDX,[0x13180a]
MOV RDI,RBX
CALL 0x00121a80
LAB_001c0a37:
MOV EDI,0x20
CALL 0x00121660
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00121690
LEA RDX,[RAX + R15*0x1]
LAB_001c0a5a:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0013a58a
LAB_001c0a65:
LEA RSI,[0x225b0b]
LEA RCX,[0x225b11]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00190071
MOV BPL,0x1
LAB_001c0a83:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00133644
XOR EBP,EBP
LEA RSI,[0x26b9f0]
LEA RDX,[0x13180a]
MOV RDI,RBX
CALL 0x00121a80
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001c09f4 to 001c0a04 has its CatchHandler @ 001c0b20 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001c0a08 to 001c0a34 has its CatchHandler @ 001c0afb */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001c0a5a to 001c0a64 has its CatchHandler @ 001c0af9 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001c0a65 to 001c0a7f has its CatchHandler @ 001c0ade */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001c0a83 to 001c0aaf has its CatchHandler @ 001c0ab0 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
50,820 | LefDefParser::lefiLayer::parseAntennaGatePlus(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayer::parseAntennaGatePlus(int index)
{
char *wrkingStr = strdup(values_[index]);
char *value;
double pDiffFactor;
char msg[1024];
value = strtok(wrkingStr, " ");
if (strcmp(value, "ANTENNAGATEPLUSDIFF") != 0) {
/*
sprintf(msg, "ERROR (LEFPARS-1317): Incorrect syntax defined for property LEF57_ANTENNAGATEPLUSDIFF: %s.\nCorrect syntax is \"ANTENNAGATEPLUSDIFF plusDiffFactor\"\n", values_[index]);
lefiError(msg);
*/
sprintf(msg, "Incorrect syntax defined for property LEF57_ANTENNAGATEPLUSDIFF: %s.\nCorrect syntax is \"ANTENNAGATEPLUSDIFF plusDiffFactor\"\n", values_[index]);
lefError(1317, msg);
free(wrkingStr);
return;
}
value = strtok(NULL, " ");
pDiffFactor = atof(value);
setAntennaGatePlusDiff(pDiffFactor);
free(wrkingStr);
return;
} | O0 | cpp | LefDefParser::lefiLayer::parseAntennaGatePlus(int):
subq $0x438, %rsp # imm = 0x438
movq %rdi, 0x430(%rsp)
movl %esi, 0x42c(%rsp)
movq 0x430(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x360(%rax), %rax
movslq 0x42c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2450
movq %rax, 0x420(%rsp)
movq 0x420(%rsp), %rdi
leaq 0x4fa4c(%rip), %rsi # 0x79c7e
callq 0x23b0
movq %rax, 0x418(%rsp)
movq 0x418(%rsp), %rdi
leaq 0x4f330(%rip), %rsi # 0x7957e
callq 0x2340
cmpl $0x0, %eax
je 0x2a2a1
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movq 0x360(%rax), %rax
movslq 0x42c(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x4ee81(%rip), %rsi # 0x790fd
movb $0x0, %al
callq 0x2050
leaq 0x10(%rsp), %rsi
movl $0x525, %edi # imm = 0x525
callq 0x34fa0
movq 0x420(%rsp), %rdi
callq 0x22d0
jmp 0x2a2ef
xorl %eax, %eax
movl %eax, %edi
leaq 0x4f9d2(%rip), %rsi # 0x79c7e
callq 0x23b0
movq %rax, 0x418(%rsp)
movq 0x418(%rsp), %rdi
callq 0x22f0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x410(%rsp)
movsd 0x410(%rsp), %xmm0
callq 0x25fe0
movq 0x420(%rsp), %rdi
callq 0x22d0
addq $0x438, %rsp # imm = 0x438
retq
nopw (%rax,%rax)
| _ZN12LefDefParser9lefiLayer20parseAntennaGatePlusEi:
sub rsp, 438h
mov [rsp+438h+var_8], rdi
mov [rsp+438h+var_C], esi
mov rax, [rsp+438h+var_8]
mov [rsp+438h+var_430], rax
mov rax, [rax+360h]
movsxd rcx, [rsp+438h+var_C]
mov rdi, [rax+rcx*8]
call _strdup
mov [rsp+438h+var_18], rax
mov rdi, [rsp+438h+var_18]
lea rsi, asc_79C7A+4; " "
call _strtok
mov [rsp+438h+var_20], rax
mov rdi, [rsp+438h+var_20]
lea rsi, aLef57Antennaga+6; "ANTENNAGATEPLUSDIFF"
call _strcmp
cmp eax, 0
jz short loc_2A2A1
mov rax, [rsp+438h+var_430]
lea rdi, [rsp+438h+var_428]
mov rax, [rax+360h]
movsxd rcx, [rsp+438h+var_C]
mov rdx, [rax+rcx*8]
lea rsi, aIncorrectSynta_13; "Incorrect syntax defined for property L"...
mov al, 0
call _sprintf
lea rsi, [rsp+438h+var_428]; int
mov edi, offset stru_520.st_other; this
call _ZN12LefDefParser8lefErrorEiPKc; LefDefParser::lefError(int,char const*)
mov rdi, [rsp+438h+var_18]
call _free
jmp short loc_2A2EF
loc_2A2A1:
xor eax, eax
mov edi, eax
lea rsi, asc_79C7A+4; " "
call _strtok
mov [rsp+438h+var_20], rax
mov rdi, [rsp+438h+var_20]
call _atof
mov rdi, [rsp+438h+var_430]; this
movsd [rsp+438h+var_28], xmm0
movsd xmm0, [rsp+438h+var_28]; double
call _ZN12LefDefParser9lefiLayer22setAntennaGatePlusDiffEd; LefDefParser::lefiLayer::setAntennaGatePlusDiff(double)
mov rdi, [rsp+438h+var_18]
call _free
loc_2A2EF:
add rsp, 438h
retn
| long long LefDefParser::lefiLayer::parseAntennaGatePlus(LefDefParser::lefiLayer *this, int a2)
{
const char *v2; // rdx
double v4; // xmm0_8
int v5[256]; // [rsp+10h] [rbp-428h] BYREF
long long v6; // [rsp+418h] [rbp-20h]
long long v7; // [rsp+420h] [rbp-18h]
int v8; // [rsp+42Ch] [rbp-Ch]
LefDefParser::lefiLayer *v9; // [rsp+430h] [rbp-8h]
v9 = this;
v8 = a2;
v7 = strdup(*(_QWORD *)(*((_QWORD *)this + 108) + 8LL * a2));
v6 = strtok(v7, " ");
if ( !(unsigned int)strcmp(v6, "ANTENNAGATEPLUSDIFF") )
{
v6 = strtok(0LL, " ");
v4 = atof(v6);
LefDefParser::lefiLayer::setAntennaGatePlusDiff((LefDefParser::lefiAntennaModel **)this, v4);
return free(v7);
}
else
{
sprintf(
v5,
"Incorrect syntax defined for property LEF57_ANTENNAGATEPLUSDIFF: %s.\n"
"Correct syntax is \"ANTENNAGATEPLUSDIFF plusDiffFactor\"\n",
*(const char **)(*((_QWORD *)this + 108) + 8LL * v8));
LefDefParser::lefError((LefDefParser *)&stru_520.st_other, (int)v5, v2);
return free(v7);
}
}
| parseAntennaGatePlus:
SUB RSP,0x438
MOV qword ptr [RSP + 0x430],RDI
MOV dword ptr [RSP + 0x42c],ESI
MOV RAX,qword ptr [RSP + 0x430]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RAX + 0x360]
MOVSXD RCX,dword ptr [RSP + 0x42c]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x00102450
MOV qword ptr [RSP + 0x420],RAX
MOV RDI,qword ptr [RSP + 0x420]
LEA RSI,[0x179c7e]
CALL 0x001023b0
MOV qword ptr [RSP + 0x418],RAX
MOV RDI,qword ptr [RSP + 0x418]
LEA RSI,[0x17957e]
CALL 0x00102340
CMP EAX,0x0
JZ 0x0012a2a1
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x360]
MOVSXD RCX,dword ptr [RSP + 0x42c]
MOV RDX,qword ptr [RAX + RCX*0x8]
LEA RSI,[0x1790fd]
MOV AL,0x0
CALL 0x00102050
LEA RSI,[RSP + 0x10]
MOV EDI,0x525
CALL 0x00134fa0
MOV RDI,qword ptr [RSP + 0x420]
CALL 0x001022d0
JMP 0x0012a2ef
LAB_0012a2a1:
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x179c7e]
CALL 0x001023b0
MOV qword ptr [RSP + 0x418],RAX
MOV RDI,qword ptr [RSP + 0x418]
CALL 0x001022f0
MOV RDI,qword ptr [RSP + 0x8]
MOVSD qword ptr [RSP + 0x410],XMM0
MOVSD XMM0,qword ptr [RSP + 0x410]
CALL 0x00125fe0
MOV RDI,qword ptr [RSP + 0x420]
CALL 0x001022d0
LAB_0012a2ef:
ADD RSP,0x438
RET
|
/* LefDefParser::lefiLayer::parseAntennaGatePlus(int) */
void __thiscall LefDefParser::lefiLayer::parseAntennaGatePlus(lefiLayer *this,int param_1)
{
int iVar1;
char local_428 [1024];
double local_28;
char *local_20;
char *local_18;
int local_c;
lefiLayer *local_8;
local_c = param_1;
local_8 = this;
local_18 = strdup(*(char **)(*(long *)(this + 0x360) + (long)param_1 * 8));
local_20 = strtok(local_18," ");
iVar1 = strcmp(local_20,"ANTENNAGATEPLUSDIFF");
if (iVar1 == 0) {
local_20 = strtok((char *)0x0," ");
local_28 = atof(local_20);
setAntennaGatePlusDiff(this,local_28);
free(local_18);
}
else {
sprintf(local_428,
"Incorrect syntax defined for property LEF57_ANTENNAGATEPLUSDIFF: %s.\nCorrect syntax is \"ANTENNAGATEPLUSDIFF plusDiffFactor\"\n"
,*(int8 *)(*(long *)(this + 0x360) + (long)local_c * 8));
lefError(0x525,local_428);
free(local_18);
}
return;
}
| |
50,821 | nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()) | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::ErrnoLogMessage(const char* file, int line,
LogSeverity severity, int64 ctr,
void (LogMessage::*send_method)())
: LogMessage(file, line, severity, ctr, send_method) {} | O3 | cpp | nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
movq 0x40(%rsp), %r13
movq 0x48(%rsp), %rbx
movq $0x0, (%rdi)
addq $0x10, %rdi
callq 0x11910
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %r13, %r8
movq %rbx, %r9
callq 0x114c0
movq 0x8(%r12), %rax
movq (%rsp), %rcx
movq %rcx, 0x7580(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE:
push rbp; Alternative name is 'nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)(void))'
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], r8
mov ebp, ecx
mov r14d, edx
mov r15, rsi
mov r12, rdi
mov r13, [rsp+38h+arg_0]
mov rbx, [rsp+38h+arg_8]
mov qword ptr [rdi], 0
add rdi, 10h; this
call __ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void)
mov rdi, r12
mov rsi, r15
mov edx, r14d
mov ecx, ebp
mov r8, r13
mov r9, rbx
call __ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void))
mov rax, [r12+8]
mov rcx, [rsp+38h+var_38]
mov [rax+7580h], rcx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::ErrnoLogMessage::ErrnoLogMessage(
_QWORD *a1,
long long a2,
unsigned int a3,
unsigned int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
long long result; // rax
*a1 = 0LL;
nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2));
nglog::LogMessage::Init(a1, a2, a3, a4, a7, a8);
result = a1[1];
*(_QWORD *)(result + 30080) = a5;
return result;
}
| ErrnoLogMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],R8
MOV EBP,ECX
MOV R14D,EDX
MOV R15,RSI
MOV R12,RDI
MOV R13,qword ptr [RSP + 0x40]
MOV RBX,qword ptr [RSP + 0x48]
MOV qword ptr [RDI],0x0
ADD RDI,0x10
CALL 0x00111910
MOV RDI,R12
MOV RSI,R15
MOV EDX,R14D
MOV ECX,EBP
MOV R8,R13
MOV R9,RBX
CALL 0x001114c0
MOV RAX,qword ptr [R12 + 0x8]
MOV RCX,qword ptr [RSP]
MOV qword ptr [RAX + 0x7580],RCX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void
(nglog::LogMessage::*)()) */
void __thiscall
nglog::ErrnoLogMessage::ErrnoLogMessage
(ErrnoLogMessage *this,int8 param_1,int4 param_2,int4 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8)
{
*(int8 *)this = 0;
LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10));
LogMessage::Init(this,param_1,param_2,param_4,param_7,param_8);
*(int8 *)(*(long *)(this + 8) + 0x7580) = param_5;
return;
}
| |
50,822 | translog_get_sent_to_disk | eloqsql/storage/maria/ma_loghandler.c | static LSN translog_get_sent_to_disk()
{
register LSN lsn;
DBUG_ENTER("translog_get_sent_to_disk");
mysql_mutex_lock(&log_descriptor.sent_to_disk_lock);
lsn= log_descriptor.sent_to_disk;
DBUG_PRINT("info", ("sent to disk up to " LSN_FMT, LSN_IN_PARTS(lsn)));
mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock);
DBUG_RETURN(lsn);
} | O3 | c | translog_get_sent_to_disk:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0xbaf2be(%rip) # 0xbff4c0
jne 0x50239
leaq 0xbaf275(%rip), %rdi # 0xbff480
callq 0x29220
movq 0xbaf249(%rip), %rbx # 0xbff460
movq 0xbaf2a2(%rip), %rdi # 0xbff4c0
testq %rdi, %rdi
jne 0x50240
leaq 0xbaf256(%rip), %rdi # 0xbff480
callq 0x291e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2ceeb
jmp 0x50210
leaq 0x335dc9(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x50223
| translog_get_sent_to_disk:
push rbp
mov rbp, rsp
push rbx
push rax
cmp cs:qword_BFF4C0, 0
jnz short loc_50239
lea rdi, unk_BFF480
call _pthread_mutex_lock
loc_50210:
mov rbx, cs:qword_BFF460
mov rdi, cs:qword_BFF4C0
test rdi, rdi
jnz short loc_50240
loc_50223:
lea rdi, unk_BFF480
call _pthread_mutex_unlock
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
loc_50239:
call translog_get_sent_to_disk_cold_1
jmp short loc_50210
loc_50240:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_50223
| long long translog_get_sent_to_disk(long long a1)
{
long long v1; // rbx
if ( qword_BFF4C0 )
translog_get_sent_to_disk_cold_1(a1);
else
pthread_mutex_lock(&unk_BFF480);
v1 = qword_BFF460;
if ( qword_BFF4C0 )
((void ( *)(long long))PSI_server[44])(qword_BFF4C0);
pthread_mutex_unlock(&unk_BFF480);
return v1;
}
| translog_get_sent_to_disk:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [0x00cff4c0],0x0
JNZ 0x00150239
LEA RDI,[0xcff480]
CALL 0x00129220
LAB_00150210:
MOV RBX,qword ptr [0x00cff460]
MOV RDI,qword ptr [0x00cff4c0]
TEST RDI,RDI
JNZ 0x00150240
LAB_00150223:
LEA RDI,[0xcff480]
CALL 0x001291e0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00150239:
CALL 0x0012ceeb
JMP 0x00150210
LAB_00150240:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00150223
|
int8 translog_get_sent_to_disk(void)
{
int8 uVar1;
if (DAT_00cff4c0 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff480);
}
else {
translog_get_sent_to_disk_cold_1();
}
uVar1 = DAT_00cff460;
if (DAT_00cff4c0 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff480);
return uVar1;
}
| |
50,823 | my_coll_parser_scan_rule | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_rule(MY_COLL_RULE_PARSER *p)
{
if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_RESET) ||
!my_coll_parser_scan_reset_sequence(p))
return 0;
/* Scan the first required shift command */
if (!my_coll_parser_scan_shift(p))
return my_coll_parser_expected_error(p, MY_COLL_LEXEM_SHIFT);
/* Scan the first shift sequence */
if (!my_coll_parser_scan_shift_sequence(p))
return 0;
/* Scan subsequent shift rules */
while (my_coll_parser_scan_shift(p))
{
if (!my_coll_parser_scan_shift_sequence(p))
return 0;
}
return 1;
} | O0 | c | my_coll_parser_scan_rule:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0xad5f0
cmpl $0x0, %eax
je 0xad56d
movq -0x10(%rbp), %rdi
callq 0xad850
cmpl $0x0, %eax
jne 0xad576
movl $0x0, -0x4(%rbp)
jmp 0xad5de
movq -0x10(%rbp), %rdi
callq 0xad900
cmpl $0x0, %eax
jne 0xad597
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xad960
movl %eax, -0x4(%rbp)
jmp 0xad5de
movq -0x10(%rbp), %rdi
callq 0xad9b0
cmpl $0x0, %eax
jne 0xad5ae
movl $0x0, -0x4(%rbp)
jmp 0xad5de
jmp 0xad5b0
movq -0x10(%rbp), %rdi
callq 0xad900
cmpl $0x0, %eax
je 0xad5d7
movq -0x10(%rbp), %rdi
callq 0xad9b0
cmpl $0x0, %eax
jne 0xad5d5
movl $0x0, -0x4(%rbp)
jmp 0xad5de
jmp 0xad5b0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_coll_parser_scan_rule:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
mov esi, 4
call my_coll_parser_scan_term
cmp eax, 0
jz short loc_AD56D
mov rdi, [rbp+var_10]
call my_coll_parser_scan_reset_sequence
cmp eax, 0
jnz short loc_AD576
loc_AD56D:
mov [rbp+var_4], 0
jmp short loc_AD5DE
loc_AD576:
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift
cmp eax, 0
jnz short loc_AD597
mov rdi, [rbp+var_10]
mov esi, 1
call my_coll_parser_expected_error
mov [rbp+var_4], eax
jmp short loc_AD5DE
loc_AD597:
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift_sequence
cmp eax, 0
jnz short loc_AD5AE
mov [rbp+var_4], 0
jmp short loc_AD5DE
loc_AD5AE:
jmp short $+2
loc_AD5B0:
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift
cmp eax, 0
jz short loc_AD5D7
mov rdi, [rbp+var_10]
call my_coll_parser_scan_shift_sequence
cmp eax, 0
jnz short loc_AD5D5
mov [rbp+var_4], 0
jmp short loc_AD5DE
loc_AD5D5:
jmp short loc_AD5B0
loc_AD5D7:
mov [rbp+var_4], 1
loc_AD5DE:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| long long my_coll_parser_scan_rule(long long a1)
{
if ( (unsigned int)my_coll_parser_scan_term(a1, 4LL) && (unsigned int)my_coll_parser_scan_reset_sequence(a1) )
{
if ( (unsigned int)my_coll_parser_scan_shift(a1) )
{
if ( (unsigned int)my_coll_parser_scan_shift_sequence(a1) )
{
while ( (unsigned int)my_coll_parser_scan_shift(a1) )
{
if ( !(unsigned int)my_coll_parser_scan_shift_sequence(a1) )
return 0;
}
return 1;
}
else
{
return 0;
}
}
else
{
return (unsigned int)my_coll_parser_expected_error(a1, 1LL);
}
}
else
{
return 0;
}
}
| my_coll_parser_scan_rule:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x4
CALL 0x001ad5f0
CMP EAX,0x0
JZ 0x001ad56d
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad850
CMP EAX,0x0
JNZ 0x001ad576
LAB_001ad56d:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ad5de
LAB_001ad576:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad900
CMP EAX,0x0
JNZ 0x001ad597
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001ad960
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001ad5de
LAB_001ad597:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad9b0
CMP EAX,0x0
JNZ 0x001ad5ae
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ad5de
LAB_001ad5ae:
JMP 0x001ad5b0
LAB_001ad5b0:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad900
CMP EAX,0x0
JZ 0x001ad5d7
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad9b0
CMP EAX,0x0
JNZ 0x001ad5d5
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ad5de
LAB_001ad5d5:
JMP 0x001ad5b0
LAB_001ad5d7:
MOV dword ptr [RBP + -0x4],0x1
LAB_001ad5de:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_scan_rule(int8 param_1)
{
int iVar1;
int4 local_c;
iVar1 = my_coll_parser_scan_term(param_1,4);
if ((iVar1 == 0) || (iVar1 = my_coll_parser_scan_reset_sequence(param_1), iVar1 == 0)) {
local_c = 0;
}
else {
iVar1 = my_coll_parser_scan_shift(param_1);
if (iVar1 == 0) {
local_c = my_coll_parser_expected_error(param_1,1);
}
else {
iVar1 = my_coll_parser_scan_shift_sequence(param_1);
if (iVar1 == 0) {
local_c = 0;
}
else {
do {
iVar1 = my_coll_parser_scan_shift(param_1);
if (iVar1 == 0) {
return 1;
}
iVar1 = my_coll_parser_scan_shift_sequence(param_1);
} while (iVar1 != 0);
local_c = 0;
}
}
}
return local_c;
}
| |
50,824 | ma_check_bitmap_data | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_check_bitmap_data(MARIA_HA *info, enum en_page_type page_type,
uint empty_space, uint bitmap_pattern)
{
uint bits;
switch (page_type) {
case UNALLOCATED_PAGE:
case MAX_PAGE_TYPE:
bits= 0;
break;
case HEAD_PAGE:
bits= _ma_free_size_to_head_pattern(&info->s->bitmap, empty_space);
break;
case TAIL_PAGE:
bits= free_size_to_tail_pattern(&info->s->bitmap, empty_space);
break;
case BLOB_PAGE:
bits= FULL_TAIL_PAGE;
break;
default:
bits= 0; /* to satisfy compiler */
DBUG_ASSERT(0);
}
return (bitmap_pattern != bits);
} | O3 | c | ma_check_bitmap_data:
pushq %rbp
movq %rsp, %rbp
cmpl $0x3, %esi
je 0x419ea
xorl %eax, %eax
cmpl $0x2, %esi
je 0x419c5
cmpl $0x1, %esi
jne 0x419ef
movq (%rdi), %rsi
movl $0x4, %eax
cmpl %edx, 0xb24(%rsi)
ja 0x419ef
movl $0x3, %eax
cmpl %edx, 0xb20(%rsi)
ja 0x419ef
movl $0x2, %eax
cmpl %edx, 0xb1c(%rsi)
ja 0x419ef
xorl %eax, %eax
cmpl %edx, 0xb18(%rsi)
seta %al
jmp 0x419ef
movq (%rdi), %rsi
cmpl %edx, 0xb18(%rsi)
jbe 0x419ef
movl $0x7, %eax
cmpl %edx, 0xb30(%rsi)
ja 0x419ef
xorl %eax, %eax
cmpl 0xb2c(%rsi), %edx
adcl $0x5, %eax
jmp 0x419ef
movl $0x7, %eax
cmpl %ecx, %eax
setne %al
popq %rbp
retq
| _ma_check_bitmap_data:
push rbp
mov rbp, rsp
cmp esi, 3
jz short loc_419EA
xor eax, eax
cmp esi, 2
jz short loc_419C5
cmp esi, 1
jnz short loc_419EF
mov rsi, [rdi]
mov eax, 4
cmp [rsi+0B24h], edx
ja short loc_419EF
mov eax, 3
cmp [rsi+0B20h], edx
ja short loc_419EF
mov eax, 2
cmp [rsi+0B1Ch], edx
ja short loc_419EF
xor eax, eax
cmp [rsi+0B18h], edx
setnbe al
jmp short loc_419EF
loc_419C5:
mov rsi, [rdi]
cmp [rsi+0B18h], edx
jbe short loc_419EF
mov eax, 7
cmp [rsi+0B30h], edx
ja short loc_419EF
xor eax, eax
cmp edx, [rsi+0B2Ch]
adc eax, 5
jmp short loc_419EF
loc_419EA:
mov eax, 7
loc_419EF:
cmp eax, ecx
setnz al
pop rbp
retn
| bool ma_check_bitmap_data(long long *a1, int a2, unsigned int a3, int a4)
{
int v4; // eax
_DWORD *v5; // rsi
long long v6; // rsi
if ( a2 == 3 )
{
v4 = 7;
}
else
{
v4 = 0;
if ( a2 == 2 )
{
v6 = *a1;
if ( *(_DWORD *)(*a1 + 2840) > a3 )
{
v4 = 7;
if ( *(_DWORD *)(v6 + 2864) <= a3 )
v4 = (a3 < *(_DWORD *)(v6 + 2860)) + 5;
}
}
else if ( a2 == 1 )
{
v5 = (_DWORD *)*a1;
v4 = 4;
if ( *(_DWORD *)(*a1 + 2852) <= a3 )
{
v4 = 3;
if ( v5[712] <= a3 )
{
v4 = 2;
if ( v5[711] <= a3 )
v4 = v5[710] > a3;
}
}
}
}
return v4 != a4;
}
| _ma_check_bitmap_data:
PUSH RBP
MOV RBP,RSP
CMP ESI,0x3
JZ 0x001419ea
XOR EAX,EAX
CMP ESI,0x2
JZ 0x001419c5
CMP ESI,0x1
JNZ 0x001419ef
MOV RSI,qword ptr [RDI]
MOV EAX,0x4
CMP dword ptr [RSI + 0xb24],EDX
JA 0x001419ef
MOV EAX,0x3
CMP dword ptr [RSI + 0xb20],EDX
JA 0x001419ef
MOV EAX,0x2
CMP dword ptr [RSI + 0xb1c],EDX
JA 0x001419ef
XOR EAX,EAX
CMP dword ptr [RSI + 0xb18],EDX
SETA AL
JMP 0x001419ef
LAB_001419c5:
MOV RSI,qword ptr [RDI]
CMP dword ptr [RSI + 0xb18],EDX
JBE 0x001419ef
MOV EAX,0x7
CMP dword ptr [RSI + 0xb30],EDX
JA 0x001419ef
XOR EAX,EAX
CMP EDX,dword ptr [RSI + 0xb2c]
ADC EAX,0x5
JMP 0x001419ef
LAB_001419ea:
MOV EAX,0x7
LAB_001419ef:
CMP EAX,ECX
SETNZ AL
POP RBP
RET
|
bool _ma_check_bitmap_data(long *param_1,int param_2,uint param_3,uint param_4)
{
long lVar1;
uint uVar2;
if (param_2 == 3) {
uVar2 = 7;
}
else {
uVar2 = 0;
if (param_2 == 2) {
lVar1 = *param_1;
if ((param_3 < *(uint *)(lVar1 + 0xb18)) && (uVar2 = 7, *(uint *)(lVar1 + 0xb30) <= param_3))
{
uVar2 = (param_3 < *(uint *)(lVar1 + 0xb2c)) + 5;
}
}
else if (param_2 == 1) {
lVar1 = *param_1;
uVar2 = 4;
if (((*(uint *)(lVar1 + 0xb24) <= param_3) && (uVar2 = 3, *(uint *)(lVar1 + 0xb20) <= param_3)
) && (uVar2 = 2, *(uint *)(lVar1 + 0xb1c) <= param_3)) {
uVar2 = (uint)(param_3 < *(uint *)(lVar1 + 0xb18));
}
}
}
return uVar2 != param_4;
}
| |
50,825 | reinit_io_cache | eloqsql/mysys/mf_iocache.c | my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
my_off_t seek_offset,
my_bool use_async_io __attribute__((unused)),
my_bool clear_cache)
{
DBUG_ENTER("reinit_io_cache");
DBUG_PRINT("enter",("cache:%p type: %d seek_offset: %llu clear_cache: %d",
info, type, (ulonglong) seek_offset,
(int) clear_cache));
DBUG_ASSERT(type == READ_CACHE || type == WRITE_CACHE);
DBUG_ASSERT(info->type == READ_CACHE || info->type == WRITE_CACHE);
/* If the whole file is in memory, avoid flushing to disk */
if (! clear_cache &&
seek_offset >= info->pos_in_file &&
seek_offset <= my_b_tell(info))
{
/* Reuse current buffer without flushing it to disk */
uchar *pos;
if (info->type == WRITE_CACHE && type == READ_CACHE)
{
info->read_end=info->write_pos;
info->end_of_file=my_b_tell(info);
/*
Trigger a new seek only if we have a valid
file handle.
*/
info->seek_not_done= (info->file != -1);
}
else if (type == WRITE_CACHE)
{
if (info->type == READ_CACHE)
{
info->write_end=info->write_buffer+info->buffer_length;
info->seek_not_done=1;
}
info->end_of_file = ~(my_off_t) 0;
}
pos=info->request_pos+(seek_offset-info->pos_in_file);
if (type == WRITE_CACHE)
info->write_pos=pos;
else
info->read_pos= pos;
}
else
{
/*
If we change from WRITE_CACHE to READ_CACHE, assume that everything
after the current positions should be ignored. In other cases we
update end_of_file as it may have changed since last init.
*/
if (type == READ_CACHE)
{
if (info->type == WRITE_CACHE)
info->end_of_file= my_b_tell(info);
else
{
if (!(info->myflags & MY_ENCRYPT))
info->end_of_file= mysql_file_seek(info->file, 0L,
MY_SEEK_END, MYF(0));
}
}
/* flush cache if we want to reuse it */
if (!clear_cache && my_b_flush_io_cache(info,1))
DBUG_RETURN(1);
info->pos_in_file=seek_offset;
/* Better to do always do a seek */
info->seek_not_done=1;
info->request_pos=info->read_pos=info->write_pos=info->buffer;
if (type == READ_CACHE)
{
info->read_end=info->buffer; /* Nothing in cache */
}
else
{
if (info->myflags & MY_ENCRYPT)
{
info->write_end = info->write_buffer + info->buffer_length;
if (seek_offset && info->file != -1)
{
info->read_end= info->buffer;
_my_b_encr_read(info, 0, 0); /* prefill the buffer */
info->write_pos= info->read_pos;
info->seek_not_done=1;
}
}
else
{
info->write_end=(info->buffer + info->buffer_length -
(seek_offset & (IO_SIZE-1)));
}
info->end_of_file= ~(my_off_t) 0;
}
}
info->type=type;
info->error=0;
init_functions(info);
DBUG_RETURN(0);
} | O3 | c | reinit_io_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %r12d
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
testb %r12b, %r12b
jne 0x95770
movq (%rbx), %rdx
movq %r15, %rax
subq %rdx, %rax
jb 0x95770
movl 0xb0(%rbx), %esi
leaq 0x10(%rbx), %rdi
leaq 0x40(%rbx), %r8
cmpl $0x2, %esi
movq 0x28(%rbx), %rcx
cmoveq %r8, %rdi
subq %rcx, %rdx
movq (%rdi), %rdi
addq %rdx, %rdi
cmpq %r15, %rdi
jae 0x958b3
cmpl $0x1, %r14d
jne 0x957d6
cmpl $0x2, 0xb0(%rbx)
jne 0x9578c
movq (%rbx), %rax
subq 0x28(%rbx), %rax
addq 0x40(%rbx), %rax
jmp 0x957d2
testb $0x40, 0xf8(%rbx)
jne 0x957d6
movl 0xd4(%rbx), %r13d
leaq 0x350325(%rip), %rax # 0x3e5ac8
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %r13d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x9592b
movl %r13d, %edi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x9d604
movq %rax, 0x8(%rbx)
testb %r12b, %r12b
je 0x95827
movq %r15, (%rbx)
movl $0x1, 0xe0(%rbx)
movq 0x20(%rbx), %rax
movq %rax, 0x40(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, 0x28(%rbx)
cmpl $0x1, %r14d
jne 0x95807
movq %rax, 0x18(%rbx)
jmp 0x95889
testb $0x40, 0xf8(%rbx)
jne 0x9583e
addq 0xe8(%rbx), %rax
andl $0xfff, %r15d # imm = 0xFFF
subq %r15, %rax
movq %rax, 0x48(%rbx)
jmp 0x95881
movq %rbx, %rdi
movl $0x1, %esi
callq 0x95949
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x958a4
jmp 0x957db
movq 0x30(%rbx), %rcx
addq 0xe8(%rbx), %rcx
movq %rcx, 0x48(%rbx)
testq %r15, %r15
je 0x95881
cmpl $-0x1, 0xd4(%rbx)
je 0x95881
movq %rax, 0x18(%rbx)
leaq 0x3d2e42(%rip), %rax # 0x4686a8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *(%rax)
movq 0x10(%rbx), %rax
movq %rax, 0x40(%rbx)
movl $0x1, 0xe0(%rbx)
movq $-0x1, 0x8(%rbx)
movl %r14d, 0xb0(%rbx)
movl $0x0, 0xe4(%rbx)
movq %rbx, %rdi
callq 0x954ff
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %edi
xorl $0x2, %edi
movl %r14d, %r8d
xorl $0x1, %r8d
orl %edi, %r8d
jne 0x958e7
movq 0x40(%rbx), %rsi
movq %rsi, 0x18(%rbx)
addq %rsi, %rdx
movq %rdx, 0x8(%rbx)
xorl %edx, %edx
cmpl $-0x1, 0xd4(%rbx)
setne %dl
movl %edx, 0xe0(%rbx)
jmp 0x9591f
cmpl $0x2, %r14d
jne 0x9591f
cmpl $0x1, %esi
jne 0x9590b
movq 0x30(%rbx), %rdx
addq 0xe8(%rbx), %rdx
movq %rdx, 0x48(%rbx)
movl $0x1, 0xe0(%rbx)
movq $-0x1, 0x8(%rbx)
addq %rax, %rcx
movq %rcx, 0x40(%rbx)
jmp 0x95889
addq %rax, %rcx
movq %rcx, 0x10(%rbx)
jmp 0x95889
leaq -0x30(%rbp), %rcx
movq %rax, %rdi
movl %r13d, %esi
movq %rcx, %r13
movq %rcx, %rdx
callq 0x60e89
movq (%r13), %rax
jmp 0x957d2
| reinit_io_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r12d, r8d
mov r15, rdx
mov r14d, esi
mov rbx, rdi
test r12b, r12b
jnz short loc_95770
mov rdx, [rbx]
mov rax, r15
sub rax, rdx
jb short loc_95770
mov esi, [rbx+0B0h]
lea rdi, [rbx+10h]
lea r8, [rbx+40h]
cmp esi, 2
mov rcx, [rbx+28h]
cmovz rdi, r8
sub rdx, rcx
mov rdi, [rdi]
add rdi, rdx
cmp rdi, r15
jnb loc_958B3
loc_95770:
cmp r14d, 1
jnz short loc_957D6
cmp dword ptr [rbx+0B0h], 2
jnz short loc_9578C
mov rax, [rbx]
sub rax, [rbx+28h]
add rax, [rbx+40h]
jmp short loc_957D2
loc_9578C:
test byte ptr [rbx+0F8h], 40h
jnz short loc_957D6
mov r13d, [rbx+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, r13d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_9592B
mov edi, r13d
xor esi, esi
mov edx, 2
xor ecx, ecx
call my_seek
loc_957D2:
mov [rbx+8], rax
loc_957D6:
test r12b, r12b
jz short loc_95827
loc_957DB:
mov [rbx], r15
mov dword ptr [rbx+0E0h], 1
mov rax, [rbx+20h]
mov [rbx+40h], rax
mov [rbx+10h], rax
mov [rbx+28h], rax
cmp r14d, 1
jnz short loc_95807
mov [rbx+18h], rax
jmp loc_95889
loc_95807:
test byte ptr [rbx+0F8h], 40h
jnz short loc_9583E
add rax, [rbx+0E8h]
and r15d, 0FFFh
sub rax, r15
mov [rbx+48h], rax
jmp short loc_95881
loc_95827:
mov rdi, rbx
mov esi, 1
call my_b_flush_io_cache
mov ecx, eax
mov al, 1
test ecx, ecx
jnz short loc_958A4
jmp short loc_957DB
loc_9583E:
mov rcx, [rbx+30h]
add rcx, [rbx+0E8h]
mov [rbx+48h], rcx
test r15, r15
jz short loc_95881
cmp dword ptr [rbx+0D4h], 0FFFFFFFFh
jz short loc_95881
mov [rbx+18h], rax
lea rax, _my_b_encr_read
mov rdi, rbx
xor esi, esi
xor edx, edx
call qword ptr [rax]
mov rax, [rbx+10h]
mov [rbx+40h], rax
mov dword ptr [rbx+0E0h], 1
loc_95881:
mov qword ptr [rbx+8], 0FFFFFFFFFFFFFFFFh
loc_95889:
mov [rbx+0B0h], r14d
mov dword ptr [rbx+0E4h], 0
mov rdi, rbx
call init_functions
xor eax, eax
loc_958A4:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_958B3:
mov edi, esi
xor edi, 2
mov r8d, r14d
xor r8d, 1
or r8d, edi
jnz short loc_958E7
mov rsi, [rbx+40h]
mov [rbx+18h], rsi
add rdx, rsi
mov [rbx+8], rdx
xor edx, edx
cmp dword ptr [rbx+0D4h], 0FFFFFFFFh
setnz dl
mov [rbx+0E0h], edx
jmp short loc_9591F
loc_958E7:
cmp r14d, 2
jnz short loc_9591F
cmp esi, 1
jnz short loc_9590B
mov rdx, [rbx+30h]
add rdx, [rbx+0E8h]
mov [rbx+48h], rdx
mov dword ptr [rbx+0E0h], 1
loc_9590B:
mov qword ptr [rbx+8], 0FFFFFFFFFFFFFFFFh
add rcx, rax
mov [rbx+40h], rcx
jmp loc_95889
loc_9591F:
add rcx, rax
mov [rbx+10h], rcx
jmp loc_95889
loc_9592B:
lea rcx, [rbp+var_30]
mov rdi, rax
mov esi, r13d
mov r13, rcx
mov rdx, rcx
call reinit_io_cache_cold_1
mov rax, [r13+0]
jmp loc_957D2
| char reinit_io_cache(long long a1, int a2, unsigned long long a3, long long a4, char a5)
{
long long v9; // rdx
unsigned long long v10; // rax
int v11; // esi
_QWORD *v12; // rdi
long long v13; // rcx
long long v14; // rdx
long long v15; // rax
unsigned int v16; // r13d
long long v17; // rax
long long v18; // rax
int v19; // ecx
char result; // al
long long v21; // rsi
_BYTE v22[72]; // [rsp+8h] [rbp-78h] BYREF
long long v23[6]; // [rsp+50h] [rbp-30h] BYREF
if ( !a5 )
{
v9 = *(_QWORD *)a1;
v10 = a3 - *(_QWORD *)a1;
if ( a3 >= *(_QWORD *)a1 )
{
v11 = *(_DWORD *)(a1 + 176);
v12 = (_QWORD *)(a1 + 16);
v13 = *(_QWORD *)(a1 + 40);
if ( v11 == 2 )
v12 = (_QWORD *)(a1 + 64);
v14 = v9 - v13;
if ( v14 + *v12 >= a3 )
{
if ( v11 ^ 2 | a2 ^ 1 )
{
if ( a2 == 2 )
{
if ( v11 == 1 )
{
*(_QWORD *)(a1 + 72) = *(_QWORD *)(a1 + 232) + *(_QWORD *)(a1 + 48);
*(_DWORD *)(a1 + 224) = 1;
}
*(_QWORD *)(a1 + 8) = -1LL;
*(_QWORD *)(a1 + 64) = v10 + v13;
goto LABEL_24;
}
}
else
{
v21 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 24) = v21;
*(_QWORD *)(a1 + 8) = v21 + v14;
*(_DWORD *)(a1 + 224) = *(_DWORD *)(a1 + 212) != -1;
}
*(_QWORD *)(a1 + 16) = v10 + v13;
LABEL_24:
*(_DWORD *)(a1 + 176) = a2;
*(_DWORD *)(a1 + 228) = 0;
init_functions(a1);
return 0;
}
}
}
if ( a2 == 1 )
{
if ( *(_DWORD *)(a1 + 176) == 2 )
{
v15 = *(_QWORD *)(a1 + 64) + *(_QWORD *)a1 - *(_QWORD *)(a1 + 40);
LABEL_12:
*(_QWORD *)(a1 + 8) = v15;
goto LABEL_13;
}
if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 )
{
v16 = *(_DWORD *)(a1 + 212);
v17 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v22, v16, 8LL);
if ( v17 )
{
reinit_io_cache_cold_1(v17, v16, v23);
v15 = v23[0];
}
else
{
v15 = my_seek(v16, 0LL, 2LL, 0LL);
}
goto LABEL_12;
}
}
LABEL_13:
if ( a5 || (v19 = my_b_flush_io_cache(a1, 1LL), result = 1, !v19) )
{
*(_QWORD *)a1 = a3;
*(_DWORD *)(a1 + 224) = 1;
v18 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 64) = v18;
*(_QWORD *)(a1 + 16) = v18;
*(_QWORD *)(a1 + 40) = v18;
if ( a2 == 1 )
{
*(_QWORD *)(a1 + 24) = v18;
}
else
{
if ( (*(_BYTE *)(a1 + 248) & 0x40) != 0 )
{
*(_QWORD *)(a1 + 72) = *(_QWORD *)(a1 + 232) + *(_QWORD *)(a1 + 48);
if ( a3 )
{
if ( *(_DWORD *)(a1 + 212) != -1 )
{
*(_QWORD *)(a1 + 24) = v18;
my_b_encr_read(a1, 0LL, 0LL);
*(_QWORD *)(a1 + 64) = *(_QWORD *)(a1 + 16);
*(_DWORD *)(a1 + 224) = 1;
}
}
}
else
{
*(_QWORD *)(a1 + 72) = *(_QWORD *)(a1 + 232) + v18 - (a3 & 0xFFF);
}
*(_QWORD *)(a1 + 8) = -1LL;
}
goto LABEL_24;
}
return result;
}
| reinit_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12D,R8D
MOV R15,RDX
MOV R14D,ESI
MOV RBX,RDI
TEST R12B,R12B
JNZ 0x00195770
MOV RDX,qword ptr [RBX]
MOV RAX,R15
SUB RAX,RDX
JC 0x00195770
MOV ESI,dword ptr [RBX + 0xb0]
LEA RDI,[RBX + 0x10]
LEA R8,[RBX + 0x40]
CMP ESI,0x2
MOV RCX,qword ptr [RBX + 0x28]
CMOVZ RDI,R8
SUB RDX,RCX
MOV RDI,qword ptr [RDI]
ADD RDI,RDX
CMP RDI,R15
JNC 0x001958b3
LAB_00195770:
CMP R14D,0x1
JNZ 0x001957d6
CMP dword ptr [RBX + 0xb0],0x2
JNZ 0x0019578c
MOV RAX,qword ptr [RBX]
SUB RAX,qword ptr [RBX + 0x28]
ADD RAX,qword ptr [RBX + 0x40]
JMP 0x001957d2
LAB_0019578c:
TEST byte ptr [RBX + 0xf8],0x40
JNZ 0x001957d6
MOV R13D,dword ptr [RBX + 0xd4]
LEA RAX,[0x4e5ac8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,R13D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0019592b
MOV EDI,R13D
XOR ESI,ESI
MOV EDX,0x2
XOR ECX,ECX
CALL 0x0019d604
LAB_001957d2:
MOV qword ptr [RBX + 0x8],RAX
LAB_001957d6:
TEST R12B,R12B
JZ 0x00195827
LAB_001957db:
MOV qword ptr [RBX],R15
MOV dword ptr [RBX + 0xe0],0x1
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x40],RAX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x28],RAX
CMP R14D,0x1
JNZ 0x00195807
MOV qword ptr [RBX + 0x18],RAX
JMP 0x00195889
LAB_00195807:
TEST byte ptr [RBX + 0xf8],0x40
JNZ 0x0019583e
ADD RAX,qword ptr [RBX + 0xe8]
AND R15D,0xfff
SUB RAX,R15
MOV qword ptr [RBX + 0x48],RAX
JMP 0x00195881
LAB_00195827:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00195949
MOV ECX,EAX
MOV AL,0x1
TEST ECX,ECX
JNZ 0x001958a4
JMP 0x001957db
LAB_0019583e:
MOV RCX,qword ptr [RBX + 0x30]
ADD RCX,qword ptr [RBX + 0xe8]
MOV qword ptr [RBX + 0x48],RCX
TEST R15,R15
JZ 0x00195881
CMP dword ptr [RBX + 0xd4],-0x1
JZ 0x00195881
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x5686a8]
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0xe0],0x1
LAB_00195881:
MOV qword ptr [RBX + 0x8],-0x1
LAB_00195889:
MOV dword ptr [RBX + 0xb0],R14D
MOV dword ptr [RBX + 0xe4],0x0
MOV RDI,RBX
CALL 0x001954ff
XOR EAX,EAX
LAB_001958a4:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001958b3:
MOV EDI,ESI
XOR EDI,0x2
MOV R8D,R14D
XOR R8D,0x1
OR R8D,EDI
JNZ 0x001958e7
MOV RSI,qword ptr [RBX + 0x40]
MOV qword ptr [RBX + 0x18],RSI
ADD RDX,RSI
MOV qword ptr [RBX + 0x8],RDX
XOR EDX,EDX
CMP dword ptr [RBX + 0xd4],-0x1
SETNZ DL
MOV dword ptr [RBX + 0xe0],EDX
JMP 0x0019591f
LAB_001958e7:
CMP R14D,0x2
JNZ 0x0019591f
CMP ESI,0x1
JNZ 0x0019590b
MOV RDX,qword ptr [RBX + 0x30]
ADD RDX,qword ptr [RBX + 0xe8]
MOV qword ptr [RBX + 0x48],RDX
MOV dword ptr [RBX + 0xe0],0x1
LAB_0019590b:
MOV qword ptr [RBX + 0x8],-0x1
ADD RCX,RAX
MOV qword ptr [RBX + 0x40],RCX
JMP 0x00195889
LAB_0019591f:
ADD RCX,RAX
MOV qword ptr [RBX + 0x10],RCX
JMP 0x00195889
LAB_0019592b:
LEA RCX,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,R13D
MOV R13,RCX
MOV RDX,RCX
CALL 0x00160e89
MOV RAX,qword ptr [R13]
JMP 0x001957d2
|
int8 reinit_io_cache(ulong *param_1,int param_2,ulong param_3,int8 param_4,char param_5)
{
int4 uVar1;
ulong uVar2;
ulong uVar3;
int iVar4;
long lVar5;
ulong *puVar6;
int1 local_80 [72];
ulong local_38;
if (param_5 == '\0') {
uVar2 = *param_1;
if (uVar2 <= param_3) {
iVar4 = (int)param_1[0x16];
uVar3 = param_1[5];
puVar6 = param_1 + 2;
if (iVar4 == 2) {
puVar6 = param_1 + 8;
}
if (param_3 <= *puVar6 + (uVar2 - uVar3)) {
if (param_2 == 1 && iVar4 == 2) {
param_1[3] = param_1[8];
param_1[1] = (uVar2 - uVar3) + param_1[8];
*(uint *)(param_1 + 0x1c) = (uint)(*(int *)((long)param_1 + 0xd4) != -1);
}
else if (param_2 == 2) {
if (iVar4 == 1) {
param_1[9] = param_1[6] + param_1[0x1d];
*(int4 *)(param_1 + 0x1c) = 1;
}
param_1[1] = 0xffffffffffffffff;
param_1[8] = uVar3 + (param_3 - uVar2);
goto LAB_00195889;
}
param_1[2] = uVar3 + (param_3 - uVar2);
goto LAB_00195889;
}
}
}
if (param_2 == 1) {
if ((int)param_1[0x16] == 2) {
local_38 = (*param_1 - param_1[5]) + param_1[8];
}
else {
if ((param_1[0x1f] & 0x40) != 0) goto LAB_001957d6;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
lVar5 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,8);
if (lVar5 == 0) {
local_38 = my_seek(uVar1,0,2,0);
}
else {
reinit_io_cache_cold_1(lVar5,uVar1,&local_38);
}
}
param_1[1] = local_38;
}
LAB_001957d6:
if ((param_5 == '\0') && (iVar4 = my_b_flush_io_cache(param_1,1), iVar4 != 0)) {
return 1;
}
*param_1 = param_3;
*(int4 *)(param_1 + 0x1c) = 1;
uVar2 = param_1[4];
param_1[8] = uVar2;
param_1[2] = uVar2;
param_1[5] = uVar2;
if (param_2 == 1) {
param_1[3] = uVar2;
}
else {
if ((param_1[0x1f] & 0x40) == 0) {
param_1[9] = (uVar2 + param_1[0x1d]) - (ulong)((uint)param_3 & 0xfff);
}
else {
param_1[9] = param_1[6] + param_1[0x1d];
if ((param_3 != 0) && (*(int *)((long)param_1 + 0xd4) != -1)) {
param_1[3] = uVar2;
(*_my_b_encr_read)(param_1,0,0);
param_1[8] = param_1[2];
*(int4 *)(param_1 + 0x1c) = 1;
}
}
param_1[1] = 0xffffffffffffffff;
}
LAB_00195889:
*(int *)(param_1 + 0x16) = param_2;
*(int4 *)((long)param_1 + 0xe4) = 0;
init_functions(param_1);
return 0;
}
| |
50,826 | BAIL_OUT | eloqsql/libmariadb/unittest/mytap/tap.c | void
BAIL_OUT(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "Bail out! ");
vfprintf(tapout, fmt, ap);
emit_endl();
va_end(ap);
exit(255);
} | O0 | c | BAIL_OUT:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x1d295
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x4ace1(%rip), %rax # 0x67fc8
movq (%rax), %rdi
leaq 0x38842(%rip), %rsi # 0x55b33
movb $0x0, %al
callq 0x13640
movq 0x4acc9(%rip), %rax # 0x67fc8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x135c0
callq 0x1da50
leaq -0x20(%rbp), %rax
movl $0xff, %edi
callq 0x13530
nopw %cs:(%rax,%rax)
| BAIL_OUT:
push rbp
mov rbp, rsp
sub rsp, 0D0h
test al, al
jz short loc_1D295
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_1D295:
mov [rbp+var_A8], r9
mov [rbp+var_B0], r8
mov [rbp+var_B8], rcx
mov [rbp+var_C0], rdx
mov [rbp+var_C8], rsi
mov [rbp+var_8], rdi
lea rax, [rbp+var_20]
lea rcx, [rbp+var_D0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, aBailOut; "Bail out! "
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_20]
call _vfprintf
call emit_endl
lea rax, [rbp+var_20]
mov edi, 0FFh
call _exit
| void __noreturn BAIL_OUT(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v15; // [rsp+0h] [rbp-D0h] BYREF
long long v16; // [rsp+8h] [rbp-C8h]
long long v17; // [rsp+10h] [rbp-C0h]
long long v18; // [rsp+18h] [rbp-B8h]
long long v19; // [rsp+20h] [rbp-B0h]
long long v20; // [rsp+28h] [rbp-A8h]
__m128 v21; // [rsp+30h] [rbp-A0h]
__m128 v22; // [rsp+40h] [rbp-90h]
__m128 v23; // [rsp+50h] [rbp-80h]
__m128 v24; // [rsp+60h] [rbp-70h]
__m128 v25; // [rsp+70h] [rbp-60h]
__m128 v26; // [rsp+80h] [rbp-50h]
__m128 v27; // [rsp+90h] [rbp-40h]
__m128 v28; // [rsp+A0h] [rbp-30h]
_DWORD v29[2]; // [rsp+B0h] [rbp-20h] BYREF
char *v30; // [rsp+B8h] [rbp-18h]
char *v31; // [rsp+C0h] [rbp-10h]
long long v32; // [rsp+C8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v16 = a2;
v32 = a1;
v31 = &v15;
v30 = &a15;
v29[1] = 48;
v29[0] = 8;
fprintf(stdout, "Bail out! ");
vfprintf(stdout, v32, v29);
emit_endl();
exit(255LL);
}
| BAIL_OUT:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
TEST AL,AL
JZ 0x0011d295
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_0011d295:
MOV qword ptr [RBP + -0xa8],R9
MOV qword ptr [RBP + -0xb0],R8
MOV qword ptr [RBP + -0xb8],RCX
MOV qword ptr [RBP + -0xc0],RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[RBP + -0x20]
LEA RCX,[RBP + -0xd0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV RAX,qword ptr [0x00167fc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x155b33]
MOV AL,0x0
CALL 0x00113640
MOV RAX,qword ptr [0x00167fc8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x20]
CALL 0x001135c0
CALL 0x0011da50
LEA RAX,[RBP + -0x20]
MOV EDI,0xff
CALL 0x00113530
|
void BAIL_OUT(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
char *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [8];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int4 local_28;
int4 local_24;
int1 *local_20;
int1 *local_18;
char *local_10;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_18 = local_d8;
local_20 = &stack0x00000008;
local_24 = 0x30;
local_28 = 8;
local_d0 = param_10;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
local_10 = param_9;
fprintf(*(FILE **)PTR_stdout_00167fc8,"Bail out! ");
vfprintf(*(FILE **)PTR_stdout_00167fc8,local_10,&local_28);
emit_endl();
/* WARNING: Subroutine does not return */
exit(0xff);
}
| |
50,827 | ma_tls_verify_server_cert | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_verify_server_cert(MARIADB_TLS *ctls)
{
X509 *cert;
MYSQL *mysql;
SSL *ssl;
MARIADB_PVIO *pvio;
#if !defined(HAVE_OPENSSL_CHECK_HOST)
X509_NAME *x509sn;
int cn_pos;
X509_NAME_ENTRY *cn_entry;
ASN1_STRING *cn_asn1;
const char *cn_str;
#endif
if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
mysql= (MYSQL *)SSL_get_app_data(ssl);
pvio= mysql->net.pvio;
if (!mysql->host)
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname");
return 1;
}
if (!(cert= SSL_get_peer_certificate(ssl)))
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate");
return 1;
}
#ifdef HAVE_OPENSSL_CHECK_HOST
if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1
&& X509_check_ip_asc(cert, mysql->host, 0) != 1)
goto error;
#else
x509sn= X509_get_subject_name(cert);
if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0)
goto error;
if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos)))
goto error;
if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry)))
goto error;
cn_str = (char *)ASN1_STRING_data(cn_asn1);
/* Make sure there is no embedded \0 in the CN */
if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str))
goto error;
if (strcmp(cn_str, mysql->host))
goto error;
#endif
X509_free(cert);
return 0;
error:
X509_free(cert);
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed");
return 1;
} | O3 | c | ma_tls_verify_server_cert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x1, %r14d
testq %rdi, %rdi
je 0x28a5c
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x28a5c
movq %r15, %rdi
xorl %esi, %esi
callq 0x13160
movq %rax, %rbx
movq (%rax), %r12
cmpq $0x0, 0x2b0(%rax)
je 0x289de
movq %r15, %rdi
callq 0x137e0
testq %rax, %rax
je 0x289ff
movq %rax, %r15
movq 0x2b0(%rbx), %rsi
xorl %r14d, %r14d
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x13860
cmpl $0x1, %eax
je 0x289d4
movq 0x2b0(%rbx), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x13340
cmpl $0x1, %eax
jne 0x28a20
movq %r15, %rdi
callq 0x13240
jmp 0x28a5c
leaq 0x200db(%rip), %rax # 0x48ac0
movq (%rax), %rdx
leaq 0x200e1(%rip), %rax # 0x48ad0
movq 0xd0(%rax), %rcx
leaq 0xc5bb(%rip), %r8 # 0x34fb8
jmp 0x28a47
leaq 0x200ba(%rip), %rax # 0x48ac0
movq (%rax), %rdx
leaq 0x200c0(%rip), %rax # 0x48ad0
movq 0xd0(%rax), %rcx
leaq 0xc5b3(%rip), %r8 # 0x34fd1
jmp 0x28a47
movq %r15, %rdi
callq 0x13240
leaq 0x20091(%rip), %rax # 0x48ac0
movq (%rax), %rdx
leaq 0x20097(%rip), %rax # 0x48ad0
movq 0xd0(%rax), %rcx
leaq 0xc5ab(%rip), %r8 # 0x34ff2
movq %rbx, %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %eax, %eax
callq *0x50(%r12)
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_verify_server_cert:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, 1
test rdi, rdi
jz loc_28A5C
mov r15, [rdi+10h]
test r15, r15
jz loc_28A5C
mov rdi, r15
xor esi, esi
call _SSL_get_ex_data
mov rbx, rax
mov r12, [rax]
cmp qword ptr [rax+2B0h], 0
jz short loc_289DE
mov rdi, r15
call _SSL_get1_peer_certificate
test rax, rax
jz short loc_289FF
mov r15, rax
mov rsi, [rbx+2B0h]
xor r14d, r14d
mov rdi, rax
xor edx, edx
xor ecx, ecx
xor r8d, r8d
call _X509_check_host
cmp eax, 1
jz short loc_289D4
mov rsi, [rbx+2B0h]
mov rdi, r15
xor edx, edx
call _X509_check_ip_asc
cmp eax, 1
jnz short loc_28A20
loc_289D4:
mov rdi, r15
call _X509_free
jmp short loc_28A5C
loc_289DE:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aInvalidEmptyHo; "Invalid (empty) hostname"
jmp short loc_28A47
loc_289FF:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aUnableToGetSer; "Unable to get server certificate"
jmp short loc_28A47
loc_28A20:
mov rdi, r15
call _X509_free
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aValidationOfSs; "Validation of SSL server certificate fa"...
loc_28A47:
mov rdi, rbx
mov esi, 7EAh
xor eax, eax
call qword ptr [r12+50h]
mov r14d, 1
loc_28A5C:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_tls_verify_server_cert(long long a1)
{
unsigned int v1; // r14d
long long v2; // r15
long long *v3; // rbx
long long v4; // r12
long long v5; // rax
long long v6; // r15
char *v7; // rdx
char *v8; // rcx
const char *v9; // r8
v1 = 1;
if ( a1 )
{
v2 = *(_QWORD *)(a1 + 16);
if ( v2 )
{
v3 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL);
v4 = *v3;
if ( v3[86] )
{
v5 = SSL_get1_peer_certificate(v2);
if ( v5 )
{
v6 = v5;
v1 = 0;
if ( (unsigned int)X509_check_host(v5, v3[86], 0LL, 0LL, 0LL) == 1
|| (unsigned int)X509_check_ip_asc(v6, v3[86], 0LL) == 1 )
{
X509_free(v6);
return v1;
}
X509_free(v6);
v7 = SQLSTATE_UNKNOWN;
v8 = client_errors[26];
v9 = "Validation of SSL server certificate failed";
}
else
{
v7 = SQLSTATE_UNKNOWN;
v8 = client_errors[26];
v9 = "Unable to get server certificate";
}
}
else
{
v7 = SQLSTATE_UNKNOWN;
v8 = client_errors[26];
v9 = "Invalid (empty) hostname";
}
(*(void ( **)(long long *, long long, char *, char *, const char *))(v4 + 80))(v3, 2026LL, v7, v8, v9);
return 1;
}
}
return v1;
}
| ma_tls_verify_server_cert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,0x1
TEST RDI,RDI
JZ 0x00128a5c
MOV R15,qword ptr [RDI + 0x10]
TEST R15,R15
JZ 0x00128a5c
MOV RDI,R15
XOR ESI,ESI
CALL 0x00113160
MOV RBX,RAX
MOV R12,qword ptr [RAX]
CMP qword ptr [RAX + 0x2b0],0x0
JZ 0x001289de
MOV RDI,R15
CALL 0x001137e0
TEST RAX,RAX
JZ 0x001289ff
MOV R15,RAX
MOV RSI,qword ptr [RBX + 0x2b0]
XOR R14D,R14D
MOV RDI,RAX
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00113860
CMP EAX,0x1
JZ 0x001289d4
MOV RSI,qword ptr [RBX + 0x2b0]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00113340
CMP EAX,0x1
JNZ 0x00128a20
LAB_001289d4:
MOV RDI,R15
CALL 0x00113240
JMP 0x00128a5c
LAB_001289de:
LEA RAX,[0x148ac0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x148ad0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x134fb8]
JMP 0x00128a47
LAB_001289ff:
LEA RAX,[0x148ac0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x148ad0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x134fd1]
JMP 0x00128a47
LAB_00128a20:
MOV RDI,R15
CALL 0x00113240
LEA RAX,[0x148ac0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x148ad0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x134ff2]
LAB_00128a47:
MOV RDI,RBX
MOV ESI,0x7ea
XOR EAX,EAX
CALL qword ptr [R12 + 0x50]
MOV R14D,0x1
LAB_00128a5c:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 ma_tls_verify_server_cert(long param_1)
{
SSL *ssl;
long lVar1;
int iVar2;
long *plVar3;
X509 *a;
char *pcVar4;
if (param_1 == 0) {
return 1;
}
ssl = *(SSL **)(param_1 + 0x10);
if (ssl != (SSL *)0x0) {
plVar3 = (long *)SSL_get_ex_data(ssl,0);
lVar1 = *plVar3;
if (plVar3[0x56] == 0) {
pcVar4 = "Invalid (empty) hostname";
}
else {
a = (X509 *)SSL_get1_peer_certificate(ssl);
if (a == (X509 *)0x0) {
pcVar4 = "Unable to get server certificate";
}
else {
iVar2 = X509_check_host(a,plVar3[0x56],0,0,0);
if ((iVar2 == 1) || (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 == 1)) {
X509_free(a);
return 0;
}
X509_free(a);
pcVar4 = "Validation of SSL server certificate failed";
}
}
(**(code **)(lVar1 + 0x50))
(plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00148ba0,pcVar4);
return 1;
}
return 1;
}
| |
50,828 | void mcp::logger::log_impl<char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&) | hkr04[P]cpp-mcp/include/mcp_logger.h | void log_impl(std::stringstream& ss, T&& arg, Args&&... args) {
ss << std::forward<T>(arg);
log_impl(ss, std::forward<Args>(args)...);
} | O1 | c | void mcp::logger::log_impl<char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
leaq 0x10(%rsi), %r15
movq %rdx, %rdi
callq 0xa2b0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa6f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa6f0
nop
| _ZN3mcp6logger8log_implIRA56_KcJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRNS5_18basic_stringstreamIcS8_S9_EEOT_DpOT0_:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
lea r15, [rsi+10h]
mov rdi, rdx
call _strlen
mov rdi, r15
mov rsi, r14
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)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rdi, r15
pop rbx
pop r14
pop r15
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
| long long mcp::logger::log_impl<char const(&)[56],std::string const&>(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v6; // rax
v6 = strlen(a3);
std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, a3, v6);
return std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, *a4, a4[1]);
}
| log_impl<char_const(&)[56],std::__cxx11::string_const&>:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
LEA R15,[RSI + 0x10]
MOV RDI,RDX
CALL 0x0010a2b0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
CALL 0x0010a6f0
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,R15
POP RBX
POP R14
POP R15
JMP 0x0010a6f0
|
/* void mcp::logger::log_impl<char const (&) [56], std::__cxx11::string
const&>(std::__cxx11::stringstream&, char const (&) [56], std::__cxx11::string const&) */
void __thiscall
mcp::logger::log_impl<char_const(&)[56],std::__cxx11::string_const&>
(logger *this,stringstream *param_1,char *param_2,string *param_3)
{
size_t sVar1;
sVar1 = strlen(param_2);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(param_1 + 0x10),param_2,sVar1);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(param_1 + 0x10),*(char **)param_3,*(long *)(param_3 + 8));
return;
}
| |
50,829 | void mcp::logger::log_impl<char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&) | hkr04[P]cpp-mcp/include/mcp_logger.h | void log_impl(std::stringstream& ss, T&& arg, Args&&... args) {
ss << std::forward<T>(arg);
log_impl(ss, std::forward<Args>(args)...);
} | O3 | c | void mcp::logger::log_impl<char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
leaq 0x10(%rsi), %r15
movq %rdx, %rdi
callq 0xa2b0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa6f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa6f0
nop
| _ZN3mcp6logger8log_implIRA59_KcJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRNS5_18basic_stringstreamIcS8_S9_EEOT_DpOT0_:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
lea r15, [rsi+10h]
mov rdi, rdx
call _strlen
mov rdi, r15
mov rsi, r14
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)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rdi, r15
pop rbx
pop r14
pop r15
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
| long long mcp::logger::log_impl<char const(&)[59],std::string const&>(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v6; // rax
v6 = strlen(a3);
std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, a3, v6);
return std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, *a4, a4[1]);
}
| log_impl<char_const(&)[59],std::__cxx11::string_const&>:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
LEA R15,[RSI + 0x10]
MOV RDI,RDX
CALL 0x0010a2b0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
CALL 0x0010a6f0
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,R15
POP RBX
POP R14
POP R15
JMP 0x0010a6f0
|
/* void mcp::logger::log_impl<char const (&) [59], std::__cxx11::string
const&>(std::__cxx11::stringstream&, char const (&) [59], std::__cxx11::string const&) */
void __thiscall
mcp::logger::log_impl<char_const(&)[59],std::__cxx11::string_const&>
(logger *this,stringstream *param_1,char *param_2,string *param_3)
{
size_t sVar1;
sVar1 = strlen(param_2);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(param_1 + 0x10),param_2,sVar1);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(param_1 + 0x10),*(char **)param_3,*(long *)(param_3 + 8));
return;
}
| |
50,830 | common_chat_format_name[abi:cxx11](common_chat_format) | monkey531[P]llama/common/chat.cpp | std::string common_chat_format_name(common_chat_format format) {
switch (format) {
case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only";
case COMMON_CHAT_FORMAT_GENERIC: return "Generic";
case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo";
case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x";
case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools";
case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1";
case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1";
case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro";
case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B";
default:
throw std::runtime_error("Unknown chat format");
}
} | O2 | cpp | common_chat_format_name[abi:cxx11](common_chat_format):
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpl $0xa, %esi
ja 0x99fb3
movq %rdi, %rbx
movl %esi, %eax
leaq 0x1fe04(%rip), %rcx # 0xb9d00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x20e3c(%rip), %rsi # 0xbad48
leaq 0x17(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e57(%rip), %rsi # 0xbad74
leaq 0x13(%rsp), %rdx
jmp 0x99fa0
leaq 0x20eae(%rip), %rsi # 0xbadd9
leaq 0xe(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e24(%rip), %rsi # 0xbad5d
leaq 0x15(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e23(%rip), %rsi # 0xbad6a
leaq 0x14(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e58(%rip), %rsi # 0xbadad
leaq 0x10(%rsp), %rdx
jmp 0x99fa0
leaq 0x20df2(%rip), %rsi # 0xbad55
leaq 0x16(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e20(%rip), %rsi # 0xbad91
leaq 0x12(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e1e(%rip), %rsi # 0xbad9d
leaq 0x11(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e59(%rip), %rsi # 0xbade6
leaq 0xd(%rsp), %rdx
jmp 0x99fa0
leaq 0x20e23(%rip), %rsi # 0xbadbe
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x26dae
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x20e2d(%rip), %rsi # 0xbadf2
movq %rax, %rdi
callq 0x23330
movq 0x6401c(%rip), %rsi # 0xfdff0
movq 0x63f7d(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fb0
| _Z23common_chat_format_nameB5cxx1118common_chat_format:
push r14
push rbx
sub rsp, 18h
cmp esi, 0Ah; switch 11 cases
ja def_99F03; jumptable 0000000000099F03 default case
mov rbx, rdi
mov eax, esi
lea rcx, jpt_99F03
movsxd rax, ds:(jpt_99F03 - 0B9D00h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_99F05:
lea rsi, aContentOnly; jumptable 0000000000099F03 case 0
lea rdx, [rsp+28h+var_11]
jmp loc_99FA0
loc_99F16:
lea rsi, aLlama3XWithBui; jumptable 0000000000099F03 case 4
lea rdx, [rsp+28h+var_15]
jmp short loc_99FA0
loc_99F24:
lea rsi, aHermes2Pro; jumptable 0000000000099F03 case 9
lea rdx, [rsp+28h+var_1A]
jmp short loc_99FA0
loc_99F32:
lea rsi, aMistralNemo; jumptable 0000000000099F03 case 2
lea rdx, [rsp+28h+var_13]
jmp short loc_99FA0
loc_99F40:
lea rsi, aLlama3X; jumptable 0000000000099F03 case 3
lea rdx, [rsp+28h+var_14]
jmp short loc_99FA0
loc_99F4E:
lea rsi, aFunctionaryV32; jumptable 0000000000099F03 case 7
lea rdx, [rsp+28h+var_18]
jmp short loc_99FA0
loc_99F5C:
lea rsi, aGeneric; jumptable 0000000000099F03 case 1
lea rdx, [rsp+28h+var_12]
jmp short loc_99FA0
loc_99F6A:
lea rsi, aDeepseekR1; jumptable 0000000000099F03 case 5
lea rdx, [rsp+28h+var_16]
jmp short loc_99FA0
loc_99F78:
lea rsi, aFirefunctionV2; jumptable 0000000000099F03 case 6
lea rdx, [rsp+28h+var_17]
jmp short loc_99FA0
loc_99F86:
lea rsi, aCommandR7b; jumptable 0000000000099F03 case 10
lea rdx, [rsp+28h+var_1B]
jmp short loc_99FA0
loc_99F94:
lea rsi, aFunctionaryV31; jumptable 0000000000099F03 case 8
lea rdx, [rsp+28h+var_19]
loc_99FA0:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
def_99F03:
push 10h; jumptable 0000000000099F03 default case
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnknownChatFor; "Unknown chat format"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2)
{
const char *v2; // rsi
std::runtime_error *exception; // rbx
switch ( a2 )
{
case 0:
v2 = "Content-only";
break;
case 1:
v2 = "Generic";
break;
case 2:
v2 = "Mistral Nemo";
break;
case 3:
v2 = "Llama 3.x";
break;
case 4:
v2 = "Llama 3.x with builtin tools";
break;
case 5:
v2 = "DeepSeek R1";
break;
case 6:
v2 = "FireFunction v2";
break;
case 7:
v2 = "Functionary v3.2";
break;
case 8:
v2 = "Functionary v3.1 Llama 3.1";
break;
case 9:
v2 = "Hermes 2 Pro";
break;
case 10:
v2 = "Command R7B";
break;
default:
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Unknown chat format");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::basic_string<std::allocator<char>>(a1, v2);
return a1;
}
| common_chat_format_name[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x18
CMP ESI,0xa
JA 0x00199fb3
MOV RBX,RDI
MOV EAX,ESI
LEA RCX,[0x1b9d00]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x1bad48]
LEA RDX,[RSP + 0x17]
JMP 0x00199fa0
caseD_4:
LEA RSI,[0x1bad74]
LEA RDX,[RSP + 0x13]
JMP 0x00199fa0
caseD_9:
LEA RSI,[0x1badd9]
LEA RDX,[RSP + 0xe]
JMP 0x00199fa0
caseD_2:
LEA RSI,[0x1bad5d]
LEA RDX,[RSP + 0x15]
JMP 0x00199fa0
caseD_3:
LEA RSI,[0x1bad6a]
LEA RDX,[RSP + 0x14]
JMP 0x00199fa0
caseD_7:
LEA RSI,[0x1badad]
LEA RDX,[RSP + 0x10]
JMP 0x00199fa0
caseD_1:
LEA RSI,[0x1bad55]
LEA RDX,[RSP + 0x16]
JMP 0x00199fa0
caseD_5:
LEA RSI,[0x1bad91]
LEA RDX,[RSP + 0x12]
JMP 0x00199fa0
caseD_6:
LEA RSI,[0x1bad9d]
LEA RDX,[RSP + 0x11]
JMP 0x00199fa0
caseD_a:
LEA RSI,[0x1bade6]
LEA RDX,[RSP + 0xd]
JMP 0x00199fa0
caseD_8:
LEA RSI,[0x1badbe]
LEA RDX,[RSP + 0xf]
LAB_00199fa0:
MOV RDI,RBX
CALL 0x00126dae
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
default:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_00199fbe:
LEA RSI,[0x1badf2]
MOV RDI,RAX
CALL 0x00123330
LAB_00199fcd:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f30
|
/* common_chat_format_name[abi:cxx11](common_chat_format) */
string * common_chat_format_name_abi_cxx11_(string *param_1,int4 param_2)
{
runtime_error *this;
allocator *paVar1;
char *pcVar2;
allocator local_1b;
allocator local_1a;
allocator local_19;
allocator local_18;
allocator local_17;
allocator local_16;
allocator local_15;
allocator local_14;
allocator local_13;
allocator local_12;
allocator local_11;
switch(param_2) {
case 0:
pcVar2 = "Content-only";
paVar1 = &local_11;
break;
case 1:
pcVar2 = "Generic";
paVar1 = &local_12;
break;
case 2:
pcVar2 = "Mistral Nemo";
paVar1 = &local_13;
break;
case 3:
pcVar2 = "Llama 3.x";
paVar1 = &local_14;
break;
case 4:
pcVar2 = "Llama 3.x with builtin tools";
paVar1 = &local_15;
break;
case 5:
pcVar2 = "DeepSeek R1";
paVar1 = &local_16;
break;
case 6:
pcVar2 = "FireFunction v2";
paVar1 = &local_17;
break;
case 7:
pcVar2 = "Functionary v3.2";
paVar1 = &local_18;
break;
case 8:
pcVar2 = "Functionary v3.1 Llama 3.1";
paVar1 = &local_19;
break;
case 9:
pcVar2 = "Hermes 2 Pro";
paVar1 = &local_1a;
break;
case 10:
pcVar2 = "Command R7B";
paVar1 = &local_1b;
break;
default:
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00199fbe to 00199fcc has its CatchHandler @ 00199fe3 */
std::runtime_error::runtime_error(this,"Unknown chat format");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1);
return param_1;
}
| |
50,831 | mysql_list_tables_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_tables_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_tables,
(parms->mysql, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O3 | c | mysql_list_tables_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq %rax, %rdi
callq 0x3c6c6
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_list_tables_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdi, rax
call mysql_list_tables
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_list_tables_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8));
*(_QWORD *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
| mysql_list_tables_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDI,RAX
CALL 0x0013c6c6
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_tables_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_tables(*param_1,param_1[1]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
50,832 | testing::internal::FormatCompilerIndependentFileLocation[abi:cxx11](char const*, int) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
int line) {
const std::string file_name(file == nullptr ? kUnknownFile : file);
if (line < 0)
return file_name;
else
return file_name + ":" + StreamableToString(line);
} | O1 | cpp | testing::internal::FormatCompilerIndependentFileLocation[abi:cxx11](char const*, int):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
testq %rsi, %rsi
leaq 0x26146(%rip), %rax # 0x41098
cmoveq %rax, %r14
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x91f0
leaq (%rax,%r14), %rdx
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xfdfe
cmpl $0x0, 0xc(%rsp)
js 0x1b015
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0xf66a
leaq 0x28b32(%rip), %rsi # 0x43adc
leaq 0x10(%rsp), %rdi
callq 0x9a70
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x35203
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x38(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x1afe5
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1b004
leaq 0x40(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1afff
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1b036
movq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x9170
jmp 0x1b044
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xf66a
jmp 0x1b0b7
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9580
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1b063
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1b069
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b0a0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b0b7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b0ce
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1b11b
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b102
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x1b102
jmp 0x1b0ff
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b11e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x1b11e
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x1b135
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
nop
| _ZN7testing8internal37FormatCompilerIndependentFileLocationB5cxx11EPKci:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rsi
mov rbx, rdi
mov [rsp+88h+var_7C], edx
test rsi, rsi
lea rax, _ZN7testing8internalL12kUnknownFileE; "unknown file"
cmovz r14, rax
lea r15, [rsp+88h+var_28]
mov [r15-10h], r15
mov rdi, r14
call _strlen
lea rdx, [rax+r14]
lea rdi, [rsp+88h+var_38]
mov rsi, 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)
cmp [rsp+88h+var_7C], 0
js loc_1B015
lea r14, [rsp+88h+var_68]
mov [r14-10h], r14
mov rsi, [rsp+88h+var_38]
mov rdx, [rsp+88h+var_30]
add rdx, rsi
lea rdi, [rsp+88h+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aTrace+6; ":"
lea rdi, [rsp+88h+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_58]
lea rsi, [rsp+88h+var_7C]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
mov rcx, [rsp+88h+var_78]
mov r8, [rsp+88h+var_70]
mov rdx, [rsp+88h+var_50]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r14
jz short loc_1AFE5
mov rsi, [rsp+88h+var_68]
loc_1AFE5:
cmp rax, rsi
jbe short loc_1B004
lea rdi, [rsp+88h+var_48]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_1AFFF
mov rsi, [rsp+88h+var_48]
loc_1AFFF:
cmp rax, rsi
jbe short loc_1B036
loc_1B004:
mov rsi, [rsp+88h+var_58]
lea rdi, [rsp+88h+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_1B044
loc_1B015:
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, [rsp+88h+var_38]
mov rdx, [rsp+88h+var_30]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp loc_1B0B7
loc_1B036:
lea rdi, [rsp+88h+var_58]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_1B044:
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_1B063
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_1B069
loc_1B063:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_1B069:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rbx+8], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rax, [rsp+88h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1B0A0
mov rsi, [rsp+88h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1B0A0:
mov rdi, [rsp+88h+var_78]; void *
cmp rdi, r14
jz short loc_1B0B7
mov rsi, [rsp+88h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1B0B7:
mov rdi, [rsp+88h+var_38]; void *
cmp rdi, r15
jz short loc_1B0CE
mov rsi, [rsp+88h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1B0CE:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
jmp short loc_1B11B
mov rbx, rax
lea rax, [rsp+arg_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1B102
mov rsi, [rsp+arg_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1B102
jmp short $+2
loc_1B0FF:
mov rbx, rax
loc_1B102:
mov rdi, [rsp+arg_8]; void *
cmp rdi, r14
jz short loc_1B11E
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1B11E
loc_1B11B:
mov rbx, rax
loc_1B11E:
mov rdi, [rsp+arg_48]; void *
cmp rdi, r15
jz short loc_1B135
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1B135:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::FormatCompilerIndependentFileLocation[abi:cxx11](long long a1, char *a2, int a3)
{
char *v3; // r14
long long v4; // rax
char *v5; // rax
unsigned long long v6; // rsi
unsigned long long v7; // rsi
_QWORD *v8; // rax
_OWORD *v9; // rcx
int v11; // [rsp+Ch] [rbp-7Ch] BYREF
void *v12[2]; // [rsp+10h] [rbp-78h] BYREF
_QWORD v13[2]; // [rsp+20h] [rbp-68h] BYREF
void *v14[2]; // [rsp+30h] [rbp-58h] BYREF
_QWORD v15[2]; // [rsp+40h] [rbp-48h] BYREF
void *v16; // [rsp+50h] [rbp-38h] BYREF
long long v17; // [rsp+58h] [rbp-30h]
_QWORD v18[5]; // [rsp+60h] [rbp-28h] BYREF
v3 = a2;
v11 = a3;
if ( !a2 )
v3 = "unknown file";
v16 = v18;
v4 = strlen(v3);
std::string::_M_construct<char const*>(&v16, v3, (long long)&v3[v4]);
if ( v11 < 0 )
{
*(_QWORD *)a1 = a1 + 16;
std::string::_M_construct<char *>((_QWORD *)a1, v16, (long long)v16 + v17);
}
else
{
v12[0] = v13;
std::string::_M_construct<char *>(v12, v16, (long long)v16 + v17);
std::string::append(v12, ":");
testing::internal::StreamableToString<int>(v14, &v11);
v5 = (char *)v14[1] + (unsigned long long)v12[1];
v6 = 15LL;
if ( v12[0] != v13 )
v6 = v13[0];
if ( (unsigned long long)v5 <= v6 )
goto LABEL_10;
v7 = 15LL;
if ( v14[0] != v15 )
v7 = v15[0];
if ( (unsigned long long)v5 <= v7 )
v8 = (_QWORD *)std::string::replace(v14, 0LL, 0LL);
else
LABEL_10:
v8 = (_QWORD *)std::string::_M_append(v12, v14[0]);
*(_QWORD *)a1 = a1 + 16;
v9 = v8 + 2;
if ( (_QWORD *)*v8 == v8 + 2 )
{
*(_OWORD *)(a1 + 16) = *v9;
}
else
{
*(_QWORD *)a1 = *v8;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v9;
}
*(_QWORD *)(a1 + 8) = v8[1];
*v8 = v9;
v8[1] = 0LL;
*(_BYTE *)v9 = 0;
if ( v14[0] != v15 )
operator delete(v14[0], v15[0] + 1LL);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
}
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
return a1;
}
| FormatCompilerIndependentFileLocation[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RSI
MOV RBX,RDI
MOV dword ptr [RSP + 0xc],EDX
TEST RSI,RSI
LEA RAX,[0x141098]
CMOVZ R14,RAX
LEA R15,[RSP + 0x60]
MOV qword ptr [R15 + -0x10],R15
MOV RDI,R14
CALL 0x001091f0
LEA RDX,[RAX + R14*0x1]
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x0010fdfe
CMP dword ptr [RSP + 0xc],0x0
JS 0x0011b015
LEA R14,[RSP + 0x20]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
ADD RDX,RSI
LAB_0011af99:
LEA RDI,[RSP + 0x10]
CALL 0x0010f66a
LAB_0011afa3:
LEA RSI,[0x143adc]
LEA RDI,[RSP + 0x10]
CALL 0x00109a70
LAB_0011afb4:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0xc]
CALL 0x00135203
MOV RCX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x38]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R14
JZ 0x0011afe5
MOV RSI,qword ptr [RSP + 0x20]
LAB_0011afe5:
CMP RAX,RSI
JBE 0x0011b004
LEA RDI,[RSP + 0x40]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0011afff
MOV RSI,qword ptr [RSP + 0x40]
LAB_0011afff:
CMP RAX,RSI
JBE 0x0011b036
LAB_0011b004:
MOV RSI,qword ptr [RSP + 0x30]
LAB_0011b009:
LEA RDI,[RSP + 0x10]
CALL 0x00109170
JMP 0x0011b044
LAB_0011b015:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
ADD RDX,RSI
LAB_0011b029:
MOV RDI,RBX
CALL 0x0010f66a
JMP 0x0011b0b7
LAB_0011b036:
LEA RDI,[RSP + 0x30]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00109580
LAB_0011b044:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0011b063
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x0011b069
LAB_0011b063:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0011b069:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011b0a0
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001094c0
LAB_0011b0a0:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R14
JZ 0x0011b0b7
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001094c0
LAB_0011b0b7:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R15
JZ 0x0011b0ce
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001094c0
LAB_0011b0ce:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::FormatCompilerIndependentFileLocation[abi:cxx11](char const*, int) */
internal * __thiscall
testing::internal::FormatCompilerIndependentFileLocation_abi_cxx11_
(internal *this,char *param_1,int param_2)
{
int8 *puVar1;
int8 uVar2;
size_t sVar3;
int8 *puVar4;
ulong uVar5;
int local_7c;
ulong *local_78;
long local_70;
ulong local_68 [2];
ulong *local_58;
long local_50;
ulong local_48 [2];
long *local_38;
long local_30;
long local_28 [2];
if (param_1 == (char *)0x0) {
param_1 = "unknown file";
}
local_7c = param_2;
local_38 = local_28;
sVar3 = strlen(param_1);
std::__cxx11::string::_M_construct<char_const*>(&local_38,param_1,param_1 + sVar3);
if (local_7c < 0) {
*(internal **)this = this + 0x10;
/* try { // try from 0011b029 to 0011b030 has its CatchHandler @ 0011b0db */
std::__cxx11::string::_M_construct<char*>(this,local_38,local_30 + (long)local_38);
goto LAB_0011b0b7;
}
/* try { // try from 0011af99 to 0011afa2 has its CatchHandler @ 0011b11b */
local_78 = local_68;
std::__cxx11::string::_M_construct<char*>(&local_78,local_38,local_30 + (long)local_38);
/* try { // try from 0011afa3 to 0011afb3 has its CatchHandler @ 0011b0ff */
std::__cxx11::string::append((char *)&local_78);
/* try { // try from 0011afb4 to 0011afc2 has its CatchHandler @ 0011b0fd */
StreamableToString<int>((internal *)&local_58,&local_7c);
uVar5 = 0xf;
if (local_78 != local_68) {
uVar5 = local_68[0];
}
if (uVar5 < (ulong)(local_50 + local_70)) {
uVar5 = 0xf;
if (local_58 != local_48) {
uVar5 = local_48[0];
}
if (uVar5 < (ulong)(local_50 + local_70)) goto LAB_0011b004;
/* try { // try from 0011b036 to 0011b043 has its CatchHandler @ 0011b0dd */
puVar4 = (int8 *)
std::__cxx11::string::replace((ulong)&local_58,0,(char *)0x0,(ulong)local_78);
}
else {
LAB_0011b004:
/* try { // try from 0011b009 to 0011b012 has its CatchHandler @ 0011b0dd */
puVar4 = (int8 *)std::__cxx11::string::_M_append((char *)&local_78,(ulong)local_58);
}
*(internal **)this = this + 0x10;
puVar1 = puVar4 + 2;
if ((int8 *)*puVar4 == puVar1) {
uVar2 = puVar4[3];
*(int8 *)(this + 0x10) = *puVar1;
*(int8 *)(this + 0x18) = uVar2;
}
else {
*(int8 **)this = (int8 *)*puVar4;
*(int8 *)(this + 0x10) = *puVar1;
}
*(int8 *)(this + 8) = puVar4[1];
*puVar4 = puVar1;
puVar4[1] = 0;
*(int1 *)puVar1 = 0;
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (local_78 != local_68) {
operator_delete(local_78,local_68[0] + 1);
}
LAB_0011b0b7:
if (local_38 != local_28) {
operator_delete(local_38,local_28[0] + 1);
}
return this;
}
| |
50,833 | main | monkey531[P]llama/examples/llava/qwen2vl-cli.cpp | int main(int argc, char ** argv) {
ggml_time_init();
common_params params;
if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_LLAVA, print_usage)) {
return 1;
}
common_init();
if (params.mmproj.empty() || (params.image.empty() && !prompt_contains_image(params.prompt))) {
print_usage(argc, argv);
return 1;
}
auto * model = llava_init(¶ms);
if (model == NULL) {
fprintf(stderr, "%s: error: failed to init llava model\n", __func__);
return 1;
}
if (prompt_contains_image(params.prompt)) {
auto * ctx_llava = llava_init_context(¶ms, model);
auto * image_embed = load_image(ctx_llava, ¶ms, "");
// process the prompt
process_prompt(ctx_llava, image_embed, ¶ms, params.prompt);
llama_perf_context_print(ctx_llava->ctx_llama);
llava_image_embed_free(image_embed);
ctx_llava->model = NULL;
llava_free(ctx_llava);
#ifndef NDEBUG
} else if (params.image[0].empty()) {
auto ctx_llava = llava_init_context(¶ms, model);
debug_test_mrope_2d();
debug_dump_img_embed(ctx_llava);
llama_perf_context_print(ctx_llava->ctx_llama);
ctx_llava->model = NULL;
llava_free(ctx_llava);
#endif
} else {
for (auto & image : params.image) {
auto * ctx_llava = llava_init_context(¶ms, model);
auto * image_embed = load_image(ctx_llava, ¶ms, image);
if (!image_embed) {
LOG_ERR("%s: failed to load image %s. Terminating\n\n", __func__, image.c_str());
return 1;
}
// process the prompt
process_prompt(ctx_llava, image_embed, ¶ms, params.prompt);
llama_perf_context_print(ctx_llava->ctx_llama);
llava_image_embed_free(image_embed);
ctx_llava->model = NULL;
llava_free(ctx_llava);
}
}
llama_model_free(model);
return 0;
} | O1 | cpp | main:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1378, %rsp # imm = 0x1378
movq %rsi, %rbx
movl %edi, %ebp
callq 0x1d1c0
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0x24846
leaq 0x324(%rip), %r8 # 0x22df2
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
movl $0xd, %ecx
callq 0x54da9
movl $0x1, %ebp
testb %al, %al
je 0x22d8a
callq 0x95f0d
cmpq $0x0, 0x1098(%rsp)
je 0x22bbc
movq 0x10b0(%rsp), %rax
cmpq 0x10b8(%rsp), %rax
jne 0x22b28
leaq 0xea8(%rsp), %rdi
callq 0x22e6c
testb %al, %al
je 0x22bbc
callq 0x1da40
movl 0x740(%rsp), %edi
callq 0x1e3d0
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x98fb8
movq 0xde8(%rsp), %rdi
movups 0x50(%rsp), %xmm0
movups 0x60(%rsp), %xmm1
movups 0x70(%rsp), %xmm2
movups 0x80(%rsp), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1d2e0
movq %rax, %rbx
testq %rax, %rax
jne 0x22bcb
leaq 0x137d17(%rip), %rax # 0x15a8a8
cmpl $0x0, (%rax)
js 0x22bc9
callq 0xf0fff
xorl %ebx, %ebx
leaq 0xe97e2(%rip), %rdx # 0x10c386
leaq 0xe97f5(%rip), %rcx # 0x10c3a0
movq %rax, %rdi
movl $0x4, %esi
xorl %eax, %eax
callq 0xf109a
jmp 0x22bcb
movq %rbx, %rsi
callq 0x22df2
jmp 0x22d8a
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x22dab
leaq 0xea8(%rsp), %rdi
callq 0x22e6c
testb %al, %al
je 0x22c8a
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0x22eb3
movq %rax, %r15
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xe952d(%rip), %rdx # 0x10c13a
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0x2698a
leaq 0x90(%rsp), %rsi
leaq 0x50(%rsp), %rdx
movq %r15, %rdi
callq 0x2301c
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x22c49
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1dc40
leaq 0x90(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
leaq 0xea8(%rsp), %rcx
callq 0x23558
movq 0x8(%r15), %rdi
callq 0x1dc30
movq %r14, %rdi
callq 0x281b7
movq $0x0, 0x10(%r15)
movq %r15, %rdi
callq 0x244fb
jmp 0x22d80
movq %rbx, 0x48(%rsp)
movq 0x10b0(%rsp), %r15
movq 0x10b8(%rsp), %rbp
cmpq %rbp, %r15
sete %bl
je 0x22d6a
leaq 0x90(%rsp), %r12
movl $0x0, 0x44(%rsp)
movq %r12, %rdi
movq 0x48(%rsp), %rsi
callq 0x22eb3
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2301c
movq %rax, %r13
testq %rax, %rax
je 0x22d1a
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
leaq 0xea8(%rsp), %rcx
callq 0x23558
movq 0x8(%r14), %rdi
callq 0x1dc30
movq %r13, %rdi
callq 0x281b7
movq $0x0, 0x10(%r14)
movq %r14, %rdi
callq 0x244fb
jmp 0x22d53
movl $0x1, 0x44(%rsp)
leaq 0x137b7f(%rip), %rax # 0x15a8a8
cmpl $0x0, (%rax)
js 0x22d53
callq 0xf0fff
movq (%r15), %r8
movq %rax, %rdi
movl $0x4, %esi
leaq 0xe93cb(%rip), %rdx # 0x10c110
leaq 0xe93bf(%rip), %rcx # 0x10c10b
xorl %eax, %eax
callq 0xf109a
testq %r13, %r13
je 0x22d72
addq $0x20, %r15
cmpq %rbp, %r15
sete %bl
jne 0x22cbb
jmp 0x22d72
movl $0x0, 0x44(%rsp)
testb $0x1, %bl
movq 0x48(%rsp), %rbx
movl 0x44(%rsp), %ebp
je 0x22d8a
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1d320
leaq 0x90(%rsp), %rdi
callq 0x2575e
movl %ebp, %eax
addq $0x1378, %rsp # imm = 0x1378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1e960
jmp 0x22d8a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x22ddd
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0x22ddd
jmp 0x22dda
jmp 0x22dda
jmp 0x22dda
jmp 0x22dda
jmp 0x22dda
jmp 0x22dda
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x2575e
movq %rbx, %rdi
callq 0x1e650
| main:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1378h
mov rbx, rsi
mov ebp, edi
call _ggml_time_init
lea r14, [rsp+13A8h+var_1318]
mov rdi, r14; this
call _ZN13common_paramsC2Ev; common_params::common_params(void)
lea r8, _ZL11print_usageiPPc; print_usage(int,char **)
mov edi, ebp; int
mov rsi, rbx
mov rdx, r14
mov ecx, 0Dh
call _Z19common_params_parseiPPcR13common_params13llama_examplePFviS0_E; common_params_parse(int,char **,common_params &,llama_example,void (*)(int,char **))
mov ebp, 1
test al, al
jz loc_22D8A
call _Z11common_initv; common_init(void)
cmp [rsp+13A8h+var_310], 0
jz loc_22BBC
mov rax, qword ptr [rsp+13A8h+var_2F8]
cmp rax, [rsp+13A8h+var_2F0]
jnz short loc_22B28
lea rdi, [rsp+13A8h+var_500]
call _ZL21prompt_contains_imageRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; prompt_contains_image(std::string const&)
test al, al
jz loc_22BBC
loc_22B28:
call _llama_backend_init
mov edi, [rsp+13A8h+var_C68]
call _llama_numa_init
lea rdi, [rsp+13A8h+var_1358]
lea rsi, [rsp+13A8h+var_1318]
call _Z28common_model_params_to_llamaR13common_params; common_model_params_to_llama(common_params &)
mov rdi, [rsp+13A8h+var_5C0]
movups xmm0, xmmword ptr [rsp+13A8h+var_1358]
movups xmm1, xmmword ptr [rsp+13A8h+var_1348]
movups xmm2, xmmword ptr [rsp+13A8h+var_1338]
movups xmm3, xmmword ptr [rsp+13A8h+var_1328]
movups xmmword ptr [rsp+13A8h+var_1378], xmm3; __int64
movups xmmword ptr [rsp+13A8h+var_1388], xmm2; void *
movups xmmword ptr [rsp+13A8h+var_1398], xmm1; int
movups xmmword ptr [rsp+13A8h+var_13A8], xmm0; int
call _llama_model_load_from_file
mov rbx, rax
test rax, rax
jnz short loc_22BCB
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_22BC9
call _Z15common_log_mainv; common_log_main(void)
xor ebx, ebx
lea rdx, aSUnableToLoadM; "%s: unable to load model\n"
lea rcx, aLlavaInit; "llava_init"
mov rdi, rax
mov esi, 4
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_22BCB
loc_22BBC:
mov rsi, rbx; char **
call _ZL11print_usageiPPc; print_usage(int,char **)
jmp loc_22D8A
loc_22BC9:
xor ebx, ebx
loc_22BCB:
test rbx, rbx
jz loc_22DAB
lea rdi, [rsp+13A8h+var_500]
call _ZL21prompt_contains_imageRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; prompt_contains_image(std::string const&)
test al, al
jz loc_22C8A
lea rdi, [rsp+13A8h+var_1318]; int
mov rsi, rbx; int
call _ZL18llava_init_contextP13common_paramsP11llama_model; llava_init_context(common_params *,llama_model *)
mov r15, rax
lea r12, [rsp+13A8h+var_1348]
mov [r12-10h], r12
lea rdx, aSFailedToLoadI+2Ah; ""
lea rdi, [rsp+13A8h+var_1358]
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+13A8h+var_1318]; int
lea rdx, [rsp+13A8h+var_1358]; int
mov rdi, r15; int
call _ZL10load_imageP13llava_contextP13common_paramsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; load_image(llava_context *,common_params *,std::string const&)
mov r14, rax
mov rdi, [rsp+13A8h+var_1358]; void *
cmp rdi, r12
jz short loc_22C49
mov rsi, qword ptr [rsp+13A8h+var_1348]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_22C49:
lea rdx, [rsp+13A8h+var_1318]
mov rdi, r15
mov rsi, r14
lea rcx, [rsp+13A8h+var_500]
call _ZL14process_promptP13llava_contextP17llava_image_embedP13common_paramsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; process_prompt(llava_context *,llava_image_embed *,common_params *,std::string const&)
mov rdi, [r15+8]
call _llama_perf_context_print
mov rdi, r14
call llava_image_embed_free
mov qword ptr [r15+10h], 0
mov rdi, r15
call _ZL10llava_freeP13llava_context; llava_free(llava_context *)
jmp loc_22D80
loc_22C8A:
mov qword ptr [rsp+13A8h+var_1360], rbx; int
mov r15, qword ptr [rsp+13A8h+var_2F8]
mov rbp, [rsp+13A8h+var_2F0]
cmp r15, rbp
setz bl
jz loc_22D6A
lea r12, [rsp+13A8h+var_1318]
mov [rsp+13A8h+var_1364], 0
loc_22CBB:
mov rdi, r12; int
mov rsi, qword ptr [rsp+13A8h+var_1360]; int
call _ZL18llava_init_contextP13common_paramsP11llama_model; llava_init_context(common_params *,llama_model *)
mov r14, rax
mov rdi, rax; int
mov rsi, r12; int
mov rdx, r15; int
call _ZL10load_imageP13llava_contextP13common_paramsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; load_image(llava_context *,common_params *,std::string const&)
mov r13, rax
test rax, rax
jz short loc_22D1A
mov rdi, r14
mov rsi, r13
mov rdx, r12
lea rcx, [rsp+13A8h+var_500]
call _ZL14process_promptP13llava_contextP17llava_image_embedP13common_paramsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; process_prompt(llava_context *,llava_image_embed *,common_params *,std::string const&)
mov rdi, [r14+8]
call _llama_perf_context_print
mov rdi, r13
call llava_image_embed_free
mov qword ptr [r14+10h], 0
mov rdi, r14
call _ZL10llava_freeP13llava_context; llava_free(llava_context *)
jmp short loc_22D53
loc_22D1A:
mov [rsp+13A8h+var_1364], 1
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_22D53
call _Z15common_log_mainv; common_log_main(void)
mov r8, [r15]
mov rdi, rax
mov esi, 4
lea rdx, aSFailedToLoadI; "%s: failed to load image %s. Terminatin"...
lea rcx, aMain; "main"
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_22D53:
test r13, r13
jz short loc_22D72
add r15, 20h ; ' '
cmp r15, rbp
setz bl
jnz loc_22CBB
jmp short loc_22D72
loc_22D6A:
mov [rsp+13A8h+var_1364], 0
loc_22D72:
test bl, 1
mov rbx, qword ptr [rsp+13A8h+var_1360]
mov ebp, [rsp+13A8h+var_1364]
jz short loc_22D8A
loc_22D80:
xor ebp, ebp
mov rdi, rbx
call _llama_model_free
loc_22D8A:
lea rdi, [rsp+13A8h+var_1318]; this
call _ZN13common_paramsD2Ev; common_params::~common_params()
mov eax, ebp
add rsp, 1378h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22DAB:
call main_cold_1
jmp short loc_22D8A
mov rbx, rax
mov rdi, [rsp+arg_48]; void *
cmp rdi, r12
jz short loc_22DDD
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_22DDD
jmp short loc_22DDA
jmp short loc_22DDA
jmp short loc_22DDA
jmp short loc_22DDA
jmp short loc_22DDA
jmp short $+2
loc_22DDA:
mov rbx, rax
loc_22DDD:
lea rdi, [rsp+arg_88]; this
call _ZN13common_paramsD2Ev; common_params::~common_params()
mov rdi, rbx
call __Unwind_Resume
| // local variable allocation has failed, the output may be wrong!
int main(int argc, const char **argv, const char **envp)
{
int v3; // ebp
long long v4; // rbx
int v5; // edi
int v6; // r8d
int v7; // r9d
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long inited; // r15
int v13; // ecx
int v14; // r8d
int v15; // r9d
long long image; // r14
_QWORD *v17; // r15
_QWORD *v18; // rbp
bool v19; // bl
long long v20; // r14
int v21; // ecx
int v22; // r8d
int v23; // r9d
long long v24; // rax
long long v25; // r13
int v26; // eax
int v27; // r9d
bool v28; // zf
int v30[4]; // [rsp+0h] [rbp-13A8h]
int v31; // [rsp+0h] [rbp-13A8h]
int v32; // [rsp+0h] [rbp-13A8h]
long long v33; // [rsp+8h] [rbp-13A0h]
long long v34; // [rsp+8h] [rbp-13A0h]
int v35[4]; // [rsp+10h] [rbp-1398h]
int v36; // [rsp+10h] [rbp-1398h]
int v37; // [rsp+10h] [rbp-1398h]
int v38; // [rsp+18h] [rbp-1390h]
int v39; // [rsp+18h] [rbp-1390h]
void *v40[2]; // [rsp+20h] [rbp-1388h]
void *v41; // [rsp+20h] [rbp-1388h]
void *v42; // [rsp+20h] [rbp-1388h]
int v43; // [rsp+28h] [rbp-1380h]
int v44; // [rsp+28h] [rbp-1380h]
long long v45[2]; // [rsp+30h] [rbp-1378h]
long long v46; // [rsp+30h] [rbp-1378h]
long long v47; // [rsp+30h] [rbp-1378h]
int v48; // [rsp+38h] [rbp-1370h]
int v49; // [rsp+38h] [rbp-1370h]
int v50; // [rsp+40h] [rbp-1368h]
int v51; // [rsp+40h] [rbp-1368h]
int v52; // [rsp+40h] [rbp-1368h]
int v53; // [rsp+44h] [rbp-1364h]
int v54; // [rsp+48h] [rbp-1360h]
int v55; // [rsp+48h] [rbp-1360h]
int v56[2]; // [rsp+48h] [rbp-1360h]
int v57; // [rsp+48h] [rbp-1360h]
void *v58[2]; // [rsp+50h] [rbp-1358h] BYREF
int v59[4]; // [rsp+60h] [rbp-1348h] BYREF
void *v60[2]; // [rsp+70h] [rbp-1338h]
long long v61[2]; // [rsp+80h] [rbp-1328h]
int v62[854]; // [rsp+90h] [rbp-1318h] BYREF
long long v63; // [rsp+DE8h] [rbp-5C0h]
_BYTE v64[496]; // [rsp+EA8h] [rbp-500h] BYREF
long long v65; // [rsp+1098h] [rbp-310h]
int v66[2]; // [rsp+10B0h] [rbp-2F8h]
_QWORD *v67; // [rsp+10B8h] [rbp-2F0h]
ggml_time_init(argc, argv, envp);
common_params::common_params((common_params *)v62);
v3 = 1;
if ( (unsigned __int8)common_params_parse((unsigned int)argc, argv, v62, 13LL, print_usage) )
{
common_init();
if ( v65 && (*(_QWORD **)v66 != v67 || (*(_QWORD *)&argc = v64, (unsigned __int8)prompt_contains_image(v64))) )
{
llama_backend_init();
llama_numa_init((unsigned int)v62[428]);
common_model_params_to_llama((common_params *)v58);
*(_OWORD *)v45 = *(_OWORD *)v61;
*(_OWORD *)v40 = *(_OWORD *)v60;
*(_OWORD *)v35 = *(_OWORD *)v59;
*(_OWORD *)v30 = *(_OWORD *)v58;
v4 = llama_model_load_from_file(v63, v62);
if ( !v4 )
{
v4 = 0LL;
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
common_log_add(v5, 4, (unsigned int)"%s: unable to load model\n", (unsigned int)"llava_init", v6, v7, v30[0]);
}
}
if ( !v4 )
{
main_cold_1();
goto LABEL_25;
}
if ( (unsigned __int8)prompt_contains_image(v64) )
{
inited = llava_init_context(
(int)v62,
v4,
v8,
v9,
v10,
v11,
v30[0],
v30[2],
v35[0],
v35[2],
(int)v40[0],
(int)v40[1],
v45[0],
v45[1],
v50,
v54,
(int)v58[0],
(int)v58[1],
v59[0],
v59[2],
v60[0],
(int)v60[1],
v61[0]);
v58[0] = v59;
std::string::_M_construct<char const*>(v58, "");
image = load_image(
inited,
(int)v62,
(int)v58,
v13,
v14,
v15,
v31,
v33,
v36,
v38,
v41,
v43,
v46,
v48,
v51,
v55,
(long long)v58[0],
(int)v58[1],
*(void **)v59,
v59[2],
(long long)v60[0]);
if ( v58[0] != v59 )
operator delete(v58[0], *(_QWORD *)v59 + 1LL);
process_prompt(inited, image, v62, v64);
llama_perf_context_print(*(_QWORD *)(inited + 8));
llava_image_embed_free(image);
*(_QWORD *)(inited + 16) = 0LL;
llava_free(inited);
LABEL_24:
v3 = 0;
llama_model_free(v4);
goto LABEL_25;
}
*(_QWORD *)v56 = v4;
v17 = *(_QWORD **)v66;
v18 = v67;
v19 = *(_QWORD *)v66 == (_QWORD)v67;
if ( *(_QWORD **)v66 == v67 )
{
v53 = 0;
}
else
{
do
{
v20 = llava_init_context(
(int)v62,
v56[0],
v8,
v9,
v10,
v11,
v30[0],
v30[2],
v35[0],
v35[2],
(int)v40[0],
(int)v40[1],
v45[0],
v45[1],
v50,
v56[0],
(int)v58[0],
(int)v58[1],
v59[0],
v59[2],
v60[0],
(int)v60[1],
v61[0]);
v24 = load_image(
v20,
(int)v62,
(int)v17,
v21,
v22,
v23,
v32,
v34,
v37,
v39,
v42,
v44,
v47,
v49,
v52,
v57,
(long long)v58[0],
(int)v58[1],
*(void **)v59,
v59[2],
(long long)v60[0]);
v25 = v24;
if ( v24 )
{
process_prompt(v20, v24, v62, v64);
llama_perf_context_print(*(_QWORD *)(v20 + 8));
llava_image_embed_free(v25);
*(_QWORD *)(v20 + 16) = 0LL;
llava_free(v20);
}
else
{
v53 = 1;
if ( common_log_verbosity_thold >= 0 )
{
v26 = common_log_main();
common_log_add(
v26,
4,
(unsigned int)"%s: failed to load image %s. Terminating\n\n",
(unsigned int)"main",
*v17,
v27,
v30[0]);
}
}
if ( !v25 )
break;
v17 += 4;
v19 = v17 == v18;
}
while ( v17 != v18 );
}
v28 = !v19;
v4 = *(_QWORD *)v56;
v3 = v53;
if ( !v28 )
goto LABEL_24;
}
else
{
print_usage(argc, (char **)argv);
}
}
LABEL_25:
common_params::~common_params((common_params *)v62);
return v3;
}
| main:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1378
MOV RBX,RSI
MOV EBP,EDI
CALL 0x0011d1c0
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x00124846
LAB_00122ac7:
LEA R8,[0x122df2]
MOV EDI,EBP
MOV RSI,RBX
MOV RDX,R14
MOV ECX,0xd
CALL 0x00154da9
MOV EBP,0x1
TEST AL,AL
JZ 0x00122d8a
CALL 0x00195f0d
CMP qword ptr [RSP + 0x1098],0x0
JZ 0x00122bbc
MOV RAX,qword ptr [RSP + 0x10b0]
CMP RAX,qword ptr [RSP + 0x10b8]
JNZ 0x00122b28
LEA RDI,[RSP + 0xea8]
CALL 0x00122e6c
TEST AL,AL
JZ 0x00122bbc
LAB_00122b28:
CALL 0x0011da40
MOV EDI,dword ptr [RSP + 0x740]
CALL 0x0011e3d0
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x90]
CALL 0x00198fb8
MOV RDI,qword ptr [RSP + 0xde8]
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS XMM1,xmmword ptr [RSP + 0x60]
MOVUPS XMM2,xmmword ptr [RSP + 0x70]
MOVUPS XMM3,xmmword ptr [RSP + 0x80]
MOVUPS xmmword ptr [RSP + 0x30],XMM3
MOVUPS xmmword ptr [RSP + 0x20],XMM2
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0011d2e0
MOV RBX,RAX
TEST RAX,RAX
JNZ 0x00122bcb
LEA RAX,[0x25a8a8]
CMP dword ptr [RAX],0x0
JS 0x00122bc9
CALL 0x001f0fff
XOR EBX,EBX
LEA RDX,[0x20c386]
LEA RCX,[0x20c3a0]
MOV RDI,RAX
MOV ESI,0x4
XOR EAX,EAX
CALL 0x001f109a
JMP 0x00122bcb
LAB_00122bbc:
MOV RSI,RBX
CALL 0x00122df2
JMP 0x00122d8a
LAB_00122bc9:
XOR EBX,EBX
LAB_00122bcb:
TEST RBX,RBX
JZ 0x00122dab
LEA RDI,[RSP + 0xea8]
CALL 0x00122e6c
TEST AL,AL
JZ 0x00122c8a
LAB_00122be9:
LEA RDI,[RSP + 0x90]
MOV RSI,RBX
CALL 0x00122eb3
MOV R15,RAX
LEA R12,[RSP + 0x60]
MOV qword ptr [R12 + -0x10],R12
LAB_00122c06:
LEA RDX,[0x20c13a]
LEA RDI,[RSP + 0x50]
MOV RSI,RDX
CALL 0x0012698a
LAB_00122c1a:
LEA RSI,[RSP + 0x90]
LEA RDX,[RSP + 0x50]
MOV RDI,R15
CALL 0x0012301c
MOV R14,RAX
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R12
JZ 0x00122c49
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x0011dc40
LAB_00122c49:
LEA RDX,[RSP + 0x90]
MOV RDI,R15
MOV RSI,R14
LEA RCX,[RSP + 0xea8]
CALL 0x00123558
MOV RDI,qword ptr [R15 + 0x8]
CALL 0x0011dc30
MOV RDI,R14
CALL 0x001281b7
MOV qword ptr [R15 + 0x10],0x0
MOV RDI,R15
CALL 0x001244fb
JMP 0x00122d80
LAB_00122c8a:
MOV qword ptr [RSP + 0x48],RBX
MOV R15,qword ptr [RSP + 0x10b0]
MOV RBP,qword ptr [RSP + 0x10b8]
CMP R15,RBP
SETZ BL
JZ 0x00122d6a
LEA R12,[RSP + 0x90]
MOV dword ptr [RSP + 0x44],0x0
LAB_00122cbb:
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00122eb3
LAB_00122cc8:
MOV R14,RAX
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R15
CALL 0x0012301c
MOV R13,RAX
TEST RAX,RAX
JZ 0x00122d1a
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
LEA RCX,[RSP + 0xea8]
CALL 0x00123558
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0011dc30
MOV RDI,R13
CALL 0x001281b7
MOV qword ptr [R14 + 0x10],0x0
MOV RDI,R14
CALL 0x001244fb
JMP 0x00122d53
LAB_00122d1a:
MOV dword ptr [RSP + 0x44],0x1
LEA RAX,[0x25a8a8]
CMP dword ptr [RAX],0x0
JS 0x00122d53
CALL 0x001f0fff
MOV R8,qword ptr [R15]
MOV RDI,RAX
MOV ESI,0x4
LEA RDX,[0x20c110]
LEA RCX,[0x20c10b]
XOR EAX,EAX
CALL 0x001f109a
LAB_00122d53:
TEST R13,R13
JZ 0x00122d72
ADD R15,0x20
CMP R15,RBP
SETZ BL
JNZ 0x00122cbb
JMP 0x00122d72
LAB_00122d6a:
MOV dword ptr [RSP + 0x44],0x0
LAB_00122d72:
TEST BL,0x1
MOV RBX,qword ptr [RSP + 0x48]
MOV EBP,dword ptr [RSP + 0x44]
JZ 0x00122d8a
LAB_00122d80:
XOR EBP,EBP
LAB_00122d82:
MOV RDI,RBX
CALL 0x0011d320
LAB_00122d8a:
LEA RDI,[RSP + 0x90]
CALL 0x0012575e
MOV EAX,EBP
ADD RSP,0x1378
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122dab:
CALL 0x0011e960
JMP 0x00122d8a
|
int4 main(int param_1,char **param_2)
{
char cVar1;
llama_model *plVar2;
int8 uVar3;
llava_context *plVar4;
llava_image_embed *plVar5;
string *psVar6;
bool bVar7;
int4 local_1364;
int4 *local_1358 [2];
int4 local_1348;
int4 uStack_1344;
common_params local_1318 [1712];
int4 local_c68;
int8 local_5c0;
string local_500 [496];
long local_310;
string *local_2f8;
string *local_2f0;
ggml_time_init();
common_params::common_params(local_1318);
/* try { // try from 00122ac7 to 00122af1 has its CatchHandler @ 00122dd8 */
cVar1 = common_params_parse(param_1,param_2,local_1318,0xd,print_usage);
local_1364 = 1;
if (cVar1 == '\0') goto LAB_00122d8a;
common_init();
if (local_310 == 0) {
LAB_00122bbc:
/* try { // try from 00122bbc to 00122bc3 has its CatchHandler @ 00122dd8 */
print_usage(param_1,param_2);
}
else {
if (local_2f8 == local_2f0) {
psVar6 = local_500;
cVar1 = prompt_contains_image(psVar6);
param_1 = (int)psVar6;
if (cVar1 == '\0') goto LAB_00122bbc;
}
/* try { // try from 00122b28 to 00122bb9 has its CatchHandler @ 00122dd6 */
llama_backend_init();
llama_numa_init(local_c68);
common_model_params_to_llama((common_params *)local_1358);
plVar2 = (llama_model *)llama_model_load_from_file(local_5c0);
if (plVar2 == (llama_model *)0x0) {
if (common_log_verbosity_thold < 0) {
plVar2 = (llama_model *)0x0;
}
else {
uVar3 = common_log_main();
plVar2 = (llama_model *)0x0;
common_log_add(uVar3,4,"%s: unable to load model\n","llava_init");
}
}
if (plVar2 == (llama_model *)0x0) {
main_cold_1();
}
else {
cVar1 = prompt_contains_image(local_500);
if (cVar1 == '\0') {
bVar7 = local_2f8 == local_2f0;
if (bVar7) {
local_1364 = 0;
}
else {
local_1364 = 0;
psVar6 = local_2f8;
do {
/* try { // try from 00122cbb to 00122cc7 has its CatchHandler @ 00122dd4 */
plVar4 = (llava_context *)llava_init_context(local_1318,plVar2);
/* try { // try from 00122cc8 to 00122d52 has its CatchHandler @ 00122dda */
plVar5 = (llava_image_embed *)load_image(plVar4,local_1318,psVar6);
if (plVar5 == (llava_image_embed *)0x0) {
local_1364 = 1;
if (-1 < common_log_verbosity_thold) {
uVar3 = common_log_main();
common_log_add(uVar3,4,"%s: failed to load image %s. Terminating\n\n",&DAT_0020c10b,
*(int8 *)psVar6);
}
}
else {
process_prompt(plVar4,plVar5,local_1318,local_500);
llama_perf_context_print(*(int8 *)(plVar4 + 8));
llava_image_embed_free(plVar5);
*(int8 *)(plVar4 + 0x10) = 0;
llava_free(plVar4);
}
if (plVar5 == (llava_image_embed *)0x0) break;
psVar6 = psVar6 + 0x20;
bVar7 = psVar6 == local_2f0;
} while (!bVar7);
}
if (!bVar7) goto LAB_00122d8a;
}
else {
/* try { // try from 00122be9 to 00122bf8 has its CatchHandler @ 00122dd0 */
plVar4 = (llava_context *)llava_init_context(local_1318,plVar2);
/* try { // try from 00122c06 to 00122c19 has its CatchHandler @ 00122dce */
local_1358[0] = &local_1348;
std::__cxx11::string::_M_construct<char_const*>(local_1358,"");
/* try { // try from 00122c1a to 00122c2e has its CatchHandler @ 00122db2 */
plVar5 = (llava_image_embed *)load_image(plVar4,local_1318,(string *)local_1358);
if (local_1358[0] != &local_1348) {
operator_delete(local_1358[0],CONCAT44(uStack_1344,local_1348) + 1);
}
/* try { // try from 00122c49 to 00122c84 has its CatchHandler @ 00122dd2 */
process_prompt(plVar4,plVar5,local_1318,local_500);
llama_perf_context_print(*(int8 *)(plVar4 + 8));
llava_image_embed_free(plVar5);
*(int8 *)(plVar4 + 0x10) = 0;
llava_free(plVar4);
}
local_1364 = 0;
/* try { // try from 00122d82 to 00122d89 has its CatchHandler @ 00122dd6 */
llama_model_free(plVar2);
}
}
LAB_00122d8a:
common_params::~common_params(local_1318);
return local_1364;
}
| |
50,834 | ma_crypt_pre_read_hook | eloqsql/storage/maria/ma_crypt.c | static my_bool ma_crypt_pre_read_hook(PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, share->block_size, MYF(0));
if (crypt_buf == NULL)
{
args->crypt_buf= NULL; /* for post-hook */
return 1;
}
/* swap pointers to read into crypt_buf */
args->crypt_buf= args->page;
args->page= crypt_buf;
return 0;
} | O3 | c | ma_crypt_pre_read_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movl 0x7bc(%rax), %esi
xorl %r14d, %r14d
xorl %edi, %edi
xorl %edx, %edx
callq 0x9fc95
testq %rax, %rax
je 0x50e8e
movq (%rbx), %r14
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x50e90
movb $0x1, %al
movq %r14, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| ma_crypt_pre_read_hook:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+10h]
mov esi, [rax+7BCh]
xor r14d, r14d
xor edi, edi
xor edx, edx
call my_malloc
test rax, rax
jz short loc_50E8E
mov r14, [rbx]
mov [rbx], rax
xor eax, eax
jmp short loc_50E90
loc_50E8E:
mov al, 1
loc_50E90:
mov [rbx+18h], r14
pop rbx
pop r14
pop rbp
retn
| long long ma_crypt_pre_read_hook(long long *a1)
{
long long v1; // r14
long long v2; // rax
long long result; // rax
v1 = 0LL;
v2 = my_malloc(0LL, *(unsigned int *)(a1[2] + 1980), 0LL);
if ( v2 )
{
v1 = *a1;
*a1 = v2;
result = 0LL;
}
else
{
result = 1LL;
}
a1[3] = v1;
return result;
}
| ma_crypt_pre_read_hook:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV ESI,dword ptr [RAX + 0x7bc]
XOR R14D,R14D
XOR EDI,EDI
XOR EDX,EDX
CALL 0x0019fc95
TEST RAX,RAX
JZ 0x00150e8e
MOV R14,qword ptr [RBX]
MOV qword ptr [RBX],RAX
XOR EAX,EAX
JMP 0x00150e90
LAB_00150e8e:
MOV AL,0x1
LAB_00150e90:
MOV qword ptr [RBX + 0x18],R14
POP RBX
POP R14
POP RBP
RET
|
bool ma_crypt_pre_read_hook(long *param_1)
{
long lVar1;
long lVar2;
lVar2 = 0;
lVar1 = my_malloc(0,*(int4 *)(param_1[2] + 0x7bc),0);
if (lVar1 != 0) {
lVar2 = *param_1;
*param_1 = lVar1;
}
param_1[3] = lVar2;
return lVar1 == 0;
}
| |
50,835 | lshift | eloqsql/strings/dtoa.c | static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
} | O3 | c | lshift:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %r14
movl %esi, %r12d
shrl $0x5, %r12d
movl 0x8(%rdi), %edi
movl 0xc(%r14), %eax
movl 0x14(%r14), %ebx
addl %r12d, %ebx
cmpl %eax, %ebx
jl 0xd80cd
incl %edi
addl %eax, %eax
jmp 0xd80c3
movq %rdx, -0x38(%rbp)
movq %rdx, %rsi
callq 0xd7c70
movq (%rax), %r13
cmpl $0x20, %r15d
jb 0xd8104
decl %r12d
leaq 0x4(,%r12,4), %rdx
movq %r13, %rdi
xorl %esi, %esi
movq %rax, -0x30(%rbp)
callq 0x29270
movq -0x30(%rbp), %rax
leaq 0x4(%r13,%r12,4), %r13
movq (%r14), %rdx
movslq 0x14(%r14), %rcx
leaq (%rdx,%rcx,4), %rsi
andl $0x1f, %r15d
je 0xd8150
movl $0x20, %r9d
subl %r15d, %r9d
xorl %edi, %edi
movl (%rdx), %r8d
movl %r15d, %ecx
shll %cl, %r8d
orl %edi, %r8d
movl %r8d, (%r13)
addq $0x4, %r13
movl (%rdx), %edi
addq $0x4, %rdx
movl %r9d, %ecx
shrl %cl, %edi
cmpq %rsi, %rdx
jb 0xd8120
movl %edi, (%r13)
cmpl $0x1, %edi
sbbl $-0x1, %ebx
jmp 0xd8163
movl (%rdx), %ecx
addq $0x4, %rdx
movl %ecx, (%r13)
addq $0x4, %r13
cmpq %rsi, %rdx
jb 0xd8150
movl %ebx, 0x14(%rax)
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rbx
callq 0xd8069
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lshift:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, esi
mov r14, rdi
mov r12d, esi
shr r12d, 5
mov edi, [rdi+8]
mov eax, [r14+0Ch]
mov ebx, [r14+14h]
add ebx, r12d
loc_D80C3:
cmp ebx, eax
jl short loc_D80CD
inc edi
add eax, eax
jmp short loc_D80C3
loc_D80CD:
mov [rbp+var_38], rdx
mov rsi, rdx
call Balloc
mov r13, [rax]
cmp r15d, 20h ; ' '
jb short loc_D8104
dec r12d
lea rdx, ds:4[r12*4]
mov rdi, r13
xor esi, esi
mov [rbp+var_30], rax
call _memset
mov rax, [rbp+var_30]
lea r13, [r13+r12*4+4]
loc_D8104:
mov rdx, [r14]
movsxd rcx, dword ptr [r14+14h]
lea rsi, [rdx+rcx*4]
and r15d, 1Fh
jz short loc_D8150
mov r9d, 20h ; ' '
sub r9d, r15d
xor edi, edi
loc_D8120:
mov r8d, [rdx]
mov ecx, r15d
shl r8d, cl
or r8d, edi
mov [r13+0], r8d
add r13, 4
mov edi, [rdx]
add rdx, 4
mov ecx, r9d
shr edi, cl
cmp rdx, rsi
jb short loc_D8120
mov [r13+0], edi
cmp edi, 1
sbb ebx, 0FFFFFFFFh
jmp short loc_D8163
loc_D8150:
mov ecx, [rdx]
add rdx, 4
mov [r13+0], ecx
add r13, 4
cmp rdx, rsi
jb short loc_D8150
loc_D8163:
mov [rax+14h], ebx
mov rdi, r14
mov rsi, [rbp+var_38]
mov rbx, rax
call Bfree
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lshift(unsigned long long a1, unsigned int a2, unsigned long long *a3)
{
char v3; // r15
int v5; // edi
int v6; // eax
int v7; // ebx
long long v8; // rax
int *v9; // r13
long long v10; // r12
int *v11; // rdx
unsigned long long v12; // rsi
int v13; // r15d
int v14; // edi
unsigned int v15; // edi
int v16; // ecx
long long v17; // rbx
long long v20; // [rsp+10h] [rbp-30h]
v3 = a2;
v5 = *(_DWORD *)(a1 + 8);
v6 = *(_DWORD *)(a1 + 12);
v7 = (a2 >> 5) + *(_DWORD *)(a1 + 20);
while ( v7 >= v6 )
{
++v5;
v6 *= 2;
}
v8 = Balloc(v5, (long long)a3);
v9 = *(int **)v8;
if ( a2 >= 0x20 )
{
v10 = (a2 >> 5) - 1;
v20 = v8;
memset(*(_QWORD *)v8, 0LL, 4 * v10 + 4);
v8 = v20;
v9 += v10 + 1;
}
v11 = *(int **)a1;
v12 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20);
v13 = v3 & 0x1F;
if ( v13 )
{
v14 = 0;
do
{
*v9++ = v14 | (*v11 << v13);
v15 = *v11++;
v14 = v15 >> (32 - v13);
}
while ( (unsigned long long)v11 < v12 );
*v9 = v14;
v7 -= (v14 == 0) - 1;
}
else
{
do
{
v16 = *v11++;
*v9++ = v16;
}
while ( (unsigned long long)v11 < v12 );
}
*(_DWORD *)(v8 + 20) = v7;
v17 = v8;
Bfree(a1, a3);
return v17;
}
| lshift:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,ESI
MOV R14,RDI
MOV R12D,ESI
SHR R12D,0x5
MOV EDI,dword ptr [RDI + 0x8]
MOV EAX,dword ptr [R14 + 0xc]
MOV EBX,dword ptr [R14 + 0x14]
ADD EBX,R12D
LAB_001d80c3:
CMP EBX,EAX
JL 0x001d80cd
INC EDI
ADD EAX,EAX
JMP 0x001d80c3
LAB_001d80cd:
MOV qword ptr [RBP + -0x38],RDX
MOV RSI,RDX
CALL 0x001d7c70
MOV R13,qword ptr [RAX]
CMP R15D,0x20
JC 0x001d8104
DEC R12D
LEA RDX,[0x4 + R12*0x4]
MOV RDI,R13
XOR ESI,ESI
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00129270
MOV RAX,qword ptr [RBP + -0x30]
LEA R13,[R13 + R12*0x4 + 0x4]
LAB_001d8104:
MOV RDX,qword ptr [R14]
MOVSXD RCX,dword ptr [R14 + 0x14]
LEA RSI,[RDX + RCX*0x4]
AND R15D,0x1f
JZ 0x001d8150
MOV R9D,0x20
SUB R9D,R15D
XOR EDI,EDI
LAB_001d8120:
MOV R8D,dword ptr [RDX]
MOV ECX,R15D
SHL R8D,CL
OR R8D,EDI
MOV dword ptr [R13],R8D
ADD R13,0x4
MOV EDI,dword ptr [RDX]
ADD RDX,0x4
MOV ECX,R9D
SHR EDI,CL
CMP RDX,RSI
JC 0x001d8120
MOV dword ptr [R13],EDI
CMP EDI,0x1
SBB EBX,-0x1
JMP 0x001d8163
LAB_001d8150:
MOV ECX,dword ptr [RDX]
ADD RDX,0x4
MOV dword ptr [R13],ECX
ADD R13,0x4
CMP RDX,RSI
JC 0x001d8150
LAB_001d8163:
MOV dword ptr [RAX + 0x14],EBX
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RBX,RAX
CALL 0x001d8069
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
uint *puVar1;
sbyte sVar2;
int iVar3;
int8 *puVar4;
uint *puVar5;
int iVar6;
uint uVar7;
ulong uVar8;
uint *__s;
iVar6 = *(int *)((long)param_1 + 0x14) + (param_2 >> 5);
for (iVar3 = *(int *)((long)param_1 + 0xc); iVar3 <= iVar6; iVar3 = iVar3 * 2) {
}
puVar4 = (int8 *)Balloc();
__s = (uint *)*puVar4;
if (0x1f < param_2) {
uVar8 = (ulong)((param_2 >> 5) - 1);
memset(__s,0,uVar8 * 4 + 4);
__s = __s + uVar8 + 1;
}
puVar5 = (uint *)*param_1;
puVar1 = puVar5 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
uVar7 = *puVar5;
puVar5 = puVar5 + 1;
*__s = uVar7;
__s = __s + 1;
} while (puVar5 < puVar1);
}
else {
sVar2 = (sbyte)(param_2 & 0x1f);
uVar7 = 0;
do {
*__s = *puVar5 << sVar2 | uVar7;
__s = __s + 1;
uVar7 = *puVar5;
puVar5 = puVar5 + 1;
uVar7 = uVar7 >> (0x20U - sVar2 & 0x1f);
} while (puVar5 < puVar1);
*__s = uVar7;
iVar6 = (iVar6 + 1) - (uint)(uVar7 == 0);
}
*(int *)((long)puVar4 + 0x14) = iVar6;
Bfree(param_1,param_3);
return puVar4;
}
| |
50,836 | open_cached_file | eloqsql/mysys/mf_cache.c | my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix,
size_t cache_size, myf cache_myflags)
{
DBUG_ENTER("open_cached_file");
cache->dir= dir;
if (prefix)
{
DBUG_ASSERT(strlen(prefix) == 2);
memcpy(cache->prefix, prefix, 3);
}
else
cache->prefix[0]= 0;
cache->file_name=0;
cache->buffer=0; /* Mark that not open */
if (!init_io_cache(cache, -1, cache_size, WRITE_CACHE, 0L, 0,
MYF(cache_myflags | MY_NABP)))
{
DBUG_RETURN(0);
}
DBUG_RETURN(1);
} | O3 | c | open_cached_file:
movq %rsi, 0xc8(%rdi)
leaq 0xd0(%rdi), %rax
testq %rdx, %rdx
je 0xa8a3b
movb 0x2(%rdx), %sil
movb %sil, 0x2(%rax)
movzwl (%rdx), %edx
movw %dx, (%rax)
jmp 0xa8a3e
movb $0x0, (%rax)
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movq %rax, 0xc0(%rdi)
movq %rax, 0x20(%rdi)
orq $0x4, %r8
movq %r8, (%rsp)
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movq %rcx, %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x94fc6
testl %eax, %eax
setne %al
addq $0x10, %rsp
popq %rbp
retq
| open_cached_file:
mov [rdi+0C8h], rsi
lea rax, [rdi+0D0h]
test rdx, rdx
jz short loc_A8A3B
mov sil, [rdx+2]
mov [rax+2], sil
movzx edx, word ptr [rdx]
mov [rax], dx
jmp short loc_A8A3E
loc_A8A3B:
mov byte ptr [rax], 0
loc_A8A3E:
push rbp
mov rbp, rsp
sub rsp, 10h
xor eax, eax
mov [rdi+0C0h], rax
mov [rdi+20h], rax
or r8, 4
mov [rsp+18h+var_18], r8
mov esi, 0FFFFFFFFh
mov rdx, rcx
mov ecx, 2
xor r8d, r8d
xor r9d, r9d
call init_io_cache
test eax, eax
setnz al
add rsp, 10h
pop rbp
retn
| bool open_cached_file(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
_WORD *v5; // rax
*(_QWORD *)(a1 + 200) = a2;
v5 = (_WORD *)(a1 + 208);
if ( a3 )
{
*(_BYTE *)(a1 + 210) = *(_BYTE *)(a3 + 2);
*v5 = *(_WORD *)a3;
}
else
{
*(_BYTE *)v5 = 0;
}
*(_QWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
return (unsigned int)init_io_cache(a1, 0xFFFFFFFF, a4, 2, 0LL, 0, a5 | 4) != 0;
}
| open_cached_file:
MOV qword ptr [RDI + 0xc8],RSI
LEA RAX,[RDI + 0xd0]
TEST RDX,RDX
JZ 0x001a8a3b
MOV SIL,byte ptr [RDX + 0x2]
MOV byte ptr [RAX + 0x2],SIL
MOVZX EDX,word ptr [RDX]
MOV word ptr [RAX],DX
JMP 0x001a8a3e
LAB_001a8a3b:
MOV byte ptr [RAX],0x0
LAB_001a8a3e:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
XOR EAX,EAX
MOV qword ptr [RDI + 0xc0],RAX
MOV qword ptr [RDI + 0x20],RAX
OR R8,0x4
MOV qword ptr [RSP],R8
MOV ESI,0xffffffff
MOV RDX,RCX
MOV ECX,0x2
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00194fc6
TEST EAX,EAX
SETNZ AL
ADD RSP,0x10
POP RBP
RET
|
bool open_cached_file(long param_1,int8 param_2,int2 *param_3,int8 param_4,
ulong param_5)
{
int iVar1;
*(int8 *)(param_1 + 200) = param_2;
if (param_3 == (int2 *)0x0) {
*(int1 *)(param_1 + 0xd0) = 0;
}
else {
*(int1 *)(param_1 + 0xd2) = *(int1 *)(param_3 + 1);
*(int2 *)(param_1 + 0xd0) = *param_3;
}
*(int8 *)(param_1 + 0xc0) = 0;
*(int8 *)(param_1 + 0x20) = 0;
iVar1 = init_io_cache(param_1,0xffffffff,param_4,2,0,0,param_5 | 4);
return iVar1 != 0;
}
| |
50,837 | minja::Parser::parseExpansion() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseExpansion() {
static std::regex expansion_tok(R"(\*\*?)");
auto op_str = consumeToken(expansion_tok);
auto expr = parseValueExpression();
if (op_str.empty()) return expr;
if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression");
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict);
} | O3 | cpp | minja::Parser::parseExpansion():
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa4f04(%rip), %rax # 0x132200
movb (%rax), %al
testb %al, %al
je 0x8d42f
leaq 0xa4ed3(%rip), %rdx # 0x1321e0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x88460
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x8d524
cmpq $0x0, 0x48(%rsp)
movq 0x10(%rsp), %rax
je 0x8d369
testq %rax, %rax
je 0x8d486
movq (%r14), %rax
movq %rax, 0x60(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0x8d37e
movq 0xa3c19(%rip), %rcx # 0x130f78
cmpb $0x0, (%rcx)
je 0x8d37a
incl 0x8(%rax)
jmp 0x8d37e
movq %rax, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x8d409
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x60(%rsp), %r14
movq %rax, 0x10(%r14)
leaq 0x6e22a(%rip), %rsi # 0xfb5c0
leaq 0x40(%rsp), %rdi
callq 0x1b210
cmpl $0x1, %eax
movl $0x4, %eax
sbbl $0x0, %eax
leaq 0x3c(%rsp), %r9
movl %eax, (%r9)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %r8
movq %r14, %rcx
callq 0x99b82
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x8d3fa
callq 0x267a6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8d409
callq 0x267a6
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d424
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b930
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r14
retq
leaq 0xa4dca(%rip), %rdi # 0x132200
callq 0x1c130
testl %eax, %eax
je 0x8d306
leaq 0xa4d96(%rip), %rdi # 0x1321e0
leaq 0x678fb(%rip), %rsi # 0xf4d4c
movl $0x10, %edx
callq 0x675a8
leaq -0x25bb6(%rip), %rdi # 0x678ac
leaq 0xa4d77(%rip), %rsi # 0x1321e0
leaq 0xa4508(%rip), %rdx # 0x131978
callq 0x1b7f0
leaq 0xa4d84(%rip), %rdi # 0x132200
callq 0x1b600
jmp 0x8d306
movl $0x10, %edi
callq 0x1b480
movq %rax, %r14
leaq 0x678b8(%rip), %rsi # 0xf4d52
movq %rax, %rdi
callq 0x1b350
movq 0xa3b3f(%rip), %rsi # 0x130fe8
movq 0xa3aa0(%rip), %rdx # 0x130f50
movq %r14, %rdi
callq 0x1c040
movq %rax, %rbx
leaq 0xa4d3e(%rip), %rdi # 0x132200
callq 0x1b5f0
jmp 0x8d51c
movq %rax, %rbx
jmp 0x8d4ed
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b6c0
jmp 0x8d4ed
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x8d4ed
callq 0x267a6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8d501
callq 0x267a6
jmp 0x8d501
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d51c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b930
movq %rbx, %rdi
callq 0x1c0d0
| _ZN5minja6Parser14parseExpansionEv:
push r14
push rbx
sub rsp, 78h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok
mov al, [rax]
test al, al
jz loc_8D42F
loc_8D306:
lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rdi, [rsp+88h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_78]; this
mov rsi, r14
call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void)
cmp [rsp+88h+var_40], 0
mov rax, [rsp+88h+var_78]
jz short loc_8D369
test rax, rax
jz loc_8D486
mov rax, [r14]
mov [rsp+88h+var_28], rax
mov rax, [r14+8]
mov [rsp+88h+var_20], rax
test rax, rax
jz short loc_8D37E
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8D37A
inc dword ptr [rax+8]
jmp short loc_8D37E
loc_8D369:
mov [rbx], rax
mov rax, [rsp+88h+var_70]
mov [rbx+8], rax
jmp loc_8D409
loc_8D37A:
lock inc dword ptr [rax+8]
loc_8D37E:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea r14, [rsp+88h+var_28]
mov [r14+10h], rax
lea rsi, asc_FB5BF+1; "*"
lea rdi, [rsp+88h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
cmp eax, 1
mov eax, 4
sbb eax, 0
lea r9, [rsp+88h+var_4C]
mov [r9], eax
lea rdi, [rsp+88h+var_68+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+88h+var_68]
lea rdx, [rsp+88h+var_79]
lea r8, [rsp+88h+var_78]
mov rcx, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
movaps xmm0, [rsp+88h+var_68]
xor eax, eax
mov qword ptr [rsp+88h+var_68+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+88h+var_68], rax
mov rdi, [rsp+88h+var_20]
test rdi, rdi
jz short loc_8D3FA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8D3FA:
mov rdi, [rsp+88h+var_70]
test rdi, rdi
jz short loc_8D409
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8D409:
lea rax, [rsp+88h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8D424
mov rsi, [rsp+88h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D424:
mov rax, rbx
add rsp, 78h
pop rbx
pop r14
retn
loc_8D42F:
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_8D306
lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rsi, asc_F4D4C; "\\*\\*?"
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, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_8D306
loc_8D486:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' 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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_8D51C
mov rbx, rax
jmp short loc_8D4ED
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_8D4ED
mov rbx, rax
mov rdi, [rsp+88h+var_20]
test rdi, rdi
jz short loc_8D4ED
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8D4ED:
mov rdi, [rsp+88h+var_70]
test rdi, rdi
jz short loc_8D501
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_8D501
mov rbx, rax
loc_8D501:
lea rax, [rsp+88h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8D51C
mov rsi, [rsp+88h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D51C:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
__int128 v3; // xmm0
std::runtime_error *exception; // r14
char v6; // [rsp+Fh] [rbp-79h] BYREF
long long v7; // [rsp+10h] [rbp-78h] BYREF
volatile signed __int32 *v8; // [rsp+18h] [rbp-70h]
__int128 v9; // [rsp+20h] [rbp-68h] BYREF
int v10; // [rsp+3Ch] [rbp-4Ch]
void *v11[2]; // [rsp+40h] [rbp-48h] BYREF
long long v12; // [rsp+50h] [rbp-38h] BYREF
long long v13; // [rsp+60h] [rbp-28h] BYREF
volatile signed __int32 *v14; // [rsp+68h] [rbp-20h]
long long v15; // [rsp+70h] [rbp-18h]
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
(long long)"\\*\\*?",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)v11,
(long long)a2,
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
1u);
minja::Parser::parseValueExpression((minja::Parser *)&v7);
if ( v11[1] )
{
if ( !v7 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v14 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v15 = a2[4] - a2[2];
v10 = 4 - ((unsigned int)std::string::compare(v11, "*") == 0);
*(_QWORD *)&v9 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)&v9 + 8,
&v9,
&v6,
&v13,
&v7);
v3 = v9;
*((_QWORD *)&v9 + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v9 = 0LL;
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
if ( v8 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8);
}
else
{
*(_QWORD *)this = v7;
*((_QWORD *)this + 1) = v8;
}
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
return this;
}
| parseExpansion:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x232200]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0018d42f
LAB_0018d306:
LEA RDX,[0x2321e0]
LEA RDI,[RSP + 0x40]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00188460
LAB_0018d31f:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0018d524
CMP qword ptr [RSP + 0x48],0x0
MOV RAX,qword ptr [RSP + 0x10]
JZ 0x0018d369
TEST RAX,RAX
JZ 0x0018d486
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x68],RAX
TEST RAX,RAX
JZ 0x0018d37e
MOV RCX,qword ptr [0x00230f78]
CMP byte ptr [RCX],0x0
JZ 0x0018d37a
INC dword ptr [RAX + 0x8]
JMP 0x0018d37e
LAB_0018d369:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0018d409
LAB_0018d37a:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018d37e:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x10],RAX
LEA RSI,[0x1fb5c0]
LEA RDI,[RSP + 0x40]
CALL 0x0011b210
CMP EAX,0x1
MOV EAX,0x4
SBB EAX,0x0
LEA R9,[RSP + 0x3c]
MOV dword ptr [R9],EAX
LEA RDI,[RSP + 0x28]
MOV qword ptr [RDI + -0x8],0x0
LAB_0018d3c0:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0xf]
LEA R8,[RSP + 0x10]
MOV RCX,R14
CALL 0x00199b82
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x0018d3fa
CALL 0x001267a6
LAB_0018d3fa:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018d409
CALL 0x001267a6
LAB_0018d409:
LEA RAX,[RSP + 0x50]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0018d424
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011b930
LAB_0018d424:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_0018d42f:
LEA RDI,[0x232200]
CALL 0x0011c130
TEST EAX,EAX
JZ 0x0018d306
LAB_0018d443:
LEA RDI,[0x2321e0]
LEA RSI,[0x1f4d4c]
MOV EDX,0x10
CALL 0x001675a8
LAB_0018d45b:
LEA RDI,[0x1678ac]
LEA RSI,[0x2321e0]
LEA RDX,[0x231978]
CALL 0x0011b7f0
LEA RDI,[0x232200]
CALL 0x0011b600
JMP 0x0018d306
LAB_0018d486:
MOV EDI,0x10
CALL 0x0011b480
MOV R14,RAX
LAB_0018d493:
LEA RSI,[0x1f4d52]
MOV RDI,RAX
CALL 0x0011b350
LAB_0018d4a2:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f50]
MOV RDI,R14
CALL 0x0011c040
|
/* minja::Parser::parseExpansion() */
void minja::Parser::parseExpansion(void)
{
long lVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
long *in_RDI;
int1 local_79;
long local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long local_68;
long alStack_60 [2];
int local_4c;
long *local_48;
long local_40;
long local_38 [2];
int8 local_28;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
long local_18;
if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0018d443 to 0018d45a has its CatchHandler @ 0018d4b8 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_);
}
}
consumeToken(&local_48);
/* try { // try from 0018d31f to 0018d32b has its CatchHandler @ 0018d4fe */
parseValueExpression();
if (local_40 == 0) {
*in_RDI = local_78;
in_RDI[1] = (long)local_70;
}
else {
if (local_78 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018d493 to 0018d4a1 has its CatchHandler @ 0018d4ce */
std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression");
/* try { // try from 0018d4a2 to 0018d4b7 has its CatchHandler @ 0018d4c9 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f50);
}
local_28 = *in_RSI;
local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00230f78 == '\0') {
LOCK();
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
}
}
local_18 = in_RSI[4] - in_RSI[2];
iVar2 = std::__cxx11::string::compare((char *)&local_48);
local_4c = 4 - (uint)(iVar2 == 0);
local_68 = 0;
/* try { // try from 0018d3c0 to 0018d3d6 has its CatchHandler @ 0018d4db */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60,&local_68,&local_79,
&local_28,&local_78);
lVar1 = alStack_60[0];
alStack_60[0] = 0;
*in_RDI = local_68;
in_RDI[1] = lVar1;
local_68 = 0;
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return;
}
| |
50,838 | wqueue_add_and_wait | eloqsql/mysys/wqueue.c | void wqueue_add_and_wait(WQUEUE *wqueue,
struct st_my_thread_var *thread,
mysql_mutex_t *lock)
{
DBUG_ENTER("wqueue_add_and_wait");
DBUG_PRINT("enter",
("thread: %p cond: %p mutex: %p",
thread, &thread->suspend, lock));
wqueue_add_to_queue(wqueue, thread);
do
{
DBUG_PRINT("info", ("wait... cond: %p mutex: %p",
&thread->suspend, lock));
mysql_cond_wait(&thread->suspend, lock);
DBUG_PRINT("info", ("wait done cond: %p mutex: %p next: %p",
&thread->suspend, lock,
thread->next));
}
while (thread->next);
DBUG_VOID_RETURN;
} | O3 | c | wqueue_add_and_wait:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0xa67dc
movq 0x88(%rax), %rcx
addq $0x88, %rax
movq %rcx, 0x88(%r14)
jmp 0xa67e3
leaq 0x88(%r14), %rax
movq %r14, (%rax)
movq %r14, (%rdi)
leaq 0x8(%r14), %r15
leaq 0x36175(%rip), %r12 # 0xdc969
cmpq $0x0, 0x38(%r14)
jne 0xa6812
movq %r15, %rdi
movq %rbx, %rsi
callq 0x29430
cmpq $0x0, 0x88(%r14)
jne 0xa67f4
jmp 0xa6827
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0xeb, %ecx
callq 0x2eea0
jmp 0xa6806
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| wqueue_add_and_wait:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov rax, [rdi]
test rax, rax
jz short loc_A67DC
mov rcx, [rax+88h]
add rax, 88h
mov [r14+88h], rcx
jmp short loc_A67E3
loc_A67DC:
lea rax, [r14+88h]
loc_A67E3:
mov [rax], r14
mov [rdi], r14
lea r15, [r14+8]
lea r12, aWorkspaceLlm4b_42; "/workspace/llm4binary/github2025/eloqsq"...
loc_A67F4:
cmp qword ptr [r14+38h], 0
jnz short loc_A6812
mov rdi, r15
mov rsi, rbx
call _pthread_cond_wait
loc_A6806:
cmp qword ptr [r14+88h], 0
jnz short loc_A67F4
jmp short loc_A6827
loc_A6812:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 0EBh
call psi_cond_wait
jmp short loc_A6806
loc_A6827:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long wqueue_add_and_wait(long long *a1, long long a2, long long a3)
{
long long v4; // rax
long long v5; // rcx
_QWORD *v6; // rax
long long result; // rax
v4 = *a1;
if ( *a1 )
{
v5 = *(_QWORD *)(v4 + 136);
v6 = (_QWORD *)(v4 + 136);
*(_QWORD *)(a2 + 136) = v5;
}
else
{
v6 = (_QWORD *)(a2 + 136);
}
*v6 = a2;
*a1 = a2;
do
{
if ( *(_QWORD *)(a2 + 56) )
result = psi_cond_wait(a2 + 8, a3, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/wqueue.c", 0xEBu);
else
result = pthread_cond_wait(a2 + 8, a3);
}
while ( *(_QWORD *)(a2 + 136) );
return result;
}
| wqueue_add_and_wait:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001a67dc
MOV RCX,qword ptr [RAX + 0x88]
ADD RAX,0x88
MOV qword ptr [R14 + 0x88],RCX
JMP 0x001a67e3
LAB_001a67dc:
LEA RAX,[R14 + 0x88]
LAB_001a67e3:
MOV qword ptr [RAX],R14
MOV qword ptr [RDI],R14
LEA R15,[R14 + 0x8]
LEA R12,[0x1dc969]
LAB_001a67f4:
CMP qword ptr [R14 + 0x38],0x0
JNZ 0x001a6812
MOV RDI,R15
MOV RSI,RBX
CALL 0x00129430
LAB_001a6806:
CMP qword ptr [R14 + 0x88],0x0
JNZ 0x001a67f4
JMP 0x001a6827
LAB_001a6812:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0xeb
CALL 0x0012eea0
JMP 0x001a6806
LAB_001a6827:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void wqueue_add_and_wait(long *param_1,long param_2,pthread_mutex_t *param_3)
{
long lVar1;
long *plVar2;
lVar1 = *param_1;
if (lVar1 == 0) {
plVar2 = (long *)(param_2 + 0x88);
}
else {
plVar2 = (long *)(lVar1 + 0x88);
*(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88);
}
*plVar2 = param_2;
*param_1 = param_2;
do {
if (*(long *)(param_2 + 0x38) == 0) {
pthread_cond_wait((pthread_cond_t *)(param_2 + 8),param_3);
}
else {
psi_cond_wait((pthread_cond_t *)(param_2 + 8),param_3,
"/workspace/llm4binary/github2025/eloqsql/mysys/wqueue.c",0xeb);
}
} while (*(long *)(param_2 + 0x88) != 0);
return;
}
| |
50,839 | ma_fcvt | eloqsql/libmariadb/libmariadb/ma_dtoa.c | size_t ma_fcvt(double x, int precision, char *to, my_bool *error)
{
int decpt, sign, len, i;
char *res, *src, *end, *dst= to;
char buf[DTOA_BUFF_SIZE];
DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL);
res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf));
if (decpt == DTOA_OVERFLOW)
{
dtoa_free(res, buf, sizeof(buf));
*to++= '0';
*to= '\0';
if (error != NULL)
*error= TRUE;
return 1;
}
src= res;
len= (int)(end - src);
if (sign)
*dst++= '-';
if (decpt <= 0)
{
*dst++= '0';
*dst++= '.';
for (i= decpt; i < 0; i++)
*dst++= '0';
}
for (i= 1; i <= len; i++)
{
*dst++= *src++;
if (i == decpt && i < len)
*dst++= '.';
}
while (i++ <= decpt)
*dst++= '0';
if (precision > 0)
{
if (len <= decpt)
*dst++= '.';
for (i= precision - MAX(0, (len - decpt)); i > 0; i--)
*dst++= '0';
}
*dst= '\0';
if (error != NULL)
*error= FALSE;
dtoa_free(res, buf, sizeof(buf));
return dst - to;
} | O0 | c | ma_fcvt:
pushq %rbp
movq %rsp, %rbp
subq $0xee0, %rsp # imm = 0xEE0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movsd %xmm0, -0xe80(%rbp)
movl %edi, -0xe84(%rbp)
movq %rsi, -0xe90(%rbp)
movq %rdx, -0xe98(%rbp)
movq -0xe90(%rbp), %rax
movq %rax, -0xec8(%rbp)
movsd -0xe80(%rbp), %xmm0
movl -0xe84(%rbp), %esi
leaq -0xe70(%rbp), %r9
movl $0x5, %edi
leaq -0xe9c(%rbp), %rdx
leaq -0xea0(%rbp), %rcx
leaq -0xec0(%rbp), %r8
movq $0xe60, (%rsp) # imm = 0xE60
callq 0x4ca70
movq %rax, -0xeb0(%rbp)
cmpl $0x270f, -0xe9c(%rbp) # imm = 0x270F
jne 0x4c7af
movq -0xeb0(%rbp), %rdi
leaq -0xe70(%rbp), %rsi
movl $0xe60, %edx # imm = 0xE60
callq 0x4e0d0
movq -0xe90(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xe90(%rbp)
movb $0x30, (%rax)
movq -0xe90(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0xe98(%rbp)
je 0x4c79f
movq -0xe98(%rbp), %rax
movb $0x1, (%rax)
movq $0x1, -0xe78(%rbp)
jmp 0x4ca36
movq -0xeb0(%rbp), %rax
movq %rax, -0xeb8(%rbp)
movq -0xec0(%rbp), %rax
movq -0xeb8(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0xea4(%rbp)
cmpl $0x0, -0xea0(%rbp)
je 0x4c7f5
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2d, (%rax)
cmpl $0x0, -0xe9c(%rbp)
jg 0x4c86e
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2e, (%rax)
movl -0xe9c(%rbp), %eax
movl %eax, -0xea8(%rbp)
cmpl $0x0, -0xea8(%rbp)
jge 0x4c86c
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
movl -0xea8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xea8(%rbp)
jmp 0x4c83a
jmp 0x4c86e
movl $0x1, -0xea8(%rbp)
movl -0xea8(%rbp), %eax
cmpl -0xea4(%rbp), %eax
jg 0x4c8fe
movq -0xeb8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xeb8(%rbp)
movb (%rax), %cl
movq -0xec8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xec8(%rbp)
movb %cl, (%rax)
movl -0xea8(%rbp), %eax
cmpl -0xe9c(%rbp), %eax
jne 0x4c8e8
movl -0xea8(%rbp), %eax
cmpl -0xea4(%rbp), %eax
jge 0x4c8e8
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2e, (%rax)
jmp 0x4c8ea
movl -0xea8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xea8(%rbp)
jmp 0x4c878
jmp 0x4c900
movl -0xea8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xea8(%rbp)
cmpl -0xe9c(%rbp), %eax
jg 0x4c933
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
jmp 0x4c900
cmpl $0x0, -0xe84(%rbp)
jle 0x4c9e8
movl -0xea4(%rbp), %eax
cmpl -0xe9c(%rbp), %eax
jg 0x4c966
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2e, (%rax)
movl -0xe84(%rbp), %eax
movl %eax, -0xecc(%rbp)
movl -0xea4(%rbp), %ecx
subl -0xe9c(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x4c98e
xorl %eax, %eax
movl %eax, -0xed0(%rbp)
jmp 0x4c9a0
movl -0xea4(%rbp), %eax
subl -0xe9c(%rbp), %eax
movl %eax, -0xed0(%rbp)
movl -0xecc(%rbp), %eax
movl -0xed0(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xea8(%rbp)
cmpl $0x0, -0xea8(%rbp)
jle 0x4c9e6
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
movl -0xea8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xea8(%rbp)
jmp 0x4c9b4
jmp 0x4c9e8
movq -0xec8(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0xe98(%rbp)
je 0x4ca06
movq -0xe98(%rbp), %rax
movb $0x0, (%rax)
movq -0xeb0(%rbp), %rdi
leaq -0xe70(%rbp), %rsi
movl $0xe60, %edx # imm = 0xE60
callq 0x4e0d0
movq -0xec8(%rbp), %rax
movq -0xe90(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xe78(%rbp)
movq -0xe78(%rbp), %rax
movq %rax, -0xed8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4ca66
movq -0xed8(%rbp), %rax
addq $0xee0, %rsp # imm = 0xEE0
popq %rbp
retq
callq 0x144c0
nopl (%rax,%rax)
| ma_fcvt:
push rbp
mov rbp, rsp
sub rsp, 0EE0h
mov rax, fs:28h
mov [rbp+var_8], rax
movsd [rbp+var_E80], xmm0
mov [rbp+var_E84], edi
mov [rbp+var_E90], rsi
mov [rbp+var_E98], rdx
mov rax, [rbp+var_E90]
mov [rbp+var_EC8], rax
movsd xmm0, [rbp+var_E80]
mov esi, [rbp+var_E84]
lea r9, [rbp+var_E70]
mov edi, 5
lea rdx, [rbp+var_E9C]
lea rcx, [rbp+var_EA0]
lea r8, [rbp+var_EC0]
mov [rsp+0EE0h+var_EE0], 0E60h
call dtoa
mov [rbp+var_EB0], rax
cmp [rbp+var_E9C], 270Fh
jnz short loc_4C7AF
mov rdi, [rbp+var_EB0]
lea rsi, [rbp+var_E70]
mov edx, 0E60h
call dtoa_free
mov rax, [rbp+var_E90]
mov rcx, rax
add rcx, 1
mov [rbp+var_E90], rcx
mov byte ptr [rax], 30h ; '0'
mov rax, [rbp+var_E90]
mov byte ptr [rax], 0
cmp [rbp+var_E98], 0
jz short loc_4C79F
mov rax, [rbp+var_E98]
mov byte ptr [rax], 1
loc_4C79F:
mov [rbp+var_E78], 1
jmp loc_4CA36
loc_4C7AF:
mov rax, [rbp+var_EB0]
mov [rbp+var_EB8], rax
mov rax, [rbp+var_EC0]
mov rcx, [rbp+var_EB8]
sub rax, rcx
mov [rbp+var_EA4], eax
cmp [rbp+var_EA0], 0
jz short loc_4C7F5
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Dh ; '-'
loc_4C7F5:
cmp [rbp+var_E9C], 0
jg short loc_4C86E
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Eh ; '.'
mov eax, [rbp+var_E9C]
mov [rbp+var_EA8], eax
loc_4C83A:
cmp [rbp+var_EA8], 0
jge short loc_4C86C
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
mov eax, [rbp+var_EA8]
add eax, 1
mov [rbp+var_EA8], eax
jmp short loc_4C83A
loc_4C86C:
jmp short $+2
loc_4C86E:
mov [rbp+var_EA8], 1
loc_4C878:
mov eax, [rbp+var_EA8]
cmp eax, [rbp+var_EA4]
jg short loc_4C8FE
mov rax, [rbp+var_EB8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EB8], rcx
mov cl, [rax]
mov rax, [rbp+var_EC8]
mov rdx, rax
add rdx, 1
mov [rbp+var_EC8], rdx
mov [rax], cl
mov eax, [rbp+var_EA8]
cmp eax, [rbp+var_E9C]
jnz short loc_4C8E8
mov eax, [rbp+var_EA8]
cmp eax, [rbp+var_EA4]
jge short loc_4C8E8
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Eh ; '.'
loc_4C8E8:
jmp short $+2
loc_4C8EA:
mov eax, [rbp+var_EA8]
add eax, 1
mov [rbp+var_EA8], eax
jmp loc_4C878
loc_4C8FE:
jmp short $+2
loc_4C900:
mov eax, [rbp+var_EA8]
mov ecx, eax
add ecx, 1
mov [rbp+var_EA8], ecx
cmp eax, [rbp+var_E9C]
jg short loc_4C933
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
jmp short loc_4C900
loc_4C933:
cmp [rbp+var_E84], 0
jle loc_4C9E8
mov eax, [rbp+var_EA4]
cmp eax, [rbp+var_E9C]
jg short loc_4C966
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Eh ; '.'
loc_4C966:
mov eax, [rbp+var_E84]
mov [rbp+var_ECC], eax
mov ecx, [rbp+var_EA4]
sub ecx, [rbp+var_E9C]
xor eax, eax
cmp eax, ecx
jle short loc_4C98E
xor eax, eax
mov [rbp+var_ED0], eax
jmp short loc_4C9A0
loc_4C98E:
mov eax, [rbp+var_EA4]
sub eax, [rbp+var_E9C]
mov [rbp+var_ED0], eax
loc_4C9A0:
mov eax, [rbp+var_ECC]
mov ecx, [rbp+var_ED0]
sub eax, ecx
mov [rbp+var_EA8], eax
loc_4C9B4:
cmp [rbp+var_EA8], 0
jle short loc_4C9E6
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
mov eax, [rbp+var_EA8]
add eax, 0FFFFFFFFh
mov [rbp+var_EA8], eax
jmp short loc_4C9B4
loc_4C9E6:
jmp short $+2
loc_4C9E8:
mov rax, [rbp+var_EC8]
mov byte ptr [rax], 0
cmp [rbp+var_E98], 0
jz short loc_4CA06
mov rax, [rbp+var_E98]
mov byte ptr [rax], 0
loc_4CA06:
mov rdi, [rbp+var_EB0]
lea rsi, [rbp+var_E70]
mov edx, 0E60h
call dtoa_free
mov rax, [rbp+var_EC8]
mov rcx, [rbp+var_E90]
sub rax, rcx
mov [rbp+var_E78], rax
loc_4CA36:
mov rax, [rbp+var_E78]
mov [rbp+var_ED8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4CA66
mov rax, [rbp+var_ED8]
add rsp, 0EE0h
pop rbp
retn
loc_4CA66:
call ___stack_chk_fail
| long long ma_fcvt(int a1, _BYTE *a2, _BYTE *a3, double a4)
{
_BYTE *v4; // rax
_BYTE *v5; // rax
_BYTE *v6; // rax
char *v7; // rax
char v8; // cl
_BYTE *v9; // rax
_BYTE *v10; // rax
int v11; // eax
_BYTE *v12; // rax
_BYTE *v13; // rax
_BYTE *v14; // rax
int v16; // [rsp+10h] [rbp-ED0h]
_BYTE *v17; // [rsp+18h] [rbp-EC8h]
long long v18; // [rsp+20h] [rbp-EC0h] BYREF
char *v19; // [rsp+28h] [rbp-EB8h]
long long v20; // [rsp+30h] [rbp-EB0h]
int i; // [rsp+38h] [rbp-EA8h]
int v22; // [rsp+3Ch] [rbp-EA4h]
int v23; // [rsp+40h] [rbp-EA0h] BYREF
int v24; // [rsp+44h] [rbp-E9Ch] BYREF
_BYTE *v25; // [rsp+48h] [rbp-E98h]
_BYTE *v26; // [rsp+50h] [rbp-E90h]
int v27; // [rsp+5Ch] [rbp-E84h]
double v28; // [rsp+60h] [rbp-E80h]
_BYTE v30[3688]; // [rsp+70h] [rbp-E70h] BYREF
unsigned long long v31; // [rsp+ED8h] [rbp-8h]
v31 = __readfsqword(0x28u);
v28 = a4;
v27 = a1;
v26 = a2;
v25 = a3;
v17 = a2;
v20 = dtoa(5, a1, (unsigned int)&v24, (unsigned int)&v23, (unsigned int)&v18, (unsigned int)v30, 3680LL);
if ( v24 == 9999 )
{
dtoa_free(v20, v30, 3680LL);
v4 = v26++;
*v4 = 48;
*v26 = 0;
if ( v25 )
*v25 = 1;
return 1LL;
}
else
{
v19 = (char *)v20;
v22 = v18 - v20;
if ( v23 )
{
v17 = a2 + 1;
*a2 = 45;
}
if ( v24 <= 0 )
{
*v17 = 48;
v5 = v17 + 1;
v17 += 2;
*v5 = 46;
for ( i = v24; i < 0; ++i )
{
v6 = v17++;
*v6 = 48;
}
}
for ( i = 1; i <= v22; ++i )
{
v7 = v19++;
v8 = *v7;
v9 = v17++;
*v9 = v8;
if ( i == v24 && i < v22 )
{
v10 = v17++;
*v10 = 46;
}
}
while ( 1 )
{
v11 = i++;
if ( v11 > v24 )
break;
v12 = v17++;
*v12 = 48;
}
if ( v27 > 0 )
{
if ( v22 <= v24 )
{
v13 = v17++;
*v13 = 46;
}
if ( v22 - v24 >= 0 )
v16 = v22 - v24;
else
v16 = 0;
for ( i = v27 - v16; i > 0; --i )
{
v14 = v17++;
*v14 = 48;
}
}
*v17 = 0;
if ( v25 )
*v25 = 0;
dtoa_free(v20, v30, 3680LL);
return v17 - v26;
}
}
| ma_fcvt:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xee0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOVSD qword ptr [RBP + -0xe80],XMM0
MOV dword ptr [RBP + -0xe84],EDI
MOV qword ptr [RBP + -0xe90],RSI
MOV qword ptr [RBP + -0xe98],RDX
MOV RAX,qword ptr [RBP + -0xe90]
MOV qword ptr [RBP + -0xec8],RAX
MOVSD XMM0,qword ptr [RBP + -0xe80]
MOV ESI,dword ptr [RBP + -0xe84]
LEA R9,[RBP + -0xe70]
MOV EDI,0x5
LEA RDX,[RBP + -0xe9c]
LEA RCX,[RBP + -0xea0]
LEA R8,[RBP + -0xec0]
MOV qword ptr [RSP],0xe60
CALL 0x0014ca70
MOV qword ptr [RBP + -0xeb0],RAX
CMP dword ptr [RBP + -0xe9c],0x270f
JNZ 0x0014c7af
MOV RDI,qword ptr [RBP + -0xeb0]
LEA RSI,[RBP + -0xe70]
MOV EDX,0xe60
CALL 0x0014e0d0
MOV RAX,qword ptr [RBP + -0xe90]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xe90],RCX
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RBP + -0xe90]
MOV byte ptr [RAX],0x0
CMP qword ptr [RBP + -0xe98],0x0
JZ 0x0014c79f
MOV RAX,qword ptr [RBP + -0xe98]
MOV byte ptr [RAX],0x1
LAB_0014c79f:
MOV qword ptr [RBP + -0xe78],0x1
JMP 0x0014ca36
LAB_0014c7af:
MOV RAX,qword ptr [RBP + -0xeb0]
MOV qword ptr [RBP + -0xeb8],RAX
MOV RAX,qword ptr [RBP + -0xec0]
MOV RCX,qword ptr [RBP + -0xeb8]
SUB RAX,RCX
MOV dword ptr [RBP + -0xea4],EAX
CMP dword ptr [RBP + -0xea0],0x0
JZ 0x0014c7f5
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2d
LAB_0014c7f5:
CMP dword ptr [RBP + -0xe9c],0x0
JG 0x0014c86e
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2e
MOV EAX,dword ptr [RBP + -0xe9c]
MOV dword ptr [RBP + -0xea8],EAX
LAB_0014c83a:
CMP dword ptr [RBP + -0xea8],0x0
JGE 0x0014c86c
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
MOV EAX,dword ptr [RBP + -0xea8]
ADD EAX,0x1
MOV dword ptr [RBP + -0xea8],EAX
JMP 0x0014c83a
LAB_0014c86c:
JMP 0x0014c86e
LAB_0014c86e:
MOV dword ptr [RBP + -0xea8],0x1
LAB_0014c878:
MOV EAX,dword ptr [RBP + -0xea8]
CMP EAX,dword ptr [RBP + -0xea4]
JG 0x0014c8fe
MOV RAX,qword ptr [RBP + -0xeb8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xeb8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0xec8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0xec8],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0xea8]
CMP EAX,dword ptr [RBP + -0xe9c]
JNZ 0x0014c8e8
MOV EAX,dword ptr [RBP + -0xea8]
CMP EAX,dword ptr [RBP + -0xea4]
JGE 0x0014c8e8
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2e
LAB_0014c8e8:
JMP 0x0014c8ea
LAB_0014c8ea:
MOV EAX,dword ptr [RBP + -0xea8]
ADD EAX,0x1
MOV dword ptr [RBP + -0xea8],EAX
JMP 0x0014c878
LAB_0014c8fe:
JMP 0x0014c900
LAB_0014c900:
MOV EAX,dword ptr [RBP + -0xea8]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0xea8],ECX
CMP EAX,dword ptr [RBP + -0xe9c]
JG 0x0014c933
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
JMP 0x0014c900
LAB_0014c933:
CMP dword ptr [RBP + -0xe84],0x0
JLE 0x0014c9e8
MOV EAX,dword ptr [RBP + -0xea4]
CMP EAX,dword ptr [RBP + -0xe9c]
JG 0x0014c966
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2e
LAB_0014c966:
MOV EAX,dword ptr [RBP + -0xe84]
MOV dword ptr [RBP + -0xecc],EAX
MOV ECX,dword ptr [RBP + -0xea4]
SUB ECX,dword ptr [RBP + -0xe9c]
XOR EAX,EAX
CMP EAX,ECX
JLE 0x0014c98e
XOR EAX,EAX
MOV dword ptr [RBP + -0xed0],EAX
JMP 0x0014c9a0
LAB_0014c98e:
MOV EAX,dword ptr [RBP + -0xea4]
SUB EAX,dword ptr [RBP + -0xe9c]
MOV dword ptr [RBP + -0xed0],EAX
LAB_0014c9a0:
MOV EAX,dword ptr [RBP + -0xecc]
MOV ECX,dword ptr [RBP + -0xed0]
SUB EAX,ECX
MOV dword ptr [RBP + -0xea8],EAX
LAB_0014c9b4:
CMP dword ptr [RBP + -0xea8],0x0
JLE 0x0014c9e6
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
MOV EAX,dword ptr [RBP + -0xea8]
ADD EAX,-0x1
MOV dword ptr [RBP + -0xea8],EAX
JMP 0x0014c9b4
LAB_0014c9e6:
JMP 0x0014c9e8
LAB_0014c9e8:
MOV RAX,qword ptr [RBP + -0xec8]
MOV byte ptr [RAX],0x0
CMP qword ptr [RBP + -0xe98],0x0
JZ 0x0014ca06
MOV RAX,qword ptr [RBP + -0xe98]
MOV byte ptr [RAX],0x0
LAB_0014ca06:
MOV RDI,qword ptr [RBP + -0xeb0]
LEA RSI,[RBP + -0xe70]
MOV EDX,0xe60
CALL 0x0014e0d0
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,qword ptr [RBP + -0xe90]
SUB RAX,RCX
MOV qword ptr [RBP + -0xe78],RAX
LAB_0014ca36:
MOV RAX,qword ptr [RBP + -0xe78]
MOV qword ptr [RBP + -0xed8],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014ca66
MOV RAX,qword ptr [RBP + -0xed8]
ADD RSP,0xee0
POP RBP
RET
LAB_0014ca66:
CALL 0x001144c0
|
long ma_fcvt(int8 param_1,int param_2,int1 *param_3,int1 *param_4)
{
int1 *puVar1;
long in_FS_OFFSET;
int local_ed8;
int1 *local_ed0;
int local_ec8 [2];
int1 *local_ec0;
int1 *local_eb8;
int local_eb0;
int local_eac;
int local_ea8;
int local_ea4;
int1 *local_ea0;
int1 *local_e98;
int local_e8c;
int8 local_e88;
long local_e80;
int1 local_e78 [3688];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_ea0 = param_4;
local_e98 = param_3;
local_e8c = param_2;
local_e88 = param_1;
local_eb8 = (int1 *)dtoa(param_1,5,param_2,&local_ea4,&local_ea8,local_ec8,local_e78,0xe60);
if (local_ea4 == 9999) {
dtoa_free(local_eb8,local_e78,0xe60);
*local_e98 = 0x30;
local_e98[1] = 0;
if (local_ea0 != (int1 *)0x0) {
*local_ea0 = 1;
}
local_e80 = 1;
local_e98 = local_e98 + 1;
}
else {
local_eac = local_ec8[0] - (int)local_eb8;
local_ed0 = param_3;
if (local_ea8 != 0) {
local_ed0 = param_3 + 1;
*param_3 = 0x2d;
}
if (local_ea4 < 1) {
*local_ed0 = 0x30;
local_ed0[1] = 0x2e;
local_ed0 = local_ed0 + 2;
for (local_eb0 = local_ea4; local_eb0 < 0; local_eb0 = local_eb0 + 1) {
*local_ed0 = 0x30;
local_ed0 = local_ed0 + 1;
}
}
local_ec0 = local_eb8;
for (local_eb0 = 1; local_eb0 <= local_eac; local_eb0 = local_eb0 + 1) {
puVar1 = local_ed0 + 1;
*local_ed0 = *local_ec0;
if ((local_eb0 == local_ea4) && (local_eb0 < local_eac)) {
*puVar1 = 0x2e;
puVar1 = local_ed0 + 2;
}
local_ed0 = puVar1;
local_ec0 = local_ec0 + 1;
}
while (local_eb0 <= local_ea4) {
*local_ed0 = 0x30;
local_ed0 = local_ed0 + 1;
local_eb0 = local_eb0 + 1;
}
local_eb0 = local_eb0 + 1;
if (0 < local_e8c) {
if (local_eac <= local_ea4) {
*local_ed0 = 0x2e;
local_ed0 = local_ed0 + 1;
}
if (local_eac - local_ea4 < 0) {
local_ed8 = 0;
}
else {
local_ed8 = local_eac - local_ea4;
}
for (local_eb0 = local_e8c - local_ed8; 0 < local_eb0; local_eb0 = local_eb0 + -1) {
*local_ed0 = 0x30;
local_ed0 = local_ed0 + 1;
}
}
*local_ed0 = 0;
if (local_ea0 != (int1 *)0x0) {
*local_ea0 = 0;
}
dtoa_free(local_eb8,local_e78,0xe60);
local_e80 = (long)local_ed0 - (long)local_e98;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_e80;
}
| |
50,840 | 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>>>>>::unget() | llama.cpp/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | 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>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x8666b
leaq 0x28(%rdi), %rcx
jmp 0x86678
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x8667e
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x86695
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x86696
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x9339e(%rip), %rdi # 0x119a3c
leaq 0x933d2(%rip), %rdx # 0x119a77
leaq 0x93551(%rip), %rcx # 0x119bfd
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x20e20
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_8666B
lea rcx, [rdi+28h]
jmp short loc_86678
loc_8666B:
mov rax, [rdi+30h]
test rax, rax
jz short loc_8667E
lea rcx, [rdi+30h]
loc_86678:
dec rax
mov [rcx], rax
loc_8667E:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_86695
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_86696
dec rax
mov [rdi+40h], rax
locret_86695:
retn
loc_86696:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| 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>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
long long v3; // rax
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
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>>>::reset("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0018666b
LEA RCX,[RDI + 0x28]
JMP 0x00186678
LAB_0018666b:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0018667e
LEA RCX,[RDI + 0x30]
LAB_00186678:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0018667e:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x00186695
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x00186696
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_00186695:
RET
LAB_00186696:
PUSH RAX
LEA RDI,[0x219a3c]
LEA RDX,[0x219a77]
LEA RCX,[0x219bfd]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x00120e20
|
/* 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 > > >::unget() */
void __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>>>
::unget(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)
{
long lVar1;
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>>>
*plVar2;
int8 in_R8;
int8 in_R9;
this[0x18] = (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>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_0018667e;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0018667e:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
| |
50,841 | uf_space_prespace_selected | eloqsql/storage/myisam/mi_packrec.c | static void uf_space_prespace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill((uchar*) to,(end-to),' ');
else
{
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill((uchar*) to,spaces,' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
}
else
decode_bytes(rec,bit_buff,to,end);
}
} | O0 | c | uf_space_prespace_selected:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xe7937
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xe795b
jmp 0xe7979
movq -0x10(%rbp), %rdi
callq 0xe67f0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xe7979
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x2c300
jmp 0xe7aa2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xe79ab
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xe79d3
jmp 0xe7a8b
movq -0x10(%rbp), %rdi
callq 0xe67f0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xe7a8b
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jb 0xe7a16
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, %edx
leaq 0x219932(%rip), %rcx # 0x301340
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0xe7a29
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0xe4fa0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0xe7a4b
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0xe7aa2
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x2c300
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0xe7a89
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %eax
addq %rax, %rdx
movq -0x20(%rbp), %rcx
callq 0xe6f00
jmp 0xe7aa0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xe6f00
jmp 0xe7aa2
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| uf_space_prespace_selected_0:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_E7937
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_E795B
jmp short loc_E7979
loc_E7937:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_E7979
loc_E795B:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
mov esi, 20h ; ' '
call _memset
jmp loc_E7AA2
loc_E7979:
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_E79AB
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_E79D3
jmp loc_E7A8B
loc_E79AB:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz loc_E7A8B
loc_E79D3:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+1Ch]
jb short loc_E7A16
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+1Ch]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+1Ch]
mov edx, ecx
lea rcx, mask_0
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_E7A29
loc_E7A16:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+1Ch]
call fill_and_get_bits_0
mov [rbp+var_28], eax
loc_E7A29:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_E7A4B
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_E7AA2
loc_E7A4B:
mov rdi, [rbp+var_18]
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_E7A89
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_24]
add rdx, rax
mov rcx, [rbp+var_20]
call decode_bytes_0
loc_E7A89:
jmp short loc_E7AA0
loc_E7A8B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call decode_bytes_0
loc_E7AA0:
jmp short $+2
loc_E7AA2:
add rsp, 30h
pop rbp
retn
| long long uf_space_prespace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4)
{
int v4; // eax
int v5; // ecx
long long result; // rax
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
int v10; // ecx
unsigned int bits_0; // [rsp+8h] [rbp-28h]
if ( !a2[1] )
{
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
goto LABEL_6;
return memset(a3, 32LL, a4 - a3);
}
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) != 0 )
return memset(a3, 32LL, a4 - a3);
LABEL_6:
if ( a2[1] )
{
v7 = *a2;
v8 = a2[1] - 1;
a2[1] = v8;
if ( ((1 << v8) & v7) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) )
{
bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28));
}
else
{
v9 = *a2;
v10 = a2[1] - *(_DWORD *)(a1 + 28);
a2[1] = v10;
bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10);
}
if ( &a3[bits_0] <= a4 )
{
memset(a3, 32LL, bits_0);
result = (long long)&a3[bits_0];
if ( (_BYTE *)result != a4 )
return decode_bytes_0(a1, (long long)a2, &a3[bits_0], a4);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
| uf_space_prespace_selected:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
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 RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001e7937
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001e795b
JMP 0x001e7979
LAB_001e7937:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e67f0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001e7979
LAB_001e795b:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
MOV ESI,0x20
CALL 0x0012c300
JMP 0x001e7aa2
LAB_001e7979:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001e79ab
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001e79d3
JMP 0x001e7a8b
LAB_001e79ab:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e67f0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001e7a8b
LAB_001e79d3:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x1c]
JC 0x001e7a16
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x1c]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x1c]
MOV EDX,ECX
LEA RCX,[0x401340]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001e7a29
LAB_001e7a16:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x1c]
CALL 0x001e4fa0
MOV dword ptr [RBP + -0x28],EAX
LAB_001e7a29:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001e7a4b
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x001e7aa2
LAB_001e7a4b:
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x0012c300
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001e7a89
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001e6f00
LAB_001e7a89:
JMP 0x001e7aa0
LAB_001e7a8b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001e6f00
LAB_001e7aa0:
JMP 0x001e7aa2
LAB_001e7aa2:
ADD RSP,0x30
POP RBP
RET
|
void uf_space_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
decode_bytes(param_1,param_2,param_3,param_4);
}
else {
if (param_2[1] < *(uint *)(param_1 + 0x1c)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x1c);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4);
}
if (param_4 < (long)param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)local_30);
if ((long)param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4);
}
}
}
}
else {
memset(param_3,0x20,param_4 - (long)param_3);
}
return;
}
| |
50,842 | refreshMultiLine(linenoiseState*, int) | ericcurtin[P]linenoise/linenoise.cpp | static void refreshMultiLine(struct linenoiseState * l, int flags) {
char seq[64];
size_t pcollen = promptTextColumnLen(l->prompt, strlen(l->prompt));
int colpos = columnPosForMultiLine(l->buf, l->len, l->len, l->cols, pcollen);
int colpos2; /* cursor column position. */
int rows = (pcollen + colpos + l->cols - 1) / l->cols; /* rows used by current buf. */
int rpos = (pcollen + l->oldcolpos + l->cols) / l->cols; /* cursor relative row. */
int rpos2; /* rpos after refresh. */
int col; /* column position, zero-based. */
int old_rows = l->oldrows;
int fd = l->ofd, j;
std::string ab;
l->oldrows = rows;
/* First step: clear all the lines used before. To do so start by
* going to the last row. */
if (flags & REFRESH_CLEAN) {
if (old_rows - rpos > 0) {
snprintf(seq, 64, "\x1b[%dB", old_rows - rpos);
ab.append(seq);
}
/* Now for every row clear it, go up. */
for (j = 0; j < old_rows - 1; j++) {
snprintf(seq, 64, "\r\x1b[0K\x1b[1A");
ab.append(seq);
}
}
if (flags & REFRESH_ALL) {
/* Clean the top line. */
snprintf(seq, 64, "\r\x1b[0K");
ab.append(seq);
}
/* Get column length to cursor position */
colpos2 = columnPosForMultiLine(l->buf, l->len, l->pos, l->cols, pcollen);
if (flags & REFRESH_WRITE) {
/* Write the prompt and the current buffer content */
ab.append(l->prompt);
if (maskmode == 1) {
for (unsigned int i = 0; i < l->len; ++i) {
ab.append("*");
}
} else {
ab.append(l->buf, l->len);
}
/* Show hits if any. */
refreshShowHints(ab, l, pcollen);
/* If we are at the very end of the screen with our prompt, we need to
* emit a newline and move the prompt to the first column. */
if (l->pos && l->pos == l->len && (colpos2 + pcollen) % l->cols == 0) {
ab.append("\n");
snprintf(seq, 64, "\r");
ab.append(seq);
rows++;
if (rows > (int) l->oldrows) {
l->oldrows = rows;
}
}
/* Move cursor to right position. */
rpos2 = (pcollen + colpos2 + l->cols) / l->cols; /* Current cursor relative row */
/* Go up till we reach the expected position. */
if (rows - rpos2 > 0) {
snprintf(seq, 64, "\x1b[%dA", rows - rpos2);
ab.append(seq);
}
/* Set column. */
col = (pcollen + colpos2) % l->cols;
if (col) {
snprintf(seq, 64, "\r\x1b[%dC", col);
} else {
snprintf(seq, 64, "\r");
}
ab.append(seq);
}
l->oldcolpos = colpos2;
(void) !write(fd, ab.c_str(), ab.size()); /* Can't recover from write error. */
} | O2 | cpp | refreshMultiLine(linenoiseState*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, %r12d
movq %rdi, %rbx
movq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x3fee
movq %rax, %r14
movq 0x18(%rbx), %rdi
movq 0x48(%rbx), %rdx
movq 0x50(%rbx), %rcx
movq %rdx, %rsi
movq %rax, %r8
callq 0x4072
cltq
movq 0x50(%rbx), %rsi
movq %r14, 0x38(%rsp)
leaq (%rsi,%r14), %rcx
addq %rcx, %rax
decq %rax
xorl %edx, %edx
divq %rsi
movq 0x40(%rbx), %rdi
movl 0x58(%rbx), %ebp
movl 0x14(%rbx), %edx
movl %edx, 0x34(%rsp)
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb $0x0, (%rdx)
movq %rax, 0x8(%rsp)
movslq %eax, %rdx
movq %rdx, 0x58(%rbx)
testb $0x1, %r12b
jne 0x2842
testb $0x3, %r12b
movq 0x38(%rsp), %r14
je 0x2815
leaq 0x40(%rsp), %rsi
movw $0x4b, 0x4(%rsi)
movl $0x305b1b0d, (%rsi) # imm = 0x305B1B0D
leaq 0x10(%rsp), %rdi
callq 0x2390
movq 0x48(%rbx), %rsi
movq 0x18(%rbx), %rdi
movq 0x38(%rbx), %rdx
movq 0x50(%rbx), %rcx
movq %r14, %r8
callq 0x4072
movq %rax, %r13
testb $0x2, %r12b
jne 0x28be
movslq %r13d, %r12
jmp 0x29c8
addq %rdi, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movl %ebp, %ecx
subl %eax, %ecx
jle 0x2879
leaq 0x706b(%rip), %rdx # 0x98c5
leaq 0x40(%rsp), %r13
pushq $0x40
popq %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x22f0
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x2390
cmpl $0x2, %ebp
pushq $0x1
popq %r15
cmovgel %ebp, %r15d
decl %r15d
movabsq $0x315b1b4b305b1b0d, %r14 # imm = 0x315B1B4B305B1B0D
leaq 0x10(%rsp), %r13
leaq 0x40(%rsp), %rbp
subl $0x1, %r15d
jb 0x27ef
movq %r14, 0x40(%rsp)
movw $0x41, 0x48(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2390
jmp 0x289b
movq 0x28(%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x2390
cmpb $0x1, 0x995d(%rip) # 0xc230
jne 0x28fd
xorl %r15d, %r15d
leaq 0x6ffc(%rip), %r12 # 0x98db
leaq 0x10(%rsp), %rbp
movl %r15d, %eax
cmpq %rax, 0x48(%rbx)
jbe 0x290f
movq %rbp, %rdi
movq %r12, %rsi
callq 0x2390
incl %r15d
jmp 0x28e4
movq 0x18(%rbx), %rsi
movq 0x48(%rbx), %rdx
leaq 0x10(%rsp), %rdi
callq 0x2060
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4105
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x2943
cmpq 0x48(%rbx), %rax
jne 0x2943
movslq %r13d, %rax
addq %r14, %rax
xorl %edx, %edx
divq 0x50(%rbx)
testq %rdx, %rdx
je 0x29fb
movq 0x8(%rsp), %rax
movl %eax, %ecx
movslq %r13d, %r12
addq %r12, %r14
movq 0x50(%rbx), %rsi
leaq (%rsi,%r14), %rax
xorl %edx, %edx
divq %rsi
subl %eax, %ecx
jle 0x298b
leaq 0x6f75(%rip), %rdx # 0x98dd
leaq 0x40(%rsp), %r15
pushq $0x40
popq %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x22f0
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x2390
movq 0x50(%rbx), %rsi
movq %r14, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, %rcx
testl %ecx, %ecx
je 0x29b2
leaq 0x6f42(%rip), %rdx # 0x98e3
leaq 0x40(%rsp), %rdi
pushq $0x40
popq %rsi
xorl %eax, %eax
callq 0x22f0
jmp 0x29b9
movw $0xd, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2390
movq %r12, 0x40(%rbx)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0x34(%rsp), %edi
callq 0x2080
leaq 0x10(%rsp), %rdi
callq 0x20d0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6eb6(%rip), %rsi # 0x98b8
leaq 0x10(%rsp), %rdi
callq 0x2390
leaq 0x40(%rsp), %rsi
movw $0xd, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x2390
movq 0x8(%rsp), %rax
leal 0x1(%rax), %ecx
cmpl 0x58(%rbx), %eax
jl 0x294a
movslq %ecx, %rax
movq %rax, 0x58(%rbx)
jmp 0x294a
jmp 0x2a41
jmp 0x2a41
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2330
| _ZL16refreshMultiLineP14linenoiseStatei:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r12d, esi
mov rbx, rdi
mov r14, [rdi+28h]
mov rdi, r14
call _strlen
mov rdi, r14; char *
mov rsi, rax; unsigned __int64
call _ZL19promptTextColumnLenPKcm; promptTextColumnLen(char const*,ulong)
mov r14, rax
mov rdi, [rbx+18h]; char *
mov rdx, [rbx+48h]; unsigned __int64
mov rcx, [rbx+50h]; unsigned __int64
mov rsi, rdx; unsigned __int64
mov r8, rax; unsigned __int64
call _ZL21columnPosForMultiLinePKcmmmm; columnPosForMultiLine(char const*,ulong,ulong,ulong,ulong)
cdqe
mov rsi, [rbx+50h]
mov [rsp+0B8h+var_80], r14
lea rcx, [rsi+r14]
add rax, rcx
dec rax
xor edx, edx
div rsi
mov rdi, [rbx+40h]
mov ebp, [rbx+58h]
mov edx, [rbx+14h]
mov [rsp+0B8h+var_84], edx
lea rdx, [rsp+0B8h+var_98]
mov [rdx-10h], rdx
and qword ptr [rdx-8], 0
mov byte ptr [rdx], 0
mov [rsp+0B8h+var_B0], rax
movsxd rdx, eax
mov [rbx+58h], rdx
test r12b, 1
jnz short loc_2842
loc_27EF:
test r12b, 3
mov r14, [rsp+0B8h+var_80]
jz short loc_2815
lea rsi, [rsp+0B8h+var_78]
mov word ptr [rsi+4], 4Bh ; 'K'
mov dword ptr [rsi], 305B1B0Dh
lea rdi, [rsp+0B8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_2815:
mov rsi, [rbx+48h]; unsigned __int64
mov rdi, [rbx+18h]; char *
mov rdx, [rbx+38h]; unsigned __int64
mov rcx, [rbx+50h]; unsigned __int64
mov r8, r14; unsigned __int64
call _ZL21columnPosForMultiLinePKcmmmm; columnPosForMultiLine(char const*,ulong,ulong,ulong,ulong)
mov r13, rax
test r12b, 2
jnz loc_28BE
movsxd r12, r13d
jmp loc_29C8
loc_2842:
add rcx, rdi
mov rax, rcx
xor edx, edx
div rsi
mov ecx, ebp
sub ecx, eax
jle short loc_2879
lea rdx, aDb; "\x1B[%dB"
lea r13, [rsp+0B8h+var_78]
push 40h ; '@'
pop rsi
mov rdi, r13
xor eax, eax
call _snprintf
lea rdi, [rsp+0B8h+var_A8]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_2879:
cmp ebp, 2
push 1
pop r15
cmovge r15d, ebp
dec r15d
mov r14, 315B1B4B305B1B0Dh
lea r13, [rsp+0B8h+var_A8]
lea rbp, [rsp+0B8h+var_78]
loc_289B:
sub r15d, 1
jb loc_27EF
mov [rsp+0B8h+var_78], r14
mov [rsp+0B8h+var_70], 41h ; 'A'
mov rdi, r13
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_289B
loc_28BE:
mov rsi, [rbx+28h]
lea rdi, [rsp+0B8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
cmp cs:_ZL8maskmode, 1; maskmode
jnz short loc_28FD
xor r15d, r15d
lea r12, asc_98DB; "*"
lea rbp, [rsp+0B8h+var_A8]
loc_28E4:
mov eax, r15d
cmp [rbx+48h], rax
jbe short loc_290F
mov rdi, rbp
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
inc r15d
jmp short loc_28E4
loc_28FD:
mov rsi, [rbx+18h]
mov rdx, [rbx+48h]
lea rdi, [rsp+0B8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
loc_290F:
lea rdi, [rsp+0B8h+var_A8]
mov rsi, rbx
mov edx, r14d
call _ZL16refreshShowHintsRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP14linenoiseStatei; refreshShowHints(std::string &,linenoiseState *,int)
mov rax, [rbx+38h]
test rax, rax
jz short loc_2943
cmp rax, [rbx+48h]
jnz short loc_2943
movsxd rax, r13d
add rax, r14
xor edx, edx
div qword ptr [rbx+50h]
test rdx, rdx
jz loc_29FB
loc_2943:
mov rax, [rsp+0B8h+var_B0]
mov ecx, eax
loc_294A:
movsxd r12, r13d
add r14, r12
mov rsi, [rbx+50h]
lea rax, [rsi+r14]
xor edx, edx
div rsi
sub ecx, eax
jle short loc_298B
lea rdx, aDa; "\x1B[%dA"
lea r15, [rsp+0B8h+var_78]
push 40h ; '@'
pop rsi
mov rdi, r15
xor eax, eax
call _snprintf
lea rdi, [rsp+0B8h+var_A8]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rbx+50h]
loc_298B:
mov rax, r14
xor edx, edx
div rsi
mov rcx, rdx
test ecx, ecx
jz short loc_29B2
lea rdx, aDc; "\r\x1B[%dC"
lea rdi, [rsp+0B8h+var_78]
push 40h ; '@'
pop rsi
xor eax, eax
call _snprintf
jmp short loc_29B9
loc_29B2:
mov word ptr [rsp+0B8h+var_78], 0Dh
loc_29B9:
lea rdi, [rsp+0B8h+var_A8]
lea rsi, [rsp+0B8h+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_29C8:
mov [rbx+40h], r12
mov rsi, [rsp+0B8h+var_A8]
mov rdx, [rsp+0B8h+var_A0]
mov edi, [rsp+0B8h+var_84]
call _write
lea rdi, [rsp+0B8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29FB:
lea rsi, aC02xDTypeQuitT+22h; "\n"
lea rdi, [rsp+0B8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rsi, [rsp+0B8h+var_78]
mov word ptr [rsi], 0Dh
lea rdi, [rsp+0B8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, [rsp+0B8h+var_B0]
lea ecx, [rax+1]
cmp eax, [rbx+58h]
jl loc_294A
movsxd rax, ecx
mov [rbx+58h], rax
jmp loc_294A
jmp short loc_2A41
jmp short $+2
loc_2A41:
mov rbx, rax
lea rdi, [rsp+arg_8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long refreshMultiLine(long long a1, char a2)
{
const char *v4; // r14
unsigned long long v5; // rax
unsigned long long v6; // r14
int v7; // eax
unsigned long long v8; // rsi
long long v9; // rdi
int v10; // ebp
unsigned long long v11; // r14
int v12; // eax
int v13; // r13d
long long v14; // r12
unsigned long long v15; // rax
int v16; // r15d
int v17; // r15d
unsigned int i; // r15d
long long v20; // rax
int v21; // ecx
unsigned long long v22; // r14
unsigned long long v23; // rsi
unsigned long long v24; // rax
bool v25; // cc
int v26; // ecx
unsigned long long v28; // [rsp+8h] [rbp-B0h]
char *v29; // [rsp+10h] [rbp-A8h] BYREF
long long v30; // [rsp+18h] [rbp-A0h]
char v31; // [rsp+20h] [rbp-98h] BYREF
unsigned int v32; // [rsp+34h] [rbp-84h]
unsigned long long v33; // [rsp+38h] [rbp-80h]
char v34[120]; // [rsp+40h] [rbp-78h] BYREF
v4 = *(const char **)(a1 + 40);
v5 = strlen(v4);
v6 = promptTextColumnLen(v4, v5);
v7 = columnPosForMultiLine(
*(const char **)(a1 + 24),
*(_QWORD *)(a1 + 72),
*(_QWORD *)(a1 + 72),
*(_QWORD *)(a1 + 80),
v6);
v8 = *(_QWORD *)(a1 + 80);
v33 = v6;
v9 = *(_QWORD *)(a1 + 64);
v10 = *(_DWORD *)(a1 + 88);
v32 = *(_DWORD *)(a1 + 20);
v29 = &v31;
v30 = 0LL;
v31 = 0;
v28 = (v8 + v6 + v7 - 1) / v8;
*(_QWORD *)(a1 + 88) = (int)v28;
if ( (a2 & 1) != 0 )
{
v15 = (v9 + v8 + v6) / v8;
if ( v10 > (int)v15 )
{
snprintf(v34, 64LL, "\x1B[%dB", v10 - v15);
std::string::append(&v29, v34);
}
v16 = 1;
if ( v10 >= 2 )
v16 = v10;
v17 = v16 - 1;
while ( v17-- != 0 )
{
strcpy(v34, "\r\x1B[0K\x1B[1A");
std::string::append(&v29, v34);
}
}
v11 = v33;
if ( (a2 & 3) != 0 )
{
strcpy(v34, "\r\x1B[0K");
std::string::append(&v29, v34);
}
v12 = columnPosForMultiLine(
*(const char **)(a1 + 24),
*(_QWORD *)(a1 + 72),
*(_QWORD *)(a1 + 56),
*(_QWORD *)(a1 + 80),
v11);
v13 = v12;
if ( (a2 & 2) != 0 )
{
std::string::append(&v29, *(_QWORD *)(a1 + 40));
if ( maskmode == 1 )
{
for ( i = 0; *(_QWORD *)(a1 + 72) > (unsigned long long)i; ++i )
std::string::append(&v29, "*");
}
else
{
std::string::append(&v29, *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 72));
}
refreshShowHints(&v29, a1, (unsigned int)v11);
v20 = *(_QWORD *)(a1 + 56);
if ( v20 && v20 == *(_QWORD *)(a1 + 72) && !((v11 + v13) % *(_QWORD *)(a1 + 80)) )
{
std::string::append(&v29, "\n");
strcpy(v34, "\r");
std::string::append(&v29, v34);
v21 = v28 + 1;
if ( (int)v28 >= *(_DWORD *)(a1 + 88) )
*(_QWORD *)(a1 + 88) = v21;
}
else
{
v21 = v28;
}
v14 = v13;
v22 = v13 + v11;
v23 = *(_QWORD *)(a1 + 80);
v24 = (v23 + v22) / v23;
v25 = v21 <= (int)v24;
v26 = v21 - v24;
if ( !v25 )
{
snprintf(v34, 64LL, "\x1B[%dA", v26);
std::string::append(&v29, v34);
v23 = *(_QWORD *)(a1 + 80);
}
if ( (unsigned int)(v22 % v23) )
snprintf(v34, 64LL, "\r\x1B[%dC", v22 % v23);
else
strcpy(v34, "\r");
std::string::append(&v29, v34);
}
else
{
v14 = v12;
}
*(_QWORD *)(a1 + 64) = v14;
write(v32, v29, v30);
return std::string::~string(&v29);
}
| refreshMultiLine:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R12D,ESI
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x28]
MOV RDI,R14
CALL 0x001020c0
MOV RDI,R14
MOV RSI,RAX
CALL 0x00103fee
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RBX + 0x48]
MOV RCX,qword ptr [RBX + 0x50]
MOV RSI,RDX
MOV R8,RAX
CALL 0x00104072
CDQE
MOV RSI,qword ptr [RBX + 0x50]
MOV qword ptr [RSP + 0x38],R14
LEA RCX,[RSI + R14*0x1]
ADD RAX,RCX
DEC RAX
XOR EDX,EDX
DIV RSI
MOV RDI,qword ptr [RBX + 0x40]
MOV EBP,dword ptr [RBX + 0x58]
MOV EDX,dword ptr [RBX + 0x14]
MOV dword ptr [RSP + 0x34],EDX
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX + -0x10],RDX
AND qword ptr [RDX + -0x8],0x0
MOV byte ptr [RDX],0x0
MOV qword ptr [RSP + 0x8],RAX
MOVSXD RDX,EAX
MOV qword ptr [RBX + 0x58],RDX
TEST R12B,0x1
JNZ 0x00102842
LAB_001027ef:
TEST R12B,0x3
MOV R14,qword ptr [RSP + 0x38]
JZ 0x00102815
LEA RSI,[RSP + 0x40]
MOV word ptr [RSI + 0x4],0x4b
MOV dword ptr [RSI],0x305b1b0d
LAB_0010280b:
LEA RDI,[RSP + 0x10]
CALL 0x00102390
LAB_00102815:
MOV RSI,qword ptr [RBX + 0x48]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RBX + 0x38]
MOV RCX,qword ptr [RBX + 0x50]
MOV R8,R14
CALL 0x00104072
MOV R13,RAX
TEST R12B,0x2
JNZ 0x001028be
MOVSXD R12,R13D
JMP 0x001029c8
LAB_00102842:
ADD RCX,RDI
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV ECX,EBP
SUB ECX,EAX
JLE 0x00102879
LEA RDX,[0x1098c5]
LEA R13,[RSP + 0x40]
PUSH 0x40
POP RSI
MOV RDI,R13
XOR EAX,EAX
CALL 0x001022f0
LEA RDI,[RSP + 0x10]
MOV RSI,R13
CALL 0x00102390
LAB_00102879:
CMP EBP,0x2
PUSH 0x1
POP R15
CMOVGE R15D,EBP
DEC R15D
MOV R14,0x315b1b4b305b1b0d
LEA R13,[RSP + 0x10]
LEA RBP,[RSP + 0x40]
LAB_0010289b:
SUB R15D,0x1
JC 0x001027ef
MOV qword ptr [RSP + 0x40],R14
MOV word ptr [RSP + 0x48],0x41
LAB_001028b1:
MOV RDI,R13
MOV RSI,RBP
CALL 0x00102390
JMP 0x0010289b
LAB_001028be:
MOV RSI,qword ptr [RBX + 0x28]
LAB_001028c2:
LEA RDI,[RSP + 0x10]
CALL 0x00102390
CMP byte ptr [0x0010c230],0x1
JNZ 0x001028fd
XOR R15D,R15D
LEA R12,[0x1098db]
LEA RBP,[RSP + 0x10]
LAB_001028e4:
MOV EAX,R15D
CMP qword ptr [RBX + 0x48],RAX
JBE 0x0010290f
LAB_001028ed:
MOV RDI,RBP
MOV RSI,R12
CALL 0x00102390
INC R15D
JMP 0x001028e4
LAB_001028fd:
MOV RSI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RBX + 0x48]
LAB_00102905:
LEA RDI,[RSP + 0x10]
CALL 0x00102060
LAB_0010290f:
LEA RDI,[RSP + 0x10]
MOV RSI,RBX
MOV EDX,R14D
CALL 0x00104105
MOV RAX,qword ptr [RBX + 0x38]
TEST RAX,RAX
JZ 0x00102943
CMP RAX,qword ptr [RBX + 0x48]
JNZ 0x00102943
MOVSXD RAX,R13D
ADD RAX,R14
XOR EDX,EDX
DIV qword ptr [RBX + 0x50]
TEST RDX,RDX
JZ 0x001029fb
LAB_00102943:
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,EAX
LAB_0010294a:
MOVSXD R12,R13D
ADD R14,R12
MOV RSI,qword ptr [RBX + 0x50]
LEA RAX,[RSI + R14*0x1]
XOR EDX,EDX
DIV RSI
SUB ECX,EAX
JLE 0x0010298b
LEA RDX,[0x1098dd]
LEA R15,[RSP + 0x40]
PUSH 0x40
POP RSI
MOV RDI,R15
XOR EAX,EAX
CALL 0x001022f0
LEA RDI,[RSP + 0x10]
MOV RSI,R15
CALL 0x00102390
MOV RSI,qword ptr [RBX + 0x50]
LAB_0010298b:
MOV RAX,R14
XOR EDX,EDX
DIV RSI
MOV RCX,RDX
TEST ECX,ECX
JZ 0x001029b2
LEA RDX,[0x1098e3]
LEA RDI,[RSP + 0x40]
PUSH 0x40
POP RSI
XOR EAX,EAX
CALL 0x001022f0
JMP 0x001029b9
LAB_001029b2:
MOV word ptr [RSP + 0x40],0xd
LAB_001029b9:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x40]
CALL 0x00102390
LAB_001029c8:
MOV qword ptr [RBX + 0x40],R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV EDI,dword ptr [RSP + 0x34]
CALL 0x00102080
LEA RDI,[RSP + 0x10]
CALL 0x001020d0
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001029fb:
LEA RSI,[0x1098b8]
LEA RDI,[RSP + 0x10]
CALL 0x00102390
LEA RSI,[RSP + 0x40]
MOV word ptr [RSI],0xd
LEA RDI,[RSP + 0x10]
CALL 0x00102390
LAB_00102a20:
MOV RAX,qword ptr [RSP + 0x8]
LEA ECX,[RAX + 0x1]
CMP EAX,dword ptr [RBX + 0x58]
JL 0x0010294a
MOVSXD RAX,ECX
MOV qword ptr [RBX + 0x58],RAX
JMP 0x0010294a
|
/* refreshMultiLine(linenoiseState*, int) */
void refreshMultiLine(linenoiseState *param_1,int param_2)
{
char *__s;
ulong uVar1;
bool bVar2;
int iVar3;
int iVar4;
size_t sVar5;
ulong uVar6;
int iVar7;
int1 *local_a8;
size_t local_a0;
int1 local_98 [20];
int local_84;
ulong local_80;
int8 local_78;
int2 local_70;
__s = *(char **)(param_1 + 0x28);
sVar5 = strlen(__s);
uVar6 = promptTextColumnLen(__s,sVar5);
iVar3 = columnPosForMultiLine
(*(char **)(param_1 + 0x18),*(ulong *)(param_1 + 0x48),
*(ulong *)(param_1 + 0x48),*(ulong *)(param_1 + 0x50),uVar6);
uVar1 = *(ulong *)(param_1 + 0x50);
iVar4 = *(int *)(param_1 + 0x58);
local_84 = *(int *)(param_1 + 0x14);
local_a8 = local_98;
local_a0 = 0;
local_98[0] = 0;
iVar3 = (int)((((long)iVar3 + uVar1 + uVar6) - 1) / uVar1);
*(long *)(param_1 + 0x58) = (long)iVar3;
local_80 = uVar6;
if ((param_2 & 1U) != 0) {
if ((int)((uVar1 + uVar6 + *(long *)(param_1 + 0x40)) / uVar1) < iVar4) {
snprintf((char *)&local_78,0x40,"\x1b[%dB");
std::__cxx11::string::append((char *)&local_a8);
}
iVar7 = 1;
if (1 < iVar4) {
iVar7 = iVar4;
}
while (iVar7 = iVar7 + -1, iVar7 != 0) {
local_78 = 0x315b1b4b305b1b0d;
local_70 = 0x41;
/* try { // try from 001028b1 to 001028bb has its CatchHandler @ 00102a41 */
std::__cxx11::string::append((char *)&local_a8);
}
}
uVar1 = local_80;
if ((param_2 & 3U) != 0) {
local_78 = CONCAT26(local_78._6_2_,0x4b00000000);
local_78 = CONCAT44(local_78._4_4_,0x305b1b0d);
/* try { // try from 0010280b to 00102878 has its CatchHandler @ 00102a3d */
std::__cxx11::string::append((char *)&local_a8);
}
iVar4 = columnPosForMultiLine
(*(char **)(param_1 + 0x18),*(ulong *)(param_1 + 0x48),
*(ulong *)(param_1 + 0x38),*(ulong *)(param_1 + 0x50),uVar1);
if ((param_2 & 2U) != 0) {
/* try { // try from 001028c2 to 001028cb has its CatchHandler @ 00102a3d */
std::__cxx11::string::append((char *)&local_a8);
if (maskmode == '\x01') {
for (uVar6 = 0; uVar6 < *(ulong *)(param_1 + 0x48); uVar6 = (ulong)((int)uVar6 + 1)) {
/* try { // try from 001028ed to 001028f7 has its CatchHandler @ 00102a3f */
std::__cxx11::string::append((char *)&local_a8);
}
}
else {
/* try { // try from 00102905 to 00102a1f has its CatchHandler @ 00102a3d */
std::__cxx11::string::append((char *)&local_a8,*(ulong *)(param_1 + 0x18));
}
refreshShowHints((string *)&local_a8,param_1,(int)uVar1);
if (((*(long *)(param_1 + 0x38) != 0) &&
(*(long *)(param_1 + 0x38) == *(long *)(param_1 + 0x48))) &&
(((long)iVar4 + uVar1) % *(ulong *)(param_1 + 0x50) == 0)) {
std::__cxx11::string::append((char *)&local_a8);
local_78 = CONCAT62(local_78._2_6_,0xd);
std::__cxx11::string::append((char *)&local_a8);
iVar7 = iVar3 + 1;
bVar2 = *(int *)(param_1 + 0x58) <= iVar3;
iVar3 = iVar7;
if (bVar2) {
*(long *)(param_1 + 0x58) = (long)iVar7;
}
}
uVar6 = *(ulong *)(param_1 + 0x50);
if ((int)((uVar6 + uVar1 + (long)iVar4) / uVar6) < iVar3) {
snprintf((char *)&local_78,0x40,"\x1b[%dA");
std::__cxx11::string::append((char *)&local_a8);
uVar6 = *(ulong *)(param_1 + 0x50);
}
if ((int)((uVar1 + (long)iVar4) % uVar6) == 0) {
local_78 = CONCAT62(local_78._2_6_,0xd);
}
else {
snprintf((char *)&local_78,0x40,"\r\x1b[%dC");
}
std::__cxx11::string::append((char *)&local_a8);
}
*(long *)(param_1 + 0x40) = (long)iVar4;
write(local_84,local_a8,local_a0);
std::__cxx11::string::~string((string *)&local_a8);
return;
}
| |
50,843 | get_wval_limb | corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/ec_mult.h | static limb_t get_wval_limb(const byte *d, size_t off, size_t bits)
{
size_t i, top = (off + bits - 1)/8;
limb_t ret, mask = (limb_t)0 - 1;
d += off/8;
top -= off/8-1;
/* this is not about constant-time-ness, but branch optimization */
for (ret=0, i=0; i<4;) {
ret |= (*d & mask) << (8*i);
mask = (limb_t)0 - ((++i - top) >> (8*sizeof(top)-1));
d += 1 & mask;
}
return ret >> (off%8);
} | O2 | c | get_wval_limb:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %rax
decq %rax
shrq $0x3, %rax
movq %rsi, %rdx
shrq $0x3, %rdx
addq %rdx, %rdi
subq %rax, %rdx
movabsq $-0x1, %r8
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x20, %rcx
je 0x5df9d
movzbl (%rdi), %r9d
andl %r9d, %r8d
shlq %cl, %r8
orq %r8, %rax
movq %rdx, %r8
sarq $0x3f, %r8
movq %rdx, %r9
shrq $0x3f, %r9
addq %r9, %rdi
addq $0x8, %rcx
incq %rdx
jmp 0x5df70
andb $0x7, %sil
movl %esi, %ecx
shrq %cl, %rax
popq %rbp
retq
| get_wval_limb:
push rbp
mov rbp, rsp
lea rax, [rsi+rdx]
dec rax
shr rax, 3
mov rdx, rsi
shr rdx, 3
add rdi, rdx
sub rdx, rax
mov r8, 0FFFFFFFFFFFFFFFFh
xor ecx, ecx
xor eax, eax
loc_5DF70:
cmp rcx, 20h ; ' '
jz short loc_5DF9D
movzx r9d, byte ptr [rdi]
and r8d, r9d
shl r8, cl
or rax, r8
mov r8, rdx
sar r8, 3Fh
mov r9, rdx
shr r9, 3Fh
add rdi, r9
add rcx, 8
inc rdx
jmp short loc_5DF70
loc_5DF9D:
and sil, 7
mov ecx, esi
shr rax, cl
pop rbp
retn
| unsigned long long get_wval_limb(long long a1, unsigned long long a2, long long a3)
{
_BYTE *v3; // rdi
signed long long v4; // rdx
long long v5; // r8
long long v6; // rcx
unsigned long long v7; // rax
v3 = (_BYTE *)((a2 >> 3) + a1);
v4 = (a2 >> 3) - ((a2 + a3 - 1) >> 3);
LOBYTE(v5) = -1;
v6 = 0LL;
v7 = 0LL;
while ( v6 != 32 )
{
v7 |= (unsigned long long)(unsigned __int8)(*v3 & v5) << v6;
v5 = v4 >> 63;
v3 += (unsigned long long)v4 >> 63;
v6 += 8LL;
++v4;
}
return v7 >> (a2 & 7);
}
| get_wval_limb:
PUSH RBP
MOV RBP,RSP
LEA RAX,[RSI + RDX*0x1]
DEC RAX
SHR RAX,0x3
MOV RDX,RSI
SHR RDX,0x3
ADD RDI,RDX
SUB RDX,RAX
MOV R8,-0x1
XOR ECX,ECX
XOR EAX,EAX
LAB_0015df70:
CMP RCX,0x20
JZ 0x0015df9d
MOVZX R9D,byte ptr [RDI]
AND R8D,R9D
SHL R8,CL
OR RAX,R8
MOV R8,RDX
SAR R8,0x3f
MOV R9,RDX
SHR R9,0x3f
ADD RDI,R9
ADD RCX,0x8
INC RDX
JMP 0x0015df70
LAB_0015df9d:
AND SIL,0x7
MOV ECX,ESI
SHR RAX,CL
POP RBP
RET
|
ulong get_wval_limb(long param_1,ulong param_2,long param_3)
{
ulong uVar1;
long lVar2;
long lVar3;
byte *pbVar4;
long lVar5;
pbVar4 = (byte *)(param_1 + (param_2 >> 3));
lVar3 = (param_2 >> 3) - ((param_2 + param_3) - 1 >> 3);
lVar5 = -1;
uVar1 = 0;
for (lVar2 = 0; lVar2 != 0x20; lVar2 = lVar2 + 8) {
uVar1 = uVar1 | (ulong)((uint)lVar5 & (uint)*pbVar4) << ((byte)lVar2 & 0x3f);
lVar5 = lVar3 >> 0x3f;
pbVar4 = pbVar4 + -lVar5;
lVar3 = lVar3 + 1;
}
return uVar1 >> ((byte)param_2 & 7);
}
| |
50,844 | my_valid_mbcharlen_utf8mb3 | eloqsql/strings/ctype-utf8.c | static inline
int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e)
{
uchar c;
DBUG_ASSERT(s < e);
c= s[0];
if (c < 0x80)
return 1;
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (s+2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
return 2;
}
DBUG_ASSERT(c < 0xf0);
if (s+3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
return 3;
} | O0 | c | my_valid_mbcharlen_utf8mb3:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0xc47fe
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x80, %eax
jge 0xc481e
movl $0x1, -0x4(%rbp)
jmp 0xc48e7
movzbl -0x19(%rbp), %eax
cmpl $0xc2, %eax
jge 0xc4835
movl $0x0, -0x4(%rbp)
jmp 0xc48e7
movzbl -0x19(%rbp), %eax
cmpl $0xe0, %eax
jge 0xc487e
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jbe 0xc485a
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xc48e7
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0xc4875
movl $0x0, -0x4(%rbp)
jmp 0xc48e7
movl $0x2, -0x4(%rbp)
jmp 0xc48e7
jmp 0xc4880
jmp 0xc4882
movq -0x10(%rbp), %rax
addq $0x3, %rax
cmpq -0x18(%rbp), %rax
jbe 0xc4899
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xc48e7
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xc48d7
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xc48d7
movzbl -0x19(%rbp), %eax
cmpl $0xe1, %eax
jge 0xc48e0
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0xc48e0
movl $0x0, -0x4(%rbp)
jmp 0xc48e7
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_valid_mbcharlen_utf8mb3:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_C47FE:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 80h
jge short loc_C481E
mov [rbp+var_4], 1
jmp loc_C48E7
loc_C481E:
movzx eax, [rbp+var_19]
cmp eax, 0C2h
jge short loc_C4835
mov [rbp+var_4], 0
jmp loc_C48E7
loc_C4835:
movzx eax, [rbp+var_19]
cmp eax, 0E0h
jge short loc_C487E
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jbe short loc_C485A
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_C48E7
loc_C485A:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_C4875
mov [rbp+var_4], 0
jmp short loc_C48E7
loc_C4875:
mov [rbp+var_4], 2
jmp short loc_C48E7
loc_C487E:
jmp short $+2
loc_C4880:
jmp short $+2
loc_C4882:
mov rax, [rbp+var_10]
add rax, 3
cmp rax, [rbp+var_18]
jbe short loc_C4899
mov [rbp+var_4], 0FFFFFF99h
jmp short loc_C48E7
loc_C4899:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_C48D7
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_C48D7
movzx eax, [rbp+var_19]
cmp eax, 0E1h
jge short loc_C48E0
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_C48E0
loc_C48D7:
mov [rbp+var_4], 0
jmp short loc_C48E7
loc_C48E0:
mov [rbp+var_4], 3
loc_C48E7:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_valid_mbcharlen_utf8mb3(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v3; // [rsp+1h] [rbp-19h]
v3 = *a1;
if ( *a1 >= 0x80u )
{
if ( v3 >= 0xC2u )
{
if ( v3 >= 0xE0u )
{
if ( (unsigned long long)(a1 + 3) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) )
return 3;
else
return 0;
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a1 + 2) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 )
return 2;
else
return 0;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
return 1;
}
}
| my_valid_mbcharlen_utf8mb3:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x001c47fe
LAB_001c47fe:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x80
JGE 0x001c481e
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c48e7
LAB_001c481e:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xc2
JGE 0x001c4835
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001c48e7
LAB_001c4835:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe0
JGE 0x001c487e
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001c485a
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001c48e7
LAB_001c485a:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x001c4875
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001c48e7
LAB_001c4875:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001c48e7
LAB_001c487e:
JMP 0x001c4880
LAB_001c4880:
JMP 0x001c4882
LAB_001c4882:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001c4899
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001c48e7
LAB_001c4899:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001c48d7
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001c48d7
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe1
JGE 0x001c48e0
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001c48e0
LAB_001c48d7:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001c48e7
LAB_001c48e0:
MOV dword ptr [RBP + -0x4],0x3
LAB_001c48e7:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_valid_mbcharlen_utf8mb3(byte *param_1,byte *param_2)
{
byte bVar1;
int4 local_c;
bVar1 = *param_1;
if (bVar1 < 0x80) {
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_2 < param_1 + 2) {
local_c = 0xffffff9a;
}
else if ((param_1[1] ^ 0x80) < 0x40) {
local_c = 2;
}
else {
local_c = 0;
}
}
else if (param_2 < param_1 + 3) {
local_c = 0xffffff99;
}
else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_1[1])))) {
local_c = 3;
}
else {
local_c = 0;
}
return local_c;
}
| |
50,845 | minja::Value::pop(minja::Value const&) | llama.cpp/common/minja/minja.hpp | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
} | O3 | cpp | minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0xe99cf
movq 0x8(%rax), %rsi
cmpq %rsi, (%rax)
je 0xe9add
cmpq $0x0, 0x20(%rbx)
movb 0x40(%rbx), %al
jne 0xe9a34
cmpq $0x0, 0x10(%rbx)
jne 0xe9a34
testb %al, %al
jne 0xe9a34
cmpq $0x0, 0x30(%rbx)
jne 0xe9a34
addq $-0x50, %rsi
movq %rbp, %rdi
callq 0xbd6cc
movq 0x10(%r15), %rdi
movq 0x8(%rdi), %rsi
addq $-0x50, %rsi
movq %rsi, 0x8(%rdi)
callq 0xbdd8e
jmp 0xe9acb
movq 0x20(%r15), %r14
testq %r14, %r14
je 0xe9b6f
cmpq $0x0, 0x10(%rbx)
jne 0xe9bcf
cmpq $0x0, 0x20(%rbx)
jne 0xe9bcf
cmpq $0x0, 0x30(%rbx)
jne 0xe9bcf
movq (%r14), %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
je 0xe9aa4
movq %rbp, 0x40(%rsp)
leaq 0x40(%rbx), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0xbbed0
testb %al, %al
jne 0xe9a94
addq $0x60, %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
jne 0xe9a16
jmp 0xe9a97
addb $-0x5, %al
cmpb $0x2, %al
jae 0xe9c8c
movq %rbx, %rdi
callq 0xc019a
testl %eax, %eax
js 0xe9b0f
movq 0x10(%r15), %rcx
movq (%rcx), %r12
movq 0x8(%rcx), %rcx
subq %r12, %rcx
shrq $0x4, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %ecx, %eax
jge 0xe9b0f
movl %eax, %eax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq %rax, %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0xbd6cc
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xea83e
jmp 0xe9acb
movq %r13, %r12
movq 0x20(%r15), %rax
movq 0x8(%rax), %r13
movq 0x40(%rsp), %rbp
cmpq %r13, %r12
je 0xe9c2f
leaq 0x10(%r12), %rsi
movq %rbp, %rdi
callq 0xbd6cc
movq 0x20(%r15), %rdi
leaq 0x60(%r12), %rdx
movq %r12, %rsi
callq 0xea9a4
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
leaq 0x3809d(%rip), %rsi # 0x121b8e
movq %rax, %rdi
callq 0x20420
movq 0x784c0(%rip), %rsi # 0x161fc0
movq 0x78479(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a50
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x3808c(%rip), %rsi # 0x121bc1
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0x78465(%rip), %rsi # 0x161fc0
movq 0x7841e(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a50
jmp 0xe9ce7
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x35f2c(%rip), %rsi # 0x11fac1
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0x78405(%rip), %rsi # 0x161fc0
movq 0x783be(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a50
jmp 0xe9ce7
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x35e79(%rip), %rsi # 0x11fa6e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0x783a5(%rip), %rsi # 0x161fc0
movq 0x7835e(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a50
jmp 0xe9ce7
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x37f85(%rip), %rsi # 0x121bda
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0x78345(%rip), %rsi # 0x161fc0
movq 0x782fe(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a50
jmp 0xe9ce7
movl $0x10, %edi
callq 0x20650
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x37ef0(%rip), %rsi # 0x121ba2
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0x782e8(%rip), %rsi # 0x161fc0
movq 0x782a1(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a50
jmp 0xe9cf7
jmp 0xe9d37
jmp 0xe9cf7
jmp 0xe9d37
jmp 0xe9cf7
jmp 0xe9d37
jmp 0xe9cf7
jmp 0xe9d37
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe9d15
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe9d30
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xe9d66
jmp 0xe9d7b
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe9d66
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe9d66
jmp 0xe9d63
jmp 0xe9d63
jmp 0xe9d63
jmp 0xe9d63
jmp 0xe9d70
jmp 0xe9d63
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f10
jmp 0xe9d7b
movq %rax, %rbx
movq %rbp, %rdi
callq 0xb5bd8
movq %rbx, %rdi
callq 0x20af0
nop
| _ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov rbp, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_E99CF
mov rsi, [rax+8]
cmp [rax], rsi
jz loc_E9ADD
cmp qword ptr [rbx+20h], 0
mov al, [rbx+40h]
jnz loc_E9A34
cmp qword ptr [rbx+10h], 0
jnz loc_E9A34
test al, al
jnz loc_E9A34
cmp qword ptr [rbx+30h], 0
jnz loc_E9A34
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, [rdi+8]
add rsi, 0FFFFFFFFFFFFFFB0h
mov [rdi+8], rsi
call _ZNSt15__new_allocatorIN5minja5ValueEE7destroyIS1_EEvPT_; std::__new_allocator<minja::Value>::destroy<minja::Value>(minja::Value *)
jmp loc_E9ACB
loc_E99CF:
mov r14, [r15+20h]
test r14, r14
jz loc_E9B6F
cmp qword ptr [rbx+10h], 0
jnz loc_E9BCF
cmp qword ptr [rbx+20h], 0
jnz loc_E9BCF
cmp qword ptr [rbx+30h], 0
jnz loc_E9BCF
mov r13, [r14]
mov r12, [r14+8]
cmp r13, r12
jz loc_E9AA4
mov [rsp+78h+var_38], rbp
lea rbp, [rbx+40h]
loc_E9A16:
mov rdi, r13
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_E9A94
add r13, 60h ; '`'
mov r12, [r14+8]
cmp r13, r12
jnz short loc_E9A16
jmp short loc_E9A97
loc_E9A34:
add al, 0FBh
cmp al, 2
jnb loc_E9C8C
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js loc_E9B0F
mov rcx, [r15+10h]
mov r12, [rcx]
mov rcx, [rcx+8]
sub rcx, r12
shr rcx, 4
imul ecx, 0CCCCCCCDh
cmp eax, ecx
jge loc_E9B0F
mov eax, eax
lea rax, [rax+rax*4]
shl rax, 4
add r12, rax
mov rdi, rbp; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE; std::vector<minja::Value>::_M_erase(__gnu_cxx::__normal_iterator<minja::Value*,std::vector<minja::Value>>)
jmp short loc_E9ACB
loc_E9A94:
mov r12, r13
loc_E9A97:
mov rax, [r15+20h]
mov r13, [rax+8]
mov rbp, [rsp+78h+var_38]
loc_E9AA4:
cmp r12, r13
jz loc_E9C2F
lea rsi, [r12+10h]; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
lea rdx, [r12+60h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
loc_E9ACB:
mov rax, rbp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E9ADD:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_E9B0F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_E9CE7
loc_E9B6F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array or object: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_E9CE7
loc_E9BCF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_E9CE7
loc_E9C2F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_E9CE7
loc_E9C8C:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_E9CE7:
jmp short loc_E9CF7
jmp short loc_E9D37
jmp short loc_E9CF7
jmp short loc_E9D37
jmp short loc_E9CF7
jmp short loc_E9D37
jmp short loc_E9CF7
jmp short loc_E9D37
loc_E9CF7:
mov rbx, rax
lea rax, [rsp+78h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E9D15
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E9D15:
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E9D30
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E9D30:
test bpl, bpl
jnz short loc_E9D66
jmp short loc_E9D7B
loc_E9D37:
mov rbx, rax
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E9D66
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E9D66
jmp short loc_E9D63
jmp short loc_E9D63
jmp short loc_E9D63
jmp short loc_E9D63
jmp short loc_E9D70
jmp short $+2
loc_E9D63:
mov rbx, rax
loc_E9D66:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_E9D7B
loc_E9D70:
mov rbx, rax
mov rdi, rbp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_E9D7B:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
minja::Value *v6; // rbp
_QWORD *v7; // rax
long long v8; // rsi
char v9; // al
long long v10; // rdi
long long v11; // rsi
unsigned __int8 **v12; // r14
unsigned __int8 *v13; // r13
unsigned __int8 *v14; // r12
int v15; // eax
_QWORD *v16; // rcx
const minja::Value *v17; // r12
std::runtime_error *exception; // r14
void *v20; // r14
void *v21; // r14
void *v22; // r14
void *v23; // r14
void *v24; // r14
_BYTE v25[16]; // [rsp+0h] [rbp-78h] BYREF
_QWORD v26[2]; // [rsp+20h] [rbp-58h] BYREF
minja::Value *v27; // [rsp+40h] [rbp-38h]
v6 = this;
v7 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v7 )
{
v8 = v7[1];
if ( *v7 == v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *(_BYTE *)(a3 + 64);
if ( *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 16) || v9 || *(_QWORD *)(a3 + 48) )
{
if ( (unsigned __int8)(v9 - 5) >= 2u )
{
v24 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"pop index must be an integer: ", (long long)v25);
std::runtime_error::runtime_error(v24, v26);
__cxa_throw(
v24,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = minja::Value::get<int>((_QWORD *)a3);
if ( v15 < 0 || (v16 = (_QWORD *)*((_QWORD *)a2 + 2), v15 >= (int)(-858993459 * ((v16[1] - *v16) >> 4))) )
{
v20 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"pop index out of range: ", (long long)v25);
std::runtime_error::runtime_error(v20, v26);
__cxa_throw(
v20,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = (const minja::Value *)(80LL * (unsigned int)v15 + *v16);
minja::Value::Value(this, v17);
std::vector<minja::Value>::_M_erase(*((_QWORD *)a2 + 2), v17);
}
else
{
minja::Value::Value(this, (const minja::Value *)(v8 - 80));
v10 = *((_QWORD *)a2 + 2);
v11 = *(_QWORD *)(v10 + 8) - 80LL;
*(_QWORD *)(v10 + 8) = v11;
std::__new_allocator<minja::Value>::destroy<minja::Value>(v10, v11);
}
}
else
{
v12 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v12 )
{
v21 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"Value is not an array or object: ", (long long)v25);
std::runtime_error::runtime_error(v21, v26);
__cxa_throw(
v21,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
v22 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"Unashable type: ", (long long)v25);
std::runtime_error::runtime_error(v22, v26);
__cxa_throw(
v22,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = *v12;
v14 = v12[1];
if ( *v12 != v14 )
{
v27 = this;
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v13, (unsigned __int8 *)(a3 + 64), a4) )
{
v13 += 96;
v14 = v12[1];
if ( v13 == v14 )
goto LABEL_22;
}
v14 = v13;
LABEL_22:
v13 = *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL);
v6 = v27;
}
if ( v14 == v13 )
{
v23 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>(v26, (long long)"Key not found: ", (long long)v25);
std::runtime_error::runtime_error(v23, v26);
__cxa_throw(
v23,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::Value(v6, (const minja::Value *)(v14 + 16));
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
*((_QWORD *)a2 + 4),
v14,
v14 + 96);
}
return v6;
}
| pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x001e99cf
MOV RSI,qword ptr [RAX + 0x8]
CMP qword ptr [RAX],RSI
JZ 0x001e9add
CMP qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RBX + 0x40]
JNZ 0x001e9a34
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001e9a34
TEST AL,AL
JNZ 0x001e9a34
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001e9a34
ADD RSI,-0x50
MOV RDI,RBP
CALL 0x001bd6cc
MOV RDI,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,-0x50
MOV qword ptr [RDI + 0x8],RSI
CALL 0x001bdd8e
JMP 0x001e9acb
LAB_001e99cf:
MOV R14,qword ptr [R15 + 0x20]
TEST R14,R14
JZ 0x001e9b6f
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001e9bcf
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001e9bcf
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001e9bcf
MOV R13,qword ptr [R14]
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JZ 0x001e9aa4
MOV qword ptr [RSP + 0x40],RBP
LEA RBP,[RBX + 0x40]
LAB_001e9a16:
MOV RDI,R13
MOV RSI,RBP
CALL 0x001bbed0
TEST AL,AL
JNZ 0x001e9a94
ADD R13,0x60
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JNZ 0x001e9a16
JMP 0x001e9a97
LAB_001e9a34:
ADD AL,0xfb
CMP AL,0x2
JNC 0x001e9c8c
MOV RDI,RBX
CALL 0x001c019a
TEST EAX,EAX
JS 0x001e9b0f
MOV RCX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R12
SHR RCX,0x4
IMUL ECX,ECX,-0x33333333
CMP EAX,ECX
JGE 0x001e9b0f
MOV EAX,EAX
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD R12,RAX
MOV RDI,RBP
MOV RSI,R12
CALL 0x001bd6cc
MOV RDI,qword ptr [R15 + 0x10]
LAB_001e9a8a:
MOV RSI,R12
CALL 0x001ea83e
LAB_001e9a92:
JMP 0x001e9acb
LAB_001e9a94:
MOV R12,R13
LAB_001e9a97:
MOV RAX,qword ptr [R15 + 0x20]
MOV R13,qword ptr [RAX + 0x8]
MOV RBP,qword ptr [RSP + 0x40]
LAB_001e9aa4:
CMP R12,R13
JZ 0x001e9c2f
LEA RSI,[R12 + 0x10]
MOV RDI,RBP
CALL 0x001bd6cc
MOV RDI,qword ptr [R15 + 0x20]
LEA RDX,[R12 + 0x60]
LAB_001e9ac3:
MOV RSI,R12
CALL 0x001ea9a4
LAB_001e9acb:
MOV RAX,RBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e9add:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e9aea:
LEA RSI,[0x221b8e]
MOV RDI,RAX
CALL 0x00120420
LAB_001e9af9:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a50
LAB_001e9b0f:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e9b1c:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001e9b2e:
LEA RSI,[0x221bc1]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af3dc
MOV BPL,0x1
LAB_001e9b45:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a50
LAB_001e9b6f:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e9b7c:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001e9b8e:
LEA RSI,[0x21fac1]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af3dc
MOV BPL,0x1
LAB_001e9ba5:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a50
LAB_001e9bcf:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e9bdc:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001e9bee:
LEA RSI,[0x21fa6e]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af3dc
MOV BPL,0x1
LAB_001e9c05:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a50
LAB_001e9c2f:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e9c3c:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001e9c4e:
LEA RSI,[0x221bda]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af3dc
MOV BPL,0x1
LAB_001e9c65:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a50
LAB_001e9c8c:
MOV EDI,0x10
CALL 0x00120650
MOV R14,RAX
LAB_001e9c99:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001e9cab:
LEA RSI,[0x221ba2]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af3dc
MOV BPL,0x1
LAB_001e9cc2:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a50
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
__new_allocator<minja::Value> *this;
long lVar2;
char cVar3;
uint uVar4;
runtime_error *prVar5;
int iVar6;
Value *in_RDX;
bool bVar7;
long in_RSI;
int iVar8;
Value *pVVar9;
basic_json *pbVar10;
basic_json *pbVar11;
int1 auStack_78 [32];
string local_58 [32];
Value *local_38;
plVar1 = *(long **)(in_RSI + 0x10);
bVar7 = SUB81(in_RDX,0);
iVar8 = (int)auStack_78;
if (plVar1 == (long *)0x0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e9b7c to 001e9b8d has its CatchHandler @ 001e9d5d */
dump_abi_cxx11_(iVar8,SUB81(in_RSI,0));
/* try { // try from 001e9b8e to 001e9ba1 has its CatchHandler @ 001e9cf5 */
std::operator+((char *)local_58,(string *)"Value is not an array or object: ");
/* try { // try from 001e9ba5 to 001e9bc9 has its CatchHandler @ 001e9cf3 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e9bdc to 001e9bed has its CatchHandler @ 001e9d5b */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001e9bee to 001e9c01 has its CatchHandler @ 001e9cf1 */
std::operator+((char *)local_58,(string *)"Unashable type: ");
/* try { // try from 001e9c05 to 001e9c29 has its CatchHandler @ 001e9cef */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
pbVar11 = (basic_json *)*plVar1;
pbVar10 = (basic_json *)plVar1[1];
if (pbVar11 != pbVar10) {
local_38 = param_1;
do {
pbVar10 = pbVar11;
cVar3 = nlohmann::json_abi_v3_11_3::operator==(pbVar10,(basic_json *)(in_RDX + 0x40));
if (cVar3 != '\0') break;
pbVar11 = pbVar10 + 0x60;
pbVar10 = (basic_json *)plVar1[1];
} while (pbVar11 != pbVar10);
pbVar11 = *(basic_json **)(*(long *)(in_RSI + 0x20) + 8);
param_1 = local_38;
}
if (pbVar10 == pbVar11) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e9c3c to 001e9c4d has its CatchHandler @ 001e9d59 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001e9c4e to 001e9c61 has its CatchHandler @ 001e9ced */
std::operator+((char *)local_58,(string *)"Key not found: ");
/* try { // try from 001e9c65 to 001e9c89 has its CatchHandler @ 001e9ceb */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
Value(param_1,(Value *)(pbVar10 + 0x10));
/* try { // try from 001e9ac3 to 001e9aca has its CatchHandler @ 001e9d70 */
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),pbVar10,pbVar10 + 0x60);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e9aea to 001e9af8 has its CatchHandler @ 001e9d63 */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
if (((*(long *)(in_RDX + 0x20) == 0) && (*(long *)(in_RDX + 0x10) == 0)) &&
((in_RDX[0x40] == (Value)0x0 && (*(long *)(in_RDX + 0x30) == 0)))) {
Value(param_1,(Value *)(plVar1[1] + -0x50));
this = *(__new_allocator<minja::Value> **)(in_RSI + 0x10);
lVar2 = *(long *)(this + 8);
*(Value **)(this + 8) = (Value *)(lVar2 + -0x50);
std::__new_allocator<minja::Value>::destroy<minja::Value>(this,(Value *)(lVar2 + -0x50));
}
else {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e9c99 to 001e9caa has its CatchHandler @ 001e9d57 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001e9cab to 001e9cbe has its CatchHandler @ 001e9ce9 */
std::operator+((char *)local_58,(string *)"pop index must be an integer: ");
/* try { // try from 001e9cc2 to 001e9ce6 has its CatchHandler @ 001e9ce7 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
uVar4 = get<int>(in_RDX);
if (((int)uVar4 < 0) ||
(lVar2 = **(long **)(in_RSI + 0x10),
iVar6 = (int)((ulong)((*(long **)(in_RSI + 0x10))[1] - lVar2) >> 4),
SBORROW4(uVar4,iVar6 * -0x33333333) == (int)(uVar4 + iVar6 * 0x33333333) < 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e9b1c to 001e9b2d has its CatchHandler @ 001e9d61 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001e9b2e to 001e9b41 has its CatchHandler @ 001e9d37 */
std::operator+((char *)local_58,(string *)"pop index out of range: ");
/* try { // try from 001e9b45 to 001e9b69 has its CatchHandler @ 001e9cf7 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
pVVar9 = (Value *)(lVar2 + (ulong)uVar4 * 0x50);
Value(param_1,pVVar9);
/* try { // try from 001e9a8a to 001e9a91 has its CatchHandler @ 001e9d5f */
std::vector<minja::Value,std::allocator<minja::Value>>::_M_erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar9);
}
}
return param_1;
}
| |
50,846 | bitmap_set_next | eloqsql/mysys/my_bitmap.c | uint bitmap_set_next(MY_BITMAP *map)
{
uint bit_found;
DBUG_ASSERT(map->bitmap);
if ((bit_found= bitmap_get_first(map)) != MY_BIT_NONE)
bitmap_set_bit(map, bit_found);
return bit_found;
} | O3 | c | bitmap_set_next:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xa016c
cmpl $-0x1, %eax
je 0xa0165
movq (%rbx), %rdx
movl %eax, %esi
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edi
shll %cl, %edi
shrl $0x3, %esi
orb %dil, (%rdx,%rsi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| bitmap_set_next:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call bitmap_get_first
cmp eax, 0FFFFFFFFh
jz short loc_A0165
mov rdx, [rbx]
mov esi, eax
mov ecx, eax
and cl, 7
mov edi, 1
shl edi, cl
shr esi, 3
or [rdx+rsi], dil
loc_A0165:
add rsp, 8
pop rbx
pop rbp
retn
| long long bitmap_set_next(_QWORD *a1)
{
long long result; // rax
result = bitmap_get_first(a1);
if ( (_DWORD)result != -1 )
*(_BYTE *)(*a1 + ((unsigned int)result >> 3)) |= 1 << (result & 7);
return result;
}
| bitmap_set_next:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x001a016c
CMP EAX,-0x1
JZ 0x001a0165
MOV RDX,qword ptr [RBX]
MOV ESI,EAX
MOV ECX,EAX
AND CL,0x7
MOV EDI,0x1
SHL EDI,CL
SHR ESI,0x3
OR byte ptr [RDX + RSI*0x1],DIL
LAB_001a0165:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void bitmap_set_next(long *param_1)
{
byte *pbVar1;
uint uVar2;
uVar2 = bitmap_get_first();
if (uVar2 != 0xffffffff) {
pbVar1 = (byte *)(*param_1 + (ulong)(uVar2 >> 3));
*pbVar1 = *pbVar1 | (byte)(1 << ((byte)uVar2 & 7));
}
return;
}
| |
50,847 | mysql_stmt_close_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_close_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
TRUE,
r_my_bool)
} | O3 | c | mysql_stmt_close_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x2eb96
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x2fdbb
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x2ebf9
movl (%r15), %r15d
jmp 0x2ec6f
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1f060(%rip), %rax # 0x4dc10
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1f045(%rip), %rax # 0x4dc20
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, (%rbx)
jmp 0x2ec6f
movb $0x0, 0x15(%r15)
js 0x2ec06
movb 0x8(%r15), %al
jmp 0x2ec6a
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1efec(%rip), %rax # 0x4dc10
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1efd1(%rip), %rax # 0x4dc20
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, %al
movb %al, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_close_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_2EB96
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_2EBF9
mov r15d, [r15]
jmp loc_2EC6F
loc_2EB96:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov byte ptr [rbx], 1
jmp short loc_2EC6F
loc_2EBF9:
mov byte ptr [r15+15h], 0
js short loc_2EC06
mov al, [r15+8]
jmp short loc_2EC6A
loc_2EC06:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov al, 1
loc_2EC6A:
mov [rbx], al
xor r15d, r15d
loc_2EC6F:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_close_cont(char *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
char v7; // al
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = *((_BYTE *)v4 + 8);
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
| mysql_stmt_close_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x0012eb96
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x0012fdbb
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012ebf9
MOV R15D,dword ptr [R15]
JMP 0x0012ec6f
LAB_0012eb96:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc10]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc20]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV byte ptr [RBX],0x1
JMP 0x0012ec6f
LAB_0012ebf9:
MOV byte ptr [R15 + 0x15],0x0
JS 0x0012ec06
MOV AL,byte ptr [R15 + 0x8]
JMP 0x0012ec6a
LAB_0012ec06:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc10]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc20]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV AL,0x1
LAB_0012ec6a:
MOV byte ptr [RBX],AL
XOR R15D,R15D
LAB_0012ec6f:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_close_cont(int1 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int1 uVar2;
int iVar3;
int4 uVar4;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar4 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0014dc90,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar3 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar3 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar3 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014dc60,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar2 = 1;
}
else {
uVar2 = *(int1 *)(puVar1 + 2);
}
*param_1 = uVar2;
uVar4 = 0;
}
else {
uVar4 = *puVar1;
}
}
return uVar4;
}
| |
50,848 | my_b_cache_read | eloqsql/mysys/mf_iocache.c | int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length= 0, diff_length, left_length= 0, max_length;
my_off_t pos_in_file;
DBUG_ENTER("_my_b_cache_read");
/* pos_in_file always point on where info->buffer was read */
pos_in_file=info->pos_in_file+ (size_t) (info->read_end - info->buffer);
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (info->seek_not_done)
{
if ((mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0))
!= MY_FILEPOS_ERROR))
{
/* No error, reset seek_not_done flag. */
info->seek_not_done= 0;
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
}
else
{
/*
If the seek failed and the error number is ESPIPE, it is because
info->file is a pipe or socket or FIFO. We never should have tried
to seek on that. See Bugs#25807 and #22828 for more info.
*/
DBUG_ASSERT(my_errno != ESPIPE);
info->error= -1;
DBUG_RETURN(1);
}
}
/*
Calculate, how much we are within a IO_SIZE block. Ideally this
should be zero.
*/
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/*
If more than a block plus the rest of the current block is wanted,
we do read directly, without filling the buffer.
*/
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{ /* Fill first intern buffer */
size_t read_length;
if (info->end_of_file <= pos_in_file)
{
/* End of file. Return, what we did copy from the buffer. */
info->error= (int) left_length;
info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
Crop the wanted count to a multiple of IO_SIZE and subtract,
what we did already read from a block. That way, the read will
end aligned with a block.
*/
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length, info->myflags))
!= length)
{
/*
If we didn't get, what we wanted, we either return -1 for a read
error, or (it's end of file), how much we got in total.
*/
info->error= (read_length == (size_t) -1 ? -1 :
(int) (read_length+left_length));
info->seek_not_done=1;
DBUG_RETURN(1);
}
Count-=length;
Buffer+=length;
pos_in_file+=length;
left_length+=length;
diff_length=0;
}
/*
At this point, we want less than one and a partial block.
We will read a full cache, minus the number of bytes, we are
within a block already. So we will reach new alignment.
*/
max_length= info->read_length-diff_length;
/* We will not read past end of file. */
if (info->type != READ_FIFO &&
max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
/*
If there is nothing left to read,
we either are done, or we failed to fulfill the request.
Otherwise, we read max_length into the cache.
*/
if (!max_length)
{
if (Count)
{
/* We couldn't fulfil the request. Return, how much we got. */
info->error= (int) left_length;
DBUG_RETURN(1);
}
else
{
info->error= 0;
if (length == 0) /* nothing was read */
DBUG_RETURN(0); /* EOF */
length= 0; /* non-zero size read was done */
}
}
else
{
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
if ((length= mysql_file_read(info->file,info->buffer, max_length,
info->myflags)) < Count ||
length == (size_t) -1)
{
/*
We got an read error, or less than requested (end of file).
If not a read error, copy, what we got.
*/
if (length != (size_t) -1)
memcpy(Buffer, info->buffer, length);
info->pos_in_file= pos_in_file;
/* For a read error, return -1, otherwise, what we got in total. */
info->error= length == (size_t) -1 ? -1 : (int) (length+left_length);
info->read_pos=info->read_end=info->buffer;
info->seek_not_done=1;
DBUG_RETURN(1);
}
}
/*
Count is the remaining number of bytes requested.
length is the amount of data in the cache.
Read Count bytes from the cache.
*/
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
if (Count)
memcpy(Buffer, info->buffer, Count);
DBUG_RETURN(0);
} | O3 | c | my_b_cache_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %r14
subq 0x20(%rdi), %r14
addq (%rdi), %r14
cmpl $0x0, 0xe0(%rdi)
je 0x52765
movl 0xd4(%rbx), %r15d
leaq 0x2e41d4(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r15d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x529af
movl %r15d, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5de20
cmpq $-0x1, %rax
je 0x52915
movl $0x0, 0xe0(%rbx)
movq 0xd8(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x52765
movl $0x1, 0xe0(%rax)
movq 0xd8(%rax), %rax
cmpq %rbx, %rax
jne 0x5274f
movl %r14d, %eax
andl $0xfff, %eax # imm = 0xFFF
movl $0x2000, %ecx # imm = 0x2000
subq %rax, %rcx
cmpq %r13, %rcx
jbe 0x52892
xorl %ecx, %ecx
movq 0xf0(%rbx), %r15
subq %rax, %r15
cmpl $0x4, 0xb0(%rbx)
je 0x527a1
movq 0x8(%rbx), %rax
subq %r14, %rax
cmpq %rax, %r15
cmovaeq %rax, %r15
testq %r15, %r15
je 0x5292e
movq %rcx, -0x48(%rbp)
movq %r13, -0x38(%rbp)
movq %r12, -0x40(%rbp)
movq 0xd8(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x527e3
movl $0x1, 0xe0(%rax)
movq 0xd8(%rax), %rax
cmpq %rbx, %rax
jne 0x527cd
movl 0xd4(%rbx), %r13d
movq 0x20(%rbx), %r12
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2e40c8(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x529db
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x5dc20
movq %rax, %r12
movq -0x38(%rbp), %rdx
cmpq %rdx, %r12
setae %al
cmpq $-0x1, %r12
setne %cl
testb %cl, %al
jne 0x5293b
cmpq $-0x1, %r12
je 0x52865
movq 0x20(%rbx), %rsi
movq -0x40(%rbp), %rdi
movq %r12, %rdx
callq 0x282c0
movq -0x48(%rbp), %rcx
addl %r12d, %ecx
cmpq $-0x1, %r12
movq %r14, (%rbx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovnel %ecx, %eax
movl %eax, 0xe4(%rbx)
movq 0x20(%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x5296a
cmpq %r14, 0x8(%rbx)
jbe 0x52921
movq %r13, -0x38(%rbp)
movl %r13d, %r15d
andl $0xfffff000, %r15d # imm = 0xFFFFF000
subq %rax, %r15
movl 0xd4(%rbx), %r13d
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2e4002(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x52a4e
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x5dc20
cmpq %r15, %rax
movq -0x38(%rbp), %r13
jne 0x52964
movq %r15, %rcx
subq %r15, %r13
addq %r15, %r12
addq %r15, %r14
xorl %eax, %eax
jmp 0x52780
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
jmp 0x52974
movq $0x1, 0xe0(%rbx)
jmp 0x52974
testq %r13, %r13
je 0x5298c
movl %ecx, 0xe4(%rbx)
jmp 0x52974
movq 0x20(%rbx), %rsi
leaq (%rsi,%rdx), %rax
movq %rax, 0x10(%rbx)
addq %rsi, %r12
movq %r12, 0x18(%rbx)
movq %r14, (%rbx)
xorl %r15d, %r15d
testq %rdx, %rdx
je 0x5297a
movq -0x40(%rbp), %rdi
callq 0x282c0
jmp 0x5297a
movl %eax, 0xe4(%rbx)
movl $0x1, 0xe0(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0xe4(%rbx)
xorl %r15d, %r15d
testq %rcx, %rcx
je 0x5297a
movq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %r14, (%rbx)
jmp 0x5297a
movq %r13, -0x38(%rbp)
movq %r12, %r13
leaq -0x58(%rbp), %r12
movq %rax, %rdi
movl %r15d, %esi
movq %r14, %rdx
movq %r12, %rcx
callq 0x29ec9
movq (%r12), %rax
movq %r13, %r12
movq -0x38(%rbp), %r13
jmp 0x52724
movq %rax, %rcx
leaq 0x2e3ee3(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq 0x4428e(%rip), %rdx # 0x96c7d
movq %rcx, -0x50(%rbp)
movq %rcx, %rdi
movq %r15, %rsi
movl $0x2eb, %ecx # imm = 0x2EB
callq *0x210(%rax)
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r13
movq %r13, %rcx
callq 0x5dc20
movq %rax, %r12
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r15
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r13b
cmovneq %r15, %rsi
leaq 0x2e3e8c(%rip), %rax # 0x3368c8
movq (%rax), %rax
movq -0x50(%rbp), %rdi
callq *0x218(%rax)
jmp 0x52836
movq %rax, %rcx
leaq 0x2e3e70(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq 0x4421b(%rip), %rdx # 0x96c7d
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq %r15, %rsi
movl $0x2ab, %ecx # imm = 0x2AB
callq *0x210(%rax)
movl %r13d, %edi
movq %r12, -0x40(%rbp)
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r12
movq %r12, %rcx
callq 0x5dc20
movq %rax, %r13
xorl %esi, %esi
testq %rax, %rax
movl $0x0, %eax
cmoveq %r15, %rax
cmpq $-0x1, %r13
cmovneq %r13, %rsi
testb $0x6, %r12b
cmovneq %rax, %rsi
leaq 0x2e3e10(%rip), %rax # 0x3368c8
movq (%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r12
callq *0x218(%rax)
movq %r13, %rax
jmp 0x528f9
| _my_b_cache_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov r14, [rdi+18h]
sub r14, [rdi+20h]
add r14, [rdi]
cmp dword ptr [rdi+0E0h], 0
jz short loc_52765
mov r15d, [rbx+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r15d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_529AF
mov edi, r15d
mov rsi, r14
xor edx, edx
xor ecx, ecx
call my_seek
loc_52724:
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_52915
mov dword ptr [rbx+0E0h], 0
mov rax, [rbx+0D8h]
test rax, rax
setz cl
cmp rax, rbx
setz dl
or dl, cl
jnz short loc_52765
loc_5274F:
mov dword ptr [rax+0E0h], 1
mov rax, [rax+0D8h]
cmp rax, rbx
jnz short loc_5274F
loc_52765:
mov eax, r14d
and eax, 0FFFh
mov ecx, 2000h
sub rcx, rax
cmp rcx, r13
jbe loc_52892
xor ecx, ecx
loc_52780:
mov r15, [rbx+0F0h]
sub r15, rax
cmp dword ptr [rbx+0B0h], 4
jz short loc_527A1
mov rax, [rbx+8]
sub rax, r14
cmp r15, rax
cmovnb r15, rax
loc_527A1:
test r15, r15
jz loc_5292E
mov [rbp+var_48], rcx
mov [rbp+var_38], r13
mov [rbp+var_40], r12
mov rax, [rbx+0D8h]
test rax, rax
setz cl
cmp rax, rbx
setz dl
or dl, cl
jnz short loc_527E3
loc_527CD:
mov dword ptr [rax+0E0h], 1
mov rax, [rax+0D8h]
cmp rax, rbx
jnz short loc_527CD
loc_527E3:
mov r13d, [rbx+0D4h]
mov r12, [rbx+20h]
mov rax, [rbx+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_529DB
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov rcx, [rbp+var_30]
call my_read
mov r12, rax
loc_52836:
mov rdx, [rbp+var_38]
cmp r12, rdx
setnb al
cmp r12, 0FFFFFFFFFFFFFFFFh
setnz cl
test al, cl
jnz loc_5293B
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_52865
mov rsi, [rbx+20h]
mov rdi, [rbp+var_40]
mov rdx, r12
call _memcpy
loc_52865:
mov rcx, [rbp+var_48]
add ecx, r12d
cmp r12, 0FFFFFFFFFFFFFFFFh
mov [rbx], r14
mov eax, 0FFFFFFFFh
cmovnz eax, ecx
mov [rbx+0E4h], eax
mov rax, [rbx+20h]
mov [rbx+18h], rax
mov [rbx+10h], rax
jmp loc_5296A
loc_52892:
cmp [rbx+8], r14
jbe loc_52921
mov [rbp+var_38], r13
mov r15d, r13d
and r15d, 0FFFFF000h
sub r15, rax
mov r13d, [rbx+0D4h]
mov rax, [rbx+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_52A4E
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov rcx, [rbp+var_30]
call my_read
loc_528F9:
cmp rax, r15
mov r13, [rbp+var_38]
jnz short loc_52964
mov rcx, r15
sub r13, r15
add r12, r15
add r14, r15
xor eax, eax
jmp loc_52780
loc_52915:
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
jmp short loc_52974
loc_52921:
mov qword ptr [rbx+0E0h], 1
jmp short loc_52974
loc_5292E:
test r13, r13
jz short loc_5298C
mov [rbx+0E4h], ecx
jmp short loc_52974
loc_5293B:
mov rsi, [rbx+20h]
lea rax, [rsi+rdx]
mov [rbx+10h], rax
add r12, rsi
mov [rbx+18h], r12
mov [rbx], r14
xor r15d, r15d
test rdx, rdx
jz short loc_5297A
mov rdi, [rbp+var_40]
call _memcpy
jmp short loc_5297A
loc_52964:
mov [rbx+0E4h], eax
loc_5296A:
mov dword ptr [rbx+0E0h], 1
loc_52974:
mov r15d, 1
loc_5297A:
mov eax, r15d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5298C:
mov dword ptr [rbx+0E4h], 0
xor r15d, r15d
test rcx, rcx
jz short loc_5297A
mov rax, [rbx+20h]
mov [rbx+10h], rax
mov [rbx+18h], rax
mov [rbx], r14
jmp short loc_5297A
loc_529AF:
mov [rbp+var_38], r13
mov r13, r12
lea r12, [rbp+var_58]
mov rdi, rax
mov esi, r15d
mov rdx, r14
mov rcx, r12
call _my_b_cache_read_cold_1
mov rax, [r12]
mov r12, r13
mov r13, [rbp+var_38]
jmp loc_52724
loc_529DB:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_50], rcx
mov rdi, rcx
mov rsi, r15
mov ecx, 2EBh
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov r13, [rbp+var_30]
mov rcx, r13
call my_read
mov r12, rax
xor esi, esi
test rax, rax
cmovnz r15, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r13b, 6
cmovnz rsi, r15
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_50]
call qword ptr [rax+218h]
jmp loc_52836
loc_52A4E:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, r15
mov ecx, 2ABh
call qword ptr [rax+210h]
mov edi, r13d
mov [rbp+var_40], r12
mov rsi, r12
mov rdx, r15
mov r12, [rbp+var_30]
mov rcx, r12
call my_read
mov r13, rax
xor esi, esi
test rax, rax
mov eax, 0
cmovz rax, r15
cmp r13, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, r13
test r12b, 6
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
mov r12, [rbp+var_40]
call qword ptr [rax+218h]
mov rax, r13
jmp loc_528F9
| long long my_b_cache_read(long long a1, long long a2, unsigned long long a3)
{
long long v4; // r12
unsigned long long v5; // r14
unsigned int v6; // r15d
long long v7; // rax
long long v8; // rax
long long v9; // rax
unsigned long long v10; // rax
long long v11; // rcx
unsigned long long v12; // r15
long long v13; // rax
unsigned int v14; // r13d
long long v15; // r12
long long v16; // rax
unsigned long long v17; // r12
unsigned long long v18; // rdx
int v19; // ecx
int v20; // eax
long long v21; // rax
unsigned long long v22; // r15
unsigned int v23; // r13d
long long v24; // rax
long long v25; // rax
long long v26; // rsi
unsigned int v27; // r15d
long long v29; // rax
char v30; // r12
long long v31; // r13
long long v32; // rsi
long long v33; // rax
_BYTE v34[72]; // [rsp+0h] [rbp-A0h] BYREF
long long v35; // [rsp+48h] [rbp-58h] BYREF
long long v36; // [rsp+50h] [rbp-50h]
long long v37; // [rsp+58h] [rbp-48h]
long long v38; // [rsp+60h] [rbp-40h]
unsigned long long v39; // [rsp+68h] [rbp-38h]
long long v40; // [rsp+70h] [rbp-30h]
v4 = a2;
v5 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
if ( *(_DWORD *)(a1 + 224) )
{
v6 = *(_DWORD *)(a1 + 212);
v7 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v6, 8LL);
if ( v7 )
{
v39 = a3;
my_b_cache_read_cold_1(v7, v6, v5, &v35);
v8 = v35;
a3 = v39;
}
else
{
v8 = my_seek(v6, v5, 0LL, 0LL);
}
if ( v8 == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
return 1;
}
*(_DWORD *)(a1 + 224) = 0;
v9 = *(_QWORD *)(a1 + 216);
if ( v9 != 0 && v9 != a1 )
{
do
{
*(_DWORD *)(v9 + 224) = 1;
v9 = *(_QWORD *)(v9 + 216);
}
while ( v9 != a1 );
}
}
v10 = v5 & 0xFFF;
if ( 0x2000 - v10 <= a3 )
{
if ( *(_QWORD *)(a1 + 8) <= v5 )
{
*(_QWORD *)(a1 + 224) = 1LL;
return 1;
}
v39 = a3;
v22 = ((unsigned int)a3 & 0xFFFFF000) - v10;
v23 = *(_DWORD *)(a1 + 212);
v40 = *(_QWORD *)(a1 + 248);
v24 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v23, 6LL);
if ( v24 )
{
v37 = v24;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v24,
v22,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
683LL);
v38 = a2;
v30 = v40;
v31 = my_read(v23, a2, v22, v40);
v32 = 0LL;
v33 = 0LL;
if ( !v31 )
v33 = v22;
if ( v31 != -1 )
v32 = v31;
if ( (v30 & 6) != 0 )
v32 = v33;
v4 = v38;
(*((void ( **)(long long, long long))PSI_server + 67))(v37, v32);
v25 = v31;
}
else
{
v25 = my_read(v23, a2, v22, v40);
}
if ( v25 != v22 )
{
*(_DWORD *)(a1 + 228) = v25;
LABEL_35:
*(_DWORD *)(a1 + 224) = 1;
return 1;
}
v11 = v22;
a3 = v39 - v22;
v4 += v22;
v5 += v22;
v10 = 0LL;
}
else
{
v11 = 0LL;
}
v12 = *(_QWORD *)(a1 + 240) - v10;
if ( *(_DWORD *)(a1 + 176) != 4 && v12 >= *(_QWORD *)(a1 + 8) - v5 )
v12 = *(_QWORD *)(a1 + 8) - v5;
if ( !v12 )
{
if ( !a3 )
{
*(_DWORD *)(a1 + 228) = 0;
v27 = 0;
if ( v11 )
{
v29 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v29;
*(_QWORD *)(a1 + 24) = v29;
*(_QWORD *)a1 = v5;
}
return v27;
}
*(_DWORD *)(a1 + 228) = v11;
return 1;
}
v37 = v11;
v39 = a3;
v38 = v4;
v13 = *(_QWORD *)(a1 + 216);
if ( v13 != 0 && v13 != a1 )
{
do
{
*(_DWORD *)(v13 + 224) = 1;
v13 = *(_QWORD *)(v13 + 216);
}
while ( v13 != a1 );
}
v14 = *(_DWORD *)(a1 + 212);
v15 = *(_QWORD *)(a1 + 32);
v40 = *(_QWORD *)(a1 + 248);
v16 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v14, 6LL);
if ( v16 )
{
v36 = v16;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v16,
v12,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
747LL);
v17 = my_read(v14, v15, v12, v40);
(*((void ( **)(long long))PSI_server + 67))(v36);
}
else
{
v17 = my_read(v14, v15, v12, v40);
}
v18 = v39;
if ( v17 == -1LL || v17 < v39 )
{
if ( v17 != -1LL )
memcpy(v38, *(_QWORD *)(a1 + 32), v17);
v19 = v17 + v37;
*(_QWORD *)a1 = v5;
v20 = -1;
if ( v17 != -1LL )
v20 = v19;
*(_DWORD *)(a1 + 228) = v20;
v21 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v21;
*(_QWORD *)(a1 + 16) = v21;
goto LABEL_35;
}
v26 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v26 + v39;
*(_QWORD *)(a1 + 24) = v26 + v17;
*(_QWORD *)a1 = v5;
v27 = 0;
if ( v18 )
memcpy(v38, v26, v18);
return v27;
}
| _my_b_cache_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
SUB R14,qword ptr [RDI + 0x20]
ADD R14,qword ptr [RDI]
CMP dword ptr [RDI + 0xe0],0x0
JZ 0x00152765
MOV R15D,dword ptr [RBX + 0xd4]
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R15D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001529af
MOV EDI,R15D
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0015de20
LAB_00152724:
CMP RAX,-0x1
JZ 0x00152915
MOV dword ptr [RBX + 0xe0],0x0
MOV RAX,qword ptr [RBX + 0xd8]
TEST RAX,RAX
SETZ CL
CMP RAX,RBX
SETZ DL
OR DL,CL
JNZ 0x00152765
LAB_0015274f:
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,RBX
JNZ 0x0015274f
LAB_00152765:
MOV EAX,R14D
AND EAX,0xfff
MOV ECX,0x2000
SUB RCX,RAX
CMP RCX,R13
JBE 0x00152892
XOR ECX,ECX
LAB_00152780:
MOV R15,qword ptr [RBX + 0xf0]
SUB R15,RAX
CMP dword ptr [RBX + 0xb0],0x4
JZ 0x001527a1
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,R14
CMP R15,RAX
CMOVNC R15,RAX
LAB_001527a1:
TEST R15,R15
JZ 0x0015292e
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x38],R13
MOV qword ptr [RBP + -0x40],R12
MOV RAX,qword ptr [RBX + 0xd8]
TEST RAX,RAX
SETZ CL
CMP RAX,RBX
SETZ DL
OR DL,CL
JNZ 0x001527e3
LAB_001527cd:
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,RBX
JNZ 0x001527cd
LAB_001527e3:
MOV R13D,dword ptr [RBX + 0xd4]
MOV R12,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001529db
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015dc20
MOV R12,RAX
LAB_00152836:
MOV RDX,qword ptr [RBP + -0x38]
CMP R12,RDX
SETNC AL
CMP R12,-0x1
SETNZ CL
TEST AL,CL
JNZ 0x0015293b
CMP R12,-0x1
JZ 0x00152865
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,R12
CALL 0x001282c0
LAB_00152865:
MOV RCX,qword ptr [RBP + -0x48]
ADD ECX,R12D
CMP R12,-0x1
MOV qword ptr [RBX],R14
MOV EAX,0xffffffff
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0xe4],EAX
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0015296a
LAB_00152892:
CMP qword ptr [RBX + 0x8],R14
JBE 0x00152921
MOV qword ptr [RBP + -0x38],R13
MOV R15D,R13D
AND R15D,0xfffff000
SUB R15,RAX
MOV R13D,dword ptr [RBX + 0xd4]
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00152a4e
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015dc20
LAB_001528f9:
CMP RAX,R15
MOV R13,qword ptr [RBP + -0x38]
JNZ 0x00152964
MOV RCX,R15
SUB R13,R15
ADD R12,R15
ADD R14,R15
XOR EAX,EAX
JMP 0x00152780
LAB_00152915:
MOV dword ptr [RBX + 0xe4],0xffffffff
JMP 0x00152974
LAB_00152921:
MOV qword ptr [RBX + 0xe0],0x1
JMP 0x00152974
LAB_0015292e:
TEST R13,R13
JZ 0x0015298c
MOV dword ptr [RBX + 0xe4],ECX
JMP 0x00152974
LAB_0015293b:
MOV RSI,qword ptr [RBX + 0x20]
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RBX + 0x10],RAX
ADD R12,RSI
MOV qword ptr [RBX + 0x18],R12
MOV qword ptr [RBX],R14
XOR R15D,R15D
TEST RDX,RDX
JZ 0x0015297a
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001282c0
JMP 0x0015297a
LAB_00152964:
MOV dword ptr [RBX + 0xe4],EAX
LAB_0015296a:
MOV dword ptr [RBX + 0xe0],0x1
LAB_00152974:
MOV R15D,0x1
LAB_0015297a:
MOV EAX,R15D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015298c:
MOV dword ptr [RBX + 0xe4],0x0
XOR R15D,R15D
TEST RCX,RCX
JZ 0x0015297a
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX],R14
JMP 0x0015297a
LAB_001529af:
MOV qword ptr [RBP + -0x38],R13
MOV R13,R12
LEA R12,[RBP + -0x58]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R14
MOV RCX,R12
CALL 0x00129ec9
MOV RAX,qword ptr [R12]
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
JMP 0x00152724
LAB_001529db:
MOV RCX,RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x196c7d]
MOV qword ptr [RBP + -0x50],RCX
MOV RDI,RCX
MOV RSI,R15
MOV ECX,0x2eb
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV R13,qword ptr [RBP + -0x30]
MOV RCX,R13
CALL 0x0015dc20
MOV R12,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R15,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R13B,0x6
CMOVNZ RSI,R15
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x50]
CALL qword ptr [RAX + 0x218]
JMP 0x00152836
LAB_00152a4e:
MOV RCX,RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x196c7d]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,R15
MOV ECX,0x2ab
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV qword ptr [RBP + -0x40],R12
MOV RSI,R12
MOV RDX,R15
MOV R12,qword ptr [RBP + -0x30]
MOV RCX,R12
CALL 0x0015dc20
MOV R13,RAX
XOR ESI,ESI
TEST RAX,RAX
MOV EAX,0x0
CMOVZ RAX,R15
CMP R13,-0x1
CMOVNZ RSI,R13
TEST R12B,0x6
CMOVNZ RSI,RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
MOV R12,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x218]
MOV RAX,R13
JMP 0x001528f9
|
int8 _my_b_cache_read(ulong *param_1,void *param_2,ulong param_3)
{
int4 uVar1;
void *__src;
ulong uVar2;
int iVar3;
long lVar4;
ulong *puVar5;
ulong uVar6;
long lVar7;
long lVar8;
ulong uVar9;
long lVar10;
ulong uVar11;
ulong uVar12;
int1 local_a8 [72];
long local_60;
long local_58;
long local_50;
void *local_48;
ulong local_40;
ulong local_38;
uVar11 = (param_1[3] - param_1[4]) + *param_1;
if ((int)param_1[0x1c] != 0) {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,8);
if (lVar4 == 0) {
local_60 = my_seek(uVar1,uVar11,0,0);
}
else {
local_40 = param_3;
_my_b_cache_read_cold_1(lVar4,uVar1,uVar11,&local_60);
param_3 = local_40;
}
if (local_60 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
puVar5 = (ulong *)param_1[0x1b];
if (puVar5 != param_1 && puVar5 != (ulong *)0x0) {
do {
*(int4 *)(puVar5 + 0x1c) = 1;
puVar5 = (ulong *)puVar5[0x1b];
} while (puVar5 != param_1);
}
}
uVar12 = (ulong)((uint)uVar11 & 0xfff);
if (param_3 < 0x2000 - uVar12) {
lVar4 = 0;
}
else {
if (param_1[1] <= uVar11) {
param_1[0x1c] = 1;
return 1;
}
lVar4 = ((uint)param_3 & 0xfffff000) - uVar12;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_38 = param_1[0x1f];
local_40 = param_3;
local_50 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6);
if (local_50 == 0) {
lVar7 = my_read(uVar1,param_2,lVar4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(local_50,lVar4,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2ab)
;
uVar12 = local_38;
local_48 = param_2;
lVar7 = my_read(uVar1,param_2,lVar4,local_38);
param_2 = local_48;
lVar8 = 0;
if (lVar7 == 0) {
lVar8 = lVar4;
}
lVar10 = 0;
if (lVar7 != -1) {
lVar10 = lVar7;
}
if ((uVar12 & 6) != 0) {
lVar10 = lVar8;
}
(**(code **)(PSI_server + 0x218))(local_50,lVar10);
}
if (lVar7 != lVar4) {
*(int *)((long)param_1 + 0xe4) = (int)lVar7;
goto LAB_0015296a;
}
param_3 = local_40 - lVar4;
param_2 = (void *)((long)param_2 + lVar4);
uVar11 = uVar11 + lVar4;
uVar12 = 0;
}
uVar12 = param_1[0x1e] - uVar12;
if (((int)param_1[0x16] != 4) && (param_1[1] - uVar11 <= uVar12)) {
uVar12 = param_1[1] - uVar11;
}
if (uVar12 == 0) {
if (param_3 != 0) {
*(int *)((long)param_1 + 0xe4) = (int)lVar4;
return 1;
}
*(int4 *)((long)param_1 + 0xe4) = 0;
if (lVar4 != 0) {
param_1[2] = param_1[4];
param_1[3] = param_1[4];
*param_1 = uVar11;
return 0;
}
return 0;
}
puVar5 = (ulong *)param_1[0x1b];
if (puVar5 != param_1 && puVar5 != (ulong *)0x0) {
do {
*(int4 *)(puVar5 + 0x1c) = 1;
puVar5 = (ulong *)puVar5[0x1b];
} while (puVar5 != param_1);
}
uVar1 = *(int4 *)((long)param_1 + 0xd4);
uVar6 = param_1[4];
local_38 = param_1[0x1f];
local_50 = lVar4;
local_48 = param_2;
local_40 = param_3;
lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6);
if (lVar4 == 0) {
uVar6 = my_read(uVar1,uVar6,uVar12,local_38);
}
else {
local_58 = lVar4;
(**(code **)(PSI_server + 0x210))
(lVar4,uVar12,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2eb);
uVar2 = local_38;
uVar6 = my_read(uVar1,uVar6,uVar12,local_38);
if (uVar6 != 0) {
uVar12 = 0;
}
uVar9 = 0;
if (uVar6 != 0xffffffffffffffff) {
uVar9 = uVar6;
}
if ((uVar2 & 6) != 0) {
uVar9 = uVar12;
}
(**(code **)(PSI_server + 0x218))(local_58,uVar9);
}
if (local_40 <= uVar6 && uVar6 != 0xffffffffffffffff) {
__src = (void *)param_1[4];
param_1[2] = (long)__src + local_40;
param_1[3] = uVar6 + (long)__src;
*param_1 = uVar11;
if (local_40 != 0) {
memcpy(local_48,__src,local_40);
return 0;
}
return 0;
}
if (uVar6 != 0xffffffffffffffff) {
memcpy(local_48,(void *)param_1[4],uVar6);
}
*param_1 = uVar11;
iVar3 = -1;
if (uVar6 != 0xffffffffffffffff) {
iVar3 = (int)local_50 + (int)uVar6;
}
*(int *)((long)param_1 + 0xe4) = iVar3;
param_1[3] = param_1[4];
param_1[2] = param_1[4];
LAB_0015296a:
*(int4 *)(param_1 + 0x1c) = 1;
return 1;
}
| |
50,849 | bool httplib::detail::parse_header<httplib::detail::MultipartFormDataParser::parse(char const*, unsigned long, std::function<bool (char const*, unsigned long)> const&, std::function<bool (httplib::MultipartFormData const&)> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::detail::MultipartFormDataParser::parse(char const*, unsigned long, std::function<bool (char const*, unsigned long)> const&, std::function<bool (httplib::MultipartFormData const&)> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | llama.cpp/examples/server/httplib.h | inline bool parse_header(const char *beg, const char *end, T fn) {
// Skip trailing spaces and tabs.
while (beg < end && is_space_or_tab(end[-1])) {
end--;
}
auto p = beg;
while (p < end && *p != ':') {
p++;
}
auto name = std::string(beg, p);
if (!detail::fields::is_field_name(name)) { return false; }
if (p == end) { return false; }
auto key_end = p;
if (*p++ != ':') { return false; }
while (p < end && is_space_or_tab(*p)) {
p++;
}
if (p <= end) {
auto key_len = key_end - beg;
if (!key_len) { return false; }
auto key = std::string(beg, key_end);
auto val = std::string(p, end);
if (!detail::fields::is_field_value(val)) { return false; }
if (case_ignore::equal(key, "Location") ||
case_ignore::equal(key, "Referer")) {
fn(key, val);
} else {
fn(key, decode_url(val, false));
}
return true;
}
return false;
} | O3 | c | bool httplib::detail::parse_header<httplib::detail::MultipartFormDataParser::parse(char const*, unsigned long, std::function<bool (char const*, unsigned long)> const&, std::function<bool (httplib::MultipartFormData const&)> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::detail::MultipartFormDataParser::parse(char const*, unsigned long, std::function<bool (char const*, unsigned long)> const&, std::function<bool (httplib::MultipartFormData const&)> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, 0x28(%rsp)
movq %rsi, %r14
movq %rdi, %rcx
cmpq %rdi, %rsi
jbe 0x76290
movzbl -0x1(%r14), %eax
cmpl $0x20, %eax
je 0x76285
cmpl $0x9, %eax
jne 0x76290
decq %r14
cmpq %rcx, %r14
ja 0x76276
movq %rcx, %r14
movq %rcx, %r12
cmpq %rcx, %r14
jbe 0x762b3
movq %r14, %rax
subq %rcx, %rax
movq %rcx, %r12
cmpb $0x3a, (%r12)
je 0x762b3
incq %r12
decq %rax
jne 0x762a1
movq %r14, %r12
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %rcx, 0x30(%rsp)
movq %rcx, %rsi
movq %r12, %rdx
callq 0x52736
movq (%rbx), %r13
movq 0x8(%rbx), %rbp
testq %rbp, %rbp
je 0x7637e
xorl %r15d, %r15d
movsbl (%r13,%r15), %ebx
movl %ebx, %edi
callq 0x258e0
testl %eax, %eax
jne 0x7631e
movzbl %bl, %eax
leal -0x21(%rax), %ecx
cmpl $0x3f, %ecx
ja 0x76328
movabsq $-0x1fffffffffffc983, %rdx # imm = 0xE00000000000367D
btq %rcx, %rdx
jae 0x76328
incq %r15
cmpq %r15, %rbp
jne 0x762f2
jmp 0x76334
cmpl $0x7e, %eax
je 0x7631e
cmpl $0x7c, %eax
je 0x7631e
jmp 0x76385
cmpq %r14, %r12
je 0x76385
cmpb $0x3a, (%r12)
leaq 0x88(%rsp), %r15
jne 0x7637e
leaq 0x1(%r12), %rbx
cmpq %r14, %rbx
jae 0x76394
movq %r14, %rax
subq %r12, %rax
leaq (%r12,%rax), %rcx
decq %rax
movq 0x30(%rsp), %rsi
movzbl (%rbx), %edx
cmpl $0x20, %edx
je 0x76371
cmpl $0x9, %edx
jne 0x76399
incq %rbx
decq %rax
jne 0x76364
movq %rcx, %rbx
jmp 0x76399
xorl %ebp, %ebp
jmp 0x76670
xorl %ebp, %ebp
leaq 0x88(%rsp), %r15
jmp 0x76670
movq 0x30(%rsp), %rsi
xorl %ebp, %ebp
cmpq %rsi, %r12
je 0x76670
cmpq %r14, %rbx
ja 0x76670
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
leaq 0x58(%rsp), %rdi
movq %r12, %rdx
callq 0x52736
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x52736
movq 0x40(%rsp), %rcx
testq %rcx, %rcx
je 0x764a6
cmpq $0x2, %rcx
je 0x76410
cmpq $0x1, %rcx
jne 0x76432
movq 0x38(%rsp), %rax
jmp 0x76492
movq 0x38(%rsp), %rax
movb (%rax), %cl
leal -0x21(%rcx), %edx
cmpb $0x5e, %dl
setae %dl
testb %cl, %cl
setns %cl
testb %dl, %cl
jne 0x76512
incq %rax
jmp 0x76492
movq 0x38(%rsp), %rax
movb (%rax), %dl
leal -0x21(%rdx), %esi
cmpb $0x5e, %sil
setae %sil
testb %dl, %dl
setns %dl
testb %sil, %dl
jne 0x76512
leaq -0x1(%rcx), %rdx
addq $-0x2, %rcx
xorl %esi, %esi
movzbl 0x1(%rax,%rsi), %edi
cmpl $0x9, %edi
je 0x76487
cmpl $0x20, %edi
je 0x76487
leal -0x21(%rdi), %r8d
cmpb $0x5e, %r8b
setae %r8b
testb %dil, %dil
setns %dil
testb %r8b, %dil
jne 0x76512
incq %rsi
cmpq %rsi, %rcx
jne 0x7645c
addq %rdx, %rax
movb (%rax), %al
leal -0x21(%rax), %ecx
cmpb $0x5e, %cl
setb %cl
testb %al, %al
sets %al
orb %cl, %al
je 0x76512
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xfda76(%rip), %rsi # 0x173f2c
leaq 0xfda77(%rip), %rdx # 0x173f34
leaq 0x8(%rsp), %rdi
callq 0x52736
movq 0x60(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x76519
movb $0x1, %bl
movq 0x8(%rsp), %rdi
testq %rax, %rax
je 0x765bb
movq 0x58(%rsp), %rcx
xorl %edx, %edx
leaq 0x1034af(%rip), %rsi # 0x1799a0
movzbl (%rcx,%rdx), %r8d
movzbl (%rdi,%rdx), %r9d
movb (%r8,%rsi), %r8b
cmpb (%r9,%rsi), %r8b
jne 0x76519
incq %rdx
cmpq %rdx, %rax
jne 0x764f1
jmp 0x765bb
xorl %ebp, %ebp
jmp 0x76635
leaq 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xfda08(%rip), %rsi # 0x173f35
leaq 0xfda08(%rip), %rdx # 0x173f3c
leaq 0x98(%rsp), %rdi
callq 0x52736
movq 0x60(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jne 0x76593
movq 0x98(%rsp), %rdi
testq %rax, %rax
je 0x7659f
movq 0x58(%rsp), %rcx
decq %rax
xorl %edx, %edx
leaq 0x103432(%rip), %rsi # 0x1799a0
movzbl (%rcx,%rdx), %r8d
movzbl (%rdi,%rdx), %r9d
movb (%r8,%rsi), %r8b
cmpb (%r9,%rsi), %r8b
sete %bl
jne 0x765a1
leaq 0x1(%rdx), %r8
cmpq %rdx, %rax
movq %r8, %rdx
jne 0x7656e
jmp 0x765a1
movq 0x98(%rsp), %rdi
xorl %ebx, %ebx
jmp 0x765a1
movb $0x1, %bl
cmpq %r12, %rdi
je 0x765b6
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x765cd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
testb %bl, %bl
je 0x765f0
movq 0x28(%rsp), %rdi
addq $0x70, %rdi
movb $0x1, %bpl
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
xorl %esi, %esi
callq 0x6b9c6
jmp 0x76635
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x6aa9d
movq 0x28(%rsp), %rdi
addq $0x70, %rdi
leaq 0x58(%rsp), %rdx
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
callq 0x6b9c6
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x76632
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x7664c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x88(%rsp), %r15
je 0x7666b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x78(%rsp), %r13
cmpq %r15, %r13
je 0x76688
movq 0x88(%rsp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x251b0
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x766a2
jmp 0x766be
jmp 0x766be
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x766c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
jmp 0x766c1
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x766dd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x251b0
jmp 0x766dd
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x766f9
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x251b0
jmp 0x766f9
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x7671b
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x251b0
movq %rbx, %rdi
callq 0x25ca0
nop
| _ZN7httplib6detail12parse_headerIZNS0_20read_content_chunkedINS_7RequestEEEbRNS_6StreamERT_St8functionIFbPKcmmmEEEUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESK_E_EEbSA_SA_S6_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov [rsp+0E8h+var_C0], rdx
mov r14, rsi
mov rcx, rdi
cmp rsi, rdi
jbe short loc_76290
loc_76276:
movzx eax, byte ptr [r14-1]
cmp eax, 20h ; ' '
jz short loc_76285
cmp eax, 9
jnz short loc_76290
loc_76285:
dec r14
cmp r14, rcx
ja short loc_76276
mov r14, rcx
loc_76290:
mov r12, rcx
cmp r14, rcx
jbe short loc_762B3
mov rax, r14
sub rax, rcx
mov r12, rcx
loc_762A1:
cmp byte ptr [r12], 3Ah ; ':'
jz short loc_762B3
inc r12
dec rax
jnz short loc_762A1
mov r12, r14
loc_762B3:
lea r15, [rsp+0E8h+var_60]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
lea rbx, [rsp+0E8h+var_70]
mov rdi, rbx
mov [rsp+0E8h+var_B8], rcx
mov rsi, rcx
mov rdx, r12
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 r13, [rbx]
mov rbp, [rbx+8]
test rbp, rbp
jz loc_7637E
xor r15d, r15d
loc_762F2:
movsx ebx, byte ptr [r13+r15+0]
mov edi, ebx
call _isalnum
test eax, eax
jnz short loc_7631E
movzx eax, bl
lea ecx, [rax-21h]
cmp ecx, 3Fh ; '?'
ja short loc_76328
mov rdx, 0E00000000000367Dh
bt rdx, rcx
jnb short loc_76328
loc_7631E:
inc r15
cmp rbp, r15
jnz short loc_762F2
jmp short loc_76334
loc_76328:
cmp eax, 7Eh ; '~'
jz short loc_7631E
cmp eax, 7Ch ; '|'
jz short loc_7631E
jmp short loc_76385
loc_76334:
cmp r12, r14
jz short loc_76385
cmp byte ptr [r12], 3Ah ; ':'
lea r15, [rsp+0E8h+var_60]
jnz short loc_7637E
lea rbx, [r12+1]
cmp rbx, r14
jnb short loc_76394
mov rax, r14
sub rax, r12
lea rcx, [r12+rax]
dec rax
mov rsi, [rsp+0E8h+var_B8]
loc_76364:
movzx edx, byte ptr [rbx]
cmp edx, 20h ; ' '
jz short loc_76371
cmp edx, 9
jnz short loc_76399
loc_76371:
inc rbx
dec rax
jnz short loc_76364
mov rbx, rcx
jmp short loc_76399
loc_7637E:
xor ebp, ebp
jmp loc_76670
loc_76385:
xor ebp, ebp
lea r15, [rsp+0E8h+var_60]
jmp loc_76670
loc_76394:
mov rsi, [rsp+0E8h+var_B8]
loc_76399:
xor ebp, ebp
cmp r12, rsi
jz loc_76670
cmp rbx, r14
ja loc_76670
lea r13, [rsp+0E8h+var_80]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
lea rdi, [rsp+0E8h+var_90]
mov rdx, r12
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 r15, [rsp+0E8h+var_A0]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
lea rdi, [rsp+0E8h+var_B0]
mov rsi, rbx
mov rdx, 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)
mov rcx, [rsp+0E8h+var_A8]
test rcx, rcx
jz loc_764A6
cmp rcx, 2
jz short loc_76410
cmp rcx, 1
jnz short loc_76432
mov rax, [rsp+0E8h+var_B0]
jmp loc_76492
loc_76410:
mov rax, [rsp+0E8h+var_B0]
mov cl, [rax]
lea edx, [rcx-21h]
cmp dl, 5Eh ; '^'
setnb dl
test cl, cl
setns cl
test cl, dl
jnz loc_76512
inc rax
jmp short loc_76492
loc_76432:
mov rax, [rsp+0E8h+var_B0]
mov dl, [rax]
lea esi, [rdx-21h]
cmp sil, 5Eh ; '^'
setnb sil
test dl, dl
setns dl
test dl, sil
jnz loc_76512
lea rdx, [rcx-1]
add rcx, 0FFFFFFFFFFFFFFFEh
xor esi, esi
loc_7645C:
movzx edi, byte ptr [rax+rsi+1]
cmp edi, 9
jz short loc_76487
cmp edi, 20h ; ' '
jz short loc_76487
lea r8d, [rdi-21h]
cmp r8b, 5Eh ; '^'
setnb r8b
test dil, dil
setns dil
test dil, r8b
jnz loc_76512
loc_76487:
inc rsi
cmp rcx, rsi
jnz short loc_7645C
add rax, rdx
loc_76492:
mov al, [rax]
lea ecx, [rax-21h]
cmp cl, 5Eh ; '^'
setb cl
test al, al
sets al
or al, cl
jz short loc_76512
loc_764A6:
lea r14, [rsp+0E8h+var_D0]
mov [r14-10h], r14
lea rsi, aLocation; "Location"
lea rdx, aLocation+8; ""
lea rdi, [rsp+0E8h+var_E0]
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 rax, [rsp+0E8h+var_88]
cmp rax, [rsp+0E8h+var_D8]
jnz short loc_76519
mov bl, 1
mov rdi, [rsp+0E8h+var_E0]
test rax, rax
jz loc_765BB
mov rcx, [rsp+0E8h+var_90]
xor edx, edx
lea rsi, _ZZN7httplib6detail11case_ignore8to_lowerEiE5table; httplib::detail::case_ignore::to_lower(int)::table
loc_764F1:
movzx r8d, byte ptr [rcx+rdx]
movzx r9d, byte ptr [rdi+rdx]
mov r8b, [r8+rsi]
cmp r8b, [r9+rsi]
jnz short loc_76519
inc rdx
cmp rax, rdx
jnz short loc_764F1
jmp loc_765BB
loc_76512:
xor ebp, ebp
jmp loc_76635
loc_76519:
lea r12, [rsp+0E8h+var_40]
mov [r12-10h], r12
lea rsi, aReferer; "Referer"
lea rdx, aReferer+7; ""
lea rdi, [rsp+0E8h+var_50]
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 rax, [rsp+0E8h+var_88]
cmp rax, [rsp+0E8h+var_48]
jnz short loc_76593
mov rdi, [rsp+0E8h+var_50]; void *
test rax, rax
jz short loc_7659F
mov rcx, [rsp+0E8h+var_90]
dec rax
xor edx, edx
lea rsi, _ZZN7httplib6detail11case_ignore8to_lowerEiE5table; httplib::detail::case_ignore::to_lower(int)::table
loc_7656E:
movzx r8d, byte ptr [rcx+rdx]
movzx r9d, byte ptr [rdi+rdx]
mov r8b, [r8+rsi]
cmp r8b, [r9+rsi]
setz bl
jnz short loc_765A1
lea r8, [rdx+1]
cmp rax, rdx
mov rdx, r8
jnz short loc_7656E
jmp short loc_765A1
loc_76593:
mov rdi, [rsp+0E8h+var_50]
xor ebx, ebx
jmp short loc_765A1
loc_7659F:
mov bl, 1
loc_765A1:
cmp rdi, r12
jz short loc_765B6
mov rsi, [rsp+0E8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_765B6:
mov rdi, [rsp+0E8h+var_E0]; void *
loc_765BB:
cmp rdi, r14
jz short loc_765CD
mov rsi, [rsp+0E8h+var_D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_765CD:
test bl, bl
jz short loc_765F0
mov rdi, [rsp+0E8h+var_C0]
add rdi, 70h ; 'p'
mov bpl, 1
lea rdx, [rsp+0E8h+var_90]
lea rcx, [rsp+0E8h+var_B0]
xor esi, esi
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEENSA_20_Node_const_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,std::integral_constant<bool,false>,std::string const&,std::string const&)
jmp short loc_76635
loc_765F0:
lea rdi, [rsp+0E8h+var_E0]
lea rsi, [rsp+0E8h+var_B0]
xor edx, edx
call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool)
mov rdi, [rsp+0E8h+var_C0]
add rdi, 70h ; 'p'
lea rdx, [rsp+0E8h+var_90]
lea rcx, [rsp+0E8h+var_E0]
xor esi, esi
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEENSA_20_Node_const_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,std::integral_constant<bool,false>,std::string const&,std::string const&)
mov rdi, [rsp+0E8h+var_E0]; void *
cmp rdi, r14
jz short loc_76632
mov rsi, [rsp+0E8h+var_D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_76632:
mov bpl, 1
loc_76635:
mov rdi, [rsp+0E8h+var_B0]; void *
cmp rdi, r15
jz short loc_7664C
mov rsi, [rsp+0E8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7664C:
mov rdi, [rsp+0E8h+var_90]; void *
cmp rdi, r13
lea r15, [rsp+0E8h+var_60]
jz short loc_7666B
mov rsi, [rsp+0E8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7666B:
mov r13, [rsp+0E8h+var_70]
loc_76670:
cmp r13, r15
jz short loc_76688
mov rsi, [rsp+0E8h+var_60]
inc rsi; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_76688:
mov eax, ebp
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_766A2
jmp short loc_766BE
jmp short loc_766BE
loc_766A2:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_766C1
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_766C1
loc_766BE:
mov rbx, rax
loc_766C1:
mov rdi, [rsp+arg_30]; void *
cmp rdi, r15
jz short loc_766DD
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_766DD
mov rbx, rax
loc_766DD:
mov rdi, [rsp+arg_50]; void *
cmp rdi, r13
jz short loc_766F9
mov rsi, [rsp+arg_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_766F9
mov rbx, rax
loc_766F9:
mov rdi, [rsp+arg_70]; void *
lea rax, [rsp+arg_80]
cmp rdi, rax
jz short loc_7671B
mov rsi, [rsp+arg_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7671B:
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::parse_header<bool httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream &,httplib::Request &,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>)::{lambda(std::string const&,std::string const&)#1}>(
_BYTE *a1,
unsigned long long a2,
long long a3)
{
unsigned long long v3; // r14
int v4; // eax
_BYTE *v5; // r12
unsigned long long v6; // rax
_BYTE *v7; // r13
long long v8; // rbp
long long v9; // r15
unsigned __int8 v10; // bl
unsigned long long v11; // rcx
unsigned long long v12; // rdx
_BYTE *v13; // rbx
long long v14; // rax
_BYTE *v15; // rsi
int v16; // edx
unsigned int v17; // ebp
char *v18; // rax
long long v19; // rsi
int v20; // edi
bool v21; // bl
_QWORD *v22; // rdi
long long v23; // rdx
_QWORD *v24; // rdi
char *v25; // rdx
long long v26; // r9
char v27; // r8
void *v30[2]; // [rsp+8h] [rbp-E0h] BYREF
_QWORD v31[2]; // [rsp+18h] [rbp-D0h] BYREF
long long v32; // [rsp+28h] [rbp-C0h]
_BYTE *v33; // [rsp+30h] [rbp-B8h]
void *v34; // [rsp+38h] [rbp-B0h] BYREF
long long v35; // [rsp+40h] [rbp-A8h]
_QWORD v36[2]; // [rsp+48h] [rbp-A0h] BYREF
void *v37; // [rsp+58h] [rbp-90h] BYREF
char *v38; // [rsp+60h] [rbp-88h]
_QWORD v39[2]; // [rsp+68h] [rbp-80h] BYREF
_QWORD *v40; // [rsp+78h] [rbp-70h] BYREF
long long v41; // [rsp+80h] [rbp-68h]
_QWORD v42[2]; // [rsp+88h] [rbp-60h] BYREF
void *v43[2]; // [rsp+98h] [rbp-50h] BYREF
_QWORD v44[8]; // [rsp+A8h] [rbp-40h] BYREF
v32 = a3;
v3 = a2;
if ( a2 > (unsigned long long)a1 )
{
while ( 1 )
{
v4 = *(unsigned __int8 *)(v3 - 1);
if ( v4 != 32 && v4 != 9 )
break;
if ( --v3 <= (unsigned long long)a1 )
{
v3 = (unsigned long long)a1;
break;
}
}
}
v5 = a1;
if ( v3 > (unsigned long long)a1 )
{
v6 = v3 - (_QWORD)a1;
v5 = a1;
while ( *v5 != 58 )
{
++v5;
if ( !--v6 )
{
v5 = (_BYTE *)v3;
break;
}
}
}
v40 = v42;
v41 = 0LL;
v33 = a1;
std::string::_M_construct<char const*>((long long)&v40, a1, (long long)v5);
v7 = v40;
v8 = v41;
if ( !v41 )
{
LABEL_29:
v17 = 0;
goto LABEL_78;
}
v9 = 0LL;
do
{
v10 = v7[v9];
if ( !(unsigned int)isalnum((unsigned int)(char)v10) )
{
v11 = (unsigned int)v10 - 33;
if ( (unsigned int)v11 > 0x3F || (v12 = 0xE00000000000367DLL, !_bittest64((const long long *)&v12, v11)) )
{
if ( v10 != 126 && v10 != 124 )
goto LABEL_30;
}
}
++v9;
}
while ( v8 != v9 );
if ( v5 == (_BYTE *)v3 )
{
LABEL_30:
v17 = 0;
goto LABEL_78;
}
if ( *v5 != 58 )
goto LABEL_29;
v13 = v5 + 1;
if ( (unsigned long long)(v5 + 1) >= v3 )
{
v15 = v33;
}
else
{
v14 = v3 - (_QWORD)v5 - 1;
v15 = v33;
while ( 1 )
{
v16 = (unsigned __int8)*v13;
if ( v16 != 32 && v16 != 9 )
break;
++v13;
if ( !--v14 )
{
v13 = (_BYTE *)v3;
break;
}
}
}
v17 = 0;
if ( v5 != v15 && (unsigned long long)v13 <= v3 )
{
v37 = v39;
v38 = 0LL;
std::string::_M_construct<char const*>((long long)&v37, v15, (long long)v5);
v34 = v36;
v35 = 0LL;
std::string::_M_construct<char const*>((long long)&v34, v13, v3);
switch ( v35 )
{
case 0LL:
goto LABEL_48;
case 2LL:
if ( (unsigned __int8)(*(_BYTE *)v34 - 33) >= 0x5Eu && *(_BYTE *)v34 >= 0 )
goto LABEL_54;
v18 = (char *)v34 + 1;
break;
case 1LL:
v18 = (char *)v34;
break;
default:
if ( (unsigned __int8)(*(_BYTE *)v34 - 33) < 0x5Eu || *(_BYTE *)v34 < 0 )
{
v19 = 0LL;
while ( 1 )
{
v20 = *((unsigned __int8 *)v34 + v19 + 1);
if ( v20 != 9 && v20 != 32 && (unsigned __int8)(v20 - 33) >= 0x5Eu && (v20 & 0x80u) == 0 )
break;
if ( v35 - 2 == ++v19 )
{
v18 = (char *)v34 + v35 - 1;
goto LABEL_47;
}
}
}
goto LABEL_54;
}
LABEL_47:
if ( (unsigned __int8)(*v18 - 33) < 0x5Eu || *v18 < 0 )
{
LABEL_48:
v30[0] = v31;
std::string::_M_construct<char const*>((long long)v30, "Location", (long long)"");
if ( v38 == v30[1] )
{
v21 = 1;
v22 = v30[0];
if ( !v38 )
{
LABEL_66:
if ( v22 != v31 )
operator delete(v22, v31[0] + 1LL);
if ( v21 )
{
LOBYTE(v17) = 1;
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(
v32 + 112,
0LL,
(long long)&v37,
(long long)&v34);
}
else
{
httplib::detail::decode_url((long long)v30, (long long *)&v34, 0);
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(
v32 + 112,
0LL,
(long long)&v37,
(long long)v30);
if ( v30[0] != v31 )
operator delete(v30[0], v31[0] + 1LL);
LOBYTE(v17) = 1;
}
goto LABEL_73;
}
v23 = 0LL;
while ( httplib::detail::case_ignore::to_lower(int)::table[*((unsigned __int8 *)v37 + v23)] == httplib::detail::case_ignore::to_lower(int)::table[*((unsigned __int8 *)v30[0] + v23)] )
{
if ( v38 == (char *)++v23 )
goto LABEL_66;
}
}
v43[0] = v44;
std::string::_M_construct<char const*>((long long)v43, "Referer", (long long)"");
if ( v38 == v43[1] )
{
v24 = v43[0];
if ( v38 )
{
v25 = 0LL;
do
{
v26 = *((unsigned __int8 *)v43[0] + (unsigned long long)v25);
v27 = httplib::detail::case_ignore::to_lower(int)::table[(unsigned __int8)v25[(_QWORD)v37]];
v21 = v27 == httplib::detail::case_ignore::to_lower(int)::table[v26];
if ( v27 != httplib::detail::case_ignore::to_lower(int)::table[v26] )
break;
}
while ( v38 - 1 != v25++ );
}
else
{
v21 = 1;
}
}
else
{
v24 = v43[0];
v21 = 0;
}
if ( v24 != v44 )
operator delete(v24, v44[0] + 1LL);
v22 = v30[0];
goto LABEL_66;
}
LABEL_54:
v17 = 0;
LABEL_73:
if ( v34 != v36 )
operator delete(v34, v36[0] + 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
v7 = v40;
}
LABEL_78:
if ( v7 != (_BYTE *)v42 )
operator delete(v7, v42[0] + 1LL);
return v17;
}
| parse_header<httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&,httplib::Request&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>)::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RSP + 0x28],RDX
MOV R14,RSI
MOV RCX,RDI
CMP RSI,RDI
JBE 0x00176290
LAB_00176276:
MOVZX EAX,byte ptr [R14 + -0x1]
CMP EAX,0x20
JZ 0x00176285
CMP EAX,0x9
JNZ 0x00176290
LAB_00176285:
DEC R14
CMP R14,RCX
JA 0x00176276
MOV R14,RCX
LAB_00176290:
MOV R12,RCX
CMP R14,RCX
JBE 0x001762b3
MOV RAX,R14
SUB RAX,RCX
MOV R12,RCX
LAB_001762a1:
CMP byte ptr [R12],0x3a
JZ 0x001762b3
INC R12
DEC RAX
JNZ 0x001762a1
MOV R12,R14
LAB_001762b3:
LEA R15,[RSP + 0x88]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
LEA RBX,[RSP + 0x78]
MOV RDI,RBX
MOV qword ptr [RSP + 0x30],RCX
MOV RSI,RCX
MOV RDX,R12
CALL 0x00152736
MOV R13,qword ptr [RBX]
MOV RBP,qword ptr [RBX + 0x8]
TEST RBP,RBP
JZ 0x0017637e
XOR R15D,R15D
LAB_001762f2:
MOVSX EBX,byte ptr [R13 + R15*0x1]
MOV EDI,EBX
CALL 0x001258e0
TEST EAX,EAX
JNZ 0x0017631e
MOVZX EAX,BL
LEA ECX,[RAX + -0x21]
CMP ECX,0x3f
JA 0x00176328
MOV RDX,-0x1fffffffffffc983
BT RDX,RCX
JNC 0x00176328
LAB_0017631e:
INC R15
CMP RBP,R15
JNZ 0x001762f2
JMP 0x00176334
LAB_00176328:
CMP EAX,0x7e
JZ 0x0017631e
CMP EAX,0x7c
JZ 0x0017631e
JMP 0x00176385
LAB_00176334:
CMP R12,R14
JZ 0x00176385
CMP byte ptr [R12],0x3a
LEA R15,[RSP + 0x88]
JNZ 0x0017637e
LEA RBX,[R12 + 0x1]
CMP RBX,R14
JNC 0x00176394
MOV RAX,R14
SUB RAX,R12
LEA RCX,[R12 + RAX*0x1]
DEC RAX
MOV RSI,qword ptr [RSP + 0x30]
LAB_00176364:
MOVZX EDX,byte ptr [RBX]
CMP EDX,0x20
JZ 0x00176371
CMP EDX,0x9
JNZ 0x00176399
LAB_00176371:
INC RBX
DEC RAX
JNZ 0x00176364
MOV RBX,RCX
JMP 0x00176399
LAB_0017637e:
XOR EBP,EBP
JMP 0x00176670
LAB_00176385:
XOR EBP,EBP
LEA R15,[RSP + 0x88]
JMP 0x00176670
LAB_00176394:
MOV RSI,qword ptr [RSP + 0x30]
LAB_00176399:
XOR EBP,EBP
CMP R12,RSI
JZ 0x00176670
CMP RBX,R14
JA 0x00176670
LEA R13,[RSP + 0x68]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
LAB_001763be:
LEA RDI,[RSP + 0x58]
MOV RDX,R12
CALL 0x00152736
LEA R15,[RSP + 0x48]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
LAB_001763dc:
LEA RDI,[RSP + 0x38]
MOV RSI,RBX
MOV RDX,R14
CALL 0x00152736
MOV RCX,qword ptr [RSP + 0x40]
TEST RCX,RCX
JZ 0x001764a6
CMP RCX,0x2
JZ 0x00176410
CMP RCX,0x1
JNZ 0x00176432
MOV RAX,qword ptr [RSP + 0x38]
JMP 0x00176492
LAB_00176410:
MOV RAX,qword ptr [RSP + 0x38]
MOV CL,byte ptr [RAX]
LEA EDX,[RCX + -0x21]
CMP DL,0x5e
SETNC DL
TEST CL,CL
SETNS CL
TEST CL,DL
JNZ 0x00176512
INC RAX
JMP 0x00176492
LAB_00176432:
MOV RAX,qword ptr [RSP + 0x38]
MOV DL,byte ptr [RAX]
LEA ESI,[RDX + -0x21]
CMP SIL,0x5e
SETNC SIL
TEST DL,DL
SETNS DL
TEST DL,SIL
JNZ 0x00176512
LEA RDX,[RCX + -0x1]
ADD RCX,-0x2
XOR ESI,ESI
LAB_0017645c:
MOVZX EDI,byte ptr [RAX + RSI*0x1 + 0x1]
CMP EDI,0x9
JZ 0x00176487
CMP EDI,0x20
JZ 0x00176487
LEA R8D,[RDI + -0x21]
CMP R8B,0x5e
SETNC R8B
TEST DIL,DIL
SETNS DIL
TEST DIL,R8B
JNZ 0x00176512
LAB_00176487:
INC RSI
CMP RCX,RSI
JNZ 0x0017645c
ADD RAX,RDX
LAB_00176492:
MOV AL,byte ptr [RAX]
LEA ECX,[RAX + -0x21]
CMP CL,0x5e
SETC CL
TEST AL,AL
SETS AL
OR AL,CL
JZ 0x00176512
LAB_001764a6:
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
LAB_001764af:
LEA RSI,[0x273f2c]
LEA RDX,[0x273f34]
LEA RDI,[RSP + 0x8]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x60]
CMP RAX,qword ptr [RSP + 0x10]
JNZ 0x00176519
MOV BL,0x1
MOV RDI,qword ptr [RSP + 0x8]
TEST RAX,RAX
JZ 0x001765bb
MOV RCX,qword ptr [RSP + 0x58]
XOR EDX,EDX
LEA RSI,[0x2799a0]
LAB_001764f1:
MOVZX R8D,byte ptr [RCX + RDX*0x1]
MOVZX R9D,byte ptr [RDI + RDX*0x1]
MOV R8B,byte ptr [R8 + RSI*0x1]
CMP R8B,byte ptr [R9 + RSI*0x1]
JNZ 0x00176519
INC RDX
CMP RAX,RDX
JNZ 0x001764f1
JMP 0x001765bb
LAB_00176512:
XOR EBP,EBP
JMP 0x00176635
LAB_00176519:
LEA R12,[RSP + 0xa8]
MOV qword ptr [R12 + -0x10],R12
LAB_00176526:
LEA RSI,[0x273f35]
LEA RDX,[0x273f3c]
LEA RDI,[RSP + 0x98]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x60]
CMP RAX,qword ptr [RSP + 0xa0]
JNZ 0x00176593
MOV RDI,qword ptr [RSP + 0x98]
TEST RAX,RAX
JZ 0x0017659f
MOV RCX,qword ptr [RSP + 0x58]
DEC RAX
XOR EDX,EDX
LEA RSI,[0x2799a0]
LAB_0017656e:
MOVZX R8D,byte ptr [RCX + RDX*0x1]
MOVZX R9D,byte ptr [RDI + RDX*0x1]
MOV R8B,byte ptr [R8 + RSI*0x1]
CMP R8B,byte ptr [R9 + RSI*0x1]
SETZ BL
JNZ 0x001765a1
LEA R8,[RDX + 0x1]
CMP RAX,RDX
MOV RDX,R8
JNZ 0x0017656e
JMP 0x001765a1
LAB_00176593:
MOV RDI,qword ptr [RSP + 0x98]
XOR EBX,EBX
JMP 0x001765a1
LAB_0017659f:
MOV BL,0x1
LAB_001765a1:
CMP RDI,R12
JZ 0x001765b6
MOV RSI,qword ptr [RSP + 0xa8]
INC RSI
CALL 0x001251b0
LAB_001765b6:
MOV RDI,qword ptr [RSP + 0x8]
LAB_001765bb:
CMP RDI,R14
JZ 0x001765cd
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_001765cd:
TEST BL,BL
JZ 0x001765f0
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x70
MOV BPL,0x1
LAB_001765dd:
LEA RDX,[RSP + 0x58]
LEA RCX,[RSP + 0x38]
XOR ESI,ESI
CALL 0x0016b9c6
JMP 0x00176635
LAB_001765f0:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x38]
XOR EDX,EDX
CALL 0x0016aa9d
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x70
LAB_0017660a:
LEA RDX,[RSP + 0x58]
LEA RCX,[RSP + 0x8]
XOR ESI,ESI
CALL 0x0016b9c6
LAB_0017661b:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x00176632
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_00176632:
MOV BPL,0x1
LAB_00176635:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x0017664c
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001251b0
LAB_0017664c:
MOV RDI,qword ptr [RSP + 0x58]
CMP RDI,R13
LEA R15,[RSP + 0x88]
JZ 0x0017666b
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x001251b0
LAB_0017666b:
MOV R13,qword ptr [RSP + 0x78]
LAB_00176670:
CMP R13,R15
JZ 0x00176688
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
MOV RDI,R13
CALL 0x001251b0
LAB_00176688:
MOV EAX,EBP
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* bool
httplib::detail::parse_header<httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&,
httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned
long)>)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}>(char const*, char
const*, httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&,
httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned
long)>)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}) */
bool httplib::detail::
parse_header<httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&,httplib::Request&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>)::_lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)_1_>
(char *param_1,char *param_2,long param_3)
{
byte bVar1;
char cVar2;
int iVar3;
uint uVar4;
long lVar5;
long *plVar6;
char *pcVar7;
char *pcVar8;
char *pcVar9;
char *pcVar10;
long lVar11;
bool bVar12;
bool bVar13;
long *local_e0;
long local_d8;
long local_d0 [2];
long local_c0;
char *local_b8;
long *local_b0;
long local_a8;
long local_a0 [2];
long *local_90;
long local_88;
long local_80 [2];
long *local_70;
long local_68;
long local_60 [2];
long *local_50;
long local_48;
long local_40 [2];
pcVar10 = param_2;
if (param_1 < param_2) {
do {
if ((param_2[-1] != ' ') && (pcVar10 = param_2, param_2[-1] != '\t')) break;
param_2 = param_2 + -1;
pcVar10 = param_1;
} while (param_1 < param_2);
}
pcVar9 = param_1;
if (param_1 < pcVar10) {
lVar5 = (long)pcVar10 - (long)param_1;
pcVar8 = param_1;
do {
pcVar9 = pcVar8;
if (*pcVar8 == ':') break;
pcVar8 = pcVar8 + 1;
lVar5 = lVar5 + -1;
pcVar9 = pcVar10;
} while (lVar5 != 0);
}
local_70 = local_60;
local_68 = 0;
local_c0 = param_3;
local_b8 = param_1;
std::__cxx11::string::_M_construct<char_const*>(&local_70,param_1,pcVar9);
lVar5 = local_68;
plVar6 = local_70;
if (local_68 == 0) {
LAB_0017637e:
bVar12 = false;
goto LAB_00176670;
}
lVar11 = 0;
do {
bVar1 = *(byte *)((long)plVar6 + lVar11);
iVar3 = isalnum((int)(char)bVar1);
if (iVar3 == 0) {
uVar4 = (uint)bVar1;
if ((((0x3f < uVar4 - 0x21) ||
((0xe00000000000367dU >> ((ulong)(uVar4 - 0x21) & 0x3f) & 1) == 0)) && (uVar4 != 0x7e))
&& (uVar4 != 0x7c)) goto LAB_00176385;
}
lVar11 = lVar11 + 1;
} while (lVar5 != lVar11);
if (pcVar9 == pcVar10) {
LAB_00176385:
bVar12 = false;
goto LAB_00176670;
}
if (*pcVar9 != ':') goto LAB_0017637e;
pcVar8 = pcVar9 + 1;
pcVar7 = pcVar8;
if (pcVar8 < pcVar10) {
lVar5 = ((long)pcVar10 - (long)pcVar9) + -1;
do {
if ((*pcVar8 != ' ') && (pcVar7 = pcVar8, *pcVar8 != '\t')) break;
pcVar8 = pcVar8 + 1;
lVar5 = lVar5 + -1;
pcVar7 = pcVar9 + ((long)pcVar10 - (long)pcVar9);
} while (lVar5 != 0);
}
bVar12 = false;
if ((pcVar9 == local_b8) || (bVar12 = false, pcVar10 < pcVar7)) goto LAB_00176670;
local_88 = 0;
/* try { // try from 001763be to 001763ca has its CatchHandler @ 001766f6 */
local_90 = local_80;
std::__cxx11::string::_M_construct<char_const*>(&local_90,local_b8,pcVar9);
local_a8 = 0;
/* try { // try from 001763dc to 001763eb has its CatchHandler @ 001766da */
local_b0 = local_a0;
std::__cxx11::string::_M_construct<char_const*>(&local_b0,pcVar7,pcVar10);
if (local_a8 == 0) {
LAB_001764a6:
/* try { // try from 001764af to 001764c6 has its CatchHandler @ 001766be */
local_e0 = local_d0;
std::__cxx11::string::_M_construct<char_const*>(&local_e0,"Location","");
if (local_88 == local_d8) {
bVar12 = true;
if (local_88 != 0) {
lVar5 = 0;
do {
if (case_ignore::to_lower(int)::table[*(byte *)((long)local_90 + lVar5)] !=
case_ignore::to_lower(int)::table[*(byte *)((long)local_e0 + lVar5)])
goto LAB_00176519;
lVar5 = lVar5 + 1;
} while (local_88 != lVar5);
}
}
else {
LAB_00176519:
/* try { // try from 00176526 to 00176540 has its CatchHandler @ 001766a2 */
local_50 = local_40;
std::__cxx11::string::_M_construct<char_const*>(&local_50,"Referer","");
if (local_88 == local_48) {
if (local_88 == 0) {
bVar12 = true;
}
else {
lVar5 = 0;
do {
bVar12 = case_ignore::to_lower(int)::table[*(byte *)((long)local_90 + lVar5)] ==
case_ignore::to_lower(int)::table[*(byte *)((long)local_50 + lVar5)];
if (!bVar12) break;
bVar13 = local_88 + -1 != lVar5;
lVar5 = lVar5 + 1;
} while (bVar13);
}
}
else {
bVar12 = false;
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
}
if (local_e0 != local_d0) {
operator_delete(local_e0,local_d0[0] + 1);
}
if (bVar12) {
bVar12 = true;
/* try { // try from 001765dd to 001765ed has its CatchHandler @ 001766a0 */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&>
(local_c0 + 0x70,0,&local_90,&local_b0);
}
else {
/* try { // try from 001765f0 to 00176600 has its CatchHandler @ 0017669e */
decode_url((string *)&local_e0,SUB81(&local_b0,0));
/* try { // try from 0017660a to 0017661a has its CatchHandler @ 0017669c */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&>
(local_c0 + 0x70,0,&local_90,&local_e0);
if (local_e0 != local_d0) {
operator_delete(local_e0,local_d0[0] + 1);
}
bVar12 = true;
}
}
else {
if (local_a8 == 2) {
if ((char)*local_b0 < '\0' || (byte)((char)*local_b0 - 0x21U) < 0x5e) {
plVar6 = (long *)((long)local_b0 + 1);
goto LAB_00176492;
}
}
else {
plVar6 = local_b0;
if (local_a8 != 1) {
if (-1 < (char)*local_b0 && 0x5d < (byte)((char)*local_b0 - 0x21U)) goto LAB_00176512;
lVar5 = 0;
do {
cVar2 = *(char *)((long)local_b0 + lVar5 + 1);
if (((cVar2 != '\t') && (cVar2 != ' ')) && (-1 < cVar2 && 0x5d < (byte)(cVar2 - 0x21U)))
goto LAB_00176512;
lVar5 = lVar5 + 1;
} while (local_a8 + -2 != lVar5);
plVar6 = (long *)((long)local_b0 + local_a8 + -1);
}
LAB_00176492:
if ((char)*plVar6 < '\0' || (byte)((char)*plVar6 - 0x21U) < 0x5e) goto LAB_001764a6;
}
LAB_00176512:
bVar12 = false;
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
plVar6 = local_70;
if (local_90 != local_80) {
operator_delete(local_90,local_80[0] + 1);
plVar6 = local_70;
}
LAB_00176670:
if (plVar6 != local_60) {
operator_delete(plVar6,local_60[0] + 1);
}
return bVar12;
}
| |
50,850 | mbedtls_cipher_update_ad | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher.c | int mbedtls_cipher_update_ad(mbedtls_cipher_context_t *ctx,
const unsigned char *ad, size_t ad_len)
{
CIPHER_VALIDATE_RET(ctx != NULL);
CIPHER_VALIDATE_RET(ad_len == 0 || ad != NULL);
if (ctx->cipher_info == NULL) {
return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
}
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if (ctx->psa_enabled == 1) {
/* While PSA Crypto has an API for multipart
* operations, we currently don't make it
* accessible through the cipher layer. */
return MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */
#if defined(MBEDTLS_GCM_C)
if (MBEDTLS_MODE_GCM == ctx->cipher_info->mode) {
return mbedtls_gcm_starts((mbedtls_gcm_context *) ctx->cipher_ctx, ctx->operation,
ctx->iv, ctx->iv_size, ad, ad_len);
}
#endif
#if defined(MBEDTLS_CHACHAPOLY_C)
if (MBEDTLS_CIPHER_CHACHA20_POLY1305 == ctx->cipher_info->type) {
int result;
mbedtls_chachapoly_mode_t mode;
mode = (ctx->operation == MBEDTLS_ENCRYPT)
? MBEDTLS_CHACHAPOLY_ENCRYPT
: MBEDTLS_CHACHAPOLY_DECRYPT;
result = mbedtls_chachapoly_starts((mbedtls_chachapoly_context *) ctx->cipher_ctx,
ctx->iv,
mode);
if (result != 0) {
return result;
}
return mbedtls_chachapoly_update_aad((mbedtls_chachapoly_context *) ctx->cipher_ctx,
ad, ad_len);
}
#endif
return 0;
} | O3 | c | mbedtls_cipher_update_ad:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x9a4d5
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x6, 0x4(%rcx)
jne 0x9a4dc
movq 0x50(%r15), %rdi
movl 0xc(%r15), %esi
movq 0x48(%r15), %rcx
addq $0x38, %r15
movq %r15, %rdx
movq %r14, %r8
movq %rbx, %r9
popq %rbx
popq %r14
popq %r15
jmp 0x9ca1c
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
jmp 0x9a4fe
xorl %eax, %eax
cmpl $0x49, (%rcx)
jne 0x9a4fe
xorl %edx, %edx
cmpl $0x1, 0xc(%r15)
setne %dl
movq 0x50(%r15), %rdi
leaq 0x38(%r15), %rsi
callq 0xa01fa
testl %eax, %eax
je 0x9a504
popq %rbx
popq %r14
popq %r15
retq
movq 0x50(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xa0289
| mbedtls_cipher_update_ad:
push r15
push r14
push rbx
mov rcx, [rdi]
test rcx, rcx
jz short loc_9A4D5
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rcx+4], 6
jnz short loc_9A4DC
mov rdi, [r15+50h]
mov esi, [r15+0Ch]
mov rcx, [r15+48h]
add r15, 38h ; '8'
mov rdx, r15
mov r8, r14
mov r9, rbx
pop rbx
pop r14
pop r15
jmp mbedtls_gcm_starts
loc_9A4D5:
mov eax, 0FFFF9F00h
jmp short loc_9A4FE
loc_9A4DC:
xor eax, eax
cmp dword ptr [rcx], 49h ; 'I'
jnz short loc_9A4FE
xor edx, edx
cmp dword ptr [r15+0Ch], 1
setnz dl
mov rdi, [r15+50h]
lea rsi, [r15+38h]
call mbedtls_chachapoly_starts
test eax, eax
jz short loc_9A504
loc_9A4FE:
pop rbx
pop r14
pop r15
retn
loc_9A504:
mov rdi, [r15+50h]
mov rsi, r14
mov rdx, rbx
pop rbx
pop r14
pop r15
jmp mbedtls_chachapoly_update_aad
| long long mbedtls_cipher_update_ad(long long a1, long long a2, long long a3)
{
_DWORD *v3; // rcx
long long result; // rax
v3 = *(_DWORD **)a1;
if ( !*(_QWORD *)a1 )
return 4294942464LL;
if ( v3[1] == 6 )
return mbedtls_gcm_starts(*(_QWORD *)(a1 + 80), *(unsigned int *)(a1 + 12), a1 + 56, *(_QWORD *)(a1 + 72), a2, a3);
result = 0LL;
if ( *v3 == 73 )
{
result = mbedtls_chachapoly_starts(*(_QWORD *)(a1 + 80), a1 + 56, *(_DWORD *)(a1 + 12) != 1);
if ( !(_DWORD)result )
return mbedtls_chachapoly_update_aad(*(_QWORD *)(a1 + 80), a2, a3);
}
return result;
}
| mbedtls_cipher_update_ad:
PUSH R15
PUSH R14
PUSH RBX
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x0019a4d5
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RCX + 0x4],0x6
JNZ 0x0019a4dc
MOV RDI,qword ptr [R15 + 0x50]
MOV ESI,dword ptr [R15 + 0xc]
MOV RCX,qword ptr [R15 + 0x48]
ADD R15,0x38
MOV RDX,R15
MOV R8,R14
MOV R9,RBX
POP RBX
POP R14
POP R15
JMP 0x0019ca1c
LAB_0019a4d5:
MOV EAX,0xffff9f00
JMP 0x0019a4fe
LAB_0019a4dc:
XOR EAX,EAX
CMP dword ptr [RCX],0x49
JNZ 0x0019a4fe
XOR EDX,EDX
CMP dword ptr [R15 + 0xc],0x1
SETNZ DL
MOV RDI,qword ptr [R15 + 0x50]
LEA RSI,[R15 + 0x38]
CALL 0x001a01fa
TEST EAX,EAX
JZ 0x0019a504
LAB_0019a4fe:
POP RBX
POP R14
POP R15
RET
LAB_0019a504:
MOV RDI,qword ptr [R15 + 0x50]
MOV RSI,R14
MOV RDX,RBX
POP RBX
POP R14
POP R15
JMP 0x001a0289
|
int8 mbedtls_cipher_update_ad(int8 *param_1,int8 param_2,int8 param_3)
{
int *piVar1;
int8 uVar2;
piVar1 = (int *)*param_1;
if (piVar1 == (int *)0x0) {
uVar2 = 0xffff9f00;
}
else {
if (piVar1[1] == 6) {
uVar2 = mbedtls_gcm_starts(param_1[10],*(int4 *)((long)param_1 + 0xc),param_1 + 7,
param_1[9],param_2,param_3);
return uVar2;
}
uVar2 = 0;
if (*piVar1 == 0x49) {
uVar2 = mbedtls_chachapoly_starts(param_1[10],param_1 + 7,*(int *)((long)param_1 + 0xc) != 1);
if ((int)uVar2 == 0) {
uVar2 = mbedtls_chachapoly_update_aad(param_1[10],param_2,param_3);
return uVar2;
}
}
}
return uVar2;
}
| |
50,851 | ma_field_extension_init_type_info | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot,
MA_FIELD_EXTENSION *ext,
const char *ptr, size_t length)
{
const char *end= ptr + length;
for ( ; ptr < end; )
{
uint itype= (uchar) *ptr++;
uint len= (uchar) *ptr++;
if (ptr + len > end || len > 127)
break; /*Badly encoded data*/
if (itype <= 127 && itype <= MARIADB_FIELD_ATTR_LAST)
ext->metadata[itype]= ma_const_string_copy_root(memroot, ptr, len);
ptr+= len;
}
} | O0 | c | ma_field_extension_init_type_info:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1a267
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
ja 0x1a202
cmpl $0x7f, -0x30(%rbp)
jbe 0x1a204
jmp 0x1a267
cmpl $0x7f, -0x2c(%rbp)
ja 0x1a252
cmpl $0x1, -0x2c(%rbp)
ja 0x1a252
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %eax
movl %eax, %edx
callq 0x19c90
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x1a1b4
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| ma_field_extension_init_type_info:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_1A1B4:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb loc_1A267
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_30]
add rax, rcx
cmp rax, [rbp+var_28]
ja short loc_1A202
cmp [rbp+var_30], 7Fh
jbe short loc_1A204
loc_1A202:
jmp short loc_1A267
loc_1A204:
cmp [rbp+var_2C], 7Fh
ja short loc_1A252
cmp [rbp+var_2C], 1
ja short loc_1A252
mov rax, [rbp+var_10]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_30]
mov edx, eax
call ma_const_string_copy_root
mov rcx, rax
mov rax, [rbp+var_48]
mov [rbp+var_40], rcx
mov [rbp+var_38], rdx
mov rcx, [rbp+var_40]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov [rax+8], rcx
loc_1A252:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp loc_1A1B4
loc_1A267:
add rsp, 50h
pop rbp
retn
| unsigned __int8 * ma_field_extension_init_type_info(long long a1, long long a2, unsigned __int8 *a3, long long a4)
{
unsigned __int8 *result; // rax
unsigned __int8 *v5; // rax
long long v6; // rdx
long long *v7; // [rsp+8h] [rbp-48h]
unsigned int v8; // [rsp+20h] [rbp-30h]
unsigned int v9; // [rsp+24h] [rbp-2Ch]
unsigned long long v10; // [rsp+28h] [rbp-28h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+38h] [rbp-18h]
v11 = a3;
v10 = (unsigned long long)&a3[a4];
while ( 1 )
{
result = v11;
if ( (unsigned long long)v11 >= v10 )
break;
v9 = *v11;
v5 = v11 + 1;
v12 = (long long)(v11 + 2);
v8 = *v5;
result = (unsigned __int8 *)(*v5 + v12);
if ( (unsigned long long)result > v10 || v8 > 0x7F )
break;
if ( v9 <= 1 )
{
v7 = (long long *)(16LL * v9 + a2);
*v7 = ma_const_string_copy_root(a1, v12, v8);
v7[1] = v6;
}
v11 = (unsigned __int8 *)(v8 + v12);
}
return result;
}
| ma_field_extension_init_type_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0011a1b4:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0011a267
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x30]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JA 0x0011a202
CMP dword ptr [RBP + -0x30],0x7f
JBE 0x0011a204
LAB_0011a202:
JMP 0x0011a267
LAB_0011a204:
CMP dword ptr [RBP + -0x2c],0x7f
JA 0x0011a252
CMP dword ptr [RBP + -0x2c],0x1
JA 0x0011a252
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
CALL 0x00119c90
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
LAB_0011a252:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0011a1b4
LAB_0011a267:
ADD RSP,0x50
POP RBP
RET
|
void ma_field_extension_init_type_info(int8 param_1,long param_2,byte *param_3,long param_4)
{
uint uVar1;
uint uVar2;
byte *pbVar3;
int1 auVar4 [16];
byte *local_20;
local_20 = param_3;
while( true ) {
if (param_3 + param_4 <= local_20) {
return;
}
uVar1 = (uint)*local_20;
pbVar3 = local_20 + 2;
uVar2 = (uint)local_20[1];
if (param_3 + param_4 < pbVar3 + uVar2) break;
if (0x7f < uVar2) {
return;
}
if ((uVar1 < 0x80) && (uVar1 < 2)) {
auVar4 = ma_const_string_copy_root(param_1,pbVar3,uVar2);
*(int1 (*) [16])(param_2 + (ulong)uVar1 * 0x10) = auVar4;
}
local_20 = pbVar3 + uVar2;
}
return;
}
| |
50,852 | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [6], 0>(char const (&) [6]) const | monkey531[P]llama/common/json.hpp | constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
} | O3 | cpp | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [6], 0>(char const (&) [6]) const:
cmpb $0x1, (%rdi)
jne 0xa65d3
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq (%r12), %rbx
cmpq 0x8(%r12), %rbx
je 0xa65d6
movq %rsi, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x191d0
testl %eax, %eax
je 0xa65c6
addq $0x30, %rbx
cmpq 0x8(%r12), %rbx
jne 0xa65ac
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
jmp 0xa65d9
xorl %eax, %eax
retq
movq %rbx, %rax
cmpq %rbx, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_A65D3
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
mov r12, [rdi+8]
mov rbx, [r12]
cmp rbx, [r12+8]
jz short loc_A65D6
mov r15, rsi
loc_A65AC:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A65C6
add rbx, 30h ; '0'
cmp rbx, [r12+8]
jnz short loc_A65AC
loc_A65C6:
mov rax, rbx
mov rcx, [r14+8]
mov rbx, [rcx+8]
jmp short loc_A65D9
loc_A65D3:
xor eax, eax
retn
loc_A65D6:
mov rax, rbx
loc_A65D9:
cmp rax, rbx
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
if ( *v2 == v2[1] )
{
v4 = *v2;
}
else
{
do
{
if ( !(unsigned int)std::string::compare(v3, a2) )
break;
v3 += 48LL;
}
while ( v3 != v2[1] );
v4 = v3;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
return v4 != v3;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x001a65d3
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [R12]
CMP RBX,qword ptr [R12 + 0x8]
JZ 0x001a65d6
MOV R15,RSI
LAB_001a65ac:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001191d0
TEST EAX,EAX
JZ 0x001a65c6
ADD RBX,0x30
CMP RBX,qword ptr [R12 + 0x8]
JNZ 0x001a65ac
LAB_001a65c6:
MOV RAX,RBX
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
JMP 0x001a65d9
LAB_001a65d3:
XOR EAX,EAX
RET
LAB_001a65d6:
MOV RAX,RBX
LAB_001a65d9:
CMP RAX,RBX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA6_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(char *param_1)
{
long *plVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
if (*param_1 != '\x01') {
return 0;
}
plVar1 = *(long **)(param_1 + 8);
pcVar3 = (char *)*plVar1;
pcVar4 = pcVar3;
if (pcVar3 != (char *)plVar1[1]) {
do {
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar3 = pcVar3 + 0x30;
} while (pcVar3 != (char *)plVar1[1]);
pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4);
}
| |
50,853 | mi_cmp_static_record | eloqsql/storage/myisam/mi_statrec.c | int _mi_cmp_static_record(register MI_INFO *info, register const uchar *old)
{
DBUG_ENTER("_mi_cmp_static_record");
if (info->opt_flag & WRITE_CACHE_USED)
{
if (flush_io_cache(&info->rec_cache))
{
DBUG_RETURN(-1);
}
info->rec_cache.seek_not_done=1; /* We have done a seek */
}
if ((info->opt_flag & READ_CHECK_USED))
{ /* If check isn't disabled */
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, info->rec_buff, info->s->base.reclength,
info->lastpos,
MYF(MY_NABP)))
DBUG_RETURN(-1);
if (memcmp(info->rec_buff, old,
(uint) info->s->base.reclength))
{
DBUG_DUMP("read",old,info->s->base.reclength);
DBUG_DUMP("disk",info->rec_buff,info->s->base.reclength);
my_errno=HA_ERR_RECORD_CHANGED; /* Record have changed */
DBUG_RETURN(1);
}
}
DBUG_RETURN(0);
} | O0 | c | mi_cmp_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc5568
movq -0x10(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
movl $0x1, %esi
callq 0xe1f60
cmpl $0x0, %eax
je 0xc555a
jmp 0xc554e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc562d
movq -0x10(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x10(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xc5624
movq -0x10(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x2e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x120(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x140(%rcx), %rdx
movq -0x10(%rbp), %rcx
movq 0x170(%rcx), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0xc55db
jmp 0xc55d2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc562d
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x140(%rax), %rax
movl %eax, %eax
movl %eax, %edx
callq 0x2a830
cmpl $0x0, %eax
je 0xc5622
jmp 0xc5608
jmp 0xc560a
jmp 0xc560c
jmp 0xc560e
callq 0xf7440
movl $0x7b, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xc562d
jmp 0xc5624
jmp 0xc5626
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_cmp_static_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+1C8h]
and eax, 10h
cmp eax, 0
jz short loc_C5568
mov rdi, [rbp+var_10]
add rdi, 220h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_C555A
jmp short $+2
loc_C554E:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C562D
loc_C555A:
mov rax, [rbp+var_10]
mov dword ptr [rax+300h], 1
loc_C5568:
mov rax, [rbp+var_10]
mov eax, [rax+1C8h]
and eax, 4
cmp eax, 0
jz loc_C5624
mov rax, [rbp+var_10]
mov dword ptr [rax+300h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+2E0h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+140h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+170h]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_C55DB
jmp short $+2
loc_C55D2:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_C562D
loc_C55DB:
mov rax, [rbp+var_10]
mov rdi, [rax+120h]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+140h]
mov eax, eax
mov edx, eax
call _memcmp
cmp eax, 0
jz short loc_C5622
jmp short $+2
loc_C5608:
jmp short $+2
loc_C560A:
jmp short $+2
loc_C560C:
jmp short $+2
loc_C560E:
call _my_thread_var
mov dword ptr [rax], 7Bh ; '{'
mov [rbp+var_4], 1
jmp short loc_C562D
loc_C5622:
jmp short $+2
loc_C5624:
jmp short $+2
loc_C5626:
mov [rbp+var_4], 0
loc_C562D:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mi_cmp_static_record(long long a1, const char *a2)
{
long long v2; // rdi
if ( (*(_DWORD *)(a1 + 456) & 0x10) == 0 )
{
LABEL_5:
if ( (*(_DWORD *)(a1 + 456) & 4) != 0 )
{
*(_DWORD *)(a1 + 768) = 1;
if ( (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, long long))(*(_QWORD *)a1 + 736LL))(
a1,
*(_QWORD *)(a1 + 288),
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
*(_QWORD *)(a1 + 368),
4LL) )
{
return (unsigned int)-1;
}
v2 = *(_QWORD *)(a1 + 288);
if ( (unsigned int)memcmp(v2, a2, (unsigned int)*(_QWORD *)(*(_QWORD *)a1 + 320LL)) )
{
*(_DWORD *)my_thread_var(v2, a2) = 123;
return 1;
}
}
return 0;
}
if ( !(unsigned int)my_b_flush_io_cache(a1 + 544, 1LL) )
{
*(_DWORD *)(a1 + 768) = 1;
goto LABEL_5;
}
return (unsigned int)-1;
}
| _mi_cmp_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c5568
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x220
MOV ESI,0x1
CALL 0x001e1f60
CMP EAX,0x0
JZ 0x001c555a
JMP 0x001c554e
LAB_001c554e:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c562d
LAB_001c555a:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x300],0x1
LAB_001c5568:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001c5624
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x300],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x140]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x170]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x001c55db
JMP 0x001c55d2
LAB_001c55d2:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c562d
LAB_001c55db:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x120]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x140]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a830
CMP EAX,0x0
JZ 0x001c5622
JMP 0x001c5608
LAB_001c5608:
JMP 0x001c560a
LAB_001c560a:
JMP 0x001c560c
LAB_001c560c:
JMP 0x001c560e
LAB_001c560e:
CALL 0x001f7440
MOV dword ptr [RAX],0x7b
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c562d
LAB_001c5622:
JMP 0x001c5624
LAB_001c5624:
JMP 0x001c5626
LAB_001c5626:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c562d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 _mi_cmp_static_record(long *param_1,void *param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
if ((*(uint *)(param_1 + 0x39) & 0x10) != 0) {
iVar1 = my_b_flush_io_cache(param_1 + 0x44,1);
if (iVar1 != 0) {
return 0xffffffff;
}
*(int4 *)(param_1 + 0x60) = 1;
}
if ((*(uint *)(param_1 + 0x39) & 4) != 0) {
*(int4 *)(param_1 + 0x60) = 1;
lVar2 = (**(code **)(*param_1 + 0x2e0))
(param_1,param_1[0x24],*(int8 *)(*param_1 + 0x140),param_1[0x2e],4);
if (lVar2 != 0) {
return 0xffffffff;
}
iVar1 = memcmp((void *)param_1[0x24],param_2,*(ulong *)(*param_1 + 0x140) & 0xffffffff);
if (iVar1 != 0) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x7b;
return 1;
}
}
return 0;
}
| |
50,854 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const | monkey531[P]llama/common/json.hpp | const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xaae6e
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0xaae5c
cmpl $0x2, %eax
jne 0xaae65
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0xaae56
leaq 0x30(%rbx), %rdi
callq 0xadba9
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0xaae69
movq %rbx, %rdi
popq %rbx
jmp 0x8cba8
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x44d6e(%rip), %rdi # 0xefbe3
leaq 0x3f2c4(%rip), %rdx # 0xea140
leaq 0x4a043(%rip), %rcx # 0xf4ec6
movl $0x1491, %esi # imm = 0x1491
xorl %eax, %eax
callq 0x1be80
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_AAE6E
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_AAE5C
cmp eax, 2
jnz short loc_AAE65
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_AAE56
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_AAE56:
add rbx, 30h ; '0'
jmp short loc_AAE69
loc_AAE5C:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void)
loc_AAE65:
add rbx, 50h ; 'P'
loc_AAE69:
mov rax, rbx
pop rbx
retn
loc_AAE6E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr"
mov esi, 1491h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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> const>>::key(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 1 )
{
return 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> const>::key(a1);
}
else
{
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
5265LL,
"GGML_ASSERT(%s) failed",
"anchor.m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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> const>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
| key:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001aae6e
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x001aae5c
CMP EAX,0x2
JNZ 0x001aae65
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x001aae56
LEA RDI,[RBX + 0x30]
CALL 0x001adba9
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_001aae56:
ADD RBX,0x30
JMP 0x001aae69
LAB_001aae5c:
MOV RDI,RBX
POP RBX
JMP 0x0018cba8
LAB_001aae65:
ADD RBX,0x50
LAB_001aae69:
MOV RAX,RBX
POP RBX
RET
LAB_001aae6e:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f4ec6]
MOV ESI,0x1491
XOR EAX,EAX
CALL 0x0011be80
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const> >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this)
{
char cVar1;
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*piVar2;
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491,
"GGML_ASSERT(%s) failed","anchor.m_object != nullptr");
}
cVar1 = **(char **)this;
if (cVar1 != '\x01') {
if (cVar1 == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar2 = this + 0x30;
}
else {
piVar2 = this + 0x50;
}
return piVar2;
}
piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::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>const>
*)this);
return piVar2;
}
| |
50,855 | ma_print_error | eloqsql/storage/maria/ma_info.c | void _ma_print_error(MARIA_HA *info, int error, my_bool write_to_log)
{
DBUG_ENTER("_ma_print_error");
DBUG_PRINT("error", ("error: %d log: %d", error, write_to_log));
if (!info->error_count++ || !maria_in_ha_maria || write_to_log)
{
MARIA_SHARE *share= info->s;
_ma_report_error(error,
(share->index_file_name.length ?
&share->index_file_name :
&share->unique_file_name),
MYF(write_to_log ? ME_ERROR_LOG : 0));
}
DBUG_VOID_RETURN;
} | O3 | c | ma_print_error:
pushq %rbp
movq %rsp, %rbp
movl 0x628(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x628(%rdi)
testb %dl, %dl
jne 0x36a17
testl %eax, %eax
je 0x36a17
leaq 0x3c608c(%rip), %rax # 0x3fca9c
cmpb $0x0, (%rax)
je 0x36a17
popq %rbp
retq
xorl %eax, %eax
testb %dl, %dl
setne %al
movq (%rdi), %rcx
xorl %edx, %edx
cmpq $0x0, 0x5d8(%rcx)
setne %dl
shll $0x5, %edx
addq %rdx, %rcx
addq $0x5b0, %rcx # imm = 0x5B0
shll $0x6, %eax
movl %esi, %edi
movq %rcx, %rsi
movq %rax, %rdx
popq %rbp
jmp 0x36990
| _ma_print_error:
push rbp
mov rbp, rsp
mov eax, [rdi+628h]
lea ecx, [rax+1]
mov [rdi+628h], ecx
test dl, dl
jnz short loc_36A17
test eax, eax
jz short loc_36A17
lea rax, maria_in_ha_maria
cmp byte ptr [rax], 0
jz short loc_36A17
pop rbp
retn
loc_36A17:
xor eax, eax
test dl, dl
setnz al
mov rcx, [rdi]
xor edx, edx
cmp qword ptr [rcx+5D8h], 0
setnz dl
shl edx, 5
add rcx, rdx
add rcx, 5B0h
shl eax, 6
mov edi, esi
mov rsi, rcx
mov rdx, rax
pop rbp
jmp _ma_report_error
| void * ma_print_error(_DWORD *a1, int a2, char a3, long long a4, long long a5, int a6)
{
int v6; // eax
void *result; // rax
_QWORD *v8; // rcx
v6 = a1[394];
a1[394] = v6 + 1;
if ( a3 || !v6 || (result = &maria_in_ha_maria, !maria_in_ha_maria) )
{
v8 = (_QWORD *)(32 * (unsigned int)(*(_QWORD *)(*(_QWORD *)a1 + 1496LL) != 0LL) + *(_QWORD *)a1 + 1456LL);
return (void *)ma_report_error(a2, v8, (unsigned __int8)(a3 != 0) << 6, (long long)v8, a5, a6);
}
return result;
}
| _ma_print_error:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0x628]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RDI + 0x628],ECX
TEST DL,DL
JNZ 0x00136a17
TEST EAX,EAX
JZ 0x00136a17
LEA RAX,[0x4fca9c]
CMP byte ptr [RAX],0x0
JZ 0x00136a17
POP RBP
RET
LAB_00136a17:
XOR EAX,EAX
TEST DL,DL
SETNZ AL
MOV RCX,qword ptr [RDI]
XOR EDX,EDX
CMP qword ptr [RCX + 0x5d8],0x0
SETNZ DL
SHL EDX,0x5
ADD RCX,RDX
ADD RCX,0x5b0
SHL EAX,0x6
MOV EDI,ESI
MOV RSI,RCX
MOV RDX,RAX
POP RBP
JMP 0x00136990
|
void _ma_print_error(long *param_1,int4 param_2,char param_3)
{
long lVar1;
lVar1 = param_1[0xc5];
*(int *)(param_1 + 0xc5) = (int)lVar1 + 1;
if (((param_3 == '\0') && ((int)lVar1 != 0)) && (maria_in_ha_maria != '\0')) {
return;
}
_ma_report_error(param_2,*param_1 + (ulong)(*(long *)(*param_1 + 0x5d8) != 0) * 0x20 + 0x5b0,
(ulong)(param_3 != '\0') << 6);
return;
}
| |
50,856 | CLI::Option::add_result(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>>>>) | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/Option_inl.hpp | CLI11_INLINE Option *Option::add_result(std::vector<std::string> s) {
current_option_state_ = option_state::parsing;
for(auto &str : s) {
_add_result(std::move(str), results_);
}
return this;
} | O2 | cpp | CLI::Option::add_result(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>>>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x248(%rdi)
movq (%rsi), %r14
movq 0x8(%rsi), %r12
leaq 0x218(%rdi), %r15
cmpq %r12, %r14
je 0x1de4d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1aa86
addq $0x20, %r14
jmp 0x1de34
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN3CLI6Option10add_resultESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov byte ptr [rdi+248h], 0
mov r14, [rsi]
mov r12, [rsi+8]
lea r15, [rdi+218h]
loc_1DE34:
cmp r14, r12
jz short loc_1DE4D
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZNK3CLI6Option11_add_resultEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS6_SaIS6_EE; CLI::Option::_add_result(std::string &&,std::vector<std::string> &)
add r14, 20h ; ' '
jmp short loc_1DE34
loc_1DE4D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long CLI::Option::add_result(long long a1, long long *a2)
{
long long v2; // r14
long long v3; // r12
*(_BYTE *)(a1 + 584) = 0;
v2 = *a2;
v3 = a2[1];
while ( v2 != v3 )
{
CLI::Option::_add_result(a1, v2, a1 + 536);
v2 += 32LL;
}
return a1;
}
| add_result:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV byte ptr [RDI + 0x248],0x0
MOV R14,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
LEA R15,[RDI + 0x218]
LAB_0011de34:
CMP R14,R12
JZ 0x0011de4d
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011aa86
ADD R14,0x20
JMP 0x0011de34
LAB_0011de4d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* CLI::Option::add_result(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string >
>) */
Option * __thiscall CLI::Option::add_result(Option *this,int8 *param_2)
{
string *psVar1;
string *psVar2;
this[0x248] = (Option)0x0;
psVar1 = (string *)param_2[1];
for (psVar2 = (string *)*param_2; psVar2 != psVar1; psVar2 = psVar2 + 0x20) {
_add_result(this,psVar2,(vector *)(this + 0x218));
}
return this;
}
| |
50,857 | simple_read_write_test | eloqsql/storage/maria/unittest/ma_pagecache_single.c | int simple_read_write_test()
{
unsigned char *buffw= malloc(TEST_PAGE_SIZE);
unsigned char *buffr= malloc(TEST_PAGE_SIZE);
int res;
DBUG_ENTER("simple_read_write_test");
bfill(buffw, TEST_PAGE_SIZE, '\1');
pagecache_write(&pagecache, &file1, 0, 3, buffw,
PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY,
0, LSN_IMPOSSIBLE);
pagecache_read(&pagecache, &file1, 0, 3, buffr,
PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
0);
ok((res= MY_TEST(memcmp(buffr, buffw, TEST_PAGE_SIZE) == 0)),
"Simple write-read page ");
if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE))
{
diag("Got error during flushing pagecache\n");
exit(1);
}
ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE, TEST_PAGE_SIZE,
simple_read_write_test_file))),
"Simple write-read page file");
if (res)
reset_file(&file1, file1_name);
free(buffw);
free(buffr);
DBUG_RETURN(res);
} | O0 | c | simple_read_write_test:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x10000, %edi # imm = 0x10000
callq 0x2a6d0
movq %rax, -0x8(%rbp)
movl $0x10000, %edi # imm = 0x10000
callq 0x2a6d0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movl $0x10000, %edx # imm = 0x10000
callq 0x2a2c0
movq -0x8(%rbp), %r8
movl 0x44d51f(%rip), %eax # 0x4780d0
leaq 0x44d498(%rip), %rdi # 0x478050
leaq 0x44d6b1(%rip), %rsi # 0x478270
xorl %ecx, %ecx
movl %ecx, %edx
movl $0x3, %ecx
movl $0x1, %r9d
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x303f0
movq -0x10(%rbp), %r8
leaq 0x44d43a(%rip), %rdi # 0x478050
leaq 0x44d653(%rip), %rsi # 0x478270
xorl %eax, %eax
movl %eax, %edx
movl $0x3, %ecx
movl $0x1, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x2ecf0
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x10000, %edx # imm = 0x10000
callq 0x2a830
movl %eax, %ecx
xorl %edi, %edi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovel %eax, %edi
movl %edi, -0x14(%rbp)
leaq 0x1273e0(%rip), %rsi # 0x15204e
movb $0x0, %al
callq 0xdb250
leaq 0x44d3d4(%rip), %rdi # 0x478050
leaq 0x44d5ed(%rip), %rsi # 0x478270
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x30b30
cmpl $0x0, %eax
je 0x2acb2
leaq 0x1273c5(%rip), %rdi # 0x152066
movb $0x0, %al
callq 0xdaf90
movl $0x1, %edi
callq 0x2a500
movq 0x44d5f7(%rip), %rcx # 0x4782b0
movq %rsp, %rax
movq %rcx, 0x40(%rax)
movups 0x44d5d9(%rip), %xmm0 # 0x4782a0
movups %xmm0, 0x30(%rax)
movups 0x44d5be(%rip), %xmm0 # 0x478290
movups %xmm0, 0x20(%rax)
movups 0x44d5a3(%rip), %xmm0 # 0x478280
movups %xmm0, 0x10(%rax)
movups 0x44d588(%rip), %xmm0 # 0x478270
movups %xmm0, (%rax)
leaq 0x44d5ce(%rip), %rdi # 0x4782c0
leaq 0x293317(%rip), %rcx # 0x2be010
movl $0x10000, %edx # imm = 0x10000
movq %rdx, %rsi
callq 0x2cd50
movl %eax, %ecx
xorl %edi, %edi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
andl -0x14(%rbp), %edi
movl %edi, -0x14(%rbp)
leaq 0x127369(%rip), %rsi # 0x15208b
movb $0x0, %al
callq 0xdb250
cmpl $0x0, -0x14(%rbp)
je 0x2ad42
leaq 0x44d53a(%rip), %rdi # 0x478270
leaq 0x44d583(%rip), %rsi # 0x4782c0
callq 0x2aac0
movq -0x8(%rbp), %rdi
callq 0x2a170
movq -0x10(%rbp), %rdi
callq 0x2a170
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| simple_read_write_test:
push rbp
mov rbp, rsp
sub rsp, 60h
mov edi, 10000h
call _malloc
mov [rbp+var_8], rax
mov edi, 10000h
call _malloc
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
mov esi, 1
mov edx, 10000h
call _memset
mov r8, [rbp+var_8]
mov eax, cs:dword_4780D0
lea rdi, pagecache
lea rsi, file1
xor ecx, ecx
mov edx, ecx
mov ecx, 3
mov r9d, 1
xor r10d, r10d
mov [rsp+60h+var_60], 0
mov dword ptr [rsp+60h+var_58], 1
mov [rsp+60h+var_50], 0
mov [rsp+60h+var_48], 0
mov [rsp+60h+var_40], 0
mov [rsp+60h+var_38], 0
mov [rsp+60h+var_30], eax
call pagecache_write_part
mov r8, [rbp+var_10]
lea rdi, pagecache
lea rsi, file1
xor eax, eax
mov edx, eax
mov ecx, 3
mov r9d, 1
xor eax, eax
mov [rsp+60h+var_60], 0
mov [rsp+60h+var_58], 0
call pagecache_read
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 10000h
call _memcmp
mov ecx, eax
xor edi, edi
mov eax, 1
cmp ecx, 0
cmovz edi, eax
mov [rbp+var_14], edi
lea rsi, aSimpleWriteRea; "Simple write-read page "
mov al, 0
call ok
lea rdi, pagecache
lea rsi, file1
mov edx, 3
xor eax, eax
mov r8d, eax
mov rcx, r8
call flush_pagecache_blocks_with_filter
cmp eax, 0
jz short loc_2ACB2
lea rdi, aGotErrorDuring_0; "Got error during flushing pagecache\n"
mov al, 0
call diag
mov edi, 1
call _exit
loc_2ACB2:
mov rcx, cs:qword_4782B0
mov rax, rsp
mov [rax+40h], rcx
movups xmm0, cs:xmmword_4782A0
movups xmmword ptr [rax+30h], xmm0
movups xmm0, cs:xmmword_478290
movups xmmword ptr [rax+20h], xmm0
movups xmm0, cs:xmmword_478280
movups xmmword ptr [rax+10h], xmm0
movups xmm0, cs:file1
movups xmmword ptr [rax], xmm0
lea rdi, file1_name
lea rcx, simple_read_write_test_file
mov edx, 10000h
mov rsi, rdx
call test_file
mov ecx, eax
xor edi, edi
mov eax, 1
cmp ecx, 0
cmovnz edi, eax
and edi, [rbp+var_14]
mov [rbp+var_14], edi
lea rsi, aSimpleWriteRea_0; "Simple write-read page file"
mov al, 0
call ok
cmp [rbp+var_14], 0
jz short loc_2AD42
lea rdi, file1
lea rsi, file1_name
call reset_file
loc_2AD42:
mov rdi, [rbp+var_8]
call _free
mov rdi, [rbp+var_10]
call _free
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
mov eax, [rbp+var_18]
add rsp, 60h
pop rbp
retn
| long long simple_read_write_test()
{
int v0; // ecx
BOOL v1; // edi
int v2; // edx
int v3; // r8d
int v4; // r9d
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // edx
int v11; // r8d
int v12; // r9d
char v14; // [rsp+0h] [rbp-60h]
char v15; // [rsp+0h] [rbp-60h]
unsigned int v16; // [rsp+4Ch] [rbp-14h]
long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = malloc(0x10000LL);
v17 = malloc(0x10000LL);
memset(v18, 1LL, 0x10000LL);
pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v18, 1, 0, 1, 0, 0LL, 0LL, 0, dword_4780D0);
pagecache_read((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v17, 1, 0, 0LL);
v0 = memcmp(v17, v18, 0x10000LL);
v1 = v0 == 0;
ok(v1, (unsigned int)"Simple write-read page ", v2, v0, v3, v4, v14);
if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL) )
{
diag((unsigned int)"Got error during flushing pagecache\n", (unsigned int)&file1, v5, v6, v7, v8);
exit(1LL);
}
v9 = test_file(
(unsigned int)&file1_name,
0x10000,
0x10000,
(unsigned int)&simple_read_write_test_file,
v7,
v8,
file1,
xmmword_478280,
xmmword_478290,
xmmword_4782A0,
qword_4782B0);
v16 = v1 && v9 != 0;
ok(v16, (unsigned int)"Simple write-read page file", v10, v9, v11, v12, v15);
if ( v16 )
reset_file((long long)&file1, (long long)&file1_name);
free(v18);
free(v17);
return v16;
}
| simple_read_write_test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EDI,0x10000
CALL 0x0012a6d0
MOV qword ptr [RBP + -0x8],RAX
MOV EDI,0x10000
CALL 0x0012a6d0
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
MOV EDX,0x10000
CALL 0x0012a2c0
MOV R8,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [0x005780d0]
LEA RDI,[0x578050]
LEA RSI,[0x578270]
XOR ECX,ECX
MOV EDX,ECX
MOV ECX,0x3
MOV R9D,0x1
XOR R10D,R10D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x001303f0
MOV R8,qword ptr [RBP + -0x10]
LEA RDI,[0x578050]
LEA RSI,[0x578270]
XOR EAX,EAX
MOV EDX,EAX
MOV ECX,0x3
MOV R9D,0x1
XOR EAX,EAX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0012ecf0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x10000
CALL 0x0012a830
MOV ECX,EAX
XOR EDI,EDI
MOV EAX,0x1
CMP ECX,0x0
CMOVZ EDI,EAX
MOV dword ptr [RBP + -0x14],EDI
LEA RSI,[0x25204e]
MOV AL,0x0
CALL 0x001db250
LEA RDI,[0x578050]
LEA RSI,[0x578270]
MOV EDX,0x3
XOR EAX,EAX
MOV R8D,EAX
MOV RCX,R8
CALL 0x00130b30
CMP EAX,0x0
JZ 0x0012acb2
LEA RDI,[0x252066]
MOV AL,0x0
CALL 0x001daf90
MOV EDI,0x1
CALL 0x0012a500
LAB_0012acb2:
MOV RCX,qword ptr [0x005782b0]
MOV RAX,RSP
MOV qword ptr [RAX + 0x40],RCX
MOVUPS XMM0,xmmword ptr [0x005782a0]
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOVUPS XMM0,xmmword ptr [0x00578290]
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [0x00578280]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x00578270]
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[0x5782c0]
LEA RCX,[0x3be010]
MOV EDX,0x10000
MOV RSI,RDX
CALL 0x0012cd50
MOV ECX,EAX
XOR EDI,EDI
MOV EAX,0x1
CMP ECX,0x0
CMOVNZ EDI,EAX
AND EDI,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EDI
LEA RSI,[0x25208b]
MOV AL,0x0
CALL 0x001db250
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0012ad42
LEA RDI,[0x578270]
LEA RSI,[0x5782c0]
CALL 0x0012aac0
LAB_0012ad42:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a170
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012a170
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x18]
ADD RSP,0x60
POP RBP
RET
|
bool simple_read_write_test(void)
{
bool bVar1;
int iVar2;
int iVar3;
void *__s;
void *__s1;
int8 in_stack_ffffffffffffffa0;
int4 uVar4;
int8 in_stack_ffffffffffffffa8;
uint uVar5;
int8 in_stack_ffffffffffffffc0;
uint uVar6;
int8 in_stack_ffffffffffffffc8;
int4 uVar7;
uVar7 = (int4)((ulong)in_stack_ffffffffffffffc8 >> 0x20);
uVar6 = (uint)((ulong)in_stack_ffffffffffffffc0 >> 0x20);
uVar5 = (uint)((ulong)in_stack_ffffffffffffffa8 >> 0x20);
uVar4 = (int4)((ulong)in_stack_ffffffffffffffa0 >> 0x20);
__s = malloc(0x10000);
__s1 = malloc(0x10000);
memset(__s,1,0x10000);
pagecache_write_part
(pagecache,file1,0,3,__s,1,0,CONCAT44(uVar4,1),(ulong)uVar5 << 0x20,0,0,
(ulong)uVar6 << 0x20,CONCAT44(uVar7,pagecache._128_4_));
pagecache_read(pagecache,file1,0,3,__s1,1,0,0);
iVar2 = memcmp(__s1,__s,0x10000);
ok(iVar2 == 0,"Simple write-read page ");
iVar3 = flush_pagecache_blocks_with_filter(pagecache,file1,3,0);
if (iVar3 != 0) {
diag("Got error during flushing pagecache\n");
/* WARNING: Subroutine does not return */
exit(1);
}
iVar3 = test_file(file1_name,0x10000,0x10000,simple_read_write_test_file);
bVar1 = iVar3 != 0 && iVar2 == 0;
ok(bVar1,"Simple write-read page file");
if (bVar1) {
reset_file(file1,file1_name);
}
free(__s);
free(__s1);
return bVar1;
}
| |
50,858 | minja::Parser::parseIdentifier() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
} | O3 | cpp | minja::Parser::parseIdentifier():
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xad560(%rip), %rax # 0xdefa8
movb (%rax), %al
testb %al, %al
je 0x31b0a
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x31a7d
movq 0xac529(%rip), %rcx # 0xddf98
cmpb $0x0, (%rcx)
je 0x31a79
incl 0x8(%rax)
jmp 0x31a7d
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0xad4f7(%rip), %rdx # 0xdef88
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x313dc
cmpq $0x0, 0x30(%rsp)
je 0x31acf
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rbx, %rsi
callq 0x5ad66
jmp 0x31ad5
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31af0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x31aff
callq 0x30ed6
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0xad497(%rip), %rdi # 0xdefa8
callq 0x18c10
testl %eax, %eax
je 0x31a52
leaq 0xad463(%rip), %rdi # 0xdef88
leaq 0x7acf8(%rip), %rsi # 0xac824
movl $0x10, %edx
callq 0x30f46
leaq -0xb8f(%rip), %rdi # 0x30fae
leaq 0xad444(%rip), %rsi # 0xdef88
leaq 0xacb6d(%rip), %rdx # 0xde6b8
callq 0x185d0
leaq 0xad451(%rip), %rdi # 0xdefa8
callq 0x18440
jmp 0x31a52
movq %rax, %rbx
leaq 0xad43d(%rip), %rdi # 0xdefa8
callq 0x18430
jmp 0x31ba4
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31b95
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x31b95
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x31ba4
callq 0x30ed6
movq %rbx, %rdi
callq 0x18bc0
| _ZN5minja6Parser15parseIdentifierEv:
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz loc_31B0A
loc_31A52:
mov rax, [r14]
mov [rsp+58h+var_48], rax
mov rax, [r14+8]
mov [rsp+58h+var_40], rax
test rax, rax
jz short loc_31A7D
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_31A79
inc dword ptr [rax+8]
jmp short loc_31A7D
loc_31A79:
lock inc dword ptr [rax+8]
loc_31A7D:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+58h+var_38], rax
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rdi, [rsp+58h+var_30]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+58h+var_28], 0
jz short loc_31ACF
mov qword ptr [rbx], 0
lea rdi, [rbx+8]
lea rdx, [rsp+58h+var_49]
lea rcx, [rsp+58h+var_48]
lea r8, [rsp+58h+var_30]
mov rsi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIS5_EJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::VariableExpr>>,minja::Location &,std::string &)
jmp short loc_31AD5
loc_31ACF:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_31AD5:
lea rax, [rsp+58h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_31AF0
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31AF0:
mov rdi, [rsp+58h+var_40]
test rdi, rdi
jz short loc_31AFF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_31AFF:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
retn
loc_31B0A:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_31A52
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
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, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_31A52
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_31BA4
mov rbx, rax
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_31B95
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_31B95
mov rbx, rax
loc_31B95:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_31BA4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_31BA4:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
char v4; // [rsp+Fh] [rbp-49h] BYREF
long long v5; // [rsp+10h] [rbp-48h] BYREF
volatile signed __int32 *v6; // [rsp+18h] [rbp-40h]
long long v7; // [rsp+20h] [rbp-38h]
void *v8[2]; // [rsp+28h] [rbp-30h] BYREF
long long v9; // [rsp+38h] [rbp-20h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
v5 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v6 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v7 = a2[4] - a2[2];
minja::Parser::consumeToken(
(long long)v8,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v8[1] )
{
*(_QWORD *)this = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(
(char *)this + 8,
this,
&v4,
&v5,
v8);
}
else
{
*(_OWORD *)this = 0LL;
}
if ( v8[0] != &v9 )
operator delete(v8[0], v9 + 1);
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
return this;
}
| parseIdentifier:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x1defa8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00131b0a
LAB_00131a52:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x00131a7d
MOV RCX,qword ptr [0x001ddf98]
CMP byte ptr [RCX],0x0
JZ 0x00131a79
INC dword ptr [RAX + 0x8]
JMP 0x00131a7d
LAB_00131a79:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00131a7d:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_00131a8a:
LEA RDX,[0x1def88]
LEA RDI,[RSP + 0x28]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001313dc
CMP qword ptr [RSP + 0x30],0x0
JZ 0x00131acf
MOV qword ptr [RBX],0x0
LEA RDI,[RBX + 0x8]
LAB_00131ab6:
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x10]
LEA R8,[RSP + 0x28]
MOV RSI,RBX
CALL 0x0015ad66
JMP 0x00131ad5
LAB_00131acf:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00131ad5:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00131af0
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186a0
LAB_00131af0:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00131aff
CALL 0x00130ed6
LAB_00131aff:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_00131b0a:
LEA RDI,[0x1defa8]
CALL 0x00118c10
TEST EAX,EAX
JZ 0x00131a52
LAB_00131b1e:
LEA RDI,[0x1def88]
LEA RSI,[0x1ac824]
MOV EDX,0x10
CALL 0x00130f46
LAB_00131b36:
LEA RDI,[0x130fae]
LEA RSI,[0x1def88]
LEA RDX,[0x1de6b8]
CALL 0x001185d0
LEA RDI,[0x1defa8]
CALL 0x00118440
JMP 0x00131a52
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int iVar1;
long in_RSI;
int8 *in_RDI;
long *local_30;
long local_28;
long local_20 [2];
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00131b1e to 00131b35 has its CatchHandler @ 00131b61 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
this = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 8);
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001ddf98 == '\0') {
LOCK();
*(int *)(this + 8) = *(int *)(this + 8) + 1;
UNLOCK();
}
else {
*(int *)(this + 8) = *(int *)(this + 8) + 1;
}
}
/* try { // try from 00131a8a to 00131aa2 has its CatchHandler @ 00131b92 */
consumeToken(&local_30);
if (local_28 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
*in_RDI = 0;
/* try { // try from 00131ab6 to 00131acc has its CatchHandler @ 00131b72 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location&,std::__cxx11::string&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1));
}
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
return;
}
| |
50,859 | maria_rtree_delete | eloqsql/storage/maria/ma_rt_index.c | my_bool maria_rtree_delete(MARIA_HA *info, MARIA_KEY *key)
{
MARIA_SHARE *share= info->s;
my_off_t new_root= share->state.key_root[key->keyinfo->key_nr];
int res;
LSN lsn= LSN_IMPOSSIBLE;
DBUG_ENTER("maria_rtree_delete");
if ((res= maria_rtree_real_delete(info, key, &new_root)))
goto err;
if (share->now_transactional)
res= _ma_write_undo_key_delete(info, key, new_root, &lsn);
else
share->state.key_root[key->keyinfo->key_nr]= new_root;
err:
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res != 0);
} | O3 | c | maria_rtree_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x118(%r15), %rax
movq 0x8(%rsi), %rcx
movzbl 0xa5(%rcx), %ecx
movq (%rax,%rcx,8), %rax
leaq -0x28(%rbp), %rdx
movq %rax, (%rdx)
movq $0x0, -0x20(%rbp)
callq 0x6bdc7
testb %al, %al
jne 0x6bd6b
cmpb $0x0, 0x7e7(%r15)
movq -0x28(%rbp), %rdx
je 0x6bdac
leaq -0x20(%rbp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6749f
movsbl %al, %r14d
cmpb $0x0, 0x67e(%rbx)
je 0x6bd80
movq %rbx, %rdi
callq 0x5aa7e
movq -0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x593c4
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
testl %r14d, %r14d
setne %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x118(%r15), %rax
movq 0x8(%r14), %rcx
movzbl 0xa5(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
xorl %r14d, %r14d
jmp 0x6bd6f
| maria_rtree_delete:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov r15, [rdi]
mov rax, [r15+118h]
mov rcx, [rsi+8]
movzx ecx, byte ptr [rcx+0A5h]
mov rax, [rax+rcx*8]
lea rdx, [rbp+var_28]
mov [rdx], rax
mov [rbp+var_20], 0
call maria_rtree_real_delete
test al, al
jnz short loc_6BD6B
cmp byte ptr [r15+7E7h], 0
mov rdx, [rbp+var_28]
jz short loc_6BDAC
lea rcx, [rbp+var_20]
mov rdi, rbx
mov rsi, r14
call _ma_write_undo_key_delete
loc_6BD6B:
movsx r14d, al
loc_6BD6F:
cmp byte ptr [rbx+67Eh], 0
jz short loc_6BD80
mov rdi, rbx
call _ma_unlock_key_del
loc_6BD80:
mov rsi, [rbp+var_20]
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
test r14d, r14d
setnz al
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6BDAC:
mov rax, [r15+118h]
mov rcx, [r14+8]
movzx ecx, byte ptr [rcx+0A5h]
mov [rax+rcx*8], rdx
xor r14d, r14d
jmp short loc_6BD6F
| bool maria_rtree_delete(long long a1, long long *a2)
{
long long v2; // r15
char v3; // al
int v4; // r14d
unsigned long long v6; // [rsp+8h] [rbp-28h] BYREF
signed long long v7[4]; // [rsp+10h] [rbp-20h] BYREF
v2 = *(_QWORD *)a1;
v6 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * *(unsigned __int8 *)(a2[1] + 165));
v7[0] = 0LL;
v3 = maria_rtree_real_delete(a1, a2, &v6);
if ( v3 )
goto LABEL_4;
if ( *(_BYTE *)(v2 + 2023) )
{
v3 = ma_write_undo_key_delete((long long *)a1, a2, v6, (unsigned long long)v7);
LABEL_4:
v4 = v3;
goto LABEL_5;
}
*(_QWORD *)(*(_QWORD *)(v2 + 280) + 8LL * *(unsigned __int8 *)(a2[1] + 165)) = v6;
v4 = 0;
LABEL_5:
if ( *(_BYTE *)(a1 + 1662) )
ma_unlock_key_del((_BYTE *)a1);
ma_unpin_all_pages(a1, v7[0]);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL;
return v4 != 0;
}
| maria_rtree_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV R15,qword ptr [RDI]
MOV RAX,qword ptr [R15 + 0x118]
MOV RCX,qword ptr [RSI + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
MOV RAX,qword ptr [RAX + RCX*0x8]
LEA RDX,[RBP + -0x28]
MOV qword ptr [RDX],RAX
MOV qword ptr [RBP + -0x20],0x0
CALL 0x0016bdc7
TEST AL,AL
JNZ 0x0016bd6b
CMP byte ptr [R15 + 0x7e7],0x0
MOV RDX,qword ptr [RBP + -0x28]
JZ 0x0016bdac
LEA RCX,[RBP + -0x20]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016749f
LAB_0016bd6b:
MOVSX R14D,AL
LAB_0016bd6f:
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x0016bd80
MOV RDI,RBX
CALL 0x0015aa7e
LAB_0016bd80:
MOV RSI,qword ptr [RBP + -0x20]
MOV RDI,RBX
CALL 0x001593c4
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
TEST R14D,R14D
SETNZ AL
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016bdac:
MOV RAX,qword ptr [R15 + 0x118]
MOV RCX,qword ptr [R14 + 0x8]
MOVZX ECX,byte ptr [RCX + 0xa5]
MOV qword ptr [RAX + RCX*0x8],RDX
XOR R14D,R14D
JMP 0x0016bd6f
|
int8 maria_rtree_delete(long *param_1,long param_2)
{
long lVar1;
int8 uVar2;
char cVar3;
int8 local_28;
lVar1 = *param_1;
uVar2 = *(int8 *)
(*(long *)(lVar1 + 0x118) + (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 8);
local_28 = 0;
cVar3 = maria_rtree_real_delete();
if (cVar3 == '\0') {
if (*(char *)(lVar1 + 0x7e7) == '\0') {
*(int8 *)
(*(long *)(lVar1 + 0x118) + (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 8) = uVar2;
cVar3 = '\0';
}
else {
cVar3 = _ma_write_undo_key_delete(param_1,param_2,uVar2,&local_28);
}
}
if (*(char *)((long)param_1 + 0x67e) != '\0') {
_ma_unlock_key_del(param_1);
}
_ma_unpin_all_pages(param_1,local_28);
lVar1 = param_1[1];
*(int8 *)(lVar1 + 0x90) = 0;
return CONCAT71((int7)((ulong)lVar1 >> 8),cVar3 != '\0');
}
| |
50,860 | AST::Node::addChild(AST::Node*) | 11AgReS1SoR11[P]Graph/Common/AST/src/Node.hpp | void addChild(Node* child)
{
if (child == nullptr) { throw std::runtime_error("Add child, but nullptr, bug!?"); }
childNodes.push_back(child);
} | O0 | cpp | AST::Node::addChild(AST::Node*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x756f
movl $0x10, %edi
callq 0x6220
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x2b28(%rip), %rsi # 0xa062
callq 0x61c0
jmp 0x7541
movq -0x30(%rbp), %rdi
movq 0x5aac(%rip), %rsi # 0xcff8
movq 0x5a85(%rip), %rdx # 0xcfd8
callq 0x69b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x63a0
jmp 0x7586
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
leaq -0x10(%rbp), %rsi
callq 0x65b0
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x6a10
nop
| _ZN3AST4Node8addChildEPS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
cmp [rbp+var_10], 0
jnz short loc_756F
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_30], rax
lea rsi, aAddChildButNul; "Add child, but nullptr, bug!?"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_7541:
mov rdi, [rbp+var_30]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_30]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
call ___cxa_free_exception
jmp short loc_7586
loc_756F:
mov rdi, [rbp+var_28]
add rdi, 20h ; ' '
lea rsi, [rbp+var_10]
call __ZNSt6vectorIPN3AST4NodeESaIS2_EE9push_backERKS2_; std::vector<AST::Node *>::push_back(AST::Node * const&)
add rsp, 30h
pop rbp
retn
loc_7586:
mov rdi, [rbp+var_18]
call __Unwind_Resume
| long long AST::Node::addChild(AST::Node *this, AST::Node *a2)
{
std::runtime_error *exception; // [rsp+0h] [rbp-30h]
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v4[1] = this;
v4[0] = a2;
if ( !a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Add child, but nullptr, bug!?");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<AST::Node *>::push_back((char *)this + 32, v4);
}
| addChild:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0010756f
MOV EDI,0x10
CALL 0x00106220
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x30],RAX
LAB_00107533:
LEA RSI,[0x10a062]
CALL 0x001061c0
LAB_0010753f:
JMP 0x00107541
LAB_00107541:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [0x0010cff8]
MOV RDX,qword ptr [0x0010cfd8]
CALL 0x001069b0
LAB_0010756f:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x20
LEA RSI,[RBP + -0x10]
CALL 0x001065b0
ADD RSP,0x30
POP RBP
RET
|
/* AST::Node::addChild(AST::Node*) */
void __thiscall AST::Node::addChild(Node *this,Node *param_1)
{
runtime_error *this_00;
Node *local_18;
Node *local_10;
local_18 = param_1;
local_10 = this;
if (param_1 == (Node *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00107533 to 0010753e has its CatchHandler @ 00107558 */
std::runtime_error::runtime_error(this_00,"Add child, but nullptr, bug!?");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0010cff8,PTR__runtime_error_0010cfd8);
}
std::vector<AST::Node*,std::allocator<AST::Node*>>::push_back
((vector<AST::Node*,std::allocator<AST::Node*>> *)(this + 0x20),&local_18);
return;
}
| |
50,861 | ma_find_half_pos | eloqsql/storage/maria/ma_write.c | uchar *_ma_find_half_pos(MARIA_KEY *key, MARIA_PAGE *ma_page,
uchar **after_key)
{
uint keys, length, key_ref_length, page_flag, nod_flag;
uchar *page, *end, *lastpos;
MARIA_HA *info= ma_page->info;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_find_half_pos");
nod_flag= ma_page->node;
key_ref_length= share->keypage_header + nod_flag;
page_flag= ma_page->flag;
length= ma_page->size - key_ref_length;
page= ma_page->buff+ key_ref_length; /* Point to first key */
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)) && !(page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
key_ref_length= keyinfo->keylength+nod_flag;
key->data_length= keyinfo->keylength - info->s->rec_reflength;
key->ref_length= info->s->rec_reflength;
key->flag= 0;
keys=length/(key_ref_length*2);
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key->data, end, key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
key->data[0]= 0; /* Safety */
do
{
lastpos=page;
if (!(length= (*keyinfo->get_key)(key, page_flag, nod_flag, &page)))
DBUG_RETURN(0);
} while (page < end);
*after_key= page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
} | O3 | c | ma_find_half_pos:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r8
movq (%rsi), %rbx
movq (%rbx), %rcx
movq 0x8(%rdi), %r11
movl 0x28(%rsi), %r10d
movl 0x744(%rcx), %edx
addl %r10d, %edx
movl 0x2c(%rsi), %r9d
movl 0x20(%rsi), %eax
subl %edx, %eax
movq 0x10(%rsi), %r14
addq %rdx, %r14
movq %r14, -0x38(%rbp)
testb $0x2e, 0xa2(%r11)
sete %sil
movl %r9d, -0x2c(%rbp)
testb $0x2, %r9b
sete %r9b
andb %sil, %r9b
cmpb $0x1, %r9b
jne 0x536cf
movzwl 0xaa(%r11), %edx
addl %edx, %r10d
subl 0x740(%rcx), %edx
movl %edx, 0x10(%rdi)
movq (%rbx), %rcx
movl 0x740(%rcx), %ecx
movl %ecx, 0x14(%rdi)
movl $0x0, 0x18(%rdi)
leal (%r10,%r10), %ecx
xorl %edx, %edx
divl %ecx
imull %r10d, %eax
addq %rax, %r14
leaq (%r14,%r10), %rax
movq %rax, (%r8)
movq (%rdi), %rdi
movq %r14, %rsi
movq %r10, %rdx
callq 0x29080
movq %r14, %r12
jmp 0x53725
movq %r8, -0x40(%rbp)
shrl %eax
addq %r14, %rax
subq %rdx, %rax
movq %rax, -0x48(%rbp)
movq (%rdi), %rax
movb $0x0, (%rax)
movq %r14, %r12
movq %rdi, %r15
movl -0x2c(%rbp), %esi
movq %r10, %rbx
movl %r10d, %edx
leaq -0x38(%rbp), %rcx
movq %r11, %r13
callq *0xe0(%r11)
testl %eax, %eax
je 0x53722
movq -0x38(%rbp), %r14
cmpq -0x48(%rbp), %r14
movq %r15, %rdi
movq %rbx, %r10
movq %r13, %r11
jb 0x536e5
movq -0x40(%rbp), %rax
movq %r14, (%rax)
jmp 0x53725
xorl %r12d, %r12d
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_find_half_pos:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r8, rdx
mov rbx, [rsi]
mov rcx, [rbx]
mov r11, [rdi+8]
mov r10d, [rsi+28h]
mov edx, [rcx+744h]
add edx, r10d
mov r9d, [rsi+2Ch]
mov eax, [rsi+20h]
sub eax, edx
mov r14, [rsi+10h]
add r14, rdx
mov [rbp+var_38], r14
test byte ptr [r11+0A2h], 2Eh
setz sil
mov [rbp+var_2C], r9d
test r9b, 2
setz r9b
and r9b, sil
cmp r9b, 1
jnz short loc_536CF
movzx edx, word ptr [r11+0AAh]
add r10d, edx
sub edx, [rcx+740h]
mov [rdi+10h], edx
mov rcx, [rbx]
mov ecx, [rcx+740h]
mov [rdi+14h], ecx
mov dword ptr [rdi+18h], 0
lea ecx, [r10+r10]
xor edx, edx
div ecx
imul eax, r10d
add r14, rax
lea rax, [r14+r10]
mov [r8], rax
mov rdi, [rdi]
mov rsi, r14
mov rdx, r10
call _memcpy
mov r12, r14
jmp short loc_53725
loc_536CF:
mov [rbp+var_40], r8
shr eax, 1
add rax, r14
sub rax, rdx
mov [rbp+var_48], rax
mov rax, [rdi]
mov byte ptr [rax], 0
loc_536E5:
mov r12, r14
mov r15, rdi
mov esi, [rbp+var_2C]
mov rbx, r10
mov edx, r10d
lea rcx, [rbp+var_38]
mov r13, r11
call qword ptr [r11+0E0h]
test eax, eax
jz short loc_53722
mov r14, [rbp+var_38]
cmp r14, [rbp+var_48]
mov rdi, r15
mov r10, rbx
mov r11, r13
jb short loc_536E5
mov rax, [rbp+var_40]
mov [rax], r14
jmp short loc_53725
loc_53722:
xor r12d, r12d
loc_53725:
mov rax, r12
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_find_half_pos(long long a1, long long **a2, unsigned long long *a3)
{
long long *v4; // rbx
long long v5; // rcx
long long v6; // r11
long long v7; // r10
long long v8; // rdx
unsigned int v9; // r9d
unsigned int v10; // eax
long long v11; // r14
bool v12; // si
int v13; // edx
long long v14; // r10
long long v15; // r14
long long v16; // r12
long long v17; // rbx
long long v18; // r13
unsigned long long v20; // [rsp+8h] [rbp-48h]
unsigned long long *v21; // [rsp+10h] [rbp-40h]
unsigned long long v22; // [rsp+18h] [rbp-38h] BYREF
unsigned int v23; // [rsp+24h] [rbp-2Ch]
v4 = *a2;
v5 = **a2;
v6 = *(_QWORD *)(a1 + 8);
v7 = *((unsigned int *)a2 + 10);
v8 = (unsigned int)(v7 + *(_DWORD *)(v5 + 1860));
v9 = *((_DWORD *)a2 + 11);
v10 = *((_DWORD *)a2 + 8) - v8;
v11 = (long long)a2[2] + v8;
v22 = v11;
v12 = (*(_BYTE *)(v6 + 162) & 0x2E) == 0;
v23 = v9;
if ( v12 && (v9 & 2) == 0 )
{
v13 = *(unsigned __int16 *)(v6 + 170);
v14 = (unsigned int)(v13 + v7);
*(_DWORD *)(a1 + 16) = v13 - *(_DWORD *)(v5 + 1856);
*(_DWORD *)(a1 + 20) = *(_DWORD *)(*v4 + 1856);
*(_DWORD *)(a1 + 24) = 0;
v15 = (unsigned int)v14 * (v10 / (2 * (int)v14)) + v11;
*a3 = v15 + v14;
memcpy(*(_QWORD *)a1, v15, v14);
return v15;
}
else
{
v21 = a3;
v20 = v11 + (v10 >> 1) - v8;
**(_BYTE **)a1 = 0;
while ( 1 )
{
v16 = v11;
v17 = v7;
v18 = v6;
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v6 + 224))(
a1,
v23,
(unsigned int)v7,
&v22) )
break;
v11 = v22;
v7 = v17;
v6 = v18;
if ( v22 >= v20 )
{
*v21 = v22;
return v16;
}
}
return 0LL;
}
}
| _ma_find_half_pos:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R8,RDX
MOV RBX,qword ptr [RSI]
MOV RCX,qword ptr [RBX]
MOV R11,qword ptr [RDI + 0x8]
MOV R10D,dword ptr [RSI + 0x28]
MOV EDX,dword ptr [RCX + 0x744]
ADD EDX,R10D
MOV R9D,dword ptr [RSI + 0x2c]
MOV EAX,dword ptr [RSI + 0x20]
SUB EAX,EDX
MOV R14,qword ptr [RSI + 0x10]
ADD R14,RDX
MOV qword ptr [RBP + -0x38],R14
TEST byte ptr [R11 + 0xa2],0x2e
SETZ SIL
MOV dword ptr [RBP + -0x2c],R9D
TEST R9B,0x2
SETZ R9B
AND R9B,SIL
CMP R9B,0x1
JNZ 0x001536cf
MOVZX EDX,word ptr [R11 + 0xaa]
ADD R10D,EDX
SUB EDX,dword ptr [RCX + 0x740]
MOV dword ptr [RDI + 0x10],EDX
MOV RCX,qword ptr [RBX]
MOV ECX,dword ptr [RCX + 0x740]
MOV dword ptr [RDI + 0x14],ECX
MOV dword ptr [RDI + 0x18],0x0
LEA ECX,[R10 + R10*0x1]
XOR EDX,EDX
DIV ECX
IMUL EAX,R10D
ADD R14,RAX
LEA RAX,[R14 + R10*0x1]
MOV qword ptr [R8],RAX
MOV RDI,qword ptr [RDI]
MOV RSI,R14
MOV RDX,R10
CALL 0x00129080
MOV R12,R14
JMP 0x00153725
LAB_001536cf:
MOV qword ptr [RBP + -0x40],R8
SHR EAX,0x1
ADD RAX,R14
SUB RAX,RDX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RDI]
MOV byte ptr [RAX],0x0
LAB_001536e5:
MOV R12,R14
MOV R15,RDI
MOV ESI,dword ptr [RBP + -0x2c]
MOV RBX,R10
MOV EDX,R10D
LEA RCX,[RBP + -0x38]
MOV R13,R11
CALL qword ptr [R11 + 0xe0]
TEST EAX,EAX
JZ 0x00153722
MOV R14,qword ptr [RBP + -0x38]
CMP R14,qword ptr [RBP + -0x48]
MOV RDI,R15
MOV R10,RBX
MOV R11,R13
JC 0x001536e5
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R14
JMP 0x00153725
LAB_00153722:
XOR R12D,R12D
LAB_00153725:
MOV RAX,R12
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * _ma_find_half_pos(int8 *param_1,int8 *param_2,long *param_3)
{
int iVar1;
long *plVar2;
long lVar3;
long lVar4;
int iVar5;
void *pvVar6;
uint uVar7;
uint uVar8;
void *__src;
void *local_40;
uint local_34;
plVar2 = (long *)*param_2;
lVar3 = *plVar2;
lVar4 = param_1[1];
iVar1 = *(int *)(param_2 + 5);
uVar7 = *(int *)(lVar3 + 0x744) + iVar1;
local_34 = *(uint *)((long)param_2 + 0x2c);
iVar5 = *(int *)(param_2 + 4);
local_40 = (void *)(param_2[2] + (ulong)uVar7);
if ((local_34 & 2) == 0 && (*(byte *)(lVar4 + 0xa2) & 0x2e) == 0) {
uVar8 = iVar1 + (uint)*(ushort *)(lVar4 + 0xaa);
*(uint *)(param_1 + 2) = (uint)*(ushort *)(lVar4 + 0xaa) - *(int *)(lVar3 + 0x740);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)(*plVar2 + 0x740);
*(int4 *)(param_1 + 3) = 0;
__src = (void *)((long)local_40 + (ulong)(((iVar5 - uVar7) / (uVar8 * 2)) * uVar8));
*param_3 = (long)__src + (ulong)uVar8;
memcpy((void *)*param_1,__src,(ulong)uVar8);
}
else {
pvVar6 = (void *)((long)local_40 + ((ulong)(iVar5 - uVar7 >> 1) - (ulong)uVar7));
*(int1 *)*param_1 = 0;
do {
__src = local_40;
iVar5 = (**(code **)(lVar4 + 0xe0))(param_1,local_34,iVar1,&local_40);
if (iVar5 == 0) {
return (void *)0x0;
}
} while (local_40 < pvVar6);
*param_3 = (long)local_40;
}
return __src;
}
| |
50,862 | my_malloc | eloqsql/mysys/my_malloc.c | void *my_malloc(PSI_memory_key key, size_t size, myf my_flags)
{
my_memory_header *mh;
void *point;
DBUG_ENTER("my_malloc");
DBUG_PRINT("my",("size: %zu flags: %lu", size, my_flags));
compile_time_assert(sizeof(my_memory_header) <= HEADER_SIZE);
if (!(my_flags & (MY_WME | MY_FAE)))
my_flags|= my_global_flags;
/* Safety */
if (!size)
size=1;
if (size > SIZE_T_MAX - 1024L*1024L*16L) /* Wrong call */
DBUG_RETURN(0);
/* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */
size= ALIGN_SIZE(size);
if (DBUG_EVALUATE_IF("simulate_out_of_memory", 1, 0))
mh= NULL;
else
mh= (my_memory_header*) sf_malloc(size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
my_errno=errno;
if (my_flags & MY_FAE)
error_handler_hook=fatal_error_handler_hook;
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size);
if (my_flags & MY_FAE)
abort();
point= NULL;
}
else
{
int flag= MY_TEST(my_flags & MY_THREAD_SPECIFIC);
mh->m_size= size | flag;
mh->m_key= PSI_CALL_memory_alloc(key, size, & mh->m_owner);
update_malloc_size(size + HEADER_SIZE, flag);
point= HEADER_TO_USER(mh);
if (my_flags & MY_ZEROFILL)
bzero(point, size);
else
TRASH_ALLOC(point, size);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
} | O3 | c | my_malloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r13d
xorl %r14d, %r14d
movl $0x0, %r15d
testb $0x18, %dl
jne 0xa06cd
leaq 0xb6777e(%rip), %rax # 0xc07e48
movq (%rax), %r15
cmpq $-0x1000001, %rbx # imm = 0xFEFFFFFF
ja 0xa07ad
orq %rdx, %r15
cmpq $0x1, %rbx
adcq $0x7, %rbx
andq $-0x8, %rbx
leaq 0x18(%rbx), %r12
movq %r12, %rdi
callq 0x29720
testq %rax, %rax
je 0xa0760
movq %rax, %r14
movl %r13d, %edi
movl %r15d, %r13d
shrl $0x10, %r13d
andl $0x1, %r13d
movq %rbx, %rax
orq %r13, %rax
movq %rax, 0x8(%r14)
leaq 0x2e58f4(%rip), %rax # 0x386010
movq (%rax), %rax
movq %rbx, %rsi
movq %r14, %rdx
callq *0x3e0(%rax)
movl %eax, 0x10(%r14)
movq %r12, %rdi
movl %r13d, %esi
callq *0x2e53b5(%rip) # 0x385af0
addq $0x18, %r14
testb $0x20, %r15b
je 0xa07ad
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292b0
callq 0x297c0
movl (%rax), %r14d
callq 0xa2412
movl %r14d, (%rax)
testb $0x8, %r15b
je 0xa078a
leaq 0x2e53cb(%rip), %rax # 0x385b48
movq (%rax), %rax
leaq 0x2e53b9(%rip), %rcx # 0x385b40
movq %rax, (%rcx)
testb $0x18, %r15b
je 0xa07a4
movl $0x1044, %esi # imm = 0x1044
movl $0x5, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9e923
testb $0x8, %r15b
jne 0xa07bf
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29620
| my_malloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r13d, edi
xor r14d, r14d
mov r15d, 0
test dl, 18h
jnz short loc_A06CD
lea rax, my_global_flags
mov r15, [rax]
loc_A06CD:
cmp rbx, 0FFFFFFFFFEFFFFFFh
ja loc_A07AD
or r15, rdx
cmp rbx, 1
adc rbx, 7
and rbx, 0FFFFFFFFFFFFFFF8h
lea r12, [rbx+18h]
mov rdi, r12
call _malloc
test rax, rax
jz short loc_A0760
mov r14, rax
mov edi, r13d
mov r13d, r15d
shr r13d, 10h
and r13d, 1
mov rax, rbx
or rax, r13
mov [r14+8], rax
lea rax, PSI_server
mov rax, [rax]
mov rsi, rbx
mov rdx, r14
call qword ptr [rax+3E0h]
mov [r14+10h], eax
mov rdi, r12
mov esi, r13d
call cs:update_malloc_size
add r14, 18h
test r15b, 20h
jz short loc_A07AD
mov rdi, r14
xor esi, esi
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_A0760:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
test r15b, 8
jz short loc_A078A
lea rax, fatal_error_handler_hook
mov rax, [rax]
lea rcx, error_handler_hook
mov [rcx], rax
loc_A078A:
test r15b, 18h
jz short loc_A07A4
mov esi, 1044h
mov edi, 5
mov rdx, rbx
xor eax, eax
call my_error
loc_A07A4:
test r15b, 8
jnz short loc_A07BF
xor r14d, r14d
loc_A07AD:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A07BF:
call _abort
| long long my_malloc(unsigned int a1, unsigned long long a2, int a3)
{
long long v4; // r14
int v5; // r15d
unsigned int v6; // r15d
unsigned long long v7; // rbx
long long v8; // rdi
long long v9; // rax
long long v10; // r14
int v12; // r14d
long long v13; // rdx
v4 = 0LL;
v5 = 0;
if ( (a3 & 0x18) == 0 )
v5 = my_global_flags;
if ( a2 <= 0xFFFFFFFFFEFFFFFFLL )
{
v6 = a3 | v5;
v7 = ((a2 == 0) + a2 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v8 = v7 + 24;
v9 = malloc(v7 + 24);
if ( v9 )
{
v10 = v9;
*(_QWORD *)(v9 + 8) = HIWORD(v6) & 1 | v7;
*(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, long long))PSI_server[124])(a1, v7, v9);
update_malloc_size();
v4 = v10 + 24;
if ( (v6 & 0x20) != 0 )
return memset(v4, 0LL, v7);
}
else
{
v12 = *(_DWORD *)__errno_location(v8);
*(_DWORD *)my_thread_var(v8) = v12;
if ( (v6 & 8) != 0 )
error_handler_hook = fatal_error_handler_hook[0];
if ( (v6 & 0x18) != 0 )
{
a2 = 4164LL;
v8 = 5LL;
my_error(5u, 4164LL, v7);
}
if ( (v6 & 8) != 0 )
abort(v8, a2, v13);
return 0LL;
}
}
return v4;
}
| my_malloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R13D,EDI
XOR R14D,R14D
MOV R15D,0x0
TEST DL,0x18
JNZ 0x001a06cd
LEA RAX,[0xd07e48]
MOV R15,qword ptr [RAX]
LAB_001a06cd:
CMP RBX,-0x1000001
JA 0x001a07ad
OR R15,RDX
CMP RBX,0x1
ADC RBX,0x7
AND RBX,-0x8
LEA R12,[RBX + 0x18]
MOV RDI,R12
CALL 0x00129720
TEST RAX,RAX
JZ 0x001a0760
MOV R14,RAX
MOV EDI,R13D
MOV R13D,R15D
SHR R13D,0x10
AND R13D,0x1
MOV RAX,RBX
OR RAX,R13
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RSI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x3e0]
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,R12
MOV ESI,R13D
CALL qword ptr [0x00485af0]
ADD R14,0x18
TEST R15B,0x20
JZ 0x001a07ad
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292b0
LAB_001a0760:
CALL 0x001297c0
MOV R14D,dword ptr [RAX]
CALL 0x001a2412
MOV dword ptr [RAX],R14D
TEST R15B,0x8
JZ 0x001a078a
LEA RAX,[0x485b48]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x485b40]
MOV qword ptr [RCX],RAX
LAB_001a078a:
TEST R15B,0x18
JZ 0x001a07a4
MOV ESI,0x1044
MOV EDI,0x5
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019e923
LAB_001a07a4:
TEST R15B,0x8
JNZ 0x001a07bf
XOR R14D,R14D
LAB_001a07ad:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a07bf:
CALL 0x00129620
|
void * my_malloc(int4 param_1,ulong param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
void *pvVar3;
int *piVar4;
ulong __n;
ulong uVar5;
pvVar3 = (void *)0x0;
uVar5 = 0;
if ((param_3 & 0x18) == 0) {
uVar5 = my_global_flags;
}
if (param_2 < 0xffffffffff000000) {
uVar5 = uVar5 | param_3;
__n = param_2 + 7 + (ulong)(param_2 == 0) & 0xfffffffffffffff8;
pvVar3 = malloc(__n + 0x18);
if (pvVar3 == (void *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((uVar5 & 8) != 0) {
error_handler_hook = fatal_error_handler_hook;
}
if ((uVar5 & 0x18) != 0) {
my_error(5,0x1044,__n);
}
if ((uVar5 & 8) != 0) {
/* WARNING: Subroutine does not return */
abort();
}
pvVar3 = (void *)0x0;
}
else {
*(ulong *)((long)pvVar3 + 8) = __n | (uint)(uVar5 >> 0x10) & 1;
uVar2 = (**(code **)(PSI_server + 0x3e0))(param_1,__n,pvVar3);
*(int4 *)((long)pvVar3 + 0x10) = uVar2;
(*(code *)update_malloc_size)(__n + 0x18);
pvVar3 = (void *)((long)pvVar3 + 0x18);
if ((uVar5 & 0x20) != 0) {
pvVar3 = memset(pvVar3,0,__n);
return pvVar3;
}
}
}
return pvVar3;
}
| |
50,863 | mi_ft_add | eloqsql/storage/myisam/ft_update.c | int _mi_ft_add(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record,
my_off_t pos)
{
int error= -1;
FT_WORD *wlist;
DBUG_ENTER("_mi_ft_add");
DBUG_PRINT("enter",("keynr: %d",keynr));
if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot)))
error=_mi_ft_store(info,keynr,keybuf,wlist,pos);
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O0 | c | mi_ft_add:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0x60374
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x90, %rcx
callq 0x5fca0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x603b4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x602c0
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x90, %rdi
movl $0x2, %esi
callq 0x7b540
jmp 0x603cb
jmp 0x603cd
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _mi_ft_add:
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_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], 0FFFFFFFFh
jmp short $+2
loc_60374:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 90h
call _mi_ft_parserecord
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_603B4
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_38]
mov r8, [rbp+var_28]
call _mi_ft_store
mov [rbp+var_2C], eax
loc_603B4:
mov rdi, [rbp+var_8]
add rdi, 90h
mov esi, 2
call free_root
jmp short $+2
loc_603CB:
jmp short $+2
loc_603CD:
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
| long long mi_ft_add(_QWORD *a1, unsigned int a2, _BYTE *a3, long long a4, long long a5)
{
_QWORD *v6; // [rsp+8h] [rbp-38h]
unsigned int v7; // [rsp+14h] [rbp-2Ch]
v7 = -1;
v6 = (_QWORD *)mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18));
if ( v6 )
v7 = mi_ft_store((long long)a1, a2, a3, v6, a5);
free_root(a1 + 18, 2LL);
return v7;
}
| _mi_ft_add:
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 qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],0xffffffff
JMP 0x00160374
LAB_00160374:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x90
CALL 0x0015fca0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001603b4
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x001602c0
MOV dword ptr [RBP + -0x2c],EAX
LAB_001603b4:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x90
MOV ESI,0x2
CALL 0x0017b540
JMP 0x001603cb
LAB_001603cb:
JMP 0x001603cd
LAB_001603cd:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
int4
_mi_ft_add(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5)
{
long lVar1;
int4 local_34;
local_34 = 0xffffffff;
lVar1 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90);
if (lVar1 != 0) {
local_34 = _mi_ft_store(param_1,param_2,param_3,lVar1,param_5);
}
free_root(param_1 + 0x90,2);
return local_34;
}
| |
50,864 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O3 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x9207d(%rip), %rax # 0x129b40
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x97ad8
callq 0x6d1fe
leaq 0x91819(%rip), %rax # 0x1292f8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x97af5
popq %rbx
jmp 0x6d1fe
popq %rbx
retq
nop
| _ZN5minja15IfTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_97AD8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97AD8:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_97AF5
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97AF5:
pop rbx
retn
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x229b40]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00197ad8
CALL 0x0016d1fe
LAB_00197ad8:
LEA RAX,[0x2292f8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00197af5
POP RBX
JMP 0x0016d1fe
LAB_00197af5:
POP RBX
RET
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_00229b50;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_00229308;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
| |
50,865 | find_type_with_warning | eloqsql/mysys/typelib.c | int find_type_with_warning(const char *x, TYPELIB *typelib, const char *option)
{
int res;
const char **ptr;
if ((res= find_type((char *) x, typelib, FIND_TYPE_BASIC)) <= 0)
{
ptr= typelib->type_names;
if (!*x)
fprintf(stderr, "No option given to %s\n", option);
else
fprintf(stderr, "Unknown option to %s: %s\n", option, x);
fprintf(stderr, "Alternatives are: '%s'", *ptr);
while (*++ptr)
fprintf(stderr, ",'%s'", *ptr);
fprintf(stderr, "\n");
}
return res;
} | O0 | c | find_type_with_warning:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x8e5a0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jg 0x8e590
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x8e502
movq 0x1b6af5(%rip), %rax # 0x244fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x55534(%rip), %rsi # 0xe3a2d
movb $0x0, %al
callq 0x381d0
jmp 0x8e522
movq 0x1b6ad7(%rip), %rax # 0x244fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0x55529(%rip), %rsi # 0xe3a44
movb $0x0, %al
callq 0x381d0
movq 0x1b6ab7(%rip), %rax # 0x244fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x55524(%rip), %rsi # 0xe3a5e
movb $0x0, %al
callq 0x381d0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x8e578
movq 0x1b6a82(%rip), %rax # 0x244fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x55506(%rip), %rsi # 0xe3a75
movb $0x0, %al
callq 0x381d0
jmp 0x8e541
movq 0x1b6a61(%rip), %rax # 0x244fe0
movq (%rax), %rdi
leaq 0x4d82d(%rip), %rsi # 0xdbdb6
movb $0x0, %al
callq 0x381d0
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| find_type_with_warning:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
xor edx, edx
call find_type
mov [rbp+var_1C], eax
cmp eax, 0
jg loc_8E590
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jnz short loc_8E502
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_18]
lea rsi, aNoOptionGivenT; "No option given to %s\n"
mov al, 0
call _fprintf
jmp short loc_8E522
loc_8E502:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_8]
lea rsi, aUnknownOptionT; "Unknown option to %s: %s\n"
mov al, 0
call _fprintf
loc_8E522:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rax, [rbp+var_28]
mov rdx, [rax]
lea rsi, aAlternativesAr; "Alternatives are: '%s'"
mov al, 0
call _fprintf
loc_8E541:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 8
mov [rbp+var_28], rcx
cmp qword ptr [rax+8], 0
jz short loc_8E578
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rax, [rbp+var_28]
mov rdx, [rax]
lea rsi, aS_4; ",'%s'"
mov al, 0
call _fprintf
jmp short loc_8E541
loc_8E578:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aPositionToStar_0+62h; "\n"
mov al, 0
call _fprintf
loc_8E590:
mov eax, [rbp+var_1C]
add rsp, 30h
pop rbp
retn
| long long find_type_with_warning(const char *a1, long long a2, const char *a3)
{
const char **v3; // rax
const char **v5; // [rsp+8h] [rbp-28h]
int type; // [rsp+14h] [rbp-1Ch]
type = find_type(a1, a2, 0LL);
if ( type <= 0 )
{
v5 = *(const char ***)(a2 + 16);
if ( *a1 )
fprintf(stderr, "Unknown option to %s: %s\n", a3, a1);
else
fprintf(stderr, "No option given to %s\n", a3);
fprintf(stderr, "Alternatives are: '%s'", *v5);
while ( 1 )
{
v3 = v5++;
if ( !v3[1] )
break;
fprintf(stderr, ",'%s'", *v5);
}
fprintf(stderr, "\n");
}
return (unsigned int)type;
}
| find_type_with_warning:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
XOR EDX,EDX
CALL 0x0018e5a0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JG 0x0018e590
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JNZ 0x0018e502
MOV RAX,qword ptr [0x00344fe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e3a2d]
MOV AL,0x0
CALL 0x001381d0
JMP 0x0018e522
LAB_0018e502:
MOV RAX,qword ptr [0x00344fe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
LEA RSI,[0x1e3a44]
MOV AL,0x0
CALL 0x001381d0
LAB_0018e522:
MOV RAX,qword ptr [0x00344fe0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1e3a5e]
MOV AL,0x0
CALL 0x001381d0
LAB_0018e541:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0x28],RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0018e578
MOV RAX,qword ptr [0x00344fe0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1e3a75]
MOV AL,0x0
CALL 0x001381d0
JMP 0x0018e541
LAB_0018e578:
MOV RAX,qword ptr [0x00344fe0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1dbdb6]
MOV AL,0x0
CALL 0x001381d0
LAB_0018e590:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x30
POP RBP
RET
|
int find_type_with_warning(char *param_1,long param_2,int8 param_3)
{
int iVar1;
int8 *local_30;
iVar1 = find_type(param_1,param_2,0);
if (iVar1 < 1) {
local_30 = *(int8 **)(param_2 + 0x10);
if (*param_1 == '\0') {
fprintf(*(FILE **)PTR_stderr_00344fe0,"No option given to %s\n",param_3);
}
else {
fprintf(*(FILE **)PTR_stderr_00344fe0,"Unknown option to %s: %s\n",param_3,param_1);
}
fprintf(*(FILE **)PTR_stderr_00344fe0,"Alternatives are: \'%s\'",*local_30);
while( true ) {
if (local_30[1] == 0) break;
fprintf(*(FILE **)PTR_stderr_00344fe0,",\'%s\'",local_30[1]);
local_30 = local_30 + 1;
}
fprintf(*(FILE **)PTR_stderr_00344fe0,"\n");
}
return iVar1;
}
| |
50,866 | MNN::CreateIDSTQuan(flatbuffers::FlatBufferBuilder&, MNN::IDSTQuanT const*, std::__1::function<unsigned long (void*)> const*) | mnn-tts/MNN/schema/current/CaffeOp_generated.h | inline flatbuffers::Offset<IDSTQuan> CreateIDSTQuan(flatbuffers::FlatBufferBuilder &_fbb, const IDSTQuanT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
(void)_rehasher;
(void)_o;
struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const IDSTQuanT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
auto _buffer = _o->buffer.size() ? _fbb.CreateVector(_o->buffer) : 0;
auto _alpha = _o->alpha.size() ? _fbb.CreateVector(_o->alpha) : 0;
auto _type = _o->type;
auto _useInt32 = _o->useInt32;
auto _quantScale = _o->quantScale;
auto _scaleIn = _o->scaleIn;
auto _scaleOut = _o->scaleOut;
auto _aMax = _o->aMax;
auto _aMin = _o->aMin;
auto _readType = _o->readType;
auto _has_scaleInt = _o->has_scaleInt;
auto _shapeInt32 = _o->shapeInt32;
auto _weightSize = _o->weightSize;
auto _index = _o->index.size() ? _fbb.CreateVector(_o->index) : 0;
return MNN::CreateIDSTQuan(
_fbb,
_buffer,
_alpha,
_type,
_useInt32,
_quantScale,
_scaleIn,
_scaleOut,
_aMax,
_aMin,
_readType,
_has_scaleInt,
_shapeInt32,
_weightSize,
_index);
} | O0 | c | MNN::CreateIDSTQuan(flatbuffers::FlatBufferBuilder&, MNN::IDSTQuanT const*, std::__1::function<unsigned long (void*)> const*):
pushq %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x98(%rsp), %rdi
callq 0xd360
cmpq $0x0, %rax
je 0x4994e
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x3b460
movl %eax, 0x74(%rsp)
jmp 0x4995a
leaq 0x74(%rsp), %rdi
xorl %esi, %esi
callq 0x3b4b0
movq 0x98(%rsp), %rdi
addq $0x18, %rdi
callq 0xea20
cmpq $0x0, %rax
je 0x49990
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
addq $0x18, %rsi
callq 0x3b540
movl %eax, 0x70(%rsp)
jmp 0x4999c
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x3b590
movq 0x98(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x6c(%rsp)
movq 0x98(%rsp), %rax
movb 0x34(%rax), %al
andb $0x1, %al
movb %al, 0x6b(%rsp)
movq 0x98(%rsp), %rax
movss 0x38(%rax), %xmm0
movss %xmm0, 0x64(%rsp)
movq 0x98(%rsp), %rax
movss 0x3c(%rax), %xmm0
movss %xmm0, 0x60(%rsp)
movq 0x98(%rsp), %rax
movss 0x40(%rax), %xmm0
movss %xmm0, 0x5c(%rsp)
movq 0x98(%rsp), %rax
movl 0x44(%rax), %eax
movl %eax, 0x58(%rsp)
movq 0x98(%rsp), %rax
movl 0x48(%rax), %eax
movl %eax, 0x54(%rsp)
movq 0x98(%rsp), %rax
movl 0x4c(%rax), %eax
movl %eax, 0x50(%rsp)
movq 0x98(%rsp), %rax
movb 0x50(%rax), %al
andb $0x1, %al
movb %al, 0x4f(%rsp)
movq 0x98(%rsp), %rax
movb 0x51(%rax), %al
andb $0x1, %al
movb %al, 0x4e(%rsp)
movq 0x98(%rsp), %rax
movl 0x54(%rax), %eax
movl %eax, 0x48(%rsp)
movq 0x98(%rsp), %rdi
addq $0x58, %rdi
callq 0x19030
cmpq $0x0, %rax
je 0x49a89
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
addq $0x58, %rsi
callq 0x4a3c0
movl %eax, 0x44(%rsp)
jmp 0x49a95
leaq 0x44(%rsp), %rdi
xorl %esi, %esi
callq 0x4a410
movq 0xa0(%rsp), %rdi
movl 0x74(%rsp), %eax
movl %eax, 0x40(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x6c(%rsp), %ecx
movb 0x6b(%rsp), %r8b
movss 0x64(%rsp), %xmm0
movss 0x60(%rsp), %xmm1
movss 0x5c(%rsp), %xmm2
movl 0x58(%rsp), %r9d
movl 0x54(%rsp), %r14d
movl 0x50(%rsp), %ebp
movb 0x4f(%rsp), %bl
movb 0x4e(%rsp), %r11b
movl 0x48(%rsp), %r10d
movl 0x44(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x40(%rsp), %esi
movl 0x3c(%rsp), %edx
movl 0x38(%rsp), %eax
andb $0x1, %r8b
andb $0x1, %bl
andb $0x1, %r11b
movzbl %r8b, %r8d
movl %r14d, (%rsp)
movl %ebp, 0x8(%rsp)
movzbl %bl, %ebx
movl %ebx, 0x10(%rsp)
movzbl %r11b, %r11d
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0x4a430
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw (%rax,%rax)
| _ZN3MNN14CreateIDSTQuanERN11flatbuffers17FlatBufferBuilderEPKNS_9IDSTQuanTEPKNSt3__18functionIFmPvEEE:
push rbp
push r14
push rbx
sub rsp, 0B0h
mov [rsp+0C8h+var_28], rdi
mov [rsp+0C8h+var_30], rsi
mov [rsp+0C8h+var_38], rdx
mov rax, [rsp+0C8h+var_28]
mov [rsp+0C8h+var_50], rax
mov rax, [rsp+0C8h+var_30]
mov [rsp+0C8h+var_48], rax
mov rax, [rsp+0C8h+var_38]
mov [rsp+0C8h+var_40], rax
mov rdi, [rsp+0C8h+var_30]
call _ZNKSt3__16vectorIaNS_9allocatorIaEEE4sizeB8nn200100Ev; std::vector<signed char>::size(void)
cmp rax, 0
jz short loc_4994E
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_30]
call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorIaEENS_6OffsetINS_6VectorIT_EEEERKNSt3__16vectorIS4_NS7_9allocatorIS4_EEEE; flatbuffers::FlatBufferBuilder::CreateVector<signed char>(std::vector<signed char> const&)
mov [rsp+0C8h+var_54], eax
jmp short loc_4995A
loc_4994E:
lea rdi, [rsp+0C8h+var_54]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6VectorIaEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<signed char>>::Offset(uint)
loc_4995A:
mov rdi, [rsp+0C8h+var_30]
add rdi, 18h
call _ZNKSt3__16vectorIfNS_9allocatorIfEEE4sizeB8nn200100Ev; std::vector<float>::size(void)
cmp rax, 0
jz short loc_49990
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_30]
add rsi, 18h
call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorIfEENS_6OffsetINS_6VectorIT_EEEERKNSt3__16vectorIS4_NS7_9allocatorIS4_EEEE; flatbuffers::FlatBufferBuilder::CreateVector<float>(std::vector<float> const&)
mov [rsp+0C8h+var_58], eax
jmp short loc_4999C
loc_49990:
lea rdi, [rsp+0C8h+var_58]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6VectorIfEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<float>>::Offset(uint)
loc_4999C:
mov rax, [rsp+0C8h+var_30]
mov eax, [rax+30h]
mov [rsp+0C8h+var_5C], eax
mov rax, [rsp+0C8h+var_30]
mov al, [rax+34h]
and al, 1
mov [rsp+0C8h+var_5D], al
mov rax, [rsp+0C8h+var_30]
movss xmm0, dword ptr [rax+38h]
movss [rsp+0C8h+var_64], xmm0
mov rax, [rsp+0C8h+var_30]
movss xmm0, dword ptr [rax+3Ch]
movss [rsp+0C8h+var_68], xmm0
mov rax, [rsp+0C8h+var_30]
movss xmm0, dword ptr [rax+40h]
movss [rsp+0C8h+var_6C], xmm0
mov rax, [rsp+0C8h+var_30]
mov eax, [rax+44h]
mov [rsp+0C8h+var_70], eax
mov rax, [rsp+0C8h+var_30]
mov eax, [rax+48h]
mov [rsp+0C8h+var_74], eax
mov rax, [rsp+0C8h+var_30]
mov eax, [rax+4Ch]
mov [rsp+0C8h+var_78], eax
mov rax, [rsp+0C8h+var_30]
mov al, [rax+50h]
and al, 1
mov [rsp+0C8h+var_79], al
mov rax, [rsp+0C8h+var_30]
mov al, [rax+51h]
and al, 1
mov [rsp+0C8h+var_7A], al
mov rax, [rsp+0C8h+var_30]
mov eax, [rax+54h]
mov [rsp+0C8h+var_80], eax
mov rdi, [rsp+0C8h+var_30]
add rdi, 58h ; 'X'
call _ZNKSt3__16vectorIjNS_9allocatorIjEEE4sizeB8nn200100Ev; std::vector<uint>::size(void)
cmp rax, 0
jz short loc_49A89
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_30]
add rsi, 58h ; 'X'
call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorIjEENS_6OffsetINS_6VectorIT_EEEERKNSt3__16vectorIS4_NS7_9allocatorIS4_EEEE; flatbuffers::FlatBufferBuilder::CreateVector<uint>(std::vector<uint> const&)
mov [rsp+0C8h+var_84], eax
jmp short loc_49A95
loc_49A89:
lea rdi, [rsp+0C8h+var_84]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6VectorIjEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<uint>>::Offset(uint)
loc_49A95:
mov rdi, [rsp+0C8h+var_28]
mov eax, [rsp+0C8h+var_54]
mov [rsp+0C8h+var_88], eax
mov eax, [rsp+0C8h+var_58]
mov [rsp+0C8h+var_8C], eax
mov ecx, [rsp+0C8h+var_5C]
mov r8b, [rsp+0C8h+var_5D]
movss xmm0, [rsp+0C8h+var_64]
movss xmm1, [rsp+0C8h+var_68]
movss xmm2, [rsp+0C8h+var_6C]
mov r9d, [rsp+0C8h+var_70]
mov r14d, [rsp+0C8h+var_74]
mov ebp, [rsp+0C8h+var_78]
mov bl, [rsp+0C8h+var_79]
mov r11b, [rsp+0C8h+var_7A]
mov r10d, [rsp+0C8h+var_80]
mov eax, [rsp+0C8h+var_84]
mov [rsp+0C8h+var_90], eax
mov esi, [rsp+0C8h+var_88]
mov edx, [rsp+0C8h+var_8C]
mov eax, [rsp+0C8h+var_90]
and r8b, 1
and bl, 1
and r11b, 1
movzx r8d, r8b
mov [rsp+0C8h+var_C8], r14d
mov [rsp+0C8h+var_C0], ebp
movzx ebx, bl
mov [rsp+0C8h+var_B8], ebx
movzx r11d, r11b
mov [rsp+0C8h+var_B0], r11d
mov [rsp+0C8h+var_A8], r10d
mov [rsp+0C8h+var_A0], eax
call _ZN3MNN14CreateIDSTQuanERN11flatbuffers17FlatBufferBuilderENS0_6OffsetINS0_6VectorIaEEEENS3_INS4_IfEEEEibfffiiibbjNS3_INS4_IjEEEE; MNN::CreateIDSTQuan(flatbuffers::FlatBufferBuilder &,flatbuffers::Offset<flatbuffers::Vector<signed char>>,flatbuffers::Offset<flatbuffers::Vector<float>>,int,bool,float,float,float,int,int,int,bool,bool,uint,flatbuffers::Offset<flatbuffers::Vector<uint>>)
mov [rsp+0C8h+var_1C], eax
mov eax, [rsp+0C8h+var_1C]
add rsp, 0B0h
pop rbx
pop r14
pop rbp
retn
| long long MNN::CreateIDSTQuan(long long a1, _QWORD *a2, long long a3)
{
int v4; // [rsp+44h] [rbp-84h] BYREF
unsigned int v5; // [rsp+48h] [rbp-80h]
char v6; // [rsp+4Eh] [rbp-7Ah]
char v7; // [rsp+4Fh] [rbp-79h]
int v8; // [rsp+50h] [rbp-78h]
int v9; // [rsp+54h] [rbp-74h]
int v10; // [rsp+58h] [rbp-70h]
int v11; // [rsp+5Ch] [rbp-6Ch]
int v12; // [rsp+60h] [rbp-68h]
int v13; // [rsp+64h] [rbp-64h]
char v14; // [rsp+6Bh] [rbp-5Dh]
int v15; // [rsp+6Ch] [rbp-5Ch]
int v16; // [rsp+70h] [rbp-58h] BYREF
int v17; // [rsp+74h] [rbp-54h] BYREF
long long v18; // [rsp+78h] [rbp-50h]
_QWORD *v19; // [rsp+80h] [rbp-48h]
long long v20; // [rsp+88h] [rbp-40h]
long long v21; // [rsp+90h] [rbp-38h]
_QWORD *v22; // [rsp+98h] [rbp-30h]
long long v23; // [rsp+A0h] [rbp-28h]
v23 = a1;
v22 = a2;
v21 = a3;
v18 = a1;
v19 = a2;
v20 = a3;
if ( std::vector<signed char>::size[abi:nn200100](a2) )
v17 = flatbuffers::FlatBufferBuilder::CreateVector<signed char>(v23, v22);
else
flatbuffers::Offset<flatbuffers::Vector<signed char>>::Offset(&v17, 0);
if ( std::vector<float>::size[abi:nn200100](v22 + 3) )
v16 = flatbuffers::FlatBufferBuilder::CreateVector<float>(v23, v22 + 3);
else
flatbuffers::Offset<flatbuffers::Vector<float>>::Offset(&v16, 0);
v15 = *((_DWORD *)v22 + 12);
v14 = *((_BYTE *)v22 + 52) & 1;
v13 = *((_DWORD *)v22 + 14);
v12 = *((_DWORD *)v22 + 15);
v11 = *((_DWORD *)v22 + 16);
v10 = *((_DWORD *)v22 + 17);
v9 = *((_DWORD *)v22 + 18);
v8 = *((_DWORD *)v22 + 19);
v7 = v22[10] & 1;
v6 = *((_BYTE *)v22 + 81) & 1;
v5 = *((_DWORD *)v22 + 21);
if ( std::vector<unsigned int>::size[abi:nn200100](v22 + 11) )
v4 = flatbuffers::FlatBufferBuilder::CreateVector<unsigned int>(v23, v22 + 11);
else
flatbuffers::Offset<flatbuffers::Vector<unsigned int>>::Offset(&v4, 0LL);
return (unsigned int)MNN::CreateIDSTQuan(v23, v17, v16, v15, v14 & 1, v10, v9, v8, v7 & 1, v6 & 1, v5, v4);
}
| CreateIDSTQuan:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0xb0
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x0010d360
CMP RAX,0x0
JZ 0x0014994e
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x0013b460
MOV dword ptr [RSP + 0x74],EAX
JMP 0x0014995a
LAB_0014994e:
LEA RDI,[RSP + 0x74]
XOR ESI,ESI
CALL 0x0013b4b0
LAB_0014995a:
MOV RDI,qword ptr [RSP + 0x98]
ADD RDI,0x18
CALL 0x0010ea20
CMP RAX,0x0
JZ 0x00149990
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
ADD RSI,0x18
CALL 0x0013b540
MOV dword ptr [RSP + 0x70],EAX
JMP 0x0014999c
LAB_00149990:
LEA RDI,[RSP + 0x70]
XOR ESI,ESI
CALL 0x0013b590
LAB_0014999c:
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RSP + 0x6c],EAX
MOV RAX,qword ptr [RSP + 0x98]
MOV AL,byte ptr [RAX + 0x34]
AND AL,0x1
MOV byte ptr [RSP + 0x6b],AL
MOV RAX,qword ptr [RSP + 0x98]
MOVSS XMM0,dword ptr [RAX + 0x38]
MOVSS dword ptr [RSP + 0x64],XMM0
MOV RAX,qword ptr [RSP + 0x98]
MOVSS XMM0,dword ptr [RAX + 0x3c]
MOVSS dword ptr [RSP + 0x60],XMM0
MOV RAX,qword ptr [RSP + 0x98]
MOVSS XMM0,dword ptr [RAX + 0x40]
MOVSS dword ptr [RSP + 0x5c],XMM0
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x44]
MOV dword ptr [RSP + 0x58],EAX
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x48]
MOV dword ptr [RSP + 0x54],EAX
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x4c]
MOV dword ptr [RSP + 0x50],EAX
MOV RAX,qword ptr [RSP + 0x98]
MOV AL,byte ptr [RAX + 0x50]
AND AL,0x1
MOV byte ptr [RSP + 0x4f],AL
MOV RAX,qword ptr [RSP + 0x98]
MOV AL,byte ptr [RAX + 0x51]
AND AL,0x1
MOV byte ptr [RSP + 0x4e],AL
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x54]
MOV dword ptr [RSP + 0x48],EAX
MOV RDI,qword ptr [RSP + 0x98]
ADD RDI,0x58
CALL 0x00119030
CMP RAX,0x0
JZ 0x00149a89
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
ADD RSI,0x58
CALL 0x0014a3c0
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00149a95
LAB_00149a89:
LEA RDI,[RSP + 0x44]
XOR ESI,ESI
CALL 0x0014a410
LAB_00149a95:
MOV RDI,qword ptr [RSP + 0xa0]
MOV EAX,dword ptr [RSP + 0x74]
MOV dword ptr [RSP + 0x40],EAX
MOV EAX,dword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x3c],EAX
MOV ECX,dword ptr [RSP + 0x6c]
MOV R8B,byte ptr [RSP + 0x6b]
MOVSS XMM0,dword ptr [RSP + 0x64]
MOVSS XMM1,dword ptr [RSP + 0x60]
MOVSS XMM2,dword ptr [RSP + 0x5c]
MOV R9D,dword ptr [RSP + 0x58]
MOV R14D,dword ptr [RSP + 0x54]
MOV EBP,dword ptr [RSP + 0x50]
MOV BL,byte ptr [RSP + 0x4f]
MOV R11B,byte ptr [RSP + 0x4e]
MOV R10D,dword ptr [RSP + 0x48]
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0x38],EAX
MOV ESI,dword ptr [RSP + 0x40]
MOV EDX,dword ptr [RSP + 0x3c]
MOV EAX,dword ptr [RSP + 0x38]
AND R8B,0x1
AND BL,0x1
AND R11B,0x1
MOVZX R8D,R8B
MOV dword ptr [RSP],R14D
MOV dword ptr [RSP + 0x8],EBP
MOVZX EBX,BL
MOV dword ptr [RSP + 0x10],EBX
MOVZX R11D,R11B
MOV dword ptr [RSP + 0x18],R11D
MOV dword ptr [RSP + 0x20],R10D
MOV dword ptr [RSP + 0x28],EAX
CALL 0x0014a430
MOV dword ptr [RSP + 0xac],EAX
MOV EAX,dword ptr [RSP + 0xac]
ADD RSP,0xb0
POP RBX
POP R14
POP RBP
RET
|
/* MNN::CreateIDSTQuan(flatbuffers::FlatBufferBuilder&, MNN::IDSTQuanT const*,
std::function<unsigned long (void*)> const*) */
int4 MNN::CreateIDSTQuan(FlatBufferBuilder *param_1,IDSTQuanT *param_2,function *param_3)
{
int4 uVar1;
long lVar2;
int4 local_84;
int4 local_80;
byte local_7a;
byte local_79;
int4 local_78;
int4 local_74;
int4 local_70;
int4 local_6c;
int4 local_68;
int4 local_64;
byte local_5d;
int4 local_5c;
int4 local_58;
int4 local_54;
FlatBufferBuilder *local_50;
IDSTQuanT *local_48;
function *local_40;
function *local_38;
vector *local_30;
FlatBufferBuilder *local_28;
local_50 = param_1;
local_48 = param_2;
local_40 = param_3;
local_38 = param_3;
local_30 = (vector *)param_2;
local_28 = param_1;
lVar2 = std::vector<signed_char,std::allocator<signed_char>>::size_abi_nn200100_
((vector<signed_char,std::allocator<signed_char>> *)param_2);
if (lVar2 == 0) {
flatbuffers::Offset<flatbuffers::Vector<signed_char>>::Offset
((Offset<flatbuffers::Vector<signed_char>> *)&local_54,0);
}
else {
local_54 = flatbuffers::FlatBufferBuilder::CreateVector<signed_char>(local_28,local_30);
}
lVar2 = std::vector<float,std::allocator<float>>::size_abi_nn200100_
((vector<float,std::allocator<float>> *)(local_30 + 0x18));
if (lVar2 == 0) {
flatbuffers::Offset<flatbuffers::Vector<float>>::Offset
((Offset<flatbuffers::Vector<float>> *)&local_58,0);
}
else {
local_58 = flatbuffers::FlatBufferBuilder::CreateVector<float>(local_28,local_30 + 0x18);
}
local_5c = *(int4 *)(local_30 + 0x30);
local_5d = (byte)local_30[0x34] & 1;
local_64 = *(int4 *)(local_30 + 0x38);
local_68 = *(int4 *)(local_30 + 0x3c);
local_6c = *(int4 *)(local_30 + 0x40);
local_70 = *(int4 *)(local_30 + 0x44);
local_74 = *(int4 *)(local_30 + 0x48);
local_78 = *(int4 *)(local_30 + 0x4c);
local_79 = (byte)local_30[0x50] & 1;
local_7a = (byte)local_30[0x51] & 1;
local_80 = *(int4 *)(local_30 + 0x54);
lVar2 = std::vector<unsigned_int,std::allocator<unsigned_int>>::size_abi_nn200100_
((vector<unsigned_int,std::allocator<unsigned_int>> *)(local_30 + 0x58));
if (lVar2 == 0) {
flatbuffers::Offset<flatbuffers::Vector<unsigned_int>>::Offset
((Offset<flatbuffers::Vector<unsigned_int>> *)&local_84,0);
}
else {
local_84 = flatbuffers::FlatBufferBuilder::CreateVector<unsigned_int>(local_28,local_30 + 0x58);
}
uVar1 = CreateIDSTQuan(local_64,local_68,local_6c,local_28,local_54,local_58,local_5c,local_5d & 1
,local_70,local_74,local_78,local_79 & 1,local_7a & 1,local_80,local_84);
return uVar1;
}
| |
50,867 | seek_io_cache | eloqsql/mysys/mf_iocache.c | void seek_io_cache(IO_CACHE *cache, my_off_t needed_offset)
{
my_off_t cached_data_start= cache->pos_in_file;
my_off_t cached_data_end= cache->pos_in_file + (cache->read_end -
cache->buffer);
if (needed_offset >= cached_data_start &&
needed_offset < cached_data_end)
{
/*
The offset we're seeking to is in the buffer.
Move buffer's read position accordingly
*/
cache->read_pos= cache->buffer + (needed_offset - cached_data_start);
}
else
{
if (needed_offset > cache->end_of_file)
needed_offset= cache->end_of_file;
/*
The offset we're seeking to is not in the buffer.
- Set the buffer to be exhausted.
- Make the next read to a mysql_file_seek() call to the required
offset.
TODO(cvicentiu, spetrunia) properly implement aligned seeks for
efficiency.
*/
cache->seek_not_done= 1;
cache->pos_in_file= needed_offset;
/* When reading it must appear as if we've started from the offset
that we've seeked here. We must let _my_b_cache_read assume that
by implying "no reading starting from pos_in_file" has happened. */
cache->read_pos= cache->buffer;
cache->read_end= cache->buffer;
}
} | O3 | c | seek_io_cache:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movq 0x20(%rdi), %rax
movq %rsi, %rcx
subq %rdx, %rcx
jb 0xb0bea
subq %rax, %rdx
addq 0x18(%rdi), %rdx
cmpq %rsi, %rdx
jbe 0xb0bea
addq %rcx, %rax
movq %rax, 0x10(%rdi)
jmp 0xb0c0a
movq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
cmovbq %rcx, %rsi
movl $0x1, 0xe0(%rdi)
movq %rsi, (%rdi)
movq %rax, 0x10(%rdi)
movq %rax, 0x18(%rdi)
popq %rbp
retq
| seek_io_cache:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov rax, [rdi+20h]
mov rcx, rsi
sub rcx, rdx
jb short loc_B0BEA
sub rdx, rax
add rdx, [rdi+18h]
cmp rdx, rsi
jbe short loc_B0BEA
add rax, rcx
mov [rdi+10h], rax
jmp short loc_B0C0A
loc_B0BEA:
mov rcx, [rdi+8]
cmp rcx, rsi
cmovb rsi, rcx
mov dword ptr [rdi+0E0h], 1
mov [rdi], rsi
mov [rdi+10h], rax
mov [rdi+18h], rax
loc_B0C0A:
pop rbp
retn
| long long seek_io_cache(long long a1, unsigned long long a2)
{
long long result; // rax
result = *(_QWORD *)(a1 + 32);
if ( a2 < *(_QWORD *)a1 || *(_QWORD *)(a1 + 24) + *(_QWORD *)a1 - result <= a2 )
{
if ( *(_QWORD *)(a1 + 8) < a2 )
a2 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 224) = 1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 16) = result;
*(_QWORD *)(a1 + 24) = result;
}
else
{
result += a2 - *(_QWORD *)a1;
*(_QWORD *)(a1 + 16) = result;
}
return result;
}
| seek_io_cache:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x20]
MOV RCX,RSI
SUB RCX,RDX
JC 0x001b0bea
SUB RDX,RAX
ADD RDX,qword ptr [RDI + 0x18]
CMP RDX,RSI
JBE 0x001b0bea
ADD RAX,RCX
MOV qword ptr [RDI + 0x10],RAX
JMP 0x001b0c0a
LAB_001b0bea:
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RSI
CMOVC RSI,RCX
MOV dword ptr [RDI + 0xe0],0x1
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x10],RAX
MOV qword ptr [RDI + 0x18],RAX
LAB_001b0c0a:
POP RBP
RET
|
void seek_io_cache(ulong *param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
uVar1 = *param_1;
uVar2 = param_1[4];
if ((param_2 < uVar1) || ((uVar1 - uVar2) + param_1[3] <= param_2)) {
if (param_1[1] < param_2) {
param_2 = param_1[1];
}
*(int4 *)(param_1 + 0x1c) = 1;
*param_1 = param_2;
param_1[2] = uVar2;
param_1[3] = uVar2;
}
else {
param_1[2] = uVar2 + (param_2 - uVar1);
}
return;
}
| |
50,868 | nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*) | ng-log[P]ng-log/src/logging.cc | void base::SetLogger(LogSeverity severity, base::Logger* logger) {
std::lock_guard<std::mutex> l{log_mutex};
LogDestination::log_destination(severity)->SetLoggerImpl(logger);
} | O1 | cpp | nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x34d56(%rip), %rdi # 0x41d18
callq 0x77d0
testl %eax, %eax
jne 0xd060
movl %ebp, %eax
leaq 0x25c88(%rip), %rcx # 0x32c60
leaq (%rcx,%rax,8), %r14
cmpq $0x0, (%r14)
jne 0xd01b
movl $0xd0, %edi
callq 0x8fc0
movq %rax, %r15
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xb5dc
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x139e0
movq %r12, %rdi
callq 0x1260c
movq (%r14), %r14
movq 0xc8(%r14), %rdi
cmpq %rbx, %rdi
je 0xd047
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0xd040
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, 0xc8(%r14)
leaq 0x34cca(%rip), %rdi # 0x41d18
callq 0x73c0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7330
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x900c
jmp 0xd07c
movq %rax, %rbx
leaq 0x34c95(%rip), %rdi # 0x41d18
callq 0x73c0
movq %rbx, %rdi
callq 0x7930
| _ZN5nglog4base9SetLoggerENS_11LogSeverityEPNS0_6LoggerE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rsi
mov ebp, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_D060
mov eax, ebp
lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r14, [rcx+rax*8]
cmp qword ptr [r14], 0
jnz short loc_D01B
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax
mov esi, ebp
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r12, [rsp+38h+var_30]
mov qword ptr [r12], 0
mov rdi, r14
mov rsi, r15
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r12
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
loc_D01B:
mov r14, [r14]
mov rdi, [r14+0C8h]
cmp rdi, rbx
jz short loc_D047
test rdi, rdi
setz al
cmp rdi, r14
setz cl
or cl, al
jnz short loc_D040
mov rax, [rdi]
call qword ptr [rax+8]
loc_D040:
mov [r14+0C8h], rbx
loc_D047:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_D060:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r15; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_D07C
mov rbx, rax
loc_D07C:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::base::SetLogger(unsigned int a1, long long a2)
{
int v2; // eax
long long *v3; // r14
long long v4; // r15
long long v5; // r14
long long v6; // rdi
_QWORD v8[6]; // [rsp+8h] [rbp-30h] BYREF
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
v3 = (long long *)((char *)&nglog::LogDestination::log_destinations_ + 8 * a1);
if ( !*v3 )
{
v4 = operator new(208LL);
nglog::LogDestination::LogDestination(v4, a1, 0LL);
v8[0] = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
(char *)&nglog::LogDestination::log_destinations_ + 8 * a1,
v4);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(v8);
}
v5 = *v3;
v6 = *(_QWORD *)(v5 + 200);
if ( v6 != a2 )
{
if ( v6 != 0 && v6 != v5 )
(*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6);
*(_QWORD *)(v5 + 200) = a2;
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogger:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV EBP,EDI
LEA RDI,[0x141d18]
CALL 0x001077d0
TEST EAX,EAX
JNZ 0x0010d060
MOV EAX,EBP
LEA RCX,[0x132c60]
LEA R14,[RCX + RAX*0x8]
CMP qword ptr [R14],0x0
JNZ 0x0010d01b
LAB_0010cfe2:
MOV EDI,0xd0
CALL 0x00108fc0
LAB_0010cfec:
MOV R15,RAX
MOV RDI,RAX
MOV ESI,EBP
XOR EDX,EDX
CALL 0x0010b5dc
LAB_0010cffb:
LEA R12,[RSP + 0x8]
MOV qword ptr [R12],0x0
MOV RDI,R14
MOV RSI,R15
CALL 0x001139e0
MOV RDI,R12
CALL 0x0011260c
LAB_0010d01b:
MOV R14,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0xc8]
CMP RDI,RBX
JZ 0x0010d047
TEST RDI,RDI
SETZ AL
CMP RDI,R14
SETZ CL
OR CL,AL
JNZ 0x0010d040
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010d040:
MOV qword ptr [R14 + 0xc8],RBX
LAB_0010d047:
LEA RDI,[0x141d18]
CALL 0x001073c0
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0010d060:
MOV EDI,EAX
CALL 0x00107330
|
/* nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*) */
void nglog::base::SetLogger(uint param_1,long *param_2)
{
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
long *plVar1;
long *plVar2;
int iVar3;
LogDestination *pLVar4;
int8 local_30;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar3 == 0) {
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&LogDestination::log_destinations_ + param_1);
if (*(long *)this == 0) {
/* try { // try from 0010cfe2 to 0010cfeb has its CatchHandler @ 0010d079 */
pLVar4 = (LogDestination *)operator_new(0xd0);
/* try { // try from 0010cfec to 0010cffa has its CatchHandler @ 0010d067 */
LogDestination::LogDestination(pLVar4,param_1,0);
local_30 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
(this,pLVar4);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr
((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_30);
}
plVar1 = *(long **)this;
plVar2 = (long *)plVar1[0x19];
if (plVar2 != param_2) {
if (plVar2 != plVar1 && plVar2 != (long *)0x0) {
(**(code **)(*plVar2 + 8))();
}
plVar1[0x19] = (long)param_2;
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
| |
50,869 | nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*) | ng-log[P]ng-log/src/logging.cc | void base::SetLogger(LogSeverity severity, base::Logger* logger) {
std::lock_guard<std::mutex> l{log_mutex};
LogDestination::log_destination(severity)->SetLoggerImpl(logger);
} | O3 | cpp | nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x35036(%rip), %rdi # 0x41d18
callq 0x77d0
testl %eax, %eax
jne 0xcd84
movl %ebp, %r15d
leaq 0x25f67(%rip), %r12 # 0x32c60
movq (%r12,%r15,8), %r14
testq %r14, %r14
jne 0xcd42
movl $0xd0, %edi
callq 0x8e90
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xb300
leaq (%r12,%r15,8), %r15
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movq %r15, %rdi
movq %r14, %rsi
callq 0x135f6
movq %r12, %rdi
callq 0x12210
movq (%r15), %r14
movq 0xc8(%r14), %rdi
cmpq %rbx, %rdi
je 0xcd6b
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0xcd64
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, 0xc8(%r14)
leaq 0x34fa6(%rip), %rdi # 0x41d18
callq 0x73c0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7330
movq %rax, %rbx
movl $0xd0, %esi
movq %r14, %rdi
callq 0x8edc
jmp 0xcda0
movq %rax, %rbx
leaq 0x34f71(%rip), %rdi # 0x41d18
callq 0x73c0
movq %rbx, %rdi
callq 0x7930
| _ZN5nglog4base9SetLoggerENS_11LogSeverityEPNS0_6LoggerE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rsi
mov ebp, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_CD84
mov r15d, ebp
lea r12, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
mov r14, [r12+r15*8]
test r14, r14
jnz short loc_CD42
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax
mov esi, ebp
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r15, [r12+r15*8]
lea r12, [rsp+38h+var_30]
mov qword ptr [r12], 0
mov rdi, r15
mov rsi, r14
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r12
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
mov r14, [r15]
loc_CD42:
mov rdi, [r14+0C8h]
cmp rdi, rbx
jz short loc_CD6B
test rdi, rdi
setz al
cmp rdi, r14
setz cl
or cl, al
jnz short loc_CD64
mov rax, [rdi]
call qword ptr [rax+8]
loc_CD64:
mov [r14+0C8h], rbx
loc_CD6B:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_CD84:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r14; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_CDA0
mov rbx, rax
loc_CDA0:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::base::SetLogger(int a1, long long a2)
{
int v2; // eax
long long v3; // r14
long long v4; // r14
long long v5; // rdi
_QWORD v7[6]; // [rsp+8h] [rbp-30h] BYREF
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
v3 = nglog::LogDestination::log_destinations_[a1];
if ( !v3 )
{
v4 = operator new(208LL);
nglog::LogDestination::LogDestination(v4, a1, 0LL);
v7[0] = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
&nglog::LogDestination::log_destinations_[a1],
v4);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(v7);
v3 = nglog::LogDestination::log_destinations_[a1];
}
v5 = *(_QWORD *)(v3 + 200);
if ( v5 != a2 )
{
if ( v5 != 0 && v5 != v3 )
(*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5);
*(_QWORD *)(v3 + 200) = a2;
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogger:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV EBP,EDI
LEA RDI,[0x141d18]
CALL 0x001077d0
TEST EAX,EAX
JNZ 0x0010cd84
MOV R15D,EBP
LEA R12,[0x132c60]
MOV R14,qword ptr [R12 + R15*0x8]
TEST R14,R14
JNZ 0x0010cd42
LAB_0010cd02:
MOV EDI,0xd0
CALL 0x00108e90
LAB_0010cd0c:
MOV R14,RAX
MOV RDI,RAX
MOV ESI,EBP
XOR EDX,EDX
CALL 0x0010b300
LAB_0010cd1b:
LEA R15,[R12 + R15*0x8]
LEA R12,[RSP + 0x8]
MOV qword ptr [R12],0x0
MOV RDI,R15
MOV RSI,R14
CALL 0x001135f6
MOV RDI,R12
CALL 0x00112210
MOV R14,qword ptr [R15]
LAB_0010cd42:
MOV RDI,qword ptr [R14 + 0xc8]
CMP RDI,RBX
JZ 0x0010cd6b
TEST RDI,RDI
SETZ AL
CMP RDI,R14
SETZ CL
OR CL,AL
JNZ 0x0010cd64
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010cd64:
MOV qword ptr [R14 + 0xc8],RBX
LAB_0010cd6b:
LEA RDI,[0x141d18]
CALL 0x001073c0
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0010cd84:
MOV EDI,EAX
CALL 0x00107330
|
/* nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*) */
void nglog::base::SetLogger(uint param_1,long *param_2)
{
long *plVar1;
int iVar2;
LogDestination *pLVar3;
long *plVar4;
int8 local_30;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar2 == 0) {
plVar4 = (long *)(&LogDestination::log_destinations_)[param_1];
if (plVar4 == (long *)0x0) {
/* try { // try from 0010cd02 to 0010cd0b has its CatchHandler @ 0010cd9d */
pLVar3 = (LogDestination *)operator_new(0xd0);
/* try { // try from 0010cd0c to 0010cd1a has its CatchHandler @ 0010cd8b */
LogDestination::LogDestination(pLVar3,param_1,0);
local_30 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>
*)(&LogDestination::log_destinations_ + param_1),pLVar3);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr
((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_30);
plVar4 = *(long **)(&LogDestination::log_destinations_ + param_1);
}
plVar1 = (long *)plVar4[0x19];
if (plVar1 != param_2) {
if (plVar1 != plVar4 && plVar1 != (long *)0x0) {
(**(code **)(*plVar1 + 8))();
}
plVar4[0x19] = (long)param_2;
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
| |
50,870 | Vector3Project | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Vector3 Vector3Project(Vector3 v1, Vector3 v2)
{
Vector3 result = { 0 };
float v1dv2 = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
float v2dv2 = (v2.x*v2.x + v2.y*v2.y + v2.z*v2.z);
float mag = v1dv2/v2dv2;
result.x = v2.x*mag;
result.y = v2.y*mag;
result.z = v2.z*mag;
return result;
} | O0 | c | Vector3Project:
pushq %rbp
movq %rsp, %rbp
movlpd %xmm0, -0x30(%rbp)
movss %xmm1, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movlpd %xmm2, -0x50(%rbp)
movss %xmm3, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movss -0x20(%rbp), %xmm1
movss -0x1c(%rbp), %xmm0
movss -0x40(%rbp), %xmm2
movss -0x3c(%rbp), %xmm3
mulss %xmm3, %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x18(%rbp), %xmm0
movss -0x38(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x40(%rbp), %xmm1
movss -0x3c(%rbp), %xmm0
mulss %xmm0, %xmm0
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
movss -0x38(%rbp), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x54(%rbp), %xmm0
movss -0x58(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x40(%rbp), %xmm0
movss -0x5c(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movss -0x3c(%rbp), %xmm0
movss -0x5c(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x5c(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movss -0x68(%rbp), %xmm1
popq %rbp
retq
nopl (%rax,%rax)
| Vector3Project:
push rbp
mov rbp, rsp
movlpd [rbp+var_30], xmm0
movss [rbp+var_28], xmm1
mov eax, [rbp+var_28]
mov [rbp+var_18], eax
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
movlpd [rbp+var_50], xmm2
movss [rbp+var_48], xmm3
mov eax, [rbp+var_48]
mov [rbp+var_38], eax
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov [rbp+var_8], 0
mov [rbp+var_10], 0
movss xmm1, dword ptr [rbp+var_20]
movss xmm0, dword ptr [rbp+var_20+4]
movss xmm2, dword ptr [rbp+var_40]
movss xmm3, dword ptr [rbp+var_40+4]
mulss xmm0, xmm3
mulss xmm1, xmm2
addss xmm1, xmm0
movss xmm0, [rbp+var_18]
movss xmm2, [rbp+var_38]
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_54], xmm0
movss xmm1, dword ptr [rbp+var_40]
movss xmm0, dword ptr [rbp+var_40+4]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm1, xmm0
movss xmm0, [rbp+var_38]
mulss xmm0, xmm0
addss xmm0, xmm1
movss [rbp+var_58], xmm0
movss xmm0, [rbp+var_54]
movss xmm1, [rbp+var_58]
divss xmm0, xmm1
movss [rbp+var_5C], xmm0
movss xmm0, dword ptr [rbp+var_40]
movss xmm1, [rbp+var_5C]
mulss xmm0, xmm1
movss dword ptr [rbp+var_10], xmm0
movss xmm0, dword ptr [rbp+var_40+4]
movss xmm1, [rbp+var_5C]
mulss xmm0, xmm1
movss dword ptr [rbp+var_10+4], xmm0
movss xmm0, [rbp+var_38]
movss xmm1, [rbp+var_5C]
mulss xmm0, xmm1
movss [rbp+var_8], xmm0
mov eax, [rbp+var_8]
mov [rbp+var_68], eax
mov rax, [rbp+var_10]
mov [rbp+var_70], rax
movsd xmm0, [rbp+var_70]
movss xmm1, [rbp+var_68]
pop rbp
retn
| double Vector3Project(double a1, float a2, double a3, float a4)
{
float v4; // xmm1_4
double v8; // [rsp+60h] [rbp-10h]
v4 = (float)(*(float *)&a1 * *(float *)&a3) + (float)(*((float *)&a1 + 1) * *((float *)&a3 + 1));
*(float *)&v8 = *(float *)&a3
* (float)((float)((float)(a2 * a4) + v4)
/ (float)((float)(a4 * a4)
+ (float)((float)(*(float *)&a3 * *(float *)&a3)
+ (float)(*((float *)&a3 + 1) * *((float *)&a3 + 1)))));
*((float *)&v8 + 1) = *((float *)&a3 + 1)
* (float)((float)((float)(a2 * a4) + v4)
/ (float)((float)(a4 * a4)
+ (float)((float)(*(float *)&a3 * *(float *)&a3)
+ (float)(*((float *)&a3 + 1) * *((float *)&a3 + 1)))));
return v8;
}
| Vector3Project:
PUSH RBP
MOV RBP,RSP
MOVLPD qword ptr [RBP + -0x30],XMM0
MOVSS dword ptr [RBP + -0x28],XMM1
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
MOVLPD qword ptr [RBP + -0x50],XMM2
MOVSS dword ptr [RBP + -0x48],XMM3
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x8],0x0
MOV qword ptr [RBP + -0x10],0x0
MOVSS XMM1,dword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS XMM2,dword ptr [RBP + -0x40]
MOVSS XMM3,dword ptr [RBP + -0x3c]
MULSS XMM0,XMM3
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS XMM2,dword ptr [RBP + -0x38]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x54],XMM0
MOVSS XMM1,dword ptr [RBP + -0x40]
MOVSS XMM0,dword ptr [RBP + -0x3c]
MULSS XMM0,XMM0
MULSS XMM1,XMM1
ADDSS XMM1,XMM0
MOVSS XMM0,dword ptr [RBP + -0x38]
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x58],XMM0
MOVSS XMM0,dword ptr [RBP + -0x54]
MOVSS XMM1,dword ptr [RBP + -0x58]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x5c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x40]
MOVSS XMM1,dword ptr [RBP + -0x5c]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x10],XMM0
MOVSS XMM0,dword ptr [RBP + -0x3c]
MOVSS XMM1,dword ptr [RBP + -0x5c]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0xc],XMM0
MOVSS XMM0,dword ptr [RBP + -0x38]
MOVSS XMM1,dword ptr [RBP + -0x5c]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x8],XMM0
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x68],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x70],RAX
MOVSD XMM0,qword ptr [RBP + -0x70]
MOVSS XMM1,dword ptr [RBP + -0x68]
POP RBP
RET
|
int8 Vector3Project(int8 param_1,float param_2,int8 param_3,float param_4)
{
float fVar1;
float fVar2;
float fVar3;
int4 local_28;
int4 uStack_24;
int8 local_18;
fVar3 = (float)((ulong)param_3 >> 0x20);
fVar2 = (float)param_3;
local_28 = (float)param_1;
uStack_24 = (float)((ulong)param_1 >> 0x20);
fVar1 = (param_2 * param_4 + local_28 * fVar2 + uStack_24 * fVar3) /
(param_4 * param_4 + fVar2 * fVar2 + fVar3 * fVar3);
local_18 = CONCAT44(fVar3 * fVar1,fVar2 * fVar1);
return local_18;
}
| |
50,871 | Vector3Project | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Vector3 Vector3Project(Vector3 v1, Vector3 v2)
{
Vector3 result = { 0 };
float v1dv2 = (v1.x*v2.x + v1.y*v2.y + v1.z*v2.z);
float v2dv2 = (v2.x*v2.x + v2.y*v2.y + v2.z*v2.z);
float mag = v1dv2/v2dv2;
result.x = v2.x*mag;
result.y = v2.y*mag;
result.z = v2.z*mag;
return result;
} | O2 | c | Vector3Project:
movaps %xmm2, %xmm4
shufps $0x55, %xmm2, %xmm4 # xmm4 = xmm4[1,1],xmm2[1,1]
movaps %xmm2, %xmm5
shufps $0x11, %xmm0, %xmm5 # xmm5 = xmm5[1,0],xmm0[1,0]
shufps $0xe2, %xmm0, %xmm5 # xmm5 = xmm5[2,0],xmm0[2,3]
mulps %xmm4, %xmm5
movaps %xmm2, %xmm6
shufps $0x0, %xmm2, %xmm6 # xmm6 = xmm6[0,0],xmm2[0,0]
unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
mulps %xmm0, %xmm6
addps %xmm5, %xmm6
movaps %xmm3, %xmm0
shufps $0x0, %xmm3, %xmm0 # xmm0 = xmm0[0,0],xmm3[0,0]
movaps %xmm3, %xmm4
movlhps %xmm1, %xmm4 # xmm4 = xmm4[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm4 # xmm4 = xmm4[2,0],xmm1[2,3]
mulps %xmm0, %xmm4
addps %xmm6, %xmm4
movaps %xmm4, %xmm0
shufps $0x55, %xmm4, %xmm0 # xmm0 = xmm0[1,1],xmm4[1,1]
divss %xmm0, %xmm4
movaps %xmm4, %xmm0
shufps $0x0, %xmm4, %xmm0 # xmm0 = xmm0[0,0],xmm4[0,0]
mulps %xmm2, %xmm0
mulss %xmm3, %xmm4
movaps %xmm4, %xmm1
retq
| Vector3Project:
movaps xmm4, xmm2
shufps xmm4, xmm2, 55h ; 'U'
movaps xmm5, xmm2
shufps xmm5, xmm0, 11h
shufps xmm5, xmm0, 0E2h
mulps xmm5, xmm4
movaps xmm6, xmm2
shufps xmm6, xmm2, 0
unpcklps xmm0, xmm2
mulps xmm6, xmm0
addps xmm6, xmm5
movaps xmm0, xmm3
shufps xmm0, xmm3, 0
movaps xmm4, xmm3
movlhps xmm4, xmm1
shufps xmm4, xmm1, 0E2h
mulps xmm4, xmm0
addps xmm4, xmm6
movaps xmm0, xmm4
shufps xmm0, xmm4, 55h ; 'U'
divss xmm4, xmm0
movaps xmm0, xmm4
shufps xmm0, xmm4, 0
mulps xmm0, xmm2
mulss xmm4, xmm3
movaps xmm1, xmm4
retn
| __m128 Vector3Project(__m128 a1, __m128 a2, __m128 a3, __m128 a4)
{
__m128 v4; // xmm4
v4 = _mm_add_ps(
_mm_mul_ps(_mm_shuffle_ps(_mm_movelh_ps(a4, a2), a2, 226), _mm_shuffle_ps(a4, a4, 0)),
_mm_add_ps(
_mm_mul_ps(_mm_shuffle_ps(a3, a3, 0), _mm_unpacklo_ps(a1, a3)),
_mm_mul_ps(_mm_shuffle_ps(_mm_shuffle_ps(a3, a1, 17), a1, 226), _mm_shuffle_ps(a3, a3, 85))));
v4.m128_f32[0] = v4.m128_f32[0] / _mm_shuffle_ps(v4, v4, 85).m128_f32[0];
return _mm_mul_ps(_mm_shuffle_ps(v4, v4, 0), a3);
}
| Vector3Project:
MOVAPS XMM4,XMM2
SHUFPS XMM4,XMM2,0x55
MOVAPS XMM5,XMM2
SHUFPS XMM5,XMM0,0x11
SHUFPS XMM5,XMM0,0xe2
MULPS XMM5,XMM4
MOVAPS XMM6,XMM2
SHUFPS XMM6,XMM2,0x0
UNPCKLPS XMM0,XMM2
MULPS XMM6,XMM0
ADDPS XMM6,XMM5
MOVAPS XMM0,XMM3
SHUFPS XMM0,XMM3,0x0
MOVAPS XMM4,XMM3
MOVLHPS XMM4,XMM1
SHUFPS XMM4,XMM1,0xe2
MULPS XMM4,XMM0
ADDPS XMM4,XMM6
MOVAPS XMM0,XMM4
SHUFPS XMM0,XMM4,0x55
DIVSS XMM4,XMM0
MOVAPS XMM0,XMM4
SHUFPS XMM0,XMM4,0x0
MULPS XMM0,XMM2
MULSS XMM4,XMM3
MOVAPS XMM1,XMM4
RET
|
int8 Vector3Project(int8 param_1,float param_2,int8 param_3,float param_4)
{
float fVar1;
float fVar2;
float fVar3;
fVar2 = (float)((ulong)param_3 >> 0x20);
fVar1 = (float)param_3;
fVar3 = (param_2 * param_4 + fVar1 * (float)param_1 + (float)((ulong)param_1 >> 0x20) * fVar2) /
(param_4 * param_4 + fVar1 * fVar1 + fVar2 * fVar2);
return CONCAT44(fVar3 * fVar2,fVar3 * fVar1);
}
| |
50,872 | stbi__loadf_main(stbi__context*, int*, int*, int*, int) | llama.cpp/examples/llava/../../common/stb_image.h | static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
unsigned char *data;
#ifndef STBI_NO_HDR
if (stbi__hdr_test(s)) {
stbi__result_info ri;
float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri);
if (hdr_data)
stbi__float_postprocess(hdr_data,x,y,comp,req_comp);
return hdr_data;
}
#endif
data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
if (data)
return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
} | O3 | c | stbi__loadf_main(stbi__context*, int*, int*, int*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
callq 0x21e73
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movl %ebx, %r8d
testl %eax, %eax
je 0x21b06
callq 0x2dd21
testq %rax, %rax
je 0x21c63
movq %rax, %r15
leaq 0x3c282(%rip), %rdi # 0x5dd40
callq 0x1e400
cmpl $0x0, 0xc(%rax)
leaq 0x8(%rax), %rax
leaq 0x3dec0(%rip), %rcx # 0x5f998
cmovneq %rax, %rcx
cmpl $0x0, (%rcx)
je 0x21c66
testl %ebx, %ebx
jne 0x21aed
movl (%r12), %ebx
movl (%rbp), %esi
movl (%r13), %edx
shll $0x2, %ebx
movq %r15, %rdi
movl %ebx, %ecx
callq 0x2b08c
jmp 0x21c66
callq 0x2113d
testq %rax, %rax
je 0x21c2c
movq %rax, %r14
movl (%rbp), %eax
movl (%r13), %ebp
testl %ebx, %ebx
jne 0x21b26
movl (%r12), %ebx
movl %eax, %r12d
movl %eax, %edi
movl %ebp, %esi
movl %ebx, %edx
movl $0x4, %ecx
callq 0x35663
testq %rax, %rax
je 0x21c41
movq %rax, %r15
movl %ebx, %eax
andl $0x1, %eax
cmpl $0x1, %eax
movl %ebx, %eax
sbbl $0x0, %eax
imull %r12d, %ebp
testl %ebp, %ebp
jle 0x21c22
movl %ebx, (%rsp)
movslq %ebx, %rdx
movl %ebp, %r13d
movl %eax, %ebp
leaq (,%rdx,4), %rcx
movq %rcx, 0x18(%rsp)
movq %r14, %rbx
xorl %r14d, %r14d
movss 0x2c900(%rip), %xmm1 # 0x4e484
movq %rbx, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
movl %eax, 0x4(%rsp)
testl %eax, %eax
jle 0x21bd9
xorl %r12d, %r12d
movzbl (%rbx,%r12), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss 0x3d94a(%rip), %xmm1 # 0x5f500
callq 0x1e040
movss 0x2c8c1(%rip), %xmm1 # 0x4e484
mulss 0x3d939(%rip), %xmm0 # 0x5f504
movss %xmm0, (%r15,%r12,4)
incq %r12
cmpq %r12, %rbp
jne 0x21b9e
incq %r14
addq 0x18(%rsp), %r15
movq 0x20(%rsp), %rdx
addq %rdx, %rbx
cmpq %r13, %r14
movl 0x4(%rsp), %eax
jne 0x21b97
testb $0x1, (%rsp)
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r14
jne 0x21c22
cltq
movzbl (%r14,%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%r15,%rax,4)
addq %rdx, %rax
decq %r13
jne 0x21c04
movq %r14, %rdi
callq 0x1d840
jmp 0x21c66
leaq 0x3c10d(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x2d70f(%rip), %rcx # 0x4f34e
jmp 0x21c5c
movq %r14, %rdi
callq 0x1d840
leaq 0x3c0f0(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x2d82d(%rip), %rcx # 0x4f489
movq %rcx, (%rax)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZL16stbi__loadf_mainP13stbi__contextPiS1_S1_i:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r8d
mov r12, rcx
mov r13, rdx
mov rbp, rsi
mov r14, rdi
call _ZL14stbi__hdr_testP13stbi__context; stbi__hdr_test(stbi__context *)
mov rdi, r14
mov rsi, rbp
mov rdx, r13
mov rcx, r12
mov r8d, ebx
test eax, eax
jz short loc_21B06
call _ZL14stbi__hdr_loadP13stbi__contextPiS1_S1_iP17stbi__result_info; stbi__hdr_load(stbi__context *,int *,int *,int *,int,stbi__result_info *)
test rax, rax
jz loc_21C63
mov r15, rax
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
cmp dword ptr [rax+0Ch], 0
lea rax, [rax+8]
lea rcx, _ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global
cmovnz rcx, rax
cmp dword ptr [rcx], 0
jz loc_21C66
test ebx, ebx
jnz short loc_21AED
mov ebx, [r12]
loc_21AED:
mov esi, [rbp+0]; int
mov edx, [r13+0]; int
shl ebx, 2
mov rdi, r15; void *
mov ecx, ebx; int
call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int)
jmp loc_21C66
loc_21B06:
call _ZL31stbi__load_and_postprocess_8bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_8bit(stbi__context *,int *,int *,int *,int)
test rax, rax
jz loc_21C2C
mov r14, rax
mov eax, [rbp+0]
mov ebp, [r13+0]
test ebx, ebx
jnz short loc_21B26
mov ebx, [r12]
loc_21B26:
mov r12d, eax
mov edi, eax; int
mov esi, ebp; int
mov edx, ebx; int
mov ecx, 4; int
call _ZL17stbi__malloc_mad4iiiii; stbi__malloc_mad4(int,int,int,int,int)
test rax, rax
jz loc_21C41
mov r15, rax
mov eax, ebx
and eax, 1
cmp eax, 1
mov eax, ebx
sbb eax, 0
imul ebp, r12d
test ebp, ebp
jle loc_21C22
mov [rsp+58h+var_58], ebx
movsxd rdx, ebx
mov r13d, ebp
mov ebp, eax
lea rcx, ds:0[rdx*4]
mov [rsp+58h+var_40], rcx
mov rbx, r14
xor r14d, r14d
movss xmm1, cs:dword_4E484
mov [rsp+58h+var_50], rbx
mov [rsp+58h+var_48], r15
mov [rsp+58h+var_38], rdx
mov [rsp+58h+var_54], eax
loc_21B97:
test eax, eax
jle short loc_21BD9
xor r12d, r12d
loc_21B9E:
movzx eax, byte ptr [rbx+r12]
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
divss xmm0, xmm1
movss xmm1, cs:_ZL15stbi__l2h_gamma; stbi__l2h_gamma
call _powf
movss xmm1, cs:dword_4E484
mulss xmm0, cs:_ZL15stbi__l2h_scale; stbi__l2h_scale
movss dword ptr [r15+r12*4], xmm0
inc r12
cmp rbp, r12
jnz short loc_21B9E
loc_21BD9:
inc r14
add r15, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_38]
add rbx, rdx
cmp r14, r13
mov eax, [rsp+58h+var_54]
jnz short loc_21B97
test byte ptr [rsp+58h+var_58], 1
mov r15, [rsp+58h+var_48]
mov r14, [rsp+58h+var_50]
jnz short loc_21C22
cdqe
loc_21C04:
movzx ecx, byte ptr [r14+rax]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
divss xmm0, xmm1
movss dword ptr [r15+rax*4], xmm0
add rax, rdx
dec r13
jnz short loc_21C04
loc_21C22:
mov rdi, r14
call _free
jmp short loc_21C66
loc_21C2C:
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aUnknownImageTy; "unknown image type"
jmp short loc_21C5C
loc_21C41:
mov rdi, r14
call _free
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aOutofmem; "outofmem"
loc_21C5C:
mov [rax+0], rcx
loc_21C63:
xor r15d, r15d
loc_21C66:
mov rax, r15
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char * stbi__loadf_main(long long a1, int *a2, int *a3, int *a4, int a5)
{
long long v8; // rax
char *v9; // r15
long long addr; // rax
bool v11; // zf
int *v12; // rax
int *v13; // rcx
_BYTE *v14; // rax
int v15; // r8d
_BYTE *v16; // r14
int v17; // ebp
int v18; // r12d
long long v19; // rax
int v20; // eax
int v21; // ebp
long long v22; // rdx
long long v23; // r13
long long v24; // rbp
_BYTE *v25; // rbx
long long v26; // r14
long long v27; // r12
long long v28; // rax
const char **v29; // rax
const char *v30; // rcx
char v32; // [rsp+0h] [rbp-58h]
int v33; // [rsp+4h] [rbp-54h]
_BYTE *v34; // [rsp+8h] [rbp-50h]
float *v35; // [rsp+10h] [rbp-48h]
long long v36; // [rsp+18h] [rbp-40h]
long long v37; // [rsp+20h] [rbp-38h]
if ( (unsigned int)stbi__hdr_test() )
{
v8 = stbi__hdr_load(a1, a2, a3, a4, (unsigned int)a5);
if ( v8 )
{
v9 = (char *)v8;
addr = __tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v11 = *(_DWORD *)(addr + 12) == 0;
v12 = (int *)(addr + 8);
v13 = &stbi__vertically_flip_on_load_global;
if ( !v11 )
v13 = v12;
if ( *v13 )
{
if ( !a5 )
a5 = *a4;
stbi__vertical_flip(v9, *a2, *a3, 4 * a5);
}
return v9;
}
return 0LL;
}
v14 = stbi__load_and_postprocess_8bit(a1, a2, a3, a4, (unsigned int)a5);
if ( !v14 )
{
v29 = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v30 = "unknown image type";
LABEL_25:
*v29 = v30;
return 0LL;
}
v16 = v14;
v17 = *a3;
if ( !a5 )
a5 = *a4;
v18 = *a2;
v19 = stbi__malloc_mad4(*a2, v17, a5, 4, v15);
if ( !v19 )
{
free(v16);
v29 = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v30 = "outofmem";
goto LABEL_25;
}
v9 = (char *)v19;
v20 = (__PAIR64__(a5, a5 & 1) - 1) >> 32;
v21 = v18 * v17;
if ( v21 > 0 )
{
v32 = a5;
v22 = a5;
v23 = (unsigned int)v21;
v24 = (unsigned int)v20;
v36 = 4LL * a5;
v25 = v16;
v26 = 0LL;
v34 = v25;
v35 = (float *)v9;
v37 = v22;
v33 = v20;
do
{
if ( v20 > 0 )
{
v27 = 0LL;
do
{
*(float *)&v9[4 * v27] = powf((float)(unsigned __int8)v25[v27] / 255.0, *(float *)&stbi__l2h_gamma)
* *(float *)&stbi__l2h_scale;
++v27;
}
while ( v24 != v27 );
}
++v26;
v9 += v36;
v25 += v37;
v20 = v33;
}
while ( v26 != v23 );
v9 = (char *)v35;
v16 = v34;
if ( (v32 & 1) == 0 )
{
v28 = v33;
do
{
v35[v28] = (float)(unsigned __int8)v34[v28] / 255.0;
v28 += v37;
--v23;
}
while ( v23 );
}
}
free(v16);
return v9;
}
| stbi__loadf_main:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R8D
MOV R12,RCX
MOV R13,RDX
MOV RBP,RSI
MOV R14,RDI
CALL 0x00121e73
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R13
MOV RCX,R12
MOV R8D,EBX
TEST EAX,EAX
JZ 0x00121b06
CALL 0x0012dd21
TEST RAX,RAX
JZ 0x00121c63
MOV R15,RAX
LEA RDI,[0x15dd40]
CALL 0x0011e400
CMP dword ptr [RAX + 0xc],0x0
LEA RAX,[RAX + 0x8]
LEA RCX,[0x15f998]
CMOVNZ RCX,RAX
CMP dword ptr [RCX],0x0
JZ 0x00121c66
TEST EBX,EBX
JNZ 0x00121aed
MOV EBX,dword ptr [R12]
LAB_00121aed:
MOV ESI,dword ptr [RBP]
MOV EDX,dword ptr [R13]
SHL EBX,0x2
MOV RDI,R15
MOV ECX,EBX
CALL 0x0012b08c
JMP 0x00121c66
LAB_00121b06:
CALL 0x0012113d
TEST RAX,RAX
JZ 0x00121c2c
MOV R14,RAX
MOV EAX,dword ptr [RBP]
MOV EBP,dword ptr [R13]
TEST EBX,EBX
JNZ 0x00121b26
MOV EBX,dword ptr [R12]
LAB_00121b26:
MOV R12D,EAX
MOV EDI,EAX
MOV ESI,EBP
MOV EDX,EBX
MOV ECX,0x4
CALL 0x00135663
TEST RAX,RAX
JZ 0x00121c41
MOV R15,RAX
MOV EAX,EBX
AND EAX,0x1
CMP EAX,0x1
MOV EAX,EBX
SBB EAX,0x0
IMUL EBP,R12D
TEST EBP,EBP
JLE 0x00121c22
MOV dword ptr [RSP],EBX
MOVSXD RDX,EBX
MOV R13D,EBP
MOV EBP,EAX
LEA RCX,[RDX*0x4]
MOV qword ptr [RSP + 0x18],RCX
MOV RBX,R14
XOR R14D,R14D
MOVSS XMM1,dword ptr [0x0014e484]
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x20],RDX
MOV dword ptr [RSP + 0x4],EAX
LAB_00121b97:
TEST EAX,EAX
JLE 0x00121bd9
XOR R12D,R12D
LAB_00121b9e:
MOVZX EAX,byte ptr [RBX + R12*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
DIVSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x0015f500]
CALL 0x0011e040
MOVSS XMM1,dword ptr [0x0014e484]
MULSS XMM0,dword ptr [0x0015f504]
MOVSS dword ptr [R15 + R12*0x4],XMM0
INC R12
CMP RBP,R12
JNZ 0x00121b9e
LAB_00121bd9:
INC R14
ADD R15,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
ADD RBX,RDX
CMP R14,R13
MOV EAX,dword ptr [RSP + 0x4]
JNZ 0x00121b97
TEST byte ptr [RSP],0x1
MOV R15,qword ptr [RSP + 0x10]
MOV R14,qword ptr [RSP + 0x8]
JNZ 0x00121c22
CDQE
LAB_00121c04:
MOVZX ECX,byte ptr [R14 + RAX*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
DIVSS XMM0,XMM1
MOVSS dword ptr [R15 + RAX*0x4],XMM0
ADD RAX,RDX
DEC R13
JNZ 0x00121c04
LAB_00121c22:
MOV RDI,R14
CALL 0x0011d840
JMP 0x00121c66
LAB_00121c2c:
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f34e]
JMP 0x00121c5c
LAB_00121c41:
MOV RDI,R14
CALL 0x0011d840
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f489]
LAB_00121c5c:
MOV qword ptr [RAX],RCX
LAB_00121c63:
XOR R15D,R15D
LAB_00121c66:
MOV RAX,R15
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* stbi__loadf_main(stbi__context*, int*, int*, int*, int) */
void * stbi__loadf_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5)
{
int iVar1;
int iVar2;
int iVar3;
uint uVar4;
void *pvVar5;
long lVar6;
void *pvVar7;
long lVar8;
int8 *puVar9;
int *piVar10;
char *pcVar11;
void *pvVar12;
uint uVar13;
stbi__result_info *in_R9;
ulong uVar14;
ulong uVar15;
ulong uVar16;
void *pvVar17;
float fVar18;
float fVar19;
iVar3 = stbi__hdr_test(param_1);
if (iVar3 == 0) {
iVar3 = param_5;
pvVar5 = (void *)stbi__load_and_postprocess_8bit(param_1,param_2,param_3,param_4,param_5);
if (pvVar5 == (void *)0x0) {
puVar9 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar11 = "unknown image type";
}
else {
iVar1 = *param_2;
iVar2 = *param_3;
if (param_5 == 0) {
param_5 = *param_4;
}
pvVar7 = (void *)stbi__malloc_mad4(iVar1,iVar2,param_5,4,iVar3);
if (pvVar7 != (void *)0x0) {
uVar4 = param_5 - (uint)((param_5 & 1U) == 0);
uVar13 = iVar2 * iVar1;
if (0 < (int)uVar13) {
lVar6 = (long)param_5;
uVar15 = (ulong)uVar13;
uVar16 = 0;
pvVar12 = pvVar5;
pvVar17 = pvVar7;
fVar19 = DAT_0014e484;
do {
if (0 < (int)uVar4) {
uVar14 = 0;
do {
fVar18 = powf((float)*(byte *)((long)pvVar12 + uVar14) / fVar19,stbi__l2h_gamma);
fVar19 = DAT_0014e484;
*(float *)((long)pvVar17 + uVar14 * 4) = fVar18 * stbi__l2h_scale;
uVar14 = uVar14 + 1;
} while (uVar4 != uVar14);
}
uVar16 = uVar16 + 1;
pvVar17 = (void *)((long)pvVar17 + lVar6 * 4);
pvVar12 = (void *)((long)pvVar12 + lVar6);
} while (uVar16 != uVar15);
if ((param_5 & 1U) == 0) {
lVar8 = (long)(int)uVar4;
do {
*(float *)((long)pvVar7 + lVar8 * 4) = (float)*(byte *)((long)pvVar5 + lVar8) / fVar19
;
lVar8 = lVar8 + lVar6;
uVar15 = uVar15 - 1;
} while (uVar15 != 0);
}
}
free(pvVar5);
return pvVar7;
}
free(pvVar5);
puVar9 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar11 = "outofmem";
}
*puVar9 = pcVar11;
}
else {
pvVar5 = (void *)stbi__hdr_load(param_1,param_2,param_3,param_4,param_5,in_R9);
if (pvVar5 != (void *)0x0) {
lVar6 = __tls_get_addr(&PTR_0015dd40);
piVar10 = &stbi__vertically_flip_on_load_global;
if (*(int *)(lVar6 + 0xc) != 0) {
piVar10 = (int *)(lVar6 + 8);
}
if (*piVar10 == 0) {
return pvVar5;
}
if (param_5 == 0) {
param_5 = *param_4;
}
stbi__vertical_flip(pvVar5,*param_2,*param_3,param_5 << 2);
return pvVar5;
}
}
return (void *)0x0;
}
| |
50,873 | st_select_lex_unit::optimize_bag_operation(bool) | eloqsql/sql/sql_union.cc | void st_select_lex_unit::optimize_bag_operation(bool is_outer_distinct)
{
/*
skip run optimize for:
ORACLE MODE
CREATE VIEW
PREPARE ... FROM
recursive
*/
if ((thd->variables.sql_mode & MODE_ORACLE) ||
(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW) ||
(fake_select_lex != NULL && thd->stmt_arena->is_stmt_prepare()) ||
(with_element && with_element->is_recursive ))
return;
DBUG_ASSERT(!bag_set_op_optimized);
SELECT_LEX *sl;
/* INTERSECT subsequence can occur only at the very beginning */
/* The first select with linkage == INTERSECT_TYPE */
SELECT_LEX *intersect_start= NULL;
/* The first select after the INTERSECT subsequence */
SELECT_LEX *intersect_end= NULL;
/*
Will point to the last node before UNION ALL subsequence.
Index can be disable there.
*/
SELECT_LEX *disable_index= NULL;
/*
True if there is a select with:
linkage == INTERSECT_TYPE && distinct==true
*/
bool any_intersect_distinct= false;
SELECT_LEX *prev_sl= first_select();
/* process INTERSECT subsequence in the begining */
for (sl= prev_sl->next_select(); sl; prev_sl= sl, sl= sl->next_select())
{
if (sl->linkage != INTERSECT_TYPE)
{
intersect_end= sl;
break;
}
else
{
if (!intersect_start)
intersect_start= sl;
if (sl->distinct)
{
any_intersect_distinct= true;
disable_index= sl;
}
}
}
/* if subquery only contains INTERSECT and outer is UNION DISTINCT*/
if (!sl && is_outer_distinct)
any_intersect_distinct= true;
/* The first select of the current UNION ALL subsequence */
SELECT_LEX *union_all_start= NULL;
for ( ; sl; prev_sl= sl, sl= sl->next_select())
{
DBUG_ASSERT (sl->linkage != INTERSECT_TYPE);
if (!sl->distinct)
{
if (sl->linkage == UNION_TYPE)
{
if (!union_all_start)
{
union_all_start= sl;
}
}
else
{
DBUG_ASSERT (sl->linkage == EXCEPT_TYPE);
union_all_start= NULL;
if (prev_sl->distinct && prev_sl->is_set_op())
{
sl->distinct= true;
disable_index= sl;
}
}
}
else
{ /* sl->distinct == true */
for (SELECT_LEX *si= union_all_start; si && si != sl; si= si->next_select())
{
si->distinct= true;
}
union_all_start= NULL;
disable_index= sl;
}
}
if (is_outer_distinct)
{
for (SELECT_LEX *si= union_all_start; si && si != sl; si= si->next_select())
{
si->distinct= true;
}
union_all_start= NULL;
}
if (any_intersect_distinct ||
(intersect_end != NULL && intersect_end->distinct))
{
for (sl= intersect_start; sl && sl != intersect_end; sl= sl->next_select())
{
sl->distinct= true;
if (disable_index && disable_index->linkage == INTERSECT_TYPE)
disable_index= sl;
}
}
/*
if disable_index points to a INTERSECT, based on rule 1 we can set it
to the last INTERSECT node.
*/
if (disable_index && disable_index->linkage == INTERSECT_TYPE &&
intersect_end && intersect_end->distinct)
disable_index= intersect_end;
/* union_distinct controls when to disable index */
union_distinct= disable_index;
/* recursive call this function for whole lex tree */
for(sl= first_select(); sl; sl= sl->next_select())
{
if (sl->is_unit_nest() &&
sl->first_inner_unit() &&
!sl->first_inner_unit()->bag_set_op_optimized)
sl->first_inner_unit()->optimize_bag_operation(sl->distinct);
}
/* mark as optimized */
bag_set_op_optimized= true;
} | O0 | cpp | st_select_lex_unit::optimize_bag_operation(bool):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq 0x798(%rax), %rax
movq 0x898(%rax), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
jne 0x6a7c3f
movq -0x60(%rbp), %rax
movq 0x798(%rax), %rax
movq 0x58(%rax), %rax
movzbl 0x183a(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x6a7c3f
movq -0x60(%rbp), %rax
cmpq $0x0, 0x7a0(%rax)
je 0x6a7c1d
movq -0x60(%rbp), %rax
movq 0x798(%rax), %rax
movq 0x3a40(%rax), %rdi
callq 0x52fee0
testb $0x1, %al
jne 0x6a7c3f
movq -0x60(%rbp), %rax
cmpq $0x0, 0x788(%rax)
je 0x6a7c44
movq -0x60(%rbp), %rax
movq 0x788(%rax), %rax
testb $0x1, 0xb8(%rax)
je 0x6a7c44
jmp 0x6a7f91
jmp 0x6a7c46
jmp 0x6a7c48
movq -0x60(%rbp), %rdi
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
callq 0x4bc0a0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x56a510
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6a7cdc
movq -0x18(%rbp), %rax
cmpl $0x2, 0x30(%rax)
je 0x6a7c99
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x6a7cdc
cmpq $0x0, -0x20(%rbp)
jne 0x6a7ca8
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
testb $0x1, %al
je 0x6a7cc1
movb $0x1, -0x31(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6a7cc3
jmp 0x6a7cc5
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x56a510
movq %rax, -0x18(%rbp)
jmp 0x6a7c7e
cmpq $0x0, -0x18(%rbp)
jne 0x6a7ced
testb $0x1, -0x9(%rbp)
je 0x6a7ced
movb $0x1, -0x31(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6a7de6
jmp 0x6a7d02
jmp 0x6a7d04
movq -0x18(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
testb $0x1, %al
jne 0x6a7d70
movq -0x18(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x6a7d2c
cmpq $0x0, -0x48(%rbp)
jne 0x6a7d2a
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x6a7d6e
jmp 0x6a7d2e
jmp 0x6a7d30
movq $0x0, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
testb $0x1, %al
je 0x6a7d6c
movq -0x40(%rbp), %rdi
callq 0x6a9a30
testb $0x1, %al
jne 0x6a7d54
jmp 0x6a7d6c
movq -0x18(%rbp), %rax
movb 0x41(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x41(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6a7d6e
jmp 0x6a7dca
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x50(%rbp)
movb %al, -0x61(%rbp)
je 0x6a7d92
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
setne %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x6a7d9b
jmp 0x6a7dba
movq -0x50(%rbp), %rax
movb 0x41(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x41(%rax)
movq -0x50(%rbp), %rdi
callq 0x56a510
movq %rax, -0x50(%rbp)
jmp 0x6a7d78
movq $0x0, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6a7dcc
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x56a510
movq %rax, -0x18(%rbp)
jmp 0x6a7cf5
testb $0x1, -0x9(%rbp)
je 0x6a7e3e
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x58(%rbp)
movb %al, -0x62(%rbp)
je 0x6a7e0e
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
setne %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
testb $0x1, %al
jne 0x6a7e17
jmp 0x6a7e36
movq -0x58(%rbp), %rax
movb 0x41(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x41(%rax)
movq -0x58(%rbp), %rdi
callq 0x56a510
movq %rax, -0x58(%rbp)
jmp 0x6a7df4
movq $0x0, -0x48(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x6a7e58
cmpq $0x0, -0x28(%rbp)
je 0x6a7ebf
movq -0x28(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
testb $0x1, %al
je 0x6a7ebf
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x63(%rbp)
je 0x6a7e7a
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
setne %al
movb %al, -0x63(%rbp)
movb -0x63(%rbp), %al
testb $0x1, %al
jne 0x6a7e83
jmp 0x6a7ebd
movq -0x18(%rbp), %rax
movb 0x41(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x41(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x6a7eac
movq -0x30(%rbp), %rax
cmpl $0x2, 0x30(%rax)
jne 0x6a7eac
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6a7eae
movq -0x18(%rbp), %rdi
callq 0x56a510
movq %rax, -0x18(%rbp)
jmp 0x6a7e60
jmp 0x6a7ebf
cmpq $0x0, -0x30(%rbp)
je 0x6a7eec
movq -0x30(%rbp), %rax
cmpl $0x2, 0x30(%rax)
jne 0x6a7eec
cmpq $0x0, -0x28(%rbp)
je 0x6a7eec
movq -0x28(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
testb $0x1, %al
je 0x6a7eec
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, 0x7b0(%rdi)
callq 0x4bc0a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6a7f77
movq -0x18(%rbp), %rdi
callq 0x6a9a70
testb $0x1, %al
jne 0x6a7f1a
jmp 0x6a7f66
movq -0x18(%rbp), %rdi
callq 0x57dd40
cmpq $0x0, %rax
je 0x6a7f66
movq -0x18(%rbp), %rdi
callq 0x57dd40
movw 0x7f0(%rax), %ax
shrw $0x5, %ax
andw $0x1, %ax
testw $0x1, %ax
jne 0x6a7f66
movq -0x18(%rbp), %rdi
callq 0x57dd40
movq %rax, %rdi
movq -0x18(%rbp), %rax
movb 0x41(%rax), %al
andb $0x1, %al
andb $0x1, %al
movzbl %al, %esi
callq 0x6a7ba0
jmp 0x6a7f68
movq -0x18(%rbp), %rdi
callq 0x56a510
movq %rax, -0x18(%rbp)
jmp 0x6a7f04
movq -0x60(%rbp), %rax
movw 0x7f0(%rax), %cx
andw $-0x21, %cx
orw $0x20, %cx
movw %cx, 0x7f0(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN18st_select_lex_unit22optimize_bag_operationEb:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, sil
mov [rbp+var_8], rdi
and al, 1
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_60], rax
mov rax, [rax+798h]
mov rax, [rax+898h]
and rax, 200h
cmp rax, 0
jnz short loc_6A7C3F
mov rax, [rbp+var_60]
mov rax, [rax+798h]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+183Ah]
and eax, 2
cmp eax, 0
jnz short loc_6A7C3F
mov rax, [rbp+var_60]
cmp qword ptr [rax+7A0h], 0
jz short loc_6A7C1D
mov rax, [rbp+var_60]
mov rax, [rax+798h]
mov rdi, [rax+3A40h]; this
call _ZNK11Query_arena15is_stmt_prepareEv; Query_arena::is_stmt_prepare(void)
test al, 1
jnz short loc_6A7C3F
loc_6A7C1D:
mov rax, [rbp+var_60]
cmp qword ptr [rax+788h], 0
jz short loc_6A7C44
mov rax, [rbp+var_60]
mov rax, [rax+788h]
test byte ptr [rax+0B8h], 1
jz short loc_6A7C44
loc_6A7C3F:
jmp loc_6A7F91
loc_6A7C44:
jmp short $+2
loc_6A7C46:
jmp short $+2
loc_6A7C48:
mov rdi, [rbp+var_60]; this
mov [rbp+var_20], 0
mov [rbp+var_28], 0
mov [rbp+var_30], 0
mov [rbp+var_31], 0
call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_18], rax
loc_6A7C7E:
cmp [rbp+var_18], 0
jz short loc_6A7CDC
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 2
jz short loc_6A7C99
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
jmp short loc_6A7CDC
loc_6A7C99:
cmp [rbp+var_20], 0
jnz short loc_6A7CA8
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_6A7CA8:
mov rax, [rbp+var_18]
mov al, [rax+41h]
and al, 1
test al, 1
jz short loc_6A7CC1
mov [rbp+var_31], 1
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_6A7CC1:
jmp short $+2
loc_6A7CC3:
jmp short $+2
loc_6A7CC5:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_18], rax
jmp short loc_6A7C7E
loc_6A7CDC:
cmp [rbp+var_18], 0
jnz short loc_6A7CED
test [rbp+var_9], 1
jz short loc_6A7CED
mov [rbp+var_31], 1
loc_6A7CED:
mov [rbp+var_48], 0
loc_6A7CF5:
cmp [rbp+var_18], 0
jz loc_6A7DE6
jmp short $+2
loc_6A7D02:
jmp short $+2
loc_6A7D04:
mov rax, [rbp+var_18]
mov al, [rax+41h]
and al, 1
test al, 1
jnz short loc_6A7D70
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 1
jnz short loc_6A7D2C
cmp [rbp+var_48], 0
jnz short loc_6A7D2A
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_6A7D2A:
jmp short loc_6A7D6E
loc_6A7D2C:
jmp short $+2
loc_6A7D2E:
jmp short $+2
loc_6A7D30:
mov [rbp+var_48], 0
mov rax, [rbp+var_40]
mov al, [rax+41h]
and al, 1
test al, 1
jz short loc_6A7D6C
mov rdi, [rbp+var_40]; this
call _ZN13st_select_lex9is_set_opEv; st_select_lex::is_set_op(void)
test al, 1
jnz short loc_6A7D54
jmp short loc_6A7D6C
loc_6A7D54:
mov rax, [rbp+var_18]
mov cl, [rax+41h]
and cl, 0FEh
or cl, 1
mov [rax+41h], cl
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_6A7D6C:
jmp short $+2
loc_6A7D6E:
jmp short loc_6A7DCA
loc_6A7D70:
mov rax, [rbp+var_48]
mov [rbp+var_50], rax
loc_6A7D78:
xor eax, eax
cmp [rbp+var_50], 0
mov [rbp+var_61], al
jz short loc_6A7D92
mov rax, [rbp+var_50]
cmp rax, [rbp+var_18]
setnz al
mov [rbp+var_61], al
loc_6A7D92:
mov al, [rbp+var_61]
test al, 1
jnz short loc_6A7D9B
jmp short loc_6A7DBA
loc_6A7D9B:
mov rax, [rbp+var_50]
mov cl, [rax+41h]
and cl, 0FEh
or cl, 1
mov [rax+41h], cl
mov rdi, [rbp+var_50]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_50], rax
jmp short loc_6A7D78
loc_6A7DBA:
mov [rbp+var_48], 0
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_6A7DCA:
jmp short $+2
loc_6A7DCC:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_18], rax
jmp loc_6A7CF5
loc_6A7DE6:
test [rbp+var_9], 1
jz short loc_6A7E3E
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
loc_6A7DF4:
xor eax, eax
cmp [rbp+var_58], 0
mov [rbp+var_62], al
jz short loc_6A7E0E
mov rax, [rbp+var_58]
cmp rax, [rbp+var_18]
setnz al
mov [rbp+var_62], al
loc_6A7E0E:
mov al, [rbp+var_62]
test al, 1
jnz short loc_6A7E17
jmp short loc_6A7E36
loc_6A7E17:
mov rax, [rbp+var_58]
mov cl, [rax+41h]
and cl, 0FEh
or cl, 1
mov [rax+41h], cl
mov rdi, [rbp+var_58]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_58], rax
jmp short loc_6A7DF4
loc_6A7E36:
mov [rbp+var_48], 0
loc_6A7E3E:
test [rbp+var_31], 1
jnz short loc_6A7E58
cmp [rbp+var_28], 0
jz short loc_6A7EBF
mov rax, [rbp+var_28]
mov al, [rax+41h]
and al, 1
test al, 1
jz short loc_6A7EBF
loc_6A7E58:
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
loc_6A7E60:
xor eax, eax
cmp [rbp+var_18], 0
mov [rbp+var_63], al
jz short loc_6A7E7A
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
setnz al
mov [rbp+var_63], al
loc_6A7E7A:
mov al, [rbp+var_63]
test al, 1
jnz short loc_6A7E83
jmp short loc_6A7EBD
loc_6A7E83:
mov rax, [rbp+var_18]
mov cl, [rax+41h]
and cl, 0FEh
or cl, 1
mov [rax+41h], cl
cmp [rbp+var_30], 0
jz short loc_6A7EAC
mov rax, [rbp+var_30]
cmp dword ptr [rax+30h], 2
jnz short loc_6A7EAC
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_6A7EAC:
jmp short $+2
loc_6A7EAE:
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_18], rax
jmp short loc_6A7E60
loc_6A7EBD:
jmp short $+2
loc_6A7EBF:
cmp [rbp+var_30], 0
jz short loc_6A7EEC
mov rax, [rbp+var_30]
cmp dword ptr [rax+30h], 2
jnz short loc_6A7EEC
cmp [rbp+var_28], 0
jz short loc_6A7EEC
mov rax, [rbp+var_28]
mov al, [rax+41h]
and al, 1
test al, 1
jz short loc_6A7EEC
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_6A7EEC:
mov rdi, [rbp+var_60]; this
mov rax, [rbp+var_30]
mov [rdi+7B0h], rax
call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void)
mov [rbp+var_18], rax
loc_6A7F04:
cmp [rbp+var_18], 0
jz short loc_6A7F77
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex12is_unit_nestEv; st_select_lex::is_unit_nest(void)
test al, 1
jnz short loc_6A7F1A
jmp short loc_6A7F66
loc_6A7F1A:
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex16first_inner_unitEv; st_select_lex::first_inner_unit(void)
cmp rax, 0
jz short loc_6A7F66
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex16first_inner_unitEv; st_select_lex::first_inner_unit(void)
mov ax, [rax+7F0h]
shr ax, 5
and ax, 1
test ax, 1
jnz short loc_6A7F66
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex16first_inner_unitEv; st_select_lex::first_inner_unit(void)
mov rdi, rax; this
mov rax, [rbp+var_18]
mov al, [rax+41h]
and al, 1
and al, 1
movzx esi, al; bool
call _ZN18st_select_lex_unit22optimize_bag_operationEb; st_select_lex_unit::optimize_bag_operation(bool)
loc_6A7F66:
jmp short $+2
loc_6A7F68:
mov rdi, [rbp+var_18]; this
call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void)
mov [rbp+var_18], rax
jmp short loc_6A7F04
loc_6A7F77:
mov rax, [rbp+var_60]
mov cx, [rax+7F0h]
and cx, 0FFDFh
or cx, 20h
mov [rax+7F0h], cx
loc_6A7F91:
add rsp, 70h
pop rbp
retn
| char st_select_lex_unit::optimize_bag_operation(st_select_lex_unit *this, char a2)
{
long long v2; // rax
st_select_lex_unit *inner_unit; // rax
bool v5; // [rsp+Dh] [rbp-63h]
bool v6; // [rsp+Fh] [rbp-61h]
st_select_lex *k; // [rsp+18h] [rbp-58h]
st_select_lex *j; // [rsp+20h] [rbp-50h]
st_select_lex *v9; // [rsp+28h] [rbp-48h]
st_select_lex *select; // [rsp+30h] [rbp-40h]
char v11; // [rsp+3Fh] [rbp-31h]
st_select_lex *v12; // [rsp+40h] [rbp-30h]
st_select_lex *v13; // [rsp+48h] [rbp-28h]
st_select_lex *v14; // [rsp+50h] [rbp-20h]
st_select_lex *i; // [rsp+58h] [rbp-18h]
st_select_lex *m; // [rsp+58h] [rbp-18h]
st_select_lex *n; // [rsp+58h] [rbp-18h]
v2 = *(_QWORD *)(*((_QWORD *)this + 243) + 2200LL) & 0x200LL;
if ( !v2 )
{
LOBYTE(v2) = *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 243) + 88LL) + 6202LL) & 2;
if ( !(_BYTE)v2 )
{
if ( !*((_QWORD *)this + 244)
|| (LOBYTE(v2) = Query_arena::is_stmt_prepare(*(Query_arena **)(*((_QWORD *)this + 243) + 14912LL)),
(v2 & 1) == 0) )
{
if ( !*((_QWORD *)this + 241) || (v2 = *((_QWORD *)this + 241), (*(_BYTE *)(v2 + 184) & 1) == 0) )
{
v14 = 0LL;
v13 = 0LL;
v12 = 0LL;
v11 = 0;
select = (st_select_lex *)st_select_lex_unit::first_select(this);
for ( i = (st_select_lex *)st_select_lex::next_select(select);
i;
i = (st_select_lex *)st_select_lex::next_select(i) )
{
if ( *((_DWORD *)i + 12) != 2 )
{
v13 = i;
break;
}
if ( !v14 )
v14 = i;
if ( (*((_BYTE *)i + 65) & 1) != 0 )
{
v11 = 1;
v12 = i;
}
select = i;
}
if ( !i && (a2 & 1) != 0 )
v11 = 1;
v9 = 0LL;
while ( i )
{
if ( (*((_BYTE *)i + 65) & 1) != 0 )
{
for ( j = v9; ; j = (st_select_lex *)st_select_lex::next_select(j) )
{
v6 = 0;
if ( j )
v6 = j != i;
if ( !v6 )
break;
*((_BYTE *)j + 65) = *((_BYTE *)j + 65) & 0xFE | 1;
}
v9 = 0LL;
v12 = i;
}
else if ( *((_DWORD *)i + 12) == 1 )
{
if ( !v9 )
v9 = i;
}
else
{
v9 = 0LL;
if ( (*((_BYTE *)select + 65) & 1) != 0 && (st_select_lex::is_set_op(select) & 1) != 0 )
{
*((_BYTE *)i + 65) = *((_BYTE *)i + 65) & 0xFE | 1;
v12 = i;
}
}
select = i;
i = (st_select_lex *)st_select_lex::next_select(i);
}
if ( (a2 & 1) != 0 )
{
for ( k = v9; k; k = (st_select_lex *)st_select_lex::next_select(k) )
*((_BYTE *)k + 65) = *((_BYTE *)k + 65) & 0xFE | 1;
}
if ( (v11 & 1) != 0 || v13 && (*((_BYTE *)v13 + 65) & 1) != 0 )
{
for ( m = v14; ; m = (st_select_lex *)st_select_lex::next_select(m) )
{
v5 = 0;
if ( m )
v5 = m != v13;
if ( !v5 )
break;
*((_BYTE *)m + 65) = *((_BYTE *)m + 65) & 0xFE | 1;
if ( v12 && *((_DWORD *)v12 + 12) == 2 )
v12 = m;
}
}
if ( v12 && *((_DWORD *)v12 + 12) == 2 && v13 && (*((_BYTE *)v13 + 65) & 1) != 0 )
v12 = v13;
*((_QWORD *)this + 246) = v12;
for ( n = (st_select_lex *)st_select_lex_unit::first_select(this);
n;
n = (st_select_lex *)st_select_lex::next_select(n) )
{
if ( (st_select_lex::is_unit_nest(n) & 1) != 0
&& st_select_lex::first_inner_unit(n)
&& ((*(_WORD *)(st_select_lex::first_inner_unit(n) + 2032) >> 5) & 1) == 0 )
{
inner_unit = (st_select_lex_unit *)st_select_lex::first_inner_unit(n);
st_select_lex_unit::optimize_bag_operation(inner_unit, *((_BYTE *)n + 65) & 1);
}
}
LOBYTE(v2) = (_BYTE)this;
*((_WORD *)this + 1016) = *((_WORD *)this + 1016) & 0xFFDF | 0x20;
}
}
}
}
return v2;
}
| func_name_ext:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x18],RDI
MOVUPS XMM0,xmmword ptr [0x014e36f8]
MOVAPS xmmword ptr [RBP + -0x10],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
POP RBP
RET
|
/* Item_func_trim_oracle::func_name_ext() const */
int1 [16] Item_func_trim_oracle::func_name_ext(void)
{
int1 auVar1 [16];
auVar1._8_8_ = func_name_ext()::name_ext._8_8_;
auVar1._0_8_ = func_name_ext()::name_ext._0_8_;
return auVar1;
}
| |
50,874 | st_select_lex_unit::optimize_bag_operation(bool) | eloqsql/sql/sql_union.cc | void st_select_lex_unit::optimize_bag_operation(bool is_outer_distinct)
{
/*
skip run optimize for:
ORACLE MODE
CREATE VIEW
PREPARE ... FROM
recursive
*/
if ((thd->variables.sql_mode & MODE_ORACLE) ||
(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW) ||
(fake_select_lex != NULL && thd->stmt_arena->is_stmt_prepare()) ||
(with_element && with_element->is_recursive ))
return;
DBUG_ASSERT(!bag_set_op_optimized);
SELECT_LEX *sl;
/* INTERSECT subsequence can occur only at the very beginning */
/* The first select with linkage == INTERSECT_TYPE */
SELECT_LEX *intersect_start= NULL;
/* The first select after the INTERSECT subsequence */
SELECT_LEX *intersect_end= NULL;
/*
Will point to the last node before UNION ALL subsequence.
Index can be disable there.
*/
SELECT_LEX *disable_index= NULL;
/*
True if there is a select with:
linkage == INTERSECT_TYPE && distinct==true
*/
bool any_intersect_distinct= false;
SELECT_LEX *prev_sl= first_select();
/* process INTERSECT subsequence in the begining */
for (sl= prev_sl->next_select(); sl; prev_sl= sl, sl= sl->next_select())
{
if (sl->linkage != INTERSECT_TYPE)
{
intersect_end= sl;
break;
}
else
{
if (!intersect_start)
intersect_start= sl;
if (sl->distinct)
{
any_intersect_distinct= true;
disable_index= sl;
}
}
}
/* if subquery only contains INTERSECT and outer is UNION DISTINCT*/
if (!sl && is_outer_distinct)
any_intersect_distinct= true;
/* The first select of the current UNION ALL subsequence */
SELECT_LEX *union_all_start= NULL;
for ( ; sl; prev_sl= sl, sl= sl->next_select())
{
DBUG_ASSERT (sl->linkage != INTERSECT_TYPE);
if (!sl->distinct)
{
if (sl->linkage == UNION_TYPE)
{
if (!union_all_start)
{
union_all_start= sl;
}
}
else
{
DBUG_ASSERT (sl->linkage == EXCEPT_TYPE);
union_all_start= NULL;
if (prev_sl->distinct && prev_sl->is_set_op())
{
sl->distinct= true;
disable_index= sl;
}
}
}
else
{ /* sl->distinct == true */
for (SELECT_LEX *si= union_all_start; si && si != sl; si= si->next_select())
{
si->distinct= true;
}
union_all_start= NULL;
disable_index= sl;
}
}
if (is_outer_distinct)
{
for (SELECT_LEX *si= union_all_start; si && si != sl; si= si->next_select())
{
si->distinct= true;
}
union_all_start= NULL;
}
if (any_intersect_distinct ||
(intersect_end != NULL && intersect_end->distinct))
{
for (sl= intersect_start; sl && sl != intersect_end; sl= sl->next_select())
{
sl->distinct= true;
if (disable_index && disable_index->linkage == INTERSECT_TYPE)
disable_index= sl;
}
}
/*
if disable_index points to a INTERSECT, based on rule 1 we can set it
to the last INTERSECT node.
*/
if (disable_index && disable_index->linkage == INTERSECT_TYPE &&
intersect_end && intersect_end->distinct)
disable_index= intersect_end;
/* union_distinct controls when to disable index */
union_distinct= disable_index;
/* recursive call this function for whole lex tree */
for(sl= first_select(); sl; sl= sl->next_select())
{
if (sl->is_unit_nest() &&
sl->first_inner_unit() &&
!sl->first_inner_unit()->bag_set_op_optimized)
sl->first_inner_unit()->optimize_bag_operation(sl->distinct);
}
/* mark as optimized */
bag_set_op_optimized= true;
} | O3 | cpp | st_select_lex_unit::optimize_bag_operation(bool):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x798(%rdi), %rax
testb $0x2, 0x899(%rax)
jne 0x594c46
movq 0x58(%rax), %rcx
testb $0x2, 0x183a(%rcx)
jne 0x594c46
movq %rdi, %rbx
cmpq $0x0, 0x7a0(%rdi)
je 0x594aae
movq 0x3a40(%rax), %rax
cmpl $0x0, 0x18(%rax)
je 0x594c46
movq 0x788(%rbx), %rax
testq %rax, %rax
je 0x594ac7
cmpb $0x0, 0xb8(%rax)
jne 0x594c46
movq 0x18(%rbx), %r10
movq (%r10), %rax
testq %rax, %rax
je 0x594b05
cmpl $0x2, 0x30(%rax)
jne 0x594b25
xorl %edx, %edx
xorl %ecx, %ecx
xorl %edi, %edi
movq %rax, %r10
testq %rdx, %rdx
cmoveq %rax, %rdx
movb 0x41(%rax), %al
testb $0x1, %al
cmovneq %r10, %rcx
orb %al, %dil
movq (%r10), %rax
testq %rax, %rax
je 0x594b0b
cmpl $0x2, 0x30(%rax)
je 0x594adf
jmp 0x594b2b
xorl %edx, %edx
xorl %ecx, %ecx
xorl %edi, %edi
xorl %eax, %eax
testb %sil, %sil
jne 0x594bdb
testb $0x1, %dil
je 0x594be5
jmp 0x594bdb
xorl %edi, %edi
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r9d, %r9d
movq %rax, %r8
movb 0x41(%r8), %r11b
testb $0x1, %r11b
je 0x594b61
testq %r9, %r9
sete %cl
cmpq %r8, %r9
sete %r10b
orb %cl, %r10b
jne 0x594b8d
orb $0x1, 0x41(%r9)
movq (%r9), %r9
testq %r9, %r9
je 0x594b8d
cmpq %r8, %r9
jne 0x594b4d
jmp 0x594b8d
cmpl $0x1, 0x30(%r8)
jne 0x594b71
testq %r9, %r9
cmoveq %r8, %r9
jmp 0x594b93
testb $0x1, 0x41(%r10)
je 0x594b90
movl 0x30(%r10), %r9d
decl %r9d
cmpl $0x2, %r9d
ja 0x594b90
orb $0x1, %r11b
movb %r11b, 0x41(%r8)
movq %r8, %rcx
xorl %r9d, %r9d
movq %r8, %r10
movq (%r8), %r11
movq %r11, %r8
testq %r11, %r11
jne 0x594b31
testb %sil, %sil
je 0x594bb5
testq %r9, %r9
je 0x594bb5
orb $0x1, 0x41(%r9)
movq (%r9), %r9
jmp 0x594ba6
testb $0x1, %dil
jne 0x594bdb
testb $0x1, 0x41(%rax)
jne 0x594bdb
jmp 0x594be5
orb $0x1, 0x41(%rdx)
testq %rcx, %rcx
je 0x594bd6
cmpl $0x2, 0x30(%rcx)
cmoveq %rdx, %rcx
jmp 0x594bd8
xorl %ecx, %ecx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x594be5
cmpq %rax, %rdx
jne 0x594bc3
testq %rcx, %rcx
je 0x594bff
testq %rax, %rax
je 0x594c01
cmpl $0x2, 0x30(%rcx)
jne 0x594c01
testb $0x1, 0x41(%rax)
cmovneq %rax, %rcx
jmp 0x594c01
xorl %ecx, %ecx
movq %rcx, 0x7b0(%rbx)
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x594c3f
testb $0x1, 0x414(%r14)
je 0x594c3a
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x594c3a
testb $0x20, 0x7f0(%rdi)
jne 0x594c3a
movzbl 0x41(%r14), %esi
andl $0x1, %esi
callq 0x594a64
movq (%r14), %r14
jmp 0x594c0c
orb $0x20, 0x7f0(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN18st_select_lex_unit22optimize_bag_operationEb:
push rbp
mov rbp, rsp
push r14
push rbx
mov rax, [rdi+798h]
test byte ptr [rax+899h], 2
jnz loc_594C46
mov rcx, [rax+58h]
test byte ptr [rcx+183Ah], 2
jnz loc_594C46
mov rbx, rdi
cmp qword ptr [rdi+7A0h], 0
jz short loc_594AAE
mov rax, [rax+3A40h]
cmp dword ptr [rax+18h], 0
jz loc_594C46
loc_594AAE:
mov rax, [rbx+788h]
test rax, rax
jz short loc_594AC7
cmp byte ptr [rax+0B8h], 0
jnz loc_594C46
loc_594AC7:
mov r10, [rbx+18h]
mov rax, [r10]
test rax, rax
jz short loc_594B05
cmp dword ptr [rax+30h], 2
jnz short loc_594B25
xor edx, edx
xor ecx, ecx
xor edi, edi
loc_594ADF:
mov r10, rax
test rdx, rdx
cmovz rdx, rax
mov al, [rax+41h]
test al, 1
cmovnz rcx, r10
or dil, al
mov rax, [r10]
test rax, rax
jz short loc_594B0B
cmp dword ptr [rax+30h], 2
jz short loc_594ADF
jmp short loc_594B2B
loc_594B05:
xor edx, edx
xor ecx, ecx
xor edi, edi
loc_594B0B:
xor eax, eax
test sil, sil
jnz loc_594BDB
test dil, 1
jz loc_594BE5
jmp loc_594BDB
loc_594B25:
xor edi, edi
xor ecx, ecx
xor edx, edx
loc_594B2B:
xor r9d, r9d
mov r8, rax
loc_594B31:
mov r11b, [r8+41h]
test r11b, 1
jz short loc_594B61
test r9, r9
setz cl
cmp r9, r8
setz r10b
or r10b, cl
jnz short loc_594B8D
loc_594B4D:
or byte ptr [r9+41h], 1
mov r9, [r9]
test r9, r9
jz short loc_594B8D
cmp r9, r8
jnz short loc_594B4D
jmp short loc_594B8D
loc_594B61:
cmp dword ptr [r8+30h], 1
jnz short loc_594B71
test r9, r9
cmovz r9, r8
jmp short loc_594B93
loc_594B71:
test byte ptr [r10+41h], 1
jz short loc_594B90
mov r9d, [r10+30h]
dec r9d
cmp r9d, 2
ja short loc_594B90
or r11b, 1
mov [r8+41h], r11b
loc_594B8D:
mov rcx, r8
loc_594B90:
xor r9d, r9d
loc_594B93:
mov r10, r8
mov r11, [r8]
mov r8, r11
test r11, r11
jnz short loc_594B31
test sil, sil
jz short loc_594BB5
loc_594BA6:
test r9, r9
jz short loc_594BB5
or byte ptr [r9+41h], 1
mov r9, [r9]
jmp short loc_594BA6
loc_594BB5:
test dil, 1
jnz short loc_594BDB
test byte ptr [rax+41h], 1
jnz short loc_594BDB
jmp short loc_594BE5
loc_594BC3:
or byte ptr [rdx+41h], 1
test rcx, rcx
jz short loc_594BD6
cmp dword ptr [rcx+30h], 2
cmovz rcx, rdx
jmp short loc_594BD8
loc_594BD6:
xor ecx, ecx
loc_594BD8:
mov rdx, [rdx]
loc_594BDB:
test rdx, rdx
jz short loc_594BE5
cmp rdx, rax
jnz short loc_594BC3
loc_594BE5:
test rcx, rcx
jz short loc_594BFF
test rax, rax
jz short loc_594C01
cmp dword ptr [rcx+30h], 2
jnz short loc_594C01
test byte ptr [rax+41h], 1
cmovnz rcx, rax
jmp short loc_594C01
loc_594BFF:
xor ecx, ecx
loc_594C01:
mov [rbx+7B0h], rcx
mov r14, [rbx+18h]
loc_594C0C:
test r14, r14
jz short loc_594C3F
test byte ptr [r14+414h], 1
jz short loc_594C3A
mov rdi, [r14+18h]; this
test rdi, rdi
jz short loc_594C3A
test byte ptr [rdi+7F0h], 20h
jnz short loc_594C3A
movzx esi, byte ptr [r14+41h]
and esi, 1; bool
call _ZN18st_select_lex_unit22optimize_bag_operationEb; st_select_lex_unit::optimize_bag_operation(bool)
loc_594C3A:
mov r14, [r14]
jmp short loc_594C0C
loc_594C3F:
or byte ptr [rbx+7F0h], 20h
loc_594C46:
pop rbx
pop r14
pop rbp
retn
| long long st_select_lex_unit::optimize_bag_operation(st_select_lex_unit *this, char a2)
{
long long result; // rax
long long v4; // r10
long long v5; // rdx
long long v6; // rcx
char v7; // di
char v8; // al
long long v9; // r9
long long v10; // r8
char v11; // r11
long long *i; // r14
st_select_lex_unit *v13; // rdi
result = *((_QWORD *)this + 243);
if ( (*(_BYTE *)(result + 2201) & 2) != 0 )
return result;
if ( (*(_BYTE *)(*(_QWORD *)(result + 88) + 6202LL) & 2) != 0 )
return result;
if ( *((_QWORD *)this + 244) )
{
result = *(_QWORD *)(result + 14912);
if ( !*(_DWORD *)(result + 24) )
return result;
}
result = *((_QWORD *)this + 241);
if ( result )
{
if ( *(_BYTE *)(result + 184) )
return result;
}
v4 = *((_QWORD *)this + 3);
result = *(_QWORD *)v4;
if ( !*(_QWORD *)v4 )
{
v5 = 0LL;
v6 = 0LL;
v7 = 0;
LABEL_18:
result = 0LL;
if ( !a2 && (v7 & 1) == 0 )
goto LABEL_52;
goto LABEL_50;
}
if ( *(_DWORD *)(result + 48) == 2 )
{
v5 = 0LL;
v6 = 0LL;
v7 = 0;
while ( 1 )
{
v4 = result;
if ( !v5 )
v5 = result;
v8 = *(_BYTE *)(result + 65);
if ( (v8 & 1) != 0 )
v6 = v4;
v7 |= v8;
result = *(_QWORD *)v4;
if ( !*(_QWORD *)v4 )
goto LABEL_18;
if ( *(_DWORD *)(result + 48) != 2 )
goto LABEL_22;
}
}
v7 = 0;
v6 = 0LL;
v5 = 0LL;
LABEL_22:
v9 = 0LL;
v10 = result;
do
{
v11 = *(_BYTE *)(v10 + 65);
if ( (v11 & 1) != 0 )
{
if ( v9 != 0 && v9 != v10 )
{
do
{
*(_BYTE *)(v9 + 65) |= 1u;
v9 = *(_QWORD *)v9;
}
while ( v9 && v9 != v10 );
}
goto LABEL_35;
}
if ( *(_DWORD *)(v10 + 48) != 1 )
{
if ( (*(_BYTE *)(v4 + 65) & 1) == 0 || (unsigned int)(*(_DWORD *)(v4 + 48) - 1) > 2 )
goto LABEL_36;
*(_BYTE *)(v10 + 65) = v11 | 1;
LABEL_35:
v6 = v10;
LABEL_36:
v9 = 0LL;
goto LABEL_37;
}
if ( !v9 )
v9 = v10;
LABEL_37:
v4 = v10;
v10 = *(_QWORD *)v10;
}
while ( v10 );
if ( a2 )
{
while ( v9 )
{
*(_BYTE *)(v9 + 65) |= 1u;
v9 = *(_QWORD *)v9;
}
}
if ( (v7 & 1) != 0 || (*(_BYTE *)(result + 65) & 1) != 0 )
{
LABEL_50:
while ( v5 && v5 != result )
{
*(_BYTE *)(v5 + 65) |= 1u;
if ( v6 )
{
if ( *(_DWORD *)(v6 + 48) == 2 )
v6 = v5;
}
else
{
v6 = 0LL;
}
v5 = *(_QWORD *)v5;
}
}
LABEL_52:
if ( v6 )
{
if ( result && *(_DWORD *)(v6 + 48) == 2 && (*(_BYTE *)(result + 65) & 1) != 0 )
v6 = result;
}
else
{
v6 = 0LL;
}
*((_QWORD *)this + 246) = v6;
for ( i = (long long *)*((_QWORD *)this + 3); i; i = (long long *)*i )
{
if ( (*((_BYTE *)i + 1044) & 1) != 0 )
{
v13 = (st_select_lex_unit *)i[3];
if ( v13 )
{
if ( (*((_BYTE *)v13 + 2032) & 0x20) == 0 )
result = st_select_lex_unit::optimize_bag_operation(v13, *((_BYTE *)i + 65) & 1);
}
}
}
*((_BYTE *)this + 2032) |= 0x20u;
return result;
}
| |||
50,875 | minja::Value::at(unsigned long) | monkey531[P]llama/common/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O1 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
jne 0x75a0e
testq %rcx, %rcx
jne 0x75a0e
cmpb $0x0, 0x40(%r14)
jne 0x75a0e
cmpq $0x0, 0x30(%r14)
je 0x75a59
testq %rcx, %rcx
je 0x75a41
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x75a8b
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
jmp 0x75a50
testq %rdi, %rdi
je 0x75a99
leaq 0x8(%rsp), %rsi
callq 0x75d76
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x19370
movq %rax, %rbx
leaq 0x484b1(%rip), %rsi # 0xbdf1e
movq %rax, %rdi
callq 0x19270
movq 0x7956c(%rip), %rsi # 0xeefe8
movq 0x794e5(%rip), %rdx # 0xeef68
movq %rbx, %rdi
callq 0x19b70
leaq 0x48bd2(%rip), %rdi # 0xbe664
xorl %eax, %eax
callq 0x19a20
movl $0x10, %edi
callq 0x19370
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x6c964
leaq 0x48b81(%rip), %rsi # 0xbe642
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3779b
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x19ac0
xorl %ebp, %ebp
movq 0x794ff(%rip), %rsi # 0xeefe8
movq 0x79478(%rip), %rdx # 0xeef68
movq %rbx, %rdi
callq 0x19b70
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75b1e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x75b1e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75b41
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x75b41
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x75b4b
jmp 0x75b53
movq %rax, %r14
movq %rbx, %rdi
callq 0x19510
movq %r14, %rdi
callq 0x19be0
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov r14, rdi
mov [rsp+68h+var_60], rsi
mov rcx, [rdi+10h]
mov rdi, [rdi+20h]
test rdi, rdi
jnz short loc_75A0E
test rcx, rcx
jnz short loc_75A0E
cmp byte ptr [r14+40h], 0
jnz short loc_75A0E
cmp qword ptr [r14+30h], 0
jz short loc_75A59
loc_75A0E:
test rcx, rcx
jz short loc_75A41
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_75A8B
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
jmp short loc_75A50
loc_75A41:
test rdi, rdi
jz short loc_75A99
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
loc_75A50:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_75A59:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_75A8B:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_75A99:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75B1E
mov rsi, [rsp+68h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_75B1E
mov r14, rax
mov bpl, 1
loc_75B1E:
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_75B41
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_75B41
mov r14, rax
mov bpl, 1
loc_75B41:
test bpl, bpl
jnz short loc_75B4B
jmp short loc_75B53
mov r14, rax
loc_75B4B:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_75B53:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, unsigned long long a2)
{
_QWORD *v3; // rcx
long long v4; // rdi
unsigned long long v5; // rdx
std::runtime_error *exception; // rbx
void *v8; // rbx
unsigned long long v9; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v11[16]; // [rsp+30h] [rbp-38h] BYREF
v9 = a2;
v3 = (_QWORD *)*((_QWORD *)this + 2);
v4 = *((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v5);
return 80 * a2 + *v3;
}
else
{
if ( !v4 )
{
v8 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v8, v11);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v4,
&v9);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RCX,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x20]
TEST RDI,RDI
JNZ 0x00175a0e
TEST RCX,RCX
JNZ 0x00175a0e
CMP byte ptr [R14 + 0x40],0x0
JNZ 0x00175a0e
CMP qword ptr [R14 + 0x30],0x0
JZ 0x00175a59
LAB_00175a0e:
TEST RCX,RCX
JZ 0x00175a41
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x00175a8b
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
JMP 0x00175a50
LAB_00175a41:
TEST RDI,RDI
JZ 0x00175a99
LEA RSI,[RSP + 0x8]
CALL 0x00175d76
LAB_00175a50:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00175a59:
MOV EDI,0x10
CALL 0x00119370
MOV RBX,RAX
LAB_00175a66:
LEA RSI,[0x1bdf1e]
MOV RDI,RAX
CALL 0x00119270
LAB_00175a75:
MOV RSI,qword ptr [0x001eefe8]
MOV RDX,qword ptr [0x001eef68]
MOV RDI,RBX
CALL 0x00119b70
LAB_00175a8b:
LEA RDI,[0x1be664]
XOR EAX,EAX
CALL 0x00119a20
LAB_00175a99:
MOV EDI,0x10
CALL 0x00119370
MOV RBX,RAX
LAB_00175aa6:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0016c964
LAB_00175aba:
LEA RSI,[0x1be642]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x0013779b
MOV BPL,0x1
LAB_00175ad3:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00119ac0
XOR EBP,EBP
MOV RSI,qword ptr [0x001eefe8]
MOV RDX,qword ptr [0x001eef68]
MOV RDI,RBX
CALL 0x00119b70
|
/* minja::Value::at(unsigned long) */
long __thiscall minja::Value::at(Value *this,ulong param_1)
{
long *plVar1;
long lVar2;
runtime_error *prVar3;
ulong uVar4;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
plVar1 = *(long **)(this + 0x10);
lVar2 = *(long *)(this + 0x20);
local_60 = param_1;
if ((((lVar2 == 0) && (plVar1 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00175a66 to 00175a74 has its CatchHandler @ 00175b48 */
std::runtime_error::runtime_error(prVar3,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68);
}
if (plVar1 == (long *)0x0) {
if (lVar2 == 0) goto LAB_00175a99;
lVar2 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(lVar2,&local_60);
}
else {
uVar4 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar4 < param_1 || uVar4 - param_1 == 0) {
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
LAB_00175a99:
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00175aa6 to 00175ab9 has its CatchHandler @ 00175b3b */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 00175aba to 00175acf has its CatchHandler @ 00175b18 */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 00175ad3 to 00175af7 has its CatchHandler @ 00175af8 */
std::runtime_error::runtime_error(prVar3,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68);
}
lVar2 = *plVar1 + param_1 * 0x50;
}
return lVar2;
}
| |
50,876 | maria_versioning | eloqsql/storage/maria/ma_state.c | void maria_versioning(MARIA_HA *info, my_bool versioning)
{
MARIA_SHARE *share= info->s;
DBUG_ENTER("maria_versioning");
/* For now, this is a hack */
if (share->have_versioning)
{
enum thr_lock_type save_lock_type;
share->lock_key_trees= versioning;
/* Set up info->lock.type temporary for _ma_block_get_status() */
save_lock_type= info->lock.type;
info->lock.type= versioning ? TL_WRITE_CONCURRENT_INSERT : TL_WRITE;
_ma_block_get_status((void*) info, versioning);
info->lock.type= save_lock_type;
if (versioning)
info->state= &share->state.common;
else
info->state= &share->state.state; /* Change global values by default */
info->state_start= info->state; /* Initial values */
}
DBUG_VOID_RETURN;
} | O0 | c | maria_versioning:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x7e8(%rax)
je 0x38668
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x7e3(%rax)
movq -0x8(%rbp), %rax
movl 0x6d0(%rax), %eax
movl %eax, -0x1c(%rbp)
movsbl -0x9(%rbp), %edx
movl $0xd, %ecx
movl $0x8, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x6d0(%rax)
movq -0x8(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x383a0
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x6d0(%rax)
cmpb $0x0, -0x9(%rbp)
je 0x38648
movq -0x18(%rbp), %rcx
addq $0x50, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x38658
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x3866a
jmp 0x3866c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| maria_versioning:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp byte ptr [rax+7E8h], 0
jz loc_38668
mov cl, [rbp+var_9]
mov rax, [rbp+var_18]
mov [rax+7E3h], cl
mov rax, [rbp+var_8]
mov eax, [rax+6D0h]
mov [rbp+var_1C], eax
movsx edx, [rbp+var_9]
mov ecx, 0Dh
mov eax, 8
cmp edx, 0
cmovnz ecx, eax
mov rax, [rbp+var_8]
mov [rax+6D0h], ecx
mov rdi, [rbp+var_8]
movsx esi, [rbp+var_9]
call _ma_block_get_status
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_8]
mov [rax+6D0h], ecx
cmp [rbp+var_9], 0
jz short loc_38648
mov rcx, [rbp+var_18]
add rcx, 50h ; 'P'
mov rax, [rbp+var_8]
mov [rax+20h], rcx
jmp short loc_38658
loc_38648:
mov rcx, [rbp+var_18]
add rcx, 18h
mov rax, [rbp+var_8]
mov [rax+20h], rcx
loc_38658:
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
mov rax, [rbp+var_8]
mov [rax+60h], rcx
loc_38668:
jmp short $+2
loc_3866A:
jmp short $+2
loc_3866C:
add rsp, 20h
pop rbp
retn
| long long maria_versioning(long long a1, char a2)
{
long long result; // rax
int v3; // ecx
int v4; // [rsp+4h] [rbp-1Ch]
long long v5; // [rsp+8h] [rbp-18h]
v5 = *(_QWORD *)a1;
result = *(_QWORD *)a1;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2024LL) )
{
*(_BYTE *)(v5 + 2019) = a2;
v4 = *(_DWORD *)(a1 + 1744);
v3 = 13;
if ( a2 )
v3 = 8;
*(_DWORD *)(a1 + 1744) = v3;
ma_block_get_status(a1, a2);
*(_DWORD *)(a1 + 1744) = v4;
if ( a2 )
*(_QWORD *)(a1 + 32) = v5 + 80;
else
*(_QWORD *)(a1 + 32) = v5 + 24;
result = a1;
*(_QWORD *)(a1 + 96) = *(_QWORD *)(a1 + 32);
}
return result;
}
| maria_versioning:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0x7e8],0x0
JZ 0x00138668
MOV CL,byte ptr [RBP + -0x9]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x7e3],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x6d0]
MOV dword ptr [RBP + -0x1c],EAX
MOVSX EDX,byte ptr [RBP + -0x9]
MOV ECX,0xd
MOV EAX,0x8
CMP EDX,0x0
CMOVNZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x6d0],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOVSX ESI,byte ptr [RBP + -0x9]
CALL 0x001383a0
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x6d0],ECX
CMP byte ptr [RBP + -0x9],0x0
JZ 0x00138648
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x50
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x00138658
LAB_00138648:
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
LAB_00138658:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],RCX
LAB_00138668:
JMP 0x0013866a
LAB_0013866a:
JMP 0x0013866c
LAB_0013866c:
ADD RSP,0x20
POP RBP
RET
|
void maria_versioning(long *param_1,char param_2)
{
long lVar1;
long lVar2;
int4 uVar3;
lVar1 = *param_1;
if (*(char *)(lVar1 + 0x7e8) != '\0') {
*(char *)(lVar1 + 0x7e3) = param_2;
lVar2 = param_1[0xda];
uVar3 = 0xd;
if (param_2 != '\0') {
uVar3 = 8;
}
*(int4 *)(param_1 + 0xda) = uVar3;
_ma_block_get_status(param_1,(int)param_2);
*(int *)(param_1 + 0xda) = (int)lVar2;
if (param_2 == '\0') {
param_1[4] = lVar1 + 0x18;
}
else {
param_1[4] = lVar1 + 0x50;
}
param_1[0xc] = param_1[4];
}
return;
}
| |
50,877 | FTB_WORD_cmp_list | eloqsql/storage/myisam/ft_boolean_search.c | static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
{
/* ORDER BY word, ndepth */
int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1,
(uchar*) (*b)->word + 1, (*b)->len - 1, 0);
if (!i)
i= CMP_NUM((*a)->ndepth, (*b)->ndepth);
return i;
} | O3 | c | FTB_WORD_cmp_list:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rsi
movl 0x48(%rsi), %edx
addq $0x4e, %rsi
decl %edx
movq (%rbx), %rcx
movl 0x48(%rcx), %r8d
addq $0x4e, %rcx
decl %r8d
xorl %r9d, %r9d
callq 0xa5ad0
testl %eax, %eax
jne 0x76f4e
movq (%r14), %rax
movl 0x44(%rax), %eax
movq (%rbx), %rcx
xorl %edx, %edx
cmpl 0x44(%rcx), %eax
setne %dl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovael %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
| FTB_WORD_cmp_list:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov rsi, [rsi]
mov edx, [rsi+48h]
add rsi, 4Eh ; 'N'
dec edx
mov rcx, [rbx]
mov r8d, [rcx+48h]
add rcx, 4Eh ; 'N'
dec r8d
xor r9d, r9d
call ha_compare_text
test eax, eax
jnz short loc_76F4E
mov rax, [r14]
mov eax, [rax+44h]
mov rcx, [rbx]
xor edx, edx
cmp eax, [rcx+44h]
setnz dl
mov eax, 0FFFFFFFFh
cmovnb eax, edx
loc_76F4E:
pop rbx
pop r14
pop rbp
retn
| long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3)
{
long long result; // rax
unsigned int v5; // eax
bool v6; // cf
BOOL v7; // edx
result = ha_compare_text(
a1,
*(_QWORD *)a2 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1),
*(_QWORD *)a3 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1),
0LL);
if ( !(_DWORD)result )
{
v5 = *(_DWORD *)(*(_QWORD *)a2 + 68LL);
v6 = v5 < *(_DWORD *)(*(_QWORD *)a3 + 68LL);
v7 = v5 != *(_DWORD *)(*(_QWORD *)a3 + 68LL);
result = 0xFFFFFFFFLL;
if ( !v6 )
return v7;
}
return result;
}
| FTB_WORD_cmp_list:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [RSI + 0x48]
ADD RSI,0x4e
DEC EDX
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RCX + 0x48]
ADD RCX,0x4e
DEC R8D
XOR R9D,R9D
CALL 0x001a5ad0
TEST EAX,EAX
JNZ 0x00176f4e
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBX]
XOR EDX,EDX
CMP EAX,dword ptr [RCX + 0x44]
SETNZ DL
MOV EAX,0xffffffff
CMOVNC EAX,EDX
LAB_00176f4e:
POP RBX
POP R14
POP RBP
RET
|
ulong FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3)
{
ulong uVar1;
uVar1 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e,
*(int *)(*param_3 + 0x48) + -1,0);
if ((int)uVar1 == 0) {
uVar1 = 0xffffffff;
if (*(uint *)(*param_3 + 0x44) <= *(uint *)(*param_2 + 0x44)) {
uVar1 = (ulong)(*(uint *)(*param_2 + 0x44) != *(uint *)(*param_3 + 0x44));
}
}
return uVar1;
}
| |
50,878 | psi_rwlock_wrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_wrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O3 | c | psi_rwlock_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x359328(%rip), %r15 # 0x3880c0
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xa5321
movl %eax, %r14d
testq %rbx, %rbx
je 0x2edd1
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_rwlock_wrlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
push 1
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call my_rw_wrlock
mov r14d, eax
test rbx, rbx
jz short loc_2EDD1
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_2EDD1:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_rwlock_wrlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 144),
1LL,
a2,
a3);
v4 = my_rw_wrlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4);
return v4;
}
| psi_rwlock_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x4880c0]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001a5321
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012edd1
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_0012edd1:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_wrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3);
uVar1 = my_rw_wrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
| |
50,879 | tdefl_compress_mem_to_output | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len,
tdefl_put_buf_func_ptr pPut_buf_func,
void *pPut_buf_user, int flags) {
tdefl_compressor *pComp;
mz_bool succeeded;
if (((buf_len) && (!pBuf)) || (!pPut_buf_func))
return MZ_FALSE;
pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
if (!pComp)
return MZ_FALSE;
succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) ==
TDEFL_STATUS_OKAY);
succeeded =
succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) ==
TDEFL_STATUS_DONE);
MZ_FREE(pComp);
return succeeded;
} | O1 | c | tdefl_compress_mem_to_output:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %cl
andb %al, %cl
testq %rdx, %rdx
sete %al
xorl %ebp, %ebp
orb %cl, %al
jne 0x82d3d
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movl %r8d, 0xc(%rsp)
movl $0x4df78, %edi # imm = 0x4DF78
callq 0xa7c0
testq %rax, %rax
je 0x82d3d
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl 0xc(%rsp), %ecx
callq 0x7ed3f
leaq 0x10(%rsp), %rdx
movq %r15, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4, %r9d
callq 0x7f044
xorl %ebp, %ebp
cmpl $0x1, %eax
sete %bpl
movq %r14, %rdi
callq 0xa700
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tdefl_compress_mem_to_output:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rcx
test rsi, rsi
setnz al
test rdi, rdi
setz cl
and cl, al
test rdx, rdx
setz al
xor ebp, ebp
or al, cl
jnz short loc_82D3D
mov r13, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+48h+var_3C], r8d
mov edi, 4DF78h
call _malloc
test rax, rax
jz short loc_82D3D
mov r14, rax
mov rdi, rax
mov rsi, r13
mov rdx, r12
mov ecx, [rsp+48h+var_3C]
call tdefl_init
lea rdx, [rsp+48h+var_38]
mov [rdx], r15
mov rdi, r14
mov rsi, rbx
xor ecx, ecx
xor r8d, r8d
mov r9d, 4
call tdefl_compress
xor ebp, ebp
cmp eax, 1
setz bpl
mov rdi, r14
call _free
loc_82D3D:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 tdefl_compress_mem_to_output(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
BOOL v6; // ebp
long long v8; // rax
long long v9; // r14
long long v12[7]; // [rsp+10h] [rbp-38h] BYREF
v6 = 0;
if ( (a2 == 0 || a1 != 0) && a3 != 0 )
{
v8 = malloc(319352LL);
if ( v8 )
{
v9 = v8;
tdefl_init(v8, a3, a4, a5);
v12[0] = a2;
v6 = tdefl_compress(v9, a1, v12, 0LL, 0LL, 4u) == 1;
free(v9);
}
}
return v6;
}
| |||
50,880 | tdefl_compress_mem_to_output | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len,
tdefl_put_buf_func_ptr pPut_buf_func,
void *pPut_buf_user, int flags) {
tdefl_compressor *pComp;
mz_bool succeeded;
if (((buf_len) && (!pBuf)) || (!pPut_buf_func))
return MZ_FALSE;
pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
if (!pComp)
return MZ_FALSE;
succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) ==
TDEFL_STATUS_OKAY);
succeeded =
succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) ==
TDEFL_STATUS_DONE);
MZ_FREE(pComp);
return succeeded;
} | O2 | c | tdefl_compress_mem_to_output:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %cl
andb %al, %cl
testq %rdx, %rdx
sete %al
xorl %ebp, %ebp
orb %cl, %al
jne 0x5d25e
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
movl $0x4df78, %edi # imm = 0x4DF78
callq 0xa7e0
testq %rax, %rax
je 0x5d25e
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl 0x4(%rsp), %ecx
callq 0x59946
pushq $0x4
popq %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5d1c2
xorl %ebp, %ebp
cmpl $0x1, %eax
sete %bpl
movq %r12, %rdi
callq 0xa710
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tdefl_compress_mem_to_output:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rcx
test rsi, rsi
setnz al
test rdi, rdi
setz cl
and cl, al
test rdx, rdx
setz al
xor ebp, ebp
or al, cl
jnz short loc_5D25E
mov r13, rdx
mov rbx, rsi
mov r14, rdi
mov [rsp+38h+var_34], r8d
mov edi, 4DF78h
call _malloc
test rax, rax
jz short loc_5D25E
mov r12, rax
mov rdi, rax
mov rsi, r13
mov rdx, r15
mov ecx, [rsp+38h+var_34]
call tdefl_init
push 4
pop rcx
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call tdefl_compress_buffer
xor ebp, ebp
cmp eax, 1
setz bpl
mov rdi, r12
call _free
loc_5D25E:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 tdefl_compress_mem_to_output(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
BOOL v6; // ebp
long long v8; // rax
long long v9; // r12
v6 = 0;
if ( (a2 == 0 || a1 != 0) && a3 != 0 )
{
v8 = malloc(319352LL);
if ( v8 )
{
v9 = v8;
tdefl_init(v8, a3, a4, a5);
v6 = tdefl_compress_buffer(v9, a1, a2, 4u) == 1;
free(v9);
}
}
return v6;
}
| tdefl_compress_mem_to_output:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RCX
TEST RSI,RSI
SETNZ AL
TEST RDI,RDI
SETZ CL
AND CL,AL
TEST RDX,RDX
SETZ AL
XOR EBP,EBP
OR AL,CL
JNZ 0x0015d25e
MOV R13,RDX
MOV RBX,RSI
MOV R14,RDI
MOV dword ptr [RSP + 0x4],R8D
MOV EDI,0x4df78
CALL 0x0010a7e0
TEST RAX,RAX
JZ 0x0015d25e
MOV R12,RAX
MOV RDI,RAX
MOV RSI,R13
MOV RDX,R15
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x00159946
PUSH 0x4
POP RCX
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL 0x0015d1c2
XOR EBP,EBP
CMP EAX,0x1
SETZ BPL
MOV RDI,R12
CALL 0x0010a710
LAB_0015d25e:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool tdefl_compress_mem_to_output
(long param_1,long param_2,long param_3,int8 param_4,int4 param_5)
{
int iVar1;
void *__ptr;
bool bVar2;
bVar2 = false;
if (param_3 != 0 && (param_1 != 0 || param_2 == 0)) {
__ptr = malloc(0x4df78);
if (__ptr != (void *)0x0) {
tdefl_init(__ptr,param_3,param_4,param_5);
iVar1 = tdefl_compress_buffer(__ptr,param_1,param_2,4);
bVar2 = iVar1 == 1;
free(__ptr);
}
}
return bVar2;
}
| |
50,881 | tdefl_compress_mem_to_output | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len,
tdefl_put_buf_func_ptr pPut_buf_func,
void *pPut_buf_user, int flags) {
tdefl_compressor *pComp;
mz_bool succeeded;
if (((buf_len) && (!pBuf)) || (!pPut_buf_func))
return MZ_FALSE;
pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
if (!pComp)
return MZ_FALSE;
succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) ==
TDEFL_STATUS_OKAY);
succeeded =
succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) ==
TDEFL_STATUS_DONE);
MZ_FREE(pComp);
return succeeded;
} | O3 | c | tdefl_compress_mem_to_output:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %cl
andb %al, %cl
testq %rdx, %rdx
sete %al
xorl %ebp, %ebp
orb %cl, %al
jne 0x81d8e
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movl %r8d, 0xc(%rsp)
movl $0x4df78, %edi # imm = 0x4DF78
callq 0xa7b0
testq %rax, %rax
je 0x81d8e
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl 0xc(%rsp), %ecx
callq 0x7dcc6
leaq 0x10(%rsp), %rdx
movq %r15, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4, %r9d
callq 0x7dfca
xorl %ebp, %ebp
cmpl $0x1, %eax
sete %bpl
movq %r14, %rdi
callq 0xa6f0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tdefl_compress_mem_to_output:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rcx
test rsi, rsi
setnz al
test rdi, rdi
setz cl
and cl, al
test rdx, rdx
setz al
xor ebp, ebp
or al, cl
jnz short loc_81D8E
mov r13, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+48h+var_3C], r8d
mov edi, 4DF78h
call _malloc
test rax, rax
jz short loc_81D8E
mov r14, rax
mov rdi, rax
mov rsi, r13
mov rdx, r12
mov ecx, [rsp+48h+var_3C]
call tdefl_init
lea rdx, [rsp+48h+var_38]
mov [rdx], r15
mov rdi, r14
mov rsi, rbx
xor ecx, ecx
xor r8d, r8d
mov r9d, 4
call tdefl_compress
xor ebp, ebp
cmp eax, 1
setz bpl
mov rdi, r14
call _free
loc_81D8E:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 tdefl_compress_mem_to_output(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
BOOL v6; // ebp
long long v8; // rax
long long v9; // r14
long long v12[7]; // [rsp+10h] [rbp-38h] BYREF
v6 = 0;
if ( (a2 == 0 || a1 != 0) && a3 != 0 )
{
v8 = malloc(319352LL);
if ( v8 )
{
v9 = v8;
tdefl_init(v8, a3, a4, a5);
v12[0] = a2;
v6 = tdefl_compress(v9, a1, v12, 0LL, 0LL, 4u) == 1;
free(v9);
}
}
return v6;
}
| |||
50,882 | main | pnggroup[P]pngcheck/pngcheck.c | int main(int argc, const char *argv[])
{
FILE *fp;
int i = 1;
int err = kOK;
int num_files = 0;
int num_errors = 0;
int num_warnings = 0;
const char *brief_error = color? brief_error_color : brief_error_plain;
const char *errors_detected = color? errors_color : errors_plain;
#ifdef __EMX__
_wildcard(&argc, &argv); /* Unix-like globbing for OS/2 and DOS */
#endif
while (argc > 1 && argv[1][0] == '-') {
switch (argv[1][i]) {
case '\0':
--argc;
++argv;
i = 1;
break;
case '7':
printtext = 1;
sevenbit = 1;
++i;
break;
case 'c':
color = 1;
++i;
break;
case 'h':
usage(stdout);
return err;
case 'p':
printpal = 1;
++i;
break;
case 'q':
verbose = 0;
quiet = 1;
++i;
break;
case 's':
search = 1;
++i;
break;
case 't':
printtext = 1;
++i;
break;
case 'v':
++verbose; /* verbose == 2 means decode IDATs and print filter info */
quiet = 0; /* verbose == 4 means print pixel values, too */
++i;
break;
case 'w':
check_windowbits = 0;
++i;
break;
case 'x':
search = extract = 1;
++i;
break;
default:
fprintf(stderr, "error: unknown option %c\n\n", argv[1][i]);
usage(stderr);
return kCommandLineError;
}
}
if (color) {
brief_error = brief_error_color;
errors_detected = errors_color;
#ifdef USE_ZLIB
pass_color = pass_color_enabled;
color_off = pass_color_enabled[0];
#endif
} else {
brief_error = brief_error_plain;
errors_detected = errors_plain;
#ifdef USE_ZLIB
pass_color = pass_color_disabled;
color_off = pass_color_disabled[0];
#endif
}
if (argc == 1) {
if (isatty(0)) { /* if stdin not redirected, give the user help */
usage(stdout);
} else {
const char *fname = "stdin";
if (search)
pngsearch(stdin, fname, extract); /* currently returns void */
else
err = pngcheck(stdin, fname, 0, NULL);
++num_files;
if (err == kWarning)
++num_warnings;
else if (err > kWarning) {
++num_errors;
if (verbose)
printf("%s in %s\n", errors_detected, fname);
else
printf("%s: %s%s%s\n", brief_error,
color? COLOR_YELLOW:"", fname, color? COLOR_NORMAL:"");
}
}
} else {
#ifdef USE_ZLIB
/* make sure we're using the zlib version we were compiled to use */
if (zlib_version[0] != ZLIB_VERSION[0]) {
fprintf(stderr, "zlib error: incompatible version (expected %s,"
" using %s): skipping zlib check\n\n", ZLIB_VERSION, zlib_version);
check_zlib = 0;
if (verbose > 1)
verbose = 1;
} else if (strcmp(zlib_version, ZLIB_VERSION) != 0) {
fprintf(stderr, "zlib warning: different version (expected %s,"
" using %s)\n\n", ZLIB_VERSION, zlib_version);
}
#endif /* USE_ZLIB */
/* main loop over files listed on command line */
for (i = 1; i < argc; ++i) {
const char *fname = argv[i];
err = kOK;
if (strcmp(fname, "-") == 0) {
fname = "stdin";
fp = stdin;
} else if ((fp = fopen(fname, "rb")) == NULL) {
perror(fname);
err = kCriticalError;
}
if (err == kOK) {
if (search)
pngsearch(fp, fname, extract);
else
err = pngcheck(fp, fname, 0, NULL);
if (fp != stdin)
fclose(fp);
}
++num_files;
if (err == kWarning)
++num_warnings;
else if (err > kWarning) {
++num_errors;
if (verbose)
printf("%s in %s\n", errors_detected, fname);
else
printf("%s: %s%s%s\n", brief_error,
color? COLOR_YELLOW:"", fname, color? COLOR_NORMAL:"");
}
}
}
if (num_errors > 0)
err = (num_errors > 127)? 127 : (num_errors < 2)? 2 : num_errors;
else if (num_warnings > 0)
err = 1;
if (!quiet && num_files > 1) {
printf("\n");
if (num_errors > 0)
printf("Errors were detected in %d of the %d files tested.\n",
num_errors, num_files);
if (num_warnings > 0)
printf("Warnings were detected in %d of the %d files tested.\n",
num_warnings, num_files);
if (num_errors + num_warnings < num_files)
printf("No errors were detected in %d of the %d files tested.\n",
num_files - (num_errors + num_warnings), num_files);
}
return err;
} | O3 | c | main:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
jl 0x24f8
movl $0x1, %eax
movl 0x19dfd(%rip), %edx # 0x1c210
leaq 0x10bf6(%rip), %rcx # 0x13010
movl $0x1, %esi
movq 0x8(%rbx), %rdi
cmpb $0x2d, (%rdi)
jne 0x24f8
movslq %esi, %r8
movzbl (%rdi,%r8), %edi
leal -0x63(%rdi), %r8d
cmpl $0x15, %r8d
ja 0x2457
movslq (%rcx,%r8,4), %r8
addq %rcx, %r8
jmpq *%r8
movl $0x1, 0x19dce(%rip) # 0x1c220
jmp 0x24ed
cmpl $0x37, %edi
je 0x24e1
testl %edi, %edi
jne 0x28af
addq $0x8, %rbx
decl %ebp
movl $0x1, %esi
jmp 0x24ef
incl %edx
movl %edx, 0x19d93(%rip) # 0x1c210
movl $0x0, 0x19d8d(%rip) # 0x1c214
jmp 0x24ed
movl $0x1, 0x19d85(%rip) # 0x1c218
jmp 0x24ed
movl $0x1, 0x19d7d(%rip) # 0x1c21c
jmp 0x24ed
movl $0x0, 0x19c65(%rip) # 0x1c110
jmp 0x24ed
movl $0x0, 0x19d59(%rip) # 0x1c210
movl $0x1, 0x19d53(%rip) # 0x1c214
incl %esi
xorl %edx, %edx
jmp 0x24ef
movl $0x1, 0x19d5b(%rip) # 0x1c22c
jmp 0x24ed
movl %eax, 0x19d57(%rip) # 0x1c230
movl %eax, 0x19d4d(%rip) # 0x1c22c
jmp 0x24ed
movl %eax, 0x19d31(%rip) # 0x1c218
movl %eax, 0x19d37(%rip) # 0x1c224
incl %esi
cmpl $0x1, %ebp
jg 0x241f
cmpl $0x0, 0x19d21(%rip) # 0x1c220
leaq 0x19cba(%rip), %rax # 0x1c1c0
leaq 0x19c73(%rip), %rcx # 0x1c180
cmoveq %rax, %rcx
leaq 0x19c40(%rip), %rax # 0x1c158
leaq 0x19c31(%rip), %rdx # 0x1c150
cmoveq %rax, %rdx
movq (%rdx), %rax
movq %rax, 0x18(%rsp)
leaq 0x19bf6(%rip), %rax # 0x1c128
leaq 0x19be7(%rip), %rdx # 0x1c120
cmoveq %rax, %rdx
movq (%rdx), %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x19cfc(%rip) # 0x1c248
movq (%rcx), %rax
movq %rax, 0x19cfa(%rip) # 0x1c250
cmpl $0x1, %ebp
jne 0x2581
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x2090
testl %eax, %eax
je 0x2728
movq 0x19a5c(%rip), %rax # 0x1bfd0
movq (%rax), %rdi
callq 0x28bc
jmp 0x284a
callq 0x21c0
cmpb $0x31, (%rax)
jne 0x2824
callq 0x21c0
leaq 0x111b6(%rip), %rsi # 0x13751
movq %rax, %rdi
callq 0x2110
testl %eax, %eax
jne 0x282e
xorl %r15d, %r15d
cmpl $0x2, %ebp
jl 0x284a
movl %ebp, %eax
movq %rax, 0x20(%rsp)
movl $0x1, %ebp
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movq (%rbx,%rbp,8), %r15
cmpb $0x2d, (%r15)
jne 0x25eb
cmpb $0x0, 0x1(%r15)
je 0x2687
movq %r15, %rdi
leaq 0x111f0(%rip), %rsi # 0x137e5
callq 0x2190
testq %rax, %rax
je 0x26e7
movq %rax, %r13
cmpl $0x0, 0x19c1f(%rip) # 0x1c22c
je 0x2625
movl 0x19c1b(%rip), %edx # 0x1c230
movq %r13, %rdi
movq %r15, %rsi
callq 0x2930
xorl %r14d, %r14d
jmp 0x2637
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x29fe
movl %eax, %r14d
movq 0x1999a(%rip), %rax # 0x1bfd8
cmpq (%rax), %r13
je 0x264b
movq %r13, %rdi
callq 0x20c0
incl %r12d
cmpl $0x1, %r14d
jne 0x2660
incl 0xc(%rsp)
movl $0x1, %r14d
jmp 0x26d7
jle 0x26d7
incl 0x8(%rsp)
cmpl $0x0, 0x19ba3(%rip) # 0x1c210
je 0x269d
leaq 0x110bc(%rip), %rdi # 0x13732
movq 0x18(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20e0
jmp 0x26d7
movq 0x1994a(%rip), %rax # 0x1bfd8
movq (%rax), %r13
leaq 0x11094(%rip), %r15 # 0x1372c
jmp 0x2606
cmpl $0x0, 0x19b7c(%rip) # 0x1c220
leaq 0x1109d(%rip), %rdx # 0x13748
leaq 0x11132(%rip), %rax # 0x137e4
cmoveq %rax, %rdx
leaq 0x11009(%rip), %r8 # 0x136c6
cmoveq %rax, %r8
leaq 0x11074(%rip), %rdi # 0x1373c
movq 0x10(%rsp), %rsi
movq %r15, %rcx
xorl %eax, %eax
callq 0x20e0
incq %rbp
cmpq %rbp, 0x20(%rsp)
jne 0x25d6
jmp 0x26fd
movq %r15, %rdi
callq 0x21b0
incl %r12d
movl $0x5, %r14d
jmp 0x2662
cmpl $0x0, 0x8(%rsp)
jle 0x2756
movl 0xc(%rsp), %ebp
movl 0x8(%rsp), %ecx
cmpl $0x3, %ecx
movl $0x2, %eax
cmovael %ecx, %eax
cmpl $0x7f, %eax
movl $0x7f, %r15d
cmovbl %eax, %r15d
movb $0x1, %bl
jmp 0x2768
cmpl $0x0, 0x19afd(%rip) # 0x1c22c
movq 0x198a2(%rip), %rax # 0x1bfd8
movq (%rax), %rdi
je 0x27dd
movl 0x19aeb(%rip), %edx # 0x1c230
leaq 0x10fe0(%rip), %rsi # 0x1372c
callq 0x2930
jmp 0x284a
movl 0xc(%rsp), %ebp
testl %ebp, %ebp
movl $0x1, %r15d
cmovlel %r14d, %r15d
xorl %ebx, %ebx
cmpl $0x0, 0x19aa5(%rip) # 0x1c214
jne 0x284a
cmpl $0x2, %r12d
jb 0x284a
movl $0xa, %edi
callq 0x2030
testb %bl, %bl
je 0x27a2
leaq 0x11054(%rip), %rdi # 0x137e8
movl 0x8(%rsp), %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x20e0
testl %ebp, %ebp
jle 0x27b9
leaq 0x1106f(%rip), %rdi # 0x1381c
movl %ebp, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x20e0
movl 0x8(%rsp), %eax
addl %ebp, %eax
movl %r12d, %esi
subl %eax, %esi
jle 0x284a
leaq 0x11081(%rip), %rdi # 0x13852
movl %r12d, %edx
xorl %eax, %eax
callq 0x20e0
jmp 0x284a
leaq 0x10f48(%rip), %rsi # 0x1372c
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x29fe
movl $0x1, %r15d
cmpl $0x1, %eax
je 0x284a
movl %eax, %r15d
jle 0x284a
cmpl $0x0, 0x19a0c(%rip) # 0x1c210
je 0x285c
leaq 0x10f25(%rip), %rdi # 0x13732
leaq 0x10f18(%rip), %rdx # 0x1372c
xorl %ebp, %ebp
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x20e0
jmp 0x289c
callq 0x2210
jmp 0x25ab
callq 0x2257
jmp 0x25ab
movq 0x19791(%rip), %rax # 0x1bfd0
movq (%rax), %rdi
callq 0x28bc
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x199bd(%rip) # 0x1c220
leaq 0x10f7a(%rip), %rax # 0x137e4
leaq 0x10ed7(%rip), %rdx # 0x13748
cmoveq %rax, %rdx
leaq 0x10e4a(%rip), %r8 # 0x136c6
cmoveq %rax, %r8
leaq 0x10eb5(%rip), %rdi # 0x1373c
leaq 0x10e9e(%rip), %rcx # 0x1372c
xorl %ebp, %ebp
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x20e0
movl $0x1, 0x8(%rsp)
movl $0x1, %r12d
jmp 0x2708
callq 0x2283
movl $0x2, %r15d
jmp 0x284a
| main:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
mov ebp, edi
cmp edi, 2
jl loc_24F8
mov eax, 1
mov edx, cs:verbose
lea rcx, jpt_2445
mov esi, 1
loc_241F:
mov rdi, [rbx+8]
cmp byte ptr [rdi], 2Dh ; '-'
jnz loc_24F8
movsxd r8, esi
movzx edi, byte ptr [rdi+r8]
lea r8d, [rdi-63h]; switch 22 cases
cmp r8d, 15h
ja short def_2445; jumptable 0000000000002445 default case
movsxd r8, ds:(jpt_2445 - 13010h)[rcx+r8*4]
add r8, rcx
jmp r8; switch jump
loc_2448:
mov cs:color, 1; jumptable 0000000000002445 case 99
jmp loc_24ED
def_2445:
cmp edi, 37h ; '7'; jumptable 0000000000002445 default case
jz loc_24E1
test edi, edi
jnz loc_28AF; jumptable 0000000000002445 cases 100-103,105-111,114,117
add rbx, 8
dec ebp
mov esi, 1
jmp short loc_24EF
loc_2475:
inc edx; jumptable 0000000000002445 case 118
mov cs:verbose, edx
mov cs:quiet, 0
jmp short loc_24ED
loc_2489:
mov cs:printtext, 1; jumptable 0000000000002445 case 116
jmp short loc_24ED
loc_2495:
mov cs:printpal, 1; jumptable 0000000000002445 case 112
jmp short loc_24ED
loc_24A1:
mov cs:check_windowbits, 0; jumptable 0000000000002445 case 119
jmp short loc_24ED
loc_24AD:
mov cs:verbose, 0; jumptable 0000000000002445 case 113
mov cs:quiet, 1
inc esi
xor edx, edx
jmp short loc_24EF
loc_24C7:
mov cs:search, 1; jumptable 0000000000002445 case 115
jmp short loc_24ED
loc_24D3:
mov cs:extract, eax; jumptable 0000000000002445 case 120
mov cs:search, eax
jmp short loc_24ED
loc_24E1:
mov cs:printtext, eax
mov cs:sevenbit, eax
loc_24ED:
inc esi
loc_24EF:
cmp ebp, 1
jg loc_241F
loc_24F8:
cmp cs:color, 0
lea rax, pass_color_disabled
lea rcx, pass_color_enabled
cmovz rcx, rax
lea rax, errors_plain
lea rdx, errors_color
cmovz rdx, rax
mov rax, [rdx]
mov [rsp+58h+var_40], rax
lea rax, brief_error_plain
lea rdx, brief_error_color
cmovz rdx, rax
mov rax, [rdx]
mov [rsp+58h+var_48], rax
mov cs:pass_color, rcx
mov rax, [rcx]
mov cs:color_off, rax
cmp ebp, 1
jnz short loc_2581
xor r15d, r15d
xor edi, edi
call _isatty
test eax, eax
jz loc_2728
mov rax, cs:stdout_ptr
mov rdi, [rax]
call usage
jmp loc_284A
loc_2581:
call _zlibVersion
cmp byte ptr [rax], 31h ; '1'
jnz loc_2824
call _zlibVersion
lea rsi, a1211; "1.2.11"
mov rdi, rax
call _strcmp
test eax, eax
jnz loc_282E
loc_25AB:
xor r15d, r15d
cmp ebp, 2
jl loc_284A
mov eax, ebp
mov [rsp+58h+var_38], rax
mov ebp, 1
mov [rsp+58h+var_4C], 0
mov [rsp+58h+var_50], 0
xor r12d, r12d
loc_25D6:
mov r15, [rbx+rbp*8]
cmp byte ptr [r15], 2Dh ; '-'
jnz short loc_25EB
cmp byte ptr [r15+1], 0
jz loc_2687
loc_25EB:
mov rdi, r15
lea rsi, aRb; "rb"
call _fopen
test rax, rax
jz loc_26E7
mov r13, rax
loc_2606:
cmp cs:search, 0
jz short loc_2625
mov edx, cs:extract
mov rdi, r13
mov rsi, r15
call pngsearch
xor r14d, r14d
jmp short loc_2637
loc_2625:
mov rdi, r13
mov rsi, r15
xor edx, edx
xor ecx, ecx
call pngcheck
mov r14d, eax
loc_2637:
mov rax, cs:stdin_ptr
cmp r13, [rax]
jz short loc_264B
mov rdi, r13
call _fclose
loc_264B:
inc r12d
cmp r14d, 1
jnz short loc_2660
inc [rsp+58h+var_4C]
mov r14d, 1
jmp short loc_26D7
loc_2660:
jle short loc_26D7
loc_2662:
inc [rsp+58h+var_50]
cmp cs:verbose, 0
jz short loc_269D
lea rdi, aSInS; "%s in %s\n"
mov rsi, [rsp+58h+var_40]
mov rdx, r15
xor eax, eax
call _printf
jmp short loc_26D7
loc_2687:
mov rax, cs:stdin_ptr
mov r13, [rax]
lea r15, aStdin_0; "stdin"
jmp loc_2606
loc_269D:
cmp cs:color, 0
lea rdx, a4033m; "\x1B[40;33m"
lea rax, aZlibWarningDif+3Ah; ""
cmovz rdx, rax
lea r8, a40331mwarnings+1Bh; "\x1B[0m"
cmovz r8, rax
lea rdi, aSSSS; "%s: %s%s%s\n"
mov rsi, [rsp+58h+var_48]
mov rcx, r15
xor eax, eax
call _printf
loc_26D7:
inc rbp
cmp [rsp+58h+var_38], rbp
jnz loc_25D6
jmp short loc_26FD
loc_26E7:
mov rdi, r15
call _perror
inc r12d
mov r14d, 5
jmp loc_2662
loc_26FD:
cmp [rsp+58h+var_50], 0
jle short loc_2756
mov ebp, [rsp+58h+var_4C]
loc_2708:
mov ecx, [rsp+58h+var_50]
cmp ecx, 3
mov eax, 2
cmovnb eax, ecx
cmp eax, 7Fh
mov r15d, 7Fh
cmovb r15d, eax
mov bl, 1
jmp short loc_2768
loc_2728:
cmp cs:search, 0
mov rax, cs:stdin_ptr
mov rdi, [rax]
jz loc_27DD
mov edx, cs:extract
lea rsi, aStdin_0; "stdin"
call pngsearch
jmp loc_284A
loc_2756:
mov ebp, [rsp+58h+var_4C]
test ebp, ebp
mov r15d, 1
cmovle r15d, r14d
xor ebx, ebx
loc_2768:
cmp cs:quiet, 0
jnz loc_284A
cmp r12d, 2
jb loc_284A
mov edi, 0Ah
call _putchar
test bl, bl
jz short loc_27A2
lea rdi, aErrorsWereDete; "Errors were detected in %d of the %d fi"...
mov esi, [rsp+58h+var_50]
mov edx, r12d
xor eax, eax
call _printf
loc_27A2:
test ebp, ebp
jle short loc_27B9
lea rdi, aWarningsWereDe; "Warnings were detected in %d of the %d "...
mov esi, ebp
mov edx, r12d
xor eax, eax
call _printf
loc_27B9:
mov eax, [rsp+58h+var_50]
add eax, ebp
mov esi, r12d
sub esi, eax
jle loc_284A
lea rdi, aNoErrorsWereDe; "No errors were detected in %d of the %d"...
mov edx, r12d
xor eax, eax
call _printf
jmp short loc_284A
loc_27DD:
lea rsi, aStdin_0; "stdin"
xor edx, edx
xor ecx, ecx
call pngcheck
mov r15d, 1
cmp eax, 1
jz short loc_284A
mov r15d, eax
jle short loc_284A
cmp cs:verbose, 0
jz short loc_285C
lea rdi, aSInS; "%s in %s\n"
lea rdx, aStdin_0; "stdin"
xor ebp, ebp
mov rsi, [rsp+58h+var_40]
xor eax, eax
call _printf
jmp short loc_289C
loc_2824:
call main_cold_1
jmp loc_25AB
loc_282E:
call main_cold_2
jmp loc_25AB
loc_2838:
mov rax, cs:stdout_ptr; jumptable 0000000000002445 case 104
mov rdi, [rax]
call usage
xor r15d, r15d
loc_284A:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_285C:
cmp cs:color, 0
lea rax, aZlibWarningDif+3Ah; ""
lea rdx, a4033m; "\x1B[40;33m"
cmovz rdx, rax
lea r8, a40331mwarnings+1Bh; "\x1B[0m"
cmovz r8, rax
lea rdi, aSSSS; "%s: %s%s%s\n"
lea rcx, aStdin_0; "stdin"
xor ebp, ebp
mov rsi, [rsp+58h+var_48]
xor eax, eax
call _printf
loc_289C:
mov [rsp+58h+var_50], 1
mov r12d, 1
jmp loc_2708
loc_28AF:
call main_cold_3; jumptable 0000000000002445 cases 100-103,105-111,114,117
mov r15d, 2
jmp short loc_284A
| int main(int argc, const char **argv, const char **envp)
{
int v4; // ebp
int v5; // edx
int v6; // esi
const char *v7; // rdi
int v8; // edi
long long *v9; // rcx
char **v10; // rdx
const char **v11; // rdx
int v12; // r15d
long long v13; // rax
long long v14; // rbp
int v15; // r12d
const char *v16; // r15
long long v17; // rax
long long v18; // r13
int v19; // r14d
const char *v20; // rdx
const char *v21; // r8
int v22; // ebp
unsigned int v23; // eax
char v24; // bl
int v25; // eax
const char *v27; // rdx
const char *v28; // r8
int v29; // [rsp+8h] [rbp-50h]
int v30; // [rsp+Ch] [rbp-4Ch]
const char *v31; // [rsp+10h] [rbp-48h]
const char *v32; // [rsp+18h] [rbp-40h]
long long v33; // [rsp+20h] [rbp-38h]
v4 = argc;
if ( argc >= 2 )
{
v5 = verbose;
v6 = 1;
while ( 2 )
{
v7 = argv[1];
if ( *v7 == 45 )
{
v8 = (unsigned __int8)v7[v6];
switch ( v8 )
{
case 'c':
color = 1;
goto LABEL_17;
case 'd':
case 'e':
case 'f':
case 'g':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'r':
case 'u':
goto LABEL_89;
case 'h':
usage(stdout);
return 0;
case 'p':
printpal = 1;
goto LABEL_17;
case 'q':
verbose = 0;
quiet = 1;
++v6;
v5 = 0;
goto LABEL_18;
case 's':
search = 1;
goto LABEL_17;
case 't':
printtext = 1;
goto LABEL_17;
case 'v':
verbose = ++v5;
quiet = 0;
goto LABEL_17;
case 'w':
check_windowbits = 0;
goto LABEL_17;
case 'x':
extract = 1;
search = 1;
goto LABEL_17;
default:
if ( v8 == 55 )
{
printtext = 1;
sevenbit = 1;
LABEL_17:
++v6;
}
else
{
if ( v8 )
{
LABEL_89:
main_cold_3(v8);
return 2;
}
++argv;
--v4;
v6 = 1;
}
LABEL_18:
if ( v4 <= 1 )
break;
continue;
}
}
break;
}
}
v9 = (long long *)&pass_color_enabled;
if ( !color )
v9 = (long long *)&pass_color_disabled;
v10 = errors_color;
if ( !color )
v10 = errors_plain;
v32 = *v10;
v11 = (const char **)&brief_error_color;
if ( !color )
v11 = (const char **)&brief_error_plain;
v31 = *v11;
pass_color = (long long)v9;
color_off = *v9;
if ( v4 == 1 )
{
v12 = 0;
if ( (unsigned int)isatty(0LL) )
{
usage(stdout);
}
else if ( search )
{
pngsearch(stdin, "stdin", (unsigned int)extract);
}
else
{
v25 = pngcheck(stdin, "stdin", 0LL, 0LL);
v12 = 1;
if ( v25 != 1 )
{
v12 = v25;
if ( v25 > 1 )
{
if ( verbose )
{
v22 = 0;
printf("%s in %s\n", v32, "stdin");
}
else
{
v27 = "\x1B[40;33m";
if ( !color )
v27 = "";
v28 = "\x1B[0m";
if ( !color )
v28 = "";
v22 = 0;
printf("%s: %s%s%s\n", v31, v27, "stdin", v28);
}
v29 = 1;
v15 = 1;
LABEL_58:
v23 = 2;
if ( (unsigned int)v29 >= 3 )
v23 = v29;
v12 = 127;
if ( v23 < 0x7F )
v12 = v23;
v24 = 1;
goto LABEL_68;
}
}
}
return v12;
}
if ( *(_BYTE *)zlibVersion() == 49 )
{
v13 = zlibVersion();
if ( (unsigned int)strcmp(v13, "1.2.11") )
main_cold_2();
}
else
{
main_cold_1();
}
v12 = 0;
if ( v4 < 2 )
return v12;
v33 = (unsigned int)v4;
v14 = 1LL;
v30 = 0;
v29 = 0;
v15 = 0;
do
{
v16 = argv[v14];
if ( *v16 == 45 && !v16[1] )
{
v18 = stdin;
v16 = "stdin";
}
else
{
v17 = fopen(argv[v14], "rb");
if ( !v17 )
{
perror(v16);
++v15;
v19 = 5;
LABEL_45:
++v29;
if ( verbose )
{
printf("%s in %s\n", v32, v16);
}
else
{
v20 = "\x1B[40;33m";
if ( !color )
v20 = "";
v21 = "\x1B[0m";
if ( !color )
v21 = "";
printf("%s: %s%s%s\n", v31, v20, v16, v21);
}
goto LABEL_53;
}
v18 = v17;
}
if ( search )
{
pngsearch(v18, v16, (unsigned int)extract);
v19 = 0;
}
else
{
v19 = pngcheck(v18, v16, 0LL, 0LL);
}
if ( v18 != stdin )
fclose(v18);
++v15;
if ( v19 == 1 )
{
++v30;
v19 = 1;
goto LABEL_53;
}
if ( v19 > 1 )
goto LABEL_45;
LABEL_53:
++v14;
}
while ( v33 != v14 );
if ( v29 > 0 )
{
v22 = v30;
goto LABEL_58;
}
v22 = v30;
v12 = 1;
if ( v30 <= 0 )
v12 = v19;
v24 = 0;
LABEL_68:
if ( !quiet && (unsigned int)v15 >= 2 )
{
putchar(10LL);
if ( v24 )
printf("Errors were detected in %d of the %d files tested.\n", v29, v15);
if ( v22 > 0 )
printf("Warnings were detected in %d of the %d files tested.\n", v22, v15);
if ( v15 > v22 + v29 )
printf("No errors were detected in %d of the %d files tested.\n", v15 - (v22 + v29), v15);
}
return v12;
}
| main:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV EBP,EDI
CMP EDI,0x2
JL 0x001024f8
MOV EAX,0x1
MOV EDX,dword ptr [0x0011c210]
LEA RCX,[0x113010]
MOV ESI,0x1
LAB_0010241f:
MOV RDI,qword ptr [RBX + 0x8]
CMP byte ptr [RDI],0x2d
JNZ 0x001024f8
MOVSXD R8,ESI
MOVZX EDI,byte ptr [RDI + R8*0x1]
LEA R8D,[RDI + -0x63]
CMP R8D,0x15
JA 0x00102457
MOVSXD R8,dword ptr [RCX + R8*0x4]
ADD R8,RCX
switchD:
JMP R8
caseD_63:
MOV dword ptr [0x0011c220],0x1
JMP 0x001024ed
default:
CMP EDI,0x37
JZ 0x001024e1
TEST EDI,EDI
JNZ 0x001028af
ADD RBX,0x8
DEC EBP
MOV ESI,0x1
JMP 0x001024ef
caseD_76:
INC EDX
MOV dword ptr [0x0011c210],EDX
MOV dword ptr [0x0011c214],0x0
JMP 0x001024ed
caseD_74:
MOV dword ptr [0x0011c218],0x1
JMP 0x001024ed
caseD_70:
MOV dword ptr [0x0011c21c],0x1
JMP 0x001024ed
caseD_77:
MOV dword ptr [0x0011c110],0x0
JMP 0x001024ed
caseD_71:
MOV dword ptr [0x0011c210],0x0
MOV dword ptr [0x0011c214],0x1
INC ESI
XOR EDX,EDX
JMP 0x001024ef
caseD_73:
MOV dword ptr [0x0011c22c],0x1
JMP 0x001024ed
caseD_78:
MOV dword ptr [0x0011c230],EAX
MOV dword ptr [0x0011c22c],EAX
JMP 0x001024ed
LAB_001024e1:
MOV dword ptr [0x0011c218],EAX
MOV dword ptr [0x0011c224],EAX
LAB_001024ed:
INC ESI
LAB_001024ef:
CMP EBP,0x1
JG 0x0010241f
LAB_001024f8:
CMP dword ptr [0x0011c220],0x0
LEA RAX,[0x11c1c0]
LEA RCX,[0x11c180]
CMOVZ RCX,RAX
LEA RAX,[0x11c158]
LEA RDX,[0x11c150]
CMOVZ RDX,RAX
MOV RAX,qword ptr [RDX]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x11c128]
LEA RDX,[0x11c120]
CMOVZ RDX,RAX
MOV RAX,qword ptr [RDX]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [0x0011c248],RCX
MOV RAX,qword ptr [RCX]
MOV qword ptr [0x0011c250],RAX
CMP EBP,0x1
JNZ 0x00102581
XOR R15D,R15D
XOR EDI,EDI
CALL 0x00102090
TEST EAX,EAX
JZ 0x00102728
MOV RAX,qword ptr [0x0011bfd0]
MOV RDI,qword ptr [RAX]
CALL 0x001028bc
JMP 0x0010284a
LAB_00102581:
CALL 0x001021c0
CMP byte ptr [RAX],0x31
JNZ 0x00102824
CALL 0x001021c0
LEA RSI,[0x113751]
MOV RDI,RAX
CALL 0x00102110
TEST EAX,EAX
JNZ 0x0010282e
LAB_001025ab:
XOR R15D,R15D
CMP EBP,0x2
JL 0x0010284a
MOV EAX,EBP
MOV qword ptr [RSP + 0x20],RAX
MOV EBP,0x1
MOV dword ptr [RSP + 0xc],0x0
MOV dword ptr [RSP + 0x8],0x0
XOR R12D,R12D
LAB_001025d6:
MOV R15,qword ptr [RBX + RBP*0x8]
CMP byte ptr [R15],0x2d
JNZ 0x001025eb
CMP byte ptr [R15 + 0x1],0x0
JZ 0x00102687
LAB_001025eb:
MOV RDI,R15
LEA RSI,[0x1137e5]
CALL 0x00102190
TEST RAX,RAX
JZ 0x001026e7
MOV R13,RAX
LAB_00102606:
CMP dword ptr [0x0011c22c],0x0
JZ 0x00102625
MOV EDX,dword ptr [0x0011c230]
MOV RDI,R13
MOV RSI,R15
CALL 0x00102930
XOR R14D,R14D
JMP 0x00102637
LAB_00102625:
MOV RDI,R13
MOV RSI,R15
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001029fe
MOV R14D,EAX
LAB_00102637:
MOV RAX,qword ptr [0x0011bfd8]
CMP R13,qword ptr [RAX]
JZ 0x0010264b
MOV RDI,R13
CALL 0x001020c0
LAB_0010264b:
INC R12D
CMP R14D,0x1
JNZ 0x00102660
INC dword ptr [RSP + 0xc]
MOV R14D,0x1
JMP 0x001026d7
LAB_00102660:
JLE 0x001026d7
LAB_00102662:
INC dword ptr [RSP + 0x8]
CMP dword ptr [0x0011c210],0x0
JZ 0x0010269d
LEA RDI,[0x113732]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,R15
XOR EAX,EAX
CALL 0x001020e0
JMP 0x001026d7
LAB_00102687:
MOV RAX,qword ptr [0x0011bfd8]
MOV R13,qword ptr [RAX]
LEA R15,[0x11372c]
JMP 0x00102606
LAB_0010269d:
CMP dword ptr [0x0011c220],0x0
LEA RDX,[0x113748]
LEA RAX,[0x1137e4]
CMOVZ RDX,RAX
LEA R8,[0x1136c6]
CMOVZ R8,RAX
LEA RDI,[0x11373c]
MOV RSI,qword ptr [RSP + 0x10]
MOV RCX,R15
XOR EAX,EAX
CALL 0x001020e0
LAB_001026d7:
INC RBP
CMP qword ptr [RSP + 0x20],RBP
JNZ 0x001025d6
JMP 0x001026fd
LAB_001026e7:
MOV RDI,R15
CALL 0x001021b0
INC R12D
MOV R14D,0x5
JMP 0x00102662
LAB_001026fd:
CMP dword ptr [RSP + 0x8],0x0
JLE 0x00102756
MOV EBP,dword ptr [RSP + 0xc]
LAB_00102708:
MOV ECX,dword ptr [RSP + 0x8]
CMP ECX,0x3
MOV EAX,0x2
CMOVNC EAX,ECX
CMP EAX,0x7f
MOV R15D,0x7f
CMOVC R15D,EAX
MOV BL,0x1
JMP 0x00102768
LAB_00102728:
CMP dword ptr [0x0011c22c],0x0
MOV RAX,qword ptr [0x0011bfd8]
MOV RDI,qword ptr [RAX]
JZ 0x001027dd
MOV EDX,dword ptr [0x0011c230]
LEA RSI,[0x11372c]
CALL 0x00102930
JMP 0x0010284a
LAB_00102756:
MOV EBP,dword ptr [RSP + 0xc]
TEST EBP,EBP
MOV R15D,0x1
CMOVLE R15D,R14D
XOR EBX,EBX
LAB_00102768:
CMP dword ptr [0x0011c214],0x0
JNZ 0x0010284a
CMP R12D,0x2
JC 0x0010284a
MOV EDI,0xa
CALL 0x00102030
TEST BL,BL
JZ 0x001027a2
LEA RDI,[0x1137e8]
MOV ESI,dword ptr [RSP + 0x8]
MOV EDX,R12D
XOR EAX,EAX
CALL 0x001020e0
LAB_001027a2:
TEST EBP,EBP
JLE 0x001027b9
LEA RDI,[0x11381c]
MOV ESI,EBP
MOV EDX,R12D
XOR EAX,EAX
CALL 0x001020e0
LAB_001027b9:
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,EBP
MOV ESI,R12D
SUB ESI,EAX
JLE 0x0010284a
LEA RDI,[0x113852]
MOV EDX,R12D
XOR EAX,EAX
CALL 0x001020e0
JMP 0x0010284a
LAB_001027dd:
LEA RSI,[0x11372c]
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001029fe
MOV R15D,0x1
CMP EAX,0x1
JZ 0x0010284a
MOV R15D,EAX
JLE 0x0010284a
CMP dword ptr [0x0011c210],0x0
JZ 0x0010285c
LEA RDI,[0x113732]
LEA RDX,[0x11372c]
XOR EBP,EBP
MOV RSI,qword ptr [RSP + 0x18]
XOR EAX,EAX
CALL 0x001020e0
JMP 0x0010289c
LAB_00102824:
CALL 0x00102210
JMP 0x001025ab
LAB_0010282e:
CALL 0x00102257
JMP 0x001025ab
caseD_68:
MOV RAX,qword ptr [0x0011bfd0]
MOV RDI,qword ptr [RAX]
CALL 0x001028bc
XOR R15D,R15D
LAB_0010284a:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010285c:
CMP dword ptr [0x0011c220],0x0
LEA RAX,[0x1137e4]
LEA RDX,[0x113748]
CMOVZ RDX,RAX
LEA R8,[0x1136c6]
CMOVZ R8,RAX
LEA RDI,[0x11373c]
LEA RCX,[0x11372c]
XOR EBP,EBP
MOV RSI,qword ptr [RSP + 0x10]
XOR EAX,EAX
CALL 0x001020e0
LAB_0010289c:
MOV dword ptr [RSP + 0x8],0x1
MOV R12D,0x1
JMP 0x00102708
caseD_64:
CALL 0x00102283
MOV R15D,0x2
JMP 0x0010284a
|
uint main(uint param_1,long param_2)
{
char cVar1;
int *puVar2;
int *puVar3;
int iVar4;
uint uVar5;
FILE *__stream;
int **ppuVar6;
char *pcVar7;
ulong uVar8;
int iVar9;
uint uVar10;
char *pcVar11;
char *pcVar12;
uint uVar13;
bool bVar14;
uint local_50;
uint local_4c;
if (1 < (int)param_1) {
iVar9 = 1;
iVar4 = verbose;
do {
if (**(char **)(param_2 + 8) != '-') break;
cVar1 = (*(char **)(param_2 + 8))[iVar9];
switch(cVar1) {
case 'c':
color = 1;
break;
case 'd':
case 'e':
case 'f':
case 'g':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'r':
case 'u':
switchD_00102445_caseD_64:
main_cold_3();
return 2;
case 'h':
usage(*(int8 *)PTR_stdout_0011bfd0);
return 0;
case 'p':
printpal = 1;
break;
case 'q':
verbose = 0;
quiet = 1;
iVar9 = iVar9 + 1;
iVar4 = 0;
goto LAB_001024ef;
case 's':
search = 1;
break;
case 't':
printtext = 1;
break;
case 'v':
verbose = iVar4 + 1;
quiet = 0;
iVar4 = verbose;
break;
case 'w':
check_windowbits = 0;
break;
case 'x':
extract = 1;
search = 1;
break;
default:
if (cVar1 == '7') {
printtext = 1;
sevenbit = 1;
break;
}
if (cVar1 != '\0') goto switchD_00102445_caseD_64;
param_2 = param_2 + 8;
param_1 = param_1 - 1;
iVar9 = 1;
goto LAB_001024ef;
}
iVar9 = iVar9 + 1;
LAB_001024ef:
} while (1 < (int)param_1);
}
bVar14 = color == 0;
pass_color = pass_color_enabled;
if (bVar14) {
pass_color = pass_color_disabled;
}
ppuVar6 = &errors_color;
if (bVar14) {
ppuVar6 = &errors_plain;
}
puVar2 = *ppuVar6;
ppuVar6 = &brief_error_color;
if (bVar14) {
ppuVar6 = &brief_error_plain;
}
puVar3 = *ppuVar6;
color_off = *(int8 *)pass_color;
if (param_1 == 1) {
iVar4 = isatty(0);
if (iVar4 != 0) {
usage(*(int8 *)PTR_stdout_0011bfd0);
return 0;
}
if (search != 0) {
pngsearch(*(int8 *)PTR_stdin_0011bfd8,"stdin",extract);
return 0;
}
uVar5 = pngcheck(*(int8 *)PTR_stdin_0011bfd8,"stdin",0,0);
if (uVar5 == 1) {
return 1;
}
if ((int)uVar5 < 2) {
return uVar5;
}
if (verbose == 0) {
pcVar7 = "\x1b[40;33m";
if (color == 0) {
pcVar7 = "";
}
pcVar12 = "\x1b[0m";
if (color == 0) {
pcVar12 = "";
}
printf("%s: %s%s%s\n",puVar3,pcVar7,"stdin",pcVar12);
}
else {
printf("%s in %s\n",puVar2,"stdin");
}
local_4c = 0;
local_50 = 1;
uVar5 = 1;
}
else {
pcVar7 = (char *)zlibVersion();
if (*pcVar7 == '1') {
pcVar7 = (char *)zlibVersion();
iVar4 = strcmp(pcVar7,"1.2.11");
if (iVar4 != 0) {
main_cold_2();
}
}
else {
main_cold_1();
}
if ((int)param_1 < 2) {
return 0;
}
uVar8 = 1;
local_4c = 0;
local_50 = 0;
uVar5 = 0;
do {
pcVar7 = *(char **)(param_2 + uVar8 * 8);
if ((*pcVar7 == '-') && (pcVar7[1] == '\0')) {
__stream = *(FILE **)PTR_stdin_0011bfd8;
pcVar7 = "stdin";
LAB_00102606:
if (search == 0) {
uVar10 = pngcheck(__stream,pcVar7,0,0);
}
else {
pngsearch(__stream,pcVar7,extract);
uVar10 = 0;
}
if (__stream != *(FILE **)PTR_stdin_0011bfd8) {
fclose(__stream);
}
if (uVar10 == 1) {
local_4c = local_4c + 1;
uVar10 = 1;
}
else if (1 < (int)uVar10) goto LAB_00102662;
}
else {
__stream = fopen(pcVar7,"rb");
if (__stream != (FILE *)0x0) goto LAB_00102606;
perror(pcVar7);
uVar10 = 5;
LAB_00102662:
local_50 = local_50 + 1;
if (verbose == 0) {
pcVar12 = "\x1b[40;33m";
if (color == 0) {
pcVar12 = "";
}
pcVar11 = "\x1b[0m";
if (color == 0) {
pcVar11 = "";
}
printf("%s: %s%s%s\n",puVar3,pcVar12,pcVar7,pcVar11);
}
else {
printf("%s in %s\n",puVar2,pcVar7);
}
}
uVar5 = uVar5 + 1;
uVar8 = uVar8 + 1;
} while (param_1 != uVar8);
if ((int)local_50 < 1) {
uVar13 = 1;
if ((int)local_4c < 1) {
uVar13 = uVar10;
}
bVar14 = false;
goto LAB_00102768;
}
}
uVar10 = 2;
if (2 < local_50) {
uVar10 = local_50;
}
uVar13 = 0x7f;
if (uVar10 < 0x7f) {
uVar13 = uVar10;
}
bVar14 = true;
LAB_00102768:
if ((quiet == 0) && (1 < uVar5)) {
putchar(10);
if (bVar14) {
printf("Errors were detected in %d of the %d files tested.\n",(ulong)local_50,(ulong)uVar5);
}
if (0 < (int)local_4c) {
printf("Warnings were detected in %d of the %d files tested.\n",(ulong)local_4c,(ulong)uVar5);
}
uVar10 = uVar5 - (local_50 + local_4c);
if (uVar10 != 0 && (int)(local_50 + local_4c) <= (int)uVar5) {
printf("No errors were detected in %d of the %d files tested.\n",(ulong)uVar10,(ulong)uVar5);
}
}
return uVar13;
}
| |
50,883 | recip_sqrt_fp | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/sqrt.c | static bool_t recip_sqrt_fp(vec384 out, const vec384 inp)
{
vec384 t0, t1;
bool_t ret;
recip_sqrt_fp_3mod4(t0, inp);
mul_fp(t1, t0, inp);
sqr_fp(t1, t1);
ret = vec_is_equal(t1, inp, sizeof(t1));
vec_copy(out, t0, sizeof(t0));
return ret;
} | O1 | c | recip_sqrt_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x19360(%rip), %rdx # 0x3fff0
leaq -0x90(%rbp), %r14
movl $0x17b, %ecx # imm = 0x17B
movq %r14, %rdi
callq 0x265df
leaq 0x18e75(%rip), %rcx # 0x3fb20
leaq -0x60(%rbp), %r13
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %r8
callq 0x34be0
movq %r13, %rdi
movq %r13, %rsi
leaq 0x18e49(%rip), %rdx # 0x3fb20
movq %r12, %rcx
callq 0x34460
movl $0x30, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x306c0
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movaps 0x20(%r14), %xmm2
movups %xmm0, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm2, 0x20(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| recip_sqrt_fp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r15, rsi
mov rbx, rdi
lea rdx, recip_sqrt_fp_3mod4_BLS_12_381_P_minus_3_div_4
lea r14, [rbp+var_90]
mov ecx, 17Bh
mov rdi, r14
call exp_mont_384
lea rcx, BLS12_381_P
lea r13, [rbp+var_60]
mov r12, 89F3FFFCFFFCFFFDh
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov r8, r12
call mul_mont_384
mov rdi, r13
mov rsi, r13
lea rdx, BLS12_381_P
mov rcx, r12
call sqr_mont_384
mov edx, 30h ; '0'
mov rdi, r13
mov rsi, r15
call vec_is_equal_16x
movaps xmm0, xmmword ptr [r14]
movaps xmm1, xmmword ptr [r14+10h]
movaps xmm2, xmmword ptr [r14+20h]
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm2
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long recip_sqrt_fp(_OWORD *a1, _OWORD *a2)
{
long long result; // rax
__int128 v3; // xmm1
__int128 v4; // xmm2
_OWORD v5[3]; // [rsp+0h] [rbp-90h] BYREF
_BYTE v6[96]; // [rsp+30h] [rbp-60h] BYREF
exp_mont_384(v5, a2, (long long)&recip_sqrt_fp_3mod4_BLS_12_381_P_minus_3_div_4, 379LL);
mul_mont_384(v6, v5, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384(v6, v6, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
result = vec_is_equal_16x(v6, a2, 48LL);
v3 = v5[1];
v4 = v5[2];
*a1 = v5[0];
a1[1] = v3;
a1[2] = v4;
return result;
}
| recip_sqrt_fp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RSI
MOV RBX,RDI
LEA RDX,[0x13fff0]
LEA R14,[RBP + -0x90]
MOV ECX,0x17b
MOV RDI,R14
CALL 0x001265df
LEA RCX,[0x13fb20]
LEA R13,[RBP + -0x60]
MOV R12,-0x760c000300030003
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV R8,R12
CALL 0x00134be0
MOV RDI,R13
MOV RSI,R13
LEA RDX,[0x13fb20]
MOV RCX,R12
CALL 0x00134460
MOV EDX,0x30
MOV RDI,R13
MOV RSI,R15
CALL 0x001306c0
MOVAPS XMM0,xmmword ptr [R14]
MOVAPS XMM1,xmmword ptr [R14 + 0x10]
MOVAPS XMM2,xmmword ptr [R14 + 0x20]
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM2
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void recip_sqrt_fp(int8 *param_1,int8 param_2)
{
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int1 local_68 [56];
exp_mont_384(&local_98,param_2,recip_sqrt_fp_3mod4_BLS_12_381_P_minus_3_div_4,0x17b);
mul_mont_384(local_68,&local_98,param_2,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384(local_68,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
vec_is_equal_16x(local_68,param_2,0x30);
*param_1 = local_98;
param_1[1] = uStack_90;
param_1[2] = local_88;
param_1[3] = uStack_80;
param_1[4] = local_78;
param_1[5] = uStack_70;
return;
}
| |
50,884 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double) | monkey531[P]llama/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0xbb7c0
testb $0x1, %al
jne 0x19a9c9
movq 0x8(%rsp), %rdi
callq 0x1992e0
movq %rax, %rdi
movq (%rdi), %rax
leaq 0x81afd(%rip), %rsi # 0x21c4bc
movl $0x4, %edx
callq *0x8(%rax)
jmp 0x19a9d9
movq 0x8(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
callq 0x19b4a0
addq $0x28, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
movsd [rsp+28h+var_10], xmm0
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
movsd xmm0, [rsp+28h+var_10]; double
call _ZSt8isfinited; std::isfinite(double)
test al, 1
jnz short loc_19A9C9
mov rdi, [rsp+28h+var_20]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
call qword ptr [rax+8]
jmp short loc_19A9D9
loc_19A9C9:
mov rdi, [rsp+28h+var_20]
movsd xmm0, [rsp+28h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::dump_float(double,std::integral_constant<bool,true>)
loc_19A9D9:
add rsp, 28h
retn
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
long long a1,
double a2)
{
long long v2; // rax
if ( std::isfinite(a2) )
return nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
a1,
a2);
v2 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (*(long long ( **)(long long, char *, long long))(*(_QWORD *)v2 + 8LL))(v2, "null", 4LL);
}
| |||
50,885 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double) | monkey531[P]llama/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0xbc879
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x3a272(%rip), %rsi # 0xf6add
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0xbcabd
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_BC879
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_BC879:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; int
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((int)a1 + 16);
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x001bc879
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x1f6add]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_001bc879:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x001bcabd
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,double param_1)
{
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x001bc877. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x001bc8a3. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
50,886 | copy_decode_table | eloqsql/storage/myisam/mi_packrec.c | static uint copy_decode_table(uint16 *to_pos, uint offset,
uint16 *decode_table)
{
uint prev_offset= offset;
DBUG_ENTER("copy_decode_table");
/* Descent on the left side. */
if (!(*decode_table & IS_CHAR))
{
/* Set a pointer to the next target node. */
to_pos[offset]=2;
/* Copy the left hand subtree there. */
offset=copy_decode_table(to_pos,offset+2,decode_table+ *decode_table);
}
else
{
/* Copy the byte value. */
to_pos[offset]= *decode_table;
/* Step behind this node. */
offset+=2;
}
/* Descent on the right side. */
decode_table++;
if (!(*decode_table & IS_CHAR))
{
/* Set a pointer to the next free target node. */
to_pos[prev_offset+1]=(uint16) (offset-prev_offset-1);
/* Copy the right hand subtree to the entry of that node. */
offset=copy_decode_table(to_pos,offset,decode_table+ *decode_table);
}
else
{
/* Copy the byte value. */
to_pos[prev_offset+1]= *decode_table;
}
DBUG_RETURN(offset);
} | O0 | c | copy_decode_table:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xc455e
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movw $0x2, (%rax,%rcx,2)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x2, %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cltq
shlq %rax
addq %rax, %rdx
callq 0xc4500
movl %eax, -0xc(%rbp)
jmp 0xc4579
movq -0x18(%rbp), %rax
movw (%rax), %dx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xc45d6
movl -0xc(%rbp), %eax
subl -0x1c(%rbp), %eax
subl $0x1, %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
cltq
shlq %rax
addq %rax, %rdx
callq 0xc4500
movl %eax, -0xc(%rbp)
jmp 0xc45ed
movq -0x18(%rbp), %rax
movw (%rax), %dx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
jmp 0xc45ef
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| copy_decode_table_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_C455E
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov word ptr [rax+rcx*2], 2
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
add esi, 2
mov rdx, [rbp+var_18]
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
cdqe
shl rax, 1
add rdx, rax
call copy_decode_table_0
mov [rbp+var_C], eax
jmp short loc_C4579
loc_C455E:
mov rax, [rbp+var_18]
mov dx, [rax]
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov [rax+rcx*2], dx
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_C], eax
loc_C4579:
mov rax, [rbp+var_18]
add rax, 2
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_C45D6
mov eax, [rbp+var_C]
sub eax, [rbp+var_1C]
sub eax, 1
mov dx, ax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx*2], dx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
cdqe
shl rax, 1
add rdx, rax
call copy_decode_table_0
mov [rbp+var_C], eax
jmp short loc_C45ED
loc_C45D6:
mov rax, [rbp+var_18]
mov dx, [rax]
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx*2], dx
loc_C45ED:
jmp short $+2
loc_C45EF:
mov eax, [rbp+var_C]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| long long copy_decode_table_0(long long a1, unsigned int a2, _WORD *a3)
{
_WORD *v5; // [rsp+8h] [rbp-18h]
unsigned int v6; // [rsp+14h] [rbp-Ch]
if ( (*a3 & 0x8000) != 0 )
{
*(_WORD *)(a1 + 2LL * a2) = *a3;
v6 = a2 + 2;
}
else
{
*(_WORD *)(a1 + 2LL * a2) = 2;
v6 = copy_decode_table_0(a1, a2 + 2, &a3[(unsigned __int16)*a3]);
}
v5 = a3 + 1;
if ( (*v5 & 0x8000) != 0 )
{
*(_WORD *)(a1 + 2LL * (a2 + 1)) = *v5;
}
else
{
*(_WORD *)(a1 + 2LL * (a2 + 1)) = v6 - a2 - 1;
return (unsigned int)copy_decode_table_0(a1, v6, &v5[(unsigned __int16)*v5]);
}
return v6;
}
| copy_decode_table:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001c455e
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV word ptr [RAX + RCX*0x2],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
ADD ESI,0x2
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
CDQE
SHL RAX,0x1
ADD RDX,RAX
CALL 0x001c4500
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001c4579
LAB_001c455e:
MOV RAX,qword ptr [RBP + -0x18]
MOV DX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0xc],EAX
LAB_001c4579:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001c45d6
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV DX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV word ptr [RAX + RCX*0x2],DX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
CDQE
SHL RAX,0x1
ADD RDX,RAX
CALL 0x001c4500
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001c45ed
LAB_001c45d6:
MOV RAX,qword ptr [RBP + -0x18]
MOV DX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV word ptr [RAX + RCX*0x2],DX
LAB_001c45ed:
JMP 0x001c45ef
LAB_001c45ef:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int copy_decode_table(long param_1,uint param_2,ushort *param_3)
{
int local_14;
if ((*param_3 & 0x8000) == 0) {
*(int2 *)(param_1 + (ulong)param_2 * 2) = 2;
local_14 = copy_decode_table(param_1,param_2 + 2,param_3 + (int)(uint)*param_3);
}
else {
*(ushort *)(param_1 + (ulong)param_2 * 2) = *param_3;
local_14 = param_2 + 2;
}
param_3 = param_3 + 1;
if ((*param_3 & 0x8000) == 0) {
*(short *)(param_1 + (ulong)(param_2 + 1) * 2) = ((short)local_14 - (short)param_2) + -1;
local_14 = copy_decode_table(param_1,local_14,param_3 + (int)(uint)*param_3);
}
else {
*(ushort *)(param_1 + (ulong)(param_2 + 1) * 2) = *param_3;
}
return local_14;
}
| |
50,887 | my_uca_coll_init_utf8mb3 | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb3,
&my_uca_package_no_contractions_utf8mb3);
return FALSE;
} | O0 | c | my_uca_coll_init_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xecf20
cmpb $0x0, %al
je 0xee3b7
movb $0x1, -0x1(%rbp)
jmp 0xee3df
movq -0x10(%rbp), %rdi
callq 0xf8f10
cmpb $0x0, %al
je 0xee3db
movq -0x10(%rbp), %rdi
leaq 0x28bd91(%rip), %rsi # 0x37a160
leaq 0x28bdaa(%rip), %rdx # 0x37a180
callq 0xf8f70
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_uca_coll_init_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_coll_init_uca
cmp al, 0
jz short loc_EE3B7
mov [rbp+var_1], 1
jmp short loc_EE3DF
loc_EE3B7:
mov rdi, [rbp+var_10]
call my_uca_collation_can_optimize_no_contractions
cmp al, 0
jz short loc_EE3DB
mov rdi, [rbp+var_10]
lea rsi, my_uca_package_utf8mb3
lea rdx, my_uca_package_no_contractions_utf8mb3
call my_uca_handler_map
loc_EE3DB:
mov [rbp+var_1], 0
loc_EE3DF:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_uca_coll_init_utf8mb3(long long a1, long long a2)
{
if ( (unsigned __int8)my_coll_init_uca(a1, a2) )
return 1;
if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) )
my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3);
return 0;
}
| my_uca_coll_init_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001ecf20
CMP AL,0x0
JZ 0x001ee3b7
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001ee3df
LAB_001ee3b7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f8f10
CMP AL,0x0
JZ 0x001ee3db
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x47a160]
LEA RDX,[0x47a180]
CALL 0x001f8f70
LAB_001ee3db:
MOV byte ptr [RBP + -0x1],0x0
LAB_001ee3df:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2)
{
char cVar1;
int1 local_9;
cVar1 = my_coll_init_uca(param_1,param_2);
if (cVar1 == '\0') {
cVar1 = my_uca_collation_can_optimize_no_contractions(param_1);
if (cVar1 != '\0') {
my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
| |
50,888 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) | monkey531[P]llama/common/json.hpp | static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq (%rsi), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq %rdx, %r9
imulq %rcx, %r9
imulq %r8, %rcx
imulq %rax, %rdx
imulq %rax, %r8
shrq $0x20, %r9
movl %ecx, %r10d
addq %r9, %r10
shrq $0x20, %rcx
movl %edx, %eax
addq %r10, %rax
shrq $0x20, %rdx
addq %r8, %rdx
addq %rcx, %rdx
subq $-0x80000000, %rax # imm = 0x80000000
shrq $0x20, %rax
addq %rdx, %rax
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
addl %ecx, %edx
addl $0x40, %edx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
mov rax, [rdi]
mov ecx, eax
shr rax, 20h
mov r8, [rsi]
mov edx, r8d
shr r8, 20h
mov r9, rdx
imul r9, rcx
imul rcx, r8
imul rdx, rax
imul r8, rax
shr r9, 20h
mov r10d, ecx
add r10, r9
shr rcx, 20h
mov eax, edx
add rax, r10
shr rdx, 20h
add rdx, r8
add rdx, rcx
sub rax, 0FFFFFFFF80000000h
shr rax, 20h
add rax, rdx
mov ecx, [rdi+8]
mov edx, [rsi+8]
add edx, ecx
add edx, 40h ; '@'
retn
| unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2)
{
long long v2; // rcx
v2 = (unsigned int)*a1;
return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32)
+ HIDWORD(*a1) * HIDWORD(*a2)
+ ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32)
+ ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32)
+ (unsigned int)(HIDWORD(*a2) * v2)
+ (unsigned int)(HIDWORD(*a1) * *a2)
+ 0x80000000) >> 32);
}
| mul:
MOV RAX,qword ptr [RDI]
MOV ECX,EAX
SHR RAX,0x20
MOV R8,qword ptr [RSI]
MOV EDX,R8D
SHR R8,0x20
MOV R9,RDX
IMUL R9,RCX
IMUL RCX,R8
IMUL RDX,RAX
IMUL R8,RAX
SHR R9,0x20
MOV R10D,ECX
ADD R10,R9
SHR RCX,0x20
MOV EAX,EDX
ADD RAX,R10
SHR RDX,0x20
ADD RDX,R8
ADD RDX,RCX
SUB RAX,-0x80000000
SHR RAX,0x20
ADD RAX,RDX
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSI + 0x8]
ADD EDX,ECX
ADD EDX,0x40
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
uVar2 = *(ulong *)param_1 & 0xffffffff;
uVar1 = *(ulong *)param_1 >> 0x20;
uVar4 = *(ulong *)param_2 & 0xffffffff;
uVar6 = *(ulong *)param_2 >> 0x20;
uVar3 = uVar2 * uVar6;
uVar5 = uVar4 * uVar1;
auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000
>> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20);
auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40;
auVar7._12_4_ = 0;
return auVar7;
}
| |
50,889 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) | monkey531[P]llama/common/json.hpp | static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq (%rsi), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq %rdx, %r9
imulq %rcx, %r9
imulq %r8, %rcx
imulq %rax, %rdx
imulq %rax, %r8
shrq $0x20, %r9
movl %ecx, %r10d
addq %r9, %r10
shrq $0x20, %rcx
movl %edx, %eax
addq %r10, %rax
shrq $0x20, %rdx
addq %r8, %rdx
addq %rcx, %rdx
subq $-0x80000000, %rax # imm = 0x80000000
shrq $0x20, %rax
addq %rdx, %rax
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
addl %ecx, %edx
addl $0x40, %edx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
mov rax, [rdi]
mov ecx, eax
shr rax, 20h
mov r8, [rsi]
mov edx, r8d
shr r8, 20h
mov r9, rdx
imul r9, rcx
imul rcx, r8
imul rdx, rax
imul r8, rax
shr r9, 20h
mov r10d, ecx
add r10, r9
shr rcx, 20h
mov eax, edx
add rax, r10
shr rdx, 20h
add rdx, r8
add rdx, rcx
sub rax, 0FFFFFFFF80000000h
shr rax, 20h
add rax, rdx
mov ecx, [rdi+8]
mov edx, [rsi+8]
add edx, ecx
add edx, 40h ; '@'
retn
| unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2)
{
long long v2; // rcx
v2 = (unsigned int)*a1;
return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32)
+ HIDWORD(*a1) * HIDWORD(*a2)
+ ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32)
+ ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32)
+ (unsigned int)(HIDWORD(*a2) * v2)
+ (unsigned int)(HIDWORD(*a1) * *a2)
+ 0x80000000) >> 32);
}
| mul:
MOV RAX,qword ptr [RDI]
MOV ECX,EAX
SHR RAX,0x20
MOV R8,qword ptr [RSI]
MOV EDX,R8D
SHR R8,0x20
MOV R9,RDX
IMUL R9,RCX
IMUL RCX,R8
IMUL RDX,RAX
IMUL R8,RAX
SHR R9,0x20
MOV R10D,ECX
ADD R10,R9
SHR RCX,0x20
MOV EAX,EDX
ADD RAX,R10
SHR RDX,0x20
ADD RDX,R8
ADD RDX,RCX
SUB RAX,-0x80000000
SHR RAX,0x20
ADD RAX,RDX
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSI + 0x8]
ADD EDX,ECX
ADD EDX,0x40
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
uVar2 = *(ulong *)param_1 & 0xffffffff;
uVar1 = *(ulong *)param_1 >> 0x20;
uVar4 = *(ulong *)param_2 & 0xffffffff;
uVar6 = *(ulong *)param_2 >> 0x20;
uVar3 = uVar2 * uVar6;
uVar5 = uVar4 * uVar1;
auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000
>> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20);
auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40;
auVar7._12_4_ = 0;
return auVar7;
}
| |
50,890 | ImPlot3D::PopColormap(int) | zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp | void PopColormap(int count) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(count <= gp.ColormapModifiers.Size, "You can't pop more modifiers than have been pushed!");
while (count > 0) {
const ImPlot3DColormap& backup = gp.ColormapModifiers.back();
gp.Style.Colormap = backup;
gp.ColormapModifiers.pop_back();
count--;
}
} | O0 | cpp | ImPlot3D::PopColormap(int):
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movq 0x5b8979(%rip), %rax # 0x68f638
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %eax
movq 0x8(%rsp), %rcx
cmpl 0x1f8(%rcx), %eax
jle 0xd6ce9
leaq 0x4fbbc6(%rip), %rdi # 0x5d28a2
callq 0x4f7220
testb $0x1, %al
jne 0xd6ce7
jmp 0xd6ce9
jmp 0xd6ce9
jmp 0xd6ceb
jmp 0xd6ced
cmpl $0x0, 0x14(%rsp)
jle 0xd6d38
movq 0x8(%rsp), %rdi
addq $0x1f8, %rdi # imm = 0x1F8
callq 0xda080
movq %rax, (%rsp)
movq (%rsp), %rax
movl (%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x1d0(%rax)
movq 0x8(%rsp), %rdi
addq $0x1f8, %rdi # imm = 0x1F8
callq 0xda0a0
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xd6ced
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN8ImPlot3D11PopColormapEi:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+18h+var_10], rax
mov eax, [rsp+18h+var_4]
mov rcx, [rsp+18h+var_10]
cmp eax, [rcx+1F8h]
jle short loc_D6CE9
lea rdi, aYouCanTPopMore; "You can't pop more modifiers than have "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D6CE7
jmp short loc_D6CE9
loc_D6CE7:
jmp short $+2
loc_D6CE9:
jmp short $+2
loc_D6CEB:
jmp short $+2
loc_D6CED:
cmp [rsp+18h+var_4], 0
jle short loc_D6D38
mov rdi, [rsp+18h+var_10]
add rdi, 1F8h
call _ZN8ImVectorIiE4backEv; ImVector<int>::back(void)
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
mov ecx, [rax]
mov rax, [rsp+18h+var_10]
mov [rax+1D0h], ecx
mov rdi, [rsp+18h+var_10]
add rdi, 1F8h
call _ZN8ImVectorIiE8pop_backEv; ImVector<int>::pop_back(void)
mov eax, [rsp+18h+var_4]
add eax, 0FFFFFFFFh
mov [rsp+18h+var_4], eax
jmp short loc_D6CED
loc_D6D38:
add rsp, 18h
retn
| long long ImPlot3D::PopColormap(ImPlot3D *this, const char *a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-10h]
int v4; // [rsp+14h] [rbp-4h]
v4 = (int)this;
v3 = ImPlot3D::GImPlot3D;
result = (unsigned int)this;
if ( (int)this > *(_DWORD *)(ImPlot3D::GImPlot3D + 504) )
result = ImGui::ErrorLog((ImGui *)"You can't pop more modifiers than have been pushed!", a2);
while ( v4 > 0 )
{
*(_DWORD *)(v3 + 464) = *(_DWORD *)ImVector<int>::back(v3 + 504);
ImVector<int>::pop_back(v3 + 504);
result = (unsigned int)--v4;
}
return result;
}
| PopColormap:
SUB RSP,0x18
MOV dword ptr [RSP + 0x14],EDI
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x14]
MOV RCX,qword ptr [RSP + 0x8]
CMP EAX,dword ptr [RCX + 0x1f8]
JLE 0x001d6ce9
LEA RDI,[0x6d28a2]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d6ce7
JMP 0x001d6ce9
LAB_001d6ce7:
JMP 0x001d6ce9
LAB_001d6ce9:
JMP 0x001d6ceb
LAB_001d6ceb:
JMP 0x001d6ced
LAB_001d6ced:
CMP dword ptr [RSP + 0x14],0x0
JLE 0x001d6d38
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x1f8
CALL 0x001da080
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x1d0],ECX
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x1f8
CALL 0x001da0a0
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001d6ced
LAB_001d6d38:
ADD RSP,0x18
RET
|
/* ImPlot3D::PopColormap(int) */
void ImPlot3D::PopColormap(int param_1)
{
long lVar1;
int4 *puVar2;
int local_4;
lVar1 = GImPlot3D;
local_4 = param_1;
if (*(int *)(GImPlot3D + 0x1f8) < param_1) {
ImGui::ErrorLog("You can\'t pop more modifiers than have been pushed!");
}
for (; 0 < local_4; local_4 = local_4 + -1) {
puVar2 = (int4 *)ImVector<int>::back((ImVector<int> *)(lVar1 + 0x1f8));
*(int4 *)(lVar1 + 0x1d0) = *puVar2;
ImVector<int>::pop_back((ImVector<int> *)(lVar1 + 0x1f8));
}
return;
}
| |
50,891 | ma_send_connect_attr | eloqsql/libmariadb/libmariadb/mariadb_lib.c | char *ma_send_connect_attr(MYSQL *mysql, unsigned char *buffer)
{
if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS)
{
buffer= (unsigned char *)mysql_net_store_length((unsigned char *)buffer, (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0);
if (mysql->options.extension &&
ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
{
uint i;
for (i=0; i < mysql->options.extension->connect_attrs.records; i++)
{
size_t len;
uchar *p= ma_hashtbl_element(&mysql->options.extension->connect_attrs, i);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= (len);
p+= (len + 1);
len= strlen((char *)p);
buffer= mysql_net_store_length(buffer, len);
memcpy(buffer, p, len);
buffer+= len;
}
}
}
return (char *)buffer;
} | O0 | c | ma_send_connect_attr:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x100000, %rax # imm = 0x100000
cmpq $0x0, %rax
je 0x41c98
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x41b86
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x41b8e
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x41b8e
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x4d5d0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x41c96
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x41c96
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x480(%rcx), %rcx
cmpl 0x38(%rcx), %eax
jae 0x41c94
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %esi
callq 0x6c6e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x37400
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4d5d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x370c0
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x37400
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4d5d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x370c0
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x41bce
jmp 0x41c96
jmp 0x41c98
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_send_connect_attr:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+370h]
and rax, 100000h
cmp rax, 0
jz loc_41C98
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz short loc_41B86
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short loc_41B8E
loc_41B86:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_41B8E:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz loc_41C96
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+48h], 0
jz loc_41C96
mov [rbp+var_14], 0
loc_41BCE:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov rcx, [rcx+480h]
cmp eax, [rcx+38h]
jnb loc_41C94
mov rax, [rbp+var_8]
mov rdi, [rax+480h]
add rdi, 30h ; '0'
mov esi, [rbp+var_14]
call ma_hashtbl_element
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call mysql_net_store_length
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_41BCE
loc_41C94:
jmp short $+2
loc_41C96:
jmp short $+2
loc_41C98:
mov rax, [rbp+var_10]
add rsp, 40h
pop rbp
retn
| long long ma_send_connect_attr(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-28h]
long long v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned int i; // [rsp+2Ch] [rbp-14h]
long long v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+30h] [rbp-10h]
long long v11; // [rsp+30h] [rbp-10h]
long long v12; // [rsp+30h] [rbp-10h]
v9 = a2;
if ( (*(_QWORD *)(a1 + 880) & 0x100000LL) != 0 )
{
if ( *(_QWORD *)(a1 + 1152) )
v2 = mysql_net_store_length(a2, *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 120LL));
else
v2 = mysql_net_store_length(a2, 0LL);
v9 = v2;
if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 72LL) )
{
for ( i = 0; i < *(_DWORD *)(*(_QWORD *)(a1 + 1152) + 56LL); ++i )
{
v4 = ma_hashtbl_element(*(_QWORD *)(a1 + 1152) + 48LL, i);
v6 = strlen(v4);
v10 = mysql_net_store_length(v9, v6);
memcpy(v10, v4, v6);
v11 = v10 + v6;
v5 = v4 + v6 + 1;
v7 = strlen(v5);
v12 = mysql_net_store_length(v11, v7);
memcpy(v12, v5, v7);
v9 = v12 + v7;
}
}
}
return v9;
}
| ma_send_connect_attr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x100000
CMP RAX,0x0
JZ 0x00141c98
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00141b86
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00141b8e
LAB_00141b86:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00141b8e
LAB_00141b8e:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0014d5d0
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00141c96
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x00141c96
MOV dword ptr [RBP + -0x14],0x0
LAB_00141bce:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x480]
CMP EAX,dword ptr [RCX + 0x38]
JNC 0x00141c94
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x480]
ADD RDI,0x30
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0016c6e0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00137400
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0014d5d0
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001370c0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00137400
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0014d5d0
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001370c0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00141bce
LAB_00141c94:
JMP 0x00141c96
LAB_00141c96:
JMP 0x00141c98
LAB_00141c98:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x40
POP RBP
RET
|
long ma_send_connect_attr(long param_1,long param_2)
{
char *__s;
size_t __n;
void *pvVar1;
size_t __n_00;
int8 local_40;
uint local_1c;
long local_18;
local_18 = param_2;
if ((*(ulong *)(param_1 + 0x370) & 0x100000) != 0) {
if (*(long *)(param_1 + 0x480) == 0) {
local_40 = 0;
}
else {
local_40 = *(int8 *)(*(long *)(param_1 + 0x480) + 0x78);
}
local_18 = mysql_net_store_length(param_2,local_40);
if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x48) != 0)) {
for (local_1c = 0; local_1c < *(uint *)(*(long *)(param_1 + 0x480) + 0x38);
local_1c = local_1c + 1) {
__s = (char *)ma_hashtbl_element(*(long *)(param_1 + 0x480) + 0x30,local_1c);
__n = strlen(__s);
pvVar1 = (void *)mysql_net_store_length(local_18,__n);
memcpy(pvVar1,__s,__n);
__n_00 = strlen(__s + __n + 1);
pvVar1 = (void *)mysql_net_store_length(__n + (long)pvVar1,__n_00);
memcpy(pvVar1,__s + __n + 1,__n_00);
local_18 = __n_00 + (long)pvVar1;
}
}
}
return local_18;
}
| |
50,892 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) | llama.cpp/common/json.hpp | inline void grisu2(char* buf, int& len, int& decimal_exponent,
diyfp m_minus, diyfp v, diyfp m_plus)
{
JSON_ASSERT(m_plus.e == m_minus.e);
JSON_ASSERT(m_plus.e == v.e);
// --------(-----------------------+-----------------------)-------- (A)
// m- v m+
//
// --------------------(-----------+-----------------------)-------- (B)
// m- v m+
//
// First scale v (and m- and m+) such that the exponent is in the range
// [alpha, gamma].
const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e);
const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k
// The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma]
const diyfp w = diyfp::mul(v, c_minus_k);
const diyfp w_minus = diyfp::mul(m_minus, c_minus_k);
const diyfp w_plus = diyfp::mul(m_plus, c_minus_k);
// ----(---+---)---------------(---+---)---------------(---+---)----
// w- w w+
// = c*m- = c*v = c*m+
//
// diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and
// w+ are now off by a small amount.
// In fact:
//
// w - v * 10^k < 1 ulp
//
// To account for this inaccuracy, add resp. subtract 1 ulp.
//
// --------+---[---------------(---+---)---------------]---+--------
// w- M- w M+ w+
//
// Now any number in [M-, M+] (bounds included) will round to w when input,
// regardless of how the input rounding algorithm breaks ties.
//
// And digit_gen generates the shortest possible such number in [M-, M+].
// Note that this does not mean that Grisu2 always generates the shortest
// possible number in the interval (m-, m+).
const diyfp M_minus(w_minus.f + 1, w_minus.e);
const diyfp M_plus (w_plus.f - 1, w_plus.e );
decimal_exponent = -cached.k; // = -(-k) = k
grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, 0x58(%rsp)
movl %r8d, 0x60(%rsp)
cmpl %r8d, 0xc8(%rsp)
jne 0x8f8a6
movq %rdi, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
leaq 0xb0(%rsp), %r13
cmpl %r8d, 0x8(%r13)
jne 0x8f8c2
movl %r8d, %edi
callq 0x8f97d
movq %rdx, %r12
leaq 0x68(%rsp), %r14
movq %rax, (%r14)
movl %r12d, 0x8(%r14)
movq %r13, %rdi
movq %r14, %rsi
callq 0x8fabe
movq %rax, %r15
movl %edx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x8fabe
movq %rax, %r13
movl %edx, %ebp
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x8fabe
incq %r13
decq %rax
shrq $0x20, %r12
negl %r12d
movq 0x30(%rsp), %rcx
movl %r12d, (%rcx)
movq %r15, 0x48(%rsp)
movl %ebx, 0x50(%rsp)
movq %rax, 0x38(%rsp)
movl %edx, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rcx, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x8fb1a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x959f9(%rip), %rdi # 0x1252a6
leaq 0x8cb4c(%rip), %rdx # 0x11c400
leaq 0x96085(%rip), %rcx # 0x125940
movl $0x454b, %esi # imm = 0x454B
jmp 0x8f8dc
leaq 0x959dd(%rip), %rdi # 0x1252a6
leaq 0x8cb30(%rip), %rdx # 0x11c400
leaq 0x9607f(%rip), %rcx # 0x125956
movl $0x454c, %esi # imm = 0x454C
xorl %eax, %eax
callq 0x21ec0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_50], rcx
mov [rsp+0A8h+var_48], r8d
cmp [rsp+0A8h+arg_18], r8d
jnz loc_8F8A6
mov [rsp+0A8h+var_88], rdi
mov [rsp+0A8h+var_80], rsi
mov [rsp+0A8h+var_78], rdx
lea r13, [rsp+0A8h+arg_0]
cmp [r13+8], r8d
jnz loc_8F8C2
mov edi, r8d; this
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
mov r12, rdx
lea r14, [rsp+0A8h+var_40]
mov [r14], rax
mov [r14+8], r12d
mov rdi, r13
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r15, rax
mov ebx, edx
lea rdi, [rsp+0A8h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r13, rax
mov ebp, edx
lea rdi, [rsp+0A8h+arg_10]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
inc r13
dec rax
shr r12, 20h
neg r12d
mov rcx, [rsp+0A8h+var_78]
mov [rcx], r12d
mov qword ptr [rsp+0A8h+var_60], r15
mov dword ptr [rsp+0A8h+var_60+8], ebx
mov qword ptr [rsp+0A8h+var_70], rax
mov dword ptr [rsp+0A8h+var_70+8], edx
movups xmm0, xmmword ptr [rsp+0A8h+var_70]
movups xmmword ptr [rsp+0A8h+var_98], xmm0; char
movups xmm0, xmmword ptr [rsp+0A8h+var_60]
movups xmmword ptr [rsp+0A8h+var_A8], xmm0; char
mov rdi, [rsp+0A8h+var_88]; this
mov rsi, [rsp+0A8h+var_80]
mov rdx, rcx
mov rcx, r13
mov r8d, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8F8A6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e"
mov esi, 454Bh
jmp short loc_8F8DC
loc_8F8C2:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEVE; "m_plus.e == v.e"
mov esi, 454Ch
loc_8F8DC:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a1,
int a2,
_DWORD *a3,
long long a4,
unsigned int a5,
long long a6,
char a7,
int a8,
char a9,
int a10)
{
long long cached_power_for_binary_exponent; // rax
int v11; // rdx^4
int v12; // r12^4
int v13; // edx
char v14; // r15
int v15; // edx
int v16; // ebx
char v17; // al
int v18; // edx
long long v20; // rsi
long long v22; // [rsp+58h] [rbp-50h] BYREF
unsigned int v23; // [rsp+60h] [rbp-48h]
long long v24; // [rsp+68h] [rbp-40h] BYREF
int v25; // [rsp+70h] [rbp-38h]
v22 = a4;
v23 = a5;
if ( a10 == a5 )
{
if ( a8 == a5 )
{
cached_power_for_binary_exponent = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)a5,
a2);
v12 = v11;
v24 = cached_power_for_binary_exponent;
v25 = v13;
v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v24);
v16 = v15;
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v22, &v24);
v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v24);
*a3 = -v12;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(a1, v14, v16, v17 - 1, v18);
}
v20 = 17740LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17740LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == v.e");
}
else
{
v20 = 17739LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17739LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == m_minus.e");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
v20);
}
| grisu2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RCX
MOV dword ptr [RSP + 0x60],R8D
CMP dword ptr [RSP + 0xc8],R8D
JNZ 0x0018f8a6
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
LEA R13,[RSP + 0xb0]
CMP dword ptr [R13 + 0x8],R8D
JNZ 0x0018f8c2
MOV EDI,R8D
CALL 0x0018f97d
MOV R12,RDX
LEA R14,[RSP + 0x68]
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x8],R12D
MOV RDI,R13
MOV RSI,R14
CALL 0x0018fabe
MOV R15,RAX
MOV EBX,EDX
LEA RDI,[RSP + 0x58]
MOV RSI,R14
CALL 0x0018fabe
MOV R13,RAX
MOV EBP,EDX
LEA RDI,[RSP + 0xc0]
MOV RSI,R14
CALL 0x0018fabe
INC R13
DEC RAX
SHR R12,0x20
NEG R12D
MOV RCX,qword ptr [RSP + 0x30]
MOV dword ptr [RCX],R12D
MOV qword ptr [RSP + 0x48],R15
MOV dword ptr [RSP + 0x50],EBX
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x40],EDX
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RCX
MOV RCX,R13
MOV R8D,EBP
CALL 0x0018fb1a
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018f8a6:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225940]
MOV ESI,0x454b
JMP 0x0018f8dc
LAB_0018f8c2:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x225956]
MOV ESI,0x454c
LAB_0018f8dc:
XOR EAX,EAX
CALL 0x00121ec0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2
(int8 param_1,int8 param_2,int *param_3,int8 param_4,int param_5,
int8 param_6,int8 param_7,int param_8,int8 param_9,int param_10)
{
int4 uVar1;
char *pcVar2;
int4 extraout_EDX;
int8 uVar3;
int1 auVar4 [12];
int1 auVar5 [12];
int1 auVar6 [16];
int4 uStack_64;
int8 local_50;
int local_48;
int8 local_40;
int4 local_38;
local_50 = param_4;
local_48 = param_5;
if (param_10 == param_5) {
if (param_8 == param_5) {
auVar6 = get_cached_power_for_binary_exponent(param_5);
local_40 = auVar6._0_8_;
local_38 = auVar6._8_4_;
uVar1 = diyfp::mul((diyfp *)¶m_7,(diyfp *)&local_40);
auVar4 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40);
auVar5 = diyfp::mul((diyfp *)¶m_9,(diyfp *)&local_40);
*param_3 = -auVar6._12_4_;
grisu2_digit_gen(param_1,param_2,param_3,auVar4._0_8_ + 1,auVar4._8_4_,param_6,uVar1,
extraout_EDX,auVar5._0_8_ + -1,CONCAT44(uStack_64,auVar5._8_4_));
return;
}
pcVar2 = "m_plus.e == v.e";
uVar3 = 0x454c;
}
else {
pcVar2 = "m_plus.e == m_minus.e";
uVar3 = 0x454b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
50,893 | queue_replace | eloqsql/mysys/queues.c | void queue_replace(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements>>1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
my_bool first= TRUE;
while (idx <= half_queue)
{
next_index= idx + idx;
if (next_index < elements &&
queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top > 0)
next_index++;
if (first &&
queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top >= 0)
{
queue->root[idx]= element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
break;
}
first= FALSE;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx=next_index;
}
insert_at(queue, element, idx);
} | O3 | c | queue_replace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
movl 0x10(%rdi), %ecx
movl %ecx, -0x38(%rbp)
shrl %ecx
movl %ecx, -0x34(%rbp)
cmpl %esi, %ecx
movq %rax, -0x40(%rbp)
jae 0xa95c6
movl %r15d, %r13d
jmp 0xa967a
movl 0x18(%rbx), %ecx
movl 0x1c(%rbx), %esi
movq %rcx, -0x48(%rbp)
addq %rcx, %rax
movq %rax, -0x50(%rbp)
xorl %r14d, %r14d
movq %rsi, -0x30(%rbp)
leal (%r15,%r15), %r13d
movq (%rbx), %rcx
cmpl -0x38(%rbp), %r13d
jae 0xa9623
movq 0x8(%rbx), %rdi
movl %r13d, %eax
movq (%rcx,%rax,8), %rsi
movq -0x48(%rbp), %rax
addq %rax, %rsi
movl %r13d, %r12d
orl $0x1, %r12d
movq (%rcx,%r12,8), %rdx
addq %rax, %rdx
callq *0x28(%rbx)
imull 0x24(%rbx), %eax
testl %eax, %eax
jg 0xa9619
movl %r13d, %r12d
movq (%rbx), %rcx
movl %r12d, %r13d
movq -0x30(%rbp), %rsi
movl %r13d, %r12d
testb $0x1, %r14b
jne 0xa964e
movq 0x8(%rbx), %rdi
movq (%rcx,%r12,8), %rsi
addq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq *0x28(%rbx)
imull 0x24(%rbx), %eax
movq (%rbx), %rcx
testl %eax, %eax
jns 0xa9697
movq -0x30(%rbp), %rsi
movq (%rcx,%r12,8), %rdx
movl %r15d, %eax
movq %rdx, (%rcx,%rax,8)
testq %rsi, %rsi
je 0xa966a
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rax
movl %r15d, -0x1(%rax,%rsi)
movb $0x1, %r14b
movl %r13d, %r15d
cmpl -0x34(%rbp), %r13d
jbe 0xa95de
movq %rbx, %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa945e
movl %r15d, %eax
movq -0x40(%rbp), %rdx
movq %rdx, (%rcx,%rax,8)
movq -0x30(%rbp), %rcx
testq %rcx, %rcx
je 0xa95be
movl %r15d, -0x1(%rdx,%rcx)
jmp 0xa95be
| queue_replace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15d, esi
mov rbx, rdi
mov rax, [rdi]
mov ecx, esi
mov rax, [rax+rcx*8]
mov ecx, [rdi+10h]
mov [rbp+var_38], ecx
shr ecx, 1
mov [rbp+var_34], ecx
cmp ecx, esi
mov [rbp+var_40], rax
jnb short loc_A95C6
loc_A95BE:
mov r13d, r15d
jmp loc_A967A
loc_A95C6:
mov ecx, [rbx+18h]
mov esi, [rbx+1Ch]
mov [rbp+var_48], rcx
add rax, rcx
mov [rbp+var_50], rax
xor r14d, r14d
mov [rbp+var_30], rsi
loc_A95DE:
lea r13d, [r15+r15]
mov rcx, [rbx]
cmp r13d, [rbp+var_38]
jnb short loc_A9623
mov rdi, [rbx+8]
mov eax, r13d
mov rsi, [rcx+rax*8]
mov rax, [rbp+var_48]
add rsi, rax
mov r12d, r13d
or r12d, 1
mov rdx, [rcx+r12*8]
add rdx, rax
call qword ptr [rbx+28h]
imul eax, [rbx+24h]
test eax, eax
jg short loc_A9619
mov r12d, r13d
loc_A9619:
mov rcx, [rbx]
mov r13d, r12d
mov rsi, [rbp+var_30]
loc_A9623:
mov r12d, r13d
test r14b, 1
jnz short loc_A964E
mov rdi, [rbx+8]
mov rsi, [rcx+r12*8]
add rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
call qword ptr [rbx+28h]
imul eax, [rbx+24h]
mov rcx, [rbx]
test eax, eax
jns short loc_A9697
mov rsi, [rbp+var_30]
loc_A964E:
mov rdx, [rcx+r12*8]
mov eax, r15d
mov [rcx+rax*8], rdx
test rsi, rsi
jz short loc_A966A
mov rcx, [rbx]
mov rax, [rcx+rax*8]
mov [rax+rsi-1], r15d
loc_A966A:
mov r14b, 1
mov r15d, r13d
cmp r13d, [rbp+var_34]
jbe loc_A95DE
loc_A967A:
mov rdi, rbx
mov rsi, [rbp+var_40]
mov edx, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp insert_at
loc_A9697:
mov eax, r15d
mov rdx, [rbp+var_40]
mov [rcx+rax*8], rdx
mov rcx, [rbp+var_30]
test rcx, rcx
jz loc_A95BE
mov [rdx+rcx-1], r15d
jmp loc_A95BE
| long long queue_replace(long long *a1, unsigned int a2)
{
unsigned int v2; // r15d
long long v3; // rax
unsigned int v4; // r13d
long long v5; // rsi
char v6; // r14
long long v7; // rcx
long long v8; // r12
int v9; // eax
long long v11; // [rsp+0h] [rbp-50h]
long long v12; // [rsp+8h] [rbp-48h]
long long v13; // [rsp+10h] [rbp-40h]
unsigned int v14; // [rsp+18h] [rbp-38h]
long long v15; // [rsp+20h] [rbp-30h]
v2 = a2;
v3 = *(_QWORD *)(*a1 + 8LL * a2);
v14 = *((_DWORD *)a1 + 4);
v13 = v3;
if ( v14 >> 1 >= a2 )
{
v5 = *((unsigned int *)a1 + 7);
v12 = *((unsigned int *)a1 + 6);
v11 = v12 + v3;
v6 = 0;
v15 = v5;
while ( 1 )
{
v4 = 2 * v2;
v7 = *a1;
if ( 2 * v2 < v14 )
{
v8 = v4 | 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v7 + 8LL * v4),
v12 + *(_QWORD *)(v7 + 8 * v8))) <= 0 )
LODWORD(v8) = 2 * v2;
v7 = *a1;
v4 = v8;
v5 = v15;
}
if ( (v6 & 1) == 0 )
{
v9 = ((long long ( *)(long long, long long, long long))a1[5])(a1[1], v12 + *(_QWORD *)(v7 + 8LL * v4), v11);
v7 = *a1;
if ( *((_DWORD *)a1 + 9) * v9 >= 0 )
{
*(_QWORD *)(v7 + 8LL * v2) = v13;
if ( v15 )
*(_DWORD *)(v13 + v15 - 1) = v2;
break;
}
v5 = v15;
}
*(_QWORD *)(v7 + 8LL * v2) = *(_QWORD *)(v7 + 8LL * v4);
if ( v5 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v5 - 1) = v2;
v6 = 1;
v2 = v4;
if ( v4 > v14 >> 1 )
return insert_at(a1, v13, v4);
}
}
v4 = v2;
return insert_at(a1, v13, v4);
}
| queue_replace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RDI + 0x10]
MOV dword ptr [RBP + -0x38],ECX
SHR ECX,0x1
MOV dword ptr [RBP + -0x34],ECX
CMP ECX,ESI
MOV qword ptr [RBP + -0x40],RAX
JNC 0x001a95c6
LAB_001a95be:
MOV R13D,R15D
JMP 0x001a967a
LAB_001a95c6:
MOV ECX,dword ptr [RBX + 0x18]
MOV ESI,dword ptr [RBX + 0x1c]
MOV qword ptr [RBP + -0x48],RCX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
XOR R14D,R14D
MOV qword ptr [RBP + -0x30],RSI
LAB_001a95de:
LEA R13D,[R15 + R15*0x1]
MOV RCX,qword ptr [RBX]
CMP R13D,dword ptr [RBP + -0x38]
JNC 0x001a9623
MOV RDI,qword ptr [RBX + 0x8]
MOV EAX,R13D
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [RBP + -0x48]
ADD RSI,RAX
MOV R12D,R13D
OR R12D,0x1
MOV RDX,qword ptr [RCX + R12*0x8]
ADD RDX,RAX
CALL qword ptr [RBX + 0x28]
IMUL EAX,dword ptr [RBX + 0x24]
TEST EAX,EAX
JG 0x001a9619
MOV R12D,R13D
LAB_001a9619:
MOV RCX,qword ptr [RBX]
MOV R13D,R12D
MOV RSI,qword ptr [RBP + -0x30]
LAB_001a9623:
MOV R12D,R13D
TEST R14B,0x1
JNZ 0x001a964e
MOV RDI,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [RCX + R12*0x8]
ADD RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL qword ptr [RBX + 0x28]
IMUL EAX,dword ptr [RBX + 0x24]
MOV RCX,qword ptr [RBX]
TEST EAX,EAX
JNS 0x001a9697
MOV RSI,qword ptr [RBP + -0x30]
LAB_001a964e:
MOV RDX,qword ptr [RCX + R12*0x8]
MOV EAX,R15D
MOV qword ptr [RCX + RAX*0x8],RDX
TEST RSI,RSI
JZ 0x001a966a
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + RSI*0x1 + -0x1],R15D
LAB_001a966a:
MOV R14B,0x1
MOV R15D,R13D
CMP R13D,dword ptr [RBP + -0x34]
JBE 0x001a95de
LAB_001a967a:
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a945e
LAB_001a9697:
MOV EAX,R15D
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RCX + RAX*0x8],RDX
MOV RCX,qword ptr [RBP + -0x30]
TEST RCX,RCX
JZ 0x001a95be
MOV dword ptr [RDX + RCX*0x1 + -0x1],R15D
JMP 0x001a95be
|
void queue_replace(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
int iVar3;
uint uVar4;
int iVar5;
uint uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
uint uVar10;
ulong uVar11;
ulong uVar12;
bool bVar13;
uVar12 = (ulong)param_2;
lVar2 = *(long *)(*param_1 + (ulong)param_2 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar6 = uVar1 >> 1;
if (param_2 <= uVar6) {
uVar7 = (ulong)*(uint *)(param_1 + 3);
uVar9 = (ulong)*(uint *)((long)param_1 + 0x1c);
bVar13 = false;
do {
iVar3 = (int)uVar12;
uVar4 = iVar3 * 2;
lVar8 = *param_1;
uVar10 = uVar4;
if (uVar4 < uVar1) {
iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar8 + (ulong)uVar4 * 8) + uVar7,
*(long *)(lVar8 + (ulong)(uVar4 | 1) * 8) + uVar7);
uVar10 = uVar4 | 1;
if (iVar5 * *(int *)((long)param_1 + 0x24) < 1) {
uVar10 = uVar4;
}
lVar8 = *param_1;
}
uVar11 = (ulong)uVar10;
if (!bVar13) {
iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar8 + uVar11 * 8) + uVar7,lVar2 + uVar7);
lVar8 = *param_1;
if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) {
*(long *)(lVar8 + uVar12 * 8) = lVar2;
if (uVar9 != 0) {
*(int *)(lVar2 + -1 + uVar9) = iVar3;
}
break;
}
}
*(int8 *)(lVar8 + uVar12 * 8) = *(int8 *)(lVar8 + uVar11 * 8);
if (uVar9 != 0) {
*(int *)(*(long *)(*param_1 + uVar12 * 8) + -1 + uVar9) = iVar3;
}
bVar13 = true;
uVar12 = uVar11;
} while (uVar10 <= uVar6);
}
insert_at(param_1,lVar2,uVar12);
return;
}
| |
50,894 | LefDefParser::lefamper_lookup(char*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lef_keywords.cpp | int
lefamper_lookup(char *tkn)
{
double dptr;
int result;
const char *cptr;
// printf("Amper_lookup: %s\n", tkn);
// &define returns a number
if (lefGetDoubleDefine(tkn, &dptr)) {
yylval.dval = dptr;
return NUMBER;
}
// &defineb returns TRUE or FALSE, encoded as K_TRUE or K_FALSE
if (lefGetIntDefine(tkn, &result))
return result;
// &defines returns a T_STRING
if (lefGetStringDefine(tkn, &cptr)) {
if (lefGetKeyword(cptr, &result))
return result;
yylval.string = ringCopy(cptr);
return (cptr[0] == '\"' ? QSTRING : T_STRING);
}
// if none of the above, just return the token.
yylval.string = ringCopy(tkn);
return T_STRING;
} | O0 | cpp | LefDefParser::lefamper_lookup(char*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3a610
cmpl $0x0, %eax
je 0x3935b
movsd 0x10(%rsp), %xmm0
leaq 0x693de(%rip), %rax # 0xa2728
movsd %xmm0, (%rax)
movl $0x1ab, 0x24(%rsp) # imm = 0x1AB
jmp 0x393fd
movq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x3a700
cmpl $0x0, %eax
je 0x3937c
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x393fd
movq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x3a390
cmpl $0x0, %eax
je 0x393de
movq (%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x3a520
cmpl $0x0, %eax
je 0x393ab
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x393fd
movq (%rsp), %rdi
callq 0x391d0
movq %rax, %rcx
leaq 0x6936a(%rip), %rax # 0xa2728
movq %rcx, (%rax)
movq (%rsp), %rax
movsbl (%rax), %edx
movl $0x1a9, %eax # imm = 0x1A9
movl $0x1aa, %ecx # imm = 0x1AA
cmpl $0x22, %edx
cmovel %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0x393fd
movq 0x18(%rsp), %rdi
callq 0x391d0
movq %rax, %rcx
leaq 0x69336(%rip), %rax # 0xa2728
movq %rcx, (%rax)
movl $0x1a9, 0x24(%rsp) # imm = 0x1A9
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser15lefamper_lookupEPc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]; this
lea rsi, [rsp+28h+var_18]; char *
call _ZN12LefDefParser18lefGetDoubleDefineEPKcPd; LefDefParser::lefGetDoubleDefine(char const*,double *)
cmp eax, 0
jz short loc_3935B
movsd xmm0, qword ptr [rsp+28h+var_18]
lea rax, _ZN12LefDefParser9lefyylvalE; LefDefParser::lefyylval
movsd qword ptr [rax], xmm0
mov [rsp+28h+var_4], 1ABh
jmp loc_393FD
loc_3935B:
mov rdi, [rsp+28h+var_10]; this
lea rsi, [rsp+28h+var_1C]; char *
call _ZN12LefDefParser15lefGetIntDefineEPKcPi; LefDefParser::lefGetIntDefine(char const*,int *)
cmp eax, 0
jz short loc_3937C
mov eax, dword ptr [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
jmp loc_393FD
loc_3937C:
mov rdi, [rsp+28h+var_10]; this
mov rsi, rsp; char *
call _ZN12LefDefParser18lefGetStringDefineEPKcPS1_; LefDefParser::lefGetStringDefine(char const*,char const**)
cmp eax, 0
jz short loc_393DE
mov rdi, [rsp+28h+var_28]; this
lea rsi, [rsp+28h+var_1C]; char *
call _ZN12LefDefParser13lefGetKeywordEPKcPi; LefDefParser::lefGetKeyword(char const*,int *)
cmp eax, 0
jz short loc_393AB
mov eax, dword ptr [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
jmp short loc_393FD
loc_393AB:
mov rdi, [rsp+28h+var_28]; this
call _ZN12LefDefParserL8ringCopyEPKc; LefDefParser::ringCopy(char const*)
mov rcx, rax
lea rax, _ZN12LefDefParser9lefyylvalE; LefDefParser::lefyylval
mov [rax], rcx
mov rax, [rsp+28h+var_28]
movsx edx, byte ptr [rax]
mov eax, 1A9h
mov ecx, 1AAh
cmp edx, 22h ; '"'
cmovz eax, ecx
mov [rsp+28h+var_4], eax
jmp short loc_393FD
loc_393DE:
mov rdi, [rsp+28h+var_10]; this
call _ZN12LefDefParserL8ringCopyEPKc; LefDefParser::ringCopy(char const*)
mov rcx, rax
lea rax, _ZN12LefDefParser9lefyylvalE; LefDefParser::lefyylval
mov [rax], rcx
mov [rsp+28h+var_4], 1A9h
loc_393FD:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long LefDefParser::lefamper_lookup(LefDefParser *this, char *a2, double *a3)
{
int *v3; // rdx
const char **v4; // rdx
int *v5; // rdx
unsigned int v6; // eax
LefDefParser *v8; // [rsp+0h] [rbp-28h] BYREF
char v9[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v10[8]; // [rsp+10h] [rbp-18h] BYREF
LefDefParser *v11; // [rsp+18h] [rbp-10h]
v11 = this;
if ( (unsigned int)LefDefParser::lefGetDoubleDefine(this, v10, a3) )
{
LefDefParser::lefyylval = *(_QWORD *)v10;
return 427;
}
else if ( (unsigned int)LefDefParser::lefGetIntDefine(v11, v9, v3) )
{
return *(unsigned int *)v9;
}
else if ( (unsigned int)LefDefParser::lefGetStringDefine(v11, (const char *)&v8, v4) )
{
if ( (unsigned int)LefDefParser::lefGetKeyword(v8, v9, v5) )
{
return *(unsigned int *)v9;
}
else
{
LefDefParser::lefyylval = LefDefParser::ringCopy(v8, v9);
v6 = 425;
if ( *(_BYTE *)v8 == 34 )
return 426;
return v6;
}
}
else
{
LefDefParser::lefyylval = LefDefParser::ringCopy(v11, (const char *)&v8);
return 425;
}
}
| lefamper_lookup:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x10]
CALL 0x0013a610
CMP EAX,0x0
JZ 0x0013935b
MOVSD XMM0,qword ptr [RSP + 0x10]
LEA RAX,[0x1a2728]
MOVSD qword ptr [RAX],XMM0
MOV dword ptr [RSP + 0x24],0x1ab
JMP 0x001393fd
LAB_0013935b:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xc]
CALL 0x0013a700
CMP EAX,0x0
JZ 0x0013937c
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001393fd
LAB_0013937c:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RSP
CALL 0x0013a390
CMP EAX,0x0
JZ 0x001393de
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0xc]
CALL 0x0013a520
CMP EAX,0x0
JZ 0x001393ab
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001393fd
LAB_001393ab:
MOV RDI,qword ptr [RSP]
CALL 0x001391d0
MOV RCX,RAX
LEA RAX,[0x1a2728]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP]
MOVSX EDX,byte ptr [RAX]
MOV EAX,0x1a9
MOV ECX,0x1aa
CMP EDX,0x22
CMOVZ EAX,ECX
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001393fd
LAB_001393de:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001391d0
MOV RCX,RAX
LEA RAX,[0x1a2728]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + 0x24],0x1a9
LAB_001393fd:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* LefDefParser::lefamper_lookup(char*) */
int LefDefParser::lefamper_lookup(char *param_1)
{
int iVar1;
char *local_28;
int local_1c;
double local_18;
char *local_10;
int local_4;
local_10 = param_1;
iVar1 = lefGetDoubleDefine(param_1,&local_18);
if (iVar1 == 0) {
iVar1 = lefGetIntDefine(local_10,&local_1c);
if (iVar1 == 0) {
iVar1 = lefGetStringDefine(local_10,&local_28);
if (iVar1 == 0) {
lefyylval = (double)ringCopy(local_10);
local_4 = 0x1a9;
}
else {
iVar1 = lefGetKeyword(local_28,&local_1c);
if (iVar1 == 0) {
lefyylval = (double)ringCopy(local_28);
local_4 = 0x1a9;
if (*local_28 == '\"') {
local_4 = 0x1aa;
}
}
else {
local_4 = local_1c;
}
}
}
else {
local_4 = local_1c;
}
}
else {
lefyylval = local_18;
local_4 = 0x1ab;
}
return local_4;
}
| |
50,895 | qdevtools::BuiltinEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) | HuaiminNotSleepYet[P]QDevTools/build_O0/QDevTools_autogen/EWIEGA46WW/moc_qdevtools.cpp | void qdevtools::BuiltinEditor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<BuiltinEditor *>(_o);
(void)_t;
switch (_id) {
case 0: _t->valueChanged(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (BuiltinEditor::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&BuiltinEditor::valueChanged)) {
*result = 0;
return;
}
}
}
(void)_a;
} | O0 | cpp | qdevtools::BuiltinEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x1033c
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
testl %eax, %eax
jne 0x10338
jmp 0x1032d
movq -0x20(%rbp), %rdi
callq 0x103a0
jmp 0x1033a
jmp 0x1033a
jmp 0x10391
cmpl $0x5, -0xc(%rbp)
jne 0x1038f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdx
leaq 0x3d(%rip), %rax # 0x103a0
cmpq %rax, %rcx
sete %al
cmpq $0x0, %rcx
sete %cl
cmpq $0x0, %rdx
sete %dl
orb %dl, %cl
andb %cl, %al
testb $0x1, %al
jne 0x10381
jmp 0x1038d
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
jmp 0x10391
jmp 0x1038f
jmp 0x10391
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN9qdevtools13BuiltinEditor18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_18], rcx
cmp [rbp+var_C], 0
jnz short loc_1033C
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov eax, [rbp+var_10]
test eax, eax
jnz short loc_10338
jmp short $+2
loc_1032D:
mov rdi, [rbp+var_20]; this
call _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
jmp short loc_1033A
loc_10338:
jmp short $+2
loc_1033A:
jmp short loc_10391
loc_1033C:
cmp [rbp+var_C], 5
jnz short loc_1038F
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rax]
mov rdx, [rax+8]
lea rax, _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
cmp rcx, rax
setz al
cmp rcx, 0
setz cl
cmp rdx, 0
setz dl
or cl, dl
and al, cl
test al, 1
jnz short loc_10381
jmp short loc_1038D
loc_10381:
mov rax, [rbp+var_28]
mov dword ptr [rax], 0
jmp short loc_10391
loc_1038D:
jmp short $+2
loc_1038F:
jmp short $+2
loc_10391:
add rsp, 30h
pop rbp
retn
| char qdevtools::BuiltinEditor::qt_static_metacall(qdevtools::BuiltinEditor *a1, int a2, int a3, _QWORD *a4)
{
char result; // al
if ( a2 )
{
if ( a2 == 5 )
{
result = (*(_QWORD *)(a4[1] + 8LL) == 0LL || *(_QWORD *)a4[1] == 0LL)
&& *(_QWORD *)a4[1] == (_QWORD)qdevtools::BuiltinEditor::valueChanged;
if ( result )
{
result = *a4;
*(_DWORD *)*a4 = 0;
}
}
}
else
{
result = a3;
if ( !a3 )
return qdevtools::BuiltinEditor::valueChanged(a1);
}
return result;
}
| qt_static_metacall:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x18],RCX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0011033c
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x10]
TEST EAX,EAX
JNZ 0x00110338
JMP 0x0011032d
LAB_0011032d:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001103a0
JMP 0x0011033a
LAB_00110338:
JMP 0x0011033a
LAB_0011033a:
JMP 0x00110391
LAB_0011033c:
CMP dword ptr [RBP + -0xc],0x5
JNZ 0x0011038f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RAX,[0x1103a0]
CMP RCX,RAX
SETZ AL
CMP RCX,0x0
SETZ CL
CMP RDX,0x0
SETZ DL
OR CL,DL
AND AL,CL
TEST AL,0x1
JNZ 0x00110381
JMP 0x0011038d
LAB_00110381:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x0
JMP 0x00110391
LAB_0011038d:
JMP 0x0011038f
LAB_0011038f:
JMP 0x00110391
LAB_00110391:
ADD RSP,0x30
POP RBP
RET
|
/* qdevtools::BuiltinEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) */
void qdevtools::BuiltinEditor::qt_static_metacall
(BuiltinEditor *param_1,int param_2,int param_3,int8 *param_4)
{
code *pcVar1;
if (param_2 == 0) {
if (param_3 == 0) {
valueChanged(param_1);
}
}
else if ((param_2 == 5) &&
(pcVar1 = *(code **)param_4[1],
pcVar1 == valueChanged && (pcVar1 == (code *)0x0 || ((long *)param_4[1])[1] == 0))) {
*(int4 *)*param_4 = 0;
}
return;
}
| |
50,896 | my_coll_rule_expand | eloqsql/strings/ctype-uca.c | static int
my_coll_rule_expand(my_wc_t *wc, size_t limit, my_wc_t code)
{
size_t i;
for (i= 0; i < limit; i++)
{
if (wc[i] == 0)
{
wc[i]= code;
return 1;
}
}
return 0;
} | O0 | c | my_coll_rule_expand:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x5b4fa
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x5b4ea
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x1, -0x4(%rbp)
jmp 0x5b501
jmp 0x5b4ec
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x5b4b8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_rule_expand:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0
loc_5B4B8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_5B4FA
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_5B4EA
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
mov [rax+rcx*8], rdx
mov [rbp+var_4], 1
jmp short loc_5B501
loc_5B4EA:
jmp short $+2
loc_5B4EC:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_5B4B8
loc_5B4FA:
mov [rbp+var_4], 0
loc_5B501:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_coll_rule_expand(long long a1, unsigned long long a2, long long a3)
{
unsigned long long i; // [rsp+0h] [rbp-28h]
for ( i = 0LL; i < a2; ++i )
{
if ( !*(_QWORD *)(a1 + 8 * i) )
{
*(_QWORD *)(a1 + 8 * i) = a3;
return 1;
}
}
return 0;
}
| my_coll_rule_expand:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],0x0
LAB_0015b4b8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0015b4fa
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x0015b4ea
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015b501
LAB_0015b4ea:
JMP 0x0015b4ec
LAB_0015b4ec:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015b4b8
LAB_0015b4fa:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015b501:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_coll_rule_expand(long param_1,ulong param_2,int8 param_3)
{
ulong local_30;
local_30 = 0;
while( true ) {
if (param_2 <= local_30) {
return 0;
}
if (*(long *)(param_1 + local_30 * 8) == 0) break;
local_30 = local_30 + 1;
}
*(int8 *)(param_1 + local_30 * 8) = param_3;
return 1;
}
| |
50,897 | apply_shift | eloqsql/strings/ctype-uca.c | static my_bool
apply_shift(MY_CHARSET_LOADER *loader,
MY_COLL_RULES *rules, MY_COLL_RULE *r, int level,
uint16 *to, size_t nweights)
{
/* Apply level difference. */
if (nweights)
{
to[nweights - 1]+= r->diff[level];
if (r->before_level == 1) /* Apply "&[before primary]" */
{
if (nweights >= 2)
{
to[nweights - 2]--; /* Reset before */
if (rules->shift_after_method == my_shift_method_expand)
{
/*
Special case. Don't let characters shifted after X
and before next(X) intermix to each other.
For example:
"[shift-after-method expand] &0 < a &[before primary]1 < A".
I.e. we reorder 'a' after '0', and then 'A' before '1'.
'a' must be sorted before 'A'.
Note, there are no real collations in CLDR which shift
after and before two neighbourgh characters. We need this
just in case. Reserving 4096 (0x1000) weights for such
cases is perfectly enough.
*/
to[nweights - 1]+= 0x1000; /* W3-TODO: const may vary on levels 2,3*/
}
}
else
{
my_snprintf(loader->error, sizeof(loader->error),
"Can't reset before "
"a primary ignorable character U+%04lX", r->base[0]);
return TRUE;
}
}
}
else
{
/* Shift to an ignorable character, e.g.: & \u0000 < \u0001 */
DBUG_ASSERT(to[0] == 0);
to[0]= r->diff[level];
}
return FALSE;
} | O0 | c | apply_shift:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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)
cmpq $0x0, -0x38(%rbp)
je 0x6071a
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %esi
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %edx
addl %esi, %edx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
cmpq $0x1, 0x90(%rax)
jne 0x60718
cmpq $0x2, -0x38(%rbp)
jb 0x606f2
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x2, %rcx
movw (%rax,%rcx,2), %dx
addw $-0x1, %dx
movw %dx, (%rax,%rcx,2)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x606f0
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %edx
addl $0x1000, %edx # imm = 0x1000
movw %dx, (%rax,%rcx,2)
jmp 0x60716
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movl $0x80, %esi
leaq 0x2c3e3(%rip), %rdx # 0x8caec
movb $0x0, %al
callq 0x86300
movb $0x1, -0x1(%rbp)
jmp 0x6073b
jmp 0x60718
jmp 0x60737
jmp 0x6071c
jmp 0x6071e
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| apply_shift:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
cmp [rbp+var_38], 0
jz loc_6071A
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov esi, [rax+rcx*4+80h]
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 1
movzx edx, word ptr [rax+rcx*2]
add edx, esi
mov [rax+rcx*2], dx
mov rax, [rbp+var_20]
cmp qword ptr [rax+90h], 1
jnz short loc_60718
cmp [rbp+var_38], 2
jb short loc_606F2
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 2
mov dx, [rax+rcx*2]
add dx, 0FFFFh
mov [rax+rcx*2], dx
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 1
jnz short loc_606F0
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 1
movzx edx, word ptr [rax+rcx*2]
add edx, 1000h
mov [rax+rcx*2], dx
loc_606F0:
jmp short loc_60716
loc_606F2:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rcx, [rax]
mov esi, 80h
lea rdx, aCanTResetBefor; "Can't reset before a primary ignorable "...
mov al, 0
call my_snprintf
mov [rbp+var_1], 1
jmp short loc_6073B
loc_60716:
jmp short $+2
loc_60718:
jmp short loc_60737
loc_6071A:
jmp short $+2
loc_6071C:
jmp short $+2
loc_6071E:
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov eax, [rax+rcx*4+80h]
mov cx, ax
mov rax, [rbp+var_30]
mov [rax], cx
loc_60737:
mov [rbp+var_1], 0
loc_6073B:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char apply_shift(int a1, long long a2, _QWORD *a3, int a4, _WORD *a5, unsigned long long a6)
{
if ( !a6 )
{
*a5 = *((_DWORD *)a3 + a4 + 32);
return 0;
}
a5[a6 - 1] += *((_DWORD *)a3 + a4 + 32);
if ( a3[18] != 1LL )
return 0;
if ( a6 >= 2 )
{
--a5[a6 - 2];
if ( *(_DWORD *)(a2 + 48) == 1 )
a5[a6 - 1] += 4096;
return 0;
}
my_snprintf(a1, 128, (unsigned int)"Can't reset before a primary ignorable character U+%04lX", *a3, (_DWORD)a5, a6);
return 1;
}
| apply_shift:
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 dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0016071a
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x80]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x1
MOVZX EDX,word ptr [RAX + RCX*0x2]
ADD EDX,ESI
MOV word ptr [RAX + RCX*0x2],DX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x00160718
CMP qword ptr [RBP + -0x38],0x2
JC 0x001606f2
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x2
MOV DX,word ptr [RAX + RCX*0x2]
ADD DX,-0x1
MOV word ptr [RAX + RCX*0x2],DX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x30],0x1
JNZ 0x001606f0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x1
MOVZX EDX,word ptr [RAX + RCX*0x2]
ADD EDX,0x1000
MOV word ptr [RAX + RCX*0x2],DX
LAB_001606f0:
JMP 0x00160716
LAB_001606f2:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV ESI,0x80
LEA RDX,[0x18caec]
MOV AL,0x0
CALL 0x00186300
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016073b
LAB_00160716:
JMP 0x00160718
LAB_00160718:
JMP 0x00160737
LAB_0016071a:
JMP 0x0016071c
LAB_0016071c:
JMP 0x0016071e
LAB_0016071e:
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0x80]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],CX
LAB_00160737:
MOV byte ptr [RBP + -0x1],0x0
LAB_0016073b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
apply_shift(int8 param_1,long param_2,int8 *param_3,int param_4,int2 *param_5,
ulong param_6)
{
if (param_6 == 0) {
*param_5 = (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80);
}
else {
param_5[param_6 - 1] =
param_5[param_6 - 1] + (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80);
if (param_3[0x12] == 1) {
if (param_6 < 2) {
my_snprintf(param_1,0x80,"Can\'t reset before a primary ignorable character U+%04lX",
*param_3);
return 1;
}
param_5[param_6 - 2] = param_5[param_6 - 2] + -1;
if (*(int *)(param_2 + 0x30) == 1) {
param_5[param_6 - 1] = param_5[param_6 - 1] + 0x1000;
}
}
}
return 0;
}
| |
50,898 | POINTonE2_Deserialize_Z | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c | static BLST_ERROR POINTonE2_Deserialize_Z(POINTonE2_affine *out,
const unsigned char in[192])
{
unsigned char in0 = in[0];
if ((in0 & 0xe0) == 0)
return POINTonE2_Deserialize_BE(out, in);
if (in0 & 0x80) /* compressed bit */
return POINTonE2_Uncompress_Z(out, in);
if (in0 & 0x40) { /* infinity bit */
if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 191)) {
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
}
return BLST_BAD_ENCODING;
} | O0 | c | POINTonE2_Deserialize_Z:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
andl $0xe0, %eax
cmpl $0x0, %eax
jne 0x26e9c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x36530
movl %eax, -0x4(%rbp)
jmp 0x26f1d
movzbl -0x19(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x26ebc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x26d30
movl %eax, -0x4(%rbp)
jmp 0x26f1d
movzbl -0x19(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x26f16
movzbl -0x19(%rbp), %eax
andl $0x3f, %eax
movzbl %al, %edi
callq 0x32ec0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movl $0xbf, %esi
callq 0x306a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
andq %rcx, %rax
cmpq $0x0, %rax
je 0x26f14
movq -0x10(%rbp), %rdi
movl $0xc0, %esi
callq 0x23310
movl $0x0, -0x4(%rbp)
jmp 0x26f1d
jmp 0x26f16
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| POINTonE2_Deserialize_Z:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
and eax, 0E0h
cmp eax, 0
jnz short loc_26E9C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call POINTonE2_Deserialize_BE
mov [rbp+var_4], eax
jmp loc_26F1D
loc_26E9C:
movzx eax, [rbp+var_19]
and eax, 80h
cmp eax, 0
jz short loc_26EBC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call POINTonE2_Uncompress_Z
mov [rbp+var_4], eax
jmp short loc_26F1D
loc_26EBC:
movzx eax, [rbp+var_19]
and eax, 40h
cmp eax, 0
jz short loc_26F16
movzx eax, [rbp+var_19]
and eax, 3Fh
movzx edi, al
call _byte_is_zero
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
add rdi, 1
mov esi, 0BFh
call bytes_are_zero
mov rcx, rax
mov rax, [rbp+var_28]
and rax, rcx
cmp rax, 0
jz short loc_26F14
mov rdi, [rbp+var_10]
mov esi, 0C0h
call vec_zero
mov [rbp+var_4], 0
jmp short loc_26F1D
loc_26F14:
jmp short $+2
loc_26F16:
mov [rbp+var_4], 1
loc_26F1D:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long POINTonE2_Deserialize_Z(long long a1, char *a2)
{
long long is_zero; // [rsp+8h] [rbp-28h]
char v4; // [rsp+17h] [rbp-19h]
v4 = *a2;
if ( (*a2 & 0xE0) != 0 )
{
if ( v4 < 0 )
{
return (unsigned int)POINTonE2_Uncompress_Z(a1, a2);
}
else if ( (v4 & 0x40) != 0 && (is_zero = byte_is_zero(v4 & 0x3F), (bytes_are_zero(a2 + 1, 191LL) & is_zero) != 0) )
{
vec_zero(a1, 0xC0uLL);
return 0;
}
else
{
return 1;
}
}
else
{
return (unsigned int)POINTonE2_Deserialize_BE(a1, a2);
}
}
| POINTonE2_Deserialize_Z:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0xe0
CMP EAX,0x0
JNZ 0x00126e9c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00136530
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00126f1d
LAB_00126e9c:
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00126ebc
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00126d30
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00126f1d
LAB_00126ebc:
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00126f16
MOVZX EAX,byte ptr [RBP + -0x19]
AND EAX,0x3f
MOVZX EDI,AL
CALL 0x00132ec0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
MOV ESI,0xbf
CALL 0x001306a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,RCX
CMP RAX,0x0
JZ 0x00126f14
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xc0
CALL 0x00123310
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00126f1d
LAB_00126f14:
JMP 0x00126f16
LAB_00126f16:
MOV dword ptr [RBP + -0x4],0x1
LAB_00126f1d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 POINTonE2_Deserialize_Z(int8 param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
int4 local_c;
bVar1 = *param_2;
if ((bVar1 & 0xe0) == 0) {
local_c = POINTonE2_Deserialize_BE(param_1,param_2);
}
else if ((bVar1 & 0x80) == 0) {
if ((bVar1 & 0x40) != 0) {
uVar2 = byte_is_zero(bVar1 & 0x3f);
uVar3 = bytes_are_zero(param_2 + 1,0xbf);
if ((uVar2 & uVar3) != 0) {
vec_zero(param_1,0xc0);
return 0;
}
}
local_c = 1;
}
else {
local_c = POINTonE2_Uncompress_Z(param_1,param_2);
}
return local_c;
}
| |
50,899 | ma_test_if_reopen | eloqsql/storage/maria/ma_open.c | MARIA_HA *_ma_test_if_reopen(const char *filename)
{
LIST *pos;
for (pos=maria_open_list ; pos ; pos=pos->next)
{
MARIA_HA *info=(MARIA_HA*) pos->data;
MARIA_SHARE *share= info->s;
if (!strcmp(share->unique_file_name.str,filename) && share->last_version)
return info;
}
return 0;
} | O3 | c | ma_test_if_reopen:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x3aa7f6(%rip), %rax # 0x3fb820
movq (%rax), %r15
testq %r15, %r15
je 0x51064
movq %rdi, %rbx
movq 0x10(%r15), %r14
movq (%r14), %r12
movq 0x5b0(%r12), %rdi
movq %rbx, %rsi
callq 0x29670
testl %eax, %eax
jne 0x5105b
cmpq $0x0, 0x718(%r12)
jne 0x51067
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x51035
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_test_if_reopen:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
lea rax, maria_open_list
mov r15, [rax]
test r15, r15
jz short loc_51064
mov rbx, rdi
loc_51035:
mov r14, [r15+10h]
mov r12, [r14]
mov rdi, [r12+5B0h]
mov rsi, rbx
call _strcmp
test eax, eax
jnz short loc_5105B
cmp qword ptr [r12+718h], 0
jnz short loc_51067
loc_5105B:
mov r15, [r15+8]
test r15, r15
jnz short loc_51035
loc_51064:
xor r14d, r14d
loc_51067:
mov rax, r14
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long * ma_test_if_reopen(long long a1)
{
long long v1; // r15
long long *v2; // r14
long long v3; // r12
v1 = maria_open_list;
if ( !maria_open_list )
return 0LL;
while ( 1 )
{
v2 = *(long long **)(v1 + 16);
v3 = *v2;
if ( !(unsigned int)strcmp(*(_QWORD *)(*v2 + 1456), a1) )
{
if ( *(_QWORD *)(v3 + 1816) )
break;
}
v1 = *(_QWORD *)(v1 + 8);
if ( !v1 )
return 0LL;
}
return v2;
}
| _ma_test_if_reopen:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
LEA RAX,[0x4fb820]
MOV R15,qword ptr [RAX]
TEST R15,R15
JZ 0x00151064
MOV RBX,RDI
LAB_00151035:
MOV R14,qword ptr [R15 + 0x10]
MOV R12,qword ptr [R14]
MOV RDI,qword ptr [R12 + 0x5b0]
MOV RSI,RBX
CALL 0x00129670
TEST EAX,EAX
JNZ 0x0015105b
CMP qword ptr [R12 + 0x718],0x0
JNZ 0x00151067
LAB_0015105b:
MOV R15,qword ptr [R15 + 0x8]
TEST R15,R15
JNZ 0x00151035
LAB_00151064:
XOR R14D,R14D
LAB_00151067:
MOV RAX,R14
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long * _ma_test_if_reopen(char *param_1)
{
long *plVar1;
long lVar2;
int iVar3;
long lVar4;
lVar4 = maria_open_list;
if (maria_open_list != 0) {
do {
plVar1 = *(long **)(lVar4 + 0x10);
lVar2 = *plVar1;
iVar3 = strcmp(*(char **)(lVar2 + 0x5b0),param_1);
if ((iVar3 == 0) && (*(long *)(lVar2 + 0x718) != 0)) {
return plVar1;
}
plVar1 = (long *)(lVar4 + 8);
lVar4 = *plVar1;
} while (*plVar1 != 0);
}
return (long *)0x0;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.