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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
19,500
|
mthd_stmt_get_result_metadata
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt)
{
MYSQL_DATA *result;
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0,
7 + ma_extended_type_info_rows(stmt->mysql))))
return(1);
if (!(stmt->fields= unpack_fields(stmt->mysql, result, fields_ma_alloc_root,
stmt->field_count, 0)))
return(1);
return(0);
}
|
O3
|
c
|
mthd_stmt_get_result_metadata:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x340(%rdi), %r14
movq 0x38(%rdi), %rdi
movq 0x4d0(%rdi), %rax
movq 0x4f0(%rdi), %rcx
xorl %edx, %edx
btl $0x3, 0x70(%rcx)
adcl $0x7, %edx
xorl %esi, %esi
callq *0x28(%rax)
testq %rax, %rax
je 0x23fb1
movq 0x38(%rbx), %rdi
movl 0x60(%rbx), %ecx
movq %rax, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x1aa5c
movq %rax, 0x58(%rbx)
testq %rax, %rax
sete %al
jmp 0x23fb3
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
|
mthd_stmt_get_result_metadata:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov r14, [rdi+340h]
mov rdi, [rdi+38h]
mov rax, [rdi+4D0h]
mov rcx, [rdi+4F0h]
xor edx, edx
bt dword ptr [rcx+70h], 3
adc edx, 7
xor esi, esi
call qword ptr [rax+28h]
test rax, rax
jz short loc_23FB1
mov rdi, [rbx+38h]
mov ecx, [rbx+60h]
mov rsi, rax
mov rdx, r14
xor r8d, r8d
call unpack_fields
mov [rbx+58h], rax
test rax, rax
setz al
jmp short loc_23FB3
loc_23FB1:
mov al, 1
loc_23FB3:
pop rbx
pop r14
pop rbp
retn
|
bool mthd_stmt_get_result_metadata(long long a1)
{
long long v1; // r14
_QWORD *v2; // rax
long long v3; // rax
v1 = *(_QWORD *)(a1 + 832);
v2 = (_QWORD *)(*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL))(
*(_QWORD *)(a1 + 56),
0LL,
(unsigned int)_bittest(
(const signed __int32 *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL),
3u)
+ 7);
if ( !v2 )
return 1;
v3 = unpack_fields(*(_QWORD *)(a1 + 56), v2, v1, *(_DWORD *)(a1 + 96), 0);
*(_QWORD *)(a1 + 88) = v3;
return v3 == 0;
}
|
mthd_stmt_get_result_metadata:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x340]
MOV RDI,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RDI + 0x4d0]
MOV RCX,qword ptr [RDI + 0x4f0]
XOR EDX,EDX
BT dword ptr [RCX + 0x70],0x3
ADC EDX,0x7
XOR ESI,ESI
CALL qword ptr [RAX + 0x28]
TEST RAX,RAX
JZ 0x00123fb1
MOV RDI,qword ptr [RBX + 0x38]
MOV ECX,dword ptr [RBX + 0x60]
MOV RSI,RAX
MOV RDX,R14
XOR R8D,R8D
CALL 0x0011aa5c
MOV qword ptr [RBX + 0x58],RAX
TEST RAX,RAX
SETZ AL
JMP 0x00123fb3
LAB_00123fb1:
MOV AL,0x1
LAB_00123fb3:
POP RBX
POP R14
POP RBP
RET
|
bool mthd_stmt_get_result_metadata(long param_1)
{
int8 uVar1;
long lVar2;
bool bVar3;
uVar1 = *(int8 *)(param_1 + 0x340);
lVar2 = *(long *)(param_1 + 0x38);
lVar2 = (**(code **)(*(long *)(lVar2 + 0x4d0) + 0x28))
(lVar2,0,((*(uint *)(*(long *)(lVar2 + 0x4f0) + 0x70) >> 3 & 1) != 0) + '\a');
if (lVar2 == 0) {
bVar3 = true;
}
else {
lVar2 = unpack_fields(*(int8 *)(param_1 + 0x38),lVar2,uVar1,
*(int4 *)(param_1 + 0x60),0);
*(long *)(param_1 + 0x58) = lVar2;
bVar3 = lVar2 == 0;
}
return bVar3;
}
|
|
19,501
|
my_timer_init_overhead
|
eloqsql/mysys/my_rdtsc.c
|
static void my_timer_init_overhead(ulonglong *overhead,
ulonglong (*cycle_timer)(void),
ulonglong (*this_timer)(void),
ulonglong best_timer_overhead)
{
ulonglong time1, time2;
int i;
/* *overhead, least of 20 calculations - cycles.overhead */
for (i= 0, *overhead= 1000000000; i < 20; ++i)
{
time1= cycle_timer();
this_timer(); /* rather than 'time_tmp= timer();' */
time2= cycle_timer() - time1;
if (*overhead > time2)
*overhead= time2;
}
*overhead-= best_timer_overhead;
}
|
O0
|
c
|
my_timer_init_overhead:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq $0x3b9aca00, (%rax) # imm = 0x3B9ACA00
cmpl $0x14, -0x34(%rbp)
jge 0x5e18a
callq *-0x10(%rbp)
movq %rax, -0x28(%rbp)
callq *-0x18(%rbp)
callq *-0x10(%rbp)
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x5e17d
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5e17f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5e14a
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_timer_init_overhead:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_34], 0
mov rax, [rbp+var_8]
mov qword ptr [rax], 3B9ACA00h
loc_5E14A:
cmp [rbp+var_34], 14h
jge short loc_5E18A
call [rbp+var_10]
mov [rbp+var_28], rax
call [rbp+var_18]
call [rbp+var_10]
sub rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax]
cmp rax, [rbp+var_30]
jbe short loc_5E17D
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax], rcx
loc_5E17D:
jmp short $+2
loc_5E17F:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp short loc_5E14A
loc_5E18A:
mov rdx, [rbp+var_20]
mov rax, [rbp+var_8]
mov rcx, [rax]
sub rcx, rdx
mov [rax], rcx
add rsp, 40h
pop rbp
retn
|
unsigned long long * my_timer_init_overhead(
unsigned long long *a1,
long long (*a2)(void),
void (*a3)(void),
long long a4)
{
unsigned long long *result; // rax
int v5; // [rsp+Ch] [rbp-34h]
unsigned long long v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
v5 = 0;
*a1 = 1000000000LL;
while ( v5 < 20 )
{
v7 = a2();
a3();
v6 = a2() - v7;
if ( *a1 > v6 )
*a1 = v6;
++v5;
}
result = a1;
*a1 -= a4;
return result;
}
|
my_timer_init_overhead:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x34],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x3b9aca00
LAB_0015e14a:
CMP dword ptr [RBP + -0x34],0x14
JGE 0x0015e18a
CALL qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CALL qword ptr [RBP + -0x18]
CALL qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x0015e17d
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_0015e17d:
JMP 0x0015e17f
LAB_0015e17f:
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0015e14a
LAB_0015e18a:
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
SUB RCX,RDX
MOV qword ptr [RAX],RCX
ADD RSP,0x40
POP RBP
RET
|
void my_timer_init_overhead(ulong *param_1,code *param_2,code *param_3,long param_4)
{
long lVar1;
long lVar2;
int4 local_3c;
local_3c = 0;
*param_1 = 1000000000;
for (; local_3c < 0x14; local_3c = local_3c + 1) {
lVar1 = (*param_2)();
(*param_3)();
lVar2 = (*param_2)();
if ((ulong)(lVar2 - lVar1) < *param_1) {
*param_1 = lVar2 - lVar1;
}
}
*param_1 = *param_1 - param_4;
return;
}
|
|
19,502
|
my_uni_utf16
|
eloqsql/strings/ctype-ucs2.c
|
int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
}
|
O0
|
c
|
my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x5edaf
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x5ed58
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x5ee72
movq -0x18(%rbp), %rax
andq $0xf800, %rax # imm = 0xF800
cmpq $0xd800, %rax # imm = 0xD800
jne 0x5ed76
movl $0x0, -0x4(%rbp)
jmp 0x5ee72
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x5ee72
cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF
ja 0x5ee6b
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0x5edd7
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x5ee72
movq -0x18(%rbp), %rax
subq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
shrq $0x12, %rax
movzbl %al, %eax
orl $0xd8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0xa, %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x8, %rax
andq $0x3, %rax
movzbl %al, %eax
orl $0xdc, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x5ee72
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
my_uni_utf16:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
cmp [rbp+var_18], 0FFFFh
ja short loc_5EDAF
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_5ED58
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_5EE72
loc_5ED58:
mov rax, [rbp+var_18]
and rax, 0F800h
cmp rax, 0D800h
jnz short loc_5ED76
mov [rbp+var_4], 0
jmp loc_5EE72
loc_5ED76:
mov rax, [rbp+var_18]
shr rax, 8
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 2
jmp loc_5EE72
loc_5EDAF:
cmp [rbp+var_18], offset unk_10FFFF
ja loc_5EE6B
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_5EDD7
mov [rbp+var_4], 0FFFFFF98h
jmp loc_5EE72
loc_5EDD7:
mov rax, [rbp+var_18]
sub rax, 10000h
mov [rbp+var_18], rax
shr rax, 12h
movzx eax, al
or eax, 0D8h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 0Ah
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 8
and rax, 3
movzx eax, al
or eax, 0DCh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 4
jmp short loc_5EE72
loc_5EE6B:
mov [rbp+var_4], 0
loc_5EE72:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( a2 > 0xFFFF )
{
if ( a2 > (unsigned long long)&unk_10FFFF )
{
return 0;
}
else if ( (unsigned long long)(a3 + 4) <= a4 )
{
*a3 = ((a2 - 0x10000) >> 18) | 0xD8;
a3[1] = (a2 - 0x10000) >> 10;
a3[2] = BYTE1(a2) & 3 | 0xDC;
a3[3] = a2;
return 4;
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (a2 & 0xF800) == 0xD800 )
{
return 0;
}
else
{
*a3 = BYTE1(a2);
a3[1] = a2;
return 2;
}
}
else
{
return (unsigned int)-102;
}
}
|
my_uni_utf16:
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],RCX
CMP qword ptr [RBP + -0x18],0xffff
JA 0x0015edaf
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0015ed58
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0015ee72
LAB_0015ed58:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xf800
CMP RAX,0xd800
JNZ 0x0015ed76
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015ee72
LAB_0015ed76:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0015ee72
LAB_0015edaf:
CMP qword ptr [RBP + -0x18],0x10ffff
JA 0x0015ee6b
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0015edd7
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x0015ee72
LAB_0015edd7:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
SHR RAX,0x12
MOVZX EAX,AL
OR EAX,0xd8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xa
MOVZX EAX,AL
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
AND RAX,0x3
MOVZX EAX,AL
OR EAX,0xdc
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,AL
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0015ee72
LAB_0015ee6b:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015ee72:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int4 local_c;
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2 & 0xf800) == 0xd800) {
local_c = 0;
}
else {
*param_3 = (byte)(param_2 >> 8);
param_3[1] = (byte)param_2;
local_c = 2;
}
}
else if (param_2 < 0x110000) {
if (param_4 < param_3 + 4) {
local_c = 0xffffff98;
}
else {
param_2 = param_2 - 0x10000;
*param_3 = (byte)(param_2 >> 0x12) | 0xd8;
param_3[1] = (byte)(param_2 >> 10);
param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc;
param_3[3] = (byte)param_2;
local_c = 4;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
19,503
|
my_uni_utf16
|
eloqsql/strings/ctype-ucs2.c
|
int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x49b87
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x49bcf
movl %ebx, %eax
andl $0xf800, %eax # imm = 0xF800
cmpl $0xd800, %eax # imm = 0xD800
je 0x49bcd
movb %bh, (%rdx)
incq %rdx
movl $0x2, %eax
jmp 0x49bc9
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0x49bcd
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0x49bcf
leal -0x10000(%rbx), %eax
movl %eax, %ecx
shrl $0x12, %ecx
orb $-0x28, %cl
movb %cl, (%rdx)
shrl $0xa, %eax
movb %al, 0x1(%rdx)
movl %ebx, %eax
shrl $0x8, %eax
andb $0x3, %al
orb $-0x24, %al
movb %al, 0x2(%rdx)
addq $0x3, %rdx
movl $0x4, %eax
movb %bl, (%rdx)
jmp 0x49bcf
xorl %eax, %eax
popq %rbx
popq %rbp
retq
|
my_uni_utf16:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
cmp rsi, 0FFFFh
ja short loc_49B87
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_49BCF
mov eax, ebx
and eax, 0F800h
cmp eax, 0D800h
jz short loc_49BCD
mov [rdx], bh
inc rdx
mov eax, 2
jmp short loc_49BC9
loc_49B87:
cmp rbx, offset unk_10FFFF
ja short loc_49BCD
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_49BCF
lea eax, [rbx-10000h]
mov ecx, eax
shr ecx, 12h
or cl, 0D8h
mov [rdx], cl
shr eax, 0Ah
mov [rdx+1], al
mov eax, ebx
shr eax, 8
and al, 3
or al, 0DCh
mov [rdx+2], al
add rdx, 3
mov eax, 4
loc_49BC9:
mov [rdx], bl
jmp short loc_49BCF
loc_49BCD:
xor eax, eax
loc_49BCF:
pop rbx
pop rbp
retn
|
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
_BYTE *v5; // rdx
if ( a2 > 0xFFFF )
{
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) > a4 )
return result;
*a3 = ((unsigned int)(a2 - 0x10000) >> 18) | 0xD8;
a3[1] = (unsigned int)(a2 - 0x10000) >> 10;
a3[2] = BYTE1(a2) & 3 | 0xDC;
v5 = a3 + 3;
result = 4LL;
goto LABEL_8;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) > a4 )
return result;
if ( (a2 & 0xF800) != 0xD800 )
{
*a3 = BYTE1(a2);
v5 = a3 + 1;
result = 2LL;
LABEL_8:
*v5 = a2;
return result;
}
}
return 0LL;
}
|
my_uni_utf16:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
CMP RSI,0xffff
JA 0x00149b87
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x00149bcf
MOV EAX,EBX
AND EAX,0xf800
CMP EAX,0xd800
JZ 0x00149bcd
MOV byte ptr [RDX],BH
INC RDX
MOV EAX,0x2
JMP 0x00149bc9
LAB_00149b87:
CMP RBX,0x10ffff
JA 0x00149bcd
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x00149bcf
LEA EAX,[RBX + -0x10000]
MOV ECX,EAX
SHR ECX,0x12
OR CL,0xd8
MOV byte ptr [RDX],CL
SHR EAX,0xa
MOV byte ptr [RDX + 0x1],AL
MOV EAX,EBX
SHR EAX,0x8
AND AL,0x3
OR AL,0xdc
MOV byte ptr [RDX + 0x2],AL
ADD RDX,0x3
MOV EAX,0x4
LAB_00149bc9:
MOV byte ptr [RDX],BL
JMP 0x00149bcf
LAB_00149bcd:
XOR EAX,EAX
LAB_00149bcf:
POP RBX
POP RBP
RET
|
int8 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int8 uVar2;
byte bVar3;
bVar3 = (byte)(param_2 >> 8);
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (((uint)param_2 & 0xf800) == 0xd800) {
return 0;
}
*param_3 = bVar3;
param_3 = param_3 + 1;
uVar2 = 2;
}
else {
if (0x10ffff < param_2) {
return 0;
}
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
uVar1 = (uint)param_2 - 0x10000;
*param_3 = (byte)(uVar1 >> 0x12) | 0xd8;
param_3[1] = (byte)(uVar1 >> 10);
param_3[2] = bVar3 & 3 | 0xdc;
param_3 = param_3 + 3;
uVar2 = 4;
}
*param_3 = (byte)param_2;
return uVar2;
}
|
|
19,504
|
ma_net_write_buff
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
static int ma_net_write_buff(NET *net,const char *packet, size_t len)
{
size_t left_length;
if (!len)
return 0;
if (net->max_packet > MAX_PACKET_LENGTH &&
net->compress)
left_length= (size_t)(MAX_PACKET_LENGTH - (net->write_pos - net->buff));
else
left_length=(size_t) (net->buff_end - net->write_pos);
if (len > left_length)
{
if (net->write_pos != net->buff)
{
memcpy((char*) net->write_pos,packet,left_length);
if (ma_net_real_write(net,(char*) net->buff,
(size_t)(net->write_pos - net->buff) + left_length))
return 1;
packet+=left_length;
len-=left_length;
net->write_pos= net->buff;
}
if (net->compress)
{
/* uncompressed length is stored in 3 bytes,so
packet can't be > 0xFFFFFF */
left_length= MAX_PACKET_LENGTH;
while (len > left_length)
{
if (ma_net_real_write(net, packet, left_length))
return 1;
packet+= left_length;
len-= left_length;
}
}
if (len > net->max_packet)
return(test(ma_net_real_write(net, packet, len)));
}
memcpy((char*) net->write_pos,packet,len);
net->write_pos+=len;
return 0;
}
|
O3
|
c
|
ma_net_write_buff:
xorl %eax, %eax
testq %rdx, %rdx
je 0x342ea
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x1000000, 0x50(%rdi) # imm = 0x1000000
jb 0x3427c
cmpb $0x0, 0x84(%rbx)
je 0x3427c
movq 0x8(%rbx), %r12
movq 0x18(%rbx), %rdi
subq %rdi, %r12
addq $0xffffff, %r12 # imm = 0xFFFFFF
jmp 0x34287
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %rdi
subq %rdi, %r12
movq %rdx, %r15
subq %r12, %r15
jbe 0x342ce
cmpq 0x8(%rbx), %rdi
je 0x342eb
movq %r14, %rsi
movq %r12, %rdx
callq 0x13390
movq 0x8(%rbx), %rsi
movq %r12, %rdx
subq %rsi, %rdx
addq 0x18(%rbx), %rdx
movq %rbx, %rdi
callq 0x33f47
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x342e2
addq %r12, %r14
movq 0x8(%rbx), %rax
movq %rax, 0x18(%rbx)
jmp 0x342ee
movq %rdx, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x13390
addq %r15, 0x18(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
cmpb $0x0, 0x84(%rbx)
je 0x34329
cmpq $0x1000000, %r15 # imm = 0x1000000
jb 0x34329
movl $0xffffff, %r12d # imm = 0xFFFFFF
movl $0xffffff, %edx # imm = 0xFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33f47
testl %eax, %eax
jne 0x3434e
addq %r12, %r14
addq $-0xffffff, %r15 # imm = 0xFF000001
cmpq %r12, %r15
ja 0x34306
cmpq 0x50(%rbx), %r15
jbe 0x34348
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x33f47
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x342e2
movq 0x18(%rbx), %rdi
jmp 0x342d1
movl $0x1, %eax
jmp 0x342e2
|
ma_net_write_buff:
xor eax, eax
test rdx, rdx
jz locret_342EA
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rdi+50h], 1000000h
jb short loc_3427C
cmp byte ptr [rbx+84h], 0
jz short loc_3427C
mov r12, [rbx+8]
mov rdi, [rbx+18h]
sub r12, rdi
add r12, 0FFFFFFh
jmp short loc_34287
loc_3427C:
mov r12, [rbx+10h]
mov rdi, [rbx+18h]
sub r12, rdi
loc_34287:
mov r15, rdx
sub r15, r12
jbe short loc_342CE
cmp rdi, [rbx+8]
jz short loc_342EB
mov rsi, r14
mov rdx, r12
call _memcpy
mov rsi, [rbx+8]
mov rdx, r12
sub rdx, rsi
add rdx, [rbx+18h]
mov rdi, rbx
call ma_net_real_write
mov ecx, eax
mov eax, 1
test ecx, ecx
jnz short loc_342E2
add r14, r12
mov rax, [rbx+8]
mov [rbx+18h], rax
jmp short loc_342EE
loc_342CE:
mov r15, rdx
loc_342D1:
mov rsi, r14
mov rdx, r15
call _memcpy
add [rbx+18h], r15
xor eax, eax
loc_342E2:
pop rbx
pop r12
pop r14
pop r15
pop rbp
locret_342EA:
retn
loc_342EB:
mov r15, rdx
loc_342EE:
cmp byte ptr [rbx+84h], 0
jz short loc_34329
cmp r15, 1000000h
jb short loc_34329
mov r12d, 0FFFFFFh
loc_34306:
mov edx, 0FFFFFFh
mov rdi, rbx
mov rsi, r14
call ma_net_real_write
test eax, eax
jnz short loc_3434E
add r14, r12
add r15, 0FFFFFFFFFF000001h
cmp r15, r12
ja short loc_34306
loc_34329:
cmp r15, [rbx+50h]
jbe short loc_34348
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call ma_net_real_write
mov ecx, eax
xor eax, eax
test ecx, ecx
setnz al
jmp short loc_342E2
loc_34348:
mov rdi, [rbx+18h]
jmp short loc_342D1
loc_3434E:
mov eax, 1
jmp short loc_342E2
|
_BOOL8 ma_net_write_buff(long long a1, long long a2, unsigned long long a3)
{
_BOOL8 result; // rax
long long v4; // r14
long long v6; // rdi
unsigned long long v7; // r12
long long v8; // r12
unsigned long long v9; // r15
int v10; // ecx
result = 0LL;
if ( !a3 )
return result;
v4 = a2;
if ( *(_QWORD *)(a1 + 80) >= 0x1000000uLL && *(_BYTE *)(a1 + 132) )
{
v6 = *(_QWORD *)(a1 + 24);
v7 = *(_QWORD *)(a1 + 8) - v6 + 0xFFFFFF;
}
else
{
v8 = *(_QWORD *)(a1 + 16);
v6 = *(_QWORD *)(a1 + 24);
v7 = v8 - v6;
}
v9 = a3 - v7;
if ( a3 <= v7 )
{
v9 = a3;
LABEL_11:
memcpy(v6, v4, v9);
*(_QWORD *)(a1 + 24) += v9;
return 0LL;
}
if ( v6 == *(_QWORD *)(a1 + 8) )
{
v9 = a3;
}
else
{
memcpy(v6, a2, v7);
v10 = ma_net_real_write((_BYTE *)a1, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 24) + v7 - *(_QWORD *)(a1 + 8));
result = 1LL;
if ( v10 )
return result;
v4 = v7 + a2;
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
}
if ( !*(_BYTE *)(a1 + 132) || v9 < 0x1000000 )
{
LABEL_18:
if ( v9 > *(_QWORD *)(a1 + 80) )
return (unsigned int)ma_net_real_write((_BYTE *)a1, v4, v9) != 0;
v6 = *(_QWORD *)(a1 + 24);
goto LABEL_11;
}
while ( !(unsigned int)ma_net_real_write((_BYTE *)a1, v4, 0xFFFFFFLL) )
{
v4 += 0xFFFFFFLL;
v9 -= 0xFFFFFFLL;
if ( v9 <= 0xFFFFFF )
goto LABEL_18;
}
return 1LL;
}
|
ma_net_write_buff:
XOR EAX,EAX
TEST RDX,RDX
JZ 0x001342ea
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RDI + 0x50],0x1000000
JC 0x0013427c
CMP byte ptr [RBX + 0x84],0x0
JZ 0x0013427c
MOV R12,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
SUB R12,RDI
ADD R12,0xffffff
JMP 0x00134287
LAB_0013427c:
MOV R12,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RBX + 0x18]
SUB R12,RDI
LAB_00134287:
MOV R15,RDX
SUB R15,R12
JBE 0x001342ce
CMP RDI,qword ptr [RBX + 0x8]
JZ 0x001342eb
MOV RSI,R14
MOV RDX,R12
CALL 0x00113390
MOV RSI,qword ptr [RBX + 0x8]
MOV RDX,R12
SUB RDX,RSI
ADD RDX,qword ptr [RBX + 0x18]
MOV RDI,RBX
CALL 0x00133f47
MOV ECX,EAX
MOV EAX,0x1
TEST ECX,ECX
JNZ 0x001342e2
ADD R14,R12
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x18],RAX
JMP 0x001342ee
LAB_001342ce:
MOV R15,RDX
LAB_001342d1:
MOV RSI,R14
MOV RDX,R15
CALL 0x00113390
ADD qword ptr [RBX + 0x18],R15
XOR EAX,EAX
LAB_001342e2:
POP RBX
POP R12
POP R14
POP R15
POP RBP
LAB_001342ea:
RET
LAB_001342eb:
MOV R15,RDX
LAB_001342ee:
CMP byte ptr [RBX + 0x84],0x0
JZ 0x00134329
CMP R15,0x1000000
JC 0x00134329
MOV R12D,0xffffff
LAB_00134306:
MOV EDX,0xffffff
MOV RDI,RBX
MOV RSI,R14
CALL 0x00133f47
TEST EAX,EAX
JNZ 0x0013434e
ADD R14,R12
ADD R15,-0xffffff
CMP R15,R12
JA 0x00134306
LAB_00134329:
CMP R15,qword ptr [RBX + 0x50]
JBE 0x00134348
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00133f47
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
SETNZ AL
JMP 0x001342e2
LAB_00134348:
MOV RDI,qword ptr [RBX + 0x18]
JMP 0x001342d1
LAB_0013434e:
MOV EAX,0x1
JMP 0x001342e2
|
bool ma_net_write_buff(long param_1,void *param_2,ulong param_3)
{
int iVar1;
void *__dest;
ulong __n;
if (param_3 != 0) {
if ((*(ulong *)(param_1 + 0x50) < 0x1000000) || (*(char *)(param_1 + 0x84) == '\0')) {
__dest = *(void **)(param_1 + 0x18);
__n = *(long *)(param_1 + 0x10) - (long)__dest;
}
else {
__dest = *(void **)(param_1 + 0x18);
__n = (*(long *)(param_1 + 8) - (long)__dest) + 0xffffff;
}
if (__n <= param_3 && param_3 - __n != 0) {
if (__dest != *(void **)(param_1 + 8)) {
memcpy(__dest,param_2,__n);
iVar1 = ma_net_real_write(param_1,*(long *)(param_1 + 8),
(__n - *(long *)(param_1 + 8)) + *(long *)(param_1 + 0x18));
if (iVar1 != 0) {
return true;
}
param_2 = (void *)((long)param_2 + __n);
*(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 8);
param_3 = param_3 - __n;
}
if (*(char *)(param_1 + 0x84) != '\0') {
for (; 0xffffff < param_3; param_3 = param_3 - 0xffffff) {
iVar1 = ma_net_real_write(param_1,param_2,0xffffff);
if (iVar1 != 0) {
return true;
}
param_2 = (void *)((long)param_2 + 0xffffff);
}
}
if (*(ulong *)(param_1 + 0x50) < param_3) {
iVar1 = ma_net_real_write(param_1,param_2,param_3);
return iVar1 != 0;
}
__dest = *(void **)(param_1 + 0x18);
}
memcpy(__dest,param_2,param_3);
*(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x18) + param_3;
}
return false;
}
|
|
19,505
|
my_sync_dir
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
}
|
O0
|
c
|
my_sync_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0xf5c59
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xf5c72
leaq 0x63a44(%rip), %rax # 0x1596b0
movq %rax, -0x28(%rbp)
jmp 0xf5c7a
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0xf4200
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0xf5ccf
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
orq $0x20, %rsi
callq 0xf5ab0
cmpl $0x0, %eax
je 0xf5cb5
movl $0x2, -0x18(%rbp)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0xf4490
cmpl $0x0, %eax
je 0xf5ccd
movl $0x3, -0x18(%rbp)
jmp 0xf5cd6
movl $0x1, -0x18(%rbp)
jmp 0xf5cd8
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_sync_dir:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
jmp short $+2
loc_F5C59:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_F5C72
lea rax, my_sync_dir_cur_dir_name
mov [rbp+var_28], rax
jmp short loc_F5C7A
loc_F5C72:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
loc_F5C7A:
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_10]
xor esi, esi
call my_open
mov [rbp+var_14], eax
cmp eax, 0
jl short loc_F5CCF
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
or rsi, 20h
call my_sync
cmp eax, 0
jz short loc_F5CB5
mov [rbp+var_18], 2
loc_F5CB5:
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
call my_close
cmp eax, 0
jz short loc_F5CCD
mov [rbp+var_18], 3
loc_F5CCD:
jmp short loc_F5CD6
loc_F5CCF:
mov [rbp+var_18], 1
loc_F5CD6:
jmp short $+2
loc_F5CD8:
mov eax, [rbp+var_18]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
add rsp, 30h
pop rbp
retn
|
long long my_sync_dir(_BYTE *a1, long long a2)
{
void *v3; // [rsp+8h] [rbp-28h]
unsigned int v4; // [rsp+18h] [rbp-18h]
signed int v5; // [rsp+1Ch] [rbp-14h]
v4 = 0;
if ( *a1 )
v3 = a1;
else
v3 = &my_sync_dir_cur_dir_name;
v5 = my_open((long long)v3, 0, a2);
if ( v5 < 0 )
{
return 1;
}
else
{
if ( (unsigned int)my_sync(v5, (const char *)(a2 | 0x20)) )
v4 = 2;
if ( (unsigned int)my_close(v5, (const char *)a2) )
return 3;
}
return v4;
}
|
my_sync_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x18],0x0
JMP 0x001f5c59
LAB_001f5c59:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x001f5c72
LEA RAX,[0x2596b0]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001f5c7a
LAB_001f5c72:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f5c7a:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001f4200
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JL 0x001f5ccf
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
OR RSI,0x20
CALL 0x001f5ab0
CMP EAX,0x0
JZ 0x001f5cb5
MOV dword ptr [RBP + -0x18],0x2
LAB_001f5cb5:
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001f4490
CMP EAX,0x0
JZ 0x001f5ccd
MOV dword ptr [RBP + -0x18],0x3
LAB_001f5ccd:
JMP 0x001f5cd6
LAB_001f5ccf:
MOV dword ptr [RBP + -0x18],0x1
LAB_001f5cd6:
JMP 0x001f5cd8
LAB_001f5cd8:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x30
POP RBP
RET
|
int4 my_sync_dir(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
char *local_30;
int4 local_20;
local_20 = 0;
local_30 = param_1;
if (*param_1 == '\0') {
local_30 = ".";
}
iVar1 = my_open(local_30,0,param_2);
if (iVar1 < 0) {
local_20 = 1;
}
else {
iVar2 = my_sync(iVar1,param_2 | 0x20);
if (iVar2 != 0) {
local_20 = 2;
}
iVar1 = my_close(iVar1,param_2);
if (iVar1 != 0) {
local_20 = 3;
}
}
return local_20;
}
|
|
19,506
|
Catch::toLower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
std::string toLower( std::string const& s ) {
std::string lc = s;
toLowerInPlace( lc );
return lc;
}
|
O3
|
cpp
|
Catch::toLower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x251d8
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x57430
movq (%rbx), %r15
xorl %r12d, %r12d
movzbl (%r15,%r12), %edi
callq 0x17a40
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x5741a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN5Catch7toLowerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov r14, [rbx+8]
test r14, r14
jz short loc_57430
mov r15, [rbx]
xor r12d, r12d
loc_5741A:
movzx edi, byte ptr [r15+r12]
call _tolower
mov [r15+r12], al
inc r12
cmp r14, r12
jnz short loc_5741A
loc_57430:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long * Catch::toLower(long long *a1, long long a2)
{
long long v2; // r14
long long v3; // r15
long long i; // r12
*a1 = (long long)(a1 + 2);
std::string::_M_construct<char *>(a1, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
v2 = a1[1];
if ( v2 )
{
v3 = *a1;
for ( i = 0LL; i != v2; ++i )
*(_BYTE *)(v3 + i) = tolower(*(unsigned __int8 *)(v3 + i));
}
return a1;
}
|
toLower:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x001251d8
MOV R14,qword ptr [RBX + 0x8]
TEST R14,R14
JZ 0x00157430
MOV R15,qword ptr [RBX]
XOR R12D,R12D
LAB_0015741a:
MOVZX EDI,byte ptr [R15 + R12*0x1]
CALL 0x00117a40
MOV byte ptr [R15 + R12*0x1],AL
INC R12
CMP R14,R12
JNZ 0x0015741a
LAB_00157430:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Catch::toLower(std::__cxx11::string const&) */
Catch * __thiscall Catch::toLower(Catch *this,string *param_1)
{
long lVar1;
long lVar2;
int iVar3;
long lVar4;
*(Catch **)this = this + 0x10;
std::__cxx11::string::_M_construct<char*>
(this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
lVar2 = *(long *)this;
lVar4 = 0;
do {
iVar3 = tolower((uint)*(byte *)(lVar2 + lVar4));
*(char *)(lVar2 + lVar4) = (char)iVar3;
lVar4 = lVar4 + 1;
} while (lVar1 != lVar4);
}
return this;
}
|
|
19,507
|
prompt_contains_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/examples/llava/qwen2vl-cli.cpp
|
static bool prompt_contains_image(const std::string& prompt) {
size_t begin, end;
find_image_tag_in_prompt(prompt, begin, end);
return (begin != std::string::npos);
}
|
O3
|
cpp
|
prompt_contains_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xe64ee(%rip), %rsi # 0x109361
xorl %r14d, %r14d
movl $0x21, %ecx
xorl %edx, %edx
callq 0x1e5f0
cmpq $-0x1, %rax
cmovneq %rax, %r14
leaq 0xe64f2(%rip), %rsi # 0x109383
setne %bpl
movl $0x2, %ecx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1e5f0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
_ZL21prompt_contains_imageRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r14
push rbx
mov rbx, rdi
lea rsi, aImgSrcDataImag; "<img src=\"data:image/jpeg;base64,"
xor r14d, r14d
mov ecx, 21h ; '!'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz r14, rax
lea rsi, asc_109383; "\">"
setnz bpl
mov ecx, 2
mov rdi, rbx
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
|
long long prompt_contains_image(long long a1)
{
unsigned int v1; // ebp
long long v2; // r14
long long v3; // rax
v2 = 0LL;
v3 = std::string::find(a1, "<img src=\"data:image/jpeg;base64,", 0LL, 33LL);
if ( v3 != -1 )
v2 = v3;
LOBYTE(v1) = v3 != -1;
std::string::find(a1, "\">", v2, 2LL);
return v1;
}
|
prompt_contains_image:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x209361]
XOR R14D,R14D
MOV ECX,0x21
XOR EDX,EDX
CALL 0x0011e5f0
CMP RAX,-0x1
CMOVNZ R14,RAX
LEA RSI,[0x209383]
SETNZ BPL
MOV ECX,0x2
MOV RDI,RBX
MOV RDX,R14
CALL 0x0011e5f0
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
/* prompt_contains_image(std::__cxx11::string const&) */
ulong prompt_contains_image(string *param_1)
{
ulong uVar1;
int8 unaff_RBP;
ulong uVar2;
uVar1 = std::__cxx11::string::find((char *)param_1,0x209361,0);
uVar2 = 0;
if (uVar1 != 0xffffffffffffffff) {
uVar2 = uVar1;
}
std::__cxx11::string::find((char *)param_1,0x209383,uVar2);
return CONCAT71((int7)((ulong)unaff_RBP >> 8),uVar1 != 0xffffffffffffffff) & 0xffffffff;
}
|
|
19,508
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*)
|
ng-log[P]ng-log/src/signalhandler.cc
|
void DumpStackFrameInfo(const char* prefix, void* pc) {
// Get the symbol name.
const char* symbol = "(unknown)";
#if defined(HAVE_SYMBOLIZE)
char symbolized[1024]; // Big enough for a sane symbol.
// Symbolizes the previous address of pc because pc may be in the
// next function.
if (Symbolize(reinterpret_cast<char*>(pc) - 1, symbolized,
sizeof(symbolized))) {
symbol = symbolized;
}
#else
# pragma message( \
"Symbolize functionality is not available for target platform: stack dump will contain empty frames.")
#endif // defined(HAVE_SYMBOLIZE)
char buf[1024]; // Big enough for stack frame info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString(prefix);
formatter.AppendString("@ ");
const int width = 2 * sizeof(void*) + 2; // + 2 for "0x".
formatter.AppendHexWithPadding(reinterpret_cast<uintptr_t>(pc), width);
formatter.AppendString(" ");
formatter.AppendString(symbol);
formatter.AppendString("\n");
g_failure_writer(buf, formatter.num_bytes_written());
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*):
pushq %rbp
movq %rsp, %rbp
subq $0x850, %rsp # imm = 0x850
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x49ce(%rip), %rax # 0x51948
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $-0x1, %rdi
leaq -0x420(%rbp), %rsi
movl $0x400, %edx # imm = 0x400
xorl %ecx, %ecx
callq 0x4de90
testb $0x1, %al
jne 0x4cf9f
jmp 0x4cfaa
leaq -0x420(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x820(%rbp), %rsi
leaq -0x838(%rbp), %rdi
movl $0x400, %edx # imm = 0x400
callq 0x4d3f0
movq -0x8(%rbp), %rsi
leaq -0x838(%rbp), %rdi
callq 0x4d430
leaq -0x838(%rbp), %rdi
leaq 0x60ce(%rip), %rsi # 0x530ae
callq 0x4d430
movl $0x12, -0x83c(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x838(%rbp), %rdi
movl $0x12, %edx
callq 0x4d5c0
leaq -0x838(%rbp), %rdi
leaq 0x604c(%rip), %rsi # 0x5305e
callq 0x4d430
movq -0x18(%rbp), %rsi
leaq -0x838(%rbp), %rdi
callq 0x4d430
leaq -0x838(%rbp), %rdi
leaq 0x4ee1(%rip), %rsi # 0x51f16
callq 0x4d430
movq 0x2ab5f(%rip), %rax # 0x77ba0
movq %rax, -0x848(%rbp)
leaq -0x820(%rbp), %rax
movq %rax, -0x850(%rbp)
leaq -0x838(%rbp), %rdi
callq 0x4d5a0
movq -0x850(%rbp), %rdi
movq %rax, %rsi
movq -0x848(%rbp), %rax
callq *%rax
addq $0x850, %rsp # imm = 0x850
popq %rbp
retq
nop
|
_ZN5nglog12_GLOBAL__N_118DumpStackFrameInfoEPKcPv:
push rbp
mov rbp, rsp
sub rsp, 850h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, aUnknown; "(unknown)"
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
add rdi, 0FFFFFFFFFFFFFFFFh
lea rsi, [rbp+var_420]
mov edx, 400h
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
test al, 1
jnz short loc_4CF9F
jmp short loc_4CFAA
loc_4CF9F:
lea rax, [rbp+var_420]
mov [rbp+var_18], rax
loc_4CFAA:
lea rsi, [rbp+var_820]; char *
lea rdi, [rbp+var_838]; this
mov edx, 400h; unsigned __int64
call _ZN5nglog12_GLOBAL__N_116MinimalFormatterC2EPcm; nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(char *,ulong)
mov rsi, [rbp+var_8]; char *
lea rdi, [rbp+var_838]; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rdi, [rbp+var_838]; this
lea rsi, asc_530AE; "@ "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov [rbp+var_83C], 12h
mov rsi, [rbp+var_10]; unsigned __int64
lea rdi, [rbp+var_838]; this
mov edx, 12h; int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter20AppendHexWithPaddingEmi; nglog::`anonymous namespace'::MinimalFormatter::AppendHexWithPadding(ulong,int)
lea rdi, [rbp+var_838]; this
lea rsi, asc_5305B+3; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rsi, [rbp+var_18]; char *
lea rdi, [rbp+var_838]; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rdi, [rbp+var_838]; this
lea rsi, asc_51F15+1; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rax, cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::g_failure_writer
mov [rbp+var_848], rax
lea rax, [rbp+var_820]
mov [rbp+var_850], rax
lea rdi, [rbp+var_838]; this
call _ZNK5nglog12_GLOBAL__N_116MinimalFormatter17num_bytes_writtenEv; nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written(void)
mov rdi, [rbp+var_850]
mov rsi, rax
mov rax, [rbp+var_848]
call rax
add rsp, 850h
pop rbp
retn
|
long long nglog::`anonymous namespace'::DumpStackFrameInfo(
nglog::_anonymous_namespace_ *this,
const char *a2,
void *a3)
{
long long v3; // rax
long long ( *v5)(nglog::_anonymous_namespace_ *__hidden, const char *, unsigned long long); // [rsp+8h] [rbp-848h]
char v6[24]; // [rsp+18h] [rbp-838h] BYREF
char v7[1024]; // [rsp+30h] [rbp-820h] BYREF
_BYTE v8[1032]; // [rsp+430h] [rbp-420h] BYREF
char *v9; // [rsp+838h] [rbp-18h]
unsigned long long v10; // [rsp+840h] [rbp-10h]
char *v11; // [rsp+848h] [rbp-8h]
v11 = (char *)this;
v10 = (unsigned long long)a2;
v9 = "(unknown)";
if ( (nglog::tools::Symbolize(a2 - 1, v8, 1024LL, 0LL) & 1) != 0 )
v9 = v8;
nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
v7,
0x400uLL);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
v11);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
"@ ");
nglog::`anonymous namespace'::MinimalFormatter::AppendHexWithPadding(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
v10,
18);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
" ");
nglog::`anonymous namespace'::MinimalFormatter::AppendString((nglog::_anonymous_namespace_::MinimalFormatter *)v6, v9);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v6,
"\n");
v5 = nglog::`anonymous namespace'::g_failure_writer;
v3 = nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written((nglog::_anonymous_namespace_::MinimalFormatter *)v6);
return ((long long ( *)(char *, long long))v5)(v7, v3);
}
|
DumpStackFrameInfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x850
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x151948]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,-0x1
LEA RSI,[RBP + -0x420]
MOV EDX,0x400
XOR ECX,ECX
CALL 0x0014de90
TEST AL,0x1
JNZ 0x0014cf9f
JMP 0x0014cfaa
LAB_0014cf9f:
LEA RAX,[RBP + -0x420]
MOV qword ptr [RBP + -0x18],RAX
LAB_0014cfaa:
LEA RSI,[RBP + -0x820]
LEA RDI,[RBP + -0x838]
MOV EDX,0x400
CALL 0x0014d3f0
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x838]
CALL 0x0014d430
LEA RDI,[RBP + -0x838]
LEA RSI,[0x1530ae]
CALL 0x0014d430
MOV dword ptr [RBP + -0x83c],0x12
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x838]
MOV EDX,0x12
CALL 0x0014d5c0
LEA RDI,[RBP + -0x838]
LEA RSI,[0x15305e]
CALL 0x0014d430
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x838]
CALL 0x0014d430
LEA RDI,[RBP + -0x838]
LEA RSI,[0x151f16]
CALL 0x0014d430
MOV RAX,qword ptr [0x00177ba0]
MOV qword ptr [RBP + -0x848],RAX
LEA RAX,[RBP + -0x820]
MOV qword ptr [RBP + -0x850],RAX
LEA RDI,[RBP + -0x838]
CALL 0x0014d5a0
MOV RDI,qword ptr [RBP + -0x850]
MOV RSI,RAX
MOV RAX,qword ptr [RBP + -0x848]
CALL RAX
ADD RSP,0x850
POP RBP
RET
|
/* nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*) */
void nglog::(anonymous_namespace)::DumpStackFrameInfo(char *param_1,void *param_2)
{
int *puVar1;
ulong uVar2;
int8 uVar3;
MinimalFormatter local_840 [24];
char local_828 [1024];
char local_428 [1032];
char *local_20;
void *local_18;
char *local_10;
local_20 = "(unknown)";
local_18 = param_2;
local_10 = param_1;
uVar2 = tools::Symbolize((long)param_2 + -1,local_428,0x400,0);
if ((uVar2 & 1) != 0) {
local_20 = local_428;
}
MinimalFormatter::MinimalFormatter(local_840,local_828,0x400);
MinimalFormatter::AppendString(local_840,local_10);
MinimalFormatter::AppendString(local_840,"@ ");
MinimalFormatter::AppendHexWithPadding(local_840,(ulong)local_18,0x12);
MinimalFormatter::AppendString(local_840," ");
MinimalFormatter::AppendString(local_840,local_20);
MinimalFormatter::AppendString(local_840,"\n");
puVar1 = g_failure_writer;
uVar3 = MinimalFormatter::num_bytes_written(local_840);
(*(code *)puVar1)(local_828,uVar3);
return;
}
|
|
19,509
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*)
|
ng-log[P]ng-log/src/signalhandler.cc
|
void DumpStackFrameInfo(const char* prefix, void* pc) {
// Get the symbol name.
const char* symbol = "(unknown)";
#if defined(HAVE_SYMBOLIZE)
char symbolized[1024]; // Big enough for a sane symbol.
// Symbolizes the previous address of pc because pc may be in the
// next function.
if (Symbolize(reinterpret_cast<char*>(pc) - 1, symbolized,
sizeof(symbolized))) {
symbol = symbolized;
}
#else
# pragma message( \
"Symbolize functionality is not available for target platform: stack dump will contain empty frames.")
#endif // defined(HAVE_SYMBOLIZE)
char buf[1024]; // Big enough for stack frame info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString(prefix);
formatter.AppendString("@ ");
const int width = 2 * sizeof(void*) + 2; // + 2 for "0x".
formatter.AppendHexWithPadding(reinterpret_cast<uintptr_t>(pc), width);
formatter.AppendString(" ");
formatter.AppendString(symbol);
formatter.AppendString("\n");
g_failure_writer(buf, formatter.num_bytes_written());
}
|
O3
|
cpp
|
nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x828, %rsp # imm = 0x828
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x1(%rsi), %rdi
leaq 0x420(%rsp), %r15
movl $0x400, %edx # imm = 0x400
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x213b0
leaq 0x2a99(%rip), %r12 # 0x23878
testb %al, %al
cmovneq %r15, %r12
leaq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
leaq 0x420(%rsp), %rax
movq %rax, 0x18(%rsp)
movb (%r14), %dl
testb %dl, %dl
je 0x20e4a
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x400, %rax # imm = 0x400
je 0x20e5d
movb %dl, 0x20(%rsp,%rax)
movb 0x1(%r14,%rax), %dl
incq %rax
testb %dl, %dl
jne 0x20e0c
leaq -0x1(%rax), %rcx
cmpq $0x3fe, %rcx # imm = 0x3FE
ja 0x20e64
movb $0x40, 0x20(%rsp,%rax)
cmpq $0x3ff, %rax # imm = 0x3FF
jne 0x20e51
movl $0x1, %ecx
movl $0x3ff, %eax # imm = 0x3FF
jmp 0x20e66
movb $0x40, 0x20(%rsp)
xorl %eax, %eax
movb $0x20, 0x21(%rsp,%rax)
movl $0x2, %ecx
jmp 0x20e66
movl $0x400, %eax # imm = 0x400
jmp 0x20e66
xorl %ecx, %ecx
addq %rcx, %rax
leaq (%rsp,%rax), %r14
addq $0x20, %r14
cmpq $0x3ff, %rax # imm = 0x3FF
ja 0x20e91
movb $0x30, 0x20(%rsp,%rax)
movl $0x1, %ecx
je 0x20e93
movb $0x78, 0x21(%rsp,%rax)
movl $0x2, %ecx
jmp 0x20e93
xorl %ecx, %ecx
addq %r14, %rcx
leaq 0x8(%rsp), %r15
movq %rcx, 0x8(%r15)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x20f5a
movq 0x8(%r15), %rdx
leaq 0x12(%r14), %rbx
cmpq %rbx, %rdx
jae 0x20ee5
movq %rbx, %r15
subq %rdx, %r15
subq %r14, %rdx
je 0x20ed3
leaq (%r14,%r15), %rdi
movq %r14, %rsi
callq 0x7900
movq %r14, %rdi
movl $0x20, %esi
movq %r15, %rdx
callq 0x72a0
jmp 0x20ee8
movq %rdx, %rbx
movq 0x18(%rsp), %rax
cmpq %rax, %rbx
jae 0x20efc
movb $0x20, (%rbx)
movl $0x1, %ecx
jmp 0x20efe
xorl %ecx, %ecx
addq %rcx, %rbx
movb (%r12), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x20f20
leaq (%rbx,%rcx), %rsi
cmpq %rax, %rsi
jae 0x20f20
movb %dl, (%rsi)
movb 0x1(%r12,%rcx), %dl
incq %rcx
jmp 0x20f07
addq %rcx, %rbx
cmpq %rax, %rbx
jae 0x20f32
movb $0xa, (%rbx)
movl $0x1, %eax
jmp 0x20f34
xorl %eax, %eax
addq %rax, %rbx
subq 0x8(%rsp), %rbx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq *0x10a46(%rip) # 0x31990
addq $0x828, %rsp # imm = 0x828
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN5nglog12_GLOBAL__N_118DumpStackFrameInfoEPKcPv:
push r15
push r14
push r12
push rbx
sub rsp, 828h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsi-1]
lea r15, [rsp+848h+var_428]
mov edx, 400h
mov rsi, r15
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
lea r12, aUnknown; "(unknown)"
test al, al
cmovnz r12, r15
lea rax, [rsp+848h+var_828]
mov [rsp+848h+var_840], rax
mov [rsp+848h+var_838], rax
lea rax, [rsp+848h+var_428]
mov [rsp+848h+var_830], rax
mov dl, [r14]
test dl, dl
jz short loc_20E4A
xor ecx, ecx
xor eax, eax
loc_20E0C:
cmp rax, 400h
jz short loc_20E5D
mov [rsp+rax+848h+var_828], dl
mov dl, [r14+rax+1]
inc rax
test dl, dl
jnz short loc_20E0C
lea rcx, [rax-1]
cmp rcx, 3FEh
ja short loc_20E64
mov [rsp+rax+848h+var_828], 40h ; '@'
cmp rax, 3FFh
jnz short loc_20E51
mov ecx, 1
mov eax, 3FFh
jmp short loc_20E66
loc_20E4A:
mov [rsp+848h+var_828], 40h ; '@'
xor eax, eax
loc_20E51:
mov [rsp+rax+848h+var_827], 20h ; ' '
mov ecx, 2
jmp short loc_20E66
loc_20E5D:
mov eax, 400h
jmp short loc_20E66
loc_20E64:
xor ecx, ecx
loc_20E66:
add rax, rcx
lea r14, [rsp+rax+848h+var_848]
add r14, 20h ; ' '
cmp rax, 3FFh
ja short loc_20E91
mov [rsp+rax+848h+var_828], 30h ; '0'
mov ecx, 1
jz short loc_20E93
mov [rsp+rax+848h+var_827], 78h ; 'x'
mov ecx, 2
jmp short loc_20E93
loc_20E91:
xor ecx, ecx
loc_20E93:
add rcx, r14
lea r15, [rsp+848h+var_840]
mov [r15+8], rcx
mov rdi, r15; this
mov rsi, rbx; unsigned __int64
mov edx, 10h; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
mov rdx, [r15+8]
lea rbx, [r14+12h]
cmp rdx, rbx
jnb short loc_20EE5
mov r15, rbx
sub r15, rdx
sub rdx, r14
jz short loc_20ED3
lea rdi, [r14+r15]
mov rsi, r14
call _memmove
loc_20ED3:
mov rdi, r14
mov esi, 20h ; ' '
mov rdx, r15
call _memset
jmp short loc_20EE8
loc_20EE5:
mov rbx, rdx
loc_20EE8:
mov rax, [rsp+848h+var_830]
cmp rbx, rax
jnb short loc_20EFC
mov byte ptr [rbx], 20h ; ' '
mov ecx, 1
jmp short loc_20EFE
loc_20EFC:
xor ecx, ecx
loc_20EFE:
add rbx, rcx
mov dl, [r12]; unsigned __int64
xor ecx, ecx
loc_20F07:
test dl, dl
jz short loc_20F20
lea rsi, [rbx+rcx]
cmp rsi, rax
jnb short loc_20F20
mov [rsi], dl
mov dl, [r12+rcx+1]
inc rcx
jmp short loc_20F07
loc_20F20:
add rbx, rcx
cmp rbx, rax
jnb short loc_20F32
mov byte ptr [rbx], 0Ah
mov eax, 1
jmp short loc_20F34
loc_20F32:
xor eax, eax
loc_20F34:
add rbx, rax
sub rbx, [rsp+848h+var_840]
lea rdi, [rsp+848h+var_828]; this
mov rsi, rbx; char *
call cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::WriteToStderr(char const*,ulong)
add rsp, 828h
pop rbx
pop r12
pop r14
pop r15
retn
|
long long nglog::`anonymous namespace'::DumpStackFrameInfo(
nglog::_anonymous_namespace_ *this,
const char *a2,
void *a3)
{
const char *v3; // r12
char v4; // dl
long long v5; // rcx
long long v6; // rax
unsigned long long v7; // rax
_BYTE *v8; // r14
long long v9; // rcx
unsigned long long v10; // rdx
_BYTE *v11; // rbx
long long v12; // r15
_BYTE *v13; // rax
long long v14; // rcx
_BYTE *v15; // rbx
long long i; // rcx
_BYTE *v17; // rbx
long long v18; // rax
_BYTE *v20; // [rsp+8h] [rbp-840h] BYREF
_BYTE *v21; // [rsp+10h] [rbp-838h]
_BYTE *v22; // [rsp+18h] [rbp-830h]
_BYTE v23[1024]; // [rsp+20h] [rbp-828h] BYREF
_BYTE v24[1064]; // [rsp+420h] [rbp-428h] BYREF
v3 = "(unknown)";
if ( (unsigned __int8)nglog::tools::Symbolize(a2 - 1, v24, 1024LL, 0LL) )
v3 = v24;
v20 = v23;
v21 = v23;
v22 = v24;
v4 = *(_BYTE *)this;
if ( *(_BYTE *)this )
{
v5 = 0LL;
v6 = 0LL;
do
{
if ( v6 == 1024 )
{
v6 = 1024LL;
goto LABEL_14;
}
v23[v6] = v4;
v4 = *((_BYTE *)this + ++v6);
}
while ( v4 );
if ( (unsigned long long)(v6 - 1) > 0x3FE )
{
v5 = 0LL;
}
else
{
v23[v6] = 64;
if ( v6 != 1023 )
goto LABEL_11;
v5 = 1LL;
v6 = 1023LL;
}
}
else
{
v23[0] = 64;
v6 = 0LL;
LABEL_11:
v23[v6 + 1] = 32;
v5 = 2LL;
}
LABEL_14:
v7 = v5 + v6;
v8 = &v23[v7];
if ( v7 > 0x3FF )
{
v9 = 0LL;
}
else
{
v23[v7] = 48;
v9 = 1LL;
if ( v7 != 1023 )
{
v23[v7 + 1] = 120;
v9 = 2LL;
}
}
v21 = &v8[v9];
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)&v20,
(unsigned long long)a2,
0x10u);
v10 = (unsigned long long)v21;
v11 = v8 + 18;
if ( v21 >= v8 + 18 )
{
v11 = v21;
}
else
{
v12 = v11 - v21;
if ( v21 != v8 )
memmove(&v8[v12], v8, v21 - v8);
memset(v8, 32LL, v12);
}
v13 = v22;
if ( v11 >= v22 )
{
v14 = 0LL;
}
else
{
*v11 = 32;
v14 = 1LL;
}
v15 = &v11[v14];
LOBYTE(v10) = *v3;
for ( i = 0LL; (_BYTE)v10 && &v15[i] < v13; ++i )
{
v15[i] = v10;
LOBYTE(v10) = v3[i + 1];
}
v17 = &v15[i];
if ( v17 >= v13 )
{
v18 = 0LL;
}
else
{
*v17 = 10;
v18 = 1LL;
}
return nglog::`anonymous namespace'::g_failure_writer(
(nglog::_anonymous_namespace_ *)v23,
(const char *)(&v17[v18] - v20),
v10);
}
|
DumpStackFrameInfo:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x828
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSI + -0x1]
LEA R15,[RSP + 0x420]
MOV EDX,0x400
MOV RSI,R15
XOR ECX,ECX
CALL 0x001213b0
LEA R12,[0x123878]
TEST AL,AL
CMOVNZ R12,R15
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[RSP + 0x420]
MOV qword ptr [RSP + 0x18],RAX
MOV DL,byte ptr [R14]
TEST DL,DL
JZ 0x00120e4a
XOR ECX,ECX
XOR EAX,EAX
LAB_00120e0c:
CMP RAX,0x400
JZ 0x00120e5d
MOV byte ptr [RSP + RAX*0x1 + 0x20],DL
MOV DL,byte ptr [R14 + RAX*0x1 + 0x1]
INC RAX
TEST DL,DL
JNZ 0x00120e0c
LEA RCX,[RAX + -0x1]
CMP RCX,0x3fe
JA 0x00120e64
MOV byte ptr [RSP + RAX*0x1 + 0x20],0x40
CMP RAX,0x3ff
JNZ 0x00120e51
MOV ECX,0x1
MOV EAX,0x3ff
JMP 0x00120e66
LAB_00120e4a:
MOV byte ptr [RSP + 0x20],0x40
XOR EAX,EAX
LAB_00120e51:
MOV byte ptr [RSP + RAX*0x1 + 0x21],0x20
MOV ECX,0x2
JMP 0x00120e66
LAB_00120e5d:
MOV EAX,0x400
JMP 0x00120e66
LAB_00120e64:
XOR ECX,ECX
LAB_00120e66:
ADD RAX,RCX
LEA R14,[RSP + RAX*0x1]
ADD R14,0x20
CMP RAX,0x3ff
JA 0x00120e91
MOV byte ptr [RSP + RAX*0x1 + 0x20],0x30
MOV ECX,0x1
JZ 0x00120e93
MOV byte ptr [RSP + RAX*0x1 + 0x21],0x78
MOV ECX,0x2
JMP 0x00120e93
LAB_00120e91:
XOR ECX,ECX
LAB_00120e93:
ADD RCX,R14
LEA R15,[RSP + 0x8]
MOV qword ptr [R15 + 0x8],RCX
MOV RDI,R15
MOV RSI,RBX
MOV EDX,0x10
CALL 0x00120f5a
MOV RDX,qword ptr [R15 + 0x8]
LEA RBX,[R14 + 0x12]
CMP RDX,RBX
JNC 0x00120ee5
MOV R15,RBX
SUB R15,RDX
SUB RDX,R14
JZ 0x00120ed3
LEA RDI,[R14 + R15*0x1]
MOV RSI,R14
CALL 0x00107900
LAB_00120ed3:
MOV RDI,R14
MOV ESI,0x20
MOV RDX,R15
CALL 0x001072a0
JMP 0x00120ee8
LAB_00120ee5:
MOV RBX,RDX
LAB_00120ee8:
MOV RAX,qword ptr [RSP + 0x18]
CMP RBX,RAX
JNC 0x00120efc
MOV byte ptr [RBX],0x20
MOV ECX,0x1
JMP 0x00120efe
LAB_00120efc:
XOR ECX,ECX
LAB_00120efe:
ADD RBX,RCX
MOV DL,byte ptr [R12]
XOR ECX,ECX
LAB_00120f07:
TEST DL,DL
JZ 0x00120f20
LEA RSI,[RBX + RCX*0x1]
CMP RSI,RAX
JNC 0x00120f20
MOV byte ptr [RSI],DL
MOV DL,byte ptr [R12 + RCX*0x1 + 0x1]
INC RCX
JMP 0x00120f07
LAB_00120f20:
ADD RBX,RCX
CMP RBX,RAX
JNC 0x00120f32
MOV byte ptr [RBX],0xa
MOV EAX,0x1
JMP 0x00120f34
LAB_00120f32:
XOR EAX,EAX
LAB_00120f34:
ADD RBX,RAX
SUB RBX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x20]
MOV RSI,RBX
CALL qword ptr [0x00131990]
ADD RSP,0x828
POP RBX
POP R12
POP R14
POP R15
RET
|
/* nglog::(anonymous namespace)::DumpStackFrameInfo(char const*, void*) */
void nglog::(anonymous_namespace)::DumpStackFrameInfo(char *param_1,void *param_2)
{
char *pcVar1;
char cVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
char *__src;
size_t __n;
bool bVar8;
char acStack_103e [2030];
int8 uStack_850;
char *local_840;
char *local_838;
char *local_830;
char local_828 [18];
char acStack_816 [1006];
char local_428 [1032];
uStack_850 = 0x120dd8;
cVar2 = tools::Symbolize((long)param_2 + -1,local_428,0x400);
pcVar7 = "(unknown)";
if (cVar2 != '\0') {
pcVar7 = local_428;
}
local_840 = local_828;
local_830 = local_428;
cVar2 = *param_1;
if (cVar2 == '\0') {
local_828[0] = '@';
uVar4 = 0;
}
else {
lVar5 = 0;
uVar4 = 0;
do {
uVar3 = uVar4;
if (uVar3 == 0x400) {
uVar4 = 0x400;
goto LAB_00120e66;
}
local_828[uVar3] = cVar2;
cVar2 = param_1[uVar3 + 1];
uVar4 = uVar3 + 1;
} while (cVar2 != '\0');
if (0x3fe < uVar3) {
lVar5 = 0;
goto LAB_00120e66;
}
local_828[uVar3 + 1] = '@';
if (uVar4 == 0x3ff) {
lVar5 = 1;
uVar4 = 0x3ff;
goto LAB_00120e66;
}
}
local_828[uVar4 + 1] = ' ';
lVar5 = 2;
LAB_00120e66:
uVar4 = uVar4 + lVar5;
__src = local_828 + uVar4;
if (uVar4 < 0x400) {
local_828[uVar4] = '0';
lVar5 = 1;
if (uVar4 != 0x3ff) {
local_828[uVar4 + 1] = 'x';
lVar5 = 2;
}
}
else {
lVar5 = 0;
}
local_838 = __src + lVar5;
uStack_850 = 0x120eaf;
MinimalFormatter::AppendUint64((MinimalFormatter *)&local_840,(ulong)param_2,0x10);
pcVar1 = acStack_816 + uVar4;
pcVar6 = local_838;
if (local_838 < pcVar1) {
__n = (long)pcVar1 - (long)local_838;
if ((long)local_838 - (long)__src != 0) {
uStack_850 = 0x120ed3;
memmove(__src + __n,__src,(long)local_838 - (long)__src);
}
uStack_850 = 0x120ee3;
memset(__src,0x20,__n);
pcVar6 = pcVar1;
}
bVar8 = pcVar6 < local_830;
if (bVar8) {
*pcVar6 = ' ';
}
cVar2 = *pcVar7;
for (lVar5 = 0; (cVar2 != '\0' && (pcVar6 + lVar5 + (ulong)bVar8 < local_830)); lVar5 = lVar5 + 1)
{
pcVar6[lVar5 + (ulong)bVar8] = cVar2;
cVar2 = pcVar7[lVar5 + 1];
}
pcVar6 = pcVar6 + lVar5 + (ulong)bVar8;
if (pcVar6 < local_830) {
*pcVar6 = '\n';
}
uStack_850 = 0x120f4a;
(*(code *)g_failure_writer)(local_828,pcVar6 + ((ulong)(pcVar6 < local_830) - (long)local_840));
return;
}
|
|
19,510
|
makeContextCurrentOSMesa
|
untodesu[P]riteg/build_O0/_deps/glfw-src/src/osmesa_context.c
|
static void makeContextCurrentOSMesa(_GLFWwindow* window)
{
if (window)
{
int width, height;
_glfwPlatformGetFramebufferSize(window, &width, &height);
// Check to see if we need to allocate a new buffer
if ((window->context.osmesa.buffer == NULL) ||
(width != window->context.osmesa.width) ||
(height != window->context.osmesa.height))
{
free(window->context.osmesa.buffer);
// Allocate the new buffer (width * height * 8-bit RGBA)
window->context.osmesa.buffer = calloc(4, (size_t) width * height);
window->context.osmesa.width = width;
window->context.osmesa.height = height;
}
if (!OSMesaMakeCurrent(window->context.osmesa.handle,
window->context.osmesa.buffer,
GL_UNSIGNED_BYTE,
width, height))
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"OSMesa: Failed to make context current");
return;
}
}
_glfwPlatformSetTls(&_glfw.contextSlot, window);
}
|
O0
|
c
|
makeContextCurrentOSMesa:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3ac40
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x31ff0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2b0(%rax)
je 0x3aba4
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x2a8(%rcx), %eax
jne 0x3aba4
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x2ac(%rcx), %eax
je 0x3abf2
movq -0x8(%rbp), %rax
movq 0x2b0(%rax), %rdi
callq 0xcb20
movslq -0xc(%rbp), %rsi
movslq -0x10(%rbp), %rax
imulq %rax, %rsi
movl $0x4, %edi
callq 0xc5b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b0(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2a8(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2ac(%rax)
leaq 0xa606f(%rip), %rax # 0xe0c68
movq 0x20970(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x2a0(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq 0x2b0(%rcx), %rsi
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
movl $0x1401, %edx # imm = 0x1401
callq *%rax
cmpl $0x0, %eax
jne 0x3ac3e
movl $0x10008, %edi # imm = 0x10008
leaq 0x81ed4(%rip), %rsi # 0xbcb09
movb $0x0, %al
callq 0x221a0
jmp 0x3ac57
jmp 0x3ac40
movq -0x8(%rbp), %rsi
leaq 0xa601d(%rip), %rdi # 0xe0c68
addq $0x1fe1c, %rdi # imm = 0x1FE1C
callq 0x367e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
makeContextCurrentOSMesa:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz loc_3AC40
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_C]
lea rdx, [rbp+var_10]
call _glfwPlatformGetFramebufferSize
mov rax, [rbp+var_8]
cmp qword ptr [rax+2B0h], 0
jz short loc_3ABA4
mov eax, [rbp+var_C]
mov rcx, [rbp+var_8]
cmp eax, [rcx+2A8h]
jnz short loc_3ABA4
mov eax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp eax, [rcx+2ACh]
jz short loc_3ABF2
loc_3ABA4:
mov rax, [rbp+var_8]
mov rdi, [rax+2B0h]
call _free
movsxd rsi, [rbp+var_C]
movsxd rax, [rbp+var_10]
imul rsi, rax
mov edi, 4
call _calloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+2B0h], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+2A8h], ecx
mov ecx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+2ACh], ecx
loc_3ABF2:
lea rax, _glfw
mov rax, [rax+20970h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+2A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+2B0h]
mov ecx, [rbp+var_C]
mov r8d, [rbp+var_10]
mov edx, 1401h
call rax
cmp eax, 0
jnz short loc_3AC3E
mov edi, 10008h
lea rsi, aOsmesaFailedTo_1; "OSMesa: Failed to make context current"
mov al, 0
call _glfwInputError
jmp short loc_3AC57
loc_3AC3E:
jmp short $+2
loc_3AC40:
mov rsi, [rbp+var_8]
lea rdi, _glfw
add rdi, 1FE1Ch
call _glfwPlatformSetTls
loc_3AC57:
add rsp, 10h
pop rbp
retn
|
long long makeContextCurrentOSMesa(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-10h] BYREF
unsigned int v3; // [rsp+4h] [rbp-Ch] BYREF
long long v4; // [rsp+8h] [rbp-8h]
v4 = a1;
if ( !a1 )
return glfwPlatformSetTls(&glfw[32647], v4);
glfwPlatformGetFramebufferSize(v4, &v3, &v2);
if ( !*(_QWORD *)(v4 + 688) || v3 != *(_DWORD *)(v4 + 680) || v2 != *(_DWORD *)(v4 + 684) )
{
free(*(_QWORD *)(v4 + 688));
*(_QWORD *)(v4 + 688) = calloc(4LL, (int)v2 * (long long)(int)v3);
*(_DWORD *)(v4 + 680) = v3;
*(_DWORD *)(v4 + 684) = v2;
}
if ( (*(unsigned int ( **)(_QWORD, _QWORD, long long, _QWORD, _QWORD))&glfw[33372])(
*(_QWORD *)(v4 + 672),
*(_QWORD *)(v4 + 688),
5121LL,
v3,
v2) )
{
return glfwPlatformSetTls(&glfw[32647], v4);
}
else
{
return glfwInputError(0x10008u, (long long)"OSMesa: Failed to make context current");
}
}
|
makeContextCurrentOSMesa:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0013ac40
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xc]
LEA RDX,[RBP + -0x10]
CALL 0x00131ff0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x2b0],0x0
JZ 0x0013aba4
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x2a8]
JNZ 0x0013aba4
MOV EAX,dword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x2ac]
JZ 0x0013abf2
LAB_0013aba4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2b0]
CALL 0x0010cb20
MOVSXD RSI,dword ptr [RBP + -0xc]
MOVSXD RAX,dword ptr [RBP + -0x10]
IMUL RSI,RAX
MOV EDI,0x4
CALL 0x0010c5b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2b0],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2a8],ECX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2ac],ECX
LAB_0013abf2:
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x20970]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x2a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x2b0]
MOV ECX,dword ptr [RBP + -0xc]
MOV R8D,dword ptr [RBP + -0x10]
MOV EDX,0x1401
CALL RAX
CMP EAX,0x0
JNZ 0x0013ac3e
MOV EDI,0x10008
LEA RSI,[0x1bcb09]
MOV AL,0x0
CALL 0x001221a0
JMP 0x0013ac57
LAB_0013ac3e:
JMP 0x0013ac40
LAB_0013ac40:
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x1e0c68]
ADD RDI,0x1fe1c
CALL 0x001367e0
LAB_0013ac57:
ADD RSP,0x10
POP RBP
RET
|
void makeContextCurrentOSMesa(long param_1)
{
int iVar1;
void *pvVar2;
int local_18;
int local_14;
long local_10;
local_10 = param_1;
if (param_1 != 0) {
_glfwPlatformGetFramebufferSize(param_1,&local_14,&local_18);
if (((*(long *)(local_10 + 0x2b0) == 0) || (local_14 != *(int *)(local_10 + 0x2a8))) ||
(local_18 != *(int *)(local_10 + 0x2ac))) {
free(*(void **)(local_10 + 0x2b0));
pvVar2 = calloc(4,(long)local_14 * (long)local_18);
*(void **)(local_10 + 0x2b0) = pvVar2;
*(int *)(local_10 + 0x2a8) = local_14;
*(int *)(local_10 + 0x2ac) = local_18;
}
iVar1 = (*DAT_002015d8)(*(int8 *)(local_10 + 0x2a0),*(int8 *)(local_10 + 0x2b0),
0x1401,local_14,local_18);
if (iVar1 == 0) {
_glfwInputError(0x10008,"OSMesa: Failed to make context current");
return;
}
}
_glfwPlatformSetTls(&DAT_00200a84,local_10);
return;
}
|
|
19,511
|
my_ll10tostr_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t len, int radix, longlong val)
{
char buffer[65];
register char *p, *db, *de;
long long_val;
int sl= 0;
ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (val < 0)
{
sl= 1;
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
}
}
p= &buffer[sizeof(buffer)-1];
*p='\0';
if (uval == 0)
{
*--p= '0';
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p= '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p= (char) ('0' + (long_val - quo*10));
long_val= quo;
}
cnv:
if (sl)
{
*--p= '-';
}
for ( db= dst, de= dst + len ; (dst < de) && *p ; p++)
{
int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de);
if (cnvres > 0)
dst+= cnvres;
else
break;
}
return (int) (dst -db);
}
|
O3
|
c
|
my_ll10tostr_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testl %ecx, %ecx
setns %al
testq %r8, %r8
setns %sil
orb %al, %sil
movq %r8, %rcx
negq %rcx
testb %sil, %sil
cmovneq %r8, %rcx
movb $0x0, -0x40(%rbp)
testq %rcx, %rcx
je 0xc3526
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
js 0xc3531
leaq -0x40(%rbp), %r13
jmp 0xc3551
leaq -0x41(%rbp), %r13
movb $0x30, (%r13)
jmp 0xc3575
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
leaq -0x41(%rbp), %r13
imull $0xf6, %edx, %eax
addl %eax, %ecx
addb $0x30, %cl
movb %cl, (%r13)
movq %rdx, %rcx
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %ecx, %eax
addb $0x30, %al
movb %al, -0x1(%r13)
decq %r13
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0xc3551
testb %sil, %sil
jne 0xc3582
movb $0x2d, -0x1(%r13)
decq %r13
movq %rbx, %r12
testq %r14, %r14
jle 0xc35be
addq %rbx, %r14
movq %rbx, %r12
movsbq (%r13), %rsi
testq %rsi, %rsi
je 0xc35be
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0xc35be
movl %eax, %eax
addq %rax, %r12
incq %r13
cmpq %r14, %r12
jb 0xc3590
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xc35e2
subl %ebx, %r12d
movslq %r12d, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
|
my_ll10tostr_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
test ecx, ecx
setns al
test r8, r8
setns sil
or sil, al
mov rcx, r8
neg rcx
test sil, sil
cmovnz rcx, r8
mov [rbp+var_40], 0
test rcx, rcx
jz short loc_C3526
mov rdi, 0CCCCCCCCCCCCCCCDh
js short loc_C3531
lea r13, [rbp+var_40]
jmp short loc_C3551
loc_C3526:
lea r13, [rbp+var_41]
mov byte ptr [r13+0], 30h ; '0'
jmp short loc_C3575
loc_C3531:
mov rax, rcx
mul rdi
shr rdx, 3
lea r13, [rbp+var_41]
imul eax, edx, 0F6h
add ecx, eax
add cl, 30h ; '0'
mov [r13+0], cl
mov rcx, rdx
loc_C3551:
mov rax, rcx
mul rdi
shr rdx, 3
imul eax, edx, 0F6h
add eax, ecx
add al, 30h ; '0'
mov [r13-1], al
dec r13
cmp rcx, 9
mov rcx, rdx
ja short loc_C3551
loc_C3575:
test sil, sil
jnz short loc_C3582
mov byte ptr [r13-1], 2Dh ; '-'
dec r13
loc_C3582:
mov r12, rbx
test r14, r14
jle short loc_C35BE
add r14, rbx
mov r12, rbx
loc_C3590:
movsx rsi, byte ptr [r13+0]
test rsi, rsi
jz short loc_C35BE
mov rax, [r15+0B8h]
mov rdi, r15
mov rdx, r12
mov rcx, r14
call qword ptr [rax+30h]
test eax, eax
jle short loc_C35BE
mov eax, eax
add r12, rax
inc r13
cmp r12, r14
jb short loc_C3590
loc_C35BE:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_C35E2
sub r12d, ebx
movsxd rax, r12d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C35E2:
call ___stack_chk_fail
|
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5)
{
bool v6; // si
unsigned long long v7; // rcx
char *v8; // r13
bool v9; // cc
unsigned long long v10; // r12
unsigned long long v11; // r14
int v12; // eax
char v14; // [rsp+3Fh] [rbp-41h] BYREF
char v15; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+50h] [rbp-30h]
v16 = __readfsqword(0x28u);
v6 = a4 >= 0 || a5 >= 0;
v7 = -a5;
if ( v6 )
v7 = a5;
v15 = 0;
if ( v7 )
{
if ( (v7 & 0x8000000000000000LL) != 0LL )
{
v8 = &v14;
v14 = v7 % 0xA + 48;
v7 /= 0xAuLL;
}
else
{
v8 = &v15;
}
do
{
*--v8 = v7 % 0xA + 48;
v9 = v7 <= 9;
v7 /= 0xAuLL;
}
while ( !v9 );
}
else
{
v8 = &v14;
v14 = 48;
}
if ( !v6 )
*--v8 = 45;
LODWORD(v10) = a2;
if ( a3 > 0 )
{
v11 = a2 + a3;
v10 = a2;
do
{
if ( !*v8 )
break;
v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
*v8,
v10,
v11);
if ( v12 <= 0 )
break;
v10 += (unsigned int)v12;
++v8;
}
while ( v10 < v11 );
}
return (int)v10 - (int)a2;
}
|
my_ll10tostr_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST ECX,ECX
SETNS AL
TEST R8,R8
SETNS SIL
OR SIL,AL
MOV RCX,R8
NEG RCX
TEST SIL,SIL
CMOVNZ RCX,R8
MOV byte ptr [RBP + -0x40],0x0
TEST RCX,RCX
JZ 0x001c3526
MOV RDI,-0x3333333333333333
JS 0x001c3531
LEA R13,[RBP + -0x40]
JMP 0x001c3551
LAB_001c3526:
LEA R13,[RBP + -0x41]
MOV byte ptr [R13],0x30
JMP 0x001c3575
LAB_001c3531:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
LEA R13,[RBP + -0x41]
IMUL EAX,EDX,0xf6
ADD ECX,EAX
ADD CL,0x30
MOV byte ptr [R13],CL
MOV RCX,RDX
LAB_001c3551:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,ECX
ADD AL,0x30
MOV byte ptr [R13 + -0x1],AL
DEC R13
CMP RCX,0x9
MOV RCX,RDX
JA 0x001c3551
LAB_001c3575:
TEST SIL,SIL
JNZ 0x001c3582
MOV byte ptr [R13 + -0x1],0x2d
DEC R13
LAB_001c3582:
MOV R12,RBX
TEST R14,R14
JLE 0x001c35be
ADD R14,RBX
MOV R12,RBX
LAB_001c3590:
MOVSX RSI,byte ptr [R13]
TEST RSI,RSI
JZ 0x001c35be
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x001c35be
MOV EAX,EAX
ADD R12,RAX
INC R13
CMP R12,R14
JC 0x001c3590
LAB_001c35be:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001c35e2
SUB R12D,EBX
MOVSXD RAX,R12D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c35e2:
CALL 0x00129250
|
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5)
{
bool bVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
char *pcVar5;
long in_FS_OFFSET;
char local_49 [17];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = -param_5;
if ((long)param_5 >= 0 || param_4 >= 0) {
uVar4 = param_5;
}
local_49[1] = 0;
if (uVar4 == 0) {
pcVar5 = local_49;
local_49[0] = '0';
}
else {
if ((long)uVar4 < 0) {
uVar3 = uVar4 / 10;
pcVar5 = local_49;
local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0';
}
else {
pcVar5 = local_49 + 1;
uVar3 = uVar4;
}
do {
pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0';
pcVar5 = pcVar5 + -1;
bVar1 = 9 < uVar3;
uVar3 = uVar3 / 10;
} while (bVar1);
}
if ((long)param_5 < 0 && param_4 < 0) {
pcVar5[-1] = '-';
pcVar5 = pcVar5 + -1;
}
uVar4 = param_2;
if (0 < param_3) {
do {
if ((long)*pcVar5 == 0) break;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,(long)*pcVar5,uVar4,param_3 + param_2);
if ((int)uVar2 < 1) break;
uVar4 = uVar4 + uVar2;
pcVar5 = pcVar5 + 1;
} while (uVar4 < param_3 + param_2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return (long)((int)uVar4 - (int)param_2);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
19,512
|
r3d_billboard_mode_front
|
r3d/src/details/r3d_billboard.c
|
void r3d_billboard_mode_front(Matrix* model, const Matrix* invView)
{
// Extract original scales
float scaleX = Vector3Length((Vector3) { model->m0, model->m1, model->m2 });
float scaleY = Vector3Length((Vector3) { model->m4, model->m5, model->m6 });
float scaleZ = Vector3Length((Vector3) { model->m8, model->m9, model->m10 });
// Copy the view basis vectors, applying original scales
model->m0 = invView->m0 * scaleX;
model->m1 = invView->m1 * scaleX;
model->m2 = invView->m2 * scaleX;
model->m4 = invView->m4 * scaleY;
model->m5 = invView->m5 * scaleY;
model->m6 = invView->m6 * scaleY;
model->m8 = invView->m8 * scaleZ;
model->m9 = invView->m9 * scaleZ;
model->m10 = invView->m10 * scaleZ;
}
|
O3
|
c
|
r3d_billboard_mode_front:
pushq %rbp
movq %rsp, %rbp
movss 0x10(%rdi), %xmm0
movss 0x20(%rdi), %xmm1
mulss %xmm0, %xmm0
movss (%rdi), %xmm2
movss 0x4(%rdi), %xmm3
mulss %xmm2, %xmm2
addss %xmm0, %xmm2
mulss %xmm1, %xmm1
addss %xmm2, %xmm1
xorps %xmm0, %xmm0
sqrtss %xmm1, %xmm0
movss 0x14(%rdi), %xmm1
movss 0x24(%rdi), %xmm2
mulss %xmm1, %xmm1
mulss %xmm3, %xmm3
addss %xmm1, %xmm3
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
xorps %xmm1, %xmm1
sqrtss %xmm2, %xmm1
movss 0x8(%rdi), %xmm2
movss 0x18(%rdi), %xmm3
movss 0x28(%rdi), %xmm4
mulss %xmm3, %xmm3
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
mulss %xmm4, %xmm4
addss %xmm2, %xmm4
movss (%rsi), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, (%rdi)
movss 0x10(%rsi), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, 0x10(%rdi)
mulss 0x20(%rsi), %xmm0
xorps %xmm2, %xmm2
sqrtss %xmm4, %xmm2
movss %xmm0, 0x20(%rdi)
movss 0x4(%rsi), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rdi)
movss 0x14(%rsi), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x14(%rdi)
mulss 0x24(%rsi), %xmm1
movss %xmm1, 0x24(%rdi)
movss 0x8(%rsi), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, 0x8(%rdi)
movss 0x18(%rsi), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, 0x18(%rdi)
mulss 0x28(%rsi), %xmm2
movss %xmm2, 0x28(%rdi)
popq %rbp
retq
|
r3d_billboard_mode_front:
push rbp
mov rbp, rsp
movss xmm0, dword ptr [rdi+10h]
movss xmm1, dword ptr [rdi+20h]
mulss xmm0, xmm0
movss xmm2, dword ptr [rdi]
movss xmm3, dword ptr [rdi+4]
mulss xmm2, xmm2
addss xmm2, xmm0
mulss xmm1, xmm1
addss xmm1, xmm2
xorps xmm0, xmm0
sqrtss xmm0, xmm1
movss xmm1, dword ptr [rdi+14h]
movss xmm2, dword ptr [rdi+24h]
mulss xmm1, xmm1
mulss xmm3, xmm3
addss xmm3, xmm1
mulss xmm2, xmm2
addss xmm2, xmm3
xorps xmm1, xmm1
sqrtss xmm1, xmm2
movss xmm2, dword ptr [rdi+8]
movss xmm3, dword ptr [rdi+18h]
movss xmm4, dword ptr [rdi+28h]
mulss xmm3, xmm3
mulss xmm2, xmm2
addss xmm2, xmm3
mulss xmm4, xmm4
addss xmm4, xmm2
movss xmm2, dword ptr [rsi]
mulss xmm2, xmm0
movss dword ptr [rdi], xmm2
movss xmm2, dword ptr [rsi+10h]
mulss xmm2, xmm0
movss dword ptr [rdi+10h], xmm2
mulss xmm0, dword ptr [rsi+20h]
xorps xmm2, xmm2
sqrtss xmm2, xmm4
movss dword ptr [rdi+20h], xmm0
movss xmm0, dword ptr [rsi+4]
mulss xmm0, xmm1
movss dword ptr [rdi+4], xmm0
movss xmm0, dword ptr [rsi+14h]
mulss xmm0, xmm1
movss dword ptr [rdi+14h], xmm0
mulss xmm1, dword ptr [rsi+24h]
movss dword ptr [rdi+24h], xmm1
movss xmm0, dword ptr [rsi+8]
mulss xmm0, xmm2
movss dword ptr [rdi+8], xmm0
movss xmm0, dword ptr [rsi+18h]
mulss xmm0, xmm2
movss dword ptr [rdi+18h], xmm0
mulss xmm2, dword ptr [rsi+28h]
movss dword ptr [rdi+28h], xmm2
pop rbp
retn
|
void r3d_billboard_mode_front(float *a1, float *a2)
{
float v2; // xmm0_4
float v3; // xmm1_4
float v4; // xmm4_4
float v5; // xmm2_4
v2 = fsqrt((float)(a1[8] * a1[8]) + (float)((float)(*a1 * *a1) + (float)(a1[4] * a1[4])));
v3 = fsqrt((float)(a1[9] * a1[9]) + (float)((float)(a1[1] * a1[1]) + (float)(a1[5] * a1[5])));
v4 = (float)(a1[10] * a1[10]) + (float)((float)(a1[2] * a1[2]) + (float)(a1[6] * a1[6]));
*a1 = *a2 * v2;
a1[4] = a2[4] * v2;
v5 = fsqrt(v4);
a1[8] = v2 * a2[8];
a1[1] = a2[1] * v3;
a1[5] = a2[5] * v3;
a1[9] = v3 * a2[9];
a1[2] = a2[2] * v5;
a1[6] = a2[6] * v5;
a1[10] = v5 * a2[10];
}
|
r3d_billboard_mode_front:
PUSH RBP
MOV RBP,RSP
MOVSS XMM0,dword ptr [RDI + 0x10]
MOVSS XMM1,dword ptr [RDI + 0x20]
MULSS XMM0,XMM0
MOVSS XMM2,dword ptr [RDI]
MOVSS XMM3,dword ptr [RDI + 0x4]
MULSS XMM2,XMM2
ADDSS XMM2,XMM0
MULSS XMM1,XMM1
ADDSS XMM1,XMM2
XORPS XMM0,XMM0
SQRTSS XMM0,XMM1
MOVSS XMM1,dword ptr [RDI + 0x14]
MOVSS XMM2,dword ptr [RDI + 0x24]
MULSS XMM1,XMM1
MULSS XMM3,XMM3
ADDSS XMM3,XMM1
MULSS XMM2,XMM2
ADDSS XMM2,XMM3
XORPS XMM1,XMM1
SQRTSS XMM1,XMM2
MOVSS XMM2,dword ptr [RDI + 0x8]
MOVSS XMM3,dword ptr [RDI + 0x18]
MOVSS XMM4,dword ptr [RDI + 0x28]
MULSS XMM3,XMM3
MULSS XMM2,XMM2
ADDSS XMM2,XMM3
MULSS XMM4,XMM4
ADDSS XMM4,XMM2
MOVSS XMM2,dword ptr [RSI]
MULSS XMM2,XMM0
MOVSS dword ptr [RDI],XMM2
MOVSS XMM2,dword ptr [RSI + 0x10]
MULSS XMM2,XMM0
MOVSS dword ptr [RDI + 0x10],XMM2
MULSS XMM0,dword ptr [RSI + 0x20]
XORPS XMM2,XMM2
SQRTSS XMM2,XMM4
MOVSS dword ptr [RDI + 0x20],XMM0
MOVSS XMM0,dword ptr [RSI + 0x4]
MULSS XMM0,XMM1
MOVSS dword ptr [RDI + 0x4],XMM0
MOVSS XMM0,dword ptr [RSI + 0x14]
MULSS XMM0,XMM1
MOVSS dword ptr [RDI + 0x14],XMM0
MULSS XMM1,dword ptr [RSI + 0x24]
MOVSS dword ptr [RDI + 0x24],XMM1
MOVSS XMM0,dword ptr [RSI + 0x8]
MULSS XMM0,XMM2
MOVSS dword ptr [RDI + 0x8],XMM0
MOVSS XMM0,dword ptr [RSI + 0x18]
MULSS XMM0,XMM2
MOVSS dword ptr [RDI + 0x18],XMM0
MULSS XMM2,dword ptr [RSI + 0x28]
MOVSS dword ptr [RDI + 0x28],XMM2
POP RBP
RET
|
void r3d_billboard_mode_front(float *param_1,float *param_2)
{
float fVar1;
float fVar2;
float fVar3;
fVar1 = SQRT(param_1[8] * param_1[8] + *param_1 * *param_1 + param_1[4] * param_1[4]);
fVar2 = SQRT(param_1[9] * param_1[9] + param_1[1] * param_1[1] + param_1[5] * param_1[5]);
*param_1 = *param_2 * fVar1;
param_1[4] = param_2[4] * fVar1;
fVar3 = SQRT(param_1[10] * param_1[10] + param_1[2] * param_1[2] + param_1[6] * param_1[6]);
param_1[8] = fVar1 * param_2[8];
param_1[1] = param_2[1] * fVar2;
param_1[5] = param_2[5] * fVar2;
param_1[9] = fVar2 * param_2[9];
param_1[2] = param_2[2] * fVar3;
param_1[6] = param_2[6] * fVar3;
param_1[10] = fVar3 * param_2[10];
return;
}
|
|
19,513
|
ma_checksum
|
eloqsql/storage/maria/ma_checksum.c
|
ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record)
{
ha_checksum crc=0;
uint i,end;
MARIA_COLUMNDEF *base_column= info->s->columndef;
uint16 *column_nr= info->s->column_nr;
if (info->s->base.null_bytes)
crc= my_checksum(crc, record, info->s->base.null_bytes);
for (i= 0, end= info->s->base.fields ; i < end ; i++)
{
MARIA_COLUMNDEF *column= base_column + column_nr[i];
const uchar *pos;
ulong length;
if (record[column->null_pos] & column->null_bit)
continue; /* Null field */
pos= record + column->offset;
switch (column->type) {
case FIELD_BLOB:
{
uint blob_size_length= column->length- portable_sizeof_char_ptr;
length= _ma_calc_blob_length(blob_size_length, pos);
if (length)
{
memcpy((char**) &pos, pos + blob_size_length, sizeof(char*));
crc= my_checksum(crc, pos, length);
}
continue;
}
case FIELD_VARCHAR:
{
uint pack_length= column->fill_length;
if (pack_length == 1)
length= (ulong) *pos;
else
length= uint2korr(pos);
pos+= pack_length; /* Skip length information */
break;
}
default:
length= column->length;
break;
}
crc= my_checksum(crc, pos, length);
}
return crc;
}
|
O0
|
c
|
ma_checksum:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x588(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x5a8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x3fc(%rax)
je 0x8b6f9
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x3fc(%rax), %eax
movl %eax, %edx
callq 0x101bb0
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x3c8(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x8b83d
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x8b75d
jmp 0x8b82f
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
subl $0x4, %eax
je 0x8b78c
jmp 0x8b77f
movl -0x54(%rbp), %eax
subl $0x8, %eax
je 0x8b7d5
jmp 0x8b810
movq -0x38(%rbp), %rax
movzwl 0x8(%rax), %eax
subl $0x8, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0x3eef0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x8b7d3
movq -0x40(%rbp), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x101bb0
movl %eax, -0x14(%rbp)
jmp 0x8b82f
movq -0x38(%rbp), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0x50(%rbp)
cmpl $0x1, -0x50(%rbp)
jne 0x8b7f3
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x48(%rbp)
jmp 0x8b7fe
movq -0x40(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x48(%rbp)
movl -0x50(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x8b81c
movq -0x38(%rbp), %rax
movzwl 0x8(%rax), %eax
movq %rax, -0x48(%rbp)
movl -0x14(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x101bb0
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b710
movl -0x14(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_checksum:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+588h]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+5A8h]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax]
cmp dword ptr [rax+3FCh], 0
jz short loc_8B6F9
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+3FCh]
mov edx, eax
call my_checksum
mov [rbp+var_14], eax
loc_8B6F9:
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+3C8h]
mov [rbp+var_1C], eax
loc_8B710:
mov eax, [rbp+var_18]
cmp eax, [rbp+var_1C]
jnb loc_8B83D
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov edx, [rbp+var_18]
movzx ecx, word ptr [rcx+rdx*2]
movsxd rcx, ecx
imul rcx, 38h ; '8'
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
movzx ecx, word ptr [rcx+0Eh]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+12h]
and eax, ecx
cmp eax, 0
jz short loc_8B75D
jmp loc_8B82F
loc_8B75D:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
mov ecx, [rcx+4]
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_54], eax
sub eax, 4
jz short loc_8B78C
jmp short $+2
loc_8B77F:
mov eax, [rbp+var_54]
sub eax, 8
jz short loc_8B7D5
jmp loc_8B810
loc_8B78C:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+8]
sub eax, 8
mov [rbp+var_4C], eax
mov edi, [rbp+var_4C]
mov rsi, [rbp+var_40]
call _ma_calc_blob_length
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_8B7D3
mov rax, [rbp+var_40]
mov ecx, [rbp+var_4C]
mov rax, [rax+rcx]
mov [rbp+var_40], rax
mov edi, [rbp+var_14]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_checksum
mov [rbp+var_14], eax
loc_8B7D3:
jmp short loc_8B82F
loc_8B7D5:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+0Ch]
mov [rbp+var_50], eax
cmp [rbp+var_50], 1
jnz short loc_8B7F3
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov [rbp+var_48], rax
jmp short loc_8B7FE
loc_8B7F3:
mov rax, [rbp+var_40]
movzx eax, word ptr [rax]
mov [rbp+var_48], rax
loc_8B7FE:
mov ecx, [rbp+var_50]
mov rax, [rbp+var_40]
mov ecx, ecx
add rax, rcx
mov [rbp+var_40], rax
jmp short loc_8B81C
loc_8B810:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+8]
mov [rbp+var_48], rax
loc_8B81C:
mov edi, [rbp+var_14]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_checksum
mov [rbp+var_14], eax
loc_8B82F:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
jmp loc_8B710
loc_8B83D:
mov eax, [rbp+var_14]
add rsp, 60h
pop rbp
retn
|
long long ma_checksum(long long a1, long long a2)
{
unsigned int v3; // [rsp+14h] [rbp-4Ch]
long long v4; // [rsp+18h] [rbp-48h]
long long v5; // [rsp+18h] [rbp-48h]
unsigned __int8 *v6; // [rsp+20h] [rbp-40h]
long long v7; // [rsp+28h] [rbp-38h]
long long v8; // [rsp+30h] [rbp-30h]
long long v9; // [rsp+38h] [rbp-28h]
unsigned int v10; // [rsp+44h] [rbp-1Ch]
unsigned int v11; // [rsp+48h] [rbp-18h]
unsigned int v12; // [rsp+4Ch] [rbp-14h]
v12 = 0;
v9 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL);
v8 = *(_QWORD *)(*(_QWORD *)a1 + 1448LL);
if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) )
v12 = my_checksum(0LL, a2, *(unsigned int *)(*(_QWORD *)a1 + 1020LL));
v11 = 0;
v10 = *(_DWORD *)(*(_QWORD *)a1 + 968LL);
while ( v11 < v10 )
{
v7 = 56LL * *(unsigned __int16 *)(v8 + 2LL * v11) + v9;
if ( (*(_BYTE *)(v7 + 18) & *(_BYTE *)(a2 + *(unsigned __int16 *)(v7 + 14))) == 0 )
{
v6 = (unsigned __int8 *)(*(unsigned int *)(v7 + 4) + a2);
if ( *(_DWORD *)v7 == 4 )
{
v3 = *(unsigned __int16 *)(v7 + 8) - 8;
v4 = ma_calc_blob_length(v3, v6);
if ( v4 )
v12 = my_checksum(v12, *(_QWORD *)&v6[v3], v4);
}
else
{
if ( *(_DWORD *)v7 == 8 )
{
if ( *(_WORD *)(v7 + 12) == 1 )
v5 = *v6;
else
v5 = *(unsigned __int16 *)v6;
v6 += *(unsigned __int16 *)(v7 + 12);
}
else
{
v5 = *(unsigned __int16 *)(v7 + 8);
}
v12 = my_checksum(v12, v6, v5);
}
}
++v11;
}
return v12;
}
|
_ma_checksum:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x588]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5a8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x3fc],0x0
JZ 0x0018b6f9
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x3fc]
MOV EDX,EAX
CALL 0x00201bb0
MOV dword ptr [RBP + -0x14],EAX
LAB_0018b6f9:
MOV dword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x3c8]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0018b710:
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x1c]
JNC 0x0018b83d
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RCX + RDX*0x2]
MOVSXD RCX,ECX
IMUL RCX,RCX,0x38
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RCX + 0xe]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + 0x12]
AND EAX,ECX
CMP EAX,0x0
JZ 0x0018b75d
JMP 0x0018b82f
LAB_0018b75d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX + 0x4]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
SUB EAX,0x4
JZ 0x0018b78c
JMP 0x0018b77f
LAB_0018b77f:
MOV EAX,dword ptr [RBP + -0x54]
SUB EAX,0x8
JZ 0x0018b7d5
JMP 0x0018b810
LAB_0018b78c:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x8]
SUB EAX,0x8
MOV dword ptr [RBP + -0x4c],EAX
MOV EDI,dword ptr [RBP + -0x4c]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x0013eef0
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0018b7d3
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x40],RAX
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00201bb0
MOV dword ptr [RBP + -0x14],EAX
LAB_0018b7d3:
JMP 0x0018b82f
LAB_0018b7d5:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x50],EAX
CMP dword ptr [RBP + -0x50],0x1
JNZ 0x0018b7f3
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0018b7fe
LAB_0018b7f3:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_0018b7fe:
MOV ECX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0018b81c
LAB_0018b810:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_0018b81c:
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00201bb0
MOV dword ptr [RBP + -0x14],EAX
LAB_0018b82f:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0018b710
LAB_0018b83d:
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x60
POP RBP
RET
|
int4 _ma_checksum(long *param_1,long param_2)
{
uint uVar1;
long lVar2;
long lVar3;
ushort uVar4;
int *piVar5;
long lVar6;
ushort *local_48;
uint local_20;
int4 local_1c;
local_1c = 0;
lVar2 = *(long *)(*param_1 + 0x588);
lVar3 = *(long *)(*param_1 + 0x5a8);
if (*(int *)(*param_1 + 0x3fc) != 0) {
local_1c = my_checksum(0,param_2,*(int4 *)(*param_1 + 0x3fc));
}
local_20 = 0;
uVar1 = *(uint *)(*param_1 + 0x3c8);
for (; local_20 < uVar1; local_20 = local_20 + 1) {
piVar5 = (int *)(lVar2 + (long)(int)(uint)*(ushort *)(lVar3 + (ulong)local_20 * 2) * 0x38);
if ((*(byte *)(param_2 + (ulong)*(ushort *)((long)piVar5 + 0xe)) &
*(byte *)((long)piVar5 + 0x12)) == 0) {
local_48 = (ushort *)(param_2 + (ulong)(uint)piVar5[1]);
if (*piVar5 == 4) {
uVar4 = *(ushort *)(piVar5 + 2);
lVar6 = _ma_calc_blob_length(uVar4 - 8,local_48);
if (lVar6 != 0) {
local_1c = my_checksum(local_1c,*(int8 *)((long)local_48 + (ulong)(uVar4 - 8)),lVar6
);
}
}
else {
if (*piVar5 == 8) {
if (*(ushort *)(piVar5 + 3) == 1) {
uVar4 = (ushort)(byte)*local_48;
}
else {
uVar4 = *local_48;
}
local_48 = (ushort *)((long)local_48 + (ulong)(uint)*(ushort *)(piVar5 + 3));
}
else {
uVar4 = *(ushort *)(piVar5 + 2);
}
local_1c = my_checksum(local_1c,local_48,uVar4);
}
}
}
return local_1c;
}
|
|
19,514
|
HKDF_Expand
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/keygen.c
|
static void HKDF_Expand(unsigned char *OKM, size_t L,
const unsigned char PRK[32],
const void *info, size_t info_len,
#ifndef __BLST_HKDF_TESTMODE__
int info_fixup,
#endif
HMAC_SHA256_CTX *ctx)
{
#if !defined(__STDC_VERSION__) || __STDC_VERSION__<199901 \
|| defined(__STDC_NO_VLA__)
unsigned char *info_prime = alloca(info_len + 2 + 1);
#else
unsigned char info_prime[info_len + 2 + 1];
#endif
HMAC_init(ctx, PRK, 32);
if (info_len != 0)
sha256_bcopy(info_prime, info, info_len);
#ifndef __BLST_HKDF_TESTMODE__
if (info_fixup) {
/* Section 2.3 KeyGen in BLS-signature draft */
info_prime[info_len + 0] = (unsigned char)(L >> 8);
info_prime[info_len + 1] = (unsigned char)(L);
info_len += 2;
}
#endif
info_prime[info_len] = 1; /* counter */
HMAC_update(ctx, info_prime, info_len + 1);
HMAC_final(ctx->tail.c, ctx);
while (L > 32) {
sha256_hcopy((unsigned int *)OKM, (const unsigned int *)ctx->tail.c);
OKM += 32; L -= 32;
++info_prime[info_len]; /* counter */
HMAC_init(ctx, NULL, 0);
HMAC_update(ctx, ctx->tail.c, 32);
HMAC_update(ctx, info_prime, info_len + 1);
HMAC_final(ctx->tail.c, ctx);
}
sha256_bcopy(OKM, ctx->tail.c, L);
}
|
O1
|
c
|
HKDF_Expand:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, -0x38(%rbp)
movq %r8, %r15
movq %rcx, -0x30(%rbp)
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rbp), %r12
movq %rsp, %r13
leaq 0x12(%r8), %rcx
andq $-0x10, %rcx
subq %rcx, %r13
movq %r13, %rsp
movl $0x20, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x68aba
testq %r15, %r15
je 0x689b3
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
callq 0x6f5f0
cmpl $0x0, -0x38(%rbp)
je 0x689c9
movl %ebx, %eax
rolw $0x8, %ax
movw %ax, (%r13,%r15)
addq $0x2, %r15
movb $0x1, (%r13,%r15)
movq %r15, -0x38(%rbp)
leaq 0x1(%r15), %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %rdx, -0x30(%rbp)
callq 0x683aa
leaq 0xb0(%r12), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x68c6c
cmpq $0x21, %rbx
jb 0x68a9d
leaq 0x70(%r12), %rax
movq %rax, -0x48(%rbp)
leaq 0x28(%r12), %rax
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6f610
addq $0x20, %r14
movq -0x38(%rbp), %rax
incb (%r13,%rax)
movq %r12, %rdi
movq -0x48(%rbp), %rsi
callq 0x6f610
movq $0x40, 0x20(%r12)
movl $0x5, %eax
movq $0x0, (%r12,%rax,8)
incq %rax
cmpq $0xd, %rax
jne 0x68a47
addq $-0x20, %rbx
movq -0x40(%rbp), %rax
movq $0x0, 0x68(%r12)
movl $0x20, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x683aa
movq %r12, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rdx
callq 0x683aa
movq %r15, %rdi
movq %r12, %rsi
callq 0x68c6c
cmpq $0x20, %rbx
ja 0x68a15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6f5f0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
HKDF_Expand:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov dword ptr [rbp+var_38], r9d
mov r15, r8
mov [rbp+var_30], rcx
mov rax, rdx
mov rbx, rsi
mov r14, rdi
mov r12, [rbp+arg_0]
mov r13, rsp
lea rcx, [r8+12h]
and rcx, 0FFFFFFFFFFFFFFF0h
sub r13, rcx
mov rsp, r13
mov edx, 20h ; ' '
mov rdi, r12
mov rsi, rax
call HMAC_init
test r15, r15
jz short loc_689B3
mov rdi, r13
mov rsi, [rbp+var_30]
mov rdx, r15
call blst_sha256_bcopy
loc_689B3:
cmp dword ptr [rbp+var_38], 0
jz short loc_689C9
mov eax, ebx
rol ax, 8
mov [r13+r15+0], ax
add r15, 2
loc_689C9:
mov byte ptr [r13+r15+0], 1
mov [rbp+var_38], r15
lea rdx, [r15+1]
mov rdi, r12
mov rsi, r13
mov [rbp+var_30], rdx
call sha256_update
lea r15, [r12+0B0h]
mov rdi, r15
mov rsi, r12
call HMAC_final
cmp rbx, 21h ; '!'
jb loc_68A9D
lea rax, [r12+70h]
mov [rbp+var_48], rax
lea rax, [r12+28h]
mov [rbp+var_40], rax
loc_68A15:
mov rdi, r14
mov rsi, r15
call blst_sha256_hcopy
add r14, 20h ; ' '
mov rax, [rbp+var_38]
inc byte ptr [r13+rax+0]
mov rdi, r12
mov rsi, [rbp+var_48]
call blst_sha256_hcopy
mov qword ptr [r12+20h], 40h ; '@'
mov eax, 5
loc_68A47:
mov qword ptr [r12+rax*8], 0
inc rax
cmp rax, 0Dh
jnz short loc_68A47
add rbx, 0FFFFFFFFFFFFFFE0h
mov rax, [rbp+var_40]
mov qword ptr [r12+68h], 0
mov edx, 20h ; ' '
mov rdi, r12
mov rsi, r15
call sha256_update
mov rdi, r12
mov rsi, r13
mov rdx, [rbp+var_30]
call sha256_update
mov rdi, r15
mov rsi, r12
call HMAC_final
cmp rbx, 20h ; ' '
ja loc_68A15
loc_68A9D:
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call blst_sha256_bcopy
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long HKDF_Expand(long long a1, unsigned long long a2, long long a3, long long a4, long long a5, int a6, long long a7)
{
long long v7; // r15
unsigned long long v8; // rbx
char *v10; // r13
long long i; // rax
long long v13; // [rsp+0h] [rbp-50h] BYREF
long long v14; // [rsp+8h] [rbp-48h]
long long v15; // [rsp+10h] [rbp-40h]
long long v16; // [rsp+18h] [rbp-38h]
long long v17; // [rsp+20h] [rbp-30h]
LODWORD(v16) = a6;
v7 = a5;
v17 = a4;
v8 = a2;
v10 = (char *)&v13 - ((a5 + 18) & 0xFFFFFFFFFFFFFFF0LL);
HMAC_init(a7, a3);
if ( v7 )
blst_sha256_bcopy(v10, v17, v7);
if ( (_DWORD)v16 )
{
*(_WORD *)&v10[v7] = __ROL2__(a2, 8);
v7 += 2LL;
}
v10[v7] = 1;
v16 = v7;
v17 = v7 + 1;
sha256_update(a7, v10, v7 + 1);
HMAC_final(a7 + 176, a7);
if ( a2 >= 0x21 )
{
v14 = a7 + 112;
v15 = a7 + 40;
do
{
blst_sha256_hcopy(a1, a7 + 176);
a1 += 32LL;
++v10[v16];
blst_sha256_hcopy(a7, v14);
*(_QWORD *)(a7 + 32) = 64LL;
for ( i = 5LL; i != 13; ++i )
*(_QWORD *)(a7 + 8 * i) = 0LL;
v8 -= 32LL;
*(_QWORD *)(a7 + 104) = 0LL;
sha256_update(a7, a7 + 176, 32LL);
sha256_update(a7, v10, v17);
HMAC_final(a7 + 176, a7);
}
while ( v8 > 0x20 );
}
return blst_sha256_bcopy(a1, a7 + 176, v8);
}
|
HKDF_Expand:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RBP + -0x38],R9D
MOV R15,R8
MOV qword ptr [RBP + -0x30],RCX
MOV RAX,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RBP + 0x10]
MOV R13,RSP
LEA RCX,[R8 + 0x12]
AND RCX,-0x10
SUB R13,RCX
MOV RSP,R13
MOV EDX,0x20
MOV RDI,R12
MOV RSI,RAX
CALL 0x00168aba
TEST R15,R15
JZ 0x001689b3
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R15
CALL 0x0016f5f0
LAB_001689b3:
CMP dword ptr [RBP + -0x38],0x0
JZ 0x001689c9
MOV EAX,EBX
ROL AX,0x8
MOV word ptr [R13 + R15*0x1],AX
ADD R15,0x2
LAB_001689c9:
MOV byte ptr [R13 + R15*0x1],0x1
MOV qword ptr [RBP + -0x38],R15
LEA RDX,[R15 + 0x1]
MOV RDI,R12
MOV RSI,R13
MOV qword ptr [RBP + -0x30],RDX
CALL 0x001683aa
LEA R15,[R12 + 0xb0]
MOV RDI,R15
MOV RSI,R12
CALL 0x00168c6c
CMP RBX,0x21
JC 0x00168a9d
LEA RAX,[R12 + 0x70]
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[R12 + 0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_00168a15:
MOV RDI,R14
MOV RSI,R15
CALL 0x0016f610
ADD R14,0x20
MOV RAX,qword ptr [RBP + -0x38]
INC byte ptr [R13 + RAX*0x1]
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x0016f610
MOV qword ptr [R12 + 0x20],0x40
MOV EAX,0x5
LAB_00168a47:
MOV qword ptr [R12 + RAX*0x8],0x0
INC RAX
CMP RAX,0xd
JNZ 0x00168a47
ADD RBX,-0x20
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [R12 + 0x68],0x0
MOV EDX,0x20
MOV RDI,R12
MOV RSI,R15
CALL 0x001683aa
MOV RDI,R12
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001683aa
MOV RDI,R15
MOV RSI,R12
CALL 0x00168c6c
CMP RBX,0x20
JA 0x00168a15
LAB_00168a9d:
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0016f5f0
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void HKDF_Expand(long param_1,ulong param_2,int8 param_3,int8 param_4,long param_5,
int4 param_6,long param_7)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
int8 uStack_60;
ushort auStack_58 [4];
long local_50;
long local_48;
long local_40;
long local_38;
local_40 = CONCAT44(local_40._4_4_,param_6);
lVar2 = -(param_5 + 0x12U & 0xfffffffffffffff0);
lVar4 = (long)auStack_58 + lVar2;
local_38 = param_4;
*(int8 *)((long)&uStack_60 + lVar2) = 0x16899f;
HMAC_init(param_7,param_3,0x20);
lVar1 = local_38;
if (param_5 != 0) {
*(int8 *)((long)&uStack_60 + lVar2) = 0x1689b3;
blst_sha256_bcopy(lVar4,lVar1,param_5);
}
if ((int)local_40 != 0) {
*(ushort *)(lVar4 + param_5) = (ushort)param_2 << 8 | (ushort)param_2 >> 8;
param_5 = param_5 + 2;
}
*(int1 *)(lVar4 + param_5) = 1;
local_38 = param_5 + 1;
local_40 = param_5;
*(int8 *)((long)&uStack_60 + lVar2) = 0x1689e6;
sha256_update(param_7,lVar4);
lVar1 = param_7 + 0xb0;
*(int8 *)((long)&uStack_60 + lVar2) = 0x1689f9;
HMAC_final(lVar1,param_7);
if (0x20 < param_2) {
local_50 = param_7 + 0x70;
local_48 = param_7 + 0x28;
do {
*(int8 *)((long)&uStack_60 + lVar2) = 0x168a20;
blst_sha256_hcopy(param_1,lVar1);
param_1 = param_1 + 0x20;
*(char *)(lVar4 + local_40) = *(char *)(lVar4 + local_40) + '\x01';
lVar3 = local_50;
*(int8 *)((long)&uStack_60 + lVar2) = 0x168a39;
blst_sha256_hcopy(param_7,lVar3);
*(int8 *)(param_7 + 0x20) = 0x40;
lVar3 = 5;
do {
*(int8 *)(param_7 + lVar3 * 8) = 0;
lVar3 = lVar3 + 1;
} while (lVar3 != 0xd);
param_2 = param_2 - 0x20;
*(int8 *)(param_7 + 0x68) = 0;
*(int8 *)((long)&uStack_60 + lVar2) = 0x168a79;
sha256_update(param_7,lVar1,0x20);
lVar3 = local_38;
*(int8 *)((long)&uStack_60 + lVar2) = 0x168a88;
sha256_update(param_7,lVar4,lVar3);
*(int8 *)((long)&uStack_60 + lVar2) = 0x168a93;
HMAC_final(lVar1,param_7);
} while (0x20 < param_2);
}
*(int8 *)((long)&uStack_60 + lVar2) = 0x168aab;
blst_sha256_bcopy(param_1,lVar1,param_2);
return;
}
|
|
19,515
|
safe_hash_init
|
eloqsql/mysys/my_safehash.c
|
my_bool safe_hash_init(SAFE_HASH *hash, uint elements,
uchar *default_value)
{
DBUG_ENTER("safe_hash_init");
if (my_hash_init(key_memory_SAFE_HASH_ENTRY, &hash->hash, &my_charset_bin,
elements, 0, 0, (my_hash_get_key) safe_hash_entry_get,
(void (*)(void*)) safe_hash_entry_free, 0))
{
hash->default_value= 0;
DBUG_RETURN(1);
}
mysql_rwlock_init(key_SAFEHASH_mutex, &hash->mutex);
hash->default_value= default_value;
hash->root= 0;
DBUG_RETURN(0);
}
|
O0
|
c
|
safe_hash_init:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0xb84bea(%rip), %rax # 0xc832d4
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x98, %rsi
movl -0x14(%rbp), %eax
movl %eax, %r8d
xorl %edx, %edx
leaq 0x1c4a2a(%rip), %rcx # 0x2c3130
xorl %eax, %eax
movl %eax, %r9d
leaq 0x8e(%rip), %r10 # 0xfe7a0
leaq 0xb7(%rip), %rax # 0xfe7d0
movq $0x0, (%rsp)
movq %r10, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
callq 0xdde70
cmpb $0x0, %al
je 0xfe75a
movq -0x10(%rbp), %rax
movq $0x0, 0x108(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xfe78e
leaq 0xb84217(%rip), %rax # 0xc82978
movl (%rax), %edi
movq -0x10(%rbp), %rsi
callq 0xfe7f0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x110(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
safe_hash_init:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
lea rax, key_memory_SAFE_HASH_ENTRY
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 98h
mov eax, [rbp+var_14]
mov r8d, eax
xor edx, edx
lea rcx, my_charset_bin
xor eax, eax
mov r9d, eax
lea r10, safe_hash_entry_get
lea rax, safe_hash_entry_free
mov [rsp+50h+var_50], 0
mov [rsp+50h+var_48], r10
mov [rsp+50h+var_40], 0
mov [rsp+50h+var_38], rax
mov [rsp+50h+var_30], 0
call my_hash_init2
cmp al, 0
jz short loc_FE75A
mov rax, [rbp+var_10]
mov qword ptr [rax+108h], 0
mov [rbp+var_1], 1
jmp short loc_FE78E
loc_FE75A:
lea rax, key_SAFEHASH_mutex
mov edi, [rax]
mov rsi, [rbp+var_10]
call inline_mysql_rwlock_init_2
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+108h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+110h], 0
mov [rbp+var_1], 0
loc_FE78E:
mov al, [rbp+var_1]
add rsp, 50h
pop rbp
retn
|
char safe_hash_init(long long a1, unsigned int a2, long long a3)
{
if ( my_hash_init2(
key_memory_SAFE_HASH_ENTRY,
a1 + 152,
0,
(long long)&my_charset_bin,
a2,
0LL,
0LL,
(long long)safe_hash_entry_get,
0LL,
(long long)safe_hash_entry_free,
0) )
{
*(_QWORD *)(a1 + 264) = 0LL;
return 1;
}
else
{
inline_mysql_rwlock_init_2(key_SAFEHASH_mutex, a1);
*(_QWORD *)(a1 + 264) = a3;
*(_QWORD *)(a1 + 272) = 0LL;
return 0;
}
}
|
safe_hash_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
LEA RAX,[0xd832d4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x98
MOV EAX,dword ptr [RBP + -0x14]
MOV R8D,EAX
XOR EDX,EDX
LEA RCX,[0x3c3130]
XOR EAX,EAX
MOV R9D,EAX
LEA R10,[0x1fe7a0]
LEA RAX,[0x1fe7d0]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x20],0x0
CALL 0x001dde70
CMP AL,0x0
JZ 0x001fe75a
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001fe78e
LAB_001fe75a:
LEA RAX,[0xd82978]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001fe7f0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x110],0x0
MOV byte ptr [RBP + -0x1],0x0
LAB_001fe78e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x50
POP RBP
RET
|
bool safe_hash_init(long param_1,int4 param_2,int8 param_3)
{
char cVar1;
bool local_9;
cVar1 = my_hash_init2(key_memory_SAFE_HASH_ENTRY,param_1 + 0x98,0,my_charset_bin,param_2,0,0,
safe_hash_entry_get,0,safe_hash_entry_free,0);
if (cVar1 == '\0') {
inline_mysql_rwlock_init(key_SAFEHASH_mutex,param_1);
*(int8 *)(param_1 + 0x108) = param_3;
*(int8 *)(param_1 + 0x110) = 0;
}
else {
*(int8 *)(param_1 + 0x108) = 0;
}
local_9 = cVar1 != '\0';
return local_9;
}
|
|
19,516
|
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
ConstIndexArray
PatchTable::GetPatchArrayFVarValues(int array, int channel) const {
PatchArray const & pa = getPatchArray(array);
FVarPatchChannel const & c = getFVarPatchChannel(channel);
int ncvs = c.stride;
int start = pa.patchIndex * ncvs;
int count = pa.numPatches * ncvs;
return ConstIndexArray(&c.patchValues[start], count);
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movl -0x1c(%rbp), %esi
callq 0xc85b0
movq -0x48(%rbp), %rdi
movq %rax, -0x28(%rbp)
movl -0x20(%rbp), %esi
callq 0xc9e50
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl 0xc(%rax), %eax
movl -0x34(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
movl -0x34(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movslq -0x38(%rbp), %rsi
callq 0xd09b0
movq %rax, %rsi
movl -0x3c(%rbp), %edx
leaq -0x10(%rbp), %rdi
callq 0xd3960
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %edx
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable23GetPatchArrayFVarValuesEii:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov rdi, [rbp+var_18]; this
mov [rbp+var_48], rdi
mov esi, [rbp+var_1C]; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable13getPatchArrayEi; OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(int)
mov rdi, [rbp+var_48]; this
mov [rbp+var_28], rax
mov esi, [rbp+var_20]; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable19getFVarPatchChannelEi; OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov eax, [rax+0Ch]
mov [rbp+var_34], eax
mov rax, [rbp+var_28]
mov eax, [rax+0Ch]
mov ecx, [rbp+var_34]
imul eax, ecx
mov [rbp+var_38], eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
mov ecx, [rbp+var_34]
imul eax, ecx
mov [rbp+var_3C], eax
mov rdi, [rbp+var_30]
add rdi, 10h
movsxd rsi, [rbp+var_38]
call __ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rsi, rax
mov edx, [rbp+var_3C]
lea rdi, [rbp+var_10]
call __ZN10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEC2EPKii; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::ConstArray(int const*,int)
mov rax, [rbp+var_10]
mov edx, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(
OpenSubdiv::v3_6_0::Far::PatchTable *this,
int a2,
int a3)
{
long long v3; // rax
unsigned int v5; // [rsp+14h] [rbp-3Ch]
int v6; // [rsp+1Ch] [rbp-34h]
long long FVarPatchChannel; // [rsp+20h] [rbp-30h]
long long PatchArray; // [rsp+28h] [rbp-28h]
long long v10; // [rsp+40h] [rbp-10h] BYREF
PatchArray = OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(this, a2);
FVarPatchChannel = OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(this, a3);
v6 = *(_DWORD *)(FVarPatchChannel + 12);
v5 = v6 * *(_DWORD *)(PatchArray + 4);
v3 = std::vector<int>::operator[](FVarPatchChannel + 16, v6 * *(_DWORD *)(PatchArray + 12));
OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::ConstArray(&v10, v3, v5);
return v10;
}
| |||
19,517
|
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
ConstIndexArray
PatchTable::GetPatchArrayFVarValues(int array, int channel) const {
PatchArray const & pa = getPatchArray(array);
FVarPatchChannel const & c = getFVarPatchChannel(channel);
int ncvs = c.stride;
int start = pa.patchIndex * ncvs;
int count = pa.numPatches * ncvs;
return ConstIndexArray(&c.patchValues[start], count);
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
callq 0x50dd0
movq %rax, %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x515c0
movslq 0xc(%rax), %rsi
movslq 0xc(%r15), %rcx
imulq %rsi, %rcx
movl 0x4(%r15), %edx
imull %esi, %edx
shlq $0x2, %rcx
addq 0x10(%rax), %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
|
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable23GetPatchArrayFVarValuesEii:
push r15
push r14
push rbx
mov ebx, edx
mov r14, rdi
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable13getPatchArrayEi; OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(int)
mov r15, rax
mov rdi, r14; this
mov esi, ebx; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable19getFVarPatchChannelEi; OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int)
movsxd rsi, dword ptr [rax+0Ch]
movsxd rcx, dword ptr [r15+0Ch]
imul rcx, rsi
mov edx, [r15+4]
imul edx, esi
shl rcx, 2
add rcx, [rax+10h]
mov rax, rcx
pop rbx
pop r14
pop r15
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(
OpenSubdiv::v3_6_0::Far::PatchTable *this,
int a2,
int a3)
{
long long PatchArray; // r15
long long FVarPatchChannel; // rax
PatchArray = OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(this, a2);
FVarPatchChannel = OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(this, a3);
return *(_QWORD *)(FVarPatchChannel + 16) + 4 * *(int *)(FVarPatchChannel + 12) * (long long)*(int *)(PatchArray + 12);
}
|
GetPatchArrayFVarValues:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,EDX
MOV R14,RDI
CALL 0x00150dd0
MOV R15,RAX
MOV RDI,R14
MOV ESI,EBX
CALL 0x001515c0
MOVSXD RSI,dword ptr [RAX + 0xc]
MOVSXD RCX,dword ptr [R15 + 0xc]
IMUL RCX,RSI
MOV EDX,dword ptr [R15 + 0x4]
IMUL EDX,ESI
SHL RCX,0x2
ADD RCX,qword ptr [RAX + 0x10]
MOV RAX,RCX
POP RBX
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues
(PatchTable *this,int param_1,int param_2)
{
long lVar1;
long lVar2;
int1 auVar3 [16];
lVar1 = getPatchArray(this,param_1);
lVar2 = getFVarPatchChannel(this,param_2);
auVar3._8_4_ = *(int *)(lVar1 + 4) * *(int *)(lVar2 + 0xc);
auVar3._0_8_ = (long)*(int *)(lVar1 + 0xc) * (long)*(int *)(lVar2 + 0xc) * 4 +
*(long *)(lVar2 + 0x10);
auVar3._12_4_ = 0;
return auVar3;
}
|
|
19,518
|
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
|
ConstIndexArray
PatchTable::GetPatchArrayFVarValues(int array, int channel) const {
PatchArray const & pa = getPatchArray(array);
FVarPatchChannel const & c = getFVarPatchChannel(channel);
int ncvs = c.stride;
int start = pa.patchIndex * ncvs;
int count = pa.numPatches * ncvs;
return ConstIndexArray(&c.patchValues[start], count);
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const:
pushq %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
subq %rcx, %rax
shrq $0x2, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
cmpl %esi, %eax
jle 0x6ba42
testl %edx, %edx
js 0x6ba23
movq 0xb0(%rdi), %r8
movq 0xb8(%rdi), %rax
subq %r8, %rax
shrq $0x6, %rax
cmpl %edx, %eax
jle 0x6ba23
movslq %esi, %rax
leaq (%rax,%rax,4), %rsi
movl %edx, %edi
shlq $0x6, %rdi
movslq 0xc(%r8,%rdi), %r9
movslq 0xc(%rcx,%rsi,4), %rax
imulq %r9, %rax
movl 0x4(%rcx,%rsi,4), %edx
imull %r9d, %edx
shlq $0x2, %rax
addq 0x10(%r8,%rdi), %rax
popq %rcx
retq
leaq 0x50987(%rip), %rdi # 0xbc3b1
leaq 0x504e1(%rip), %rsi # 0xbbf12
leaq 0x50adb(%rip), %rcx # 0xbc513
movl $0xa6, %edx
callq 0x39540
leaq 0x509f4(%rip), %rdi # 0xbc43d
leaq 0x504c2(%rip), %rsi # 0xbbf12
leaq 0x50a0c(%rip), %rcx # 0xbc463
movl $0x90, %edx
callq 0x39540
nop
|
_ZNK10OpenSubdiv6v3_6_03Far10PatchTable23GetPatchArrayFVarValuesEii:
push rax
mov rcx, [rdi+8]
mov rax, [rdi+10h]
sub rax, rcx
shr rax, 2
imul eax, 0CCCCCCCDh
cmp eax, esi
jle short loc_6BA42
test edx, edx
js short loc_6BA23
mov r8, [rdi+0B0h]
mov rax, [rdi+0B8h]
sub rax, r8
shr rax, 6
cmp eax, edx
jle short loc_6BA23
movsxd rax, esi
lea rsi, [rax+rax*4]
mov edi, edx
shl rdi, 6
movsxd r9, dword ptr [r8+rdi+0Ch]
movsxd rax, dword ptr [rcx+rsi*4+0Ch]
imul rax, r9
mov edx, [rcx+rsi*4+4]
imul edx, r9d
shl rax, 2
add rax, [r8+rdi+10h]
pop rcx
retn
loc_6BA23:
lea rdi, aChannel0Channe; "channel>=0 && channel<(int)_fvarChannel"...
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstPatchtabl_0; "const PatchTable::FVarPatchChannel &Ope"...
mov edx, 0A6h
call ___assert_fail
loc_6BA42:
lea rdi, aArrayindexInde; "arrayIndex<(Index)GetNumPatchArrays()"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstPatchtabl; "const PatchTable::PatchArray &OpenSubdi"...
mov edx, 90h
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(
OpenSubdiv::v3_6_0::Far::PatchTable *this,
signed int a2,
int a3)
{
long long v3; // rcx
long long v4; // r8
v3 = *((_QWORD *)this + 1);
if ( (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 2) - v3) >> 2)) <= a2 )
__assert_fail(
"arrayIndex<(Index)GetNumPatchArrays()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp",
144LL,
"const PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index) const");
if ( a3 < 0 || (v4 = *((_QWORD *)this + 22), (int)((unsigned long long)(*((_QWORD *)this + 23) - v4) >> 6) <= a3) )
__assert_fail(
"channel>=0 && channel<(int)_fvarChannels.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp",
166LL,
"const PatchTable::FVarPatchChannel &OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int) const");
return *(_QWORD *)(v4 + ((unsigned long long)(unsigned int)a3 << 6) + 16)
+ 4 * *(int *)(v4 + ((unsigned long long)(unsigned int)a3 << 6) + 12) * (long long)*(int *)(v3 + 20LL * a2 + 12);
}
|
GetPatchArrayFVarValues:
PUSH RAX
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,RCX
SHR RAX,0x2
IMUL EAX,EAX,-0x33333333
CMP EAX,ESI
JLE 0x0016ba42
TEST EDX,EDX
JS 0x0016ba23
MOV R8,qword ptr [RDI + 0xb0]
MOV RAX,qword ptr [RDI + 0xb8]
SUB RAX,R8
SHR RAX,0x6
CMP EAX,EDX
JLE 0x0016ba23
MOVSXD RAX,ESI
LEA RSI,[RAX + RAX*0x4]
MOV EDI,EDX
SHL RDI,0x6
MOVSXD R9,dword ptr [R8 + RDI*0x1 + 0xc]
MOVSXD RAX,dword ptr [RCX + RSI*0x4 + 0xc]
IMUL RAX,R9
MOV EDX,dword ptr [RCX + RSI*0x4 + 0x4]
IMUL EDX,R9D
SHL RAX,0x2
ADD RAX,qword ptr [R8 + RDI*0x1 + 0x10]
POP RCX
RET
LAB_0016ba23:
LEA RDI,[0x1bc3b1]
LEA RSI,[0x1bbf12]
LEA RCX,[0x1bc513]
MOV EDX,0xa6
CALL 0x00139540
LAB_0016ba42:
LEA RDI,[0x1bc43d]
LEA RSI,[0x1bbf12]
LEA RCX,[0x1bc463]
MOV EDX,0x90
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues(int, int) const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Far::PatchTable::GetPatchArrayFVarValues
(PatchTable *this,int param_1,int param_2)
{
int iVar1;
long lVar2;
long lVar3;
int1 auVar4 [16];
lVar2 = *(long *)(this + 8);
if ((int)((ulong)(*(long *)(this + 0x10) - lVar2) >> 2) * -0x33333333 <= param_1) {
/* WARNING: Subroutine does not return */
__assert_fail("arrayIndex<(Index)GetNumPatchArrays()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp"
,0x90,
"const PatchTable::PatchArray &OpenSubdiv::v3_6_0::Far::PatchTable::getPatchArray(Index) const"
);
}
if ((-1 < param_2) &&
(lVar3 = *(long *)(this + 0xb0), param_2 < (int)((ulong)(*(long *)(this + 0xb8) - lVar3) >> 6))
) {
iVar1 = *(int *)(lVar3 + 0xc + (ulong)(uint)param_2 * 0x40);
auVar4._8_4_ = *(int *)(lVar2 + 4 + (long)param_1 * 0x14) * iVar1;
auVar4._0_8_ = (long)*(int *)(lVar2 + 0xc + (long)param_1 * 0x14) * (long)iVar1 * 4 +
*(long *)(lVar3 + 0x10 + (ulong)(uint)param_2 * 0x40);
auVar4._12_4_ = 0;
return auVar4;
}
/* WARNING: Subroutine does not return */
__assert_fail("channel>=0 && channel<(int)_fvarChannels.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp"
,0xa6,
"const PatchTable::FVarPatchChannel &OpenSubdiv::v3_6_0::Far::PatchTable::getFVarPatchChannel(int) const"
);
}
|
|
19,519
|
mjCComposite::MakeShear(mjCModel*)
|
aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_composite.cc
|
void mjCComposite::MakeShear(mjCModel* model) {
char txt[100], txt1[100], txt2[100];
for (int ix=0; ix<count[0]-1; ix++) {
for (int iy=0; iy<count[1]-1; iy++) {
// recover site names
mju::sprintf_arr(txt1, "%sS%d_%d", prefix.c_str(), ix, iy);
mju::sprintf_arr(txt2, "%sS%d_%d", prefix.c_str(), ix+1, iy+1);
// create tendon
mjCTendon* ten = model->AddTendon(def + mjCOMPKIND_SHEAR);
ten->def = model->Defaults(0);
ten->WrapSite(txt1);
ten->WrapSite(txt2);
// name tendon
mju::sprintf_arr(txt, "%sTS%d_%d", prefix.c_str(), ix, iy);
ten->name = txt;
// equality constraint
mjsEquality* eq = mjs_addEquality(&model->spec, &def[mjCOMPKIND_SHEAR].spec);
mjs_setDefault(eq->element, &model->Defaults(0)->spec);
eq->type = mjEQ_TENDON;
mjs_setString(eq->name1, txt);
}
}
}
|
O0
|
cpp
|
mjCComposite::MakeShear(mjCModel*):
subq $0x238, %rsp # imm = 0x238
movq %rdi, 0x230(%rsp)
movq %rsi, 0x228(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0xdc(%rsp)
movq 0x40(%rsp), %rcx
movl 0xdc(%rsp), %eax
movl 0x24(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x32da1f
movl $0x0, 0xd8(%rsp)
movq 0x40(%rsp), %rcx
movl 0xd8(%rsp), %eax
movl 0x28(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x32da07
movq 0x40(%rsp), %rdi
callq 0x4a150
movq %rax, %rdx
movl 0xdc(%rsp), %ecx
movl 0xd8(%rsp), %r8d
leaq 0x1fc911(%rip), %rsi # 0x52a012
movq %rsi, 0x18(%rsp)
xorl %eax, %eax
movl %eax, 0x24(%rsp)
movb %al, 0x23(%rsp)
leaq 0x150(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x328b90
movq 0x40(%rsp), %rdi
callq 0x4a150
movq 0x18(%rsp), %rsi
movq %rax, %rdx
movb 0x23(%rsp), %al
movl 0xdc(%rsp), %ecx
incl %ecx
movl 0xd8(%rsp), %r8d
incl %r8d
leaq 0xe0(%rsp), %rdi
callq 0x328b90
movq 0x40(%rsp), %rsi
movq 0x228(%rsp), %rdi
addq $0xcf98, %rsi # imm = 0xCF98
callq 0x397cf0
movl 0x24(%rsp), %esi
movq %rax, 0xd0(%rsp)
movq 0x228(%rsp), %rdi
callq 0x30b6a0
movq %rax, %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0xb0(%rax)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x4a120
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0xe8b30
jmp 0x32d7d5
leaq 0x1fa832(%rip), %rsi # 0x52800e
leaq 0x88(%rsp), %rdi
callq 0xe76b0
movq 0x28(%rsp), %rdi
movq 0x88(%rsp), %rdx
movq 0x90(%rsp), %rcx
leaq 0xb0(%rsp), %rsi
callq 0x3fa020
jmp 0x32d80d
leaq 0xb0(%rsp), %rdi
callq 0x4a160
leaq 0xaf(%rsp), %rdi
callq 0x4a140
movq 0xd0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4a120
movq 0x10(%rsp), %rdx
leaq 0x68(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xe8b30
jmp 0x32d85c
leaq 0x1fa7ab(%rip), %rsi # 0x52800e
leaq 0x50(%rsp), %rdi
callq 0xe76b0
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
leaq 0x68(%rsp), %rsi
callq 0x3fa020
jmp 0x32d888
leaq 0x68(%rsp), %rdi
callq 0x4a160
leaq 0x67(%rsp), %rdi
callq 0x4a140
movq 0x40(%rsp), %rdi
callq 0x4a150
movq %rax, %rdx
movl 0xdc(%rsp), %ecx
movl 0xd8(%rsp), %r8d
leaq 0x1c0(%rsp), %rdi
leaq 0x1fc93b(%rip), %rsi # 0x52a202
movb $0x0, %al
callq 0x328b90
leaq 0x1c0(%rsp), %rsi
movq 0xd0(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
callq 0x4b770
movq 0x40(%rsp), %rsi
movq 0x228(%rsp), %rdi
addq $0x7a8, %rdi # imm = 0x7A8
addq $0x1f8, %rsi # imm = 0x1F8
addq $0xcda0, %rsi # imm = 0xCDA0
addq $0x48, %rsi
callq 0x4b8a0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x228(%rsp), %rdi
xorl %esi, %esi
callq 0x30b6a0
movq (%rsp), %rdi
movq %rax, %rsi
addq $0x48, %rsi
callq 0x4b810
movq 0x48(%rsp), %rax
movl $0x3, 0x18(%rax)
movq 0x48(%rsp), %rax
movq 0x80(%rax), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x4b7e0
movl 0xd8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd8(%rsp)
jmp 0x32d6c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x32d9b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x4a160
leaq 0xaf(%rsp), %rdi
callq 0x4a140
jmp 0x32da27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x32d9fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x4a160
leaq 0x67(%rsp), %rdi
callq 0x4a140
jmp 0x32da27
jmp 0x32da09
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x32d69f
addq $0x238, %rsp # imm = 0x238
retq
movq 0xa0(%rsp), %rdi
callq 0x4a070
nopw %cs:(%rax,%rax)
|
_ZN12mjCComposite9MakeShearEP8mjCModel:
sub rsp, 238h
mov [rsp+238h+var_8], rdi
mov [rsp+238h+var_10], rsi
mov rax, [rsp+238h+var_8]
mov [rsp+238h+var_1F8], rax
mov [rsp+238h+var_15C], 0
loc_32D69F:
mov rcx, [rsp+238h+var_1F8]
mov eax, [rsp+238h+var_15C]
mov ecx, [rcx+24h]
sub ecx, 1
cmp eax, ecx
jge loc_32DA1F
mov [rsp+238h+var_160], 0
loc_32D6C4:
mov rcx, [rsp+238h+var_1F8]
mov eax, [rsp+238h+var_160]
mov ecx, [rcx+28h]
sub ecx, 1
cmp eax, ecx
jge loc_32DA07
mov rdi, [rsp+238h+var_1F8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdx, rax
mov ecx, [rsp+238h+var_15C]
mov r8d, [rsp+238h+var_160]
lea rsi, aSsDD; "%sS%d_%d"
mov qword ptr [rsp+238h+var_220], rsi; int
xor eax, eax
mov [rsp+238h+var_214], eax
mov [rsp+238h+var_215], al
lea rdi, [rsp+238h+var_E8]
mov [rsp+238h+var_208], rdi
call _ZN6mujoco4utilL11sprintf_arrILm100EEEiRAT__cPKcz; mujoco::util::sprintf_arr<100ul>(char (&)[100ul],char const*,...)
mov rdi, [rsp+238h+var_1F8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rsi, qword ptr [rsp+238h+var_220]
mov rdx, rax
mov al, [rsp+238h+var_215]
mov ecx, [rsp+238h+var_15C]
inc ecx
mov r8d, [rsp+238h+var_160]
inc r8d
lea rdi, [rsp+238h+var_158]
call _ZN6mujoco4utilL11sprintf_arrILm100EEEiRAT__cPKcz; mujoco::util::sprintf_arr<100ul>(char (&)[100ul],char const*,...)
mov rsi, [rsp+238h+var_1F8]
mov rdi, [rsp+238h+var_10]; this
add rsi, 0CF98h; mjCDef *
call _ZN8mjCModel9AddTendonEP6mjCDef; mjCModel::AddTendon(mjCDef *)
mov esi, [rsp+238h+var_214]; int
mov qword ptr [rsp+238h+var_168], rax
mov rdi, [rsp+238h+var_10]; this
call _ZNK8mjCModel8DefaultsEi; mjCModel::Defaults(int)
mov rcx, rax
mov rax, qword ptr [rsp+238h+var_168]
mov [rax+0B0h], rcx
mov rax, qword ptr [rsp+238h+var_168]
mov qword ptr [rsp+238h+var_210], rax
lea rdi, [rsp+238h+var_189]
mov [rsp+238h+var_200], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+238h+var_208]
mov rdx, [rsp+238h+var_200]
lea rdi, [rsp+238h+var_188]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_32D7D5:
lea rsi, byte_52800E
lea rdi, [rsp+238h+var_1B0]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, qword ptr [rsp+238h+var_210]; int
mov rdx, qword ptr [rsp+238h+var_1B0]; int
mov rcx, qword ptr [rsp+238h+var_1A8]; int
lea rsi, [rsp+238h+var_188]; int
call _ZN9mjCTendon8WrapSiteENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS3_E; mjCTendon::WrapSite(std::string,std::string_view)
jmp short $+2
loc_32D80D:
lea rdi, [rsp+238h+var_188]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+238h+var_189]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, qword ptr [rsp+238h+var_168]
mov qword ptr [rsp+238h+var_230], rax; int
lea rdi, [rsp+238h+var_1D1]
mov [rsp+238h+var_228], rdi; void *
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+238h+var_228]
lea rdi, [rsp+238h+var_1D0]
lea rsi, [rsp+238h+var_158]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_32D85C:
lea rsi, byte_52800E
lea rdi, [rsp+238h+var_1E8]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rdi, qword ptr [rsp+238h+var_230]; int
mov rdx, qword ptr [rsp+238h+var_1E8]; int
mov rcx, qword ptr [rsp+238h+var_1E0]; int
lea rsi, [rsp+238h+var_1D0]; int
call _ZN9mjCTendon8WrapSiteENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS3_E; mjCTendon::WrapSite(std::string,std::string_view)
jmp short $+2
loc_32D888:
lea rdi, [rsp+238h+var_1D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+238h+var_1D1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+238h+var_1F8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdx, rax
mov ecx, [rsp+238h+var_15C]
mov r8d, [rsp+238h+var_160]
lea rdi, [rsp+238h+var_78]
lea rsi, aStsDD; "%sTS%d_%d"
mov al, 0
call _ZN6mujoco4utilL11sprintf_arrILm100EEEiRAT__cPKcz; mujoco::util::sprintf_arr<100ul>(char (&)[100ul],char const*,...)
lea rsi, [rsp+238h+var_78]
mov rdi, qword ptr [rsp+238h+var_168]
add rdi, 8
add rdi, 8
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
mov rsi, [rsp+238h+var_1F8]
mov rdi, [rsp+238h+var_10]
add rdi, 7A8h
add rsi, 1F8h
add rsi, 0CDA0h
add rsi, 48h ; 'H'
call _mjs_addEquality
mov [rsp+238h+var_1F0], rax
mov rax, [rsp+238h+var_1F0]
mov rax, [rax]
mov [rsp+238h+var_238], rax
mov rdi, [rsp+238h+var_10]; this
xor esi, esi; int
call _ZNK8mjCModel8DefaultsEi; mjCModel::Defaults(int)
mov rdi, [rsp+238h+var_238]
mov rsi, rax
add rsi, 48h ; 'H'
call _mjs_setDefault
mov rax, [rsp+238h+var_1F0]
mov dword ptr [rax+18h], 3
mov rax, [rsp+238h+var_1F0]
mov rdi, [rax+80h]
lea rsi, [rsp+238h+var_78]
call _mjs_setString
mov eax, [rsp+238h+var_160]
add eax, 1
mov [rsp+238h+var_160], eax
jmp loc_32D6C4
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
jmp short loc_32D9B8
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, [rsp+arg_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_32D9B8:
lea rdi, [rsp+arg_A7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_32DA27
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
jmp short loc_32D9FB
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, [rsp+arg_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_32D9FB:
lea rdi, [rsp+arg_5F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_32DA27
loc_32DA07:
jmp short $+2
loc_32DA09:
mov eax, [rsp+238h+var_15C]
add eax, 1
mov [rsp+238h+var_15C], eax
jmp loc_32D69F
loc_32DA1F:
add rsp, 238h
retn
loc_32DA27:
mov rdi, [rsp+arg_98]
call __Unwind_Resume
|
long long mjCComposite::MakeShear(
mjCDef **this,
mjCModel *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long result; // rax
long long v11; // rax
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
long long v15; // rax
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // rax
int v20; // r8d
int v21; // r9d
int v22; // r8d
int v23; // r9d
long long v24; // rax
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
long long v28; // rax
long long v29; // [rsp+0h] [rbp-238h]
char v30; // [rsp+0h] [rbp-238h]
int v31; // [rsp+0h] [rbp-238h]
int v32; // [rsp+0h] [rbp-238h]
char v33; // [rsp+0h] [rbp-238h]
int v34; // [rsp+8h] [rbp-230h]
int v35; // [rsp+8h] [rbp-230h]
void *v36; // [rsp+10h] [rbp-228h]
int v37; // [rsp+18h] [rbp-220h]
unsigned int v38; // [rsp+20h] [rbp-218h]
long long v39; // [rsp+20h] [rbp-218h]
int v40; // [rsp+28h] [rbp-210h]
long long v41; // [rsp+48h] [rbp-1F0h]
int v42[2]; // [rsp+50h] [rbp-1E8h] BYREF
int v43[3]; // [rsp+58h] [rbp-1E0h]
char v44; // [rsp+67h] [rbp-1D1h] BYREF
int v45[8]; // [rsp+68h] [rbp-1D0h] BYREF
int v46[2]; // [rsp+88h] [rbp-1B0h] BYREF
int v47[7]; // [rsp+90h] [rbp-1A8h]
char v48; // [rsp+AFh] [rbp-189h] BYREF
int v49[8]; // [rsp+B0h] [rbp-188h] BYREF
int v50[2]; // [rsp+D0h] [rbp-168h]
unsigned int j; // [rsp+D8h] [rbp-160h]
unsigned int i; // [rsp+DCh] [rbp-15Ch]
_BYTE v53[112]; // [rsp+E0h] [rbp-158h] BYREF
_BYTE v54[112]; // [rsp+150h] [rbp-E8h] BYREF
_BYTE v55[104]; // [rsp+1C0h] [rbp-78h] BYREF
mjCModel *v56; // [rsp+228h] [rbp-10h]
mjCComposite *v57; // [rsp+230h] [rbp-8h]
v57 = (mjCComposite *)this;
v56 = a2;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= *((_DWORD *)this + 9) - 1 )
break;
for ( j = 0; (int)j < *((_DWORD *)this + 10) - 1; ++j )
{
v11 = std::string::c_str(this);
HIBYTE(v38) = 0;
mujoco::util::sprintf_arr<100ul>(
(long long)v54,
(long long)"%sS%d_%d",
v11,
i,
j,
v12,
a3,
a4,
a5,
a6,
v13,
v14,
a9,
a10,
v29);
v15 = std::string::c_str(this);
mujoco::util::sprintf_arr<100ul>(
(long long)v53,
(long long)"%sS%d_%d",
v15,
i + 1,
j + 1,
v16,
a3,
a4,
a5,
a6,
v17,
v18,
a9,
a10,
v30);
*(_QWORD *)v50 = mjCModel::AddTendon(v56, (mjCDef *)(this + 6643));
v19 = mjCModel::Defaults(v56, 0);
*(_QWORD *)(*(_QWORD *)v50 + 176LL) = v19;
v40 = v50[0];
std::allocator<char>::allocator(*(double *)a3.m128_u64);
std::string::basic_string<std::allocator<char>>((long long)v49, (long long)v54, (long long)&v48);
std::string_view::basic_string_view((long long *)v46, (long long)&byte_52800E);
mjCTendon::WrapSite(v40, (int)v49, v46[0], v47[0], v20, v21, v31, v34, v36, (int)"%sS%d_%d", v38);
std::string::~string(v49);
std::allocator<char>::~allocator(&v48);
v35 = v50[0];
std::allocator<char>::allocator(*(double *)a3.m128_u64);
std::string::basic_string<std::allocator<char>>((long long)v45, (long long)v53, (long long)&v44);
std::string_view::basic_string_view((long long *)v42, (long long)&byte_52800E);
mjCTendon::WrapSite(v35, (int)v45, v42[0], v43[0], v22, v23, v32, v35, &v44, v37, v39);
std::string::~string(v45);
std::allocator<char>::~allocator(&v44);
v24 = std::string::c_str(this);
mujoco::util::sprintf_arr<100ul>(
(long long)v55,
(long long)"%sTS%d_%d",
v24,
i,
j,
v25,
a3,
a4,
a5,
a6,
v26,
v27,
a9,
a10,
v33);
std::string::operator=(*(_QWORD *)v50 + 16LL, v55);
v41 = mjs_addEquality((mjCModel **)v56 + 245, this + 6652);
v29 = *(_QWORD *)v41;
v28 = mjCModel::Defaults(v56, 0);
mjs_setDefault(v29, (_QWORD *)(v28 + 72));
*(_DWORD *)(v41 + 24) = 3;
mjs_setString(*(_QWORD *)(v41 + 128), (long long)v55);
}
}
return result;
}
| |||
19,520
|
mjCComposite::MakeShear(mjCModel*)
|
aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_composite.cc
|
void mjCComposite::MakeShear(mjCModel* model) {
char txt[100], txt1[100], txt2[100];
for (int ix=0; ix<count[0]-1; ix++) {
for (int iy=0; iy<count[1]-1; iy++) {
// recover site names
mju::sprintf_arr(txt1, "%sS%d_%d", prefix.c_str(), ix, iy);
mju::sprintf_arr(txt2, "%sS%d_%d", prefix.c_str(), ix+1, iy+1);
// create tendon
mjCTendon* ten = model->AddTendon(def + mjCOMPKIND_SHEAR);
ten->def = model->Defaults(0);
ten->WrapSite(txt1);
ten->WrapSite(txt2);
// name tendon
mju::sprintf_arr(txt, "%sTS%d_%d", prefix.c_str(), ix, iy);
ten->name = txt;
// equality constraint
mjsEquality* eq = mjs_addEquality(&model->spec, &def[mjCOMPKIND_SHEAR].spec);
mjs_setDefault(eq->element, &model->Defaults(0)->spec);
eq->type = mjEQ_TENDON;
mjs_setString(eq->name1, txt);
}
}
}
|
O3
|
cpp
|
mjCComposite::MakeShear(mjCModel*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movl 0x24(%rdi), %eax
cmpl $0x2, %eax
jl 0xc445d
movq %rsi, %rbp
movq %rdi, %r14
leaq 0xcf98(%rdi), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x50(%rsp), %rbx
leaq 0x7a8(%rsi), %rcx
movq %rcx, 0x28(%rsp)
leaq 0xcfe0(%rdi), %rcx
movq %rcx, 0x20(%rsp)
movl 0x28(%rdi), %edi
xorl %ecx, %ecx
movq %rsi, 0x18(%rsp)
movq %r14, 0x10(%rsp)
leal 0x1(%rcx), %esi
cmpl $0x2, %edi
jl 0xc4450
movl %esi, 0xc(%rsp)
xorl %r15d, %r15d
movq %rcx, 0x38(%rsp)
movq (%r14), %rdx
leaq 0xf0(%rsp), %r13
movq %r13, %rdi
leaq 0x10b470(%rip), %r12 # 0x1cf6fe
movq %r12, %rsi
movl %r15d, %r8d
xorl %eax, %eax
callq 0xc055e
movq (%r14), %rdx
incl %r15d
leaq 0x80(%rsp), %rdi
movq %r12, %rsi
movl 0xc(%rsp), %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0xc055e
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
callq 0xf983c
movq %rbp, %rcx
movq %rax, %rbp
movq 0xc88(%rcx), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rbp)
movq %rbx, 0x40(%rsp)
movq %r13, %rdi
callq 0x2de60
leaq (%rsp,%rax), %rdx
addq $0xf0, %rdx
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq 0x1093ea(%rip), %r13 # 0x1cd6f2
callq 0x2dec0
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x11eaaa
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc4334
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2ded0
leaq 0x70(%rsp), %rbx
movq %rbx, 0x60(%rsp)
leaq 0x80(%rsp), %r12
movq %r12, %rdi
callq 0x2de60
leaq (%rsp,%rax), %rdx
addq $0x80, %rdx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x2dec0
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x11eaaa
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc4390
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2ded0
movq 0x10(%rsp), %rbx
movq (%rbx), %rdx
leal -0x1(%r15), %r8d
leaq 0x160(%rsp), %r14
movq %r14, %rdi
leaq 0x10b540(%rip), %rsi # 0x1cf8ee
movq 0x38(%rsp), %r13
movl %r13d, %ecx
xorl %eax, %eax
callq 0xc055e
movq %rbp, %r12
addq $0x10, %r12
movq 0x18(%rbp), %rbp
movq %r14, %rdi
callq 0x2de60
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2e8e0
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x2ea20
movq %rax, %r12
movq (%rax), %rdi
movq 0x18(%rsp), %rbp
movq %rbx, %r14
movq 0xc88(%rbp), %rax
movq (%rax), %rsi
addq $0x48, %rsi
callq 0x2e980
movl $0x3, 0x18(%r12)
movq 0x80(%r12), %rdi
leaq 0x160(%rsp), %rsi
callq 0x2e950
movq %r13, %rcx
movl 0x28(%rbx), %edi
leal -0x1(%rdi), %eax
cmpl %eax, %r15d
leaq 0x50(%rsp), %rbx
jl 0xc4279
movl 0x24(%r14), %eax
movl 0xc(%rsp), %esi
leal -0x1(%rax), %edx
movl %esi, %ecx
cmpl %edx, %esi
jl 0xc4261
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x60(%rsp), %rdi
movq %rbx, %rcx
jmp 0xc4487
movq %rbx, %rcx
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc4497
movq (%rcx), %rsi
incq %rsi
callq 0x2ded0
movq %r14, %rdi
callq 0x2dee0
nop
|
_ZN12mjCComposite9MakeShearEP8mjCModel:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1C8h
mov eax, [rdi+24h]
cmp eax, 2
jl loc_C445D
mov rbp, rsi
mov r14, rdi
lea rcx, [rdi+0CF98h]
mov [rsp+1F8h+var_1C8], rcx
lea rbx, [rsp+1F8h+var_1A8]
lea rcx, [rsi+7A8h]
mov [rsp+1F8h+var_1D0], rcx
lea rcx, [rdi+0CFE0h]
mov [rsp+1F8h+var_1D8], rcx
mov edi, [rdi+28h]
xor ecx, ecx
mov [rsp+1F8h+var_1E0], rsi
mov [rsp+1F8h+var_1E8], r14
loc_C4261:
lea esi, [rcx+1]
cmp edi, 2
jl loc_C4450
mov [rsp+1F8h+var_1EC], esi
xor r15d, r15d
mov [rsp+1F8h+var_1C0], rcx
loc_C4279:
mov rdx, [r14]
lea r13, [rsp+1F8h+var_108]
mov rdi, r13
lea r12, aSsDD; "%sS%d_%d"
mov rsi, r12
mov r8d, r15d
xor eax, eax
call _ZN6mujoco4utilL11sprintf_arrILm100EEEiRAT__cPKcz; mujoco::util::sprintf_arr<100ul>(char (&)[100ul],char const*,...)
mov rdx, [r14]
inc r15d
lea rdi, [rsp+1F8h+var_178]
mov rsi, r12
mov ecx, [rsp+1F8h+var_1EC]
mov r8d, r15d
xor eax, eax
call _ZN6mujoco4utilL11sprintf_arrILm100EEEiRAT__cPKcz; mujoco::util::sprintf_arr<100ul>(char (&)[100ul],char const*,...)
mov rdi, rbp; this
mov rsi, [rsp+1F8h+var_1C8]; mjCDef *
call _ZN8mjCModel9AddTendonEP6mjCDef; mjCModel::AddTendon(mjCDef *)
mov rcx, rbp
mov rbp, rax
mov rax, [rcx+0C88h]
mov rax, [rax]
mov [rbp+0B0h], rax
mov [rsp+1F8h+var_1B8], rbx
mov rdi, r13
call _strlen
lea rdx, [rsp+rax+1F8h+var_1F8]
add rdx, 0F0h
lea r12, [rsp+1F8h+var_1B8]
mov rdi, r12
mov rsi, r13
lea r13, byte_1CD6F2
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 rdi, rbp
mov rsi, r12
xor edx, edx
mov rcx, r13
call _ZN9mjCTendon8WrapSiteENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS3_E; mjCTendon::WrapSite(std::string,std::string_view)
mov rdi, [rsp+1F8h+var_1B8]; void *
cmp rdi, rbx
jz short loc_C4334
mov rsi, [rsp+1F8h+var_1A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C4334:
lea rbx, [rsp+1F8h+var_188]
mov [rsp+1F8h+var_198], rbx
lea r12, [rsp+1F8h+var_178]
mov rdi, r12
call _strlen
lea rdx, [rsp+rax+1F8h+var_1F8]
add rdx, 80h
lea r14, [rsp+1F8h+var_198]
mov rdi, r14
mov rsi, 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 rdi, rbp
mov rsi, r14
xor edx, edx
mov rcx, r13
call _ZN9mjCTendon8WrapSiteENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS3_E; mjCTendon::WrapSite(std::string,std::string_view)
mov rdi, [rsp+1F8h+var_198]; void *
cmp rdi, rbx
jz short loc_C4390
mov rsi, [rsp+1F8h+var_188]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C4390:
mov rbx, [rsp+1F8h+var_1E8]
mov rdx, [rbx]
lea r8d, [r15-1]
lea r14, [rsp+1F8h+var_98]
mov rdi, r14
lea rsi, aStsDD; "%sTS%d_%d"
mov r13, [rsp+1F8h+var_1C0]
mov ecx, r13d
xor eax, eax
call _ZN6mujoco4utilL11sprintf_arrILm100EEEiRAT__cPKcz; mujoco::util::sprintf_arr<100ul>(char (&)[100ul],char const*,...)
mov r12, rbp
add r12, 10h
mov rbp, [rbp+18h]
mov rdi, r14
call _strlen
mov rdi, r12
xor esi, esi
mov rdx, rbp
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rdi, [rsp+1F8h+var_1D0]
mov rsi, [rsp+1F8h+var_1D8]
call _mjs_addEquality
mov r12, rax
mov rdi, [rax]
mov rbp, [rsp+1F8h+var_1E0]
mov r14, rbx
mov rax, [rbp+0C88h]
mov rsi, [rax]
add rsi, 48h ; 'H'
call _mjs_setDefault
mov dword ptr [r12+18h], 3
mov rdi, [r12+80h]
lea rsi, [rsp+1F8h+var_98]
call _mjs_setString
mov rcx, r13
mov edi, [rbx+28h]
lea eax, [rdi-1]
cmp r15d, eax
lea rbx, [rsp+1F8h+var_1A8]
jl loc_C4279
mov eax, [r14+24h]
mov esi, [rsp+1F8h+var_1EC]
loc_C4450:
lea edx, [rax-1]
mov ecx, esi
cmp esi, edx
jl loc_C4261
loc_C445D:
add rsp, 1C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rsp+arg_58]
mov rcx, rbx
jmp short loc_C4487
mov rcx, rbx
mov r14, rax
mov rdi, [rsp+arg_38]; void *
loc_C4487:
cmp rdi, rbx
jz short loc_C4497
mov rsi, [rcx]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C4497:
mov rdi, r14
call __Unwind_Resume
|
long long mjCComposite::MakeShear(
mjCComposite *this,
mjCModel *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long result; // rax
mjCModel *v15; // rbp
long long *v16; // r14
int v17; // edi
long long v18; // rcx
unsigned int v19; // esi
unsigned int v20; // r15d
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rax
mjCModel *v25; // rcx
long long v26; // rbp
long long v27; // rax
long long v28; // rax
long long v29; // r9
__m128 v30; // xmm4
__m128 v31; // xmm5
long long v32; // r12
long long v33; // rbp
long long v34; // rax
long long v35; // r12
char v36; // [rsp+0h] [rbp-1F8h]
char v37; // [rsp+0h] [rbp-1F8h]
char v38; // [rsp+0h] [rbp-1F8h]
long long *v39; // [rsp+10h] [rbp-1E8h]
mjCDef **v41; // [rsp+20h] [rbp-1D8h]
mjCModel **v42; // [rsp+28h] [rbp-1D0h]
mjCDef *v43; // [rsp+30h] [rbp-1C8h]
long long v44; // [rsp+38h] [rbp-1C0h]
void *v45[2]; // [rsp+40h] [rbp-1B8h] BYREF
_QWORD v46[2]; // [rsp+50h] [rbp-1A8h] BYREF
void *v47[2]; // [rsp+60h] [rbp-198h] BYREF
_QWORD v48[2]; // [rsp+70h] [rbp-188h] BYREF
_BYTE v49[112]; // [rsp+80h] [rbp-178h] BYREF
_BYTE v50[112]; // [rsp+F0h] [rbp-108h] BYREF
_BYTE v51[152]; // [rsp+160h] [rbp-98h] BYREF
result = *((unsigned int *)this + 9);
if ( (int)result >= 2 )
{
v15 = a2;
v16 = (long long *)this;
v43 = (mjCComposite *)((char *)this + 53144);
v42 = (mjCModel **)((char *)a2 + 1960);
v41 = (mjCDef **)((char *)this + 53216);
v17 = *((_DWORD *)this + 10);
v18 = 0LL;
v39 = v16;
do
{
v19 = v18 + 1;
if ( v17 >= 2 )
{
v20 = 0;
v44 = v18;
do
{
mujoco::util::sprintf_arr<100ul>(
(long long)v50,
(long long)"%sS%d_%d",
*v16,
v18,
v20++,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v36);
mujoco::util::sprintf_arr<100ul>(
(long long)v49,
(long long)"%sS%d_%d",
*v16,
v19,
v20,
v21,
a3,
a4,
a5,
a6,
v22,
v23,
a9,
a10,
v37);
v24 = mjCModel::AddTendon(v15, v43);
v25 = v15;
v26 = v24;
*(_QWORD *)(v24 + 176) = **((_QWORD **)v25 + 401);
v45[0] = v46;
v27 = strlen(v50);
std::string::_M_construct<char const*>(v45, v50, &v50[v27]);
mjCTendon::WrapSite(v26, v45, 0LL, &byte_1CD6F2);
if ( v45[0] != v46 )
operator delete(v45[0], v46[0] + 1LL);
v47[0] = v48;
v28 = strlen(v49);
std::string::_M_construct<char const*>(v47, v49, &v49[v28]);
mjCTendon::WrapSite(v26, v47, 0LL, &byte_1CD6F2);
if ( v47[0] != v48 )
operator delete(v47[0], v48[0] + 1LL);
mujoco::util::sprintf_arr<100ul>(
(long long)v51,
(long long)"%sTS%d_%d",
*v39,
(unsigned int)v44,
v20 - 1,
v29,
a3,
a4,
a5,
a6,
v30,
v31,
a9,
a10,
v38);
v32 = v26 + 16;
v33 = *(_QWORD *)(v26 + 24);
v34 = strlen(v51);
std::string::_M_replace(v32, 0LL, v33, v51, v34);
v35 = mjs_addEquality(v42, v41);
v15 = a2;
v16 = v39;
mjs_setDefault(*(_QWORD *)v35, (_QWORD *)(**((_QWORD **)a2 + 401) + 72LL));
*(_DWORD *)(v35 + 24) = 3;
mjs_setString(*(_QWORD *)(v35 + 128), (long long)v51);
v18 = v44;
v17 = *((_DWORD *)v39 + 10);
}
while ( (int)v20 < v17 - 1 );
result = *((unsigned int *)v39 + 9);
}
v18 = v19;
}
while ( (int)v19 < (int)result - 1 );
}
return result;
}
|
MakeShear:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1c8
MOV EAX,dword ptr [RDI + 0x24]
CMP EAX,0x2
JL 0x001c445d
MOV RBP,RSI
MOV R14,RDI
LEA RCX,[RDI + 0xcf98]
MOV qword ptr [RSP + 0x30],RCX
LEA RBX,[RSP + 0x50]
LEA RCX,[RSI + 0x7a8]
MOV qword ptr [RSP + 0x28],RCX
LEA RCX,[RDI + 0xcfe0]
MOV qword ptr [RSP + 0x20],RCX
MOV EDI,dword ptr [RDI + 0x28]
XOR ECX,ECX
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],R14
LAB_001c4261:
LEA ESI,[RCX + 0x1]
CMP EDI,0x2
JL 0x001c4450
MOV dword ptr [RSP + 0xc],ESI
XOR R15D,R15D
MOV qword ptr [RSP + 0x38],RCX
LAB_001c4279:
MOV RDX,qword ptr [R14]
LEA R13,[RSP + 0xf0]
MOV RDI,R13
LEA R12,[0x2cf6fe]
MOV RSI,R12
MOV R8D,R15D
XOR EAX,EAX
CALL 0x001c055e
MOV RDX,qword ptr [R14]
INC R15D
LEA RDI,[RSP + 0x80]
MOV RSI,R12
MOV ECX,dword ptr [RSP + 0xc]
MOV R8D,R15D
XOR EAX,EAX
CALL 0x001c055e
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x001f983c
MOV RCX,RBP
MOV RBP,RAX
MOV RAX,qword ptr [RCX + 0xc88]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + 0xb0],RAX
MOV qword ptr [RSP + 0x40],RBX
MOV RDI,R13
CALL 0x0012de60
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0xf0
LEA R12,[RSP + 0x40]
MOV RDI,R12
MOV RSI,R13
LEA R13,[0x2cd6f2]
CALL 0x0012dec0
LAB_001c430d:
MOV RDI,RBP
MOV RSI,R12
XOR EDX,EDX
MOV RCX,R13
CALL 0x0021eaaa
LAB_001c431d:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,RBX
JZ 0x001c4334
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0012ded0
LAB_001c4334:
LEA RBX,[RSP + 0x70]
MOV qword ptr [RSP + 0x60],RBX
LEA R12,[RSP + 0x80]
MOV RDI,R12
CALL 0x0012de60
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0x80
LEA R14,[RSP + 0x60]
MOV RDI,R14
MOV RSI,R12
CALL 0x0012dec0
LAB_001c4369:
MOV RDI,RBP
MOV RSI,R14
XOR EDX,EDX
MOV RCX,R13
CALL 0x0021eaaa
LAB_001c4379:
MOV RDI,qword ptr [RSP + 0x60]
CMP RDI,RBX
JZ 0x001c4390
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0012ded0
LAB_001c4390:
MOV RBX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RBX]
LEA R8D,[R15 + -0x1]
LEA R14,[RSP + 0x160]
MOV RDI,R14
LEA RSI,[0x2cf8ee]
MOV R13,qword ptr [RSP + 0x38]
MOV ECX,R13D
XOR EAX,EAX
CALL 0x001c055e
MOV R12,RBP
ADD R12,0x10
MOV RBP,qword ptr [RBP + 0x18]
MOV RDI,R14
CALL 0x0012de60
MOV RDI,R12
XOR ESI,ESI
MOV RDX,RBP
MOV RCX,R14
MOV R8,RAX
CALL 0x0012e8e0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0012ea20
MOV R12,RAX
MOV RDI,qword ptr [RAX]
MOV RBP,qword ptr [RSP + 0x18]
MOV R14,RBX
MOV RAX,qword ptr [RBP + 0xc88]
MOV RSI,qword ptr [RAX]
ADD RSI,0x48
CALL 0x0012e980
MOV dword ptr [R12 + 0x18],0x3
MOV RDI,qword ptr [R12 + 0x80]
LEA RSI,[RSP + 0x160]
CALL 0x0012e950
MOV RCX,R13
MOV EDI,dword ptr [RBX + 0x28]
LEA EAX,[RDI + -0x1]
CMP R15D,EAX
LEA RBX,[RSP + 0x50]
JL 0x001c4279
MOV EAX,dword ptr [R14 + 0x24]
MOV ESI,dword ptr [RSP + 0xc]
LAB_001c4450:
LEA EDX,[RAX + -0x1]
MOV ECX,ESI
CMP ESI,EDX
JL 0x001c4261
LAB_001c445d:
ADD RSP,0x1c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* mjCComposite::MakeShear(mjCModel*) */
void __thiscall mjCComposite::MakeShear(mjCComposite *this,mjCModel *param_1)
{
char *pcVar1;
int iVar2;
long lVar3;
size_t sVar4;
int8 *puVar5;
ulong uVar6;
uint uVar7;
int iVar8;
uint uVar9;
ulong uVar10;
long *local_1b8 [2];
long local_1a8 [2];
long *local_198 [2];
long local_188 [2];
char local_178 [112];
char local_108 [112];
char local_98 [104];
iVar2 = *(int *)(this + 0x24);
if (1 < iVar2) {
iVar8 = *(int *)(this + 0x28);
uVar6 = 0;
do {
uVar7 = (int)uVar6 + 1;
if (1 < iVar8) {
uVar10 = 0;
do {
mujoco::util::sprintf_arr<100ul>(local_108,"%sS%d_%d",*(int8 *)this,uVar6,uVar10);
uVar9 = (int)uVar10 + 1;
mujoco::util::sprintf_arr<100ul>
(local_178,"%sS%d_%d",*(int8 *)this,(ulong)uVar7,(ulong)uVar9);
lVar3 = mjCModel::AddTendon(param_1,(mjCDef *)(this + 0xcf98));
*(int8 *)(lVar3 + 0xb0) = **(int8 **)(param_1 + 0xc88);
local_1b8[0] = local_1a8;
sVar4 = strlen(local_108);
std::__cxx11::string::_M_construct<char_const*>(local_1b8,local_108,local_108 + sVar4);
/* try { // try from 001c430d to 001c431c has its CatchHandler @ 001c447c */
mjCTendon::WrapSite(lVar3,local_1b8,0,&DAT_002cd6f2);
if (local_1b8[0] != local_1a8) {
operator_delete(local_1b8[0],local_1a8[0] + 1);
}
local_198[0] = local_188;
sVar4 = strlen(local_178);
std::__cxx11::string::_M_construct<char_const*>(local_198,local_178,local_178 + sVar4);
/* try { // try from 001c4369 to 001c4378 has its CatchHandler @ 001c446f */
mjCTendon::WrapSite(lVar3,local_198,0,&DAT_002cd6f2);
if (local_198[0] != local_188) {
operator_delete(local_198[0],local_188[0] + 1);
}
mujoco::util::sprintf_arr<100ul>(local_98,"%sTS%d_%d",*(int8 *)this,uVar6,uVar10);
pcVar1 = *(char **)(lVar3 + 0x18);
strlen(local_98);
std::__cxx11::string::_M_replace(lVar3 + 0x10,0,pcVar1,(ulong)local_98);
puVar5 = (int8 *)mjs_addEquality(param_1 + 0x7a8,this + 0xcfe0);
mjs_setDefault(*puVar5,**(long **)(param_1 + 0xc88) + 0x48);
*(int4 *)(puVar5 + 3) = 3;
mjs_setString(puVar5[0x10],local_98);
iVar8 = *(int *)(this + 0x28);
uVar10 = (ulong)uVar9;
} while ((int)uVar9 < iVar8 + -1);
iVar2 = *(int *)(this + 0x24);
}
uVar6 = (ulong)uVar7;
} while ((int)uVar7 < iVar2 + -1);
}
return;
}
|
|
19,521
|
cs_leave
|
eloqsql/strings/ctype.c
|
static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
int rc;
switch(state){
case _CS_COLLATION:
if (i->tailoring_length)
i->cs.tailoring= i->tailoring;
rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK;
break;
/* Rules: Logical Reset Positions */
case _CS_RESET_FIRST_NON_IGNORABLE:
rc= tailoring_append(st, "[first non-ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_NON_IGNORABLE:
rc= tailoring_append(st, "[last non-ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[first primary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[last primary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TRAILING:
rc= tailoring_append(st, "[first trailing]", 0, NULL);
break;
case _CS_RESET_LAST_TRAILING:
rc= tailoring_append(st, "[last trailing]", 0, NULL);
break;
case _CS_RESET_FIRST_VARIABLE:
rc= tailoring_append(st, "[first variable]", 0, NULL);
break;
case _CS_RESET_LAST_VARIABLE:
rc= tailoring_append(st, "[last variable]", 0, NULL);
break;
default:
rc=MY_XML_OK;
}
return rc;
}
|
O3
|
c
|
cs_leave:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq 0x140(%rdi), %rbx
leaq 0x2ba324(%rip), %r13 # 0x36b0d0
leaq 0xf220(%rip), %r12 # 0xbffd3
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3a2b0
testl %eax, %eax
jne 0xb0dcc
cmpb $0x0, (%r12,%r14)
je 0xb0dea
movq 0x18(%r13), %r12
addq $0x10, %r13
testq %r12, %r12
jne 0xb0db3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r13), %ecx
leal -0x191(%rcx), %eax
cmpl $0xb, %eax
ja 0xb0e15
leaq 0x28d8fc(%rip), %rcx # 0x33e6fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1121e(%rip), %rsi # 0xc202e
jmp 0xb0ec0
cmpl $0x9, %ecx
jne 0xb0dd9
cmpq $0x0, 0x690(%rbx)
je 0xb0e32
movq 0x688(%rbx), %rax
movq %rax, 0x718(%rbx)
movq 0x7a8(%rbx), %rax
movq 0xa8(%rax), %rax
testq %rax, %rax
je 0xb0dd9
addq $0x6e0, %rbx # imm = 0x6E0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0x111b3(%rip), %rsi # 0xc2019
jmp 0xb0ec0
leaq 0x11229(%rip), %rsi # 0xc2098
jmp 0xb0ec0
leaq 0x11287(%rip), %rsi # 0xc20ff
jmp 0xb0ec0
leaq 0x111e0(%rip), %rsi # 0xc2061
jmp 0xb0ec0
leaq 0x111f3(%rip), %rsi # 0xc207d
jmp 0xb0ec0
leaq 0x1124b(%rip), %rsi # 0xc20de
jmp 0xb0ec0
leaq 0x111ac(%rip), %rsi # 0xc2048
jmp 0xb0ec0
leaq 0x1120e(%rip), %rsi # 0xc20b3
jmp 0xb0ec0
leaq 0x1121f(%rip), %rsi # 0xc20cd
jmp 0xb0ec0
leaq 0x1114c(%rip), %rsi # 0xc2003
jmp 0xb0ec0
leaq 0x1122e(%rip), %rsi # 0xc20ee
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb1710
|
cs_leave:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, [rdi+140h]
lea r13, sec
lea r12, aIndexXml+6; "xml"
loc_B0DB3:
mov rdi, r15
mov rsi, r12
mov rdx, r14
call _strncmp
test eax, eax
jnz short loc_B0DCC
cmp byte ptr [r12+r14], 0
jz short loc_B0DEA
loc_B0DCC:
mov r12, [r13+18h]
add r13, 10h
test r12, r12
jnz short loc_B0DB3
loc_B0DD9:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B0DEA:
mov ecx, [r13+0]
lea eax, [rcx-191h]; switch 12 cases
cmp eax, 0Bh
ja short def_B0E07; jumptable 00000000000B0E07 default case
lea rcx, jpt_B0E07
movsxd rax, ds:(jpt_B0E07 - 33E6FCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B0E09:
lea rsi, aFirstPrimaryIg; jumptable 00000000000B0E07 case 401
jmp loc_B0EC0
def_B0E07:
cmp ecx, 9; jumptable 00000000000B0E07 default case
jnz short loc_B0DD9
cmp qword ptr [rbx+690h], 0
jz short loc_B0E32
mov rax, [rbx+688h]
mov [rbx+718h], rax
loc_B0E32:
mov rax, [rbx+7A8h]
mov rax, [rax+0A8h]
test rax, rax
jz short loc_B0DD9
add rbx, 6E0h
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_B0E5F:
lea rsi, aLastNonIgnorab; jumptable 00000000000B0E07 case 412
jmp short loc_B0EC0
loc_B0E68:
lea rsi, aFirstTertiaryI; jumptable 00000000000B0E07 case 405
jmp short loc_B0EC0
loc_B0E71:
lea rsi, aLastVariable; jumptable 00000000000B0E07 case 410
jmp short loc_B0EC0
loc_B0E7A:
lea rsi, aFirstSecondary; jumptable 00000000000B0E07 case 403
jmp short loc_B0EC0
loc_B0E83:
lea rsi, aLastSecondaryI; jumptable 00000000000B0E07 case 404
jmp short loc_B0EC0
loc_B0E8C:
lea rsi, aLastTrailing; jumptable 00000000000B0E07 case 408
jmp short loc_B0EC0
loc_B0E95:
lea rsi, aLastPrimaryIgn; jumptable 00000000000B0E07 case 402
jmp short loc_B0EC0
loc_B0E9E:
lea rsi, aLastTertiaryIg; jumptable 00000000000B0E07 case 406
jmp short loc_B0EC0
loc_B0EA7:
lea rsi, aFirstTrailing; jumptable 00000000000B0E07 case 407
jmp short loc_B0EC0
loc_B0EB0:
lea rsi, aFirstNonIgnora; jumptable 00000000000B0E07 case 411
jmp short loc_B0EC0
loc_B0EB9:
lea rsi, aFirstVariable; jumptable 00000000000B0E07 case 409
loc_B0EC0:
mov rdi, rbx
xor edx, edx
xor ecx, ecx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp tailoring_append
|
long long cs_leave(long long a1, long long a2, long long a3, long long a4)
{
_QWORD *v5; // rbx
char *v6; // r13
char *v7; // r12
long long result; // rax
long long ( *v9)(_QWORD *); // rax
v5 = *(_QWORD **)(a1 + 320);
v6 = (char *)&sec;
v7 = "xml";
while ( (unsigned int)strncmp(a2, v7, a3, a4) || v7[a3] )
{
v7 = (char *)*((_QWORD *)v6 + 3);
v6 += 16;
if ( !v7 )
return 0LL;
}
switch ( *(_DWORD *)v6 )
{
case 0x191:
result = tailoring_append(v5, "[first primary ignorable]", 0LL, 0LL);
break;
case 0x192:
result = tailoring_append(v5, "[last primary ignorable]", 0LL, 0LL);
break;
case 0x193:
result = tailoring_append(v5, "[first secondary ignorable]", 0LL, 0LL);
break;
case 0x194:
result = tailoring_append(v5, "[last secondary ignorable]", 0LL, 0LL);
break;
case 0x195:
result = tailoring_append(v5, "[first tertiary ignorable]", 0LL, 0LL);
break;
case 0x196:
result = tailoring_append(v5, "[last tertiary ignorable]", 0LL, 0LL);
break;
case 0x197:
result = tailoring_append(v5, "[first trailing]", 0LL, 0LL);
break;
case 0x198:
result = tailoring_append(v5, "[last trailing]", 0LL, 0LL);
break;
case 0x199:
result = tailoring_append(v5, "[first variable]", 0LL, 0LL);
break;
case 0x19A:
result = tailoring_append(v5, "[last variable]", 0LL, 0LL);
break;
case 0x19B:
result = tailoring_append(v5, "[first non-ignorable]", 0LL, 0LL);
break;
case 0x19C:
result = tailoring_append(v5, "[last non-ignorable]", 0LL, 0LL);
break;
default:
if ( *(_DWORD *)v6 != 9 )
return 0LL;
if ( v5[210] )
v5[227] = v5[209];
v9 = *(long long ( **)(_QWORD *))(v5[245] + 168LL);
if ( !v9 )
return 0LL;
result = v9(v5 + 220);
break;
}
return result;
}
|
cs_leave:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,qword ptr [RDI + 0x140]
LEA R13,[0x46b0d0]
LEA R12,[0x1bffd3]
LAB_001b0db3:
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
CALL 0x0013a2b0
TEST EAX,EAX
JNZ 0x001b0dcc
CMP byte ptr [R12 + R14*0x1],0x0
JZ 0x001b0dea
LAB_001b0dcc:
MOV R12,qword ptr [R13 + 0x18]
ADD R13,0x10
TEST R12,R12
JNZ 0x001b0db3
LAB_001b0dd9:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b0dea:
MOV ECX,dword ptr [R13]
LEA EAX,[RCX + -0x191]
CMP EAX,0xb
JA 0x001b0e15
LEA RCX,[0x43e6fc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_191:
LEA RSI,[0x1c202e]
JMP 0x001b0ec0
LAB_001b0e15:
CMP ECX,0x9
JNZ 0x001b0dd9
CMP qword ptr [RBX + 0x690],0x0
JZ 0x001b0e32
MOV RAX,qword ptr [RBX + 0x688]
MOV qword ptr [RBX + 0x718],RAX
LAB_001b0e32:
MOV RAX,qword ptr [RBX + 0x7a8]
MOV RAX,qword ptr [RAX + 0xa8]
TEST RAX,RAX
JZ 0x001b0dd9
ADD RBX,0x6e0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
caseD_19c:
LEA RSI,[0x1c2019]
JMP 0x001b0ec0
caseD_195:
LEA RSI,[0x1c2098]
JMP 0x001b0ec0
caseD_19a:
LEA RSI,[0x1c20ff]
JMP 0x001b0ec0
caseD_193:
LEA RSI,[0x1c2061]
JMP 0x001b0ec0
caseD_194:
LEA RSI,[0x1c207d]
JMP 0x001b0ec0
caseD_198:
LEA RSI,[0x1c20de]
JMP 0x001b0ec0
caseD_192:
LEA RSI,[0x1c2048]
JMP 0x001b0ec0
caseD_196:
LEA RSI,[0x1c20b3]
JMP 0x001b0ec0
caseD_197:
LEA RSI,[0x1c20cd]
JMP 0x001b0ec0
caseD_19b:
LEA RSI,[0x1c2003]
JMP 0x001b0ec0
caseD_199:
LEA RSI,[0x1c20ee]
LAB_001b0ec0:
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001b1710
|
int8 cs_leave(long param_1,char *param_2,size_t param_3)
{
long lVar1;
code *UNRECOVERED_JUMPTABLE;
int iVar2;
int8 uVar3;
char *pcVar4;
int *piVar5;
lVar1 = *(long *)(param_1 + 0x140);
piVar5 = &sec;
pcVar4 = "xml";
while ((iVar2 = strncmp(param_2,pcVar4,param_3), iVar2 != 0 || (pcVar4[param_3] != '\0'))) {
pcVar4 = *(char **)(piVar5 + 6);
piVar5 = piVar5 + 4;
if (pcVar4 == (char *)0x0) {
return 0;
}
}
switch(*piVar5) {
case 0x191:
pcVar4 = "[first primary ignorable]";
break;
case 0x192:
pcVar4 = "[last primary ignorable]";
break;
case 0x193:
pcVar4 = "[first secondary ignorable]";
break;
case 0x194:
pcVar4 = "[last secondary ignorable]";
break;
case 0x195:
pcVar4 = "[first tertiary ignorable]";
break;
case 0x196:
pcVar4 = "[last tertiary ignorable]";
break;
case 0x197:
pcVar4 = "[first trailing]";
break;
case 0x198:
pcVar4 = "[last trailing]";
break;
case 0x199:
pcVar4 = "[first variable]";
break;
case 0x19a:
pcVar4 = "[last variable]";
break;
case 0x19b:
pcVar4 = "[first non-ignorable]";
break;
case 0x19c:
pcVar4 = "[last non-ignorable]";
break;
default:
if (*piVar5 != 9) {
return 0;
}
if (*(long *)(lVar1 + 0x690) != 0) {
*(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688);
}
UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8);
if (UNRECOVERED_JUMPTABLE == (code *)0x0) {
return 0;
}
/* WARNING: Could not recover jumptable at 0x001b0e5d. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*UNRECOVERED_JUMPTABLE)(lVar1 + 0x6e0);
return uVar3;
}
uVar3 = tailoring_append(lVar1,pcVar4,0,0);
return uVar3;
}
|
|
19,522
|
minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/minja.hpp
|
CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {}
|
O3
|
cpp
|
minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xa46c7(%rip), %r15 # 0x1282e8
addq $0x10, %r15
movq %r15, (%rdi)
movl $0xc, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x83c58
movq 0xa6336(%rip), %rdi # 0x129f80
cmpb $0x0, (%rdi)
je 0x83c54
incl 0x8(%rax)
jmp 0x83c58
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rbx)
movl %edx, 0x28(%rbx)
movl %ecx, 0x2c(%rbx)
leaq 0xa4633(%rip), %rax # 0x1282a0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x30(%rbx), %rdi
leaq 0x40(%rbx), %rax
movq %rax, 0x30(%rbx)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
callq 0x210fc
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x83ca9
callq 0x6c8e8
movq %r14, %rdi
callq 0x1af20
nop
|
_ZN5minja20CommentTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add r15, 10h
mov [rdi], r15
mov dword ptr [rdi+8], 0Ch
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_83C58
mov rdi, cs:__libc_single_threaded_ptr
cmp byte ptr [rdi], 0
jz short loc_83C54
inc dword ptr [rax+8]
jmp short loc_83C58
loc_83C54:
lock inc dword ptr [rax+8]
loc_83C58:
mov rax, [rsi+10h]
mov [rbx+20h], rax
mov [rbx+28h], edx
mov [rbx+2Ch], ecx
lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+30h]
lea rax, [rbx+40h]
mov [rbx+30h], rax
mov rsi, [r8]
mov rdx, [r8+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_83CA9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_83CA9:
mov rdi, r14
call __Unwind_Resume
|
long long minja::CommentTemplateToken::CommentTemplateToken(
long long a1,
_QWORD *a2,
int a3,
int a4,
long long a5)
{
long long v5; // rax
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 12;
*(_QWORD *)(a1 + 16) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 24) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::CommentTemplateToken + 2;
*(_QWORD *)(a1 + 48) = a1 + 64;
return std::string::_M_construct<char *>(a1 + 48, *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8));
}
|
CommentTemplateToken:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x2282e8]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV dword ptr [RDI + 0x8],0xc
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x00183c58
MOV RDI,qword ptr [0x00229f80]
CMP byte ptr [RDI],0x0
JZ 0x00183c54
INC dword ptr [RAX + 0x8]
JMP 0x00183c58
LAB_00183c54:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00183c58:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x20],RAX
MOV dword ptr [RBX + 0x28],EDX
MOV dword ptr [RBX + 0x2c],ECX
LEA RAX,[0x2282a0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x30]
LEA RAX,[RBX + 0x40]
MOV qword ptr [RBX + 0x30],RAX
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
ADD RDX,RSI
LAB_00183c8a:
CALL 0x001210fc
LAB_00183c8f:
POP RBX
POP R14
POP R15
RET
|
/* minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::__cxx11::string const&) */
void __thiscall
minja::CommentTemplateToken::CommentTemplateToken
(CommentTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
long *param_5)
{
long lVar1;
*(int ***)this = &PTR__TemplateToken_002282f8;
*(int4 *)(this + 8) = 0xc;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00229f80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__CommentTemplateToken_002282b0;
*(CommentTemplateToken **)(this + 0x30) = this + 0x40;
/* try { // try from 00183c8a to 00183c8e has its CatchHandler @ 00183c95 */
std::__cxx11::string::_M_construct<char*>(this + 0x30,*param_5,param_5[1] + *param_5);
return;
}
|
|
19,523
|
ftxui::frame(std::shared_ptr<ftxui::Node>)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/frame.cpp
|
Element frame(Element child) {
return std::make_shared<Frame>(unpack(std::move(child)), true, true);
}
|
O3
|
cpp
|
ftxui::frame(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
xorl %ecx, %ecx
movq %rcx, 0x8(%rsi)
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movq %rcx, (%rsi)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x22adb
movl $0x70, %edi
callq 0xb3e0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x20ef0(%rip), %rax # 0x58ac0
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
movq 0x10(%rsp), %rax
movaps (%rsp), %xmm0
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rax, 0x10(%rsi)
movaps %xmm1, 0x30(%rsp)
movq %rcx, 0x40(%rsp)
movq %r15, %rdi
callq 0x23e0a
leaq 0x50(%rsp), %rdi
callq 0x1503a
leaq 0x20ef0(%rip), %rax # 0x58b10
movq %rax, 0x10(%r14)
movw $0x101, 0x6c(%r14) # imm = 0x101
leaq 0x30(%rsp), %rdi
callq 0x1503a
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq %rsp, %rdi
callq 0x1503a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x37c53
callq 0x14af8
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1503a
leaq 0x30(%rsp), %rdi
callq 0x1503a
movl $0x70, %esi
movq %r14, %rdi
callq 0xb400
jmp 0x37c89
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1503a
jmp 0x37c96
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x37ca5
callq 0x14af8
movq %rbx, %rdi
callq 0xb780
|
_ZN5ftxui5frameESt10shared_ptrINS_4NodeEE:
push r15
push r14
push rbx
sub rsp, 70h
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
xor ecx, ecx
mov [rsi+8], rcx
lea rax, [rsp+88h+var_68]
movaps xmmword ptr [rax], xmm0
mov [rsi], rcx
mov rdi, rsp
mov rsi, rax
call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>)
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_58AC0
mov [r14], rax
mov r15, r14
add r15, 10h
mov rax, [rsp+88h+var_78]
movaps xmm0, [rsp+88h+var_88]
xor ecx, ecx
mov [rsp+88h+var_78], rcx
xorps xmm1, xmm1
movaps [rsp+88h+var_88], xmm1
lea rsi, [rsp+88h+var_38]
movaps xmmword ptr [rsi], xmm0
mov [rsi+10h], rax
movaps [rsp+88h+var_58], xmm1
mov [rsp+88h+var_48], rcx
mov rdi, r15
call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>)
lea rdi, [rsp+88h+var_38]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rax, off_58B10
mov [r14+10h], rax
mov word ptr [r14+6Ch], 101h
lea rdi, [rsp+88h+var_58]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov [rbx], r15
mov [rbx+8], r14
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, [rsp+88h+var_60]
test rdi, rdi
jz short loc_37C53
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_37C53:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_48]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rdi, [rsp+arg_28]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov esi, 70h ; 'p'; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_37C89
mov rbx, rax
loc_37C89:
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
jmp short loc_37C96
mov rbx, rax
loc_37C96:
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_37CA5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_37CA5:
mov rdi, rbx
call __Unwind_Resume
|
_QWORD * ftxui::frame(_QWORD *a1, __int128 *a2)
{
__int128 v2; // xmm0
long long v3; // r14
long long v4; // rax
__int128 v5; // xmm0
__int128 v7; // [rsp+0h] [rbp-88h] BYREF
long long v8; // [rsp+10h] [rbp-78h]
__int128 v9; // [rsp+20h] [rbp-68h] BYREF
__int128 v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+40h] [rbp-48h]
__int128 v12; // [rsp+50h] [rbp-38h] BYREF
long long v13; // [rsp+60h] [rbp-28h]
v2 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
v9 = v2;
*(_QWORD *)a2 = 0LL;
ftxui::unpack<std::shared_ptr<ftxui::Node>>((long long)&v7, (long long)&v9);
v3 = operator new(0x70uLL);
*(_QWORD *)(v3 + 8) = 0x100000001LL;
*(_QWORD *)v3 = off_58AC0;
v4 = v8;
v5 = v7;
v8 = 0LL;
v7 = 0LL;
v12 = v5;
v13 = v4;
v10 = 0LL;
v11 = 0LL;
ftxui::Node::Node(v3 + 16, (long long)&v12);
std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v12);
*(_QWORD *)(v3 + 16) = off_58B10;
*(_WORD *)(v3 + 108) = 257;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v10);
*a1 = v3 + 16;
a1[1] = v3;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v7);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
return a1;
}
|
frame:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
XOR ECX,ECX
MOV qword ptr [RSI + 0x8],RCX
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSI],RCX
LAB_00137ba3:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x00122adb
LAB_00137bae:
MOV EDI,0x70
CALL 0x0010b3e0
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x158ac0]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
MOV RAX,qword ptr [RSP + 0x10]
MOVAPS XMM0,xmmword ptr [RSP]
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],RCX
XORPS XMM1,XMM1
MOVAPS xmmword ptr [RSP],XMM1
LEA RSI,[RSP + 0x50]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],RAX
MOVAPS xmmword ptr [RSP + 0x30],XMM1
MOV qword ptr [RSP + 0x40],RCX
LAB_00137c07:
MOV RDI,R15
CALL 0x00123e0a
LAB_00137c0f:
LEA RDI,[RSP + 0x50]
CALL 0x0011503a
LEA RAX,[0x158b10]
MOV qword ptr [R14 + 0x10],RAX
MOV word ptr [R14 + 0x6c],0x101
LEA RDI,[RSP + 0x30]
CALL 0x0011503a
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,RSP
CALL 0x0011503a
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00137c53
CALL 0x00114af8
LAB_00137c53:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* ftxui::frame(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::frame(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int8 local_88;
int8 uStack_80;
int8 local_78;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int8 local_58;
int8 uStack_50;
int8 local_48;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int8 local_28;
local_68 = *(int4 *)param_2;
uStack_64 = *(int4 *)((long)param_2 + 4);
uStack_60 = *(int4 *)(param_2 + 1);
uStack_5c = *(int4 *)((long)param_2 + 0xc);
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 00137ba3 to 00137bad has its CatchHandler @ 00137c93 */
unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_88,&local_68);
/* try { // try from 00137bae to 00137bb7 has its CatchHandler @ 00137c86 */
puVar1 = (int8 *)operator_new(0x70);
local_28 = local_78;
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00158ac0;
local_38 = (int4)local_88;
uStack_34 = local_88._4_4_;
uStack_30 = (int4)uStack_80;
uStack_2c = uStack_80._4_4_;
local_78 = 0;
local_88 = 0;
uStack_80 = 0;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
/* try { // try from 00137c07 to 00137c0e has its CatchHandler @ 00137c60 */
Node::Node((Node *)(puVar1 + 2));
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_38);
puVar1[2] = &PTR__Node_00158b10;
*(int2 *)((long)puVar1 + 0x6c) = 0x101;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_58);
*(Node **)this = (Node *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_88);
if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_5c,uStack_60) !=
(_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> *)CONCAT44(uStack_5c,uStack_60));
}
return this;
}
|
|
19,524
|
bf_cmp
|
bluesky950520[P]quickjs/libbf.c
|
int bf_cmp(const bf_t *a, const bf_t *b)
{
int res;
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
res = 2;
} else if (a->sign != b->sign) {
if (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_ZERO)
res = 0;
else
res = 1 - 2 * a->sign;
} else {
res = bf_cmpu(a, b);
if (a->sign)
res = -res;
}
return res;
}
|
O0
|
c
|
bf_cmp:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
je 0xe7208
movq 0x8(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
jne 0xe7215
movl $0x2, 0x4(%rsp)
jmp 0xe729e
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
je 0xe7272
movq 0x10(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, 0x10(%rax)
jne 0xe725b
movq 0x8(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, 0x10(%rax)
jne 0xe725b
movl $0x0, 0x4(%rsp)
jmp 0xe7270
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movl $0x1, %eax
subl %ecx, %eax
movl %eax, 0x4(%rsp)
jmp 0xe729c
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xe6f40
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0xe729a
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0xe729c
jmp 0xe729e
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
|
bf_cmp:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jz short loc_E7208
mov rax, [rsp+18h+var_10]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jnz short loc_E7215
loc_E7208:
mov [rsp+18h+var_14], 2
jmp loc_E729E
loc_E7215:
mov rax, [rsp+18h+var_8]
mov eax, [rax+8]
mov rcx, [rsp+18h+var_10]
cmp eax, [rcx+8]
jz short loc_E7272
mov rax, [rsp+18h+var_8]
mov rcx, 8000000000000000h
cmp [rax+10h], rcx
jnz short loc_E725B
mov rax, [rsp+18h+var_10]
mov rcx, 8000000000000000h
cmp [rax+10h], rcx
jnz short loc_E725B
mov [rsp+18h+var_14], 0
jmp short loc_E7270
loc_E725B:
mov rax, [rsp+18h+var_8]
mov ecx, [rax+8]
shl ecx, 1
mov eax, 1
sub eax, ecx
mov [rsp+18h+var_14], eax
loc_E7270:
jmp short loc_E729C
loc_E7272:
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call bf_cmpu
mov [rsp+18h+var_14], eax
mov rax, [rsp+18h+var_8]
cmp dword ptr [rax+8], 0
jz short loc_E729A
xor eax, eax
sub eax, [rsp+18h+var_14]
mov [rsp+18h+var_14], eax
loc_E729A:
jmp short $+2
loc_E729C:
jmp short $+2
loc_E729E:
mov eax, [rsp+18h+var_14]
add rsp, 18h
retn
|
long long bf_cmp(long long a1, long long a2)
{
unsigned int v3; // [rsp+4h] [rbp-14h]
if ( *(_QWORD *)(a1 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
return 2;
}
else if ( *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8) )
{
v3 = bf_cmpu(a1, a2);
if ( *(_DWORD *)(a1 + 8) )
return -v3;
}
else if ( *(_QWORD *)(a1 + 16) == 0x8000000000000000LL && *(_QWORD *)(a2 + 16) == 0x8000000000000000LL )
{
return 0;
}
else
{
return (unsigned int)(1 - 2 * *(_DWORD *)(a1 + 8));
}
return v3;
}
|
js_TA_cmp_uint16:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x8]
MOVZX EAX,word ptr [RAX]
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,word ptr [RCX]
SUB EAX,ECX
RET
|
int js_TA_cmp_uint16(ushort *param_1,ushort *param_2)
{
return (uint)*param_1 - (uint)*param_2;
}
|
|
19,525
|
bf_cmp
|
bluesky950520[P]quickjs/libbf.c
|
int bf_cmp(const bf_t *a, const bf_t *b)
{
int res;
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
res = 2;
} else if (a->sign != b->sign) {
if (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_ZERO)
res = 0;
else
res = 1 - 2 * a->sign;
} else {
res = bf_cmpu(a, b);
if (a->sign)
res = -res;
}
return res;
}
|
O1
|
c
|
bf_cmp:
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
movq 0x10(%rdi), %rcx
movl $0x2, %eax
cmpq %rdx, %rcx
je 0x85549
movq 0x10(%rsi), %r8
cmpq %rdx, %r8
je 0x85549
pushq %rbx
movl 0x8(%rdi), %ebx
cmpl 0x8(%rsi), %ebx
jne 0x8552f
callq 0x8542a
movl %eax, %ecx
negl %eax
testl %ebx, %ebx
cmovel %ecx, %eax
jmp 0x85548
incq %rdx
xorq %rdx, %rcx
xorq %rdx, %r8
xorl %eax, %eax
orq %rcx, %r8
je 0x85548
addl %ebx, %ebx
movl $0x1, %eax
subl %ebx, %eax
popq %rbx
retq
|
bf_cmp:
mov rdx, 7FFFFFFFFFFFFFFFh
mov rcx, [rdi+10h]
mov eax, 2
cmp rcx, rdx
jz short locret_85549
mov r8, [rsi+10h]
cmp r8, rdx
jz short locret_85549
push rbx
mov ebx, [rdi+8]
cmp ebx, [rsi+8]
jnz short loc_8552F
call bf_cmpu
mov ecx, eax
neg eax
test ebx, ebx
cmovz eax, ecx
jmp short loc_85548
loc_8552F:
inc rdx
xor rcx, rdx
xor r8, rdx
xor eax, eax
or r8, rcx
jz short loc_85548
add ebx, ebx
mov eax, 1
sub eax, ebx
loc_85548:
pop rbx
locret_85549:
retn
|
long long bf_cmp(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
long long v4; // r8
int v5; // ebx
unsigned int v6; // ecx
v2 = *(_QWORD *)(a1 + 16);
result = 2LL;
if ( v2 != 0x7FFFFFFFFFFFFFFFLL )
{
v4 = *(_QWORD *)(a2 + 16);
if ( v4 != 0x7FFFFFFFFFFFFFFFLL )
{
v5 = *(_DWORD *)(a1 + 8);
if ( v5 == *(_DWORD *)(a2 + 8) )
{
v6 = bf_cmpu((_QWORD *)a1, (_QWORD *)a2);
result = -v6;
if ( !v5 )
return v6;
}
else
{
result = 0LL;
if ( v2 ^ 0x8000000000000000LL | v4 ^ 0x8000000000000000LL )
return (unsigned int)(1 - 2 * v5);
}
}
}
return result;
}
| |||
19,526
|
my_rw_trywrlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_trywrlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if (rwp->state)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state = -1;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
}
pthread_mutex_unlock(&rwp->lock);
return(res);
}
|
O3
|
c
|
my_rw_trywrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x24540
movl $0x10, %r14d
cmpl $0x0, 0x88(%rbx)
jne 0x2c72e
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x24270
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_trywrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov r14d, 10h
cmp dword ptr [rbx+88h], 0
jnz short loc_2C72E
mov dword ptr [rbx+88h], 0FFFFFFFFh
xor r14d, r14d
loc_2C72E:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_trywrlock(long long a1)
{
unsigned int v1; // r14d
pthread_mutex_lock(a1);
v1 = 16;
if ( !*(_DWORD *)(a1 + 136) )
{
*(_DWORD *)(a1 + 136) = -1;
v1 = 0;
}
pthread_mutex_unlock(a1);
return v1;
}
|
my_rw_trywrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00124540
MOV R14D,0x10
CMP dword ptr [RBX + 0x88],0x0
JNZ 0x0012c72e
MOV dword ptr [RBX + 0x88],0xffffffff
XOR R14D,R14D
LAB_0012c72e:
MOV RDI,RBX
CALL 0x00124270
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_trywrlock(pthread_mutex_t *param_1)
{
int8 uVar1;
pthread_mutex_lock(param_1);
uVar1 = 0x10;
if (*(int *)((long)param_1 + 0x88) == 0) {
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
uVar1 = 0;
}
pthread_mutex_unlock(param_1);
return uVar1;
}
|
|
19,527
|
llm_tokenizer_bpe_session::~llm_tokenizer_bpe_session()
|
monkey531[P]llama/src/llama-vocab.cpp
|
llm_tokenizer_bpe_session(const llama_vocab & vocab, const llm_tokenizer_bpe & tokenizer) : vocab(vocab), tokenizer(tokenizer) {}
|
O1
|
cpp
|
llm_tokenizer_bpe_session::~llm_tokenizer_bpe_session():
pushq %rbx
movq %rdi, %rbx
addq $0x40, %rdi
callq 0x660d0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0xee36a
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x69220
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xee380
movq 0x20(%rbx), %rsi
subq %rdi, %rsi
popq %rbx
jmp 0x69220
popq %rbx
retq
|
_ZN25llm_tokenizer_bpe_sessionD2Ev:
push rbx
mov rbx, rdi
add rdi, 40h ; '@'
call __ZNSt6vectorI14llm_bigram_bpeSaIS0_EED2Ev; std::vector<llm_bigram_bpe>::~vector()
mov rdi, [rbx+28h]; void *
test rdi, rdi
jz short loc_EE36A
mov rsi, [rbx+38h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EE36A:
mov rdi, [rbx+10h]; void *
test rdi, rdi
jz short loc_EE380
mov rsi, [rbx+20h]
sub rsi, rdi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_EE380:
pop rbx
retn
|
void llm_tokenizer_bpe_session::~llm_tokenizer_bpe_session(llm_tokenizer_bpe_session *this)
{
void *v2; // rdi
void *v3; // rdi
std::vector<llm_bigram_bpe>::~vector((char *)this + 64);
v2 = (void *)*((_QWORD *)this + 5);
if ( v2 )
operator delete(v2, *((_QWORD *)this + 7) - (_QWORD)v2);
v3 = (void *)*((_QWORD *)this + 2);
if ( v3 )
operator delete(v3, *((_QWORD *)this + 4) - (_QWORD)v3);
}
|
~llm_tokenizer_bpe_session:
PUSH RBX
MOV RBX,RDI
ADD RDI,0x40
CALL 0x001660d0
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x001ee36a
MOV RSI,qword ptr [RBX + 0x38]
SUB RSI,RDI
CALL 0x00169220
LAB_001ee36a:
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x001ee380
MOV RSI,qword ptr [RBX + 0x20]
SUB RSI,RDI
POP RBX
JMP 0x00169220
LAB_001ee380:
POP RBX
RET
|
/* llm_tokenizer_bpe_session::~llm_tokenizer_bpe_session() */
void __thiscall
llm_tokenizer_bpe_session::~llm_tokenizer_bpe_session(llm_tokenizer_bpe_session *this)
{
void *pvVar1;
std::vector<llm_bigram_bpe,std::allocator<llm_bigram_bpe>>::~vector
((vector<llm_bigram_bpe,std::allocator<llm_bigram_bpe>> *)(this + 0x40));
pvVar1 = *(void **)(this + 0x28);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x38) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x10);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x20) - (long)pvVar1);
return;
}
return;
}
|
|
19,528
|
get_plugin_nr
|
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
|
static int get_plugin_nr(uint type)
{
uint i= 0;
for(; valid_plugins[i][1]; i++)
if (valid_plugins[i][0] == type)
return i;
return -1;
}
|
O0
|
c
|
get_plugin_nr:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x28a36(%rip), %rax # 0x5ee40
cmpl $0x0, 0x4(%rax,%rcx,8)
je 0x3643a
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x28a23(%rip), %rax # 0x5ee40
movl (%rax,%rcx,8), %eax
cmpl -0x8(%rbp), %eax
jne 0x3642d
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x36441
jmp 0x3642f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x363fe
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_plugin_nr:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_C], 0
loc_363FE:
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, valid_plugins
cmp dword ptr [rax+rcx*8+4], 0
jz short loc_3643A
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, valid_plugins
mov eax, [rax+rcx*8]
cmp eax, [rbp+var_8]
jnz short loc_3642D
mov eax, [rbp+var_C]
mov [rbp+var_4], eax
jmp short loc_36441
loc_3642D:
jmp short $+2
loc_3642F:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_363FE
loc_3643A:
mov [rbp+var_4], 0FFFFFFFFh
loc_36441:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long get_plugin_nr(int a1)
{
unsigned int i; // [rsp+0h] [rbp-Ch]
for ( i = 0; valid_plugins[2 * i + 1]; ++i )
{
if ( valid_plugins[2 * i] == a1 )
return i;
}
return (unsigned int)-1;
}
|
get_plugin_nr:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],0x0
LAB_001363fe:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x15ee40]
CMP dword ptr [RAX + RCX*0x8 + 0x4],0x0
JZ 0x0013643a
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x15ee40]
MOV EAX,dword ptr [RAX + RCX*0x8]
CMP EAX,dword ptr [RBP + -0x8]
JNZ 0x0013642d
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00136441
LAB_0013642d:
JMP 0x0013642f
LAB_0013642f:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001363fe
LAB_0013643a:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00136441:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint get_plugin_nr(int param_1)
{
uint local_14;
local_14 = 0;
while( true ) {
if (*(int *)(valid_plugins + (ulong)local_14 * 8 + 4) == 0) {
return 0xffffffff;
}
if (*(int *)(valid_plugins + (ulong)local_14 * 8) == param_1) break;
local_14 = local_14 + 1;
}
return local_14;
}
|
|
19,529
|
mysql_stmt_next_result
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
{
int rc= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_EXECUTED)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!mysql_stmt_more_results(stmt))
return(-1);
if (stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE)
madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA);
stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE;
if (mysql_next_result(stmt->mysql))
{
stmt->state= MYSQL_STMT_FETCH_DONE;
SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate,
stmt->mysql->net.last_error);
return(1);
}
if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT)
stmt->mysql->status= MYSQL_STATUS_STMT_RESULT;
if (stmt->mysql->field_count)
rc= madb_alloc_stmt_fields(stmt);
else
{
stmt->upsert_status.affected_rows= stmt->mysql->affected_rows;
stmt->upsert_status.last_insert_id= stmt->mysql->insert_id;
stmt->upsert_status.server_status= stmt->mysql->server_status;
stmt->upsert_status.warning_count= stmt->mysql->warning_count;
}
stmt->field_count= stmt->mysql->field_count;
stmt->result.rows= 0;
return(rc);
}
|
O3
|
c
|
mysql_stmt_next_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x22c37
movl 0x50(%rbx), %eax
cmpl $0x1, %eax
ja 0x22c7d
movl $0x7de, %r15d # imm = 0x7DE
movl %r15d, 0x90(%rdi)
movl $0x297, %edi # imm = 0x297
addq 0x38(%rbx), %rdi
leaq 0x28f01(%rip), %r12 # 0x4bac0
movq (%r12), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%rbx), %rax
xorl %r14d, %r14d
movb %r14b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%rbx), %rdi
leaq 0x28ee5(%rip), %r13 # 0x4bad0
movq 0x70(%r13), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%rbx), %rax
movb %r14b, 0x296(%rax)
movl %r15d, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
movq (%r12), %rsi
movl $0x5, %edx
callq 0x13220
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movq 0x70(%r13), %rsi
jmp 0x22d0a
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x28e71(%rip), %rax # 0x4bac0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28e5c(%rip), %rax # 0x4bad0
movq 0x68(%rax), %rsi
jmp 0x22d0a
movzwl 0x380(%rdi), %ecx
testl $0x1008, %ecx # imm = 0x1008
je 0x22d33
cmpl $0x2, %eax
sete %cl
cmpl $0x6, %eax
setae %al
orb %cl, %al
jne 0x22cb1
movq %rbx, %rdi
movl $0xb, %esi
callq 0x21270
movq 0x38(%rbx), %rdi
movl $0x3, 0x50(%rbx)
callq 0x1a3b5
testl %eax, %eax
je 0x22d3b
movl $0x6, 0x50(%rbx)
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x22d21
movq 0x38(%rbx), %r15
cmpl $0x1, 0x488(%r15)
jne 0x22d58
movl $0x8, 0x488(%r15)
movq 0x38(%rbx), %r15
movl 0x37c(%r15), %eax
testl %eax, %eax
je 0x22dc7
movq 0x340(%rbx), %r14
movl %eax, 0x60(%rbx)
cmpq $0x0, 0x2f8(%r15)
je 0x22e5c
movq %r14, %rdi
xorl %esi, %esi
callq 0x1e797
movq 0x2f8(%r15), %rdi
movl 0x37c(%r15), %esi
movq %r14, %rdx
callq 0x1b856
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x22e02
movl 0x60(%rbx), %eax
imulq $0x70, %rax, %rsi
movq %r14, %rdi
callq 0x1e67f
movq %rax, 0x78(%rbx)
testq %rax, %rax
je 0x22e02
movq %rax, %rdi
movl 0x60(%rbx), %eax
jmp 0x22e60
movq 0x338(%r15), %rax
movq %rax, 0xf8(%rbx)
movq 0x340(%r15), %rax
movq %rax, 0x100(%rbx)
movl 0x380(%r15), %eax
movl %eax, 0xf4(%rbx)
movl 0x388(%r15), %eax
movl %eax, 0xf0(%rbx)
xorl %r14d, %r14d
jmp 0x22e77
movl $0x7d8, 0x108(%rbx) # imm = 0x7D8
leaq 0x30d(%rbx), %rdi
leaq 0x28ca6(%rip), %rax # 0x4bac0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28c91(%rip), %rax # 0x4bad0
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %r14d
jmp 0x22e77
movq 0x78(%rbx), %rdi
movl %eax, %eax
imulq $0x70, %rax, %rdx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x13260
movb $0x0, 0xe8(%rbx)
movq 0x38(%rbx), %rax
movl 0x37c(%rax), %eax
movl %eax, 0x60(%rbx)
movq $0x0, 0xc8(%rbx)
jmp 0x22d21
|
mysql_stmt_next_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+38h]
test rdi, rdi
jz loc_22C37
mov eax, [rbx+50h]
cmp eax, 1
ja loc_22C7D
mov r15d, 7DEh
mov [rdi+90h], r15d
mov edi, 297h
add rdi, [rbx+38h]
lea r12, SQLSTATE_UNKNOWN
mov rsi, [r12]
mov edx, 5
call _strncpy
mov rax, [rbx+38h]
xor r14d, r14d
mov [rax+29Ch], r14b
mov edi, 97h
add rdi, [rbx+38h]
lea r13, client_errors
mov rsi, [r13+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbx+38h]
mov [rax+296h], r14b
mov [rbx+108h], r15d
lea rdi, [rbx+30Dh]
mov rsi, [r12]
mov edx, 5
call _strncpy
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov rsi, [r13+70h]
jmp loc_22D0A
loc_22C37:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
jmp loc_22D0A
loc_22C7D:
movzx ecx, word ptr [rdi+380h]
test ecx, 1008h
jz loc_22D33
cmp eax, 2
setz cl
cmp eax, 6
setnb al
or al, cl
jnz short loc_22CB1
mov rdi, rbx
mov esi, 0Bh
call madb_reset_stmt
mov rdi, [rbx+38h]
loc_22CB1:
mov dword ptr [rbx+50h], 3
call mysql_next_result
test eax, eax
jz short loc_22D3B
mov dword ptr [rbx+50h], 6
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
loc_22D0A:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14d, 1
loc_22D21:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22D33:
mov r14d, 0FFFFFFFFh
jmp short loc_22D21
loc_22D3B:
mov r15, [rbx+38h]
cmp dword ptr [r15+488h], 1
jnz short loc_22D58
mov dword ptr [r15+488h], 8
mov r15, [rbx+38h]
loc_22D58:
mov eax, [r15+37Ch]
test eax, eax
jz short loc_22DC7
mov r14, [rbx+340h]
mov [rbx+60h], eax
cmp qword ptr [r15+2F8h], 0
jz loc_22E5C
mov rdi, r14
xor esi, esi
call ma_free_root
mov rdi, [r15+2F8h]
mov esi, [r15+37Ch]
mov rdx, r14
call ma_duplicate_resultset_metadata
mov [rbx+58h], rax
test rax, rax
jz short loc_22E02
mov eax, [rbx+60h]
imul rsi, rax, 70h ; 'p'
mov rdi, r14
call ma_alloc_root
mov [rbx+78h], rax
test rax, rax
jz short loc_22E02
mov rdi, rax
mov eax, [rbx+60h]
jmp loc_22E60
loc_22DC7:
mov rax, [r15+338h]
mov [rbx+0F8h], rax
mov rax, [r15+340h]
mov [rbx+100h], rax
mov eax, [r15+380h]
mov [rbx+0F4h], eax
mov eax, [r15+388h]
mov [rbx+0F0h], eax
xor r14d, r14d
jmp short loc_22E77
loc_22E02:
mov dword ptr [rbx+108h], 7D8h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14d, 1
jmp short loc_22E77
loc_22E5C:
mov rdi, [rbx+78h]
loc_22E60:
mov eax, eax
imul rdx, rax, 70h ; 'p'
xor r14d, r14d
xor esi, esi
call _memset
mov byte ptr [rbx+0E8h], 0
loc_22E77:
mov rax, [rbx+38h]
mov eax, [rax+37Ch]
mov [rbx+60h], eax
mov qword ptr [rbx+0C8h], 0
jmp loc_22D21
|
long long mysql_stmt_next_result(long long a1)
{
long long v2; // rdi
unsigned int v3; // eax
long long v4; // rdi
char *v5; // rsi
long long v6; // rsi
unsigned int v7; // r14d
long long v9; // r15
unsigned int v10; // eax
long long v11; // r14
long long v12; // rax
char *v13; // rax
char *v14; // rdi
v2 = *(_QWORD *)(a1 + 56);
if ( !v2 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = client_errors[13];
goto LABEL_10;
}
v3 = *(_DWORD *)(a1 + 80);
if ( v3 > 1 )
{
if ( (*(_WORD *)(v2 + 896) & 0x1008) == 0 )
return (unsigned int)-1;
if ( v3 != 2 && v3 < 6 )
{
madb_reset_stmt(a1, 11);
v2 = *(_QWORD *)(a1 + 56);
}
*(_DWORD *)(a1 + 80) = 3;
if ( (unsigned int)mysql_next_result(v2) )
{
*(_DWORD *)(a1 + 80) = 6;
v6 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v6 + 144);
strncpy(a1 + 781, v6 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
goto LABEL_10;
}
v9 = *(_QWORD *)(a1 + 56);
if ( *(_DWORD *)(v9 + 1160) == 1 )
{
*(_DWORD *)(v9 + 1160) = 8;
v9 = *(_QWORD *)(a1 + 56);
}
v10 = *(_DWORD *)(v9 + 892);
if ( v10 )
{
v11 = *(_QWORD *)(a1 + 832);
*(_DWORD *)(a1 + 96) = v10;
if ( !*(_QWORD *)(v9 + 760) )
{
v14 = *(char **)(a1 + 120);
goto LABEL_23;
}
ma_free_root(v11, 0);
v12 = ma_duplicate_resultset_metadata(*(_QWORD *)(v9 + 760), *(unsigned int *)(v9 + 892), v11);
*(_QWORD *)(a1 + 88) = v12;
if ( v12 )
{
v13 = ma_alloc_root(v11, 112LL * *(unsigned int *)(a1 + 96));
*(_QWORD *)(a1 + 120) = v13;
if ( v13 )
{
v14 = v13;
v10 = *(_DWORD *)(a1 + 96);
LABEL_23:
v7 = 0;
memset(v14, 0LL, 112LL * v10);
*(_BYTE *)(a1 + 232) = 0;
goto LABEL_24;
}
}
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[8], 512LL);
*(_BYTE *)(a1 + 779) = 0;
v7 = 1;
}
else
{
*(_QWORD *)(a1 + 248) = *(_QWORD *)(v9 + 824);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(v9 + 832);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(v9 + 896);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(v9 + 904);
v7 = 0;
}
LABEL_24:
*(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL);
*(_QWORD *)(a1 + 200) = 0LL;
return v7;
}
*(_DWORD *)(v2 + 144) = 2014;
strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = client_errors[14];
LABEL_10:
strncpy(v4, v5, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
|
mysql_stmt_next_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00122c37
MOV EAX,dword ptr [RBX + 0x50]
CMP EAX,0x1
JA 0x00122c7d
MOV R15D,0x7de
MOV dword ptr [RDI + 0x90],R15D
MOV EDI,0x297
ADD RDI,qword ptr [RBX + 0x38]
LEA R12,[0x14bac0]
MOV RSI,qword ptr [R12]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBX + 0x38]
XOR R14D,R14D
MOV byte ptr [RAX + 0x29c],R14B
MOV EDI,0x97
ADD RDI,qword ptr [RBX + 0x38]
LEA R13,[0x14bad0]
MOV RSI,qword ptr [R13 + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [RBX + 0x38]
MOV byte ptr [RAX + 0x296],R14B
MOV dword ptr [RBX + 0x108],R15D
LEA RDI,[RBX + 0x30d]
MOV RSI,qword ptr [R12]
MOV EDX,0x5
CALL 0x00113220
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV RSI,qword ptr [R13 + 0x70]
JMP 0x00122d0a
LAB_00122c37:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14bac0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14bad0]
MOV RSI,qword ptr [RAX + 0x68]
JMP 0x00122d0a
LAB_00122c7d:
MOVZX ECX,word ptr [RDI + 0x380]
TEST ECX,0x1008
JZ 0x00122d33
CMP EAX,0x2
SETZ CL
CMP EAX,0x6
SETNC AL
OR AL,CL
JNZ 0x00122cb1
MOV RDI,RBX
MOV ESI,0xb
CALL 0x00121270
MOV RDI,qword ptr [RBX + 0x38]
LAB_00122cb1:
MOV dword ptr [RBX + 0x50],0x3
CALL 0x0011a3b5
TEST EAX,EAX
JZ 0x00122d3b
MOV dword ptr [RBX + 0x50],0x6
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
LAB_00122d0a:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R14D,0x1
LAB_00122d21:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122d33:
MOV R14D,0xffffffff
JMP 0x00122d21
LAB_00122d3b:
MOV R15,qword ptr [RBX + 0x38]
CMP dword ptr [R15 + 0x488],0x1
JNZ 0x00122d58
MOV dword ptr [R15 + 0x488],0x8
MOV R15,qword ptr [RBX + 0x38]
LAB_00122d58:
MOV EAX,dword ptr [R15 + 0x37c]
TEST EAX,EAX
JZ 0x00122dc7
MOV R14,qword ptr [RBX + 0x340]
MOV dword ptr [RBX + 0x60],EAX
CMP qword ptr [R15 + 0x2f8],0x0
JZ 0x00122e5c
MOV RDI,R14
XOR ESI,ESI
CALL 0x0011e797
MOV RDI,qword ptr [R15 + 0x2f8]
MOV ESI,dword ptr [R15 + 0x37c]
MOV RDX,R14
CALL 0x0011b856
MOV qword ptr [RBX + 0x58],RAX
TEST RAX,RAX
JZ 0x00122e02
MOV EAX,dword ptr [RBX + 0x60]
IMUL RSI,RAX,0x70
MOV RDI,R14
CALL 0x0011e67f
MOV qword ptr [RBX + 0x78],RAX
TEST RAX,RAX
JZ 0x00122e02
MOV RDI,RAX
MOV EAX,dword ptr [RBX + 0x60]
JMP 0x00122e60
LAB_00122dc7:
MOV RAX,qword ptr [R15 + 0x338]
MOV qword ptr [RBX + 0xf8],RAX
MOV RAX,qword ptr [R15 + 0x340]
MOV qword ptr [RBX + 0x100],RAX
MOV EAX,dword ptr [R15 + 0x380]
MOV dword ptr [RBX + 0xf4],EAX
MOV EAX,dword ptr [R15 + 0x388]
MOV dword ptr [RBX + 0xf0],EAX
XOR R14D,R14D
JMP 0x00122e77
LAB_00122e02:
MOV dword ptr [RBX + 0x108],0x7d8
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14bac0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14bad0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R14D,0x1
JMP 0x00122e77
LAB_00122e5c:
MOV RDI,qword ptr [RBX + 0x78]
LAB_00122e60:
MOV EAX,EAX
IMUL RDX,RAX,0x70
XOR R14D,R14D
XOR ESI,ESI
CALL 0x00113260
MOV byte ptr [RBX + 0xe8],0x0
LAB_00122e77:
MOV RAX,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RAX + 0x37c]
MOV dword ptr [RBX + 0x60],EAX
MOV qword ptr [RBX + 0xc8],0x0
JMP 0x00122d21
|
int8 mysql_stmt_next_result(long param_1)
{
int iVar1;
uint uVar2;
long lVar3;
void *__s;
char *__src;
int8 uVar4;
lVar3 = *(long *)(param_1 + 0x38);
if (lVar3 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_0014bb38;
LAB_00122d0a:
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
uVar2 = *(uint *)(param_1 + 0x50);
if (uVar2 < 2) {
*(int4 *)(lVar3 + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0014bb40,0x1ff);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Commands_out_of_sync__you_can_t_r_0014bb40;
goto LAB_00122d0a;
}
if ((*(ushort *)(lVar3 + 0x380) & 0x1008) == 0) {
return 0xffffffff;
}
if (uVar2 < 6 && uVar2 != 2) {
madb_reset_stmt(param_1);
lVar3 = *(long *)(param_1 + 0x38);
}
*(int4 *)(param_1 + 0x50) = 3;
iVar1 = mysql_next_result(lVar3);
if (iVar1 != 0) {
*(int4 *)(param_1 + 0x50) = 6;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
__src = (char *)(*(long *)(param_1 + 0x38) + 0x97);
goto LAB_00122d0a;
}
lVar3 = *(long *)(param_1 + 0x38);
if (*(int *)(lVar3 + 0x488) == 1) {
*(int4 *)(lVar3 + 0x488) = 8;
lVar3 = *(long *)(param_1 + 0x38);
}
uVar2 = *(uint *)(lVar3 + 0x37c);
if (uVar2 == 0) {
*(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar3 + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(lVar3 + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar3 + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar3 + 0x388);
uVar4 = 0;
goto LAB_00122e77;
}
uVar4 = *(int8 *)(param_1 + 0x340);
*(uint *)(param_1 + 0x60) = uVar2;
if (*(long *)(lVar3 + 0x2f8) == 0) {
__s = *(void **)(param_1 + 0x78);
LAB_00122e60:
uVar4 = 0;
memset(__s,0,(ulong)uVar2 * 0x70);
*(int1 *)(param_1 + 0xe8) = 0;
}
else {
ma_free_root(uVar4,0);
lVar3 = ma_duplicate_resultset_metadata
(*(int8 *)(lVar3 + 0x2f8),*(int4 *)(lVar3 + 0x37c),uVar4);
*(long *)(param_1 + 0x58) = lVar3;
if (lVar3 != 0) {
__s = (void *)ma_alloc_root(uVar4);
*(void **)(param_1 + 0x78) = __s;
if (__s != (void *)0x0) {
uVar2 = *(uint *)(param_1 + 0x60);
goto LAB_00122e60;
}
}
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_0014bb10,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar4 = 1;
}
LAB_00122e77:
*(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c);
*(int8 *)(param_1 + 200) = 0;
return uVar4;
}
|
|
19,530
|
mbedtls_cipher_set_padding_mode
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher.c
|
int mbedtls_cipher_set_padding_mode(mbedtls_cipher_context_t *ctx,
mbedtls_cipher_padding_t mode)
{
CIPHER_VALIDATE_RET(ctx != NULL);
if (NULL == ctx->cipher_info || MBEDTLS_MODE_CBC != ctx->cipher_info->mode) {
return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
}
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if (ctx->psa_enabled == 1) {
/* While PSA Crypto knows about CBC padding
* schemes, we currently don't make them
* accessible through the cipher layer. */
if (mode != MBEDTLS_PADDING_NONE) {
return MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
}
return 0;
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */
switch (mode) {
#if defined(MBEDTLS_CIPHER_PADDING_PKCS7)
case MBEDTLS_PADDING_PKCS7:
ctx->add_padding = add_pkcs_padding;
ctx->get_padding = get_pkcs_padding;
break;
#endif
#if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS)
case MBEDTLS_PADDING_ONE_AND_ZEROS:
ctx->add_padding = add_one_and_zeros_padding;
ctx->get_padding = get_one_and_zeros_padding;
break;
#endif
#if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN)
case MBEDTLS_PADDING_ZEROS_AND_LEN:
ctx->add_padding = add_zeros_and_len_padding;
ctx->get_padding = get_zeros_and_len_padding;
break;
#endif
#if defined(MBEDTLS_CIPHER_PADDING_ZEROS)
case MBEDTLS_PADDING_ZEROS:
ctx->add_padding = add_zeros_padding;
ctx->get_padding = get_zeros_padding;
break;
#endif
case MBEDTLS_PADDING_NONE:
ctx->add_padding = NULL;
ctx->get_padding = get_no_padding;
break;
default:
return MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
}
return 0;
}
|
O3
|
c
|
mbedtls_cipher_set_padding_mode:
movq (%rdi), %rcx
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
testq %rcx, %rcx
je 0x9a392
cmpl $0x2, 0x4(%rcx)
jne 0x9a392
movl $0xffff9f80, %eax # imm = 0xFFFF9F80
cmpl $0x4, %esi
ja 0x9a392
movl %esi, %eax
leaq 0x496cf(%rip), %rcx # 0xe3a48
movq (%rcx,%rax,8), %rcx
leaq 0x496ec(%rip), %rdx # 0xe3a70
movq (%rdx,%rax,8), %rax
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
xorl %eax, %eax
retq
|
mbedtls_cipher_set_padding_mode:
mov rcx, [rdi]
mov eax, 0FFFF9F00h
test rcx, rcx
jz short locret_9A392
cmp dword ptr [rcx+4], 2
jnz short locret_9A392
mov eax, 0FFFF9F80h
cmp esi, 4
ja short locret_9A392
mov eax, esi
lea rcx, off_E3A48
mov rcx, [rcx+rax*8]
lea rdx, off_E3A70
mov rax, [rdx+rax*8]
mov [rdi+10h], rcx
mov [rdi+18h], rax
xor eax, eax
locret_9A392:
retn
|
long long mbedtls_cipher_set_padding_mode(_QWORD *a1, unsigned int a2)
{
long long result; // rax
long long ( *v3)(); // rax
result = 4294942464LL;
if ( *a1 && *(_DWORD *)(*a1 + 4LL) == 2 )
{
result = 4294942592LL;
if ( a2 <= 4 )
{
v3 = off_E3A70[a2];
a1[2] = off_E3A48[a2];
a1[3] = v3;
return 0LL;
}
}
return result;
}
|
mbedtls_cipher_set_padding_mode:
MOV RCX,qword ptr [RDI]
MOV EAX,0xffff9f00
TEST RCX,RCX
JZ 0x0019a392
CMP dword ptr [RCX + 0x4],0x2
JNZ 0x0019a392
MOV EAX,0xffff9f80
CMP ESI,0x4
JA 0x0019a392
MOV EAX,ESI
LEA RCX,[0x1e3a48]
MOV RCX,qword ptr [RCX + RAX*0x8]
LEA RDX,[0x1e3a70]
MOV RAX,qword ptr [RDX + RAX*0x8]
MOV qword ptr [RDI + 0x10],RCX
MOV qword ptr [RDI + 0x18],RAX
XOR EAX,EAX
LAB_0019a392:
RET
|
int8 mbedtls_cipher_set_padding_mode(long *param_1,uint param_2)
{
int *puVar1;
int8 uVar2;
uVar2 = 0xffff9f00;
if (((*param_1 != 0) && (*(int *)(*param_1 + 4) == 2)) && (uVar2 = 0xffff9f80, param_2 < 5)) {
puVar1 = (&PTR_get_pkcs_padding_001e3a70)[param_2];
param_1[2] = (long)(&PTR_add_pkcs_padding_001e3a48)[param_2];
param_1[3] = (long)puVar1;
uVar2 = 0;
}
return uVar2;
}
|
|
19,531
|
mbedtls_mpi_bitlen
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/bignum.c
|
size_t mbedtls_mpi_bitlen(const mbedtls_mpi *X)
{
size_t i, j;
if (X->n == 0) {
return 0;
}
for (i = X->n - 1; i > 0; i--) {
if (X->p[i] != 0) {
break;
}
}
j = biL - mbedtls_clz(X->p[i]);
return (i * biL) + j;
}
|
O3
|
c
|
mbedtls_mpi_bitlen:
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x7e2ed
movq 0x10(%rdi), %rdx
movq %rsi, %rax
shlq $0x6, %rax
addq $0x40, %rax
decq %rsi
movq %rsi, %rdi
subq $0x1, %rdi
jb 0x7e2f0
movq (%rdx,%rsi,8), %rcx
addq $-0x40, %rax
movq %rdi, %rsi
testq %rcx, %rcx
je 0x7e2d5
jmp 0x7e2f8
xorl %eax, %eax
retq
movq (%rdx), %rcx
movl $0x40, %eax
testq %rcx, %rcx
js 0x7e325
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
xorl %edx, %edx
movq %rdx, %rdi
incq %rdx
cmpq $0x3e, %rdi
ja 0x7e320
shrq %rsi
movq %rsi, %rdi
andq %rcx, %rdi
je 0x7e309
negq %rdx
jmp 0x7e327
xorl %edx, %edx
addq %rdx, %rax
retq
|
mbedtls_mpi_bitlen:
mov rsi, [rdi+8]
test rsi, rsi
jz short loc_7E2ED
mov rdx, [rdi+10h]
mov rax, rsi
shl rax, 6
add rax, 40h ; '@'
dec rsi
mov rdi, rsi
loc_7E2D5:
sub rdi, 1
jb short loc_7E2F0
mov rcx, [rdx+rsi*8]
add rax, 0FFFFFFFFFFFFFFC0h
mov rsi, rdi
test rcx, rcx
jz short loc_7E2D5
jmp short loc_7E2F8
loc_7E2ED:
xor eax, eax
retn
loc_7E2F0:
mov rcx, [rdx]
mov eax, 40h ; '@'
loc_7E2F8:
test rcx, rcx
js short loc_7E325
mov rsi, 8000000000000000h
xor edx, edx
loc_7E309:
mov rdi, rdx
inc rdx
cmp rdi, 3Eh ; '>'
ja short loc_7E320
shr rsi, 1
mov rdi, rsi
and rdi, rcx
jz short loc_7E309
loc_7E320:
neg rdx
jmp short loc_7E327
loc_7E325:
xor edx, edx
loc_7E327:
add rax, rdx
retn
|
long long mbedtls_mpi_bitlen(long long a1)
{
long long v1; // rsi
long long *v2; // rdx
long long v3; // rax
long long v4; // rsi
long long v5; // rdi
long long v7; // rcx
unsigned long long v9; // rsi
unsigned long long v10; // rdx
unsigned long long v11; // rdi
long long v12; // rdx
v1 = *(_QWORD *)(a1 + 8);
if ( !v1 )
return 0LL;
v2 = *(long long **)(a1 + 16);
v3 = (v1 << 6) + 64;
v4 = v1 - 1;
v5 = v4;
while ( v5-- != 0 )
{
v7 = v2[v4];
v3 -= 64LL;
v4 = v5;
if ( v7 )
goto LABEL_8;
}
v7 = *v2;
v3 = 64LL;
LABEL_8:
if ( v7 < 0 )
{
v12 = 0LL;
}
else
{
v9 = 0x8000000000000000LL;
v10 = 0LL;
do
{
v11 = v10++;
if ( v11 > 0x3E )
break;
v9 >>= 1;
}
while ( (v7 & v9) == 0 );
v12 = -(long long)v10;
}
return v12 + v3;
}
|
mbedtls_mpi_bitlen:
MOV RSI,qword ptr [RDI + 0x8]
TEST RSI,RSI
JZ 0x0017e2ed
MOV RDX,qword ptr [RDI + 0x10]
MOV RAX,RSI
SHL RAX,0x6
ADD RAX,0x40
DEC RSI
MOV RDI,RSI
LAB_0017e2d5:
SUB RDI,0x1
JC 0x0017e2f0
MOV RCX,qword ptr [RDX + RSI*0x8]
ADD RAX,-0x40
MOV RSI,RDI
TEST RCX,RCX
JZ 0x0017e2d5
JMP 0x0017e2f8
LAB_0017e2ed:
XOR EAX,EAX
RET
LAB_0017e2f0:
MOV RCX,qword ptr [RDX]
MOV EAX,0x40
LAB_0017e2f8:
TEST RCX,RCX
JS 0x0017e325
MOV RSI,-0x8000000000000000
XOR EDX,EDX
LAB_0017e309:
MOV RDI,RDX
INC RDX
CMP RDI,0x3e
JA 0x0017e320
SHR RSI,0x1
MOV RDI,RSI
AND RDI,RCX
JZ 0x0017e309
LAB_0017e320:
NEG RDX
JMP 0x0017e327
LAB_0017e325:
XOR EDX,EDX
LAB_0017e327:
ADD RAX,RDX
RET
|
long mbedtls_mpi_bitlen(long param_1)
{
long lVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
long lVar6;
lVar6 = *(long *)(param_1 + 8);
if (lVar6 == 0) {
return 0;
}
lVar1 = lVar6 * 0x40 + 0x40;
do {
lVar6 = lVar6 + -1;
if (lVar6 == 0) {
uVar2 = **(ulong **)(param_1 + 0x10);
lVar1 = 0x40;
break;
}
uVar2 = (*(ulong **)(param_1 + 0x10))[lVar6];
lVar1 = lVar1 + -0x40;
} while (uVar2 == 0);
if ((long)uVar2 < 0) {
lVar6 = 0;
}
else {
uVar5 = 0x8000000000000000;
uVar3 = 0;
do {
uVar4 = uVar3 + 1;
if (0x3e < uVar3) break;
uVar5 = uVar5 >> 1;
uVar3 = uVar4;
} while ((uVar5 & uVar2) == 0);
lVar6 = -uVar4;
}
return lVar1 + lVar6;
}
|
|
19,532
|
diff
|
eloqsql/strings/dtoa.c
|
static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int i, wa, wb;
ULong *xa, *xae, *xb, *xbe, *xc;
ULLong borrow, y;
i= cmp(a,b);
if (!i)
{
c= Balloc(0, alloc);
c->wds= 1;
c->p.x[0]= 0;
return c;
}
if (i < 0)
{
c= a;
a= b;
b= c;
i= 1;
}
else
i= 0;
c= Balloc(a->k, alloc);
c->sign= i;
wa= a->wds;
xa= a->p.x;
xae= xa + wa;
wb= b->wds;
xb= b->p.x;
xbe= xb + wb;
xc= c->p.x;
borrow= 0;
do
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
c->wds= wa;
return c;
}
|
O3
|
c
|
diff:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %eax
movslq 0x14(%rsi), %rdi
subl %edi, %eax
jne 0xdbffb
movq (%rbx), %rax
leaq (%rax,%rdi,4), %rcx
movq (%rsi), %r8
leaq (%r8,%rdi,4), %rdi
addq $-0x4, %rdi
movl -0x4(%rcx), %r8d
movl (%rdi), %r9d
cmpl %r9d, %r8d
jne 0xdbff1
addq $-0x4, %rcx
addq $-0x4, %rdi
cmpq %rax, %rcx
ja 0xdbfb9
xorl %edi, %edi
movq %rdx, %rsi
callq 0xdba78
movl $0x1, 0x14(%rax)
movq (%rax), %rcx
movl $0x0, (%rcx)
jmp 0xdc097
xorl %eax, %eax
cmpl %r9d, %r8d
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, %r14d
shrl $0x1f, %r14d
testl %eax, %eax
movq %rsi, %r15
cmovsq %rbx, %r15
cmovsq %rsi, %rbx
movl 0x8(%rbx), %edi
movq %rdx, %rsi
callq 0xdba78
movl %r14d, 0x10(%rax)
movslq 0x14(%rbx), %rcx
movq (%rbx), %r8
movslq 0x14(%r15), %rdx
movq (%r15), %r9
leaq (%r9,%rdx,4), %r10
movq (%rax), %rdx
xorl %edi, %edi
movq %r8, %rsi
movl (%r9), %r11d
addq %rdi, %r11
movl (%rsi), %edi
addq $0x4, %rsi
addq $0x4, %r9
subq %r11, %rdi
movl %edi, (%rdx)
shrq $0x20, %rdi
andl $0x1, %edi
addq $0x4, %rdx
cmpq %r10, %r9
jb 0xdc038
leaq (%r8,%rcx,4), %r8
cmpq %r8, %rsi
jae 0xdc083
movl (%rsi), %r9d
addq $0x4, %rsi
subq %rdi, %r9
movq %r9, %rdi
shrq $0x20, %rdi
andl $0x1, %edi
movl %r9d, (%rdx)
addq $0x4, %rdx
jmp 0xdc061
incl %ecx
addq $-0x4, %rdx
decl %ecx
cmpl $0x0, (%rdx)
leaq -0x4(%rdx), %rdx
je 0xdc089
movl %ecx, 0x14(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
diff:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+14h]
movsxd rdi, dword ptr [rsi+14h]
sub eax, edi
jnz short loc_DBFFB
mov rax, [rbx]
lea rcx, [rax+rdi*4]
mov r8, [rsi]
lea rdi, [r8+rdi*4]
add rdi, 0FFFFFFFFFFFFFFFCh
loc_DBFB9:
mov r8d, [rcx-4]
mov r9d, [rdi]
cmp r8d, r9d
jnz short loc_DBFF1
add rcx, 0FFFFFFFFFFFFFFFCh
add rdi, 0FFFFFFFFFFFFFFFCh
cmp rcx, rax
ja short loc_DBFB9
xor edi, edi
mov rsi, rdx
call Balloc
mov dword ptr [rax+14h], 1
mov rcx, [rax]
mov dword ptr [rcx], 0
jmp loc_DC097
loc_DBFF1:
xor eax, eax
cmp r8d, r9d
sbb eax, eax
or eax, 1
loc_DBFFB:
mov r14d, eax
shr r14d, 1Fh
test eax, eax
mov r15, rsi
cmovs r15, rbx
cmovs rbx, rsi
mov edi, [rbx+8]
mov rsi, rdx
call Balloc
mov [rax+10h], r14d
movsxd rcx, dword ptr [rbx+14h]
mov r8, [rbx]
movsxd rdx, dword ptr [r15+14h]
mov r9, [r15]
lea r10, [r9+rdx*4]
mov rdx, [rax]
xor edi, edi
mov rsi, r8
loc_DC038:
mov r11d, [r9]
add r11, rdi
mov edi, [rsi]
add rsi, 4
add r9, 4
sub rdi, r11
mov [rdx], edi
shr rdi, 20h
and edi, 1
add rdx, 4
cmp r9, r10
jb short loc_DC038
lea r8, [r8+rcx*4]
loc_DC061:
cmp rsi, r8
jnb short loc_DC083
mov r9d, [rsi]
add rsi, 4
sub r9, rdi
mov rdi, r9
shr rdi, 20h
and edi, 1
mov [rdx], r9d
add rdx, 4
jmp short loc_DC061
loc_DC083:
inc ecx
add rdx, 0FFFFFFFFFFFFFFFCh
loc_DC089:
dec ecx
cmp dword ptr [rdx], 0
lea rdx, [rdx-4]
jz short loc_DC089
mov [rax+14h], ecx
loc_DC097:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long diff(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int **v3; // rbx
int v4; // eax
long long v5; // rdi
int v6; // eax
unsigned long long v7; // rcx
unsigned int *i; // rdi
unsigned int v9; // r8d
long long result; // rax
unsigned int v11; // r14d
unsigned int **v12; // r15
long long v13; // rcx
unsigned int *v14; // r8
unsigned int *v15; // r9
unsigned long long v16; // r10
_DWORD *v17; // rdx
long long v18; // rdi
unsigned int *v19; // rsi
long long v20; // r11
long long v21; // rdi
long long v22; // rdi
unsigned long long v23; // r8
long long v24; // r9
long long v25; // r9
int v26; // ecx
_DWORD *v27; // rdx
v3 = a1;
v4 = *((_DWORD *)a1 + 5);
v5 = *((int *)a2 + 5);
v6 = v4 - v5;
if ( !v6 )
{
v7 = (unsigned long long)&(*v3)[v5];
for ( i = &(*a2)[v5 - 1]; ; --i )
{
v9 = *(_DWORD *)(v7 - 4);
if ( v9 != *i )
break;
v7 -= 4LL;
if ( v7 <= (unsigned long long)*v3 )
{
result = Balloc(0, a3);
*(_DWORD *)(result + 20) = 1;
**(_DWORD **)result = 0;
return result;
}
}
v6 = v9 < *i ? -1 : 1;
}
v11 = (unsigned int)v6 >> 31;
v12 = a2;
if ( v6 < 0 )
{
v12 = v3;
v3 = a2;
}
result = Balloc(*((_DWORD *)v3 + 2), a3);
*(_DWORD *)(result + 16) = v11;
v13 = *((int *)v3 + 5);
v14 = *v3;
v15 = *v12;
v16 = (unsigned long long)&(*v12)[*((int *)v12 + 5)];
v17 = *(_DWORD **)result;
v18 = 0LL;
v19 = *v3;
do
{
v20 = v18 + *v15;
v21 = *v19++;
++v15;
v22 = v21 - v20;
*v17 = v22;
v18 = BYTE4(v22) & 1;
++v17;
}
while ( (unsigned long long)v15 < v16 );
v23 = (unsigned long long)&v14[v13];
while ( (unsigned long long)v19 < v23 )
{
v24 = *v19++;
v25 = v24 - v18;
v18 = BYTE4(v25) & 1;
*v17++ = v25;
}
v26 = v13 + 1;
v27 = v17 - 1;
do
--v26;
while ( *v27-- == 0 );
*(_DWORD *)(result + 20) = v26;
return result;
}
|
diff:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x14]
MOVSXD RDI,dword ptr [RSI + 0x14]
SUB EAX,EDI
JNZ 0x001dbffb
MOV RAX,qword ptr [RBX]
LEA RCX,[RAX + RDI*0x4]
MOV R8,qword ptr [RSI]
LEA RDI,[R8 + RDI*0x4]
ADD RDI,-0x4
LAB_001dbfb9:
MOV R8D,dword ptr [RCX + -0x4]
MOV R9D,dword ptr [RDI]
CMP R8D,R9D
JNZ 0x001dbff1
ADD RCX,-0x4
ADD RDI,-0x4
CMP RCX,RAX
JA 0x001dbfb9
XOR EDI,EDI
MOV RSI,RDX
CALL 0x001dba78
MOV dword ptr [RAX + 0x14],0x1
MOV RCX,qword ptr [RAX]
MOV dword ptr [RCX],0x0
JMP 0x001dc097
LAB_001dbff1:
XOR EAX,EAX
CMP R8D,R9D
SBB EAX,EAX
OR EAX,0x1
LAB_001dbffb:
MOV R14D,EAX
SHR R14D,0x1f
TEST EAX,EAX
MOV R15,RSI
CMOVS R15,RBX
CMOVS RBX,RSI
MOV EDI,dword ptr [RBX + 0x8]
MOV RSI,RDX
CALL 0x001dba78
MOV dword ptr [RAX + 0x10],R14D
MOVSXD RCX,dword ptr [RBX + 0x14]
MOV R8,qword ptr [RBX]
MOVSXD RDX,dword ptr [R15 + 0x14]
MOV R9,qword ptr [R15]
LEA R10,[R9 + RDX*0x4]
MOV RDX,qword ptr [RAX]
XOR EDI,EDI
MOV RSI,R8
LAB_001dc038:
MOV R11D,dword ptr [R9]
ADD R11,RDI
MOV EDI,dword ptr [RSI]
ADD RSI,0x4
ADD R9,0x4
SUB RDI,R11
MOV dword ptr [RDX],EDI
SHR RDI,0x20
AND EDI,0x1
ADD RDX,0x4
CMP R9,R10
JC 0x001dc038
LEA R8,[R8 + RCX*0x4]
LAB_001dc061:
CMP RSI,R8
JNC 0x001dc083
MOV R9D,dword ptr [RSI]
ADD RSI,0x4
SUB R9,RDI
MOV RDI,R9
SHR RDI,0x20
AND EDI,0x1
MOV dword ptr [RDX],R9D
ADD RDX,0x4
JMP 0x001dc061
LAB_001dc083:
INC ECX
ADD RDX,-0x4
LAB_001dc089:
DEC ECX
CMP dword ptr [RDX],0x0
LEA RDX,[RDX + -0x4]
JZ 0x001dc089
MOV dword ptr [RAX + 0x14],ECX
LAB_001dc097:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void diff(ulong *param_1,ulong *param_2,int8 param_3)
{
uint uVar1;
uint *puVar2;
uint uVar3;
int8 *puVar4;
int iVar5;
ulong uVar6;
int *piVar7;
ulong *puVar8;
uint *puVar9;
uint *puVar10;
long lVar11;
uint *puVar12;
iVar5 = *(int *)((long)param_2 + 0x14);
uVar3 = *(int *)((long)param_1 + 0x14) - iVar5;
if (uVar3 == 0) {
uVar6 = *param_1 + (long)iVar5 * 4;
puVar10 = (uint *)(*param_2 + (long)iVar5 * 4);
do {
puVar10 = puVar10 + -1;
if (*(uint *)(uVar6 - 4) != *puVar10) {
uVar3 = -(uint)(*(uint *)(uVar6 - 4) < *puVar10) | 1;
goto LAB_001dbffb;
}
uVar6 = uVar6 - 4;
} while (*param_1 < uVar6);
puVar4 = (int8 *)Balloc(0,param_3);
*(int4 *)((long)puVar4 + 0x14) = 1;
*(int4 *)*puVar4 = 0;
}
else {
LAB_001dbffb:
puVar8 = param_1;
if ((int)uVar3 < 0) {
puVar8 = param_2;
param_2 = param_1;
}
puVar4 = (int8 *)Balloc((int)puVar8[1],param_3);
*(uint *)(puVar4 + 2) = uVar3 >> 0x1f;
iVar5 = *(int *)((long)puVar8 + 0x14);
puVar2 = (uint *)*puVar8;
puVar12 = (uint *)*param_2;
puVar10 = puVar12 + *(int *)((long)param_2 + 0x14);
piVar7 = (int *)*puVar4;
uVar6 = 0;
puVar9 = puVar2;
do {
uVar3 = *puVar12;
uVar1 = *puVar9;
puVar9 = puVar9 + 1;
puVar12 = puVar12 + 1;
lVar11 = (ulong)uVar1 - (uVar3 + uVar6);
*piVar7 = (int)lVar11;
uVar6 = (ulong)((uint)((ulong)lVar11 >> 0x20) & 1);
piVar7 = piVar7 + 1;
} while (puVar12 < puVar10);
for (; puVar9 < puVar2 + iVar5; puVar9 = puVar9 + 1) {
lVar11 = *puVar9 - uVar6;
uVar6 = (ulong)((uint)((ulong)lVar11 >> 0x20) & 1);
*piVar7 = (int)lVar11;
piVar7 = piVar7 + 1;
}
iVar5 = iVar5 + 1;
do {
piVar7 = piVar7 + -1;
iVar5 = iVar5 + -1;
} while (*piVar7 == 0);
*(int *)((long)puVar4 + 0x14) = iVar5;
}
return;
}
|
|
19,533
|
blst_p2_mult
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c
|
void blst_p2_mult(POINTonE2 *out, const POINTonE2 *a,
const byte *scalar, size_t nbits)
{
if (nbits < 144) {
if (nbits)
POINTonE2_mult_w4(out, a, scalar, nbits);
else
vec_zero(out, sizeof(*out));
} else if (nbits <= 256) {
union { vec256 l; pow256 s; } val;
size_t i, j, top, mask = (size_t)0 - 1;
/* this is not about constant-time-ness, but branch optimization */
for (top = (nbits + 7)/8, i=0, j=0; i<sizeof(val.s);) {
val.s[i++] = scalar[j] & mask;
mask = 0 - ((i - top) >> (8*sizeof(top)-1));
j += 1 & mask;
}
if (check_mod_256(val.s, BLS12_381_r)) /* z^4 is the formal limit */
POINTonE2_mult_gls(out, a, val.s);
else /* should never be the case, added for formal completeness */
POINTonE2_mult_w5(out, a, scalar, nbits);
vec_zero(val.l, sizeof(val));
} else { /* should never be the case, added for formal completeness */
POINTonE2_mult_w5(out, a, scalar, nbits);
}
}
|
O3
|
c
|
blst_p2_mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x8f, %rcx
ja 0x1d981
testq %r14, %r14
je 0x1da00
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1da4b
cmpq $0x100, %r14 # imm = 0x100
ja 0x1d9e3
leaq 0x7(%r14), %rax
shrq $0x3, %rax
movb $-0x1, %sil
movl $0x1, %ecx
xorl %edx, %edx
andb (%r12,%rdx), %sil
movb %sil, -0x41(%rbp,%rcx)
xorl %esi, %esi
cmpq %rax, %rcx
setb %sil
addq %rsi, %rdx
negb %sil
incq %rcx
cmpq $0x21, %rcx
jne 0x1d99c
leaq 0x21eec(%rip), %rsi # 0x3f8b0
leaq -0x40(%rbp), %rdi
callq 0x36080
testq %rax, %rax
je 0x1da15
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1dc95
jmp 0x1da26
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1e11b
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0x24, %rax
jne 0x1da02
jmp 0x1da3e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1e11b
xorl %eax, %eax
movq $0x0, -0x40(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x1da28
leaq -0x40(%rbp), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
blst_p2_mult:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
cmp rcx, 8Fh
ja short loc_1D981
test r14, r14
jz loc_1DA00
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp POINTonE2_mult_w4
loc_1D981:
cmp r14, 100h
ja short loc_1D9E3
lea rax, [r14+7]
shr rax, 3
mov sil, 0FFh
mov ecx, 1
xor edx, edx
loc_1D99C:
and sil, [r12+rdx]
mov [rbp+rcx+var_41], sil
xor esi, esi
cmp rcx, rax
setb sil
add rdx, rsi
neg sil
inc rcx
cmp rcx, 21h ; '!'
jnz short loc_1D99C
lea rsi, BLS12_381_r
lea rdi, [rbp+var_40]
call check_mod_256
test rax, rax
jz short loc_1DA15
lea rdx, [rbp+var_40]
mov rdi, rbx
mov rsi, r15
call POINTonE2_mult_gls
jmp short loc_1DA26
loc_1D9E3:
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp POINTonE2_mult_w5
loc_1DA00:
xor eax, eax
loc_1DA02:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 24h ; '$'
jnz short loc_1DA02
jmp short loc_1DA3E
loc_1DA15:
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
call POINTonE2_mult_w5
loc_1DA26:
xor eax, eax
loc_1DA28:
mov [rbp+rax*8+var_40], 0
inc rax
cmp rax, 4
jnz short loc_1DA28
lea rax, [rbp+var_40]
loc_1DA3E:
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long blst_p2_mult(long long a1, long long a2, long long a3, unsigned long long a4)
{
long long result; // rax
unsigned long long v8; // rax
char v9; // si
unsigned long long v10; // rcx
long long v11; // rdx
long long v12; // rsi
long long i; // rax
char v14; // [rsp+1h] [rbp-41h]
_QWORD v15[8]; // [rsp+2h] [rbp-40h] BYREF
if ( a4 > 0x8F )
{
if ( a4 > 0x100 )
{
return POINTonE2_mult_w5(a1, a2, a3, a4);
}
else
{
v8 = (a4 + 7) >> 3;
v9 = -1;
v10 = 1LL;
v11 = 0LL;
do
{
*(&v14 + v10) = *(_BYTE *)(a3 + v11) & v9;
v12 = v10 < v8;
v11 += v12;
v9 = -(char)v12;
++v10;
}
while ( v10 != 33 );
if ( check_mod_256(v15, &BLS12_381_r, v11) )
POINTonE2_mult_gls(a1, a2, v15);
else
POINTonE2_mult_w5(a1, a2, a3, a4);
for ( i = 0LL; i != 4; ++i )
v15[i] = 0LL;
return (long long)v15;
}
}
else if ( a4 )
{
return POINTonE2_mult_w4(a1, a2, a3, a4);
}
else
{
for ( result = 0LL; result != 36; ++result )
*(_QWORD *)(a1 + 8 * result) = 0LL;
}
return result;
}
|
blst_p2_mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
CMP RCX,0x8f
JA 0x0011d981
TEST R14,R14
JZ 0x0011da00
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011da4b
LAB_0011d981:
CMP R14,0x100
JA 0x0011d9e3
LEA RAX,[R14 + 0x7]
SHR RAX,0x3
MOV SIL,0xff
MOV ECX,0x1
XOR EDX,EDX
LAB_0011d99c:
AND SIL,byte ptr [R12 + RDX*0x1]
MOV byte ptr [RBP + RCX*0x1 + -0x41],SIL
XOR ESI,ESI
CMP RCX,RAX
SETC SIL
ADD RDX,RSI
NEG SIL
INC RCX
CMP RCX,0x21
JNZ 0x0011d99c
LEA RSI,[0x13f8b0]
LEA RDI,[RBP + -0x40]
CALL 0x00136080
TEST RAX,RAX
JZ 0x0011da15
LEA RDX,[RBP + -0x40]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011dc95
JMP 0x0011da26
LAB_0011d9e3:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011e11b
LAB_0011da00:
XOR EAX,EAX
LAB_0011da02:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0x24
JNZ 0x0011da02
JMP 0x0011da3e
LAB_0011da15:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
CALL 0x0011e11b
LAB_0011da26:
XOR EAX,EAX
LAB_0011da28:
MOV qword ptr [RBP + RAX*0x8 + -0x40],0x0
INC RAX
CMP RAX,0x4
JNZ 0x0011da28
LEA RAX,[RBP + -0x40]
LAB_0011da3e:
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
byte * blst_p2_mult(long param_1,int8 param_2,long param_3,ulong param_4)
{
byte *pbVar1;
long lVar2;
ulong uVar3;
byte bVar4;
bool bVar5;
int8 uStack_50;
byte local_48 [32];
if (param_4 < 0x90) {
if (param_4 != 0) {
pbVar1 = (byte *)POINTonE2_mult_w4(param_1,param_2,param_3,param_4);
return pbVar1;
}
lVar2 = 0;
do {
*(int8 *)(param_1 + lVar2 * 8) = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x24);
pbVar1 = (byte *)0x24;
}
else {
if (0x100 < param_4) {
pbVar1 = (byte *)POINTonE2_mult_w5(param_1,param_2,param_3,param_4);
return pbVar1;
}
bVar4 = 0xff;
uVar3 = 1;
lVar2 = 0;
do {
local_48[uVar3 - 1] = bVar4 & *(byte *)(param_3 + lVar2);
bVar5 = uVar3 < param_4 + 7 >> 3;
lVar2 = lVar2 + (ulong)bVar5;
bVar4 = -bVar5;
uVar3 = uVar3 + 1;
} while (uVar3 != 0x21);
uStack_50 = 0x11d9cd;
lVar2 = check_mod_256(local_48,BLS12_381_r);
if (lVar2 == 0) {
uStack_50 = 0x11da26;
POINTonE2_mult_w5(param_1,param_2,param_3,param_4);
}
else {
uStack_50 = 0x11d9e1;
POINTonE2_mult_gls(param_1,param_2,local_48);
}
lVar2 = 0;
do {
pbVar1 = local_48 + lVar2 * 8;
pbVar1[0] = 0;
pbVar1[1] = 0;
pbVar1[2] = 0;
pbVar1[3] = 0;
pbVar1[4] = 0;
pbVar1[5] = 0;
pbVar1[6] = 0;
pbVar1[7] = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 4);
pbVar1 = local_48;
}
return pbVar1;
}
|
|
19,534
|
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&)
|
monkey531[P]llama/common/minja.hpp
|
TemplateToken(Type type, const Location & location, SpaceHandling pre, SpaceHandling post) : type(type), location(location), pre_space(pre), post_space(post) {}
|
O3
|
cpp
|
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&):
leaq 0x91d35(%rip), %rax # 0x12e2e8
addq $0x10, %rax
movq %rax, (%rdi)
movl $0xd, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x9c5eb
movq 0x9399c(%rip), %r10 # 0x12ff78
cmpb $0x0, (%r10)
je 0x9c5e7
incl 0x8(%rax)
jmp 0x9c5eb
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rdi)
movl %edx, 0x28(%rdi)
movl %ecx, 0x2c(%rdi)
leaq 0x927d8(%rip), %rax # 0x12edd8
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
movups (%r8), %xmm0
movq %rax, 0x8(%r8)
movups %xmm0, 0x30(%rdi)
movq %rax, (%r8)
movups (%r9), %xmm0
movups %xmm0, 0x40(%rdi)
movq 0x10(%r9), %rcx
movq %rcx, 0x50(%rdi)
movq %rax, 0x10(%r9)
xorps %xmm0, %xmm0
movups %xmm0, (%r9)
retq
|
_ZN5minja18MacroTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_INS_10ExpressionEEESaISJ_EE:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rdi], rax
mov dword ptr [rdi+8], 0Dh
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_9C5EB
mov r10, cs:__libc_single_threaded_ptr
cmp byte ptr [r10], 0
jz short loc_9C5E7
inc dword ptr [rax+8]
jmp short loc_9C5EB
loc_9C5E7:
lock inc dword ptr [rax+8]
loc_9C5EB:
mov rax, [rsi+10h]
mov [rdi+20h], rax
mov [rdi+28h], edx
mov [rdi+2Ch], ecx
lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [r8]
mov [r8+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [r8], rax
movups xmm0, xmmword ptr [r9]
movups xmmword ptr [rdi+40h], xmm0
mov rcx, [r9+10h]
mov [rdi+50h], rcx
mov [r9+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r9], xmm0
retn
|
long long minja::MacroTemplateToken::MacroTemplateToken(
long long a1,
_QWORD *a2,
int a3,
int a4,
__int128 *a5,
long long a6)
{
long long v6; // rax
long long result; // rax
__int128 v8; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 13;
*(_QWORD *)(a1 + 16) = *a2;
v6 = a2[1];
*(_QWORD *)(a1 + 24) = v6;
if ( v6 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v6 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v6 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::MacroTemplateToken + 2;
result = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a5 = 0LL;
*(_OWORD *)(a1 + 64) = *(_OWORD *)a6;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(a6 + 16);
*(_QWORD *)(a6 + 16) = 0LL;
*(_OWORD *)a6 = 0LL;
return result;
}
|
MacroTemplateToken:
LEA RAX,[0x22e2e8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV dword ptr [RDI + 0x8],0xd
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x0019c5eb
MOV R10,qword ptr [0x0022ff78]
CMP byte ptr [R10],0x0
JZ 0x0019c5e7
INC dword ptr [RAX + 0x8]
JMP 0x0019c5eb
LAB_0019c5e7:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019c5eb:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x20],RAX
MOV dword ptr [RDI + 0x28],EDX
MOV dword ptr [RDI + 0x2c],ECX
LEA RAX,[0x22edd8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [R8]
MOV qword ptr [R8 + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [R8],RAX
MOVUPS XMM0,xmmword ptr [R9]
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV RCX,qword ptr [R9 + 0x10]
MOV qword ptr [RDI + 0x50],RCX
MOV qword ptr [R9 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R9],XMM0
RET
|
/* minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&,
std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >,
std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&) */
void __thiscall
minja::MacroTemplateToken::MacroTemplateToken
(MacroTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
int8 *param_5,int8 *param_6)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR__TemplateToken_0022e2f8;
*(int4 *)(this + 8) = 0xd;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022ff78 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__MacroTemplateToken_0022ede8;
*(int8 *)(this + 0x38) = 0;
uVar2 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar2;
*param_5 = 0;
uVar2 = param_6[1];
*(int8 *)(this + 0x40) = *param_6;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)(this + 0x50) = param_6[2];
param_6[2] = 0;
*param_6 = 0;
param_6[1] = 0;
return;
}
|
|
19,535
|
ma_gets
|
eloqsql/libmariadb/libmariadb/ma_io.c
|
char *ma_gets(char *ptr, size_t size, MA_FILE *file)
{
if (!file)
return NULL;
switch (file->type) {
case MA_FILE_LOCAL:
return fgets(ptr, (int)size, (FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mgets(ptr, size, file);
break;
#endif
default:
return NULL;
}
}
|
O3
|
c
|
ma_gets:
pushq %rbp
movq %rsp, %rbp
testq %rdx, %rdx
je 0x2aa76
movl (%rdx), %eax
cmpl $0x2, %eax
je 0x2aa7a
cmpl $0x1, %eax
jne 0x2aa76
movq 0x8(%rdx), %rdx
popq %rbp
jmp 0x13710
xorl %eax, %eax
popq %rbp
retq
leaq 0x250ef(%rip), %rax # 0x4fb70
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x20(%rax), %rax
popq %rbp
jmpq *%rax
nop
|
ma_gets:
push rbp
mov rbp, rsp
test rdx, rdx
jz short loc_2AA76
mov eax, [rdx]
cmp eax, 2
jz short loc_2AA7A
cmp eax, 1
jnz short loc_2AA76
mov rdx, [rdx+8]
pop rbp
jmp _fgets
loc_2AA76:
xor eax, eax
pop rbp
retn
loc_2AA7A:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+20h]
pop rbp
jmp rax
|
long long ma_gets(long long a1, long long a2, long long a3)
{
if ( !a3 )
return 0LL;
if ( *(_DWORD *)a3 != 2 )
{
if ( *(_DWORD *)a3 == 1 )
return fgets(a1, a2, *(_QWORD *)(a3 + 8));
return 0LL;
}
return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 32LL))();
}
|
ma_gets:
PUSH RBP
MOV RBP,RSP
TEST RDX,RDX
JZ 0x0012aa76
MOV EAX,dword ptr [RDX]
CMP EAX,0x2
JZ 0x0012aa7a
CMP EAX,0x1
JNZ 0x0012aa76
MOV RDX,qword ptr [RDX + 0x8]
POP RBP
JMP 0x00113710
LAB_0012aa76:
XOR EAX,EAX
POP RBP
RET
LAB_0012aa7a:
LEA RAX,[0x14fb70]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x20]
POP RBP
JMP RAX
|
char * ma_gets(char *param_1,int param_2,int *param_3)
{
char *pcVar1;
if (param_3 != (int *)0x0) {
if (*param_3 == 2) {
/* WARNING: Could not recover jumptable at 0x0012aa8d. Too many branches */
/* WARNING: Treating indirect jump as call */
pcVar1 = (char *)(**(code **)(*(long *)(rio_plugin + 0x58) + 0x20))();
return pcVar1;
}
if (*param_3 == 1) {
pcVar1 = fgets(param_1,param_2,*(FILE **)(param_3 + 2));
return pcVar1;
}
}
return (char *)0x0;
}
|
|
19,536
|
set_process_priority(ggml_sched_priority)
|
monkey531[P]llama/common/common.cpp
|
bool set_process_priority(enum ggml_sched_priority prio) {
if (prio == GGML_SCHED_PRIO_NORMAL) {
return true;
}
int p = 0;
switch (prio) {
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
case GGML_SCHED_PRIO_HIGH: p = -10; break;
case GGML_SCHED_PRIO_REALTIME: p = -20; break;
}
if (!setpriority(PRIO_PROCESS, 0, p)) {
LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno);
return false;
}
return true;
}
|
O2
|
cpp
|
set_process_priority(ggml_sched_priority):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x3, %edi
ja 0x54b4e
movl %ebx, %eax
leaq 0x5f14d(%rip), %rcx # 0xb3c80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, %bpl
jmp 0x54ba2
pushq $-0xa
jmp 0x54b4b
pushq $-0x14
jmp 0x54b4b
pushq $-0x5
popq %rdx
jmp 0x54b50
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0x23220
testl %eax, %eax
setne %bpl
jne 0x54ba2
leaq 0xab9c0(%rip), %rax # 0x100528
cmpl $0x0, (%rax)
js 0x54ba2
callq 0x9813a
movq %rax, %r14
callq 0x23050
movq %rax, %r15
movl (%rax), %edi
callq 0x232c0
movl (%r15), %r9d
leaq 0x5f4f4(%rip), %rdx # 0xb4082
xorl %ebp, %ebp
pushq $0x3
popq %rsi
movq %r14, %rdi
movl %ebx, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x981d2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_Z20set_process_priority19ggml_sched_priority:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, edi
cmp edi, 3; switch 4 cases
ja short def_54B3A; jumptable 0000000000054B3A default case
mov eax, ebx
lea rcx, jpt_54B3A
movsxd rax, ds:(jpt_54B3A - 0B3C80h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_54B3C:
mov bpl, 1; jumptable 0000000000054B3A case 0
jmp short loc_54BA2
loc_54B41:
push 0FFFFFFFFFFFFFFF6h; jumptable 0000000000054B3A case 2
jmp short loc_54B4B
loc_54B45:
push 0FFFFFFFFFFFFFFECh; jumptable 0000000000054B3A case 3
jmp short loc_54B4B
loc_54B49:
push 0FFFFFFFFFFFFFFFBh; jumptable 0000000000054B3A case 1
loc_54B4B:
pop rdx
jmp short loc_54B50
def_54B3A:
xor edx, edx; jumptable 0000000000054B3A default case
loc_54B50:
xor edi, edi
xor esi, esi
call _setpriority
test eax, eax
setnz bpl
jnz short loc_54BA2
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_54BA2
call _Z15common_log_mainv; common_log_main(void)
mov r14, rax
call ___errno_location
mov r15, rax
mov edi, [rax]
call _strerror
mov r9d, [r15]
lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "...
xor ebp, ebp
push 3
pop rsi
mov rdi, r14
mov ecx, ebx
mov r8, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_54BA2:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long set_process_priority(int a1)
{
unsigned int v1; // ebp
long long v2; // rdx
int v3; // eax
int v4; // r14d
unsigned int *v5; // r15
int v6; // eax
long long v8; // [rsp-10h] [rbp-30h]
switch ( a1 )
{
case 0:
LOBYTE(v1) = 1;
return v1;
case 1:
v8 = -5LL;
goto LABEL_6;
case 2:
v8 = -10LL;
goto LABEL_6;
case 3:
v8 = -20LL;
LABEL_6:
v2 = v8;
break;
default:
v2 = 0LL;
break;
}
v3 = setpriority(0LL, 0LL, v2);
LOBYTE(v1) = v3 != 0;
if ( !v3 && common_log_verbosity_thold >= 0 )
{
v4 = common_log_main();
v5 = (unsigned int *)__errno_location(0LL);
v6 = strerror(*v5);
v1 = 0;
common_log_add(v4, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v6, *v5);
}
return v1;
}
|
set_process_priority:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
CMP EDI,0x3
JA 0x00154b4e
MOV EAX,EBX
LEA RCX,[0x1b3c80]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV BPL,0x1
JMP 0x00154ba2
caseD_2:
PUSH -0xa
JMP 0x00154b4b
caseD_3:
PUSH -0x14
JMP 0x00154b4b
caseD_1:
PUSH -0x5
LAB_00154b4b:
POP RDX
JMP 0x00154b50
default:
XOR EDX,EDX
LAB_00154b50:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00123220
TEST EAX,EAX
SETNZ BPL
JNZ 0x00154ba2
LEA RAX,[0x200528]
CMP dword ptr [RAX],0x0
JS 0x00154ba2
CALL 0x0019813a
MOV R14,RAX
CALL 0x00123050
MOV R15,RAX
MOV EDI,dword ptr [RAX]
CALL 0x001232c0
MOV R9D,dword ptr [R15]
LEA RDX,[0x1b4082]
XOR EBP,EBP
PUSH 0x3
POP RSI
MOV RDI,R14
MOV ECX,EBX
MOV R8,RAX
XOR EAX,EAX
CALL 0x001981d2
LAB_00154ba2:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* set_process_priority(ggml_sched_priority) */
ulong set_process_priority(int4 param_1)
{
int iVar1;
int8 uVar2;
int *piVar3;
char *pcVar4;
int8 unaff_RBP;
int7 uVar6;
ulong uVar5;
uVar6 = (int7)((ulong)unaff_RBP >> 8);
switch(param_1) {
case 0:
uVar5 = CONCAT71(uVar6,1);
goto LAB_00154ba2;
case 1:
iVar1 = -5;
break;
case 2:
iVar1 = -10;
break;
case 3:
iVar1 = -0x14;
break;
default:
iVar1 = 0;
}
iVar1 = setpriority(PRIO_PROCESS,0,iVar1);
uVar5 = CONCAT71(uVar6,iVar1 != 0);
if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) {
uVar2 = common_log_main();
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
uVar5 = 0;
common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3);
}
LAB_00154ba2:
return uVar5 & 0xffffffff;
}
|
|
19,537
|
set_process_priority(ggml_sched_priority)
|
monkey531[P]llama/common/common.cpp
|
bool set_process_priority(enum ggml_sched_priority prio) {
if (prio == GGML_SCHED_PRIO_NORMAL) {
return true;
}
int p = 0;
switch (prio) {
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
case GGML_SCHED_PRIO_HIGH: p = -10; break;
case GGML_SCHED_PRIO_REALTIME: p = -20; break;
}
if (!setpriority(PRIO_PROCESS, 0, p)) {
LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno);
return false;
}
return true;
}
|
O3
|
cpp
|
set_process_priority(ggml_sched_priority):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x3, %edi
ja 0x73ea9
movl %ebx, %eax
leaq 0x7cdea(%rip), %rcx # 0xf0c70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, %bpl
jmp 0x73eff
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x73eab
movl $0xffffffec, %edx # imm = 0xFFFFFFEC
jmp 0x73eab
movl $0xfffffffb, %edx # imm = 0xFFFFFFFB
jmp 0x73eab
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0x1b1f0
testl %eax, %eax
setne %bpl
jne 0x73eff
leaq 0xbb645(%rip), %rax # 0x12f508
cmpl $0x0, (%rax)
js 0x73eff
callq 0xcea9f
movq %rax, %r14
callq 0x1b060
movq %rax, %r15
movl (%rax), %edi
callq 0x1b2c0
movl (%r15), %r9d
leaq 0x7d1a9(%rip), %rdx # 0xf1092
xorl %ebp, %ebp
movq %r14, %rdi
movl $0x3, %esi
movl %ebx, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0xceb3c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_Z20set_process_priority19ggml_sched_priority:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, edi
cmp edi, 3; switch 4 cases
ja short def_73E8D; jumptable 0000000000073E8D default case
mov eax, ebx
lea rcx, jpt_73E8D
movsxd rax, ds:(jpt_73E8D - 0F0C70h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_73E8F:
mov bpl, 1; jumptable 0000000000073E8D case 0
jmp short loc_73EFF
loc_73E94:
mov edx, 0FFFFFFF6h; jumptable 0000000000073E8D case 2
jmp short loc_73EAB
loc_73E9B:
mov edx, 0FFFFFFECh; jumptable 0000000000073E8D case 3
jmp short loc_73EAB
loc_73EA2:
mov edx, 0FFFFFFFBh; jumptable 0000000000073E8D case 1
jmp short loc_73EAB
def_73E8D:
xor edx, edx; jumptable 0000000000073E8D default case
loc_73EAB:
xor edi, edi
xor esi, esi
call _setpriority
test eax, eax
setnz bpl
jnz short loc_73EFF
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_73EFF
call _Z15common_log_mainv; common_log_main(void)
mov r14, rax
call ___errno_location
mov r15, rax
mov edi, [rax]
call _strerror
mov r9d, [r15]
lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "...
xor ebp, ebp
mov rdi, r14
mov esi, 3
mov ecx, ebx
mov r8, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_73EFF:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long set_process_priority(int a1, double a2)
{
unsigned int v2; // ebp
long long v3; // rdx
int v4; // eax
int v5; // r14d
unsigned int *v6; // r15
int v7; // eax
switch ( a1 )
{
case 0:
LOBYTE(v2) = 1;
return v2;
case 1:
v3 = 4294967291LL;
goto LABEL_7;
case 2:
v3 = 4294967286LL;
goto LABEL_7;
case 3:
v3 = 4294967276LL;
goto LABEL_7;
default:
v3 = 0LL;
LABEL_7:
v4 = setpriority(0LL, 0LL, v3);
LOBYTE(v2) = v4 != 0;
if ( !v4 && common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v6 = (unsigned int *)__errno_location(a2);
v7 = strerror(*v6);
v2 = 0;
common_log_add(v5, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v7, *v6);
}
return v2;
}
}
|
set_process_priority:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
CMP EDI,0x3
JA 0x00173ea9
MOV EAX,EBX
LEA RCX,[0x1f0c70]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV BPL,0x1
JMP 0x00173eff
caseD_2:
MOV EDX,0xfffffff6
JMP 0x00173eab
caseD_3:
MOV EDX,0xffffffec
JMP 0x00173eab
caseD_1:
MOV EDX,0xfffffffb
JMP 0x00173eab
default:
XOR EDX,EDX
LAB_00173eab:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0011b1f0
TEST EAX,EAX
SETNZ BPL
JNZ 0x00173eff
LEA RAX,[0x22f508]
CMP dword ptr [RAX],0x0
JS 0x00173eff
CALL 0x001cea9f
MOV R14,RAX
CALL 0x0011b060
MOV R15,RAX
MOV EDI,dword ptr [RAX]
CALL 0x0011b2c0
MOV R9D,dword ptr [R15]
LEA RDX,[0x1f1092]
XOR EBP,EBP
MOV RDI,R14
MOV ESI,0x3
MOV ECX,EBX
MOV R8,RAX
XOR EAX,EAX
CALL 0x001ceb3c
LAB_00173eff:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* set_process_priority(ggml_sched_priority) */
ulong set_process_priority(int4 param_1)
{
int iVar1;
int8 uVar2;
int *piVar3;
char *pcVar4;
int8 unaff_RBP;
int7 uVar6;
ulong uVar5;
uVar6 = (int7)((ulong)unaff_RBP >> 8);
switch(param_1) {
case 0:
uVar5 = CONCAT71(uVar6,1);
goto LAB_00173eff;
case 1:
iVar1 = -5;
break;
case 2:
iVar1 = -10;
break;
case 3:
iVar1 = -0x14;
break;
default:
iVar1 = 0;
}
iVar1 = setpriority(PRIO_PROCESS,0,iVar1);
uVar5 = CONCAT71(uVar6,iVar1 != 0);
if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) {
uVar2 = common_log_main();
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
uVar5 = 0;
common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3);
}
LAB_00173eff:
return uVar5 & 0xffffffff;
}
|
|
19,538
|
string_view::operator[](unsigned long) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
char operator[](size_t pos) const {
auto index = _start + pos;
if (index >= _end) {
throw std::out_of_range("string_view index out of range");
}
return _str[_start + pos];
}
|
O3
|
cpp
|
string_view::operator[](unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
addq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jae 0xcb5b5
movq (%rdi), %rax
movq (%rax), %rax
movb (%rax,%rsi), %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x2b44c(%rip), %rsi # 0xf6a15
movq %rax, %rdi
callq 0x1b110
movq 0x629d8(%rip), %rsi # 0x12dfb0
movq 0x629b1(%rip), %rdx # 0x12df90
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b660
movq %r14, %rdi
callq 0x1bf90
|
_ZNK11string_viewixEm:
push r14
push rbx
push rax
add rsi, [rdi+8]
cmp rsi, [rdi+10h]
jnb short loc_CB5B5
mov rax, [rdi]
mov rax, [rax]
mov al, [rax+rsi]
add rsp, 8
pop rbx
pop r14
retn
loc_CB5B5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aStringViewInde; "string_view index out of range"
mov rdi, rax; this
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_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
|
char string_view::operator[](long long a1, long long a2)
{
unsigned long long v2; // rsi
std::out_of_range *exception; // rbx
v2 = *(_QWORD *)(a1 + 8) + a2;
if ( v2 >= *(_QWORD *)(a1 + 16) )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "string_view index out of range");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
return *(_BYTE *)(**(_QWORD **)a1 + v2);
}
|
operator[]:
PUSH R14
PUSH RBX
PUSH RAX
ADD RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JNC 0x001cb5b5
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX + RSI*0x1]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001cb5b5:
MOV EDI,0x10
CALL 0x0011b440
MOV RBX,RAX
LAB_001cb5c2:
LEA RSI,[0x1f6a15]
MOV RDI,RAX
CALL 0x0011b110
LAB_001cb5d1:
MOV RSI,qword ptr [0x0022dfb0]
MOV RDX,qword ptr [0x0022df90]
MOV RDI,RBX
CALL 0x0011bf00
|
/* string_view::operator[](unsigned long) const */
int8 __thiscall string_view::operator[](string_view *this,ulong param_1)
{
out_of_range *this_00;
if (param_1 + *(long *)(this + 8) < *(ulong *)(this + 0x10)) {
return CONCAT71((int7)((ulong)**(long **)this >> 8),
*(int1 *)(**(long **)this + param_1 + *(long *)(this + 8)));
}
this_00 = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 001cb5c2 to 001cb5d0 has its CatchHandler @ 001cb5e7 */
std::out_of_range::out_of_range(this_00,"string_view index out of range");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022dfb0,PTR__out_of_range_0022df90);
}
|
|
19,539
|
memstr
|
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_http-src/src/httpparse.c
|
char *
memstr(char *haystack, char *needle, int size)
{
char *p;
char needlesize = strlen(needle);
for (p = haystack; p <= (haystack-needlesize+size); p++)
{
if (memcmp(p, needle, needlesize) == 0)
return p; /* found */
}
return NULL;
}
|
O3
|
c
|
memstr:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x61a0
movsbq %al, %r15
movq %rbx, %rax
subq %r15, %rax
movslq %r12d, %r12
addq %rax, %r12
cmpq %rbx, %r12
jb 0x1e57f
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6400
testl %eax, %eax
je 0x1e581
incq %rbx
cmpq %r12, %rbx
jbe 0x1e565
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
memstr:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12d, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
movsx r15, al
mov rax, rbx
sub rax, r15
movsxd r12, r12d
add r12, rax
cmp r12, rbx
jb short loc_1E57F
loc_1E565:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _bcmp
test eax, eax
jz short loc_1E581
inc rbx
cmp rbx, r12
jbe short loc_1E565
loc_1E57F:
xor ebx, ebx
loc_1E581:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
unsigned long long memstr(unsigned long long a1, long long a2, int a3)
{
unsigned long long v4; // rbx
long long v5; // r15
unsigned long long v6; // r12
v4 = a1;
v5 = (char)strlen(a2);
v6 = a1 - v5 + a3;
if ( v6 < a1 )
return 0LL;
while ( (unsigned int)bcmp(v4, a2, v5) )
{
if ( ++v4 > v6 )
return 0LL;
}
return v4;
}
|
memstr:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12D,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001061a0
MOVSX R15,AL
MOV RAX,RBX
SUB RAX,R15
MOVSXD R12,R12D
ADD R12,RAX
CMP R12,RBX
JC 0x0011e57f
LAB_0011e565:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00106400
TEST EAX,EAX
JZ 0x0011e581
INC RBX
CMP RBX,R12
JBE 0x0011e565
LAB_0011e57f:
XOR EBX,EBX
LAB_0011e581:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void * memstr(void *param_1,char *param_2,int param_3)
{
int iVar1;
size_t sVar2;
void *pvVar3;
sVar2 = strlen(param_2);
pvVar3 = (void *)((long)param_1 + ((long)param_3 - (long)(char)sVar2));
if (param_1 <= pvVar3) {
do {
iVar1 = bcmp(param_1,param_2,(long)(char)sVar2);
if (iVar1 == 0) {
return param_1;
}
param_1 = (void *)((long)param_1 + 1);
} while (param_1 <= pvVar3);
}
return (void *)0x0;
}
|
|
19,540
|
common_arg::to_string[abi:cxx11]()
|
monkey531[P]llama/common/arg.cpp
|
std::string common_arg::to_string() {
// params for printing to console
const static int n_leading_spaces = 40;
const static int n_char_per_line_help = 70; // TODO: detect this based on current console
std::string leading_spaces(n_leading_spaces, ' ');
std::ostringstream ss;
for (const auto arg : args) {
if (arg == args.front()) {
if (args.size() == 1) {
ss << arg;
} else {
// first arg is usually abbreviation, we need padding to make it more beautiful
auto tmp = std::string(arg) + ", ";
auto spaces = std::string(std::max(0, 7 - (int)tmp.size()), ' ');
ss << tmp << spaces;
}
} else {
ss << arg << (arg != args.back() ? ", " : "");
}
}
if (value_hint) ss << " " << value_hint;
if (value_hint_2) ss << " " << value_hint_2;
if (ss.tellp() > n_leading_spaces - 3) {
// current line is too long, add new line
ss << "\n" << leading_spaces;
} else {
// padding between arg and help, same line
ss << std::string(leading_spaces.size() - ss.tellp(), ' ');
}
const auto help_lines = break_str_into_lines(help, n_char_per_line_help);
for (const auto & line : help_lines) {
ss << (&line == &help_lines.front() ? "" : leading_spaces) << line << "\n";
}
return ss.str();
}
|
O2
|
cpp
|
common_arg::to_string[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x558, %rsp # imm = 0x558
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x40(%rsp), %rdi
pushq $0x28
popq %rsi
pushq $0x20
popq %rdx
callq 0x23a40
leaq 0x260(%rsp), %rdi
callq 0x23bb0
movq 0x60(%r14), %r15
movq 0x68(%r14), %r13
leaq 0x260(%rsp), %rbx
leaq 0x3d8(%rsp), %rbp
cmpq %r13, %r15
je 0x27d1c
movq (%r15), %r12
movq 0x60(%r14), %rax
cmpq (%rax), %r12
je 0x27c66
movq %rbx, %rdi
movq %r12, %rsi
callq 0x238c0
movq 0x68(%r14), %rcx
cmpq -0x8(%rcx), %r12
leaq 0x816db(%rip), %rsi # 0xa9329
leaq 0x86e94(%rip), %rcx # 0xaeae9
cmoveq %rcx, %rsi
movq %rax, %rdi
callq 0x238c0
jmp 0x27d13
movq 0x68(%r14), %rcx
subq %rax, %rcx
cmpq $0x8, %rcx
jne 0x27c83
movq %rbx, %rdi
movq %r12, %rsi
callq 0x238c0
jmp 0x27d13
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x20(%rsp), %rdx
callq 0x26f76
leaq 0xe0(%rsp), %rdi
movq %rbp, %rsi
leaq 0x81684(%rip), %rdx # 0xa9329
callq 0x37d98
movq %rbp, %rdi
callq 0x241d8
pushq $0x7
popq %rax
movl %eax, %esi
subl 0xe8(%rsp), %esi
testl %esi, %esi
movl $0x0, %eax
cmovlel %eax, %esi
leaq 0x3e8(%rsp), %rax
movq %rax, 0x3d8(%rsp)
movq %rbp, %rdi
pushq $0x20
popq %rdx
callq 0x23a40
movq %rbx, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x237f0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x237f0
movq %rbp, %rdi
callq 0x241d8
leaq 0xe0(%rsp), %rdi
callq 0x241d8
addq $0x8, %r15
jmp 0x27c1f
cmpq $0x0, 0x78(%r14)
je 0x27d43
leaq 0x8a723(%rip), %rsi # 0xb244d
leaq 0x260(%rsp), %rdi
callq 0x238c0
movq 0x78(%r14), %rsi
movq %rax, %rdi
callq 0x238c0
cmpq $0x0, 0x80(%r14)
je 0x27d70
leaq 0x8a6f9(%rip), %rsi # 0xb244d
leaq 0x260(%rsp), %rdi
callq 0x238c0
movq 0x80(%r14), %rsi
movq %rax, %rdi
callq 0x238c0
leaq 0x260(%rsp), %rdi
callq 0x23780
cmpq $0x26, %rax
jl 0x27da6
leaq 0x86d5e(%rip), %rsi # 0xaeae8
leaq 0x260(%rsp), %rdi
callq 0x238c0
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x237f0
jmp 0x27dfc
movq 0x48(%rsp), %rbx
leaq 0x260(%rsp), %rdi
callq 0x23780
subq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe0(%rsp), %rdi
pushq $0x20
popq %rdx
movq %rbx, %rsi
callq 0x23a40
leaq 0x260(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x237f0
leaq 0xe0(%rsp), %rdi
callq 0x241d8
addq $0x90, %r14
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x23c10
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x3d8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x23ee0
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xe0(%rsp), %r12
leaq 0x20(%rsp), %r13
movq %rsp, %rbx
leaq 0x80(%rsp), %rbp
leaq 0x8a5e5(%rip), %r15 # 0xb244d
leaq 0xc0(%rsp), %r14
leaq 0x3d8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x23150
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x27faa
cmpq $0x46, 0x68(%rsp)
jbe 0x27f6b
movq %r12, %rdi
leaq 0x60(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x23ee0
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
xorl %ecx, %ecx
movb %cl, 0x30(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
andq $0x0, 0x88(%rsp)
movb %cl, 0x90(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x23b30
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movq 0x88(%rsp), %rax
jne 0x27f7d
cmpq $0x1, %rax
movq %rax, %rcx
sbbq $-0x1, %rcx
addq 0x28(%rsp), %rcx
cmpq $0x47, %rcx
jb 0x27f3a
testq %rax, %rax
je 0x27f2d
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x38fc8
movq %rbp, %rdi
movq %r13, %rsi
callq 0x234c0
jmp 0x27ee6
testq %rax, %rax
leaq 0x86ba5(%rip), %rsi # 0xaeae9
cmovneq %r15, %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x38ff4
movq %rbp, %rdi
movq %r14, %rsi
callq 0x24140
movq %r14, %rdi
callq 0x241d8
jmp 0x27ee6
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
callq 0x38fc8
jmp 0x27e70
testq %rax, %rax
je 0x27f8d
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x38fc8
movq %rbp, %rdi
callq 0x241d8
movq %r13, %rdi
callq 0x241d8
movq %r12, %rdi
callq 0x23430
jmp 0x27e70
leaq 0x60(%rsp), %rdi
callq 0x241d8
leaq 0x3d8(%rsp), %rdi
callq 0x23430
leaq 0xa0(%rsp), %rdi
callq 0x241d8
movq (%rsp), %r14
movq 0x8(%rsp), %r15
leaq 0xe0(%rsp), %r12
leaq 0x260(%rsp), %r13
leaq 0x86afa(%rip), %rbp # 0xaeae8
cmpq %r15, %r14
je 0x28054
movq (%rsp), %rbx
cmpq %rbx, %r14
je 0x2800b
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0x23c10
jmp 0x28022
movq %r12, %rdi
leaq 0x86ad4(%rip), %rsi # 0xaeae9
leaq 0x3d8(%rsp), %rdx
callq 0x26f76
movq %r13, %rdi
movq %r12, %rsi
callq 0x237f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x237f0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x238c0
movq %r12, %rdi
callq 0x241d8
cmpq %rbx, %r14
addq $0x20, %r14
jmp 0x27fee
leaq 0x268(%rsp), %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x23dd0
movq %rsp, %rdi
callq 0x26fb2
leaq 0x260(%rsp), %rdi
callq 0x231f0
leaq 0x40(%rsp), %rdi
callq 0x241d8
movq %rbx, %rax
addq $0x558, %rsp # imm = 0x558
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x280be
jmp 0x280f9
jmp 0x280f9
movq %rax, %r15
jmp 0x28119
movq %rax, %r15
jmp 0x28175
jmp 0x280f9
jmp 0x280f9
movq %rax, %r15
jmp 0x28197
jmp 0x280f9
movq %rax, %r15
jmp 0x280e7
movq %rax, %r15
leaq 0x3d8(%rsp), %rdi
jmp 0x28185
jmp 0x280f9
jmp 0x28137
movq %rax, %r15
leaq 0x3d8(%rsp), %rdi
callq 0x241d8
leaq 0xe0(%rsp), %rdi
jmp 0x28185
movq %rax, %r15
jmp 0x28116
movq %rax, %r15
jmp 0x2818a
movq %rax, %r15
jmp 0x2815e
movq %rax, %r15
leaq 0xe0(%rsp), %rdi
callq 0x241d8
cmpq %rbx, %r14
movq %rsp, %rdi
callq 0x26fb2
jmp 0x2818a
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
callq 0x241d8
jmp 0x2813a
jmp 0x28137
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x241d8
leaq 0x20(%rsp), %rdi
callq 0x241d8
leaq 0xe0(%rsp), %rdi
callq 0x23430
leaq 0x60(%rsp), %rdi
callq 0x241d8
leaq 0x3d8(%rsp), %rdi
callq 0x23430
movq %rsp, %rdi
callq 0x26fb2
leaq 0xa0(%rsp), %rdi
callq 0x241d8
leaq 0x260(%rsp), %rdi
callq 0x231f0
leaq 0x40(%rsp), %rdi
callq 0x241d8
movq %r15, %rdi
callq 0x23fa0
|
_ZN10common_arg9to_stringB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 558h
mov r14, rsi
mov [rsp+588h+var_570], rdi
lea rax, [rsp+588h+var_538]
mov [rax-10h], rax
lea rdi, [rsp+588h+var_548]
push 28h ; '('
pop rsi
push 20h ; ' '
pop rdx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
lea rdi, [rsp+588h+var_328]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov r15, [r14+60h]
mov r13, [r14+68h]
lea rbx, [rsp+588h+var_328]
lea rbp, [rsp+588h+var_1B0]
loc_27C1F:
cmp r15, r13
jz loc_27D1C
mov r12, [r15]
mov rax, [r14+60h]
cmp r12, [rax]
jz short loc_27C66
mov rdi, rbx
mov rsi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rcx, [r14+68h]
cmp r12, [rcx-8]
lea rsi, asc_A9326+3; ", "
lea rcx, aErrorWhileHand_0+34h; ""
cmovz rsi, rcx
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_27D13
loc_27C66:
mov rcx, [r14+68h]
sub rcx, rax
cmp rcx, 8
jnz short loc_27C83
mov rdi, rbx
mov rsi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_27D13
loc_27C83:
mov rdi, rbp
mov rsi, r12
lea rdx, [rsp+588h+var_568]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+588h+var_4A8]
mov rsi, rbp
lea rdx, asc_A9326+3; ", "
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
push 7
pop rax
mov esi, eax
sub esi, [rsp+588h+var_4A0]
test esi, esi
mov eax, 0
cmovle esi, eax
lea rax, [rsp+588h+var_1A0]
mov [rsp+588h+var_1B0], rax
mov rdi, rbp
push 20h ; ' '
pop rdx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, rbx
lea rsi, [rsp+588h+var_4A8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
mov rsi, rbp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+588h+var_4A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_27D13:
add r15, 8
jmp loc_27C1F
loc_27D1C:
cmp qword ptr [r14+78h], 0
jz short loc_27D43
lea rsi, aForMessageInMe+144h; " "
lea rdi, [rsp+588h+var_328]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+78h]
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_27D43:
cmp qword ptr [r14+80h], 0
jz short loc_27D70
lea rsi, aForMessageInMe+144h; " "
lea rdi, [rsp+588h+var_328]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+80h]
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_27D70:
lea rdi, [rsp+588h+var_328]; this
call __ZNSo5tellpEv; std::ostream::tellp(void)
cmp rax, 26h ; '&'
jl short loc_27DA6
lea rsi, aErrorWhileHand_0+33h; "\n"
lea rdi, [rsp+588h+var_328]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, [rsp+588h+var_548]
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short loc_27DFC
loc_27DA6:
mov rbx, [rsp+588h+var_540]
lea rdi, [rsp+588h+var_328]; this
call __ZNSo5tellpEv; std::ostream::tellp(void)
sub rbx, rax
lea rax, [rsp+588h+var_498]
mov [rax-10h], rax
lea rdi, [rsp+588h+var_4A8]
push 20h ; ' '
pop rdx
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
lea rdi, [rsp+588h+var_328]
lea rsi, [rsp+588h+var_4A8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+588h+var_4A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_27DFC:
add r14, 90h
lea rdi, [rsp+588h+var_4E8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
xorps xmm0, xmm0
movaps [rsp+588h+var_588], xmm0
and [rsp+588h+var_578], 0
lea rdi, [rsp+588h+var_1B0]
lea rsi, [rsp+588h+var_4E8]
push 8
pop rdx
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+588h+var_518]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r12, [rsp+588h+var_4A8]
lea r13, [rsp+588h+var_568]
mov rbx, rsp
lea rbp, [rsp+588h+var_508]
lea r15, aForMessageInMe+144h; " "
lea r14, [rsp+588h+var_4C8]
loc_27E70:
lea rdi, [rsp+588h+var_1B0]
lea rsi, [rsp+588h+var_528]
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_27FAA
cmp [rsp+588h+var_520], 46h ; 'F'
jbe loc_27F6B
mov rdi, r12
lea rsi, [rsp+588h+var_528]
push 8
pop rdx
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+588h+var_558]
mov [rsp+588h+var_568], rax
and [rsp+588h+var_560], 0
xor ecx, ecx
mov [rsp+588h+var_558], cl
lea rax, [rsp+588h+var_4F8]
mov [rsp+588h+var_508], rax
and [rsp+588h+var_500], 0
mov [rsp+588h+var_4F8], cl
loc_27EE6:
mov rdi, r12
mov rsi, r13
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
mov rax, [rsp+588h+var_500]
jnz short loc_27F7D
cmp rax, 1
mov rcx, rax
sbb rcx, 0FFFFFFFFFFFFFFFFh
add rcx, [rsp+588h+var_560]
cmp rcx, 47h ; 'G'
jb short loc_27F3A
test rax, rax
jz short loc_27F2D
mov rdi, rbx
mov rsi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
loc_27F2D:
mov rdi, rbp
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_27EE6
loc_27F3A:
test rax, rax
lea rsi, aErrorWhileHand_0+34h; ""
cmovnz rsi, r15
mov rdi, r14
mov rdx, r13
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rbp
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_27EE6
loc_27F6B:
mov rdi, rbx
lea rsi, [rsp+588h+var_528]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
jmp loc_27E70
loc_27F7D:
test rax, rax
jz short loc_27F8D
mov rdi, rbx
mov rsi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
loc_27F8D:
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r12
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp loc_27E70
loc_27FAA:
lea rdi, [rsp+588h+var_528]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+588h+var_1B0]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
lea rdi, [rsp+588h+var_4E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov r14, qword ptr [rsp+588h+var_588]
mov r15, qword ptr [rsp+588h+var_588+8]
lea r12, [rsp+588h+var_4A8]
lea r13, [rsp+588h+var_328]
lea rbp, aErrorWhileHand_0+33h; "\n"
loc_27FEE:
cmp r14, r15
jz short loc_28054
mov rbx, qword ptr [rsp+588h+var_588]
cmp r14, rbx
jz short loc_2800B
mov rdi, r12
lea rsi, [rsp+588h+var_548]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short loc_28022
loc_2800B:
mov rdi, r12
lea rsi, aErrorWhileHand_0+34h; ""
lea rdx, [rsp+588h+var_1B0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
loc_28022:
mov rdi, r13
mov rsi, r12
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
mov rsi, r14
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
mov rsi, rbp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r14, rbx
add r14, 20h ; ' '
jmp short loc_27FEE
loc_28054:
lea rsi, [rsp+588h+var_320]
mov rbx, [rsp+588h+var_570]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+588h+var_328]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+588h+var_548]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 558h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_280BE
jmp short loc_280F9
jmp short loc_280F9
mov r15, rax
jmp short loc_28119
mov r15, rax
jmp loc_28175
jmp short loc_280F9
jmp short loc_280F9
mov r15, rax
jmp loc_28197
jmp short loc_280F9
loc_280BE:
mov r15, rax
jmp short loc_280E7
mov r15, rax
lea rdi, [rsp+arg_3D0]
jmp loc_28185
jmp short loc_280F9
jmp short loc_28137
mov r15, rax
lea rdi, [rsp+arg_3D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_280E7:
lea rdi, [rsp+arg_D8]
jmp loc_28185
mov r15, rax
jmp short loc_28116
loc_280F9:
mov r15, rax
jmp loc_2818A
mov r15, rax
jmp short loc_2815E
mov r15, rax
lea rdi, [rsp+arg_D8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_28116:
cmp r14, rbx
loc_28119:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_2818A
mov r15, rax
lea rdi, [rsp+arg_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_2813A
jmp short $+2
loc_28137:
mov r15, rax
loc_2813A:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_D8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
loc_2815E:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_3D0]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
loc_28175:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+arg_98]; void *
loc_28185:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2818A:
lea rdi, [rsp+arg_258]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_28197:
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15
call __Unwind_Resume
|
long long common_arg::to_string[abi:cxx11](long long a1, _QWORD *a2)
{
long long *v3; // r15
long long *v4; // r13
long long v5; // r12
_QWORD *v6; // rax
long long v7; // rax
char *v8; // rsi
long long v9; // rsi
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rbx
long long v15; // rax
_QWORD *v16; // rax
_QWORD *v17; // rax
char *v18; // rsi
long long i; // r14
long long v20; // r15
long long v21; // rax
long long v22; // rax
long long v23; // rbx
__int128 v25; // [rsp+0h] [rbp-588h] BYREF
long long v26; // [rsp+10h] [rbp-578h]
long long v27; // [rsp+18h] [rbp-570h]
char *v28; // [rsp+20h] [rbp-568h] BYREF
long long v29; // [rsp+28h] [rbp-560h]
char v30; // [rsp+30h] [rbp-558h] BYREF
_QWORD v31[2]; // [rsp+40h] [rbp-548h] BYREF
char v32; // [rsp+50h] [rbp-538h] BYREF
char *v33; // [rsp+60h] [rbp-528h] BYREF
unsigned long long v34; // [rsp+68h] [rbp-520h]
char v35; // [rsp+70h] [rbp-518h] BYREF
char *v36; // [rsp+80h] [rbp-508h] BYREF
long long v37; // [rsp+88h] [rbp-500h]
char v38; // [rsp+90h] [rbp-4F8h] BYREF
_BYTE v39[32]; // [rsp+A0h] [rbp-4E8h] BYREF
_BYTE v40[32]; // [rsp+C0h] [rbp-4C8h] BYREF
char *v41; // [rsp+E0h] [rbp-4A8h] BYREF
int v42; // [rsp+E8h] [rbp-4A0h]
char v43; // [rsp+F0h] [rbp-498h] BYREF
_BYTE v44[8]; // [rsp+260h] [rbp-328h] BYREF
_BYTE v45[368]; // [rsp+268h] [rbp-320h] BYREF
_QWORD v46[2]; // [rsp+3D8h] [rbp-1B0h] BYREF
char v47; // [rsp+3E8h] [rbp-1A0h] BYREF
v27 = a1;
v31[0] = &v32;
std::string::_M_construct(v31, 40LL, 32LL);
std::ostringstream::basic_ostringstream(v44);
v3 = (long long *)a2[12];
v4 = (long long *)a2[13];
while ( v3 != v4 )
{
v5 = *v3;
v6 = (_QWORD *)a2[12];
if ( *v3 == *v6 )
{
if ( a2[13] - (_QWORD)v6 == 8LL )
{
std::operator<<<std::char_traits<char>>(v44, *v3);
}
else
{
std::string::basic_string<std::allocator<char>>(v46, *v3);
std::operator+<char>(&v41, v46, ", ");
std::string::~string(v46);
v9 = (unsigned int)(7 - v42);
if ( 7 - v42 <= 0 )
v9 = 0LL;
v46[0] = &v47;
std::string::_M_construct(v46, v9, 32LL);
v10 = std::operator<<<char>(v44, &v41);
std::operator<<<char>(v10, v46);
std::string::~string(v46);
std::string::~string(&v41);
}
}
else
{
v7 = std::operator<<<std::char_traits<char>>(v44, *v3);
v8 = ", ";
if ( v5 == *(_QWORD *)(a2[13] - 8LL) )
v8 = "";
std::operator<<<std::char_traits<char>>(v7, v8);
}
++v3;
}
if ( a2[15] )
{
v11 = std::operator<<<std::char_traits<char>>(v44, " ");
std::operator<<<std::char_traits<char>>(v11, a2[15]);
}
if ( a2[16] )
{
v12 = std::operator<<<std::char_traits<char>>(v44, " ");
std::operator<<<std::char_traits<char>>(v12, a2[16]);
}
if ( (long long)std::ostream::tellp((std::ostream *)v44) < 38 )
{
v14 = v31[1];
v15 = std::ostream::tellp((std::ostream *)v44);
v41 = &v43;
std::string::_M_construct(&v41, v14 - v15, 32LL);
std::operator<<<char>(v44, &v41);
std::string::~string(&v41);
}
else
{
v13 = std::operator<<<std::char_traits<char>>(v44, "\n");
std::operator<<<char>(v13, v31);
}
std::string::basic_string(v39, a2 + 18);
v25 = 0LL;
v26 = 0LL;
std::istringstream::basic_istringstream(v46, v39, 8LL);
v33 = &v35;
v34 = 0LL;
v35 = 0;
while ( 1 )
{
v16 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v46, &v33);
if ( (*((_BYTE *)v16 + *(_QWORD *)(*v16 - 24LL) + 32) & 5) != 0 )
break;
if ( v34 <= 0x46 )
{
std::vector<std::string>::push_back(&v25, &v33);
}
else
{
std::istringstream::basic_istringstream(&v41, &v33, 8LL);
v28 = &v30;
v29 = 0LL;
v30 = 0;
v36 = &v38;
v37 = 0LL;
v38 = 0;
while ( 1 )
{
v17 = (_QWORD *)std::operator>><char>(&v41, &v28);
if ( (*((_BYTE *)v17 + *(_QWORD *)(*v17 - 24LL) + 32) & 5) != 0 )
break;
if ( v29 + v37 - ((unsigned long long)(v37 == 0) - 1) < 0x47 )
{
v18 = "";
if ( v37 )
v18 = " ";
std::operator+<char>(v40, v18, &v28);
std::string::append(&v36, v40);
std::string::~string(v40);
}
else
{
if ( v37 )
std::vector<std::string>::push_back(&v25, &v36);
std::string::_M_assign(&v36, &v28);
}
}
if ( v37 )
std::vector<std::string>::push_back(&v25, &v36);
std::string::~string(&v36);
std::string::~string(&v28);
std::istringstream::~istringstream(&v41);
}
}
std::string::~string(&v33);
std::istringstream::~istringstream(v46);
std::string::~string(v39);
v20 = *((_QWORD *)&v25 + 1);
for ( i = v25; i != v20; i += 32LL )
{
if ( i == (_QWORD)v25 )
std::string::basic_string<std::allocator<char>>(&v41, (long long)"");
else
std::string::basic_string(&v41, v31);
v21 = std::operator<<<char>(v44, &v41);
v22 = std::operator<<<char>(v21, i);
std::operator<<<std::char_traits<char>>(v22, "\n");
std::string::~string(&v41);
}
v23 = v27;
std::stringbuf::str(v27, v45);
std::vector<std::string>::~vector((long long)&v25);
std::ostringstream::~ostringstream(v44);
std::string::~string(v31);
return v23;
}
|
to_string[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x558
MOV R14,RSI
MOV qword ptr [RSP + 0x18],RDI
LEA RAX,[RSP + 0x50]
MOV qword ptr [RAX + -0x10],RAX
LEA RDI,[RSP + 0x40]
PUSH 0x28
POP RSI
PUSH 0x20
POP RDX
CALL 0x00123a40
LAB_00127bfa:
LEA RDI,[RSP + 0x260]
CALL 0x00123bb0
MOV R15,qword ptr [R14 + 0x60]
MOV R13,qword ptr [R14 + 0x68]
LEA RBX,[RSP + 0x260]
LEA RBP,[RSP + 0x3d8]
LAB_00127c1f:
CMP R15,R13
JZ 0x00127d1c
MOV R12,qword ptr [R15]
MOV RAX,qword ptr [R14 + 0x60]
CMP R12,qword ptr [RAX]
JZ 0x00127c66
LAB_00127c34:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001238c0
MOV RCX,qword ptr [R14 + 0x68]
CMP R12,qword ptr [RCX + -0x8]
LEA RSI,[0x1a9329]
LEA RCX,[0x1aeae9]
CMOVZ RSI,RCX
MOV RDI,RAX
CALL 0x001238c0
JMP 0x00127d13
LAB_00127c66:
MOV RCX,qword ptr [R14 + 0x68]
SUB RCX,RAX
CMP RCX,0x8
JNZ 0x00127c83
MOV RDI,RBX
MOV RSI,R12
CALL 0x001238c0
JMP 0x00127d13
LAB_00127c83:
MOV RDI,RBP
MOV RSI,R12
LEA RDX,[RSP + 0x20]
CALL 0x00126f76
LAB_00127c93:
LEA RDI,[RSP + 0xe0]
MOV RSI,RBP
LEA RDX,[0x1a9329]
CALL 0x00137d98
MOV RDI,RBP
CALL 0x001241d8
PUSH 0x7
POP RAX
MOV ESI,EAX
SUB ESI,dword ptr [RSP + 0xe8]
TEST ESI,ESI
MOV EAX,0x0
CMOVLE ESI,EAX
LEA RAX,[RSP + 0x3e8]
MOV qword ptr [RSP + 0x3d8],RAX
LAB_00127cd8:
MOV RDI,RBP
PUSH 0x20
POP RDX
CALL 0x00123a40
LAB_00127ce3:
MOV RDI,RBX
LEA RSI,[RSP + 0xe0]
CALL 0x001237f0
MOV RDI,RAX
MOV RSI,RBP
CALL 0x001237f0
MOV RDI,RBP
CALL 0x001241d8
LEA RDI,[RSP + 0xe0]
CALL 0x001241d8
LAB_00127d13:
ADD R15,0x8
JMP 0x00127c1f
LAB_00127d1c:
CMP qword ptr [R14 + 0x78],0x0
JZ 0x00127d43
LAB_00127d23:
LEA RSI,[0x1b244d]
LEA RDI,[RSP + 0x260]
CALL 0x001238c0
MOV RSI,qword ptr [R14 + 0x78]
MOV RDI,RAX
CALL 0x001238c0
LAB_00127d43:
CMP qword ptr [R14 + 0x80],0x0
JZ 0x00127d70
LEA RSI,[0x1b244d]
LEA RDI,[RSP + 0x260]
CALL 0x001238c0
MOV RSI,qword ptr [R14 + 0x80]
MOV RDI,RAX
CALL 0x001238c0
LAB_00127d70:
LEA RDI,[RSP + 0x260]
CALL 0x00123780
CMP RAX,0x26
JL 0x00127da6
LAB_00127d83:
LEA RSI,[0x1aeae8]
LEA RDI,[RSP + 0x260]
CALL 0x001238c0
LEA RSI,[RSP + 0x40]
MOV RDI,RAX
CALL 0x001237f0
JMP 0x00127dfc
LAB_00127da6:
MOV RBX,qword ptr [RSP + 0x48]
LAB_00127dab:
LEA RDI,[RSP + 0x260]
CALL 0x00123780
SUB RBX,RAX
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RAX + -0x10],RAX
LAB_00127dc7:
LEA RDI,[RSP + 0xe0]
PUSH 0x20
POP RDX
MOV RSI,RBX
CALL 0x00123a40
LAB_00127dda:
LEA RDI,[RSP + 0x260]
LEA RSI,[RSP + 0xe0]
CALL 0x001237f0
LEA RDI,[RSP + 0xe0]
CALL 0x001241d8
LAB_00127dfc:
ADD R14,0x90
LAB_00127e03:
LEA RDI,[RSP + 0xa0]
MOV RSI,R14
CALL 0x00123c10
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x10],0x0
LAB_00127e20:
LEA RDI,[RSP + 0x3d8]
LEA RSI,[RSP + 0xa0]
PUSH 0x8
POP RDX
CALL 0x00123ee0
LEA RAX,[RSP + 0x70]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R12,[RSP + 0xe0]
LEA R13,[RSP + 0x20]
MOV RBX,RSP
LEA RBP,[RSP + 0x80]
LEA R15,[0x1b244d]
LEA R14,[RSP + 0xc0]
LAB_00127e70:
LEA RDI,[RSP + 0x3d8]
LEA RSI,[RSP + 0x60]
CALL 0x00123150
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00127faa
CMP qword ptr [RSP + 0x68],0x46
JBE 0x00127f6b
MOV RDI,R12
LEA RSI,[RSP + 0x60]
PUSH 0x8
POP RDX
CALL 0x00123ee0
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
AND qword ptr [RSP + 0x28],0x0
XOR ECX,ECX
MOV byte ptr [RSP + 0x30],CL
LEA RAX,[RSP + 0x90]
MOV qword ptr [RSP + 0x80],RAX
AND qword ptr [RSP + 0x88],0x0
MOV byte ptr [RSP + 0x90],CL
LAB_00127ee6:
MOV RDI,R12
MOV RSI,R13
CALL 0x00123b30
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
MOV RAX,qword ptr [RSP + 0x88]
JNZ 0x00127f7d
CMP RAX,0x1
MOV RCX,RAX
SBB RCX,-0x1
ADD RCX,qword ptr [RSP + 0x28]
CMP RCX,0x47
JC 0x00127f3a
TEST RAX,RAX
JZ 0x00127f2d
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00138fc8
LAB_00127f2d:
MOV RDI,RBP
MOV RSI,R13
CALL 0x001234c0
JMP 0x00127ee6
LAB_00127f3a:
TEST RAX,RAX
LEA RSI,[0x1aeae9]
CMOVNZ RSI,R15
LAB_00127f48:
MOV RDI,R14
MOV RDX,R13
CALL 0x00138ff4
LAB_00127f53:
MOV RDI,RBP
MOV RSI,R14
CALL 0x00124140
MOV RDI,R14
CALL 0x001241d8
JMP 0x00127ee6
LAB_00127f6b:
MOV RDI,RBX
LEA RSI,[RSP + 0x60]
CALL 0x00138fc8
JMP 0x00127e70
LAB_00127f7d:
TEST RAX,RAX
JZ 0x00127f8d
LAB_00127f82:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00138fc8
LAB_00127f8d:
MOV RDI,RBP
CALL 0x001241d8
MOV RDI,R13
CALL 0x001241d8
MOV RDI,R12
CALL 0x00123430
JMP 0x00127e70
LAB_00127faa:
LEA RDI,[RSP + 0x60]
CALL 0x001241d8
LEA RDI,[RSP + 0x3d8]
CALL 0x00123430
LEA RDI,[RSP + 0xa0]
CALL 0x001241d8
MOV R14,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA R12,[RSP + 0xe0]
LEA R13,[RSP + 0x260]
LEA RBP,[0x1aeae8]
LAB_00127fee:
CMP R14,R15
JZ 0x00128054
MOV RBX,qword ptr [RSP]
CMP R14,RBX
JZ 0x0012800b
LAB_00127ffc:
MOV RDI,R12
LEA RSI,[RSP + 0x40]
CALL 0x00123c10
JMP 0x00128022
LAB_0012800b:
MOV RDI,R12
LEA RSI,[0x1aeae9]
LEA RDX,[RSP + 0x3d8]
CALL 0x00126f76
LAB_00128022:
MOV RDI,R13
MOV RSI,R12
CALL 0x001237f0
MOV RDI,RAX
MOV RSI,R14
CALL 0x001237f0
MOV RDI,RAX
MOV RSI,RBP
CALL 0x001238c0
MOV RDI,R12
CALL 0x001241d8
CMP R14,RBX
ADD R14,0x20
JMP 0x00127fee
LAB_00128054:
LEA RSI,[RSP + 0x268]
LAB_0012805c:
MOV RBX,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x00123dd0
LAB_00128069:
MOV RDI,RSP
CALL 0x00126fb2
LEA RDI,[RSP + 0x260]
CALL 0x001231f0
LEA RDI,[RSP + 0x40]
CALL 0x001241d8
MOV RAX,RBX
ADD RSP,0x558
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::to_string[abi:cxx11]() */
int8 common_arg::to_string_abi_cxx11_(void)
{
int8 *puVar1;
char *pcVar2;
int iVar3;
char cVar4;
ostream *poVar5;
long lVar6;
istream *piVar7;
long in_RSI;
char *pcVar8;
string *psVar9;
int8 in_RDI;
string *psVar10;
int8 *puVar11;
string *local_588;
string *psStack_580;
int8 local_578;
int8 local_570;
int1 *local_568;
long local_560;
int1 local_558 [16];
int1 *local_548;
char local_540;
int1 local_538 [16];
int1 *local_528;
ulong local_520;
int1 local_518 [16];
int1 *local_508;
long local_500;
int1 local_4f8 [16];
string local_4e8 [32];
string local_4c8 [32];
int1 *local_4a8;
int local_4a0;
int1 local_498 [368];
ostringstream local_328 [376];
int1 *local_1b0 [2];
int1 local_1a0 [368];
local_548 = local_538;
local_570 = in_RDI;
std::__cxx11::string::_M_construct((ulong)&local_548,'(');
/* try { // try from 00127bfa to 00127c06 has its CatchHandler @ 001280b4 */
std::__cxx11::ostringstream::ostringstream(local_328);
puVar1 = *(int8 **)(in_RSI + 0x68);
for (puVar11 = *(int8 **)(in_RSI + 0x60); puVar11 != puVar1; puVar11 = puVar11 + 1) {
pcVar2 = (char *)*puVar11;
if (pcVar2 == (char *)**(int8 **)(in_RSI + 0x60)) {
if (*(long *)(in_RSI + 0x68) - (long)*(int8 **)(in_RSI + 0x60) == 8) {
std::operator<<((ostream *)local_328,pcVar2);
}
else {
/* try { // try from 00127c83 to 00127c92 has its CatchHandler @ 001280d3 */
std::__cxx11::string::string<std::allocator<char>>
((string *)local_1b0,pcVar2,(allocator *)&local_568);
/* try { // try from 00127c93 to 00127ca9 has its CatchHandler @ 001280c3 */
std::operator+((string *)&local_4a8,(char *)local_1b0);
std::__cxx11::string::~string((string *)local_1b0);
iVar3 = 7 - local_4a0;
if (7 - local_4a0 < 1) {
iVar3 = 0;
}
local_1b0[0] = local_1a0;
/* try { // try from 00127cd8 to 00127ce2 has its CatchHandler @ 001280be */
std::__cxx11::string::_M_construct((ulong)local_1b0,(char)iVar3);
/* try { // try from 00127ce3 to 00127cfd has its CatchHandler @ 001280d7 */
poVar5 = std::operator<<((ostream *)local_328,(string *)&local_4a8);
std::operator<<(poVar5,(string *)local_1b0);
std::__cxx11::string::~string((string *)local_1b0);
std::__cxx11::string::~string((string *)&local_4a8);
}
}
else {
/* try { // try from 00127c34 to 00127c7d has its CatchHandler @ 001280f9 */
poVar5 = std::operator<<((ostream *)local_328,pcVar2);
pcVar8 = ", ";
if (pcVar2 == *(char **)(*(long *)(in_RSI + 0x68) + -8)) {
pcVar8 = "";
}
std::operator<<(poVar5,pcVar8);
}
}
if (*(long *)(in_RSI + 0x78) != 0) {
/* try { // try from 00127d23 to 00127d6f has its CatchHandler @ 001280bc */
poVar5 = std::operator<<((ostream *)local_328," ");
std::operator<<(poVar5,*(char **)(in_RSI + 0x78));
}
if (*(long *)(in_RSI + 0x80) != 0) {
poVar5 = std::operator<<((ostream *)local_328," ");
std::operator<<(poVar5,*(char **)(in_RSI + 0x80));
}
/* try { // try from 00127d70 to 00127d7c has its CatchHandler @ 001280b2 */
lVar6 = std::ostream::tellp();
if (lVar6 < 0x26) {
/* try { // try from 00127dab to 00127db7 has its CatchHandler @ 001280a1 */
cVar4 = std::ostream::tellp();
local_4a8 = local_498;
/* try { // try from 00127dc7 to 00127dd9 has its CatchHandler @ 0012809f */
std::__cxx11::string::_M_construct((ulong)&local_4a8,local_540 - cVar4);
/* try { // try from 00127dda to 00127dee has its CatchHandler @ 0012809d */
std::operator<<((ostream *)local_328,(string *)&local_4a8);
std::__cxx11::string::~string((string *)&local_4a8);
}
else {
/* try { // try from 00127d83 to 00127da3 has its CatchHandler @ 001280bc */
poVar5 = std::operator<<((ostream *)local_328,"\n");
std::operator<<(poVar5,(string *)&local_548);
}
/* try { // try from 00127e03 to 00127e12 has its CatchHandler @ 001280b0 */
std::__cxx11::string::string(local_4e8,(string *)(in_RSI + 0x90));
local_588 = (string *)0x0;
psStack_580 = (string *)0x0;
local_578 = 0;
/* try { // try from 00127e20 to 00127e37 has its CatchHandler @ 001280a8 */
std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,local_4e8,8);
local_528 = local_518;
local_520 = 0;
local_518[0] = 0;
while( true ) {
/* try { // try from 00127e70 to 00127eaf has its CatchHandler @ 00128101 */
piVar7 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_1b0,(string *)&local_528);
if (((byte)piVar7[*(long *)(*(long *)piVar7 + -0x18) + 0x20] & 5) != 0) break;
if (local_520 < 0x47) {
/* try { // try from 00127f6b to 00127f77 has its CatchHandler @ 00128101 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588,
(string *)&local_528);
}
else {
std::__cxx11::istringstream::istringstream((istringstream *)&local_4a8,&local_528,8);
local_568 = local_558;
local_560 = 0;
local_558[0] = 0;
local_508 = local_4f8;
local_500 = 0;
local_4f8[0] = 0;
while( true ) {
/* try { // try from 00127ee6 to 00127f37 has its CatchHandler @ 00128137 */
piVar7 = std::operator>>((istream *)&local_4a8,(string *)&local_568);
if (((byte)piVar7[*(long *)(*(long *)piVar7 + -0x18) + 0x20] & 5) != 0) break;
if (((local_500 + 1) - (ulong)(local_500 == 0)) + local_560 < 0x47) {
psVar9 = (string *)0x1aeae9;
if (local_500 != 0) {
psVar9 = (string *)0x1b244d;
}
/* try { // try from 00127f48 to 00127f52 has its CatchHandler @ 00128135 */
std::operator+((char *)local_4c8,psVar9);
/* try { // try from 00127f53 to 00127f5d has its CatchHandler @ 00128123 */
std::__cxx11::string::append((string *)&local_508);
std::__cxx11::string::~string(local_4c8);
}
else {
if (local_500 != 0) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
&local_588,(string *)&local_508);
}
std::__cxx11::string::_M_assign((string *)&local_508);
}
}
if (local_500 != 0) {
/* try { // try from 00127f82 to 00127f8c has its CatchHandler @ 001280d5 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588,
(string *)&local_508);
}
std::__cxx11::string::~string((string *)&local_508);
std::__cxx11::string::~string((string *)&local_568);
std::__cxx11::istringstream::~istringstream((istringstream *)&local_4a8);
}
}
std::__cxx11::string::~string((string *)&local_528);
std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0);
std::__cxx11::string::~string(local_4e8);
psVar9 = psStack_580;
for (psVar10 = local_588; psVar10 != psVar9; psVar10 = psVar10 + 0x20) {
if (psVar10 == local_588) {
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_4a8,"",(allocator *)local_1b0);
}
else {
/* try { // try from 00127ffc to 00128021 has its CatchHandler @ 001280f4 */
std::__cxx11::string::string((string *)&local_4a8,(string *)&local_548);
}
/* try { // try from 00128022 to 00128042 has its CatchHandler @ 00128106 */
poVar5 = std::operator<<((ostream *)local_328,(string *)&local_4a8);
poVar5 = std::operator<<(poVar5,psVar10);
std::operator<<(poVar5,"\n");
std::__cxx11::string::~string((string *)&local_4a8);
}
/* try { // try from 0012805c to 00128068 has its CatchHandler @ 001280a3 */
std::__cxx11::stringbuf::str();
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_588);
std::__cxx11::ostringstream::~ostringstream(local_328);
std::__cxx11::string::~string((string *)&local_548);
return local_570;
}
|
|
19,541
|
make_ftype
|
eloqsql/mysys/my_fopen.c
|
static void make_ftype(register char * to, register int flag)
{
/* check some possible invalid combinations */
DBUG_ASSERT((flag & (O_TRUNC | O_APPEND)) != (O_TRUNC | O_APPEND));
DBUG_ASSERT((flag & (O_WRONLY | O_RDWR)) != (O_WRONLY | O_RDWR));
if ((flag & (O_RDONLY|O_WRONLY)) == O_WRONLY)
*to++= (flag & O_APPEND) ? 'a' : 'w';
else if (flag & O_RDWR)
{
/* Add '+' after theese */
if (flag & (O_TRUNC | O_CREAT))
*to++= 'w';
else if (flag & O_APPEND)
*to++= 'a';
else
*to++= 'r';
*to++= '+';
}
else
*to++= 'r';
if (flag & FILE_BINARY)
*to++='b';
if (O_CLOEXEC)
*to++= 'e';
*to='\0';
}
|
O0
|
c
|
make_ftype:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xdc05d
jmp 0xdc05f
jmp 0xdc061
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x1, %eax
jne 0xdc09d
movl -0xc(%rbp), %edx
andl $0x400, %edx # imm = 0x400
movl $0x77, %eax
movl $0x61, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0xdc126
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xdc112
movl -0xc(%rbp), %eax
andl $0x240, %eax # imm = 0x240
cmpl $0x0, %eax
je 0xdc0c9
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x77, (%rax)
jmp 0xdc0fe
movl -0xc(%rbp), %eax
andl $0x400, %eax # imm = 0x400
cmpl $0x0, %eax
je 0xdc0ea
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x61, (%rax)
jmp 0xdc0fc
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x72, (%rax)
jmp 0xdc0fe
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x2b, (%rax)
jmp 0xdc124
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x72, (%rax)
jmp 0xdc126
movl -0xc(%rbp), %eax
andl $0x0, %eax
cmpl $0x0, %eax
je 0xdc143
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x62, (%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x65, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
popq %rbp
retq
nop
|
make_ftype:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_DC05D:
jmp short $+2
loc_DC05F:
jmp short $+2
loc_DC061:
mov eax, [rbp+var_C]
and eax, 1
cmp eax, 1
jnz short loc_DC09D
mov edx, [rbp+var_C]
and edx, 400h
mov eax, 77h ; 'w'
mov ecx, 61h ; 'a'
cmp edx, 0
cmovnz eax, ecx
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
jmp loc_DC126
loc_DC09D:
mov eax, [rbp+var_C]
and eax, 2
cmp eax, 0
jz short loc_DC112
mov eax, [rbp+var_C]
and eax, 240h
cmp eax, 0
jz short loc_DC0C9
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 77h ; 'w'
jmp short loc_DC0FE
loc_DC0C9:
mov eax, [rbp+var_C]
and eax, 400h
cmp eax, 0
jz short loc_DC0EA
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 61h ; 'a'
jmp short loc_DC0FC
loc_DC0EA:
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 72h ; 'r'
loc_DC0FC:
jmp short $+2
loc_DC0FE:
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 2Bh ; '+'
jmp short loc_DC124
loc_DC112:
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 72h ; 'r'
loc_DC124:
jmp short $+2
loc_DC126:
mov eax, [rbp+var_C]
and eax, 0
cmp eax, 0
jz short loc_DC143
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 62h ; 'b'
loc_DC143:
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 65h ; 'e'
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
pop rbp
retn
|
_BYTE * make_ftype(char *a1, __int16 a2)
{
char v2; // al
_BYTE *v3; // rax
_BYTE *result; // rax
_BYTE *v5; // [rsp+4h] [rbp-8h]
_BYTE *v6; // [rsp+4h] [rbp-8h]
if ( (a2 & 1) == 1 )
{
v2 = 119;
if ( (a2 & 0x400) != 0 )
v2 = 97;
v5 = a1 + 1;
*a1 = v2;
}
else if ( (a2 & 2) != 0 )
{
if ( (a2 & 0x240) != 0 )
{
v6 = a1 + 1;
*a1 = 119;
}
else
{
v6 = a1 + 1;
if ( (a2 & 0x400) != 0 )
*a1 = 97;
else
*a1 = 114;
}
v3 = v6;
v5 = v6 + 1;
*v3 = 43;
}
else
{
v5 = a1 + 1;
*a1 = 114;
}
*v5 = 101;
result = v5 + 1;
v5[1] = 0;
return result;
}
|
make_ftype:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001dc05d
LAB_001dc05d:
JMP 0x001dc05f
LAB_001dc05f:
JMP 0x001dc061
LAB_001dc061:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1
CMP EAX,0x1
JNZ 0x001dc09d
MOV EDX,dword ptr [RBP + -0xc]
AND EDX,0x400
MOV EAX,0x77
MOV ECX,0x61
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
JMP 0x001dc126
LAB_001dc09d:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001dc112
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x240
CMP EAX,0x0
JZ 0x001dc0c9
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x77
JMP 0x001dc0fe
LAB_001dc0c9:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x400
CMP EAX,0x0
JZ 0x001dc0ea
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x61
JMP 0x001dc0fc
LAB_001dc0ea:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x72
LAB_001dc0fc:
JMP 0x001dc0fe
LAB_001dc0fe:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x2b
JMP 0x001dc124
LAB_001dc112:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x72
LAB_001dc124:
JMP 0x001dc126
LAB_001dc126:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x0
CMP EAX,0x0
JZ 0x001dc143
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x62
LAB_001dc143:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x65
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001dc131) */
void make_ftype(int1 *param_1,uint param_2)
{
int1 uVar1;
int1 *local_10;
if ((param_2 & 1) == 1) {
uVar1 = 0x77;
if ((param_2 & 0x400) != 0) {
uVar1 = 0x61;
}
*param_1 = uVar1;
local_10 = param_1 + 1;
}
else if ((param_2 & 2) == 0) {
local_10 = param_1 + 1;
*param_1 = 0x72;
}
else {
if ((param_2 & 0x240) == 0) {
if ((param_2 & 0x400) == 0) {
*param_1 = 0x72;
}
else {
*param_1 = 0x61;
}
}
else {
*param_1 = 0x77;
}
local_10 = param_1 + 1;
*local_10 = 0x2b;
local_10 = param_1 + 2;
}
*local_10 = 0x65;
local_10[1] = 0;
return;
}
|
|
19,542
|
my_xml_leave
|
eloqsql/strings/xml.c
|
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen)
{
char *e, *tag;
size_t glen;
char s[32];
char g[32];
int rc;
/* Find previous '/' or beginning */
for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--);
glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e);
tag= e[0] == '/' ? e + 1 : e;
if (str && (slen != glen || memcmp(str, tag, slen)))
{
mstr(s,str,sizeof(s)-1,slen);
if (glen)
{
mstr(g, tag, sizeof(g)-1, glen);
sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g);
}
else
sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s);
return MY_XML_ERROR;
}
if (p->flags & MY_XML_FLAG_RELATIVE_NAMES)
rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK;
else
rc= (p->leave_xml ?
p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) :
MY_XML_OK);
*e='\0';
p->attr.end= e;
return rc;
}
|
O3
|
c
|
my_xml_leave:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x118(%rdi), %r13
movq 0x120(%rdi), %rax
movq %rax, %rdx
movq %rax, %r12
subq %r13, %rdx
movq %rdi, -0x78(%rbp)
jbe 0x5adb4
movq %rax, %r12
cmpb $0x2f, (%r12)
je 0x5adbb
decq %r12
cmpq %r13, %r12
ja 0x5ada2
movq %r13, %r12
cmpb $0x2f, (%r12)
jne 0x5adcc
movq %r12, %rbx
notq %rbx
addq %rax, %rbx
movl $0x1, %r15d
jmp 0x5add5
subq %r12, %rax
xorl %r15d, %r15d
movq %rax, %rbx
testq %rsi, %rsi
je 0x5ae94
addq %r12, %r15
cmpq %r14, %rbx
jne 0x5ae12
movq %rsi, %rdi
movq %rsi, -0x88(%rbp)
movq %r15, %rsi
movq %rdx, -0x80(%rbp)
movq %r14, %rdx
callq 0x242d0
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rsi
testl %eax, %eax
je 0x5ae94
cmpq $0x1f, %r14
movl $0x1f, %r12d
cmovaeq %r12, %r14
leaq -0x50(%rbp), %rdi
movl $0x20, %ecx
movq %r14, %rdx
callq 0x24540
movb $0x0, -0x50(%rbp,%r14)
testq %rbx, %rbx
je 0x5aec3
cmpq $0x1f, %rbx
cmovbq %rbx, %r12
leaq -0x70(%rbp), %r13
movl $0x20, %ecx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x24540
movb $0x0, -0x70(%rbp,%r12)
movq -0x78(%rbp), %rdi
addq $0x8, %rdi
leaq 0x5c77(%rip), %rcx # 0x60aeb
movl $0x1, %r14d
leaq -0x50(%rbp), %r8
movl $0x80, %edx
movl $0x1, %esi
movq %r13, %r9
xorl %eax, %eax
callq 0x241c0
jmp 0x5aefe
movq -0x78(%rbp), %rbx
testb $0x1, (%rbx)
movq 0x158(%rbx), %rax
jne 0x5aeb1
testq %rax, %rax
je 0x5aeef
movq %rbx, %rdi
movq %r13, %rsi
jmp 0x5aebc
testq %rax, %rax
je 0x5aeef
movq %rbx, %rdi
movq %r14, %rdx
callq *%rax
movl %eax, %r14d
jmp 0x5aef2
movq -0x78(%rbp), %rdi
addq $0x8, %rdi
leaq 0x5c3d(%rip), %rcx # 0x60b0f
movl $0x1, %r14d
leaq -0x50(%rbp), %r8
movl $0x80, %edx
movl $0x1, %esi
xorl %eax, %eax
callq 0x241c0
jmp 0x5aefe
xorl %r14d, %r14d
movb $0x0, (%r12)
movq %r12, 0x120(%rbx)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5af1f
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24320
|
my_xml_leave:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13, [rdi+118h]
mov rax, [rdi+120h]
mov rdx, rax
mov r12, rax
sub rdx, r13
mov [rbp+var_78], rdi
jbe short loc_5ADB4
mov r12, rax
loc_5ADA2:
cmp byte ptr [r12], 2Fh ; '/'
jz short loc_5ADBB
dec r12
cmp r12, r13
ja short loc_5ADA2
mov r12, r13
loc_5ADB4:
cmp byte ptr [r12], 2Fh ; '/'
jnz short loc_5ADCC
loc_5ADBB:
mov rbx, r12
not rbx
add rbx, rax
mov r15d, 1
jmp short loc_5ADD5
loc_5ADCC:
sub rax, r12
xor r15d, r15d
mov rbx, rax
loc_5ADD5:
test rsi, rsi
jz loc_5AE94
add r15, r12
cmp rbx, r14
jnz short loc_5AE12
mov rdi, rsi
mov [rbp+var_88], rsi
mov rsi, r15
mov [rbp+var_80], rdx
mov rdx, r14
call _bcmp
mov rdx, [rbp+var_80]
mov rsi, [rbp+var_88]
test eax, eax
jz loc_5AE94
loc_5AE12:
cmp r14, 1Fh
mov r12d, 1Fh
cmovnb r14, r12
lea rdi, [rbp+var_50]
mov ecx, 20h ; ' '
mov rdx, r14
call ___memcpy_chk
mov [rbp+r14+var_50], 0
test rbx, rbx
jz loc_5AEC3
cmp rbx, 1Fh
cmovb r12, rbx
lea r13, [rbp+var_70]
mov ecx, 20h ; ' '
mov rdi, r13
mov rsi, r15
mov rdx, r12
call ___memcpy_chk
mov [rbp+r12+var_70], 0
mov rdi, [rbp+var_78]
add rdi, 8
lea rcx, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)"
mov r14d, 1
lea r8, [rbp+var_50]
mov edx, 80h
mov esi, 1
mov r9, r13
xor eax, eax
call ___sprintf_chk
jmp short loc_5AEFE
loc_5AE94:
mov rbx, [rbp+var_78]
test byte ptr [rbx], 1
mov rax, [rbx+158h]
jnz short loc_5AEB1
test rax, rax
jz short loc_5AEEF
mov rdi, rbx
mov rsi, r13
jmp short loc_5AEBC
loc_5AEB1:
test rax, rax
jz short loc_5AEEF
mov rdi, rbx
mov rdx, r14
loc_5AEBC:
call rax
mov r14d, eax
jmp short loc_5AEF2
loc_5AEC3:
mov rdi, [rbp+var_78]
add rdi, 8
lea rcx, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"...
mov r14d, 1
lea r8, [rbp+var_50]
mov edx, 80h
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp short loc_5AEFE
loc_5AEEF:
xor r14d, r14d
loc_5AEF2:
mov byte ptr [r12], 0
mov [rbx+120h], r12
loc_5AEFE:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5AF1F
mov eax, r14d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5AF1F:
call ___stack_chk_fail
|
long long my_xml_leave(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v4; // r13
_BYTE *v5; // rax
unsigned long long v6; // r12
unsigned long long v7; // rdx
unsigned long long v8; // rbx
long long v9; // r15
_BYTE *v10; // r15
int v11; // eax
long long v12; // r12
unsigned int v13; // r14d
long long ( *v14)(long long, unsigned long long, unsigned long long); // rax
_BYTE *v16; // [rsp+10h] [rbp-80h]
char v17[32]; // [rsp+20h] [rbp-70h] BYREF
char v18[32]; // [rsp+40h] [rbp-50h] BYREF
unsigned long long v19; // [rsp+60h] [rbp-30h]
v19 = __readfsqword(0x28u);
v4 = *(_QWORD *)(a1 + 280);
v5 = *(_BYTE **)(a1 + 288);
v6 = (unsigned long long)v5;
v7 = (unsigned long long)&v5[-v4];
if ( (unsigned long long)v5 <= v4 )
{
LABEL_6:
if ( *(_BYTE *)v6 != 47 )
{
v9 = 0LL;
v8 = (unsigned long long)&v5[-v6];
goto LABEL_9;
}
}
else
{
v6 = *(_QWORD *)(a1 + 288);
while ( *(_BYTE *)v6 != 47 )
{
if ( --v6 <= v4 )
{
v6 = *(_QWORD *)(a1 + 280);
goto LABEL_6;
}
}
}
v8 = (unsigned long long)&v5[~v6];
v9 = 1LL;
LABEL_9:
if ( !a2
|| (v10 = (_BYTE *)(v6 + v9), v8 == a3)
&& (v16 = &v5[-v4], v11 = bcmp(a2, v10, a3), v7 = (unsigned long long)v16, !v11) )
{
v14 = *(long long ( **)(long long, unsigned long long, unsigned long long))(a1 + 344);
if ( (*(_BYTE *)a1 & 1) != 0 )
{
if ( v14 )
{
v7 = a3;
goto LABEL_23;
}
}
else if ( v14 )
{
a2 = v4;
LABEL_23:
v13 = v14(a1, a2, v7);
LABEL_26:
*(_BYTE *)v6 = 0;
*(_QWORD *)(a1 + 288) = v6;
return v13;
}
v13 = 0;
goto LABEL_26;
}
v12 = 31LL;
if ( a3 >= 0x1F )
a3 = 31LL;
__memcpy_chk(v18, a2, a3, 32LL);
v18[a3] = 0;
if ( v8 )
{
if ( v8 < 0x1F )
v12 = v8;
__memcpy_chk(v17, v10, v12, 32LL);
v17[v12] = 0;
v13 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected ('</%s>' wanted)", v18, v17);
}
else
{
v13 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected (END-OF-INPUT wanted)", v18);
}
return v13;
}
|
my_xml_leave:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13,qword ptr [RDI + 0x118]
MOV RAX,qword ptr [RDI + 0x120]
MOV RDX,RAX
MOV R12,RAX
SUB RDX,R13
MOV qword ptr [RBP + -0x78],RDI
JBE 0x0015adb4
MOV R12,RAX
LAB_0015ada2:
CMP byte ptr [R12],0x2f
JZ 0x0015adbb
DEC R12
CMP R12,R13
JA 0x0015ada2
MOV R12,R13
LAB_0015adb4:
CMP byte ptr [R12],0x2f
JNZ 0x0015adcc
LAB_0015adbb:
MOV RBX,R12
NOT RBX
ADD RBX,RAX
MOV R15D,0x1
JMP 0x0015add5
LAB_0015adcc:
SUB RAX,R12
XOR R15D,R15D
MOV RBX,RAX
LAB_0015add5:
TEST RSI,RSI
JZ 0x0015ae94
ADD R15,R12
CMP RBX,R14
JNZ 0x0015ae12
MOV RDI,RSI
MOV qword ptr [RBP + -0x88],RSI
MOV RSI,R15
MOV qword ptr [RBP + -0x80],RDX
MOV RDX,R14
CALL 0x001242d0
MOV RDX,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x88]
TEST EAX,EAX
JZ 0x0015ae94
LAB_0015ae12:
CMP R14,0x1f
MOV R12D,0x1f
CMOVNC R14,R12
LEA RDI,[RBP + -0x50]
MOV ECX,0x20
MOV RDX,R14
CALL 0x00124540
MOV byte ptr [RBP + R14*0x1 + -0x50],0x0
TEST RBX,RBX
JZ 0x0015aec3
CMP RBX,0x1f
CMOVC R12,RBX
LEA R13,[RBP + -0x70]
MOV ECX,0x20
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x00124540
MOV byte ptr [RBP + R12*0x1 + -0x70],0x0
MOV RDI,qword ptr [RBP + -0x78]
ADD RDI,0x8
LEA RCX,[0x160aeb]
MOV R14D,0x1
LEA R8,[RBP + -0x50]
MOV EDX,0x80
MOV ESI,0x1
MOV R9,R13
XOR EAX,EAX
CALL 0x001241c0
JMP 0x0015aefe
LAB_0015ae94:
MOV RBX,qword ptr [RBP + -0x78]
TEST byte ptr [RBX],0x1
MOV RAX,qword ptr [RBX + 0x158]
JNZ 0x0015aeb1
TEST RAX,RAX
JZ 0x0015aeef
MOV RDI,RBX
MOV RSI,R13
JMP 0x0015aebc
LAB_0015aeb1:
TEST RAX,RAX
JZ 0x0015aeef
MOV RDI,RBX
MOV RDX,R14
LAB_0015aebc:
CALL RAX
MOV R14D,EAX
JMP 0x0015aef2
LAB_0015aec3:
MOV RDI,qword ptr [RBP + -0x78]
ADD RDI,0x8
LEA RCX,[0x160b0f]
MOV R14D,0x1
LEA R8,[RBP + -0x50]
MOV EDX,0x80
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001241c0
JMP 0x0015aefe
LAB_0015aeef:
XOR R14D,R14D
LAB_0015aef2:
MOV byte ptr [R12],0x0
MOV qword ptr [RBX + 0x120],R12
LAB_0015aefe:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015af1f
MOV EAX,R14D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015af1f:
CALL 0x00124320
|
int4 my_xml_leave(byte *param_1,char *param_2,char *param_3)
{
code *pcVar1;
int iVar2;
int4 uVar3;
char *pcVar4;
ulong uVar5;
char *pcVar6;
char *pcVar7;
char *pcVar8;
char *pcVar9;
long lVar10;
long in_FS_OFFSET;
char local_78 [32];
char local_58 [32];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar7 = *(char **)(param_1 + 0x118);
pcVar6 = *(char **)(param_1 + 0x120);
pcVar4 = pcVar6 + -(long)pcVar7;
pcVar9 = pcVar6;
pcVar8 = pcVar6;
if (pcVar7 <= pcVar6 && pcVar4 != (char *)0x0) {
do {
pcVar9 = pcVar8;
if (*pcVar8 == '/') goto LAB_0015adbb;
pcVar8 = pcVar8 + -1;
pcVar9 = pcVar7;
} while (pcVar7 < pcVar8);
}
if (*pcVar9 == '/') {
LAB_0015adbb:
uVar5 = ~(ulong)pcVar9;
lVar10 = 1;
}
else {
uVar5 = -(long)pcVar9;
lVar10 = 0;
}
pcVar6 = pcVar6 + uVar5;
if ((param_2 != (char *)0x0) &&
((pcVar6 != param_3 || (iVar2 = bcmp(param_2,pcVar9 + lVar10,(size_t)param_3), iVar2 != 0)))) {
if ((char *)0x1e < param_3) {
param_3 = (char *)0x1f;
}
__memcpy_chk(local_58,param_2,param_3,0x20);
local_58[(long)param_3] = '\0';
if (pcVar6 == (char *)0x0) {
uVar3 = 1;
__sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_58);
}
else {
pcVar7 = (char *)0x1f;
if (pcVar6 < (char *)0x1f) {
pcVar7 = pcVar6;
}
__memcpy_chk(local_78,pcVar9 + lVar10,pcVar7,0x20);
local_78[(long)pcVar7] = '\0';
uVar3 = 1;
__sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (\'</%s>\' wanted)",local_58,local_78);
}
goto LAB_0015aefe;
}
pcVar1 = *(code **)(param_1 + 0x158);
if ((*param_1 & 1) == 0) {
if (pcVar1 == (code *)0x0) goto LAB_0015aeef;
LAB_0015aebc:
uVar3 = (*pcVar1)(param_1,pcVar7,pcVar4);
}
else {
pcVar4 = param_3;
pcVar7 = param_2;
if (pcVar1 != (code *)0x0) goto LAB_0015aebc;
LAB_0015aeef:
uVar3 = 0;
}
*pcVar9 = '\0';
*(char **)(param_1 + 0x120) = pcVar9;
LAB_0015aefe:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
}
|
|
19,543
|
getWindowState
|
untodesu[P]riteg/build_O1/_deps/glfw-src/src/x11_window.c
|
static int getWindowState(_GLFWwindow* window)
{
int result = WithdrawnState;
struct {
CARD32 state;
Window icon;
} *state = NULL;
if (_glfwGetWindowPropertyX11(window->x11.handle,
_glfw.x11.WM_STATE,
_glfw.x11.WM_STATE,
(unsigned char**) &state) >= 2)
{
result = state->state;
}
if (state)
XFree(state);
return result;
}
|
O1
|
c
|
getWindowState:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq 0x348(%rdi), %rsi
leaq 0x80d84(%rip), %rcx # 0xa4638
movq 0x203f8(%rcx), %rdx
movq 0x1fec0(%rcx), %rdi
leaq 0x18(%rsp), %r10
leaq 0x20(%rsp), %r14
leaq 0x14(%rsp), %r11
leaq 0x28(%rsp), %r15
xorl %ebx, %ebx
movabsq $0x7fffffffffffffff, %r8 # imm = 0x7FFFFFFFFFFFFFFF
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r14
pushq %r11
pushq %r15
pushq %rdx
callq 0xc200
addq $0x30, %rsp
cmpq $0x2, (%r14)
jb 0x23907
movq 0x8(%rsp), %rax
movl (%rax), %ebx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x23916
callq 0xcac0
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
getWindowState:
push r15
push r14
push rbx
sub rsp, 30h
lea rax, [rsp+48h+var_40]
mov qword ptr [rax], 0
mov rsi, [rdi+348h]
lea rcx, _glfw
mov rdx, [rcx+203F8h]
mov rdi, [rcx+1FEC0h]
lea r10, [rsp+48h+var_30]
lea r14, [rsp+48h+var_28]
lea r11, [rsp+48h+var_34]
lea r15, [rsp+48h+var_20]
xor ebx, ebx
mov r8, 7FFFFFFFFFFFFFFFh
xor ecx, ecx
xor r9d, r9d
push rax
push r10
push r14
push r11
push r15
push rdx
call _XGetWindowProperty
add rsp, 30h
cmp qword ptr [r14], 2
jb short loc_23907
mov rax, [rsp+48h+var_40]
mov ebx, [rax]
loc_23907:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_23916
call _XFree
loc_23916:
mov eax, ebx
add rsp, 30h
pop rbx
pop r14
pop r15
retn
|
long long getWindowState(long long a1)
{
unsigned int v1; // ebx
unsigned int *v3; // [rsp+8h] [rbp-40h] BYREF
_BYTE v4[4]; // [rsp+14h] [rbp-34h] BYREF
_BYTE v5[8]; // [rsp+18h] [rbp-30h] BYREF
unsigned long long v6; // [rsp+20h] [rbp-28h] BYREF
_BYTE v7[32]; // [rsp+28h] [rbp-20h] BYREF
v3 = 0LL;
v1 = 0;
XGetWindowProperty(
*(_QWORD *)&glfw[32688],
*(_QWORD *)(a1 + 840),
*(_QWORD *)&glfw[33022],
0LL,
0x7FFFFFFFFFFFFFFFLL,
0LL,
*(_QWORD *)&glfw[33022],
v7,
v4,
&v6,
v5,
&v3);
if ( v6 >= 2 )
v1 = *v3;
if ( v3 )
XFree(v3);
return v1;
}
|
getWindowState:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],0x0
MOV RSI,qword ptr [RDI + 0x348]
LEA RCX,[0x1a4638]
MOV RDX,qword ptr [RCX + 0x203f8]
MOV RDI,qword ptr [RCX + 0x1fec0]
LEA R10,[RSP + 0x18]
LEA R14,[RSP + 0x20]
LEA R11,[RSP + 0x14]
LEA R15,[RSP + 0x28]
XOR EBX,EBX
MOV R8,0x7fffffffffffffff
XOR ECX,ECX
XOR R9D,R9D
PUSH RAX
PUSH R10
PUSH R14
PUSH R11
PUSH R15
PUSH RDX
CALL 0x0010c200
ADD RSP,0x30
CMP qword ptr [R14],0x2
JC 0x00123907
MOV RAX,qword ptr [RSP + 0x8]
MOV EBX,dword ptr [RAX]
LAB_00123907:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00123916
CALL 0x0010cac0
LAB_00123916:
MOV EAX,EBX
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
int4 getWindowState(long param_1)
{
int4 uVar1;
int4 *local_40;
int1 local_34 [4];
int1 local_30 [8];
ulong local_28;
int1 local_20 [8];
local_40 = (int4 *)0x0;
uVar1 = 0;
XGetWindowProperty(DAT_001c44f8,*(int8 *)(param_1 + 0x348),DAT_001c4a30,0,0x7fffffffffffffff
,0,DAT_001c4a30,local_20,local_34,&local_28,local_30,&local_40);
if (1 < local_28) {
uVar1 = *local_40;
}
if (local_40 != (int4 *)0x0) {
XFree();
}
return uVar1;
}
|
|
19,544
|
GetKeyPressed
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
|
int GetKeyPressed(void)
{
int value = 0;
if (CORE.Input.Keyboard.keyPressedQueueCount > 0)
{
// Get character from the queue head
value = CORE.Input.Keyboard.keyPressedQueue[0];
// Shift elements 1 step toward the head
for (int i = 0; i < (CORE.Input.Keyboard.keyPressedQueueCount - 1); i++)
CORE.Input.Keyboard.keyPressedQueue[i] = CORE.Input.Keyboard.keyPressedQueue[i + 1];
// Reset last character in the queue
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount - 1] = 0;
CORE.Input.Keyboard.keyPressedQueueCount--;
}
return value;
}
|
O0
|
c
|
GetKeyPressed:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
cmpl $0x0, 0x147802(%rip) # 0x21b384
jle 0xd3c09
movl 0x1477b6(%rip), %eax # 0x21b344
movl %eax, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl 0x1477e3(%rip), %ecx # 0x21b384
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xd3bdc
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x1470c8(%rip), %rax # 0x21ac80
movl 0x6c4(%rax,%rcx,4), %edx
movslq -0x8(%rbp), %rcx
leaq 0x1470b6(%rip), %rax # 0x21ac80
movl %edx, 0x6c4(%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xd3b98
movl 0x1477a2(%rip), %eax # 0x21b384
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x147091(%rip), %rax # 0x21ac80
movl $0x0, 0x6c4(%rax,%rcx,4)
movl 0x147784(%rip), %eax # 0x21b384
addl $-0x1, %eax
movl %eax, 0x14777b(%rip) # 0x21b384
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
|
GetKeyPressed:
push rbp
mov rbp, rsp
mov [rbp+var_4], 0
cmp cs:dword_21B384, 0
jle loc_D3C09
mov eax, cs:dword_21B344
mov [rbp+var_4], eax
mov [rbp+var_8], 0
loc_D3B98:
mov eax, [rbp+var_8]
mov ecx, cs:dword_21B384
sub ecx, 1
cmp eax, ecx
jge short loc_D3BDC
mov eax, [rbp+var_8]
add eax, 1
movsxd rcx, eax
lea rax, CORE
mov edx, [rax+rcx*4+6C4h]
movsxd rcx, [rbp+var_8]
lea rax, CORE
mov [rax+rcx*4+6C4h], edx
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_8], eax
jmp short loc_D3B98
loc_D3BDC:
mov eax, cs:dword_21B384
sub eax, 1
movsxd rcx, eax
lea rax, CORE
mov dword ptr [rax+rcx*4+6C4h], 0
mov eax, cs:dword_21B384
add eax, 0FFFFFFFFh
mov cs:dword_21B384, eax
loc_D3C09:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long GetKeyPressed()
{
int i; // [rsp+0h] [rbp-8h]
unsigned int v2; // [rsp+4h] [rbp-4h]
v2 = 0;
if ( dword_21B384 > 0 )
{
v2 = dword_21B344;
for ( i = 0; i < dword_21B384 - 1; ++i )
*((_DWORD *)&CORE[216] + i + 1) = *((_DWORD *)&CORE[217] + i);
*((_DWORD *)&CORE[216] + dword_21B384--) = 0;
}
return v2;
}
|
GetKeyPressed:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],0x0
CMP dword ptr [0x0031b384],0x0
JLE 0x001d3c09
MOV EAX,dword ptr [0x0031b344]
MOV dword ptr [RBP + -0x4],EAX
MOV dword ptr [RBP + -0x8],0x0
LAB_001d3b98:
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,dword ptr [0x0031b384]
SUB ECX,0x1
CMP EAX,ECX
JGE 0x001d3bdc
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOVSXD RCX,EAX
LEA RAX,[0x31ac80]
MOV EDX,dword ptr [RAX + RCX*0x4 + 0x6c4]
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x31ac80]
MOV dword ptr [RAX + RCX*0x4 + 0x6c4],EDX
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x001d3b98
LAB_001d3bdc:
MOV EAX,dword ptr [0x0031b384]
SUB EAX,0x1
MOVSXD RCX,EAX
LEA RAX,[0x31ac80]
MOV dword ptr [RAX + RCX*0x4 + 0x6c4],0x0
MOV EAX,dword ptr [0x0031b384]
ADD EAX,-0x1
MOV dword ptr [0x0031b384],EAX
LAB_001d3c09:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 GetKeyPressed(void)
{
int local_10;
int4 local_c;
local_c = 0;
if (0 < DAT_0031b384) {
local_c = _DAT_0031b344;
for (local_10 = 0; local_10 < DAT_0031b384 + -1; local_10 = local_10 + 1) {
*(int4 *)(&DAT_0031b344 + (long)local_10 * 4) =
*(int4 *)(&DAT_0031b344 + (long)(local_10 + 1) * 4);
}
*(int4 *)(&DAT_0031b344 + (long)(DAT_0031b384 + -1) * 4) = 0;
DAT_0031b384 = DAT_0031b384 + -1;
}
return local_c;
}
|
|
19,545
|
GetKeyPressed
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
|
int GetKeyPressed(void)
{
int value = 0;
if (CORE.Input.Keyboard.keyPressedQueueCount > 0)
{
// Get character from the queue head
value = CORE.Input.Keyboard.keyPressedQueue[0];
// Shift elements 1 step toward the head
for (int i = 0; i < (CORE.Input.Keyboard.keyPressedQueueCount - 1); i++)
CORE.Input.Keyboard.keyPressedQueue[i] = CORE.Input.Keyboard.keyPressedQueue[i + 1];
// Reset last character in the queue
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount - 1] = 0;
CORE.Input.Keyboard.keyPressedQueueCount--;
}
return value;
}
|
O2
|
c
|
GetKeyPressed:
movl 0xc3419(%rip), %esi # 0x1282e4
testl %esi, %esi
jle 0x64f10
movl 0xc33cf(%rip), %eax # 0x1282a4
xorl %edx, %edx
leaq 0xc2d02(%rip), %rcx # 0x127be0
decl %esi
movslq %esi, %rsi
cmpq %rsi, %rdx
jge 0x64f01
movl 0x6c8(%rcx,%rdx,4), %esi
movl %esi, 0x6c4(%rcx,%rdx,4)
incq %rdx
movl 0xc33e5(%rip), %esi # 0x1282e4
jmp 0x64ede
andl $0x0, 0x6c4(%rcx,%rsi,4)
decl 0xc33d5(%rip) # 0x1282e4
retq
xorl %eax, %eax
retq
|
GetKeyPressed:
mov esi, cs:dword_1282E4
test esi, esi
jle short loc_64F10
mov eax, cs:dword_1282A4
xor edx, edx
lea rcx, CORE
loc_64EDE:
dec esi
movsxd rsi, esi
cmp rdx, rsi
jge short loc_64F01
mov esi, [rcx+rdx*4+6C8h]
mov [rcx+rdx*4+6C4h], esi
inc rdx
mov esi, cs:dword_1282E4
jmp short loc_64EDE
loc_64F01:
and dword ptr [rcx+rsi*4+6C4h], 0
dec cs:dword_1282E4
retn
loc_64F10:
xor eax, eax
retn
|
long long GetKeyPressed()
{
int v0; // esi
long long result; // rax
long long i; // rdx
long long v3; // rsi
v0 = dword_1282E4;
if ( dword_1282E4 <= 0 )
return 0LL;
result = (unsigned int)dword_1282A4;
for ( i = 0LL; ; ++i )
{
v3 = v0 - 1;
if ( i >= v3 )
break;
*((_DWORD *)&CORE[216] + i + 1) = *((_DWORD *)&CORE[217] + i);
v0 = dword_1282E4;
}
*((_DWORD *)&CORE[216] + v3 + 1) = 0;
--dword_1282E4;
return result;
}
|
GetKeyPressed:
MOV ESI,dword ptr [0x002282e4]
TEST ESI,ESI
JLE 0x00164f10
MOV EAX,dword ptr [0x002282a4]
XOR EDX,EDX
LEA RCX,[0x227be0]
LAB_00164ede:
DEC ESI
MOVSXD RSI,ESI
CMP RDX,RSI
JGE 0x00164f01
MOV ESI,dword ptr [RCX + RDX*0x4 + 0x6c8]
MOV dword ptr [RCX + RDX*0x4 + 0x6c4],ESI
INC RDX
MOV ESI,dword ptr [0x002282e4]
JMP 0x00164ede
LAB_00164f01:
AND dword ptr [RCX + RSI*0x4 + 0x6c4],0x0
DEC dword ptr [0x002282e4]
RET
LAB_00164f10:
XOR EAX,EAX
RET
|
int4 GetKeyPressed(void)
{
int4 uVar1;
long lVar2;
if (0 < DAT_002282e4) {
uVar1 = DAT_002282a4;
for (lVar2 = 0; lVar2 < DAT_002282e4 + -1; lVar2 = lVar2 + 1) {
(&DAT_002282a4)[lVar2] = (&DAT_002282a8)[lVar2];
}
(&DAT_002282a4)[DAT_002282e4 + -1] = 0;
DAT_002282e4 = DAT_002282e4 + -1;
return uVar1;
}
return 0;
}
|
|
19,546
|
my_caseup_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static size_t
my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O0
|
c
|
my_caseup_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x6e2fa
jmp 0x6e2fc
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x6e32c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x6df60
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x6e335
jmp 0x6e388
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x72210
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x6df90
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x6e361
jmp 0x6e388
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x6e2fc
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
my_caseup_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_6E2FA:
jmp short $+2
loc_6E2FC:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_6E32C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_6E32C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_6E335
jmp short loc_6E388
loc_6E335:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_toupper_utf8mb4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_wc_mb_utf8mb4
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_6E361
jmp short loc_6E388
loc_6E361:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_6E2FC
loc_6E388:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
_BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_mb_wc_utf8mb4(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_toupper_utf8mb4(v8, v14);
v12 = my_wc_mb_utf8mb4(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
|
my_caseup_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016e2fa
LAB_0016e2fa:
JMP 0x0016e2fc
LAB_0016e2fc:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0016e32c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0016df60
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_0016e32c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x0016e335
JMP 0x0016e388
LAB_0016e335:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x00172210
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x0016df90
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x0016e361
JMP 0x0016e388
LAB_0016e361:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016e2fc
LAB_0016e388:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_utf8mb4(uVar1,&local_38);
iVar3 = my_wc_mb_utf8mb4(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
|
|
19,547
|
my_8bit_charset_flags_from_data
|
eloqsql/strings/ctype-simple.c
|
uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
}
|
O0
|
c
|
my_8bit_charset_flags_from_data:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x475b0
cmpb $0x0, %al
je 0x4758b
movl -0xc(%rbp), %eax
orl $0x1000, %eax # imm = 0x1000
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x47610
cmpb $0x0, %al
jne 0x475a3
movl -0xc(%rbp), %eax
orl $0x2000, %eax # imm = 0x2000
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
my_8bit_charset_flags_from_data:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rdi, [rbp+var_8]
call my_charset_is_8bit_pure_ascii
cmp al, 0
jz short loc_4758B
mov eax, [rbp+var_C]
or eax, 1000h
mov [rbp+var_C], eax
loc_4758B:
mov rdi, [rbp+var_8]
call my_charset_is_ascii_compatible
cmp al, 0
jnz short loc_475A3
mov eax, [rbp+var_C]
or eax, 2000h
mov [rbp+var_C], eax
loc_475A3:
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long my_8bit_charset_flags_from_data(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch]
v2 = 0;
if ( (unsigned __int8)my_charset_is_8bit_pure_ascii(a1) )
v2 = 4096;
if ( !(unsigned __int8)my_charset_is_ascii_compatible(a1) )
v2 |= 0x2000u;
return v2;
}
|
my_8bit_charset_flags_from_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001475b0
CMP AL,0x0
JZ 0x0014758b
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x1000
MOV dword ptr [RBP + -0xc],EAX
LAB_0014758b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00147610
CMP AL,0x0
JNZ 0x001475a3
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x2000
MOV dword ptr [RBP + -0xc],EAX
LAB_001475a3:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(int8 param_1)
{
char cVar1;
int4 local_14;
local_14 = 0;
cVar1 = my_charset_is_8bit_pure_ascii(param_1);
if (cVar1 != '\0') {
local_14 = 0x1000;
}
cVar1 = my_charset_is_ascii_compatible(param_1);
if (cVar1 == '\0') {
local_14 = local_14 | 0x2000;
}
return local_14;
}
|
|
19,548
|
process_dbl_arg
|
eloqsql/strings/my_vsnprintf.c
|
static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
}
|
O0
|
c
|
process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movb %al, -0x21(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jne 0x14d042
movq $0x6, -0x18(%rbp)
jmp 0x14d053
cmpq $0x1f, -0x18(%rbp)
jb 0x14d051
movq $0x1e, -0x18(%rbp)
jmp 0x14d053
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x14d075
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x14d088
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x66, %eax
jne 0x14d0bb
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %edi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1450f0
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x14d0e0
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x146b30
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
process_dbl_arg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
movsd [rbp+var_20], xmm0
mov [rbp+var_21], al
cmp [rbp+var_18], 0FFFFh
jnz short loc_14D042
mov [rbp+var_18], 6
jmp short loc_14D053
loc_14D042:
cmp [rbp+var_18], 1Fh
jb short loc_14D051
mov [rbp+var_18], 1Eh
loc_14D051:
jmp short $+2
loc_14D053:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
sub rcx, rdx
sub rcx, 1
cmp rax, rcx
jnb short loc_14D075
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short loc_14D088
loc_14D075:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
sub rax, 1
mov [rbp+var_30], rax
loc_14D088:
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
movsx eax, [rbp+var_21]
cmp eax, 66h ; 'f'
jnz short loc_14D0BB
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov edi, eax
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call my_fcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
jmp short loc_14D0E0
loc_14D0BB:
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_18]
mov esi, eax
mov rdx, [rbp+var_8]
mov edi, 1
xor eax, eax
mov ecx, eax
call my_gcvt
add rax, [rbp+var_8]
mov [rbp+var_8], rax
loc_14D0E0:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
_BYTE * process_dbl_arg(_BYTE *a1, long long a2, unsigned long long a3, char a4, double a5)
{
int v6; // [rsp+0h] [rbp-30h]
unsigned long long v7; // [rsp+18h] [rbp-18h]
v7 = a3;
if ( a3 == 0xFFFF )
{
v7 = 6LL;
}
else if ( a3 >= 0x1F )
{
v7 = 30LL;
}
if ( v7 >= a2 - (long long)a1 - 1 )
v6 = a2 - (_DWORD)a1 - 1;
else
v6 = v7;
if ( a4 == 102 )
return &a1[my_fcvt(v6, a1, 0LL, a5)];
else
return &a1[my_gcvt(1, v6, a1, 0LL, a5)];
}
| |||
19,549
|
process_dbl_arg
|
eloqsql/strings/my_vsnprintf.c
|
static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
}
|
O3
|
c
|
process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x1e, %rdx
movl $0x1e, %eax
cmovbq %rdx, %rax
cmpq $0xffff, %rdx # imm = 0xFFFF
movl $0x6, %edx
cmovneq %rax, %rdx
movq %rdi, %rbx
movq %rdi, %rax
notq %rax
addq %rsi, %rax
cmpq %rax, %rdx
cmovbq %rdx, %rax
cmpb $0x66, %cl
jne 0xd6d2c
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xd22b8
jmp 0xd6d3d
movl $0x1, %edi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xd363a
addq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
process_dbl_arg:
push rbp
mov rbp, rsp
push rbx
push rax
cmp rdx, 1Eh
mov eax, 1Eh
cmovb rax, rdx
cmp rdx, 0FFFFh
mov edx, 6
cmovnz rdx, rax
mov rbx, rdi
mov rax, rdi
not rax
add rax, rsi
cmp rdx, rax
cmovb rax, rdx
cmp cl, 66h ; 'f'
jnz short loc_D6D2C
mov edi, eax
mov rsi, rbx
xor edx, edx
call my_fcvt
jmp short loc_D6D3D
loc_D6D2C:
mov edi, 1
mov esi, eax
mov rdx, rbx
xor ecx, ecx
call my_gcvt
loc_D6D3D:
add rbx, rax
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
|
char * process_dbl_arg(unsigned long long a1, long long a2, unsigned long long a3, char a4, double a5)
{
long long v5; // rax
bool v6; // zf
unsigned long long v7; // rdx
unsigned long long v8; // rax
long long v9; // rax
v5 = 30LL;
if ( a3 < 0x1E )
v5 = a3;
v6 = a3 == 0xFFFF;
v7 = 6LL;
if ( !v6 )
v7 = v5;
v8 = a2 + ~a1;
if ( v7 < v8 )
LODWORD(v8) = v7;
if ( a4 == 102 )
v9 = (long long)my_fcvt(v8, (_WORD *)a1, 0LL);
else
v9 = my_gcvt(1, v8, (_WORD *)a1, 0LL, a5);
return (char *)(v9 + a1);
}
|
process_dbl_arg:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP RDX,0x1e
MOV EAX,0x1e
CMOVC RAX,RDX
CMP RDX,0xffff
MOV EDX,0x6
CMOVNZ RDX,RAX
MOV RBX,RDI
MOV RAX,RDI
NOT RAX
ADD RAX,RSI
CMP RDX,RAX
CMOVC RAX,RDX
CMP CL,0x66
JNZ 0x001d6d2c
MOV EDI,EAX
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001d22b8
JMP 0x001d6d3d
LAB_001d6d2c:
MOV EDI,0x1
MOV ESI,EAX
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001d363a
LAB_001d6d3d:
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
long process_dbl_arg(ulong param_1,long param_2,ulong param_3,char param_4)
{
ulong uVar1;
long lVar2;
ulong uVar3;
uVar1 = 0x1e;
if (param_3 < 0x1e) {
uVar1 = param_3;
}
uVar3 = 6;
if (param_3 != 0xffff) {
uVar3 = uVar1;
}
uVar1 = ~param_1 + param_2;
if (uVar3 < ~param_1 + param_2) {
uVar1 = uVar3;
}
if (param_4 == 'f') {
lVar2 = my_fcvt(uVar1 & 0xffffffff,param_1,0);
}
else {
lVar2 = my_gcvt(1,uVar1 & 0xffffffff,param_1,0);
}
return param_1 + lVar2;
}
|
|
19,550
|
mul_by_xy00z0_fp12
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/fp12_tower.c
|
static void mul_by_xy00z0_fp12(vec384fp12 ret, const vec384fp12 a,
const vec384fp6 xy00z0)
{
vec768fp6 t0, t1, rr;
vec384fp6 t2;
mul_by_xy0_fp6x2(t0, a[0], xy00z0);
mul_by_0y0_fp6x2(t1, a[1], xy00z0[2]);
/* ret[1] = (a0 + a1)*(b0 + b1) - a0*b0 - a1*b1
= a0*b1 + a1*b0 */
vec_copy(t2[0], xy00z0[0], sizeof(t2[0]));
add_fp2(t2[1], xy00z0[1], xy00z0[2]);
add_fp6(ret[1], a[0], a[1]);
mul_by_xy0_fp6x2(rr, ret[1], t2);
sub_fp6x2(rr, rr, t0);
sub_fp6x2(rr, rr, t1);
redc_fp6x2(ret[1], rr);
/* ret[0] = a0*b0 + a1*b1*v */
mul_by_u_plus_1_fp2x2(rr[0], t1[2]);
add_fp2x2(rr[0], t0[0], rr[0]);
add_fp2x2(rr[1], t0[1], t1[0]);
add_fp2x2(rr[2], t0[2], t1[1]);
redc_fp6x2(ret[0], rr);
}
|
O1
|
c
|
mul_by_xy00z0_fp12:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x858, %rsp # imm = 0x858
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, -0x48(%rbp)
leaq -0x880(%rbp), %rdi
callq 0x27f6e
movl $0x120, %eax # imm = 0x120
addq %r12, %rax
movq %rax, -0x30(%rbp)
movl $0xc0, %eax
leaq (%r13,%rax), %rbx
leaq -0x520(%rbp), %r14
leaq (%r14,%rax), %r15
movq %r15, -0x50(%rbp)
movl $0x1e0, %eax # imm = 0x1E0
leaq (%r12,%rax), %rsi
leaq 0x2005f(%rip), %rcx # 0x3fb20
movq %r15, %rdi
movq %rbx, %rdx
callq 0x33b60
movq %r14, %rdi
movl $0x120, %eax # imm = 0x120
addq %rax, %r14
movq %r15, %rsi
movq %r14, %rdx
movq %r14, -0x58(%rbp)
leaq 0x20038(%rip), %rcx # 0x3fb20
callq 0x30840
leaq -0x4c0(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
leaq 0x2001f(%rip), %r14 # 0x3fb20
movq %r14, %rcx
callq 0x30720
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x33b60
movl $0x180, %eax # imm = 0x180
leaq -0x520(%rbp), %rcx
leaq (%rcx,%rax), %rdi
movq %rdi, -0x40(%rbp)
leaq (%r12,%rax), %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x33b60
leaq -0x640(%rbp), %rdi
movl $0xc, %ecx
movq %r13, %rsi
rep movsq (%rsi), %es:(%rdi)
leaq -0x5e0(%rbp), %rdi
addq $0x60, %r13
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2f460
movq -0x48(%rbp), %rax
movl $0x120, %ecx # imm = 0x120
leaq (%rax,%rcx), %r15
movq %r15, -0x78(%rbp)
movq %r15, %rdi
movq %r12, %rsi
movq -0x30(%rbp), %rdx
callq 0x2794d
leaq -0x2e0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq -0x640(%rbp), %rdx
callq 0x27f6e
movq %r12, %rdi
movq %r12, %rsi
leaq -0x880(%rbp), %rdx
movq %rdx, %rbx
movq %r14, %rcx
callq 0x30840
leaq -0x280(%rbp), %rdi
leaq -0x820(%rbp), %rdx
movq %rdi, %rsi
movq %r14, %rcx
callq 0x30840
movl $0xc0, %eax
leaq (%r12,%rax), %r13
leaq (%rbx,%rax), %rdx
movq %rdx, -0x98(%rbp)
movq %r13, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x30840
movl $0x120, %edx # imm = 0x120
leaq (%r12,%rdx), %r15
addq %rbx, %rdx
movq %rdx, -0x90(%rbp)
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x30840
movl $0x180, %eax # imm = 0x180
addq %rax, %r12
leaq (%rbx,%rax), %rdx
movq %rdx, -0x88(%rbp)
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x30840
movl $0x1e0, %eax # imm = 0x1E0
leaq -0x2e0(%rbp), %rcx
leaq (%rcx,%rax), %rbx
leaq -0x880(%rbp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x30840
leaq -0x2e0(%rbp), %rdi
movq %rdi, %rsi
leaq -0x520(%rbp), %rdx
movq %r14, %rcx
callq 0x30840
leaq -0x280(%rbp), %rdi
movq %rdi, %rsi
leaq -0x4c0(%rbp), %rdx
movq %r14, %rcx
callq 0x30840
movq %r13, %rdi
movq %r13, %rsi
movq -0x50(%rbp), %rdx
movq %r14, %rcx
callq 0x30840
movq %r15, -0x38(%rbp)
movq %r15, %rdi
movq %r15, %rsi
movq -0x58(%rbp), %rdx
movq %r14, %rcx
callq 0x30840
movq %r12, %rdi
movq %r12, %rsi
movq %r12, -0x68(%rbp)
movq -0x40(%rbp), %rdx
movq %r14, %rcx
callq 0x30840
movl $0x1e0, %eax # imm = 0x1E0
leaq -0x520(%rbp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, -0x70(%rbp)
movq %rbx, -0x30(%rbp)
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x30840
movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD
movq -0x78(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
movq -0x48(%rbp), %rbx
leaq 0x150(%rbx), %rdi
leaq -0x280(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
movl $0x180, %edi # imm = 0x180
addq %rbx, %rdi
movq %r13, -0x60(%rbp)
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
leaq 0x1b0(%rbx), %rdi
movq -0x38(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
movl $0x1e0, %edi # imm = 0x1E0
addq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
leaq 0x210(%rbx), %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
leaq -0x2e0(%rbp), %rdi
movq -0x40(%rbp), %r12
movq %r12, %rsi
movq -0x70(%rbp), %r15
movq %r15, %rdx
movq %r14, %rcx
callq 0x30840
leaq -0x280(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x30720
leaq -0x2e0(%rbp), %rdi
leaq -0x880(%rbp), %rsi
movq %rdi, %rdx
movq %rdi, %r15
movq %r14, %rcx
callq 0x30720
leaq -0x280(%rbp), %rdi
leaq -0x820(%rbp), %rsi
movq %rdi, %rdx
movq %r14, %rcx
callq 0x30720
movq %r13, %rdi
movq -0x98(%rbp), %rsi
leaq -0x520(%rbp), %rdx
movq %r14, %rcx
callq 0x30720
movq -0x38(%rbp), %r13
movq %r13, %rdi
movq -0x90(%rbp), %rsi
leaq -0x4c0(%rbp), %rdx
movq %r14, %rcx
callq 0x30720
movq -0x68(%rbp), %r12
movq %r12, %rdi
movq -0x88(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r14, %rcx
callq 0x30720
movq -0x30(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %r14, %rcx
callq 0x30720
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD
movq %r15, %rcx
callq 0x344e0
leaq 0x30(%rbx), %rdi
leaq -0x280(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
leaq 0x60(%rbx), %rdi
movq -0x60(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
leaq 0x90(%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
movl $0xc0, %edi
addq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
addq $0xf0, %rbx
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x344e0
addq $0x858, %rsp # imm = 0x858
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mul_by_xy00z0_fp12:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 858h
mov r13, rdx
mov r12, rsi
mov [rbp+var_48], rdi
lea rdi, [rbp+var_880]
call mul_by_xy0_fp6x2
mov eax, 120h
add rax, r12
mov [rbp+var_30], rax
mov eax, 0C0h
lea rbx, [r13+rax+0]
lea r14, [rbp+var_520]
lea r15, [r14+rax]
mov [rbp+var_50], r15
mov eax, 1E0h
lea rsi, [r12+rax]
lea rcx, BLS12_381_P
mov rdi, r15
mov rdx, rbx
call mul_382x
mov rdi, r14
mov eax, 120h
add r14, rax
mov rsi, r15
mov rdx, r14
mov [rbp+var_58], r14
lea rcx, BLS12_381_P
call _sub_mod_384x384
lea rdi, [rbp+var_4C0]
mov rsi, r15
mov rdx, r14
lea r14, BLS12_381_P
mov rcx, r14
call add_mod_384x384
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r14
call mul_382x
mov eax, 180h
lea rcx, [rbp+var_520]
lea rdi, [rcx+rax]
mov [rbp+var_40], rdi
lea rsi, [r12+rax]
mov rdx, rbx
mov rcx, r14
call mul_382x
lea rdi, [rbp+var_640]
mov ecx, 0Ch
mov rsi, r13
rep movsq
lea rdi, [rbp+var_5E0]
add r13, 60h ; '`'
mov rsi, r13
mov rdx, rbx
mov rcx, r14
call add_mod_384x
mov rax, [rbp+var_48]
mov ecx, 120h
lea r15, [rax+rcx]
mov [rbp+var_78], r15
mov rdi, r15
mov rsi, r12
mov rdx, [rbp+var_30]
call add_fp6
lea r12, [rbp+var_2E0]
mov rdi, r12
mov rsi, r15
lea rdx, [rbp+var_640]
call mul_by_xy0_fp6x2
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_880]
mov rbx, rdx
mov rcx, r14
call _sub_mod_384x384
lea rdi, [rbp+var_280]
lea rdx, [rbp+var_820]
mov rsi, rdi
mov rcx, r14
call _sub_mod_384x384
mov eax, 0C0h
lea r13, [r12+rax]
lea rdx, [rbx+rax]
mov [rbp+var_98], rdx
mov rdi, r13
mov rsi, r13
mov rcx, r14
call _sub_mod_384x384
mov edx, 120h
lea r15, [r12+rdx]
add rdx, rbx
mov [rbp+var_90], rdx
mov rdi, r15
mov rsi, r15
mov rcx, r14
call _sub_mod_384x384
mov eax, 180h
add r12, rax
lea rdx, [rbx+rax]
mov [rbp+var_88], rdx
mov rdi, r12
mov rsi, r12
mov rcx, r14
call _sub_mod_384x384
mov eax, 1E0h
lea rcx, [rbp+var_2E0]
lea rbx, [rcx+rax]
lea rcx, [rbp+var_880]
lea rdx, [rcx+rax]
mov [rbp+var_80], rdx
mov rdi, rbx
mov rsi, rbx
mov rcx, r14
call _sub_mod_384x384
lea rdi, [rbp+var_2E0]
mov rsi, rdi
lea rdx, [rbp+var_520]
mov rcx, r14
call _sub_mod_384x384
lea rdi, [rbp+var_280]
mov rsi, rdi
lea rdx, [rbp+var_4C0]
mov rcx, r14
call _sub_mod_384x384
mov rdi, r13
mov rsi, r13
mov rdx, [rbp+var_50]
mov rcx, r14
call _sub_mod_384x384
mov [rbp+var_38], r15
mov rdi, r15
mov rsi, r15
mov rdx, [rbp+var_58]
mov rcx, r14
call _sub_mod_384x384
mov rdi, r12
mov rsi, r12
mov [rbp+var_68], r12
mov rdx, [rbp+var_40]
mov rcx, r14
call _sub_mod_384x384
mov eax, 1E0h
lea rcx, [rbp+var_520]
lea rdx, [rcx+rax]
mov [rbp+var_70], rdx
mov [rbp+var_30], rbx
mov rdi, rbx
mov rsi, rbx
mov rcx, r14
call _sub_mod_384x384
mov r15, 89F3FFFCFFFCFFFDh
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_2E0]
mov rdx, r14
mov rcx, r15
call redc_mont_384
mov rbx, [rbp+var_48]
lea rdi, [rbx+150h]
lea rsi, [rbp+var_280]
mov rdx, r14
mov rcx, r15
call redc_mont_384
mov edi, 180h
add rdi, rbx
mov [rbp+var_60], r13
mov rsi, r13
mov rdx, r14
mov rcx, r15
call redc_mont_384
lea rdi, [rbx+1B0h]
mov rsi, [rbp+var_38]
mov rdx, r14
mov rcx, r15
call redc_mont_384
mov edi, 1E0h
add rdi, rbx
mov rsi, r12
mov rdx, r14
mov rcx, r15
call redc_mont_384
lea rdi, [rbx+210h]
mov rsi, [rbp+var_30]
mov rdx, r14
mov rcx, r15
call redc_mont_384
lea rdi, [rbp+var_2E0]
mov r12, [rbp+var_40]
mov rsi, r12
mov r15, [rbp+var_70]
mov rdx, r15
mov rcx, r14
call _sub_mod_384x384
lea rdi, [rbp+var_280]
mov rsi, r12
mov rdx, r15
mov rcx, r14
call add_mod_384x384
lea rdi, [rbp+var_2E0]
lea rsi, [rbp+var_880]
mov rdx, rdi
mov r15, rdi
mov rcx, r14
call add_mod_384x384
lea rdi, [rbp+var_280]
lea rsi, [rbp+var_820]
mov rdx, rdi
mov rcx, r14
call add_mod_384x384
mov rdi, r13
mov rsi, [rbp+var_98]
lea rdx, [rbp+var_520]
mov rcx, r14
call add_mod_384x384
mov r13, [rbp+var_38]
mov rdi, r13
mov rsi, [rbp+var_90]
lea rdx, [rbp+var_4C0]
mov rcx, r14
call add_mod_384x384
mov r12, [rbp+var_68]
mov rdi, r12
mov rsi, [rbp+var_88]
mov rdx, [rbp+var_50]
mov rcx, r14
call add_mod_384x384
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_58]
mov rcx, r14
call add_mod_384x384
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov r15, 89F3FFFCFFFCFFFDh
mov rcx, r15
call redc_mont_384
lea rdi, [rbx+30h]
lea rsi, [rbp+var_280]
mov rdx, r14
mov rcx, r15
call redc_mont_384
lea rdi, [rbx+60h]
mov rsi, [rbp+var_60]
mov rdx, r14
mov rcx, r15
call redc_mont_384
lea rdi, [rbx+90h]
mov rsi, r13
mov rdx, r14
mov rcx, r15
call redc_mont_384
mov edi, 0C0h
add rdi, rbx
mov rsi, r12
mov rdx, r14
mov rcx, r15
call redc_mont_384
add rbx, 0F0h
mov rdi, rbx
mov rsi, [rbp+var_30]
mov rdx, r14
mov rcx, r15
call redc_mont_384
add rsp, 858h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mul_by_xy00z0_fp12(long long a1, long long a2, char *a3)
{
long long v4; // rbx
_BYTE *v5; // r12
_BYTE *v6; // r15
_BYTE *v7; // r13
_BYTE *v8; // r12
_BYTE v10[96]; // [rsp+0h] [rbp-880h] BYREF
_BYTE v11[96]; // [rsp+60h] [rbp-820h] BYREF
_BYTE v12[96]; // [rsp+C0h] [rbp-7C0h] BYREF
_BYTE v13[96]; // [rsp+120h] [rbp-760h] BYREF
_BYTE v14[96]; // [rsp+180h] [rbp-700h] BYREF
_BYTE v15[96]; // [rsp+1E0h] [rbp-6A0h] BYREF
_BYTE v16[96]; // [rsp+240h] [rbp-640h] BYREF
_BYTE v17[192]; // [rsp+2A0h] [rbp-5E0h] BYREF
_BYTE v18[96]; // [rsp+360h] [rbp-520h] BYREF
_BYTE v19[96]; // [rsp+3C0h] [rbp-4C0h] BYREF
_BYTE v20[96]; // [rsp+420h] [rbp-460h] BYREF
_BYTE v21[96]; // [rsp+480h] [rbp-400h] BYREF
_BYTE v22[96]; // [rsp+4E0h] [rbp-3A0h] BYREF
_BYTE v23[96]; // [rsp+540h] [rbp-340h] BYREF
_BYTE v24[96]; // [rsp+5A0h] [rbp-2E0h] BYREF
_BYTE v25[96]; // [rsp+600h] [rbp-280h] BYREF
_BYTE v26[96]; // [rsp+660h] [rbp-220h] BYREF
_BYTE v27[96]; // [rsp+6C0h] [rbp-1C0h] BYREF
_BYTE v28[96]; // [rsp+720h] [rbp-160h] BYREF
_BYTE v29[104]; // [rsp+780h] [rbp-100h] BYREF
_BYTE *v30; // [rsp+7E8h] [rbp-98h]
_BYTE *v31; // [rsp+7F0h] [rbp-90h]
_BYTE *v32; // [rsp+7F8h] [rbp-88h]
_BYTE *v33; // [rsp+800h] [rbp-80h]
long long v34; // [rsp+808h] [rbp-78h]
_BYTE *v35; // [rsp+810h] [rbp-70h]
_BYTE *v36; // [rsp+818h] [rbp-68h]
_BYTE *v37; // [rsp+820h] [rbp-60h]
_BYTE *v38; // [rsp+828h] [rbp-58h]
_BYTE *v39; // [rsp+830h] [rbp-50h]
long long v40; // [rsp+838h] [rbp-48h]
_BYTE *v41; // [rsp+840h] [rbp-40h]
_BYTE *v42; // [rsp+848h] [rbp-38h]
_BYTE *v43; // [rsp+850h] [rbp-30h]
v40 = a1;
mul_by_xy0_fp6x2(v10);
v43 = (_BYTE *)(a2 + 288);
v39 = v20;
mul_382x(v20, a2 + 480, a3 + 192, &BLS12_381_P);
v38 = v21;
sub_mod_384x384(v18, v20, v21, &BLS12_381_P);
add_mod_384x384(v19, v20, v21, &BLS12_381_P);
mul_382x(v20, v43, a3 + 192, &BLS12_381_P);
v41 = v22;
mul_382x(v22, a2 + 384, a3 + 192, &BLS12_381_P);
qmemcpy(v16, a3, sizeof(v16));
add_mod_384x(v17, a3 + 96, a3 + 192, &BLS12_381_P);
v34 = v40 + 288;
add_fp6(v40 + 288, a2, v43);
mul_by_xy0_fp6x2(v24);
sub_mod_384x384(v24, v24, v10, &BLS12_381_P);
sub_mod_384x384(v25, v25, v11, &BLS12_381_P);
v30 = v12;
sub_mod_384x384(v26, v26, v12, &BLS12_381_P);
v31 = v13;
sub_mod_384x384(v27, v27, v13, &BLS12_381_P);
v32 = v14;
sub_mod_384x384(v28, v28, v14, &BLS12_381_P);
v33 = v15;
sub_mod_384x384(v29, v29, v15, &BLS12_381_P);
sub_mod_384x384(v24, v24, v18, &BLS12_381_P);
sub_mod_384x384(v25, v25, v19, &BLS12_381_P);
sub_mod_384x384(v26, v26, v39, &BLS12_381_P);
v42 = v27;
sub_mod_384x384(v42, v42, v38, &BLS12_381_P);
v36 = v28;
sub_mod_384x384(v36, v36, v41, &BLS12_381_P);
v35 = v23;
v43 = v29;
sub_mod_384x384(v29, v29, v23, &BLS12_381_P);
redc_mont_384(v34, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v4 = v40;
redc_mont_384(v40 + 336, v25, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v37 = v26;
redc_mont_384(v4 + 384, v26, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 432, v42, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 480, v28, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 528, v43, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v5 = v41;
v6 = v35;
sub_mod_384x384(v24, v41, v35, &BLS12_381_P);
add_mod_384x384(v25, v5, v6, &BLS12_381_P);
add_mod_384x384(v24, v10, v24, &BLS12_381_P);
add_mod_384x384(v25, v11, v25, &BLS12_381_P);
add_mod_384x384(v26, v30, v18, &BLS12_381_P);
v7 = v42;
add_mod_384x384(v42, v31, v19, &BLS12_381_P);
v8 = v36;
add_mod_384x384(v36, v32, v39, &BLS12_381_P);
add_mod_384x384(v43, v33, v38, &BLS12_381_P);
redc_mont_384(v4, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 48, v25, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 96, v37, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 144, v7, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
redc_mont_384(v4 + 192, v8, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
return redc_mont_384(v4 + 240, v43, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
}
|
mul_by_xy00z0_fp12:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x858
MOV R13,RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x48],RDI
LEA RDI,[RBP + -0x880]
CALL 0x00127f6e
MOV EAX,0x120
ADD RAX,R12
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,0xc0
LEA RBX,[R13 + RAX*0x1]
LEA R14,[RBP + -0x520]
LEA R15,[R14 + RAX*0x1]
MOV qword ptr [RBP + -0x50],R15
MOV EAX,0x1e0
LEA RSI,[R12 + RAX*0x1]
LEA RCX,[0x13fb20]
MOV RDI,R15
MOV RDX,RBX
CALL 0x00133b60
MOV RDI,R14
MOV EAX,0x120
ADD R14,RAX
MOV RSI,R15
MOV RDX,R14
MOV qword ptr [RBP + -0x58],R14
LEA RCX,[0x13fb20]
CALL 0x00130840
LEA RDI,[RBP + -0x4c0]
MOV RSI,R15
MOV RDX,R14
LEA R14,[0x13fb20]
MOV RCX,R14
CALL 0x00130720
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,RBX
MOV RCX,R14
CALL 0x00133b60
MOV EAX,0x180
LEA RCX,[RBP + -0x520]
LEA RDI,[RCX + RAX*0x1]
MOV qword ptr [RBP + -0x40],RDI
LEA RSI,[R12 + RAX*0x1]
MOV RDX,RBX
MOV RCX,R14
CALL 0x00133b60
LEA RDI,[RBP + -0x640]
MOV ECX,0xc
MOV RSI,R13
MOVSQ.REP RDI,RSI
LEA RDI,[RBP + -0x5e0]
ADD R13,0x60
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
CALL 0x0012f460
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,0x120
LEA R15,[RAX + RCX*0x1]
MOV qword ptr [RBP + -0x78],R15
MOV RDI,R15
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0012794d
LEA R12,[RBP + -0x2e0]
MOV RDI,R12
MOV RSI,R15
LEA RDX,[RBP + -0x640]
CALL 0x00127f6e
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0x880]
MOV RBX,RDX
MOV RCX,R14
CALL 0x00130840
LEA RDI,[RBP + -0x280]
LEA RDX,[RBP + -0x820]
MOV RSI,RDI
MOV RCX,R14
CALL 0x00130840
MOV EAX,0xc0
LEA R13,[R12 + RAX*0x1]
LEA RDX,[RBX + RAX*0x1]
MOV qword ptr [RBP + -0x98],RDX
MOV RDI,R13
MOV RSI,R13
MOV RCX,R14
CALL 0x00130840
MOV EDX,0x120
LEA R15,[R12 + RDX*0x1]
ADD RDX,RBX
MOV qword ptr [RBP + -0x90],RDX
MOV RDI,R15
MOV RSI,R15
MOV RCX,R14
CALL 0x00130840
MOV EAX,0x180
ADD R12,RAX
LEA RDX,[RBX + RAX*0x1]
MOV qword ptr [RBP + -0x88],RDX
MOV RDI,R12
MOV RSI,R12
MOV RCX,R14
CALL 0x00130840
MOV EAX,0x1e0
LEA RCX,[RBP + -0x2e0]
LEA RBX,[RCX + RAX*0x1]
LEA RCX,[RBP + -0x880]
LEA RDX,[RCX + RAX*0x1]
MOV qword ptr [RBP + -0x80],RDX
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R14
CALL 0x00130840
LEA RDI,[RBP + -0x2e0]
MOV RSI,RDI
LEA RDX,[RBP + -0x520]
MOV RCX,R14
CALL 0x00130840
LEA RDI,[RBP + -0x280]
MOV RSI,RDI
LEA RDX,[RBP + -0x4c0]
MOV RCX,R14
CALL 0x00130840
MOV RDI,R13
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,R14
CALL 0x00130840
MOV qword ptr [RBP + -0x38],R15
MOV RDI,R15
MOV RSI,R15
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,R14
CALL 0x00130840
MOV RDI,R12
MOV RSI,R12
MOV qword ptr [RBP + -0x68],R12
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R14
CALL 0x00130840
MOV EAX,0x1e0
LEA RCX,[RBP + -0x520]
LEA RDX,[RCX + RAX*0x1]
MOV qword ptr [RBP + -0x70],RDX
MOV qword ptr [RBP + -0x30],RBX
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R14
CALL 0x00130840
MOV R15,-0x760c000300030003
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x2e0]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
MOV RBX,qword ptr [RBP + -0x48]
LEA RDI,[RBX + 0x150]
LEA RSI,[RBP + -0x280]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
MOV EDI,0x180
ADD RDI,RBX
MOV qword ptr [RBP + -0x60],R13
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
LEA RDI,[RBX + 0x1b0]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
MOV EDI,0x1e0
ADD RDI,RBX
MOV RSI,R12
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
LEA RDI,[RBX + 0x210]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
LEA RDI,[RBP + -0x2e0]
MOV R12,qword ptr [RBP + -0x40]
MOV RSI,R12
MOV R15,qword ptr [RBP + -0x70]
MOV RDX,R15
MOV RCX,R14
CALL 0x00130840
LEA RDI,[RBP + -0x280]
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x00130720
LEA RDI,[RBP + -0x2e0]
LEA RSI,[RBP + -0x880]
MOV RDX,RDI
MOV R15,RDI
MOV RCX,R14
CALL 0x00130720
LEA RDI,[RBP + -0x280]
LEA RSI,[RBP + -0x820]
MOV RDX,RDI
MOV RCX,R14
CALL 0x00130720
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x98]
LEA RDX,[RBP + -0x520]
MOV RCX,R14
CALL 0x00130720
MOV R13,qword ptr [RBP + -0x38]
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x90]
LEA RDX,[RBP + -0x4c0]
MOV RCX,R14
CALL 0x00130720
MOV R12,qword ptr [RBP + -0x68]
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,R14
CALL 0x00130720
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,R14
CALL 0x00130720
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV R15,-0x760c000300030003
MOV RCX,R15
CALL 0x001344e0
LEA RDI,[RBX + 0x30]
LEA RSI,[RBP + -0x280]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
LEA RDI,[RBX + 0x60]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
LEA RDI,[RBX + 0x90]
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
MOV EDI,0xc0
ADD RDI,RBX
MOV RSI,R12
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
ADD RBX,0xf0
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R14
MOV RCX,R15
CALL 0x001344e0
ADD RSP,0x858
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mul_by_xy00z0_fp12(long param_1,long param_2,int8 *param_3)
{
int8 *puVar1;
int1 *puVar2;
int1 *puVar3;
long lVar4;
int8 *puVar5;
int8 *puVar6;
byte bVar7;
int1 local_888 [96];
int1 local_828 [96];
int1 local_7c8 [96];
int1 auStack_768 [96];
int1 local_708 [96];
int1 local_6a8 [96];
int8 local_648 [12];
int1 local_5e8 [192];
int1 local_528 [96];
int1 local_4c8 [96];
int1 local_468 [96];
int1 auStack_408 [96];
int1 local_3a8 [96];
int1 local_348 [96];
int1 local_2e8 [96];
int1 local_288 [96];
int1 local_228 [96];
int1 local_1c8 [96];
int1 auStack_168 [96];
int1 local_108 [104];
int1 *local_a0;
int1 *local_98;
int1 *local_90;
int1 *local_88;
long local_80;
int1 *local_78;
int1 *local_70;
int1 *local_68;
int1 *local_60;
int1 *local_58;
long local_50;
int1 *local_48;
int1 *local_40;
int1 *local_38;
bVar7 = 0;
local_50 = param_1;
mul_by_xy0_fp6x2(local_888);
local_38 = (int1 *)(param_2 + 0x120);
puVar1 = param_3 + 0x18;
local_58 = local_468;
mul_382x(local_468,param_2 + 0x1e0,puVar1,BLS12_381_P);
local_60 = auStack_408;
sub_mod_384x384(local_528,local_468,auStack_408,BLS12_381_P);
add_mod_384x384(local_4c8,local_468,auStack_408,BLS12_381_P);
mul_382x(local_468,local_38,puVar1,BLS12_381_P);
local_48 = local_3a8;
mul_382x(local_48,param_2 + 0x180,puVar1,BLS12_381_P);
puVar5 = param_3;
puVar6 = local_648;
for (lVar4 = 0xc; lVar4 != 0; lVar4 = lVar4 + -1) {
*puVar6 = *puVar5;
puVar5 = puVar5 + (ulong)bVar7 * -2 + 1;
puVar6 = puVar6 + (ulong)bVar7 * -2 + 1;
}
add_mod_384x(local_5e8,param_3 + 0xc,puVar1,BLS12_381_P);
lVar4 = local_50 + 0x120;
local_80 = lVar4;
add_fp6(lVar4,param_2,local_38);
mul_by_xy0_fp6x2(local_2e8,lVar4,local_648);
sub_mod_384x384(local_2e8,local_2e8,local_888,BLS12_381_P);
sub_mod_384x384(local_288,local_288,local_828,BLS12_381_P);
local_a0 = local_7c8;
sub_mod_384x384(local_228,local_228,local_a0,BLS12_381_P);
local_98 = auStack_768;
sub_mod_384x384(local_1c8,local_1c8,local_98,BLS12_381_P);
local_90 = local_708;
sub_mod_384x384(auStack_168,auStack_168,local_90,BLS12_381_P);
local_88 = local_6a8;
sub_mod_384x384(local_108,local_108,local_88,BLS12_381_P);
sub_mod_384x384(local_2e8,local_2e8,local_528,BLS12_381_P);
sub_mod_384x384(local_288,local_288,local_4c8,BLS12_381_P);
sub_mod_384x384(local_228,local_228,local_58,BLS12_381_P);
local_40 = local_1c8;
sub_mod_384x384(local_1c8,local_1c8,local_60,BLS12_381_P);
local_70 = auStack_168;
sub_mod_384x384(auStack_168,auStack_168,local_48,BLS12_381_P);
local_78 = local_348;
local_38 = local_108;
sub_mod_384x384(local_108,local_108,local_78,BLS12_381_P);
redc_mont_384(local_80,local_2e8,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = local_50;
redc_mont_384(local_50 + 0x150,local_288,BLS12_381_P,0x89f3fffcfffcfffd);
local_68 = local_228;
redc_mont_384(lVar4 + 0x180,local_228,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0x1b0,local_40,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0x1e0,auStack_168,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0x210,local_38,BLS12_381_P,0x89f3fffcfffcfffd);
puVar3 = local_48;
puVar2 = local_78;
sub_mod_384x384(local_2e8,local_48,local_78,BLS12_381_P);
add_mod_384x384(local_288,puVar3,puVar2,BLS12_381_P);
add_mod_384x384(local_2e8,local_888,local_2e8,BLS12_381_P);
add_mod_384x384(local_288,local_828,local_288,BLS12_381_P);
add_mod_384x384(local_228,local_a0,local_528,BLS12_381_P);
puVar3 = local_40;
add_mod_384x384(local_40,local_98,local_4c8,BLS12_381_P);
puVar2 = local_70;
add_mod_384x384(local_70,local_90,local_58,BLS12_381_P);
add_mod_384x384(local_38,local_88,local_60,BLS12_381_P);
redc_mont_384(lVar4,local_2e8,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0x30,local_288,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0x60,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0x90,puVar3,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0xc0,puVar2,BLS12_381_P,0x89f3fffcfffcfffd);
redc_mont_384(lVar4 + 0xf0,local_38,BLS12_381_P,0x89f3fffcfffcfffd);
return;
}
|
|
19,551
|
google::protobuf::GeneratedCodeInfo_Annotation::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
uint8_t* GeneratedCodeInfo_Annotation::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated int32 path = 1 [packed = true];
{
int byte_size = _impl_._path_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
1, _internal_path(), byte_size, target);
}
}
cached_has_bits = _impl_._has_bits_[0];
// optional string source_file = 2;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source_file().data(), static_cast<int>(this->_internal_source_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"google.protobuf.GeneratedCodeInfo.Annotation.source_file");
target = stream->WriteStringMaybeAliased(
2, this->_internal_source_file(), target);
}
// optional int32 begin = 3;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_begin(), target);
}
// optional int32 end = 4;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_end(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation)
return target;
}
|
O3
|
cpp
|
google::protobuf::GeneratedCodeInfo_Annotation::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rax
movq %rdi, %r14
movl 0x28(%rdi), %ebp
testl %ebp, %ebp
jle 0xf9918
cmpq %rax, (%rbx)
jbe 0xf9a65
movb $0xa, (%rax)
leaq 0x1(%rax), %rcx
cmpl $0x80, %ebp
jae 0xf9a46
addq $0x2, %rax
movb %bpl, (%rcx)
movq 0x20(%r14), %r15
movslq 0x18(%r14), %rcx
leaq (%r15,%rcx,4), %r12
movq %rax, %rsi
cmpq %rsi, (%rbx)
jbe 0xf990b
movslq (%r15), %rcx
movb %cl, (%rsi)
cmpq $0x7f, %rcx
ja 0xf98bc
incq %rsi
movq %rsi, %rax
jmp 0xf98fd
movl %ecx, %edx
movl %ecx, %eax
orb $-0x80, %al
movb %al, (%rsi)
shrq $0x7, %rcx
movb %cl, 0x1(%rsi)
leaq 0x2(%rsi), %rax
cmpl $0x4000, %edx # imm = 0x4000
jb 0xf98fd
movb 0x1(%rsi), %sil
movq %rcx, %rdx
orb $-0x80, %sil
movb %sil, -0x1(%rax)
shrq $0x7, %rdx
movb %dl, (%rax)
incq %rax
movl %edx, %esi
cmpq $0x3fff, %rcx # imm = 0x3FFF
movq %rdx, %rcx
ja 0xf98de
addq $0x4, %r15
movq %rax, %rsi
cmpq %r12, %r15
jb 0xf98a4
jmp 0xf9918
movq %rbx, %rdi
callq 0x2f106
movq %rax, %rsi
jmp 0xf98a9
movl 0x10(%r14), %ebp
testb $0x1, %bpl
je 0xf993a
movq 0x30(%r14), %rdx
andq $-0x4, %rdx
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rcx
callq 0x7442a
testb $0x2, %bpl
je 0xf995d
cmpq %rax, (%rbx)
jbe 0xf9a75
movslq 0x38(%r14), %rcx
movb $0x18, (%rax)
movb %cl, 0x1(%rax)
cmpq $0x7f, %rcx
ja 0xf999d
addq $0x2, %rax
movq %rax, %rsi
testb $0x4, %bpl
je 0xf9983
cmpq %rsi, (%rbx)
jbe 0xf9a85
movslq 0x3c(%r14), %rcx
movb $0x20, (%rsi)
movb %cl, 0x1(%rsi)
cmpq $0x7f, %rcx
ja 0xf99e4
addq $0x2, %rsi
movq %rsi, %rax
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0xf9a2b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %edx
movl %ecx, %esi
orb $-0x80, %sil
movb %sil, 0x1(%rax)
shrq $0x7, %rcx
movb %cl, 0x2(%rax)
leaq 0x3(%rax), %rsi
cmpl $0x4000, %edx # imm = 0x4000
jb 0xf9960
movb 0x2(%rax), %dl
movq %rcx, %rax
orb $-0x80, %dl
movb %dl, -0x1(%rsi)
shrq $0x7, %rax
movb %al, (%rsi)
incq %rsi
movl %eax, %edx
cmpq $0x3fff, %rcx # imm = 0x3FFF
movq %rax, %rcx
ja 0xf99c2
jmp 0xf9960
movl %ecx, %edx
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x1(%rsi)
shrq $0x7, %rcx
movb %cl, 0x2(%rsi)
leaq 0x3(%rsi), %rax
cmpl $0x4000, %edx # imm = 0x4000
jb 0xf9986
movb 0x2(%rsi), %sil
movq %rcx, %rdx
orb $-0x80, %sil
movb %sil, -0x1(%rax)
shrq $0x7, %rdx
movb %dl, (%rax)
incq %rax
movl %edx, %esi
cmpq $0x3fff, %rcx # imm = 0x3FFF
movq %rdx, %rcx
ja 0xf9a07
jmp 0xf9986
andq $-0x4, %rdi
addq $0x8, %rdi
movq %rax, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa6e1e
movl %ebp, %eax
movl %eax, %edx
orb $-0x80, %dl
movb %dl, (%rcx)
shrl $0x7, %ebp
incq %rcx
cmpl $0x3fff, %eax # imm = 0x3FFF
ja 0xf9a46
leaq -0x1(%rcx), %rax
jmp 0xf988e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f106
jmp 0xf987b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f106
jmp 0xf9949
movq %rbx, %rdi
callq 0x2f106
movq %rax, %rsi
jmp 0xf996f
nop
|
_ZNK6google8protobuf28GeneratedCodeInfo_Annotation18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov rax, rsi
mov r14, rdi
mov ebp, [rdi+28h]
test ebp, ebp
jle loc_F9918
cmp [rbx], rax
jbe loc_F9A65
loc_F987B:
mov byte ptr [rax], 0Ah
lea rcx, [rax+1]
cmp ebp, 80h
jnb loc_F9A46
loc_F988E:
add rax, 2
mov [rcx], bpl
mov r15, [r14+20h]
movsxd rcx, dword ptr [r14+18h]
lea r12, [r15+rcx*4]
mov rsi, rax; unsigned __int8 *
loc_F98A4:
cmp [rbx], rsi
jbe short loc_F990B
loc_F98A9:
movsxd rcx, dword ptr [r15]
mov [rsi], cl
cmp rcx, 7Fh
ja short loc_F98BC
inc rsi
mov rax, rsi
jmp short loc_F98FD
loc_F98BC:
mov edx, ecx
mov eax, ecx
or al, 80h
mov [rsi], al
shr rcx, 7
mov [rsi+1], cl
lea rax, [rsi+2]
cmp edx, 4000h
jb short loc_F98FD
mov sil, [rsi+1]
mov rdx, rcx
loc_F98DE:
or sil, 80h
mov [rax-1], sil
shr rdx, 7
mov [rax], dl
inc rax
mov esi, edx
cmp rcx, 3FFFh
mov rcx, rdx
ja short loc_F98DE
loc_F98FD:
add r15, 4
mov rsi, rax
cmp r15, r12
jb short loc_F98A4
jmp short loc_F9918
loc_F990B:
mov rdi, rbx; this
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rsi, rax
jmp short loc_F98A9
loc_F9918:
mov ebp, [r14+10h]
test bpl, 1
jz short loc_F993A
mov rdx, [r14+30h]
and rdx, 0FFFFFFFFFFFFFFFCh
mov rdi, rbx
mov esi, 2
mov rcx, rax
call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *)
loc_F993A:
test bpl, 2
jz short loc_F995D
cmp [rbx], rax
jbe loc_F9A75
loc_F9949:
movsxd rcx, dword ptr [r14+38h]
mov byte ptr [rax], 18h
mov [rax+1], cl
cmp rcx, 7Fh
ja short loc_F999D
add rax, 2
loc_F995D:
mov rsi, rax; unsigned __int8 *
loc_F9960:
test bpl, 4
jz short loc_F9983
cmp [rbx], rsi
jbe loc_F9A85
loc_F996F:
movsxd rcx, dword ptr [r14+3Ch]; google::protobuf::io::EpsCopyOutputStream *
mov byte ptr [rsi], 20h ; ' '
mov [rsi+1], cl
cmp rcx, 7Fh
ja short loc_F99E4
add rsi, 2
loc_F9983:
mov rax, rsi
loc_F9986:
mov rdi, [r14+8]
test dil, 1
jnz loc_F9A2B
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_F999D:
mov edx, ecx
mov esi, ecx
or sil, 80h
mov [rax+1], sil
shr rcx, 7
mov [rax+2], cl
lea rsi, [rax+3]
cmp edx, 4000h
jb short loc_F9960
mov dl, [rax+2]
mov rax, rcx
loc_F99C2:
or dl, 80h
mov [rsi-1], dl
shr rax, 7
mov [rsi], al
inc rsi
mov edx, eax
cmp rcx, 3FFFh
mov rcx, rax
ja short loc_F99C2
jmp loc_F9960
loc_F99E4:
mov edx, ecx
mov eax, ecx
or al, 80h
mov [rsi+1], al
shr rcx, 7
mov [rsi+2], cl
lea rax, [rsi+3]
cmp edx, 4000h
jb short loc_F9986
mov sil, [rsi+2]
mov rdx, rcx
loc_F9A07:
or sil, 80h
mov [rax-1], sil
shr rdx, 7
mov [rax], dl
inc rax
mov esi, edx
cmp rcx, 3FFFh
mov rcx, rdx
ja short loc_F9A07
jmp loc_F9986
loc_F9A2B:
and rdi, 0FFFFFFFFFFFFFFFCh
add rdi, 8; this
mov rsi, rax; google::protobuf::UnknownFieldSet *
mov rdx, rbx; unsigned __int8 *
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
loc_F9A46:
mov eax, ebp
mov edx, eax
or dl, 80h
mov [rcx], dl
shr ebp, 7
inc rcx
cmp eax, 3FFFh
ja short loc_F9A46
lea rax, [rcx-1]
jmp loc_F988E
loc_F9A65:
mov rdi, rbx; this
mov rsi, rax; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
jmp loc_F987B
loc_F9A75:
mov rdi, rbx; this
mov rsi, rax; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
jmp loc_F9949
loc_F9A85:
mov rdi, rbx; this
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rsi, rax
jmp loc_F996F
|
unsigned __int8 * google::protobuf::GeneratedCodeInfo_Annotation::_InternalSerialize(
google::protobuf::GeneratedCodeInfo_Annotation *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3,
unsigned long long a4)
{
unsigned __int8 *v5; // rax
int v6; // ebp
_BYTE *v7; // rcx
int *v8; // r15
int *v9; // r12
unsigned __int8 *v10; // rsi
unsigned int v11; // edx
unsigned __int8 v12; // si
unsigned long long v13; // rdx
bool v14; // cc
int v15; // ebp
unsigned __int8 *v16; // rsi
unsigned __int8 *result; // rax
long long v18; // rdi
unsigned int v19; // edx
unsigned __int8 v20; // dl
unsigned long long v21; // rax
unsigned int v22; // edx
unsigned __int8 v23; // si
unsigned long long v24; // rdx
unsigned int v25; // eax
v5 = a2;
v6 = *((_DWORD *)this + 10);
if ( v6 > 0 )
{
if ( *(_QWORD *)a3 <= (unsigned long long)a2 )
v5 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2);
*v5 = 10;
v7 = v5 + 1;
if ( (unsigned int)v6 >= 0x80 )
{
do
{
v25 = v6;
*v7 = v6 | 0x80;
v6 = (unsigned int)v6 >> 7;
++v7;
}
while ( v25 > 0x3FFF );
v5 = v7 - 1;
}
*v7 = v6;
v8 = (int *)*((_QWORD *)this + 4);
v9 = &v8[*((int *)this + 6)];
v10 = v5 + 2;
do
{
if ( *(_QWORD *)a3 <= (unsigned long long)v10 )
v10 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, v10);
a4 = *v8;
*v10 = a4;
if ( a4 > 0x7F )
{
v11 = a4;
*v10 = a4 | 0x80;
a4 >>= 7;
v10[1] = a4;
v5 = v10 + 2;
if ( v11 >= 0x4000 )
{
v12 = v10[1];
v13 = a4;
do
{
*(v5 - 1) = v12 | 0x80;
v13 >>= 7;
*v5++ = v13;
v12 = v13;
v14 = a4 <= 0x3FFF;
a4 = v13;
}
while ( !v14 );
}
}
else
{
v5 = v10 + 1;
}
++v8;
v10 = v5;
}
while ( v8 < v9 );
}
v15 = *((_DWORD *)this + 4);
if ( (v15 & 1) != 0 )
v5 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(
a3,
2,
*((_QWORD *)this + 6) & 0xFFFFFFFFFFFFFFFCLL,
v5);
if ( (v15 & 2) == 0 )
goto LABEL_21;
if ( *(_QWORD *)a3 <= (unsigned long long)v5 )
v5 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, v5);
a4 = *((int *)this + 14);
*v5 = 24;
v5[1] = a4;
if ( a4 <= 0x7F )
{
v5 += 2;
LABEL_21:
v16 = v5;
goto LABEL_22;
}
v19 = a4;
v5[1] = a4 | 0x80;
a4 >>= 7;
v5[2] = a4;
v16 = v5 + 3;
if ( v19 >= 0x4000 )
{
v20 = v5[2];
v21 = a4;
do
{
*(v16 - 1) = v20 | 0x80;
v21 >>= 7;
*v16++ = v21;
v20 = v21;
v14 = a4 <= 0x3FFF;
a4 = v21;
}
while ( !v14 );
}
LABEL_22:
if ( (v15 & 4) == 0 )
{
LABEL_27:
result = v16;
goto LABEL_28;
}
if ( *(_QWORD *)a3 <= (unsigned long long)v16 )
v16 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, v16);
a4 = *((int *)this + 15);
*v16 = 32;
v16[1] = a4;
if ( a4 <= 0x7F )
{
v16 += 2;
goto LABEL_27;
}
v22 = a4;
v16[1] = a4 | 0x80;
a4 >>= 7;
v16[2] = a4;
result = v16 + 3;
if ( v22 >= 0x4000 )
{
v23 = v16[2];
v24 = a4;
do
{
*(result - 1) = v23 | 0x80;
v24 >>= 7;
*result++ = v24;
v23 = v24;
v14 = a4 <= 0x3FFF;
a4 = v24;
}
while ( !v14 );
}
LABEL_28:
v18 = *((_QWORD *)this + 1);
if ( (v18 & 1) != 0 )
return google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
(google::protobuf::internal::WireFormat *)((v18 & 0xFFFFFFFFFFFFFFFCLL) + 8),
(const google::protobuf::UnknownFieldSet *)result,
a3,
(google::protobuf::io::EpsCopyOutputStream *)a4);
return result;
}
|
_InternalSerialize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV RAX,RSI
MOV R14,RDI
MOV EBP,dword ptr [RDI + 0x28]
TEST EBP,EBP
JLE 0x001f9918
CMP qword ptr [RBX],RAX
JBE 0x001f9a65
LAB_001f987b:
MOV byte ptr [RAX],0xa
LEA RCX,[RAX + 0x1]
CMP EBP,0x80
JNC 0x001f9a46
LAB_001f988e:
ADD RAX,0x2
MOV byte ptr [RCX],BPL
MOV R15,qword ptr [R14 + 0x20]
MOVSXD RCX,dword ptr [R14 + 0x18]
LEA R12,[R15 + RCX*0x4]
MOV RSI,RAX
LAB_001f98a4:
CMP qword ptr [RBX],RSI
JBE 0x001f990b
LAB_001f98a9:
MOVSXD RCX,dword ptr [R15]
MOV byte ptr [RSI],CL
CMP RCX,0x7f
JA 0x001f98bc
INC RSI
MOV RAX,RSI
JMP 0x001f98fd
LAB_001f98bc:
MOV EDX,ECX
MOV EAX,ECX
OR AL,0x80
MOV byte ptr [RSI],AL
SHR RCX,0x7
MOV byte ptr [RSI + 0x1],CL
LEA RAX,[RSI + 0x2]
CMP EDX,0x4000
JC 0x001f98fd
MOV SIL,byte ptr [RSI + 0x1]
MOV RDX,RCX
LAB_001f98de:
OR SIL,0x80
MOV byte ptr [RAX + -0x1],SIL
SHR RDX,0x7
MOV byte ptr [RAX],DL
INC RAX
MOV ESI,EDX
CMP RCX,0x3fff
MOV RCX,RDX
JA 0x001f98de
LAB_001f98fd:
ADD R15,0x4
MOV RSI,RAX
CMP R15,R12
JC 0x001f98a4
JMP 0x001f9918
LAB_001f990b:
MOV RDI,RBX
CALL 0x0012f106
MOV RSI,RAX
JMP 0x001f98a9
LAB_001f9918:
MOV EBP,dword ptr [R14 + 0x10]
TEST BPL,0x1
JZ 0x001f993a
MOV RDX,qword ptr [R14 + 0x30]
AND RDX,-0x4
MOV RDI,RBX
MOV ESI,0x2
MOV RCX,RAX
CALL 0x0017442a
LAB_001f993a:
TEST BPL,0x2
JZ 0x001f995d
CMP qword ptr [RBX],RAX
JBE 0x001f9a75
LAB_001f9949:
MOVSXD RCX,dword ptr [R14 + 0x38]
MOV byte ptr [RAX],0x18
MOV byte ptr [RAX + 0x1],CL
CMP RCX,0x7f
JA 0x001f999d
ADD RAX,0x2
LAB_001f995d:
MOV RSI,RAX
LAB_001f9960:
TEST BPL,0x4
JZ 0x001f9983
CMP qword ptr [RBX],RSI
JBE 0x001f9a85
LAB_001f996f:
MOVSXD RCX,dword ptr [R14 + 0x3c]
MOV byte ptr [RSI],0x20
MOV byte ptr [RSI + 0x1],CL
CMP RCX,0x7f
JA 0x001f99e4
ADD RSI,0x2
LAB_001f9983:
MOV RAX,RSI
LAB_001f9986:
MOV RDI,qword ptr [R14 + 0x8]
TEST DIL,0x1
JNZ 0x001f9a2b
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001f999d:
MOV EDX,ECX
MOV ESI,ECX
OR SIL,0x80
MOV byte ptr [RAX + 0x1],SIL
SHR RCX,0x7
MOV byte ptr [RAX + 0x2],CL
LEA RSI,[RAX + 0x3]
CMP EDX,0x4000
JC 0x001f9960
MOV DL,byte ptr [RAX + 0x2]
MOV RAX,RCX
LAB_001f99c2:
OR DL,0x80
MOV byte ptr [RSI + -0x1],DL
SHR RAX,0x7
MOV byte ptr [RSI],AL
INC RSI
MOV EDX,EAX
CMP RCX,0x3fff
MOV RCX,RAX
JA 0x001f99c2
JMP 0x001f9960
LAB_001f99e4:
MOV EDX,ECX
MOV EAX,ECX
OR AL,0x80
MOV byte ptr [RSI + 0x1],AL
SHR RCX,0x7
MOV byte ptr [RSI + 0x2],CL
LEA RAX,[RSI + 0x3]
CMP EDX,0x4000
JC 0x001f9986
MOV SIL,byte ptr [RSI + 0x2]
MOV RDX,RCX
LAB_001f9a07:
OR SIL,0x80
MOV byte ptr [RAX + -0x1],SIL
SHR RDX,0x7
MOV byte ptr [RAX],DL
INC RAX
MOV ESI,EDX
CMP RCX,0x3fff
MOV RCX,RDX
JA 0x001f9a07
JMP 0x001f9986
LAB_001f9a2b:
AND RDI,-0x4
ADD RDI,0x8
MOV RSI,RAX
MOV RDX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001a6e1e
LAB_001f9a46:
MOV EAX,EBP
MOV EDX,EAX
OR DL,0x80
MOV byte ptr [RCX],DL
SHR EBP,0x7
INC RCX
CMP EAX,0x3fff
JA 0x001f9a46
LEA RAX,[RCX + -0x1]
JMP 0x001f988e
LAB_001f9a65:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012f106
JMP 0x001f987b
LAB_001f9a75:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012f106
JMP 0x001f9949
LAB_001f9a85:
MOV RDI,RBX
CALL 0x0012f106
MOV RSI,RAX
JMP 0x001f996f
|
/* google::protobuf::GeneratedCodeInfo_Annotation::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
void __thiscall
google::protobuf::GeneratedCodeInfo_Annotation::_InternalSerialize
(GeneratedCodeInfo_Annotation *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
uint *puVar1;
bool bVar2;
byte *pbVar3;
byte *pbVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
uint uVar8;
uint uVar9;
uint *puVar10;
uVar9 = *(uint *)(this + 0x28);
if (0 < (int)uVar9) {
if (*(uchar **)param_2 <= param_1) {
param_1 = (uchar *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
*param_1 = 10;
pbVar3 = param_1 + 1;
uVar8 = uVar9;
if (0x7f < uVar9) {
do {
param_1 = pbVar3;
*param_1 = (byte)uVar8 | 0x80;
uVar9 = uVar8 >> 7;
pbVar3 = param_1 + 1;
bVar2 = 0x3fff < uVar8;
uVar8 = uVar9;
} while (bVar2);
}
param_1 = param_1 + 2;
*pbVar3 = (byte)uVar9;
puVar10 = *(uint **)(this + 0x20);
puVar1 = puVar10 + *(int *)(this + 0x18);
do {
pbVar3 = param_1;
if (*(byte **)param_2 <= param_1) {
pbVar3 = (byte *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
uVar9 = *puVar10;
*pbVar3 = (byte)uVar9;
if ((ulong)(long)(int)uVar9 < 0x80) {
param_1 = pbVar3 + 1;
}
else {
*pbVar3 = (byte)uVar9 | 0x80;
uVar5 = (ulong)(long)(int)uVar9 >> 7;
pbVar3[1] = (byte)uVar5;
param_1 = pbVar3 + 2;
if (0x3fff < uVar9) {
uVar6 = (ulong)pbVar3[1];
do {
param_1[-1] = (byte)uVar6 | 0x80;
uVar7 = uVar5 >> 7;
*param_1 = (byte)uVar7;
param_1 = param_1 + 1;
uVar6 = uVar7 & 0xffffffff;
bVar2 = 0x3fff < uVar5;
uVar5 = uVar7;
} while (bVar2);
}
}
puVar10 = puVar10 + 1;
} while (puVar10 < puVar1);
}
uVar9 = *(uint *)(this + 0x10);
if ((uVar9 & 1) != 0) {
param_1 = (uchar *)io::EpsCopyOutputStream::WriteStringMaybeAliased
(param_2,2,(string *)(*(ulong *)(this + 0x30) & 0xfffffffffffffffc)
,param_1);
}
pbVar3 = param_1;
if ((uVar9 & 2) != 0) {
if (*(byte **)param_2 <= param_1) {
param_1 = (uchar *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
uVar8 = *(uint *)(this + 0x38);
*param_1 = 0x18;
param_1[1] = (byte)uVar8;
if ((ulong)(long)(int)uVar8 < 0x80) {
pbVar3 = param_1 + 2;
}
else {
param_1[1] = (byte)uVar8 | 0x80;
uVar5 = (ulong)(long)(int)uVar8 >> 7;
param_1[2] = (byte)uVar5;
pbVar3 = param_1 + 3;
if (0x3fff < uVar8) {
uVar6 = (ulong)param_1[2];
do {
pbVar3[-1] = (byte)uVar6 | 0x80;
uVar7 = uVar5 >> 7;
*pbVar3 = (byte)uVar7;
pbVar3 = pbVar3 + 1;
uVar6 = uVar7 & 0xffffffff;
bVar2 = 0x3fff < uVar5;
uVar5 = uVar7;
} while (bVar2);
}
}
}
if ((uVar9 & 4) != 0) {
pbVar4 = pbVar3;
if (*(byte **)param_2 <= pbVar3) {
pbVar4 = (byte *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,pbVar3);
}
uVar9 = *(uint *)(this + 0x3c);
*pbVar4 = 0x20;
pbVar4[1] = (byte)uVar9;
if ((ulong)(long)(int)uVar9 < 0x80) {
pbVar3 = pbVar4 + 2;
}
else {
pbVar4[1] = (byte)uVar9 | 0x80;
uVar5 = (ulong)(long)(int)uVar9 >> 7;
pbVar4[2] = (byte)uVar5;
pbVar3 = pbVar4 + 3;
if (0x3fff < uVar9) {
uVar6 = (ulong)pbVar4[2];
do {
pbVar3[-1] = (byte)uVar6 | 0x80;
uVar7 = uVar5 >> 7;
*pbVar3 = (byte)uVar7;
pbVar3 = pbVar3 + 1;
uVar6 = uVar7 & 0xffffffff;
bVar2 = 0x3fff < uVar5;
uVar5 = uVar7;
} while (bVar2);
}
}
}
if ((*(ulong *)(this + 8) & 1) != 0) {
internal::WireFormat::InternalSerializeUnknownFieldsToArray
((UnknownFieldSet *)((*(ulong *)(this + 8) & 0xfffffffffffffffc) + 8),pbVar3,param_2);
return;
}
return;
}
|
|
19,552
|
get_digit
|
bluesky950520[P]quickjs/libbf.c
|
static limb_t get_digit(const limb_t *tab, limb_t len, slimb_t pos)
{
slimb_t i;
int shift;
i = floor_div(pos, LIMB_DIGITS);
if (i < 0 || i >= len)
return 0;
shift = pos - i * LIMB_DIGITS;
return fast_shr_dec(tab[i], shift) % 10;
}
|
O2
|
c
|
get_digit:
movq %rdx, %rcx
testq %rdx, %rdx
js 0x7b8bb
pushq $0x13
popq %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
jmp 0x7b8c8
leaq -0x12(%rcx), %rax
pushq $0x13
popq %r8
cqto
idivq %r8
testq %rax, %rax
sets %dl
cmpq %rsi, %rax
setae %sil
orb %dl, %sil
jne 0x7b8fb
pushq %rax
imull $-0x13, %eax, %edx
addl %edx, %ecx
movq (%rdi,%rax,8), %rdi
movl %ecx, %esi
callq 0x7bd8c
pushq $0xa
popq %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, %rax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
|
get_digit:
mov rcx, rdx
test rdx, rdx
js short loc_7B8BB
push 13h
pop r8
mov rax, rcx
xor edx, edx
div r8
jmp short loc_7B8C8
loc_7B8BB:
lea rax, [rcx-12h]
push 13h
pop r8
cqo
idiv r8
loc_7B8C8:
test rax, rax
sets dl
cmp rax, rsi
setnb sil
or sil, dl
jnz short loc_7B8FB
push rax
imul edx, eax, -13h
add ecx, edx
mov rdi, [rdi+rax*8]
mov esi, ecx
call fast_shr_dec
push 0Ah
pop rcx
xor edx, edx
div rcx
mov rax, rdx
add rsp, 8
retn
loc_7B8FB:
xor eax, eax
retn
|
unsigned long long get_digit(long long a1, unsigned long long a2, long long a3)
{
long long v3; // rax
if ( a3 < 0 )
v3 = (a3 - 18) / 19;
else
v3 = a3 / 0x13uLL;
if ( v3 < 0 || v3 >= a2 )
return 0LL;
else
return fast_shr_dec(*(_QWORD *)(a1 + 8 * v3), (unsigned int)(-19 * v3 + a3)) % 0xAuLL;
}
|
get_digit:
MOV RCX,RDX
TEST RDX,RDX
JS 0x0017b8bb
PUSH 0x13
POP R8
MOV RAX,RCX
XOR EDX,EDX
DIV R8
JMP 0x0017b8c8
LAB_0017b8bb:
LEA RAX,[RCX + -0x12]
PUSH 0x13
POP R8
CQO
IDIV R8
LAB_0017b8c8:
TEST RAX,RAX
SETS DL
CMP RAX,RSI
SETNC SIL
OR SIL,DL
JNZ 0x0017b8fb
PUSH RAX
IMUL EDX,EAX,-0x13
ADD ECX,EDX
MOV RDI,qword ptr [RDI + RAX*0x8]
MOV ESI,ECX
CALL 0x0017bd8c
PUSH 0xa
POP RCX
XOR EDX,EDX
DIV RCX
MOV RAX,RDX
ADD RSP,0x8
RET
LAB_0017b8fb:
XOR EAX,EAX
RET
|
ulong get_digit(long param_1,ulong param_2,ulong param_3)
{
ulong uVar1;
if ((long)param_3 < 0) {
uVar1 = (long)(param_3 - 0x12) / 0x13;
}
else {
uVar1 = param_3 / 0x13;
}
if (uVar1 < param_2 && -1 < (long)uVar1) {
uVar1 = fast_shr_dec(*(int8 *)(param_1 + uVar1 * 8),(int)param_3 + (int)uVar1 * -0x13);
return uVar1 % 10;
}
return 0;
}
|
|
19,553
|
bf_divrem
|
bluesky950520[P]quickjs/libbf.c
|
int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_t a1_s, *a1 = &a1_s;
bf_t b1_s, *b1 = &b1_s;
int q_sign, ret;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bf_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set(r, a);
return bf_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
/* XXX: could improve to avoid having a large 'q' */
bf_tdivremu(q, r, a1, b1);
if (bf_is_nan(q) || bf_is_nan(r))
goto fail;
if (r->len != 0) {
if (is_rndn) {
int res;
b1->expn--;
res = bf_cmpu(r, b1);
b1->expn++;
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
get_bit(q->tab, q->len, q->len * LIMB_BITS - q->expn)))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
ret = bf_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
ret |= bf_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (ret & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bf_round(r, prec, flags);
fail:
bf_set_nan(q);
bf_set_nan(r);
return BF_ST_MEM_ERROR;
}
|
O0
|
c
|
bf_divrem:
subq $0xb8, %rsp
movl 0xc0(%rsp), %eax
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movl %r9d, 0x84(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0xef014
movq 0x90(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xef0fa
movq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xec530
movq 0x98(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
je 0xef053
movq 0x90(%rsp), %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, 0x10(%rax)
jne 0xef070
movq 0xa0(%rsp), %rdi
callq 0xec490
movl $0x0, 0xb4(%rsp)
jmp 0xef420
movq 0x98(%rsp), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, 0x10(%rax)
je 0xef0a0
movq 0x90(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, 0x10(%rax)
jne 0xef0bd
movq 0xa0(%rsp), %rdi
callq 0xec490
movl $0x1, 0xb4(%rsp)
jmp 0xef420
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0xec5b0
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl 0x84(%rsp), %edx
callq 0xed000
movl %eax, 0xb4(%rsp)
jmp 0xef420
movq 0x98(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x90(%rsp), %rcx
xorl 0x8(%rcx), %eax
movl %eax, 0x1c(%rsp)
movb $0x1, %al
cmpl $0x0, 0xc0(%rsp)
movb %al, 0xb(%rsp)
je 0xef133
cmpl $0x4, 0xc0(%rsp)
sete %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
movzbl %al, %eax
andl $0x1, %eax
movl %eax, 0x10(%rsp)
movl 0xc0(%rsp), %eax
movq %rax, (%rsp)
subq $0x6, %rax
ja 0xef166
movq (%rsp), %rax
leaq 0x28973(%rip), %rcx # 0x117ad0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xef168
movl $0x0, 0x14(%rsp)
jmp 0xef1a2
movl 0x1c(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0xef1a2
movl 0x1c(%rsp), %eax
xorl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xef1a2
movl $0x1, 0x14(%rsp)
jmp 0xef1a2
movq 0x98(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x50(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x90(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x90(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0xef430
movq 0xa8(%rsp), %rdi
callq 0xef540
cmpl $0x0, %eax
jne 0xef27b
movq 0xa0(%rsp), %rdi
callq 0xef540
cmpl $0x0, %eax
je 0xef280
jmp 0xef3fb
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0xef3ae
cmpl $0x0, 0x10(%rsp)
je 0xef331
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0xa0(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xed230
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
cmpl $0x0, 0xc(%rsp)
jg 0xef32d
cmpl $0x0, 0xc(%rsp)
jne 0xef32f
cmpl $0x4, 0xc0(%rsp)
je 0xef32d
movq 0xa8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rdx
shlq $0x6, %rdx
movq 0xa8(%rsp), %rax
subq 0x10(%rax), %rdx
callq 0xecf90
cmpq $0x0, %rax
je 0xef32f
jmp 0xef33a
jmp 0xef3ac
cmpl $0x0, 0x14(%rsp)
je 0xef3aa
jmp 0xef33a
movq 0xa8(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movl $0x1, %edx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xef570
movl %eax, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x20(%rsp), %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xef5f0
orl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xef3a8
jmp 0xef3fb
jmp 0xef3aa
jmp 0xef3ac
jmp 0xef3ae
movq 0x98(%rsp), %rax
movl 0x8(%rax), %ecx
movq 0xa0(%rsp), %rax
xorl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl 0x1c(%rsp), %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl 0x84(%rsp), %edx
callq 0xed000
movl %eax, 0xb4(%rsp)
jmp 0xef420
movq 0xa8(%rsp), %rdi
callq 0xec490
movq 0xa0(%rsp), %rdi
callq 0xec490
movl $0x20, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
nop
|
bf_divrem:
sub rsp, 0B8h
mov eax, [rsp+0B8h+arg_0]
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov [rsp+0B8h+var_20], rdx
mov [rsp+0B8h+var_28], rcx
mov [rsp+0B8h+var_30], r8
mov [rsp+0B8h+var_34], r9d
lea rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_68], rax
lea rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_98], rax
mov rax, [rsp+0B8h+var_20]
cmp qword ptr [rax+18h], 0
jz short loc_EF014
mov rax, [rsp+0B8h+var_28]
cmp qword ptr [rax+18h], 0
jnz loc_EF0FA
loc_EF014:
mov rdi, [rsp+0B8h+var_10]
xor esi, esi
call bf_set_zero
mov rax, [rsp+0B8h+var_20]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jz short loc_EF053
mov rax, [rsp+0B8h+var_28]
mov rcx, 7FFFFFFFFFFFFFFFh
cmp [rax+10h], rcx
jnz short loc_EF070
loc_EF053:
mov rdi, [rsp+0B8h+var_18]
call bf_set_nan
mov [rsp+0B8h+var_4], 0
jmp loc_EF420
loc_EF070:
mov rax, [rsp+0B8h+var_20]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp [rax+10h], rcx
jz short loc_EF0A0
mov rax, [rsp+0B8h+var_28]
mov rcx, 8000000000000000h
cmp [rax+10h], rcx
jnz short loc_EF0BD
loc_EF0A0:
mov rdi, [rsp+0B8h+var_18]
call bf_set_nan
mov [rsp+0B8h+var_4], 1
jmp loc_EF420
loc_EF0BD:
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_20]
call bf_set
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_30]
mov edx, [rsp+0B8h+var_34]
call bf_round
mov [rsp+0B8h+var_4], eax
jmp loc_EF420
loc_EF0FA:
mov rax, [rsp+0B8h+var_20]
mov eax, [rax+8]
mov rcx, [rsp+0B8h+var_28]
xor eax, [rcx+8]
mov [rsp+0B8h+var_9C], eax
mov al, 1
cmp [rsp+0B8h+arg_0], 0
mov [rsp+0B8h+var_AD], al
jz short loc_EF133
cmp [rsp+0B8h+arg_0], 4
setz al
mov [rsp+0B8h+var_AD], al
loc_EF133:
mov al, [rsp+0B8h+var_AD]
movzx eax, al
and eax, 1
mov [rsp+0B8h+var_A8], eax
mov eax, [rsp+0B8h+arg_0]
mov [rsp+0B8h+var_B8], rax
sub rax, 6; switch 7 cases
ja short def_EF164; jumptable 00000000000EF164 default case
mov rax, [rsp+0B8h+var_B8]
lea rcx, jpt_EF164
movsxd rax, ds:(jpt_EF164 - 117AD0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_EF164:
jmp short $+2; jumptable 00000000000EF164 default case
loc_EF168:
mov [rsp+0B8h+var_A4], 0; jumptable 00000000000EF164 cases 0,1,4
jmp short loc_EF1A2
loc_EF172:
mov eax, [rsp+0B8h+var_9C]; jumptable 00000000000EF164 case 2
mov [rsp+0B8h+var_A4], eax
jmp short loc_EF1A2
loc_EF17C:
mov eax, [rsp+0B8h+var_9C]; jumptable 00000000000EF164 case 3
xor eax, 1
mov [rsp+0B8h+var_A4], eax
jmp short loc_EF1A2
loc_EF189:
mov [rsp+0B8h+var_A4], 1; jumptable 00000000000EF164 case 5
jmp short loc_EF1A2
loc_EF193:
mov rax, [rsp+0B8h+var_20]; jumptable 00000000000EF164 case 6
mov eax, [rax+8]
mov [rsp+0B8h+var_A4], eax
loc_EF1A2:
mov rax, [rsp+0B8h+var_20]
mov rcx, [rax+10h]
mov rax, [rsp+0B8h+var_68]
mov [rax+10h], rcx
mov rax, [rsp+0B8h+var_20]
mov rcx, [rax+20h]
mov rax, [rsp+0B8h+var_68]
mov [rax+20h], rcx
mov rax, [rsp+0B8h+var_20]
mov rcx, [rax+18h]
mov rax, [rsp+0B8h+var_68]
mov [rax+18h], rcx
mov rax, [rsp+0B8h+var_68]
mov dword ptr [rax+8], 0
mov rax, [rsp+0B8h+var_28]
mov rcx, [rax+10h]
mov rax, [rsp+0B8h+var_98]
mov [rax+10h], rcx
mov rax, [rsp+0B8h+var_28]
mov rcx, [rax+20h]
mov rax, [rsp+0B8h+var_98]
mov [rax+20h], rcx
mov rax, [rsp+0B8h+var_28]
mov rcx, [rax+18h]
mov rax, [rsp+0B8h+var_98]
mov [rax+18h], rcx
mov rax, [rsp+0B8h+var_98]
mov dword ptr [rax+8], 0
mov rdi, [rsp+0B8h+var_10]
mov rsi, [rsp+0B8h+var_18]
mov rdx, [rsp+0B8h+var_68]
mov rcx, [rsp+0B8h+var_98]
call bf_tdivremu
mov rdi, [rsp+0B8h+var_10]
call bf_is_nan
cmp eax, 0
jnz short loc_EF27B
mov rdi, [rsp+0B8h+var_18]
call bf_is_nan
cmp eax, 0
jz short loc_EF280
loc_EF27B:
jmp loc_EF3FB
loc_EF280:
mov rax, [rsp+0B8h+var_18]
cmp qword ptr [rax+18h], 0
jz loc_EF3AE
cmp [rsp+0B8h+var_A8], 0
jz loc_EF331
mov rax, [rsp+0B8h+var_98]
mov rcx, [rax+10h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+10h], rcx
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_98]
call bf_cmpu
mov [rsp+0B8h+var_AC], eax
mov rax, [rsp+0B8h+var_98]
mov rcx, [rax+10h]
add rcx, 1
mov [rax+10h], rcx
cmp [rsp+0B8h+var_AC], 0
jg short loc_EF32D
cmp [rsp+0B8h+var_AC], 0
jnz short loc_EF32F
cmp [rsp+0B8h+arg_0], 4
jz short loc_EF32D
mov rax, [rsp+0B8h+var_10]
mov rdi, [rax+20h]
mov rax, [rsp+0B8h+var_10]
mov rsi, [rax+18h]
mov rax, [rsp+0B8h+var_10]
mov rdx, [rax+18h]
shl rdx, 6
mov rax, [rsp+0B8h+var_10]
sub rdx, [rax+10h]
call get_bit
cmp rax, 0
jz short loc_EF32F
loc_EF32D:
jmp short loc_EF33A
loc_EF32F:
jmp short loc_EF3AC
loc_EF331:
cmp [rsp+0B8h+var_A4], 0
jz short loc_EF3AA
jmp short $+2
loc_EF33A:
mov rdi, [rsp+0B8h+var_10]
mov rsi, [rsp+0B8h+var_10]
mov edx, 1
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_add_si
mov [rsp+0B8h+var_A0], eax
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_18]
mov rdx, [rsp+0B8h+var_98]
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_sub
or eax, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_A0], eax
mov eax, [rsp+0B8h+var_A0]
and eax, 20h
cmp eax, 0
jz short loc_EF3A8
jmp short loc_EF3FB
loc_EF3A8:
jmp short $+2
loc_EF3AA:
jmp short $+2
loc_EF3AC:
jmp short $+2
loc_EF3AE:
mov rax, [rsp+0B8h+var_20]
mov ecx, [rax+8]
mov rax, [rsp+0B8h+var_18]
xor ecx, [rax+8]
mov [rax+8], ecx
mov ecx, [rsp+0B8h+var_9C]
mov rax, [rsp+0B8h+var_10]
mov [rax+8], ecx
mov rdi, [rsp+0B8h+var_18]
mov rsi, [rsp+0B8h+var_30]
mov edx, [rsp+0B8h+var_34]
call bf_round
mov [rsp+0B8h+var_4], eax
jmp short loc_EF420
loc_EF3FB:
mov rdi, [rsp+0B8h+var_10]
call bf_set_nan
mov rdi, [rsp+0B8h+var_18]
call bf_set_nan
mov [rsp+0B8h+var_4], 20h ; ' '
loc_EF420:
mov eax, [rsp+0B8h+var_4]
add rsp, 0B8h
retn
|
long long bf_divrem(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7)
{
bool v8; // [rsp+Bh] [rbp-ADh]
int v9; // [rsp+Ch] [rbp-ACh]
int v10; // [rsp+14h] [rbp-A4h]
unsigned __int8 v11; // [rsp+18h] [rbp-A0h]
int v12; // [rsp+1Ch] [rbp-9Ch]
_BYTE v13[8]; // [rsp+28h] [rbp-90h] BYREF
int v14; // [rsp+30h] [rbp-88h]
long long v15; // [rsp+38h] [rbp-80h]
long long v16; // [rsp+40h] [rbp-78h]
long long v17; // [rsp+48h] [rbp-70h]
char *v18; // [rsp+50h] [rbp-68h]
char v19; // [rsp+58h] [rbp-60h] BYREF
unsigned int v20; // [rsp+84h] [rbp-34h]
long long v21; // [rsp+88h] [rbp-30h]
long long v22; // [rsp+90h] [rbp-28h]
long long v23; // [rsp+98h] [rbp-20h]
_QWORD *v24; // [rsp+A0h] [rbp-18h]
long long v25; // [rsp+A8h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v18 = &v19;
if ( *(_QWORD *)(a3 + 24) && *(_QWORD *)(v22 + 24) )
{
v12 = *(_DWORD *)(v22 + 8) ^ *(_DWORD *)(v23 + 8);
v8 = 1;
if ( a7 )
v8 = a7 == 4;
switch ( a7 )
{
case 2:
v10 = *(_DWORD *)(v22 + 8) ^ *(_DWORD *)(v23 + 8);
break;
case 3:
v10 = v12 ^ 1;
break;
case 5:
v10 = 1;
break;
case 6:
v10 = *(_DWORD *)(v23 + 8);
break;
default:
v10 = 0;
break;
}
*((_QWORD *)v18 + 2) = *(_QWORD *)(v23 + 16);
*((_QWORD *)v18 + 4) = *(_QWORD *)(v23 + 32);
*((_QWORD *)v18 + 3) = *(_QWORD *)(v23 + 24);
*((_DWORD *)v18 + 2) = 0;
v15 = *(_QWORD *)(v22 + 16);
v17 = *(_QWORD *)(v22 + 32);
v16 = *(_QWORD *)(v22 + 24);
v14 = 0;
bf_tdivremu(v25, v24, v18, v13);
if ( (unsigned int)bf_is_nan(v25) || (unsigned int)bf_is_nan(v24) )
goto LABEL_32;
if ( v24[3] )
{
if ( v8 )
{
--v15;
v9 = bf_cmpu((long long)v24, (long long)v13);
++v15;
if ( v9 <= 0
&& (v9
|| a7 != 4
&& !get_bit(
*(_QWORD *)(v25 + 32),
*(_QWORD *)(v25 + 24),
(*(_QWORD *)(v25 + 24) << 6) - *(_QWORD *)(v25 + 16))) )
{
goto LABEL_31;
}
}
else if ( !v10 )
{
goto LABEL_31;
}
v11 = bf_add_si(v25, v25, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( ((v11 | (unsigned __int8)bf_sub(v24, v24, v13, 0x3FFFFFFFFFFFFFFFLL, 1LL)) & 0x20) != 0 )
{
LABEL_32:
bf_set_nan(v25);
bf_set_nan((long long)v24);
return 32;
}
}
LABEL_31:
*((_DWORD *)v24 + 2) ^= *(_DWORD *)(v23 + 8);
*(_DWORD *)(v25 + 8) = v12;
return (unsigned int)bf_round(v24, v21, v20);
}
bf_set_zero(v25, 0);
if ( *(_QWORD *)(v23 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(v22 + 16) == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)v24);
return 0;
}
else if ( *(_QWORD *)(v23 + 16) == 0x7FFFFFFFFFFFFFFELL || *(_QWORD *)(v22 + 16) == 0x8000000000000000LL )
{
bf_set_nan((long long)v24);
return 1;
}
else
{
bf_set((long long)v24, v23);
return (unsigned int)bf_round(v24, v21, v20);
}
}
|
bf_divrem:
SUB RSP,0xb8
MOV EAX,dword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0x98],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x88],R8
MOV dword ptr [RSP + 0x84],R9D
LEA RAX,[RSP + 0x58]
MOV qword ptr [RSP + 0x50],RAX
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x98]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x001ef014
MOV RAX,qword ptr [RSP + 0x90]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001ef0fa
LAB_001ef014:
MOV RDI,qword ptr [RSP + 0xa8]
XOR ESI,ESI
CALL 0x001ec530
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001ef053
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,0x7fffffffffffffff
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001ef070
LAB_001ef053:
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ec490
MOV dword ptr [RSP + 0xb4],0x0
JMP 0x001ef420
LAB_001ef070:
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,0x7ffffffffffffffe
CMP qword ptr [RAX + 0x10],RCX
JZ 0x001ef0a0
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,-0x8000000000000000
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x001ef0bd
LAB_001ef0a0:
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ec490
MOV dword ptr [RSP + 0xb4],0x1
JMP 0x001ef420
LAB_001ef0bd:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x001ec5b0
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x84]
CALL 0x001ed000
MOV dword ptr [RSP + 0xb4],EAX
JMP 0x001ef420
LAB_001ef0fa:
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x90]
XOR EAX,dword ptr [RCX + 0x8]
MOV dword ptr [RSP + 0x1c],EAX
MOV AL,0x1
CMP dword ptr [RSP + 0xc0],0x0
MOV byte ptr [RSP + 0xb],AL
JZ 0x001ef133
CMP dword ptr [RSP + 0xc0],0x4
SETZ AL
MOV byte ptr [RSP + 0xb],AL
LAB_001ef133:
MOV AL,byte ptr [RSP + 0xb]
MOVZX EAX,AL
AND EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0xc0]
MOV qword ptr [RSP],RAX
SUB RAX,0x6
JA 0x001ef166
MOV RAX,qword ptr [RSP]
LEA RCX,[0x217ad0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
LAB_001ef166:
JMP 0x001ef168
caseD_0:
MOV dword ptr [RSP + 0x14],0x0
JMP 0x001ef1a2
caseD_2:
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001ef1a2
caseD_3:
MOV EAX,dword ptr [RSP + 0x1c]
XOR EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001ef1a2
caseD_5:
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001ef1a2
caseD_6:
MOV RAX,qword ptr [RSP + 0x98]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x14],EAX
LAB_001ef1a2:
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV dword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x8],0x0
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x001ef430
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x001ef540
CMP EAX,0x0
JNZ 0x001ef27b
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ef540
CMP EAX,0x0
JZ 0x001ef280
LAB_001ef27b:
JMP 0x001ef3fb
LAB_001ef280:
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x001ef3ae
CMP dword ptr [RSP + 0x10],0x0
JZ 0x001ef331
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001ed230
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
CMP dword ptr [RSP + 0xc],0x0
JG 0x001ef32d
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x001ef32f
CMP dword ptr [RSP + 0xc0],0x4
JZ 0x001ef32d
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RAX + 0x18]
SHL RDX,0x6
MOV RAX,qword ptr [RSP + 0xa8]
SUB RDX,qword ptr [RAX + 0x10]
CALL 0x001ecf90
CMP RAX,0x0
JZ 0x001ef32f
LAB_001ef32d:
JMP 0x001ef33a
LAB_001ef32f:
JMP 0x001ef3ac
LAB_001ef331:
CMP dword ptr [RSP + 0x14],0x0
JZ 0x001ef3aa
JMP 0x001ef33a
LAB_001ef33a:
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xa8]
MOV EDX,0x1
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001ef570
MOV dword ptr [RSP + 0x18],EAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001ef5f0
OR EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001ef3a8
JMP 0x001ef3fb
LAB_001ef3a8:
JMP 0x001ef3aa
LAB_001ef3aa:
JMP 0x001ef3ac
LAB_001ef3ac:
JMP 0x001ef3ae
LAB_001ef3ae:
MOV RAX,qword ptr [RSP + 0x98]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0xa0]
XOR ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0xa8]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x84]
CALL 0x001ed000
MOV dword ptr [RSP + 0xb4],EAX
JMP 0x001ef420
LAB_001ef3fb:
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x001ec490
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ec490
MOV dword ptr [RSP + 0xb4],0x20
LAB_001ef420:
MOV EAX,dword ptr [RSP + 0xb4]
ADD RSP,0xb8
RET
|
int4
bf_divrem(long param_1,long param_2,long param_3,long param_4,int8 param_5,int4 param_6,
int param_7)
{
int4 uVar1;
uint uVar2;
int iVar3;
uint uVar4;
uint uVar5;
long lVar6;
uint local_a4;
int1 local_90 [8];
int4 local_88;
long local_80;
int8 local_78;
int8 local_70;
int1 *local_68;
int1 local_60 [8];
int4 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
int4 local_34;
int8 local_30;
long local_28;
long local_20;
long local_18;
long local_10;
int4 local_4;
local_68 = local_60;
local_34 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if ((*(long *)(param_3 + 0x18) == 0) || (*(long *)(param_4 + 0x18) == 0)) {
bf_set_zero(param_1,0);
if ((*(long *)(local_20 + 0x10) != 0x7fffffffffffffff) &&
(*(long *)(local_28 + 0x10) != 0x7fffffffffffffff)) {
if ((*(long *)(local_20 + 0x10) != 0x7ffffffffffffffe) &&
(*(long *)(local_28 + 0x10) != -0x8000000000000000)) {
bf_set(local_18,local_20);
uVar1 = bf_round(local_18,local_30,local_34);
return uVar1;
}
bf_set_nan(local_18);
return 1;
}
bf_set_nan(local_18);
return 0;
}
uVar2 = *(uint *)(param_3 + 8) ^ *(uint *)(param_4 + 8);
switch(param_7) {
default:
local_a4 = 0;
break;
case 2:
local_a4 = uVar2;
break;
case 3:
local_a4 = uVar2 ^ 1;
break;
case 5:
local_a4 = 1;
break;
case 6:
local_a4 = *(uint *)(param_3 + 8);
}
local_50 = *(int8 *)(param_3 + 0x10);
local_40 = *(int8 *)(param_3 + 0x20);
local_48 = *(int8 *)(param_3 + 0x18);
local_58 = 0;
local_80 = *(long *)(param_4 + 0x10);
local_70 = *(int8 *)(param_4 + 0x20);
local_78 = *(int8 *)(param_4 + 0x18);
local_88 = 0;
bf_tdivremu(param_1,param_2,local_68,local_90);
iVar3 = bf_is_nan(local_10);
if ((iVar3 == 0) && (iVar3 = bf_is_nan(local_18), iVar3 == 0)) {
if (*(long *)(local_18 + 0x18) != 0) {
if (param_7 == 0 || param_7 == 4) {
local_80 = local_80 + -1;
iVar3 = bf_cmpu(local_18,local_90);
local_80 = local_80 + 1;
if ((0 < iVar3) ||
((iVar3 == 0 &&
((param_7 == 4 ||
(lVar6 = get_bit(*(int8 *)(local_10 + 0x20),*(int8 *)(local_10 + 0x18),
*(long *)(local_10 + 0x18) * 0x40 - *(long *)(local_10 + 0x10)),
lVar6 != 0)))))) {
LAB_001ef33a:
uVar4 = bf_add_si(local_10,local_10,1,0x3fffffffffffffff,1);
uVar5 = bf_sub(local_18,local_18,local_90,0x3fffffffffffffff,1);
if (((uVar5 | uVar4) & 0x20) != 0) goto LAB_001ef3fb;
}
}
else if (local_a4 != 0) goto LAB_001ef33a;
}
*(uint *)(local_18 + 8) = *(uint *)(local_20 + 8) ^ *(uint *)(local_18 + 8);
*(uint *)(local_10 + 8) = uVar2;
local_4 = bf_round(local_18,local_30,local_34);
}
else {
LAB_001ef3fb:
bf_set_nan(local_10);
bf_set_nan(local_18);
local_4 = 0x20;
}
return local_4;
}
|
|
19,554
|
bf_divrem
|
bluesky950520[P]quickjs/libbf.c
|
int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_t a1_s, *a1 = &a1_s;
bf_t b1_s, *b1 = &b1_s;
int q_sign, ret;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bf_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set(r, a);
return bf_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
/* XXX: could improve to avoid having a large 'q' */
bf_tdivremu(q, r, a1, b1);
if (bf_is_nan(q) || bf_is_nan(r))
goto fail;
if (r->len != 0) {
if (is_rndn) {
int res;
b1->expn--;
res = bf_cmpu(r, b1);
b1->expn++;
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
get_bit(q->tab, q->len, q->len * LIMB_BITS - q->expn)))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
ret = bf_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
ret |= bf_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (ret & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bf_round(r, prec, flags);
fail:
bf_set_nan(q);
bf_set_nan(r);
return BF_ST_MEM_ERROR;
}
|
O2
|
c
|
bf_divrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
je 0x74c8f
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x74c8f
movl 0xb0(%rsp), %edi
movl 0x8(%r15), %edx
movl 0x8(%r13), %esi
xorl %edx, %esi
movl %esi, 0x10(%rsp)
movl $0x0, 0x4(%rsp)
movq %rdi, 0x18(%rsp)
leal -0x2(%rdi), %esi
cmpl $0x4, %esi
movq %r14, 0x8(%rsp)
ja 0x74cf4
leaq 0x17db0(%rip), %rdi # 0x8ca30
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movl 0x10(%rsp), %edx
jmp 0x74cf0
xorl %ebp, %ebp
movq %r12, %rdi
xorl %esi, %esi
callq 0x731c2
movq 0x10(%r15), %rax
cmpq %rbx, %rax
je 0x74cad
movq 0x10(%r13), %rcx
cmpq %rbx, %rcx
jne 0x74cba
movq %r14, %rdi
callq 0x7317d
jmp 0x74de6
leaq -0x1(%rbx), %rdx
cmpq %rdx, %rax
setne %al
incq %rbx
cmpq %rbx, %rcx
setne %cl
testb %cl, %al
jne 0x74e82
movq %r14, %rdi
callq 0x7317d
pushq $0x1
jmp 0x74de5
movl 0x10(%rsp), %edx
xorl $0x1, %edx
jmp 0x74cf0
pushq $0x1
popq %rdx
movl %edx, 0x4(%rsp)
movq 0x10(%r15), %r14
leaq 0x50(%rsp), %rdi
movq %r14, 0x10(%rdi)
movq 0x20(%r15), %rdx
movq %rdx, 0x20(%rdi)
movq %rcx, 0x18(%rdi)
andl $0x0, 0x8(%rdi)
movq 0x10(%r13), %rbp
leaq 0x28(%rsp), %rsi
movq %rbp, 0x10(%rsi)
movq 0x20(%r13), %rcx
movq %rcx, 0x20(%rsi)
movq %rax, 0x18(%rsi)
andl $0x0, 0x8(%rsi)
callq 0x73916
testl %eax, %eax
js 0x74da7
subq %rbp, %r14
cmpq $0x2, %r14
pushq $0x1
popq %rcx
cmovgeq %r14, %rcx
incq %rcx
leaq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdx
pushq $0x1
popq %rbp
movq %r12, %rdi
movl %ebp, %r8d
callq 0x758a2
movq %r12, %rdi
movl %ebp, %esi
callq 0x757ed
movabsq $0x3fffffffffffffff, %r13 # imm = 0x3FFFFFFFFFFFFFFF
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
leaq 0x28(%rsp), %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x74959
movq %r14, %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x74fa7
jmp 0x74dc3
movq %r12, %rdi
xorl %esi, %esi
callq 0x73106
leaq 0x50(%rsp), %rsi
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x73216
movq 0x10(%r12), %r13
cmpq %rbx, %r13
je 0x74dd3
cmpq %rbx, 0x10(%r14)
jne 0x74df7
movq %r12, %rdi
callq 0x7317d
movq %r14, %rdi
callq 0x7317d
pushq $0x20
popq %rbp
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x18(%r14)
je 0x74f01
testl $0xfffffffb, 0x18(%rsp) # imm = 0xFFFFFFFB
jne 0x74eac
leaq 0x28(%rsp), %r14
movq 0x10(%r14), %rbx
leaq -0x1(%rbx), %rax
movq %rax, 0x10(%r14)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x73916
movq %rbx, 0x10(%r14)
movq 0x8(%rsp), %r14
testl %eax, %eax
jg 0x74eb3
jne 0x74f01
cmpl $0x4, 0x18(%rsp)
je 0x74eb3
movq 0x18(%r12), %rdx
movq %rdx, %rax
shlq $0x6, %rax
subq %r13, %rax
movq %rax, %rcx
sarq $0x6, %rcx
sets %sil
cmpq %rdx, %rcx
setae %dl
orb %sil, %dl
jne 0x74f01
movq 0x20(%r12), %rdx
movq (%rdx,%rcx,8), %rcx
btq %rax, %rcx
jb 0x74eb3
jmp 0x74f01
movq %r14, %rdi
movq %r15, %rsi
callq 0x73216
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movl 0x14(%rsp), %edx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x737bb
cmpl $0x0, 0x4(%rsp)
je 0x74f01
pushq $0x1
popq %rdx
movabsq $0x3fffffffffffffff, %r14 # imm = 0x3FFFFFFFFFFFFFFF
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rcx
movl %ebp, %r8d
callq 0x74f2a
movl %eax, %r13d
leaq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rcx
movq 0x8(%rsp), %r14
movl %ebp, %r8d
callq 0x74fa7
orl %r13d, %eax
testb $0x20, %al
jne 0x74dd3
movl 0x8(%r15), %eax
xorl %eax, 0x8(%r14)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%r12)
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movl 0x14(%rsp), %edx
callq 0x737bb
movl %eax, %ebp
jmp 0x74de6
|
bf_divrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_94], r9d
mov [rsp+0A8h+var_88], r8
mov r13, rcx
mov r15, rdx
mov r14, rsi
mov r12, rdi
mov rbx, 7FFFFFFFFFFFFFFFh
mov rcx, [rdx+18h]
test rcx, rcx
jz short loc_74C8F
mov rax, [r13+18h]
test rax, rax
jz short loc_74C8F
mov edi, [rsp+0A8h+arg_0]
mov edx, [r15+8]
mov esi, [r13+8]
xor esi, edx
mov [rsp+0A8h+var_98], esi
mov [rsp+0A8h+var_A4], 0
mov [rsp+0A8h+var_90], rdi
lea esi, [rdi-2]; switch 5 cases
cmp esi, 4
mov [rsp+0A8h+var_A0], r14
ja short def_74C87; jumptable 0000000000074C87 default case, case 4
lea rdi, jpt_74C87
movsxd rsi, ds:(jpt_74C87 - 8CA30h)[rdi+rsi*4]
add rsi, rdi
jmp rsi; switch jump
loc_74C89:
mov edx, [rsp+0A8h+var_98]; jumptable 0000000000074C87 case 2
jmp short loc_74CF0; jumptable 0000000000074C87 case 6
loc_74C8F:
xor ebp, ebp
mov rdi, r12
xor esi, esi
call bf_set_zero
mov rax, [r15+10h]
cmp rax, rbx
jz short loc_74CAD
mov rcx, [r13+10h]
cmp rcx, rbx
jnz short loc_74CBA
loc_74CAD:
mov rdi, r14
call bf_set_nan
jmp loc_74DE6
loc_74CBA:
lea rdx, [rbx-1]
cmp rax, rdx
setnz al
inc rbx
cmp rcx, rbx
setnz cl
test al, cl
jnz loc_74E82
mov rdi, r14
call bf_set_nan
push 1
jmp loc_74DE5
loc_74CE4:
mov edx, [rsp+0A8h+var_98]; jumptable 0000000000074C87 case 3
xor edx, 1
jmp short loc_74CF0; jumptable 0000000000074C87 case 6
loc_74CED:
push 1; jumptable 0000000000074C87 case 5
pop rdx
loc_74CF0:
mov [rsp+0A8h+var_A4], edx; jumptable 0000000000074C87 case 6
def_74C87:
mov r14, [r15+10h]; jumptable 0000000000074C87 default case, case 4
lea rdi, [rsp+0A8h+var_58]
mov [rdi+10h], r14
mov rdx, [r15+20h]
mov [rdi+20h], rdx
mov [rdi+18h], rcx
and dword ptr [rdi+8], 0
mov rbp, [r13+10h]
lea rsi, [rsp+0A8h+var_80]
mov [rsi+10h], rbp
mov rcx, [r13+20h]
mov [rsi+20h], rcx
mov [rsi+18h], rax
and dword ptr [rsi+8], 0
call bf_cmpu
test eax, eax
js short loc_74DA7
sub r14, rbp
cmp r14, 2
push 1
pop rcx
cmovge rcx, r14
inc rcx
lea rsi, [rsp+0A8h+var_58]
lea rdx, [rsp+0A8h+var_80]
push 1
pop rbp
mov rdi, r12
mov r8d, ebp
call bf_div
mov rdi, r12
mov esi, ebp
call bf_rint
mov r13, 3FFFFFFFFFFFFFFFh
mov r14, [rsp+0A8h+var_A0]
mov rdi, r14
mov rsi, r12
lea rdx, [rsp+0A8h+var_80]
mov rcx, r13
mov r8d, ebp
call bf_mul
mov rdi, r14
lea rsi, [rsp+0A8h+var_58]
mov rdx, r14
mov rcx, r13
mov r8d, ebp
call bf_sub
jmp short loc_74DC3
loc_74DA7:
mov rdi, r12
xor esi, esi
call bf_set_ui
lea rsi, [rsp+0A8h+var_58]
mov r14, [rsp+0A8h+var_A0]
mov rdi, r14
call bf_set
loc_74DC3:
mov r13, [r12+10h]
cmp r13, rbx
jz short loc_74DD3
cmp [r14+10h], rbx
jnz short loc_74DF7
loc_74DD3:
mov rdi, r12
call bf_set_nan
mov rdi, r14
call bf_set_nan
push 20h ; ' '
loc_74DE5:
pop rbp
loc_74DE6:
mov eax, ebp
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_74DF7:
cmp qword ptr [r14+18h], 0
jz loc_74F01
test dword ptr [rsp+0A8h+var_90], 0FFFFFFFBh
jnz loc_74EAC
lea r14, [rsp+0A8h+var_80]
mov rbx, [r14+10h]
lea rax, [rbx-1]
mov [r14+10h], rax
mov rdi, [rsp+0A8h+var_A0]
mov rsi, r14
call bf_cmpu
mov [r14+10h], rbx
mov r14, [rsp+0A8h+var_A0]
test eax, eax
jg short loc_74EB3
jnz loc_74F01
cmp dword ptr [rsp+0A8h+var_90], 4
jz short loc_74EB3
mov rdx, [r12+18h]
mov rax, rdx
shl rax, 6
sub rax, r13
mov rcx, rax
sar rcx, 6
sets sil
cmp rcx, rdx
setnb dl
or dl, sil
jnz loc_74F01
mov rdx, [r12+20h]
mov rcx, [rdx+rcx*8]
bt rcx, rax
jb short loc_74EB3
jmp short loc_74F01
loc_74E82:
mov rdi, r14
mov rsi, r15
call bf_set
mov rdi, r14
mov rsi, [rsp+0A8h+var_88]
mov edx, [rsp+0A8h+var_94]
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_round
loc_74EAC:
cmp [rsp+0A8h+var_A4], 0
jz short loc_74F01
loc_74EB3:
push 1
pop rdx
mov r14, 3FFFFFFFFFFFFFFFh
push 1
pop rbp
mov rdi, r12
mov rsi, r12
mov rcx, r14
mov r8d, ebp
call bf_add_si
mov r13d, eax
lea rdx, [rsp+0A8h+var_80]
mov rdi, [rsp+0A8h+var_A0]
mov rsi, [rsp+0A8h+var_A0]
mov rcx, r14
mov r14, [rsp+0A8h+var_A0]
mov r8d, ebp
call bf_sub
or eax, r13d
test al, 20h
jnz loc_74DD3
loc_74F01:
mov eax, [r15+8]
xor [r14+8], eax
mov eax, [rsp+0A8h+var_98]
mov [r12+8], eax
mov rdi, r14
mov rsi, [rsp+0A8h+var_88]
mov edx, [rsp+0A8h+var_94]
call bf_round
mov ebp, eax
jmp loc_74DE6
|
long long bf_divrem(long long a1, long long *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7)
{
long long v9; // rcx
long long v10; // rax
int v11; // edx
unsigned int v12; // ebp
long long v13; // rax
long long v14; // rcx
long long v15; // r14
long long v16; // rbp
long long v17; // r14
long long v18; // rcx
long long v19; // r14
long long v20; // r13
long long v22; // rbx
int v23; // eax
long long v24; // rcx
long long v25; // rcx
unsigned __int8 v26; // r13
int v28; // [rsp+4h] [rbp-A4h]
int v29; // [rsp+10h] [rbp-98h]
long long v32; // [rsp+28h] [rbp-80h] BYREF
int v33; // [rsp+30h] [rbp-78h]
long long v34; // [rsp+38h] [rbp-70h]
long long v35; // [rsp+40h] [rbp-68h]
long long v36; // [rsp+48h] [rbp-60h]
long long v37; // [rsp+50h] [rbp-58h] BYREF
int v38; // [rsp+58h] [rbp-50h]
long long v39; // [rsp+60h] [rbp-48h]
long long v40; // [rsp+68h] [rbp-40h]
long long v41; // [rsp+70h] [rbp-38h]
v9 = *(_QWORD *)(a3 + 24);
if ( v9 )
{
v10 = *(_QWORD *)(a4 + 24);
if ( v10 )
{
v11 = *(_DWORD *)(a3 + 8);
v29 = v11 ^ *(_DWORD *)(a4 + 8);
v28 = 0;
switch ( a7 )
{
case 2:
v11 ^= *(_DWORD *)(a4 + 8);
goto LABEL_12;
case 3:
v11 = v29 ^ 1;
goto LABEL_12;
case 5:
v11 = 1;
goto LABEL_12;
case 6:
LABEL_12:
v28 = v11;
break;
default:
break;
}
v15 = *(_QWORD *)(a3 + 16);
v39 = v15;
v41 = *(_QWORD *)(a3 + 32);
v40 = v9;
v38 = 0;
v16 = *(_QWORD *)(a4 + 16);
v34 = v16;
v36 = *(_QWORD *)(a4 + 32);
v35 = v10;
v33 = 0;
if ( (int)bf_cmpu(&v37, &v32) < 0 )
{
bf_set_ui(a1, 0LL);
v19 = (long long)a2;
bf_set((long long)a2, (long long)&v37);
}
else
{
v17 = v15 - v16;
v18 = 1LL;
if ( v17 >= 2 )
v18 = v17;
bf_div(a1, &v37, &v32, v18 + 1, 1LL);
bf_rint(a1, 1LL);
v19 = (long long)a2;
bf_mul(a2, (long long *)a1, &v32, 0x3FFFFFFFFFFFFFFFLL, 1u);
bf_sub(v19, &v37, v19, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
v20 = *(_QWORD *)(a1 + 16);
if ( v20 == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(v19 + 16) == 0x7FFFFFFFFFFFFFFFLL )
goto LABEL_20;
if ( *(_QWORD *)(v19 + 24) )
{
if ( (a7 & 0xFFFFFFFB) != 0 )
{
if ( !v28 )
goto LABEL_34;
}
else
{
v22 = v34--;
v23 = bf_cmpu(a2, &v32);
v34 = v22;
v19 = (long long)a2;
if ( v23 <= 0 )
{
if ( v23 )
goto LABEL_34;
if ( a7 != 4 )
{
v24 = ((*(_QWORD *)(a1 + 24) << 6) - v20) >> 6;
if ( v24 < 0 || (unsigned long long)v24 >= *(_QWORD *)(a1 + 24) )
goto LABEL_34;
v25 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v24);
if ( !_bittest64(&v25, (*(_QWORD *)(a1 + 24) << 6) - v20) )
goto LABEL_34;
}
}
}
v26 = bf_add_si(a1, a1, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
v19 = (long long)a2;
if ( ((v26 | (unsigned __int8)bf_sub(a2, a2, &v32, 0x3FFFFFFFFFFFFFFFLL, 1LL)) & 0x20) != 0 )
{
LABEL_20:
bf_set_nan(a1);
bf_set_nan(v19);
return 32;
}
}
LABEL_34:
*(_DWORD *)(v19 + 8) ^= *(_DWORD *)(a3 + 8);
*(_DWORD *)(a1 + 8) = v29;
return (unsigned int)bf_round(v19, a5, a6);
}
}
v12 = 0;
bf_set_zero(a1, 0);
v13 = *(_QWORD *)(a3 + 16);
if ( v13 == 0x7FFFFFFFFFFFFFFFLL || (v14 = *(_QWORD *)(a4 + 16), v14 == 0x7FFFFFFFFFFFFFFFLL) )
{
bf_set_nan((long long)a2);
return v12;
}
if ( v14 == 0x8000000000000000LL || v13 == 0x7FFFFFFFFFFFFFFELL )
{
bf_set_nan((long long)a2);
return 1;
}
bf_set((long long)a2, a3);
return bf_round((long long)a2, a5, a6);
}
|
bf_divrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RSP + 0x14],R9D
MOV qword ptr [RSP + 0x20],R8
MOV R13,RCX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
MOV RBX,0x7fffffffffffffff
MOV RCX,qword ptr [RDX + 0x18]
TEST RCX,RCX
JZ 0x00174c8f
MOV RAX,qword ptr [R13 + 0x18]
TEST RAX,RAX
JZ 0x00174c8f
MOV EDI,dword ptr [RSP + 0xb0]
MOV EDX,dword ptr [R15 + 0x8]
MOV ESI,dword ptr [R13 + 0x8]
XOR ESI,EDX
MOV dword ptr [RSP + 0x10],ESI
MOV dword ptr [RSP + 0x4],0x0
MOV qword ptr [RSP + 0x18],RDI
LEA ESI,[RDI + -0x2]
CMP ESI,0x4
MOV qword ptr [RSP + 0x8],R14
JA 0x00174cf4
LEA RDI,[0x18ca30]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
switchD:
JMP RSI
caseD_2:
MOV EDX,dword ptr [RSP + 0x10]
JMP 0x00174cf0
LAB_00174c8f:
XOR EBP,EBP
MOV RDI,R12
XOR ESI,ESI
CALL 0x001731c2
MOV RAX,qword ptr [R15 + 0x10]
CMP RAX,RBX
JZ 0x00174cad
MOV RCX,qword ptr [R13 + 0x10]
CMP RCX,RBX
JNZ 0x00174cba
LAB_00174cad:
MOV RDI,R14
CALL 0x0017317d
JMP 0x00174de6
LAB_00174cba:
LEA RDX,[RBX + -0x1]
CMP RAX,RDX
SETNZ AL
INC RBX
CMP RCX,RBX
SETNZ CL
TEST AL,CL
JNZ 0x00174e82
MOV RDI,R14
CALL 0x0017317d
PUSH 0x1
JMP 0x00174de5
caseD_3:
MOV EDX,dword ptr [RSP + 0x10]
XOR EDX,0x1
JMP 0x00174cf0
caseD_5:
PUSH 0x1
POP RDX
caseD_6:
MOV dword ptr [RSP + 0x4],EDX
caseD_4:
MOV R14,qword ptr [R15 + 0x10]
LEA RDI,[RSP + 0x50]
MOV qword ptr [RDI + 0x10],R14
MOV RDX,qword ptr [R15 + 0x20]
MOV qword ptr [RDI + 0x20],RDX
MOV qword ptr [RDI + 0x18],RCX
AND dword ptr [RDI + 0x8],0x0
MOV RBP,qword ptr [R13 + 0x10]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI + 0x10],RBP
MOV RCX,qword ptr [R13 + 0x20]
MOV qword ptr [RSI + 0x20],RCX
MOV qword ptr [RSI + 0x18],RAX
AND dword ptr [RSI + 0x8],0x0
CALL 0x00173916
TEST EAX,EAX
JS 0x00174da7
SUB R14,RBP
CMP R14,0x2
PUSH 0x1
POP RCX
CMOVGE RCX,R14
INC RCX
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x28]
PUSH 0x1
POP RBP
MOV RDI,R12
MOV R8D,EBP
CALL 0x001758a2
MOV RDI,R12
MOV ESI,EBP
CALL 0x001757ed
MOV R13,0x3fffffffffffffff
MOV R14,qword ptr [RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
LEA RDX,[RSP + 0x28]
MOV RCX,R13
MOV R8D,EBP
CALL 0x00174959
MOV RDI,R14
LEA RSI,[RSP + 0x50]
MOV RDX,R14
MOV RCX,R13
MOV R8D,EBP
CALL 0x00174fa7
JMP 0x00174dc3
LAB_00174da7:
MOV RDI,R12
XOR ESI,ESI
CALL 0x00173106
LEA RSI,[RSP + 0x50]
MOV R14,qword ptr [RSP + 0x8]
MOV RDI,R14
CALL 0x00173216
LAB_00174dc3:
MOV R13,qword ptr [R12 + 0x10]
CMP R13,RBX
JZ 0x00174dd3
CMP qword ptr [R14 + 0x10],RBX
JNZ 0x00174df7
LAB_00174dd3:
MOV RDI,R12
CALL 0x0017317d
MOV RDI,R14
CALL 0x0017317d
PUSH 0x20
LAB_00174de5:
POP RBP
LAB_00174de6:
MOV EAX,EBP
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00174df7:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x00174f01
TEST dword ptr [RSP + 0x18],0xfffffffb
JNZ 0x00174eac
LEA R14,[RSP + 0x28]
MOV RBX,qword ptr [R14 + 0x10]
LEA RAX,[RBX + -0x1]
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R14
CALL 0x00173916
MOV qword ptr [R14 + 0x10],RBX
MOV R14,qword ptr [RSP + 0x8]
TEST EAX,EAX
JG 0x00174eb3
JNZ 0x00174f01
CMP dword ptr [RSP + 0x18],0x4
JZ 0x00174eb3
MOV RDX,qword ptr [R12 + 0x18]
MOV RAX,RDX
SHL RAX,0x6
SUB RAX,R13
MOV RCX,RAX
SAR RCX,0x6
SETS SIL
CMP RCX,RDX
SETNC DL
OR DL,SIL
JNZ 0x00174f01
MOV RDX,qword ptr [R12 + 0x20]
MOV RCX,qword ptr [RDX + RCX*0x8]
BT RCX,RAX
JC 0x00174eb3
JMP 0x00174f01
LAB_00174e82:
MOV RDI,R14
MOV RSI,R15
CALL 0x00173216
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x14]
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001737bb
LAB_00174eac:
CMP dword ptr [RSP + 0x4],0x0
JZ 0x00174f01
LAB_00174eb3:
PUSH 0x1
POP RDX
MOV R14,0x3fffffffffffffff
PUSH 0x1
POP RBP
MOV RDI,R12
MOV RSI,R12
MOV RCX,R14
MOV R8D,EBP
CALL 0x00174f2a
MOV R13D,EAX
LEA RDX,[RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,R14
MOV R14,qword ptr [RSP + 0x8]
MOV R8D,EBP
CALL 0x00174fa7
OR EAX,R13D
TEST AL,0x20
JNZ 0x00174dd3
LAB_00174f01:
MOV EAX,dword ptr [R15 + 0x8]
XOR dword ptr [R14 + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [R12 + 0x8],EAX
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x14]
CALL 0x001737bb
MOV EBP,EAX
JMP 0x00174de6
|
ulong bf_divrem(long param_1,long param_2,long param_3,long param_4,int8 param_5,
int4 param_6,uint param_7)
{
int iVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
uint uVar7;
long lVar8;
ulong uStack_b0;
uint local_a4;
int1 local_80 [8];
int4 local_78;
long local_70;
long local_68;
int8 local_60;
int1 local_58 [8];
int4 local_50;
long local_48;
long local_40;
int8 local_38;
local_40 = *(long *)(param_3 + 0x18);
if ((local_40 == 0) || (local_68 = *(long *)(param_4 + 0x18), local_68 == 0)) {
bf_set_zero(param_1,0);
if ((*(long *)(param_3 + 0x10) != 0x7fffffffffffffff) &&
(*(long *)(param_4 + 0x10) != 0x7fffffffffffffff)) {
if (*(long *)(param_3 + 0x10) == 0x7ffffffffffffffe ||
*(long *)(param_4 + 0x10) == -0x8000000000000000) {
bf_set_nan(param_2);
return 1;
}
bf_set(param_2,param_3);
uVar4 = bf_round(param_2,param_5,param_6);
return uVar4;
}
bf_set_nan(param_2);
return 0;
}
uVar7 = *(uint *)(param_4 + 8) ^ *(uint *)(param_3 + 8);
local_a4 = 0;
uVar3 = *(uint *)(param_3 + 8);
switch(param_7) {
case 2:
uVar3 = uVar7;
break;
case 3:
uVar3 = uVar7 ^ 1;
break;
default:
goto switchD_00174c87_caseD_4;
case 5:
uVar3 = 1;
break;
case 6:
break;
}
local_a4 = uVar3;
switchD_00174c87_caseD_4:
lVar8 = *(long *)(param_3 + 0x10);
local_38 = *(int8 *)(param_3 + 0x20);
local_50 = 0;
lVar5 = *(long *)(param_4 + 0x10);
local_60 = *(int8 *)(param_4 + 0x20);
local_78 = 0;
local_70 = lVar5;
local_48 = lVar8;
iVar1 = bf_cmpu();
if (iVar1 < 0) {
bf_set_ui(param_1,0);
bf_set(param_2,local_58);
}
else {
lVar8 = lVar8 - lVar5;
lVar5 = 1;
if (1 < lVar8) {
lVar5 = lVar8;
}
bf_div(param_1,local_58,local_80,lVar5 + 1,1);
bf_rint(param_1,1);
bf_mul(param_2,param_1,local_80,0x3fffffffffffffff,1);
bf_sub(param_2,local_58,param_2,0x3fffffffffffffff,1);
}
lVar5 = local_70;
lVar8 = *(long *)(param_1 + 0x10);
if ((lVar8 == 0x7fffffffffffffff) || (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff)) {
LAB_00174dd3:
bf_set_nan(param_1);
bf_set_nan(param_2);
uStack_b0 = 0x20;
}
else {
local_70 = lVar5;
if (*(long *)(param_2 + 0x18) != 0) {
if ((param_7 & 0xfffffffb) == 0) {
local_70 = local_70 + -1;
iVar1 = bf_cmpu(param_2,local_80);
if (iVar1 < 1) {
local_70 = lVar5;
if (iVar1 != 0) goto LAB_00174f01;
if (param_7 != 4) {
uVar4 = *(ulong *)(param_1 + 0x18) * 0x40 - lVar8;
uVar6 = (long)uVar4 >> 6;
if ((*(ulong *)(param_1 + 0x18) <= uVar6 || (long)uVar6 < 0) ||
((*(ulong *)(*(long *)(param_1 + 0x20) + uVar6 * 8) >> (uVar4 & 0x3f) & 1) == 0))
goto LAB_00174f01;
}
}
}
else if (local_a4 == 0) goto LAB_00174f01;
local_70 = lVar5;
uVar3 = bf_add_si(param_1,param_1,1,0x3fffffffffffffff,1);
uVar2 = bf_sub(param_2,param_2,local_80,0x3fffffffffffffff,1);
if (((uVar2 | uVar3) & 0x20) != 0) goto LAB_00174dd3;
}
LAB_00174f01:
*(uint *)(param_2 + 8) = *(uint *)(param_2 + 8) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 8) = uVar7;
uVar3 = bf_round(param_2,param_5,param_6);
uStack_b0 = (ulong)uVar3;
}
return uStack_b0;
}
|
|
19,555
|
glfwGetJoystickButtons
|
untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c
|
char* glfwGetJoystickButtons(int jid, int* count)
{
_GLFWjoystick* js;
assert(jid >= GLFW_JOYSTICK_1);
assert(jid <= GLFW_JOYSTICK_LAST);
assert(count != NULL);
*count = 0;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
{
_glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
return NULL;
}
js = _glfw.joysticks + jid;
if (!js->present)
return NULL;
if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_BUTTONS))
return NULL;
if (_glfw.hints.init.hatButtons)
*count = js->buttonCount + js->hatCount * 4;
else
*count = js->buttonCount;
return js->buttons;
}
|
O3
|
c
|
glfwGetJoystickButtons:
pushq %r15
pushq %r14
pushq %rbx
testl %edi, %edi
js 0x1a649
cmpl $0x10, %edi
jae 0x1a668
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1a687
movl $0x0, (%rbx)
leaq 0x8e05c(%rip), %r15 # 0xa8638
cmpl $0x0, (%r15)
je 0x1a630
movl %edi, %eax
imulq $0x1fa0, %rax, %rax # imm = 0x1FA0
cmpl $0x0, 0x408(%r15,%rax)
je 0x1a62c
leaq (%r15,%rax), %r14
addq $0x408, %r14 # imm = 0x408
movq %r14, %rdi
movl $0x2, %esi
callq 0x28ef5
testl %eax, %eax
je 0x1a62c
cmpl $0x0, 0x8(%r15)
movl 0x20(%r14), %eax
je 0x1a624
movl 0x30(%r14), %ecx
leal (%rax,%rcx,4), %eax
movl %eax, (%rbx)
movq 0x18(%r14), %rbx
jmp 0x1a640
xorl %ebx, %ebx
jmp 0x1a640
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
callq 0x18e91
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x68b30(%rip), %rdi # 0x83180
leaq 0x6865d(%rip), %rsi # 0x82cb4
leaq 0x68bab(%rip), %rcx # 0x83209
movl $0x3c6, %edx # imm = 0x3C6
callq 0xc540
leaq 0x68b45(%rip), %rdi # 0x831b4
leaq 0x6863e(%rip), %rsi # 0x82cb4
leaq 0x68b8c(%rip), %rcx # 0x83209
movl $0x3c7, %edx # imm = 0x3C7
callq 0xc540
leaq 0x68b6d(%rip), %rdi # 0x831fb
leaq 0x6861f(%rip), %rsi # 0x82cb4
leaq 0x68b6d(%rip), %rcx # 0x83209
movl $0x3c8, %edx # imm = 0x3C8
callq 0xc540
|
glfwGetJoystickButtons:
push r15
push r14
push rbx
test edi, edi
js loc_1A649
cmp edi, 10h
jnb loc_1A668
mov rbx, rsi
test rsi, rsi
jz loc_1A687
mov dword ptr [rbx], 0
lea r15, _glfw
cmp dword ptr [r15], 0
jz short loc_1A630
mov eax, edi
imul rax, 1FA0h
cmp dword ptr [r15+rax+408h], 0
jz short loc_1A62C
lea r14, [r15+rax]
add r14, 408h
mov rdi, r14
mov esi, 2
call _glfwPlatformPollJoystick
test eax, eax
jz short loc_1A62C
cmp dword ptr [r15+8], 0
mov eax, [r14+20h]
jz short loc_1A624
mov ecx, [r14+30h]
lea eax, [rax+rcx*4]
loc_1A624:
mov [rbx], eax
mov rbx, [r14+18h]
jmp short loc_1A640
loc_1A62C:
xor ebx, ebx
jmp short loc_1A640
loc_1A630:
xor ebx, ebx
mov edi, offset loc_10001
xor esi, esi
xor eax, eax
call _glfwInputError
loc_1A640:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_1A649:
lea rdi, aJidGlfwJoystic; "jid >= GLFW_JOYSTICK_1"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstUnsignedC; "const unsigned char *glfwGetJoystickBut"...
mov edx, 3C6h
call ___assert_fail
loc_1A668:
lea rdi, aJidGlfwJoystic_0; "jid <= GLFW_JOYSTICK_LAST"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstUnsignedC; "const unsigned char *glfwGetJoystickBut"...
mov edx, 3C7h
call ___assert_fail
loc_1A687:
lea rdi, aCountNull; "count != NULL"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstUnsignedC; "const unsigned char *glfwGetJoystickBut"...
mov edx, 3C8h
call ___assert_fail
|
long long glfwGetJoystickButtons(int a1, _DWORD *a2)
{
long long v2; // rax
_DWORD *v3; // r14
int v4; // eax
long long v5; // rbx
if ( a1 < 0 )
__assert_fail(
"jid >= GLFW_JOYSTICK_1",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c",
966LL,
"const unsigned char *glfwGetJoystickButtons(int, int *)");
if ( (unsigned int)a1 >= 0x10 )
__assert_fail(
"jid <= GLFW_JOYSTICK_LAST",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c",
967LL,
"const unsigned char *glfwGetJoystickButtons(int, int *)");
if ( !a2 )
__assert_fail(
"count != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c",
968LL,
"const unsigned char *glfwGetJoystickButtons(int, int *)");
*a2 = 0;
if ( glfw[0] )
{
v2 = 2024LL * (unsigned int)a1;
if ( glfw[v2 + 258] && (v3 = &glfw[v2 + 258], (unsigned int)glfwPlatformPollJoystick(v3, 2LL)) )
{
v4 = v3[8];
if ( glfw[2] )
v4 += 4 * v3[12];
*a2 = v4;
return *((_QWORD *)v3 + 3);
}
else
{
return 0LL;
}
}
else
{
v5 = 0LL;
glfwInputError((unsigned int)&loc_10001, 0LL);
}
return v5;
}
|
glfwGetJoystickButtons:
PUSH R15
PUSH R14
PUSH RBX
TEST EDI,EDI
JS 0x0011a649
CMP EDI,0x10
JNC 0x0011a668
MOV RBX,RSI
TEST RSI,RSI
JZ 0x0011a687
MOV dword ptr [RBX],0x0
LEA R15,[0x1a8638]
CMP dword ptr [R15],0x0
JZ 0x0011a630
MOV EAX,EDI
IMUL RAX,RAX,0x1fa0
CMP dword ptr [R15 + RAX*0x1 + 0x408],0x0
JZ 0x0011a62c
LEA R14,[R15 + RAX*0x1]
ADD R14,0x408
MOV RDI,R14
MOV ESI,0x2
CALL 0x00128ef5
TEST EAX,EAX
JZ 0x0011a62c
CMP dword ptr [R15 + 0x8],0x0
MOV EAX,dword ptr [R14 + 0x20]
JZ 0x0011a624
MOV ECX,dword ptr [R14 + 0x30]
LEA EAX,[RAX + RCX*0x4]
LAB_0011a624:
MOV dword ptr [RBX],EAX
MOV RBX,qword ptr [R14 + 0x18]
JMP 0x0011a640
LAB_0011a62c:
XOR EBX,EBX
JMP 0x0011a640
LAB_0011a630:
XOR EBX,EBX
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
CALL 0x00118e91
LAB_0011a640:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0011a649:
LEA RDI,[0x183180]
LEA RSI,[0x182cb4]
LEA RCX,[0x183209]
MOV EDX,0x3c6
CALL 0x0010c540
LAB_0011a668:
LEA RDI,[0x1831b4]
LEA RSI,[0x182cb4]
LEA RCX,[0x183209]
MOV EDX,0x3c7
CALL 0x0010c540
LAB_0011a687:
LEA RDI,[0x1831fb]
LEA RSI,[0x182cb4]
LEA RCX,[0x183209]
MOV EDX,0x3c8
CALL 0x0010c540
|
int8 glfwGetJoystickButtons(uint param_1,int *param_2)
{
int iVar1;
ulong uVar2;
if ((int)param_1 < 0) {
/* WARNING: Subroutine does not return */
__assert_fail("jid >= GLFW_JOYSTICK_1",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c"
,0x3c6,"const unsigned char *glfwGetJoystickButtons(int, int *)");
}
if (0xf < param_1) {
/* WARNING: Subroutine does not return */
__assert_fail("jid <= GLFW_JOYSTICK_LAST",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c"
,0x3c7,"const unsigned char *glfwGetJoystickButtons(int, int *)");
}
if (param_2 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("count != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c"
,0x3c8,"const unsigned char *glfwGetJoystickButtons(int, int *)");
}
*param_2 = 0;
if (_glfw == 0) {
_glfwInputError(0x10001,0);
}
else {
uVar2 = (ulong)param_1;
if (((&DAT_001a8a40)[uVar2 * 0x7e8] != 0) &&
(iVar1 = _glfwPlatformPollJoystick(&DAT_001a8a40 + uVar2 * 0x7e8,2), iVar1 != 0)) {
iVar1 = (&DAT_001a8a60)[uVar2 * 0x7e8];
if (DAT_001a8640 != 0) {
iVar1 = iVar1 + (&DAT_001a8a70)[uVar2 * 0x7e8] * 4;
}
*param_2 = iVar1;
return (&DAT_001a8a58)[uVar2 * 0x3f4];
}
}
return 0;
}
|
|
19,556
|
testing::internal::BriefUnitTestResultPrinter::OnTestPartResult(testing::TestPartResult const&)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
void BriefUnitTestResultPrinter::OnTestPartResult(
const TestPartResult& result) {
switch (result.type()) {
// If the test part succeeded, we don't need to do anything.
case TestPartResult::kSuccess:
return;
default:
// Print failure message from the assertion
// (e.g. expected this and got that).
PrintTestPartResult(result);
fflush(stdout);
}
}
|
O1
|
cpp
|
testing::internal::BriefUnitTestResultPrinter::OnTestPartResult(testing::TestPartResult const&):
cmpl $0x0, (%rsi)
je 0x23ad2
pushq %rax
movq %rsi, %rdi
callq 0x22fb5
movq 0x354b7(%rip), %rax # 0x58f80
movq (%rax), %rdi
popq %rax
jmp 0x8600
retq
nop
|
_ZN7testing8internal26BriefUnitTestResultPrinter16OnTestPartResultERKNS_14TestPartResultE:
cmp dword ptr [rsi], 0
jz short locret_23AD2
push rax
mov rdi, rsi; this
call _ZN7testing8internalL19PrintTestPartResultERKNS_14TestPartResultE; testing::internal::PrintTestPartResult(testing::TestPartResult const&)
mov rax, cs:stdout_ptr
mov rdi, [rax]
pop rax
jmp _fflush
locret_23AD2:
retn
|
long long testing::internal::BriefUnitTestResultPrinter::OnTestPartResult(
testing::internal::BriefUnitTestResultPrinter *this,
const testing::TestPartResult *a2)
{
long long result; // rax
if ( *(_DWORD *)a2 )
{
testing::internal::PrintTestPartResult(a2, a2);
return fflush(stdout);
}
return result;
}
|
OnTestPartResult:
CMP dword ptr [RSI],0x0
JZ 0x00123ad2
PUSH RAX
MOV RDI,RSI
CALL 0x00122fb5
MOV RAX,qword ptr [0x00158f80]
MOV RDI,qword ptr [RAX]
POP RAX
JMP 0x00108600
LAB_00123ad2:
RET
|
/* testing::internal::BriefUnitTestResultPrinter::OnTestPartResult(testing::TestPartResult const&)
*/
void __thiscall
testing::internal::BriefUnitTestResultPrinter::OnTestPartResult
(BriefUnitTestResultPrinter *this,TestPartResult *param_1)
{
if (*(int *)param_1 != 0) {
PrintTestPartResult(param_1);
fflush(*(FILE **)PTR_stdout_00158f80);
return;
}
return;
}
|
|
19,557
|
my_well_formed_char_length_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_well_formed_char_length_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length= e - b;
if (nchars * 2 <= length)
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= b + (nchars * 2);
return nchars;
}
if (length % 2)
{
status->m_well_formed_error_pos= status->m_source_end_pos= e - 1;
}
else
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= e;
}
return length / 2;
}
|
O0
|
c
|
my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
cmpq -0x38(%rbp), %rax
ja 0xad79f
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
shlq %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xad7e8
movq -0x38(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xad7c6
movq -0x20(%rbp), %rcx
addq $-0x1, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xad7dd
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
|
my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
shl rax, 1
cmp rax, [rbp+var_38]
ja short loc_AD79F
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
shl rax, 1
add rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_AD7E8
loc_AD79F:
mov rax, [rbp+var_38]
and rax, 1
cmp rax, 0
jz short loc_AD7C6
mov rcx, [rbp+var_20]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rax+8], rcx
jmp short loc_AD7DD
loc_AD7C6:
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_AD7DD:
mov rax, [rbp+var_38]
shr rax, 1
mov [rbp+var_8], rax
loc_AD7E8:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned long long my_well_formed_char_length_ucs2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // [rsp+0h] [rbp-38h]
v6 = a3 - a2;
if ( 2 * a4 > (unsigned long long)(a3 - a2) )
{
if ( (v6 & 1) != 0 )
{
*a5 = a3 - 1;
a5[1] = a3 - 1;
}
else
{
a5[1] = 0LL;
*a5 = a3;
}
return v6 >> 1;
}
else
{
a5[1] = 0LL;
*a5 = 2 * a4 + a2;
return a4;
}
}
|
my_well_formed_char_length_ucs2:
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],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JA 0x001ad79f
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ad7e8
LAB_001ad79f:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001ad7c6
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001ad7dd
LAB_001ad7c6:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001ad7dd:
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_001ad7e8:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,long param_3,ulong param_4,long *param_5)
{
ulong local_10;
local_10 = param_3 - param_2;
if (param_4 * 2 < local_10 || param_4 * 2 - local_10 == 0) {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
local_10 = param_4;
}
else {
if ((local_10 & 1) == 0) {
param_5[1] = 0;
*param_5 = param_3;
}
else {
*param_5 = param_3 + -1;
param_5[1] = param_3 + -1;
}
local_10 = local_10 >> 1;
}
return local_10;
}
|
|
19,558
|
my_error_unregister_all
|
eloqsql/mysys/my_error.c
|
void my_error_unregister_all(void)
{
struct my_err_head *cursor, *saved_next;
for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next)
{
/* We need this ptr, but we're about to free its container, so save it. */
saved_next= cursor->meh_next;
my_free(cursor);
}
my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */
my_errmsgs_list= &my_errmsgs_globerrs;
}
|
O3
|
c
|
my_error_unregister_all:
movq 0x2eb36b(%rip), %rdi # 0x3378e0
testq %rdi, %rdi
je 0x4c596
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
callq 0x4afe6
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x4c580
addq $0x8, %rsp
popq %rbx
popq %rbp
movq $0x0, 0x2eb33f(%rip) # 0x3378e0
leaq 0x2eb338(%rip), %rax # 0x3378e0
movq %rax, 0x2eb329(%rip) # 0x3378d8
retq
|
my_error_unregister_all:
mov rdi, cs:my_errmsgs_globerrs
test rdi, rdi
jz short loc_4C596
push rbp
mov rbp, rsp
push rbx
push rax
loc_4C580:
mov rbx, [rdi]
call my_free
mov rdi, rbx
test rbx, rbx
jnz short loc_4C580
add rsp, 8
pop rbx
pop rbp
loc_4C596:
mov cs:my_errmsgs_globerrs, 0
lea rax, my_errmsgs_globerrs
mov cs:my_errmsgs_list, rax
retn
|
long long *my_error_unregister_all()
{
_QWORD *v0; // rdi
_QWORD *v1; // rbx
long long *result; // rax
v0 = (_QWORD *)my_errmsgs_globerrs;
if ( my_errmsgs_globerrs )
{
do
{
v1 = (_QWORD *)*v0;
my_free((long long)v0);
v0 = v1;
}
while ( v1 );
}
my_errmsgs_globerrs = 0LL;
result = &my_errmsgs_globerrs;
my_errmsgs_list = &my_errmsgs_globerrs;
return result;
}
|
my_error_unregister_all:
MOV RDI,qword ptr [0x004378e0]
TEST RDI,RDI
JZ 0x0014c596
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LAB_0014c580:
MOV RBX,qword ptr [RDI]
CALL 0x0014afe6
MOV RDI,RBX
TEST RBX,RBX
JNZ 0x0014c580
ADD RSP,0x8
POP RBX
POP RBP
LAB_0014c596:
MOV qword ptr [0x004378e0],0x0
LEA RAX,[0x4378e0]
MOV qword ptr [0x004378d8],RAX
RET
|
void my_error_unregister_all(void)
{
long *plVar1;
plVar1 = my_errmsgs_globerrs;
if (my_errmsgs_globerrs != (long *)0x0) {
do {
plVar1 = (long *)*plVar1;
my_free();
} while (plVar1 != (long *)0x0);
}
my_errmsgs_globerrs = (long *)0x0;
my_errmsgs_list = (int *)&my_errmsgs_globerrs;
return;
}
|
|
19,559
|
sanitize_metadata_lock(PFS_metadata_lock*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
PFS_metadata_lock *sanitize_metadata_lock(PFS_metadata_lock *unsafe)
{
return global_mdl_container.sanitize(unsafe);
}
|
O3
|
cpp
|
sanitize_metadata_lock(PFS_metadata_lock*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
leaq 0x369891(%rip), %rdx # 0x399758
movq 0xa8(%rdx,%rcx,8), %rdi
testq %rdi, %rdi
je 0x2fef9
movq 0x48(%rdi), %rsi
cmpq %rax, %rsi
ja 0x2fef9
movq 0x50(%rdi), %rdi
shlq $0x9, %rdi
addq %rsi, %rdi
cmpq %rax, %rdi
jbe 0x2fef9
movl %eax, %edi
subl %esi, %edi
testl $0x1ff, %edi # imm = 0x1FF
je 0x2ff07
incq %rcx
cmpq $0x400, %rcx # imm = 0x400
jne 0x2fec7
xorl %eax, %eax
popq %rbp
retq
|
_Z22sanitize_metadata_lockP17PFS_metadata_lock:
push rbp
mov rbp, rsp
mov rax, rdi
xor ecx, ecx
lea rdx, global_mdl_container
loc_2FEC7:
mov rdi, [rdx+rcx*8+0A8h]
test rdi, rdi
jz short loc_2FEF9
mov rsi, [rdi+48h]
cmp rsi, rax
ja short loc_2FEF9
mov rdi, [rdi+50h]
shl rdi, 9
add rdi, rsi
cmp rdi, rax
jbe short loc_2FEF9
mov edi, eax
sub edi, esi
test edi, 1FFh
jz short loc_2FF07
loc_2FEF9:
inc rcx
cmp rcx, 400h
jnz short loc_2FEC7
xor eax, eax
loc_2FF07:
pop rbp
retn
|
unsigned long long sanitize_metadata_lock(unsigned long long a1)
{
unsigned long long result; // rax
long long v2; // rcx
long long v3; // rdi
unsigned long long v4; // rsi
result = a1;
v2 = 0LL;
while ( 1 )
{
v3 = global_mdl_container[v2 + 21];
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 72);
if ( v4 <= result && v4 + (*(_QWORD *)(v3 + 80) << 9) > result && (((_WORD)result - (_WORD)v4) & 0x1FF) == 0 )
break;
}
if ( ++v2 == 1024 )
return 0LL;
}
return result;
}
|
sanitize_metadata_lock:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
XOR ECX,ECX
LEA RDX,[0x499758]
LAB_0012fec7:
MOV RDI,qword ptr [RDX + RCX*0x8 + 0xa8]
TEST RDI,RDI
JZ 0x0012fef9
MOV RSI,qword ptr [RDI + 0x48]
CMP RSI,RAX
JA 0x0012fef9
MOV RDI,qword ptr [RDI + 0x50]
SHL RDI,0x9
ADD RDI,RSI
CMP RDI,RAX
JBE 0x0012fef9
MOV EDI,EAX
SUB EDI,ESI
TEST EDI,0x1ff
JZ 0x0012ff07
LAB_0012fef9:
INC RCX
CMP RCX,0x400
JNZ 0x0012fec7
XOR EAX,EAX
LAB_0012ff07:
POP RBP
RET
|
/* sanitize_metadata_lock(PFS_metadata_lock*) */
PFS_metadata_lock * sanitize_metadata_lock(PFS_metadata_lock *param_1)
{
long lVar1;
PFS_metadata_lock *pPVar2;
long lVar3;
lVar3 = 0;
while( true ) {
lVar1 = *(long *)(global_mdl_container + lVar3 * 8 + 0xa8);
if ((((lVar1 != 0) && (pPVar2 = *(PFS_metadata_lock **)(lVar1 + 0x48), pPVar2 <= param_1)) &&
(param_1 < pPVar2 + *(long *)(lVar1 + 0x50) * 0x200)) &&
(((int)param_1 - (int)pPVar2 & 0x1ffU) == 0)) break;
lVar3 = lVar3 + 1;
if (lVar3 == 0x400) {
return (PFS_metadata_lock *)0x0;
}
}
return param_1;
}
|
|
19,560
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, float, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, float&)
|
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/conversions/from_json.hpp
|
inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
O0
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, float, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, float&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x89a90
movzbl %al, %ecx
movq %rcx, 0x8(%rsp)
subb $0x9, %al
ja 0x899cd
movq 0x8(%rsp), %rax
leaq 0x543434(%rip), %rcx # 0x5ccd78
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%rsp), %rdi
callq 0x89aa0
vcvtusi2ssq (%rax), %xmm0, %xmm0
movq 0x48(%rsp), %rax
vmovss %xmm0, (%rax)
jmp 0x89a7b
movq 0x50(%rsp), %rdi
callq 0x89ac0
vcvtsi2ssq (%rax), %xmm0, %xmm0
movq 0x48(%rsp), %rax
vmovss %xmm0, (%rax)
jmp 0x89a7b
movq 0x50(%rsp), %rdi
callq 0x89ae0
vmovsd (%rax), %xmm1
vcvtsd2ss %xmm1, %xmm0, %xmm0
movq 0x48(%rsp), %rax
vmovss %xmm0, (%rax)
jmp 0x89a7b
movq 0x50(%rsp), %rdi
callq 0x89b00
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
vcvtsi2ss %eax, %xmm0, %xmm0
movq 0x48(%rsp), %rax
vmovss %xmm0, (%rax)
jmp 0x89a7b
jmp 0x899cd
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0x125d0
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0x623d0
movq %rax, 0x20(%rsp)
leaq 0x544f14(%rip), %rsi # 0x5ce90a
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x89b20
jmp 0x89a07
movq (%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq 0x28(%rsp), %rdx
callq 0x895c0
jmp 0x89a21
movq (%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0x60179f(%rip), %rsi # 0x68b1d0
leaq -0x275b8(%rip), %rdx # 0x62480
callq 0x134c0
jmp 0x89a8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x89a67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x13768
testb $0x1, 0x13(%rsp)
jne 0x89a70
jmp 0x89a79
movq (%rsp), %rdi
callq 0x12880
jmp 0x89a80
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x13540
nopw (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov qword ptr [rsp+58h+var_10], rsi; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(void)
movzx ecx, al
mov [rsp+58h+var_50], rcx; int
sub al, 9; switch 10 cases
ja def_8994B; jumptable 000000000008994B default case
mov rax, [rsp+58h+var_50]
lea rcx, jpt_8994B
movsxd rax, ds:(jpt_8994B - 5CCD78h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_8994D:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 000000000008994B case 6
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
vcvtusi2ss xmm0, xmm0, qword ptr [rax]
mov rax, qword ptr [rsp+58h+var_10]
vmovss dword ptr [rax], xmm0
jmp loc_89A7B
loc_8996B:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 000000000008994B case 5
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
vcvtsi2ss xmm0, xmm0, qword ptr [rax]
mov rax, qword ptr [rsp+58h+var_10]
vmovss dword ptr [rax], xmm0
jmp loc_89A7B
loc_89988:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 000000000008994B case 7
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
vmovsd xmm1, qword ptr [rax]
vcvtsd2ss xmm0, xmm0, xmm1
mov rax, qword ptr [rsp+58h+var_10]
vmovss dword ptr [rax], xmm0
jmp loc_89A7B
loc_899A8:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 000000000008994B case 4
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov al, [rax]
and al, 1
movzx eax, al
vcvtsi2ss xmm0, xmm0, eax
mov rax, qword ptr [rsp+58h+var_10]
vmovss dword ptr [rax], xmm0
jmp loc_89A7B
loc_899CB:
jmp short $+2; jumptable 000000000008994B cases 0-3,8,9
def_8994B:
mov [rsp+58h+var_45], 1; jumptable 000000000008994B default case
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_58], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+58h+var_38], rax; int
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+58h+var_30]; int
lea rdx, [rsp+58h+var_38]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
jmp short $+2
loc_89A07:
mov rdi, [rsp+58h+var_58]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Eh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_89A21:
mov rdi, [rsp+58h+var_58]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_89A8A
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_89A67
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_89A67:
test [rsp+arg_B], 1
jnz short loc_89A70
jmp short loc_89A79
loc_89A70:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_89A79:
jmp short loc_89A80
loc_89A7B:
add rsp, 58h
retn
loc_89A80:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
loc_89A8A:
nop word ptr [rax+rax+00h]
|
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
long long a1,
long long a2,
__m128 _XMM0)
{
long long result; // rax
int v10; // ecx
int v11; // r8d
int v12; // r9d
int exception; // [rsp+0h] [rbp-58h]
nlohmann::json_abi_v3_11_3::detail::type_error *v14; // [rsp+0h] [rbp-58h]
unsigned long long v15; // [rsp+8h] [rbp-50h]
int v16; // [rsp+10h] [rbp-48h]
long long v17; // [rsp+18h] [rbp-40h]
int v18[2]; // [rsp+20h] [rbp-38h] BYREF
int v19[8]; // [rsp+28h] [rbp-30h] BYREF
int v20[2]; // [rsp+48h] [rbp-10h]
char v21[8]; // [rsp+50h] [rbp-8h]
*(_QWORD *)v21 = a1;
*(_QWORD *)v20 = a2;
v15 = (unsigned __int8)nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(a1);
switch ( (char)v15 )
{
case 4:
ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v21);
__asm { vcvtsi2ss xmm0, xmm0, eax }
result = *(_QWORD *)v20;
__asm { vmovss dword ptr [rax], xmm0 }
break;
case 5:
*(double *)_XMM0.m128_u64 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v21);
__asm { vcvtsi2ss xmm0, xmm0, qword ptr [rax] }
result = *(_QWORD *)v20;
__asm { vmovss dword ptr [rax], xmm0 }
break;
case 6:
*(double *)_XMM0.m128_u64 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v21);
__asm { vcvtusi2ss xmm0, xmm0, qword ptr [rax] }
result = *(_QWORD *)v20;
__asm { vmovss dword ptr [rax], xmm0 }
break;
case 7:
_RAX = ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v21);
__asm
{
vmovsd xmm1, qword ptr [rax]
vcvtsd2ss xmm0, xmm0, xmm1
}
result = *(_QWORD *)v20;
__asm { vmovss dword ptr [rax], xmm0 }
break;
default:
HIBYTE(v16) = 1;
exception = (unsigned int)__cxa_allocate_exception(0x20uLL);
*(_QWORD *)v18 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v21);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(int)v19,
(int)"type must be number, but is ",
(int)v18,
v10,
v11,
v12,
exception,
(void *)v15,
v16,
v17);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v14,
302LL,
(long long)v19,
*(long long *)v21);
__cxa_throw(
v14,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00189a90
MOVZX ECX,AL
MOV qword ptr [RSP + 0x8],RCX
SUB AL,0x9
JA 0x001899cd
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x6ccd78]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_6:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00189aa0
VCVTUSI2SS XMM0,XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x48]
VMOVSS dword ptr [RAX],XMM0
JMP 0x00189a7b
caseD_5:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00189ac0
VCVTSI2SS XMM0,XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x48]
VMOVSS dword ptr [RAX],XMM0
JMP 0x00189a7b
caseD_7:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00189ae0
VMOVSD XMM1,qword ptr [RAX]
VCVTSD2SS XMM0,XMM0,XMM1
MOV RAX,qword ptr [RSP + 0x48]
VMOVSS dword ptr [RAX],XMM0
JMP 0x00189a7b
caseD_4:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00189b00
MOV AL,byte ptr [RAX]
AND AL,0x1
MOVZX EAX,AL
VCVTSI2SS XMM0,XMM0,EAX
MOV RAX,qword ptr [RSP + 0x48]
VMOVSS dword ptr [RAX],XMM0
JMP 0x00189a7b
caseD_0:
JMP 0x001899cd
default:
MOV byte ptr [RSP + 0x13],0x1
MOV EDI,0x20
CALL 0x001125d0
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001623d0
MOV qword ptr [RSP + 0x20],RAX
LAB_001899ef:
LEA RSI,[0x6ce90a]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x20]
CALL 0x00189b20
JMP 0x00189a07
LAB_00189a07:
MOV RDI,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x50]
LAB_00189a10:
MOV ESI,0x12e
LEA RDX,[RSP + 0x28]
CALL 0x001895c0
JMP 0x00189a21
LAB_00189a21:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x13],0x0
LEA RSI,[0x78b1d0]
LEA RDX,[0x162480]
CALL 0x001134c0
LAB_00189a7b:
ADD RSP,0x58
RET
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEfTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json *param_1,float *param_2)
{
int1 auVar1 [16];
int1 uVar2;
int8 *puVar3;
long *plVar4;
double *pdVar5;
byte *pbVar6;
int8 uVar7;
int8 extraout_XMM0_Qa;
int1 extraout_var [56];
char *local_38;
detail local_30 [32];
float *local_10;
basic_json *local_8;
int1 auVar8 [64];
local_10 = param_2;
local_8 = param_1;
uVar2 = nlohmann::json_abi_v3_11_3::basic_json::operator_cast_to_value_t(param_1);
switch(uVar2) {
case 0:
case 1:
case 2:
case 3:
case 8:
case 9:
default:
uVar7 = __cxa_allocate_exception(0x20);
local_38 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_8);
/* try { // try from 001899ef to 00189a04 has its CatchHandler @ 00189a3f */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_30,"type must be number, but is ",&local_38);
/* try { // try from 00189a10 to 00189a3c has its CatchHandler @ 00189a4f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar7,0x12e,local_30,local_8);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar7,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
case 4:
pbVar6 = (byte *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (float)(*pbVar6 & 1);
break;
case 5:
plVar4 = (long *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (float)*plVar4;
break;
case 6:
puVar3 = (int8 *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
auVar8._8_56_ = extraout_var;
auVar8._0_8_ = extraout_XMM0_Qa;
auVar1 = vcvtusi2ss_avx512f(auVar8._0_16_,*puVar3);
*local_10 = auVar1._0_4_;
break;
case 7:
pdVar5 = (double *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (float)*pdVar5;
}
return;
}
|
|
19,561
|
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
|
hkr04[P]cpp-mcp/common/json.hpp
|
json_value(value_t t)
{
switch (t)
{
case value_t::object:
{
object = create<object_t>();
break;
}
case value_t::array:
{
array = create<array_t>();
break;
}
case value_t::string:
{
string = create<string_t>("");
break;
}
case value_t::binary:
{
binary = create<binary_t>();
break;
}
case value_t::boolean:
{
boolean = static_cast<boolean_t>(false);
break;
}
case value_t::number_integer:
{
number_integer = static_cast<number_integer_t>(0);
break;
}
case value_t::number_unsigned:
{
number_unsigned = static_cast<number_unsigned_t>(0);
break;
}
case value_t::number_float:
{
number_float = static_cast<number_float_t>(0.0);
break;
}
case value_t::null:
{
object = nullptr; // silence warning, see #821
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
{
JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE
}
break;
}
}
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t):
subq $0x68, %rsp
movb %sil, %al
movq %rdi, 0x60(%rsp)
movb %al, 0x5f(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movzbl 0x5f(%rsp), %eax
movq %rax, 0x18(%rsp)
subq $0x9, %rax
ja 0xe9f1
movq 0x18(%rsp), %rax
leaq 0x3f742(%rip), %rcx # 0x4e07c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x10330
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xeacb
callq 0x103e0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xeacb
leaq 0x3fb53(%rip), %rdi # 0x4e4c7
callq 0x10490
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xeacb
callq 0x10570
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xeacb
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0xeacb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xeacb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xeacb
movq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0xeacb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xeacb
jmp 0xe9f1
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
cmpb $0x0, 0x5f(%rsp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xea12
jmp 0xeac9
movb $0x1, 0x23(%rsp)
movl $0x20, %edi
callq 0x62b0
movq %rax, (%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x6980
movq 0x8(%rsp), %rdx
leaq 0x3f9ca(%rip), %rsi # 0x4e40a
leaq 0x38(%rsp), %rdi
callq 0x80f0
jmp 0xea4c
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1f4, %esi # imm = 0x1F4
leaq 0x38(%rsp), %rdx
callq 0x10620
jmp 0xea65
movq (%rsp), %rdi
movb $0x0, 0x23(%rsp)
leaq 0x5dd3b(%rip), %rsi # 0x6c7b0
leaq 0x1d44(%rip), %rdx # 0x107c0
callq 0x6940
jmp 0xeada
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xeaab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x6360
leaq 0x37(%rsp), %rdi
callq 0x6640
testb $0x1, 0x23(%rsp)
jne 0xeabe
jmp 0xeac7
movq (%rsp), %rdi
callq 0x6420
jmp 0xead0
jmp 0xeacb
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x6970
nopw (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE:
sub rsp, 68h
mov al, sil
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_9], al
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_58], rax
movzx eax, [rsp+68h+var_9]
mov [rsp+68h+var_50], rax
sub rax, 9; switch 10 cases
ja def_E941; jumptable 000000000000E941 default case
mov rax, [rsp+68h+var_50]
lea rcx, jpt_E941
movsxd rax, ds:(jpt_E941 - 4E07Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_E943:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; jumptable 000000000000E941 case 1
mov rcx, rax
mov rax, [rsp+68h+var_58]
mov [rax], rcx
jmp loc_EACB
loc_E958:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; jumptable 000000000000E941 case 2
mov rcx, rax
mov rax, [rsp+68h+var_58]
mov [rax], rcx
jmp loc_EACB
loc_E96D:
lea rdi, asc_4E4C4+3; jumptable 000000000000E941 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,char const(&)[1]>(char const(&)[1] &&)
mov rcx, rax
mov rax, [rsp+68h+var_58]
mov [rax], rcx
jmp loc_EACB
loc_E989:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJEEEPT_DpOT0_; jumptable 000000000000E941 case 8
mov rcx, rax
mov rax, [rsp+68h+var_58]
mov [rax], rcx
jmp loc_EACB
loc_E99E:
mov rax, [rsp+68h+var_58]; jumptable 000000000000E941 case 4
mov byte ptr [rax], 0
jmp loc_EACB
loc_E9AB:
mov rax, [rsp+68h+var_58]; jumptable 000000000000E941 case 5
mov qword ptr [rax], 0
jmp loc_EACB
loc_E9BC:
mov rax, [rsp+68h+var_58]; jumptable 000000000000E941 case 6
mov qword ptr [rax], 0
jmp loc_EACB
loc_E9CD:
mov rax, [rsp+68h+var_58]; jumptable 000000000000E941 case 7
xorps xmm0, xmm0
movsd qword ptr [rax], xmm0
jmp loc_EACB
loc_E9DE:
mov rax, [rsp+68h+var_58]; jumptable 000000000000E941 case 0
mov qword ptr [rax], 0
jmp loc_EACB
loc_E9EF:
jmp short $+2; jumptable 000000000000E941 case 9
def_E941:
mov rax, [rsp+68h+var_58]; jumptable 000000000000E941 default case
mov qword ptr [rax], 0
cmp [rsp+68h+var_9], 0
setz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_EA12
jmp loc_EAC9
loc_EA12:
mov [rsp+68h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_31]
mov [rsp+68h+var_60], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+68h+var_60]
lea rsi, a961c151d2e87f2; "961c151d2e87f2686a955a9be24d316f1362bf2"...
lea rdi, [rsp+68h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_EA4C:
mov rdi, [rsp+68h+var_68]
xor eax, eax
mov ecx, eax
mov esi, 1F4h
lea rdx, [rsp+68h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
jmp short $+2
loc_EA65:
mov rdi, [rsp+68h+var_68]; void *
mov [rsp+68h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail11other_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail11other_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_EADA
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_EAAB
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_EAAB:
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_1B], 1
jnz short loc_EABE
jmp short loc_EAC7
loc_EABE:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_EAC7:
jmp short loc_EAD0
loc_EAC9:
jmp short $+2
loc_EACB:
add rsp, 68h
retn
loc_EAD0:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
loc_EADA:
nop word ptr [rax+rax+00h]
|
json_value:
SUB RSP,0x68
MOV AL,SIL
MOV qword ptr [RSP + 0x60],RDI
MOV byte ptr [RSP + 0x5f],AL
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVZX EAX,byte ptr [RSP + 0x5f]
MOV qword ptr [RSP + 0x18],RAX
SUB RAX,0x9
JA 0x0010e9f1
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x14e07c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
CALL 0x00110330
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0010eacb
caseD_2:
CALL 0x001103e0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0010eacb
caseD_3:
LEA RDI,[0x14e4c7]
CALL 0x00110490
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0010eacb
caseD_8:
CALL 0x00110570
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0010eacb
caseD_4:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x0
JMP 0x0010eacb
caseD_5:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0010eacb
caseD_6:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0010eacb
caseD_7:
MOV RAX,qword ptr [RSP + 0x10]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX],XMM0
JMP 0x0010eacb
caseD_0:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0010eacb
caseD_9:
JMP 0x0010e9f1
default:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
CMP byte ptr [RSP + 0x5f],0x0
SETZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0010ea12
JMP 0x0010eac9
LAB_0010ea12:
MOV byte ptr [RSP + 0x23],0x1
MOV EDI,0x20
CALL 0x001062b0
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00106980
MOV RDX,qword ptr [RSP + 0x8]
LAB_0010ea39:
LEA RSI,[0x14e40a]
LEA RDI,[RSP + 0x38]
CALL 0x001080f0
JMP 0x0010ea4c
LAB_0010ea4c:
MOV RDI,qword ptr [RSP]
XOR EAX,EAX
MOV ECX,EAX
MOV ESI,0x1f4
LEA RDX,[RSP + 0x38]
CALL 0x00110620
JMP 0x0010ea65
LAB_0010ea65:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x23],0x0
LEA RSI,[0x16c7b0]
LEA RDX,[0x1107c0]
CALL 0x00106940
LAB_0010eac9:
JMP 0x0010eacb
LAB_0010eacb:
ADD RSP,0x68
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::json_value::json_value(json_value *this,char param_2)
{
ordered_map *poVar1;
vector *pvVar2;
string *psVar3;
byte_container_with_subtype *pbVar4;
int8 uVar5;
allocator local_31;
string local_30 [39];
char local_9;
json_value *local_8;
local_9 = param_2;
local_8 = this;
switch(param_2) {
case '\0':
*(int8 *)this = 0;
break;
case '\x01':
poVar1 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
();
*(ordered_map **)this = poVar1;
break;
case '\x02':
pvVar2 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector **)this = pvVar2;
break;
case '\x03':
psVar3 = create<std::__cxx11::string,char_const(&)[1]>("");
*(string **)this = psVar3;
break;
case '\x04':
*this = (json_value)0x0;
break;
case '\x05':
*(int8 *)this = 0;
break;
case '\x06':
*(int8 *)this = 0;
break;
case '\a':
*(int8 *)this = 0;
break;
case '\b':
pbVar4 = create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>
();
*(byte_container_with_subtype **)this = pbVar4;
break;
case '\t':
default:
*(int8 *)this = 0;
if (param_2 == '\0') {
uVar5 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 0010ea39 to 0010ea49 has its CatchHandler @ 0010ea83 */
std::__cxx11::string::string<std::allocator<char>>
(local_30,"961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3",&local_31);
/* try { // try from 0010ea4c to 0010ea80 has its CatchHandler @ 0010ea93 */
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar5,500,local_30,0);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::other_error::typeinfo,detail::other_error::~other_error);
}
}
return;
}
|
||
19,562
|
ma_read_bitmap_page
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool _ma_read_bitmap_page(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page)
{
MARIA_SHARE *share= info->s;
my_bool res;
DBUG_ENTER("_ma_read_bitmap_page");
DBUG_PRINT("enter", ("page: %lld data_file_length: %lld",
(longlong) page,
(longlong) share->state.state.data_file_length));
DBUG_ASSERT(page % bitmap->pages_covered == 0);
DBUG_ASSERT(!bitmap->changed);
bitmap->page= page;
if ((page + 1) * bitmap->block_size > share->state.state.data_file_length)
{
/* Inexistent or half-created page */
res= _ma_bitmap_create_missing(info, bitmap, page);
if (!res)
adjust_total_size(info, page);
DBUG_RETURN(res);
}
adjust_total_size(info, page);
bitmap->full_head_size= bitmap->full_tail_size= 0;
DBUG_ASSERT(share->pagecache->block_size == bitmap->block_size);
res= pagecache_read(share->pagecache,
&bitmap->file, page, 0,
bitmap->map, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0) == NULL;
if (!res)
{
/* Calculate used_size */
const uchar *data, *end= bitmap->map;
for (data= bitmap->map + bitmap->total_size; --data >= end && *data == 0; )
{}
bitmap->used_size= (uint) ((data + 1) - end);
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
}
else
{
_ma_set_fatal_error(info, my_errno);
}
/*
We can't check maria_bitmap_marker here as if the bitmap page
previously had a true checksum and the user switched mode to not checksum
this may have any value, except maria_normal_page_marker.
Using maria_normal_page_marker gives us a protection against bugs
when running without any checksums.
*/
#ifndef DBUG_OFF
if (!res)
{
memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size);
_ma_check_bitmap(bitmap);
}
#endif
DBUG_RETURN(res);
}
|
O0
|
c
|
ma_read_bitmap_page:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x457d1
jmp 0x457d3
jmp 0x457d5
jmp 0x457d7
jmp 0x457d9
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq -0x18(%rbp), %rcx
movl 0x134(%rcx), %ecx
imulq %rcx, %rax
movq -0x28(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x45839
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x45950
movb %al, -0x29(%rbp)
cmpb $0x0, -0x29(%rbp)
jne 0x4582c
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x45bd0
jmp 0x4582e
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x45944
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x45bd0
movq -0x18(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x4585e
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x2d970
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x29(%rbp)
cmpb $0x0, -0x29(%rbp)
jne 0x45924
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x128(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jb 0x458fd
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x45906
jmp 0x45908
jmp 0x458d6
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x45922
jmp 0x4593c
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0xf60c0
movq -0x50(%rbp), %rdi
movl (%rax), %esi
callq 0x338b0
jmp 0x4593e
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
_ma_read_bitmap_page:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_457D1:
jmp short $+2
loc_457D3:
jmp short $+2
loc_457D5:
jmp short $+2
loc_457D7:
jmp short $+2
loc_457D9:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
add rax, 1
mov rcx, [rbp+var_18]
mov ecx, [rcx+134h]
imul rax, rcx
mov rcx, [rbp+var_28]
cmp rax, [rcx+40h]
jbe short loc_45839
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _ma_bitmap_create_missing
mov [rbp+var_29], al
cmp [rbp+var_29], 0
jnz short loc_4582C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call adjust_total_size
loc_4582C:
jmp short $+2
loc_4582E:
mov al, [rbp+var_29]
mov [rbp+var_1], al
jmp loc_45944
loc_45839:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call adjust_total_size
mov rax, [rbp+var_18]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+28h], 0
jmp short $+2
loc_4585E:
mov rax, [rbp+var_28]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
mov r8, [rax+8]
xor ecx, ecx
mov r9d, 1
xor eax, eax
mov [rsp+60h+var_60], 0
mov [rsp+60h+var_58], 0
call pagecache_read
cmp rax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_29], al
cmp [rbp+var_29], 0
jnz short loc_45924
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov ecx, [rcx+128h]
add rax, rcx
mov [rbp+var_38], rax
loc_458D6:
mov rcx, [rbp+var_38]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jb short loc_458FD
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 0
setz al
mov [rbp+var_41], al
loc_458FD:
mov al, [rbp+var_41]
test al, 1
jnz short loc_45906
jmp short loc_45908
loc_45906:
jmp short loc_458D6
loc_45908:
mov rax, [rbp+var_38]
add rax, 1
mov rcx, [rbp+var_40]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+24h], ecx
jmp short $+2
loc_45922:
jmp short loc_4593C
loc_45924:
mov rax, [rbp+var_10]
mov [rbp+var_50], rax
call _my_thread_var
mov rdi, [rbp+var_50]
mov esi, [rax]
call _ma_set_fatal_error
loc_4593C:
jmp short $+2
loc_4593E:
mov al, [rbp+var_29]
mov [rbp+var_1], al
loc_45944:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
|
bool ma_read_bitmap_page(_DWORD *a1, long long a2, long long a3)
{
long long v3; // rax
int *v4; // rax
long long v5; // rdx
long long v6; // rcx
long long v7; // r8
int v8; // r9d
bool v10; // [rsp+1Fh] [rbp-41h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
_BYTE *v12; // [rsp+28h] [rbp-38h]
char missing; // [rsp+37h] [rbp-29h]
bool v14; // [rsp+37h] [rbp-29h]
long long v15; // [rsp+38h] [rbp-28h]
v15 = *(_QWORD *)a1;
*(_QWORD *)(a2 + 16) = a3;
if ( (unsigned long long)*(unsigned int *)(a2 + 308) * (a3 + 1) <= *(_QWORD *)(v15 + 64) )
{
adjust_total_size(a1, a3);
*(_DWORD *)(a2 + 44) = 0;
*(_DWORD *)(a2 + 40) = 0;
v3 = pagecache_read(*(_QWORD **)(v15 + 1536), a2 + 64, a3, 0, *(_QWORD *)(a2 + 8), 1, 0, 0LL);
v14 = v3 == 0;
if ( v3 )
{
v11 = *(_QWORD *)(a2 + 8);
v12 = (_BYTE *)(*(unsigned int *)(a2 + 296) + v11);
do
{
--v12;
v10 = 0;
if ( (unsigned long long)v12 >= v11 )
v10 = *v12 == 0;
}
while ( v10 );
*(_DWORD *)(a2 + 36) = (_DWORD)v12 + 1 - v11;
}
else
{
v4 = (int *)my_thread_var();
ma_set_fatal_error(a1, *v4, v5, v6, v7, v8);
}
return v14;
}
else
{
missing = ma_bitmap_create_missing(a1, a2, a3);
if ( !missing )
adjust_total_size(a1, a3);
return missing;
}
}
|
_ma_read_bitmap_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001457d1
LAB_001457d1:
JMP 0x001457d3
LAB_001457d3:
JMP 0x001457d5
LAB_001457d5:
JMP 0x001457d7
LAB_001457d7:
JMP 0x001457d9
LAB_001457d9:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x134]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x40]
JBE 0x00145839
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00145950
MOV byte ptr [RBP + -0x29],AL
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x0014582c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00145bd0
LAB_0014582c:
JMP 0x0014582e
LAB_0014582e:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
JMP 0x00145944
LAB_00145839:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00145bd0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],0x0
JMP 0x0014585e
LAB_0014585e:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RAX + 0x8]
XOR ECX,ECX
MOV R9D,0x1
XOR EAX,EAX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0012d970
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x29],AL
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x00145924
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x128]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001458d6:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JC 0x001458fd
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001458fd:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00145906
JMP 0x00145908
LAB_00145906:
JMP 0x001458d6
LAB_00145908:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00145922
LAB_00145922:
JMP 0x0014593c
LAB_00145924:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
CALL 0x001f60c0
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RAX]
CALL 0x001338b0
LAB_0014593c:
JMP 0x0014593e
LAB_0014593e:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
LAB_00145944:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int8 _ma_read_bitmap_page(long *param_1,long param_2,long param_3)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
int7 uVar6;
long lVar4;
int4 *puVar5;
bool bVar7;
char *local_40;
char local_9;
lVar4 = *param_1;
*(long *)(param_2 + 0x10) = param_3;
uVar2 = (param_3 + 1) * (ulong)*(uint *)(param_2 + 0x134);
uVar1 = *(ulong *)(lVar4 + 0x40);
if (uVar2 < uVar1 || uVar2 - uVar1 == 0) {
adjust_total_size(param_1,param_3);
*(int4 *)(param_2 + 0x2c) = 0;
*(int4 *)(param_2 + 0x28) = 0;
lVar4 = pagecache_read(*(int8 *)(lVar4 + 0x600),param_2 + 0x40,param_3,0,
*(int8 *)(param_2 + 8),1,0,0);
local_9 = lVar4 == 0;
if ((bool)local_9) {
puVar5 = (int4 *)_my_thread_var();
param_2 = _ma_set_fatal_error(param_1,*puVar5);
}
else {
local_40 = (char *)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 0x128));
do {
local_40 = local_40 + -1;
bVar7 = false;
if (*(char **)(param_2 + 8) <= local_40) {
bVar7 = *local_40 == '\0';
}
} while (bVar7);
*(int *)(param_2 + 0x24) = ((int)local_40 + 1) - (int)*(char **)(param_2 + 8);
}
uVar6 = (int7)((ulong)param_2 >> 8);
}
else {
uVar3 = _ma_bitmap_create_missing(param_1,param_2,param_3);
local_9 = (char)uVar3;
if (local_9 == '\0') {
uVar3 = adjust_total_size(param_1,param_3);
}
uVar6 = (int7)((ulong)uVar3 >> 8);
}
return CONCAT71(uVar6,local_9);
}
|
|
19,563
|
my_hash_free_elements
|
eloqsql/mysys/hash.c
|
static inline void my_hash_free_elements(HASH *hash)
{
uint records= hash->records;
if (records == 0)
return;
/*
Set records to 0 early to guard against anyone looking at the structure
during the free process
*/
hash->records= 0;
if (hash->free)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
HASH_LINK *end= data + records;
do
{
(*hash->free)((data++)->data);
} while (data < end);
}
}
|
O0
|
c
|
my_hash_free_elements:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x8177f
jmp 0x817dd
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x817dd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, -0x18(%rbp)
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x817b4
jmp 0x817dd
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_free_elements:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_8177F
jmp short loc_817DD
loc_8177F:
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_817DD
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov [rbp+var_20], rax
loc_817B4:
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 10h
mov [rbp+var_18], rdx
mov rdi, [rcx+8]
call rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_817B4
jmp short $+2
loc_817DD:
add rsp, 20h
pop rbp
retn
|
unsigned long long my_hash_free_elements(unsigned long long a1)
{
unsigned long long result; // rax
unsigned long long v2; // rcx
unsigned long long v3; // [rsp+0h] [rbp-20h]
unsigned long long v4; // [rsp+8h] [rbp-18h]
unsigned int v5; // [rsp+14h] [rbp-Ch]
result = *(_QWORD *)(a1 + 24);
v5 = result;
if ( (_DWORD)result )
{
*(_QWORD *)(a1 + 24) = 0LL;
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v4 = *(_QWORD *)(a1 + 40);
v3 = 16LL * v5 + v4;
do
{
v2 = v4;
v4 += 16LL;
(*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8));
result = v4;
}
while ( v4 < v3 );
}
}
return result;
}
|
my_hash_free_elements:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0018177f
JMP 0x001817dd
LAB_0018177f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001817dd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001817b4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RCX + 0x8]
CALL RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001817b4
JMP 0x001817dd
LAB_001817dd:
ADD RSP,0x20
POP RBP
RET
|
void my_hash_free_elements(long param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong local_20;
uVar1 = *(ulong *)(param_1 + 0x18);
if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) {
uVar2 = *(ulong *)(param_1 + 0x28);
local_20 = uVar2;
do {
uVar3 = local_20 + 0x10;
(**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8));
local_20 = uVar3;
} while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10);
}
return;
}
|
|
19,564
|
Vector2Transform
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector2 Vector2Transform(Vector2 v, Matrix mat)
{
Vector2 result = { 0 };
float x = v.x;
float y = v.y;
float z = 0;
result.x = mat.m0*x + mat.m4*y + mat.m8*z + mat.m12;
result.y = mat.m1*x + mat.m5*y + mat.m9*z + mat.m13;
return result;
}
|
O0
|
c
|
Vector2Transform:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
movlpd %xmm0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movss -0x14(%rbp), %xmm2
movss (%rax), %xmm1
movss 0x4(%rax), %xmm0
movss -0x18(%rbp), %xmm3
mulss %xmm3, %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss 0x8(%rax), %xmm0
movss -0x1c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0xc(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x14(%rbp), %xmm2
movss 0x10(%rax), %xmm1
movss 0x14(%rax), %xmm0
movss -0x18(%rbp), %xmm3
mulss %xmm3, %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss 0x18(%rax), %xmm0
movss -0x1c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x1c(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
Vector2Transform:
push rbp
mov rbp, rsp
lea rax, [rbp+arg_0]
movlpd [rbp+var_10], xmm0
mov [rbp+var_8], 0
movss xmm0, dword ptr [rbp+var_10]
movss [rbp+var_14], xmm0
movss xmm0, dword ptr [rbp+var_10+4]
movss [rbp+var_18], xmm0
mov [rbp+var_1C], 0
movss xmm2, [rbp+var_14]
movss xmm1, dword ptr [rax]
movss xmm0, dword ptr [rax+4]
movss xmm3, [rbp+var_18]
mulss xmm0, xmm3
mulss xmm1, xmm2
addss xmm1, xmm0
movss xmm0, dword ptr [rax+8]
movss xmm2, [rbp+var_1C]
mulss xmm0, xmm2
addss xmm0, xmm1
movss xmm1, dword ptr [rax+0Ch]
addss xmm0, xmm1
movss dword ptr [rbp+var_8], xmm0
movss xmm2, [rbp+var_14]
movss xmm1, dword ptr [rax+10h]
movss xmm0, dword ptr [rax+14h]
movss xmm3, [rbp+var_18]
mulss xmm0, xmm3
mulss xmm1, xmm2
addss xmm1, xmm0
movss xmm0, dword ptr [rax+18h]
movss xmm2, [rbp+var_1C]
mulss xmm0, xmm2
addss xmm0, xmm1
movss xmm1, dword ptr [rax+1Ch]
addss xmm0, xmm1
movss dword ptr [rbp+var_8+4], xmm0
movsd xmm0, [rbp+var_8]
pop rbp
retn
|
double Vector2Transform(
double a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
double v12; // [rsp+14h] [rbp-8h]
*(float *)&v12 = (float)((float)(*(float *)&a9 * 0.0)
+ (float)((float)(*(float *)&a8 * *(float *)&a1)
+ (float)(*((float *)&a8 + 1) * *((float *)&a1 + 1))))
+ *((float *)&a9 + 1);
*((float *)&v12 + 1) = (float)((float)(*(float *)&a11 * 0.0)
+ (float)((float)(*(float *)&a10 * *(float *)&a1)
+ (float)(*((float *)&a10 + 1) * *((float *)&a1 + 1))))
+ *((float *)&a11 + 1);
return v12;
}
|
Vector2Transform:
PUSH RBP
MOV RBP,RSP
LEA RAX,[RBP + 0x10]
MOVLPD qword ptr [RBP + -0x10],XMM0
MOV qword ptr [RBP + -0x8],0x0
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS dword ptr [RBP + -0x14],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS dword ptr [RBP + -0x18],XMM0
MOV dword ptr [RBP + -0x1c],0x0
MOVSS XMM2,dword ptr [RBP + -0x14]
MOVSS XMM1,dword ptr [RAX]
MOVSS XMM0,dword ptr [RAX + 0x4]
MOVSS XMM3,dword ptr [RBP + -0x18]
MULSS XMM0,XMM3
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVSS XMM0,dword ptr [RAX + 0x8]
MOVSS XMM2,dword ptr [RBP + -0x1c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS XMM1,dword ptr [RAX + 0xc]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x8],XMM0
MOVSS XMM2,dword ptr [RBP + -0x14]
MOVSS XMM1,dword ptr [RAX + 0x10]
MOVSS XMM0,dword ptr [RAX + 0x14]
MOVSS XMM3,dword ptr [RBP + -0x18]
MULSS XMM0,XMM3
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVSS XMM0,dword ptr [RAX + 0x18]
MOVSS XMM2,dword ptr [RBP + -0x1c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS XMM1,dword ptr [RAX + 0x1c]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
POP RBP
RET
|
int8 Vector2Transform(int8 param_1)
{
float fStack0000000000000008;
float fStack000000000000000c;
float fStack0000000000000010;
float fStack0000000000000014;
float fStack0000000000000018;
float fStack000000000000001c;
float fStack0000000000000020;
float fStack0000000000000024;
float local_18;
float fStack_14;
int8 local_10;
local_18 = (float)param_1;
fStack_14 = (float)((ulong)param_1 >> 0x20);
local_10 = CONCAT44(fStack0000000000000020 * 0.0 +
fStack0000000000000018 * local_18 + fStack000000000000001c * fStack_14 +
fStack0000000000000024,
fStack0000000000000010 * 0.0 +
fStack0000000000000008 * local_18 + fStack000000000000000c * fStack_14 +
fStack0000000000000014);
return local_10;
}
|
|
19,565
|
Vector2Transform
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector2 Vector2Transform(Vector2 v, Matrix mat)
{
Vector2 result = { 0 };
float x = v.x;
float y = v.y;
float z = 0;
result.x = mat.m0*x + mat.m4*y + mat.m8*z + mat.m12;
result.y = mat.m1*x + mat.m5*y + mat.m9*z + mat.m13;
return result;
}
|
O1
|
c
|
Vector2Transform:
movss 0x8(%rsp), %xmm1
mulss %xmm0, %xmm1
movss 0x18(%rsp), %xmm2
mulss %xmm0, %xmm2
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3 # xmm3 = xmm3[1,1],xmm0[1,1]
movss 0xc(%rsp), %xmm0
mulss %xmm3, %xmm0
addss %xmm0, %xmm1
xorps %xmm4, %xmm4
movss 0x10(%rsp), %xmm0
mulss %xmm4, %xmm0
addss %xmm1, %xmm0
addss 0x14(%rsp), %xmm0
mulss 0x1c(%rsp), %xmm3
addss %xmm3, %xmm2
mulss 0x20(%rsp), %xmm4
addss %xmm2, %xmm4
addss 0x24(%rsp), %xmm4
unpcklps %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
retq
|
Vector2Transform:
movss xmm1, [rsp+arg_0]
mulss xmm1, xmm0
movss xmm2, [rsp+arg_10]
mulss xmm2, xmm0
movaps xmm3, xmm0
shufps xmm3, xmm0, 55h ; 'U'
movss xmm0, [rsp+arg_4]
mulss xmm0, xmm3
addss xmm1, xmm0
xorps xmm4, xmm4
movss xmm0, [rsp+arg_8]
mulss xmm0, xmm4
addss xmm0, xmm1
addss xmm0, [rsp+arg_C]
mulss xmm3, [rsp+arg_14]
addss xmm2, xmm3
mulss xmm4, [rsp+arg_18]
addss xmm4, xmm2
addss xmm4, [rsp+arg_1C]
unpcklps xmm0, xmm4
retn
|
__m128 Vector2Transform(
__m128 a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
float v11; // xmm2_4
float v12; // xmm3_4
float v13; // xmm1_4
__m128 v14; // xmm4
__m128 v15; // xmm0
v11 = *(float *)&a10 * a1.m128_f32[0];
v12 = _mm_shuffle_ps(a1, a1, 85).m128_f32[0];
v13 = (float)(*(float *)&a8 * a1.m128_f32[0]) + (float)(*((float *)&a8 + 1) * v12);
v14 = 0LL;
v15 = (__m128)(unsigned int)a9;
v15.m128_f32[0] = (float)((float)(*(float *)&a9 * 0.0) + v13) + *((float *)&a9 + 1);
v14.m128_f32[0] = (float)((float)(0.0 * *(float *)&a11) + (float)(v11 + (float)(v12 * *((float *)&a10 + 1))))
+ *((float *)&a11 + 1);
return _mm_unpacklo_ps(v15, v14);
}
|
Vector2Transform:
MOVSS XMM1,dword ptr [RSP + 0x8]
MULSS XMM1,XMM0
MOVSS XMM2,dword ptr [RSP + 0x18]
MULSS XMM2,XMM0
MOVAPS XMM3,XMM0
SHUFPS XMM3,XMM0,0x55
MOVSS XMM0,dword ptr [RSP + 0xc]
MULSS XMM0,XMM3
ADDSS XMM1,XMM0
XORPS XMM4,XMM4
MOVSS XMM0,dword ptr [RSP + 0x10]
MULSS XMM0,XMM4
ADDSS XMM0,XMM1
ADDSS XMM0,dword ptr [RSP + 0x14]
MULSS XMM3,dword ptr [RSP + 0x1c]
ADDSS XMM2,XMM3
MULSS XMM4,dword ptr [RSP + 0x20]
ADDSS XMM4,XMM2
ADDSS XMM4,dword ptr [RSP + 0x24]
UNPCKLPS XMM0,XMM4
RET
|
int8 Vector2Transform(int8 param_1)
{
float fVar1;
float fStack0000000000000008;
float fStack000000000000000c;
float fStack0000000000000010;
float fStack0000000000000014;
float fStack0000000000000018;
float fStack000000000000001c;
float fStack0000000000000020;
float fStack0000000000000024;
fVar1 = (float)((ulong)param_1 >> 0x20);
return CONCAT44(fStack0000000000000020 * 0.0 +
fStack0000000000000018 * (float)param_1 + fVar1 * fStack000000000000001c +
fStack0000000000000024,
fStack0000000000000010 * 0.0 +
fStack0000000000000008 * (float)param_1 + fStack000000000000000c * fVar1 +
fStack0000000000000014);
}
|
|
19,566
|
my_strnxfrm_simple_nopad
|
eloqsql/strings/ctype-simple.c
|
size_t my_strnxfrm_simple_nopad(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *d0= dst;
dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights,
src, srclen);
return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, d0 + dstlen,
nweights, flags, 0);
}
|
O0
|
c
|
my_strnxfrm_simple_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x1c(%rbp), %rcx
callq 0x46ce0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rcx
addq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x47040
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_simple_nopad:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov r8, [rbp+var_28]
mov r9, [rbp+var_30]
lea rcx, [rbp+var_1C]
call my_strnxfrm_simple_internal
mov rcx, rax
mov rax, [rbp+var_40]
add rax, rcx
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_38]
add rcx, [rbp+var_18]
mov r8d, [rbp+var_1C]
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+50h+var_50], 0
call my_strxfrm_pad_desc_and_reverse_nopad
add rsp, 50h
pop rbp
retn
|
long long my_strnxfrm_simple_nopad(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int a4,
unsigned __int8 *a5,
unsigned long long a6,
int a7)
{
_BYTE *v7; // rax
unsigned int v9; // [rsp+34h] [rbp-1Ch] BYREF
unsigned long long v10; // [rsp+38h] [rbp-18h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
long long v12; // [rsp+48h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v7 = my_strnxfrm_simple_internal(a1, a2, a3, &v9, a5, a6);
v11 = &a2[(_QWORD)v7];
return my_strxfrm_pad_desc_and_reverse_nopad(v12, (_DWORD)a2, (int)v7 + (int)a2, (int)v10 + (int)a2, v9, a7, 0);
}
|
my_strnxfrm_simple_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x1c]
CALL 0x00146ce0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,qword ptr [RBP + -0x18]
MOV R8D,dword ptr [RBP + -0x1c]
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00147040
ADD RSP,0x50
POP RBP
RET
|
void my_strnxfrm_simple_nopad
(int8 param_1,long param_2,long param_3,int4 param_4,int8 param_5,
int8 param_6,int4 param_7)
{
int4 local_24;
long local_20;
long local_18;
int8 local_10;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_18 = my_strnxfrm_simple_internal(param_1,param_2,param_3,&local_24,param_5,param_6);
local_18 = param_2 + local_18;
my_strxfrm_pad_desc_and_reverse_nopad
(local_10,param_2,local_18,param_2 + local_20,local_24,param_7,0);
return;
}
|
|
19,567
|
my_hash_reset
|
eloqsql/mysys/hash.c
|
void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
/* Set row pointers so that the hash can be reused at once */
hash->blength= 1;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_hash_reset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0x4ec44
movq $0x0, 0x18(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0x4ec44
movq 0x28(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
addq $0x10, %r15
callq *0x60(%rbx)
cmpq %r14, %r15
jb 0x4ec34
movl $0x0, 0x30(%rbx)
movq $0x1, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_reset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, [rdi+18h]
test r14, r14
jz short loc_4EC44
mov qword ptr [rbx+18h], 0
cmp qword ptr [rbx+60h], 0
jz short loc_4EC44
mov r15, [rbx+28h]
shl r14, 4
add r14, r15
loc_4EC34:
mov rdi, [r15+8]
add r15, 10h
call qword ptr [rbx+60h]
cmp r15, r14
jb short loc_4EC34
loc_4EC44:
mov dword ptr [rbx+30h], 0
mov qword ptr [rbx+10h], 1
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_hash_reset(long long a1)
{
long long v2; // r14
unsigned long long v3; // r15
unsigned long long v4; // r14
long long v5; // rdi
long long result; // rax
v2 = *(unsigned int *)(a1 + 24);
if ( *(_DWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
{
v3 = *(_QWORD *)(a1 + 40);
v4 = v3 + 16 * v2;
do
{
v5 = *(_QWORD *)(v3 + 8);
v3 += 16LL;
result = (*(long long ( **)(long long))(a1 + 96))(v5);
}
while ( v3 < v4 );
}
}
*(_DWORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
|
my_hash_reset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x18]
TEST R14,R14
JZ 0x0014ec44
MOV qword ptr [RBX + 0x18],0x0
CMP qword ptr [RBX + 0x60],0x0
JZ 0x0014ec44
MOV R15,qword ptr [RBX + 0x28]
SHL R14,0x4
ADD R14,R15
LAB_0014ec34:
MOV RDI,qword ptr [R15 + 0x8]
ADD R15,0x10
CALL qword ptr [RBX + 0x60]
CMP R15,R14
JC 0x0014ec34
LAB_0014ec44:
MOV dword ptr [RBX + 0x30],0x0
MOV qword ptr [RBX + 0x10],0x1
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_reset(long param_1)
{
int8 *puVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(uint *)(param_1 + 0x18);
if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0))
{
uVar4 = *(ulong *)(param_1 + 0x28);
uVar3 = (ulong)uVar2 * 0x10 + uVar4;
do {
puVar1 = (int8 *)(uVar4 + 8);
uVar4 = uVar4 + 0x10;
(**(code **)(param_1 + 0x60))(*puVar1);
} while (uVar4 < uVar3);
}
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
|
|
19,568
|
Query_cache::unlock()
|
eloqsql/sql/sql_cache.cc
|
void Query_cache::unlock(void)
{
DBUG_ENTER("Query_cache::unlock");
mysql_mutex_lock(&structure_guard_mutex);
#ifndef DBUG_OFF
/* Thd may not be set in resize() at mysqld start */
THD *thd= current_thd;
if (thd)
DBUG_ASSERT(m_cache_lock_thread_id == thd->thread_id);
#endif
DBUG_ASSERT(m_cache_lock_status == Query_cache::LOCKED ||
m_cache_lock_status == Query_cache::LOCKED_NO_WAIT);
m_cache_lock_status= Query_cache::UNLOCKED;
DBUG_PRINT("Query_cache",("Sending signal"));
mysql_cond_signal(&COND_cache_status_changed);
DBUG_ASSERT(m_requests_in_progress > 0);
m_requests_in_progress--;
if (m_requests_in_progress == 0 && m_cache_status == DISABLE_REQUEST)
{
/* No clients => just free query cache */
free_cache();
m_cache_status= DISABLED;
}
mysql_mutex_unlock(&structure_guard_mutex);
DBUG_VOID_RETURN;
}
|
O0
|
cpp
|
Query_cache::unlock():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x98, %rdi
leaq 0xb1f4af(%rip), %rsi # 0x1393d81
movl $0x2eb, %edx # imm = 0x2EB
callq 0xb44d40
jmp 0x8748de
movq -0x10(%rbp), %rax
movl $0x0, 0x8c(%rax)
jmp 0x8748ee
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x874960
jmp 0x8748fd
movq -0x10(%rbp), %rax
movl 0x88(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x88(%rax)
cmpl $0x0, 0x88(%rax)
jne 0x87493d
movq -0x10(%rbp), %rax
cmpl $0x1, 0x90(%rax)
jne 0x87493d
movq -0x10(%rbp), %rdi
callq 0x8749b0
movq -0x10(%rbp), %rax
movl $0x2, 0x90(%rax)
movq -0x10(%rbp), %rdi
addq $0x98, %rdi
callq 0xb44fa0
jmp 0x87494f
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN11Query_cache6unlockEv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_10], rdi
add rdi, 98h
lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2EBh
call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint)
jmp short $+2
loc_8748DE:
mov rax, [rbp+var_10]
mov dword ptr [rax+8Ch], 0
jmp short $+2
loc_8748EE:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call _ZL24inline_mysql_cond_signalP13st_mysql_cond_1; inline_mysql_cond_signal(st_mysql_cond *)
jmp short $+2
loc_8748FD:
mov rax, [rbp+var_10]
mov ecx, [rax+88h]
add ecx, 0FFFFFFFFh
mov [rax+88h], ecx
cmp dword ptr [rax+88h], 0
jnz short loc_87493D
mov rax, [rbp+var_10]
cmp dword ptr [rax+90h], 1
jnz short loc_87493D
mov rdi, [rbp+var_10]; this
call _ZN11Query_cache10free_cacheEv; Query_cache::free_cache(void)
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 2
loc_87493D:
mov rdi, [rbp+var_10]
add rdi, 98h
call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *)
jmp short $+2
loc_87494F:
add rsp, 10h
pop rbp
retn
|
long long Query_cache::unlock(Query_cache *this)
{
coro_mutex_lock((char *)this + 152, "/workspace/llm4binary/github2025/eloqsql/sql/sql_cache.cc", 747LL);
*((_DWORD *)this + 35) = 0;
inline_mysql_cond_signal((char *)this + 80);
if ( !--*((_DWORD *)this + 34) && *((_DWORD *)this + 36) == 1 )
{
Query_cache::free_cache(this);
*((_DWORD *)this + 36) = 2;
}
return coro_mutex_unlock((char *)this + 152);
}
|
__cxx_global_var_init.308:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
LEA RDI,[0x1ddd110]
MOV ESI,0x58
LEA RDX,[0x14a07ee]
LEA RCX,[0x14a07f4]
XOR R8D,R8D
LEA R9,[0x1bde830]
LEA R14,[0x1bde850]
LEA RBX,[0x1bde870]
LEA R11,[0x1bde890]
LEA R10,[0x149ffe4]
LEA RAX,[0x1bde020]
ADD RAX,0x140
MOV qword ptr [RSP],R14
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],R11
MOV dword ptr [RSP + 0x18],0xa
MOV dword ptr [RSP + 0x20],0x9
MOV dword ptr [RSP + 0x28],0x2e
MOV dword ptr [RSP + 0x30],0x2c
MOV qword ptr [RSP + 0x38],R10
MOV qword ptr [RSP + 0x40],RAX
CALL 0x00b46fc0
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
|
void __cxx_global_var_init_308(void)
{
MY_LOCALE::MY_LOCALE
((MY_LOCALE *)my_locale_es_GT,0x58,"es_GT","Spanish - Guatemala",false,
(st_typelib *)my_locale_typelib_month_names_es_ES,
(st_typelib *)my_locale_typelib_ab_month_names_es_ES,
(st_typelib *)my_locale_typelib_day_names_es_ES,
(st_typelib *)my_locale_typelib_ab_day_names_es_ES,10,9,0x2e,0x2c,"\x03\x03",
(my_locale_errmsgs *)&PTR_s_spanish_01bde160);
return;
}
|
|
19,569
|
get_charsets_dir
|
eloqsql/mysys/charset.c
|
char *get_charsets_dir(char *buf)
{
const char *sharedir= SHAREDIR;
char *res;
DBUG_ENTER("get_charsets_dir");
if (charsets_dir != NULL)
strmake(buf, charsets_dir, FN_REFLEN-1);
else
{
if (test_if_hard_path(sharedir) ||
is_prefix(sharedir, DEFAULT_CHARSET_HOME))
strxmov(buf, sharedir, "/", CHARSET_DIR, NullS);
else
strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR,
NullS);
}
res= convert_dirname(buf,buf,NullS);
DBUG_PRINT("info",("charsets dir: '%s'", buf));
DBUG_RETURN(res);
}
|
O0
|
c
|
get_charsets_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x4fe6d(%rip), %rax # 0xaf7f0
movq %rax, -0x10(%rbp)
leaq 0x3b0cb2(%rip), %rax # 0x410640
cmpq $0x0, (%rax)
je 0x5f9ae
movq -0x8(%rbp), %rdi
leaq 0x3b0ca1(%rip), %rax # 0x410640
movq (%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0xabe50
jmp 0x5fa28
movq -0x10(%rbp), %rdi
callq 0x65090
cmpl $0x0, %eax
jne 0x5f9d1
movq -0x10(%rbp), %rdi
leaq 0x4fe42(%rip), %rsi # 0xaf809
callq 0xa8700
cmpl $0x0, %eax
je 0x5f9f5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x50a68(%rip), %rdx # 0xb0448
leaq 0x4fe35(%rip), %rcx # 0xaf81c
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xabf30
jmp 0x5fa26
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x4fe05(%rip), %rsi # 0xaf809
leaq 0x50a3d(%rip), %r8 # 0xb0448
leaq 0x4fe0a(%rip), %r9 # 0xaf81c
xorl %eax, %eax
movq %r8, %rdx
movq $0x0, (%rsp)
movb $0x0, %al
callq 0xabf30
jmp 0x5fa28
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x58510
movq %rax, -0x18(%rbp)
jmp 0x5fa3f
jmp 0x5fa41
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_charsets_dir:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
lea rax, aHomeMonoInstal; "/home/mono/install/share"
mov [rbp+var_10], rax
lea rax, charsets_dir
cmp qword ptr [rax], 0
jz short loc_5F9AE
mov rdi, [rbp+var_8]
lea rax, charsets_dir
mov rsi, [rax]
mov edx, 1FFh
call strmake
jmp short loc_5FA28
loc_5F9AE:
mov rdi, [rbp+var_10]
call test_if_hard_path
cmp eax, 0
jnz short loc_5F9D1
mov rdi, [rbp+var_10]
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
call is_prefix
cmp eax, 0
jz short loc_5F9F5
loc_5F9D1:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, unk_B0448
lea rcx, aCharsets; "charsets/"
xor eax, eax
mov r8d, eax
mov al, 0
call strxmov
jmp short loc_5FA26
loc_5F9F5:
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_10]
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
lea r8, unk_B0448
lea r9, aCharsets; "charsets/"
xor eax, eax
mov rdx, r8
mov [rsp+30h+var_30], 0
mov al, 0
call strxmov
loc_5FA26:
jmp short $+2
loc_5FA28:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call convert_dirname
mov [rbp+var_18], rax
jmp short $+2
loc_5FA3F:
jmp short $+2
loc_5FA41:
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
|
_BYTE * get_charsets_dir(_BYTE *a1)
{
int v1; // r9d
if ( charsets_dir )
{
strmake(a1, charsets_dir, 511LL);
}
else if ( (unsigned int)test_if_hard_path("/home/mono/install/share")
|| (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") )
{
strxmov(
(_DWORD)a1,
(unsigned int)"/home/mono/install/share",
(unsigned int)&unk_B0448,
(unsigned int)"charsets/",
0,
v1);
}
else
{
strxmov(
(_DWORD)a1,
(unsigned int)"/home/mono/install",
(unsigned int)&unk_B0448,
(unsigned int)"/home/mono/install/share",
(unsigned int)&unk_B0448,
(unsigned int)"charsets/");
}
return convert_dirname(a1, (long long)a1, 0LL);
}
|
get_charsets_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[0x1af7f0]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0x510640]
CMP qword ptr [RAX],0x0
JZ 0x0015f9ae
MOV RDI,qword ptr [RBP + -0x8]
LEA RAX,[0x510640]
MOV RSI,qword ptr [RAX]
MOV EDX,0x1ff
CALL 0x001abe50
JMP 0x0015fa28
LAB_0015f9ae:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00165090
CMP EAX,0x0
JNZ 0x0015f9d1
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1af809]
CALL 0x001a8700
CMP EAX,0x0
JZ 0x0015f9f5
LAB_0015f9d1:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x1b0448]
LEA RCX,[0x1af81c]
XOR EAX,EAX
MOV R8D,EAX
MOV AL,0x0
CALL 0x001abf30
JMP 0x0015fa26
LAB_0015f9f5:
MOV RDI,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
LEA RSI,[0x1af809]
LEA R8,[0x1b0448]
LEA R9,[0x1af81c]
XOR EAX,EAX
MOV RDX,R8
MOV qword ptr [RSP],0x0
MOV AL,0x0
CALL 0x001abf30
LAB_0015fa26:
JMP 0x0015fa28
LAB_0015fa28:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00158510
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0015fa3f
LAB_0015fa3f:
JMP 0x0015fa41
LAB_0015fa41:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
int8 get_charsets_dir(int8 param_1)
{
int iVar1;
int8 uVar2;
if (charsets_dir == 0) {
iVar1 = test_if_hard_path("/home/mono/install/share");
if ((iVar1 == 0) &&
(iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"), iVar1 == 0)) {
strxmov(param_1,"/home/mono/install",&DAT_001b0448,"/home/mono/install/share",&DAT_001b0448,
"charsets/",0);
}
else {
strxmov(param_1,"/home/mono/install/share",&DAT_001b0448,"charsets/",0);
}
}
else {
strmake(param_1,charsets_dir,0x1ff);
}
uVar2 = convert_dirname(param_1,param_1,0);
return uVar2;
}
|
|
19,570
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O1
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal (%r14,%r14), %eax
addl 0x8(%rdx), %eax
movslq %eax, %rsi
leaq 0x17(%rsp), %rdx
callq 0x9d71e
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r14d, %r9d
callq 0x1e720
movl %eax, %r13d
testl %eax, %eax
js 0x99d98
movl %r13d, %esi
movq %rbx, %rdi
callq 0x26c74
jmp 0x99dd5
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26c74
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movzbl %bpl, %eax
movl %eax, (%rsp)
movzbl %r14b, %r9d
movq %r15, %rdi
callq 0x1e720
cmpl %r13d, %eax
jne 0x99de7
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7d46f(%rip), %rdi # 0x11725d
leaq 0x73c6e(%rip), %rdx # 0x10da63
leaq 0x7dab7(%rip), %rcx # 0x1178b3
movl $0x6b8, %esi # imm = 0x6B8
xorl %eax, %eax
callq 0x1e4f0
jmp 0x99e0a
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x99e21
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1dc40
movq %r14, %rdi
callq 0x1e650
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [r14+r14]
add eax, [rdx+8]
movsxd rsi, eax
lea rdx, [rsp+48h+var_31]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
mov [rsp+48h+var_48], ebp
mov rdi, r15
mov r9d, r14d
call _llama_tokenize
mov r13d, eax
test eax, eax
js short loc_99D98
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_99DD5
loc_99D98:
neg r13d
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
movzx eax, bpl
mov [rsp+48h+var_48], eax
movzx r9d, r14b
mov rdi, r15
call _llama_tokenize
cmp eax, r13d
jnz short loc_99DE7
loc_99DD5:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_99DE7:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
mov esi, 6B8h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_99E0A:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_99E21
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99E21:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5)
{
int v8; // eax
int v9; // r13d
long long v11; // r14
_BYTE v12[49]; // [rsp+17h] [rbp-31h] BYREF
std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v12);
v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5);
if ( v8 < 0 )
{
v9 = -v8;
std::vector<int>::resize(a1, (unsigned int)-v8);
if ( (unsigned int)llama_tokenize(
a2,
*a3,
*((unsigned int *)a3 + 2),
*a1,
(a1[1] - *a1) >> 2,
(unsigned __int8)a4,
(unsigned __int8)a5) != v9 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1720LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
if ( *a1 )
operator delete((void *)*a1, a1[2] - *a1);
_Unwind_Resume(v11);
}
}
else
{
std::vector<int>::resize(a1, (unsigned int)v8);
}
return a1;
}
|
common_tokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[R14 + R14*0x1]
ADD EAX,dword ptr [RDX + 0x8]
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x17]
CALL 0x0019d71e
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00199d76:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x0011e720
MOV R13D,EAX
TEST EAX,EAX
JS 0x00199d98
MOV ESI,R13D
MOV RDI,RBX
CALL 0x00126c74
JMP 0x00199dd5
LAB_00199d98:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x00126c74
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00199dbd:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x0011e720
CMP EAX,R13D
JNZ 0x00199de7
LAB_00199dd5:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00199de7:
LEA RDI,[0x21725d]
LEA RDX,[0x20da63]
LEA RCX,[0x2178b3]
MOV ESI,0x6b8
XOR EAX,EAX
CALL 0x0011e4f0
|
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
uint uVar1;
uint uVar2;
int7 in_register_00000009;
int7 in_register_00000011;
int8 *puVar3;
uint in_R8D;
puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3);
std::vector<int,std::allocator<int>>::vector
((ulong)param_1,
(allocator *)
(long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1)));
/* try { // try from 00199d76 to 00199da5 has its CatchHandler @ 00199e0a */
uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,
CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D);
if ((int)uVar1 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1);
/* try { // try from 00199dbd to 00199e07 has its CatchHandler @ 00199e08 */
uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4,
in_R8D & 0xff);
if (uVar2 != -uVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8
,"GGML_ASSERT(%s) failed","check == -n_tokens");
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1);
}
return param_1;
}
|
|
19,571
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O3
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal (%r14,%r14), %eax
addl 0x8(%rdx), %eax
movslq %eax, %rsi
leaq 0x17(%rsp), %rdx
callq 0x9d270
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r14d, %r9d
callq 0x1e730
movl %eax, %r13d
testl %eax, %eax
js 0x99a68
movl %r13d, %esi
movq %rbx, %rdi
callq 0x26c16
jmp 0x99aa5
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26c16
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movzbl %bpl, %eax
movl %eax, (%rsp)
movzbl %r14b, %r9d
movq %r15, %rdi
callq 0x1e730
cmpl %r13d, %eax
jne 0x99ab7
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7a79f(%rip), %rdi # 0x11425d
leaq 0x70fae(%rip), %rdx # 0x10aa73
leaq 0x7ade7(%rip), %rcx # 0x1148b3
movl $0x6b8, %esi # imm = 0x6B8
xorl %eax, %eax
callq 0x1e500
jmp 0x99ada
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x99af1
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1dc50
movq %r14, %rdi
callq 0x1e660
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [r14+r14]
add eax, [rdx+8]
movsxd rsi, eax
lea rdx, [rsp+48h+var_31]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
mov [rsp+48h+var_48], ebp
mov rdi, r15
mov r9d, r14d
call _llama_tokenize
mov r13d, eax
test eax, eax
js short loc_99A68
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_99AA5
loc_99A68:
neg r13d
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
movzx eax, bpl
mov [rsp+48h+var_48], eax
movzx r9d, r14b
mov rdi, r15
call _llama_tokenize
cmp eax, r13d
jnz short loc_99AB7
loc_99AA5:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_99AB7:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
mov esi, 6B8h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_99ADA:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_99AF1
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99AF1:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5)
{
int v8; // eax
int v9; // r13d
long long v11; // r14
_BYTE v12[49]; // [rsp+17h] [rbp-31h] BYREF
std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v12);
v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5);
if ( v8 < 0 )
{
v9 = -v8;
std::vector<int>::resize(a1, (unsigned int)-v8);
if ( (unsigned int)llama_tokenize(
a2,
*a3,
*((unsigned int *)a3 + 2),
*a1,
(a1[1] - *a1) >> 2,
(unsigned __int8)a4,
(unsigned __int8)a5) != v9 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1720LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
if ( *a1 )
operator delete((void *)*a1, a1[2] - *a1);
_Unwind_Resume(v11);
}
}
else
{
std::vector<int>::resize(a1, (unsigned int)v8);
}
return a1;
}
|
common_tokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[R14 + R14*0x1]
ADD EAX,dword ptr [RDX + 0x8]
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x17]
CALL 0x0019d270
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00199a46:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x0011e730
MOV R13D,EAX
TEST EAX,EAX
JS 0x00199a68
MOV ESI,R13D
MOV RDI,RBX
CALL 0x00126c16
JMP 0x00199aa5
LAB_00199a68:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x00126c16
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00199a8d:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x0011e730
CMP EAX,R13D
JNZ 0x00199ab7
LAB_00199aa5:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00199ab7:
LEA RDI,[0x21425d]
LEA RDX,[0x20aa73]
LEA RCX,[0x2148b3]
MOV ESI,0x6b8
XOR EAX,EAX
CALL 0x0011e500
|
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
uint uVar1;
uint uVar2;
int7 in_register_00000009;
int7 in_register_00000011;
int8 *puVar3;
uint in_R8D;
puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3);
std::vector<int,std::allocator<int>>::vector
((ulong)param_1,
(allocator *)
(long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1)));
/* try { // try from 00199a46 to 00199a75 has its CatchHandler @ 00199ada */
uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,
CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D);
if ((int)uVar1 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1);
/* try { // try from 00199a8d to 00199ad7 has its CatchHandler @ 00199ad8 */
uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4,
in_R8D & 0xff);
if (uVar2 != -uVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8
,"GGML_ASSERT(%s) failed","check == -n_tokens");
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1);
}
return param_1;
}
|
|
19,572
|
my_hash_free
|
eloqsql/mysys/hash.c
|
void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_hash_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x2bb7e
movq -0x8(%rbp), %rdi
callq 0x2bbc0
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x30a20
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x2bbae
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_free:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_2BB7E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call delete_dynamic
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
jmp short $+2
loc_2BBAE:
add rsp, 10h
pop rbp
retn
|
long long my_hash_free(long long a1)
{
long long result; // rax
my_hash_free_elements(a1);
*(_QWORD *)(a1 + 96) = 0LL;
delete_dynamic(a1 + 40);
result = a1;
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
|
my_hash_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0012bb7e
LAB_0012bb7e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012bbc0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x00130a20
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
JMP 0x0012bbae
LAB_0012bbae:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_free(long param_1)
{
my_hash_free_elements(param_1);
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
|
|
19,573
|
my_hash_free
|
eloqsql/mysys/hash.c
|
void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_hash_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0x29271
movq $0x0, 0x18(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0x29271
movq 0x28(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
addq $0x10, %r15
callq *0x60(%rbx)
cmpq %r14, %r15
jb 0x29261
xorl %r14d, %r14d
movq %r14, 0x60(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x2c158
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_free:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, [rdi+18h]
test r14, r14
jz short loc_29271
mov qword ptr [rbx+18h], 0
cmp qword ptr [rbx+60h], 0
jz short loc_29271
mov r15, [rbx+28h]
shl r14, 4
add r14, r15
loc_29261:
mov rdi, [r15+8]
add r15, 10h
call qword ptr [rbx+60h]
cmp r15, r14
jb short loc_29261
loc_29271:
xor r14d, r14d
mov [rbx+60h], r14
lea rdi, [rbx+28h]
call delete_dynamic
mov [rbx+10h], r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long my_hash_free(long long a1)
{
long long v2; // r14
unsigned long long v3; // r15
unsigned long long v4; // r14
long long v5; // rdi
long long result; // rax
v2 = *(unsigned int *)(a1 + 24);
if ( *(_DWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
{
v3 = *(_QWORD *)(a1 + 40);
v4 = v3 + 16 * v2;
do
{
v5 = *(_QWORD *)(v3 + 8);
v3 += 16LL;
(*(void ( **)(long long))(a1 + 96))(v5);
}
while ( v3 < v4 );
}
}
*(_QWORD *)(a1 + 96) = 0LL;
result = delete_dynamic(a1 + 40);
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
|
my_hash_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x18]
TEST R14,R14
JZ 0x00129271
MOV qword ptr [RBX + 0x18],0x0
CMP qword ptr [RBX + 0x60],0x0
JZ 0x00129271
MOV R15,qword ptr [RBX + 0x28]
SHL R14,0x4
ADD R14,R15
LAB_00129261:
MOV RDI,qword ptr [R15 + 0x8]
ADD R15,0x10
CALL qword ptr [RBX + 0x60]
CMP R15,R14
JC 0x00129261
LAB_00129271:
XOR R14D,R14D
MOV qword ptr [RBX + 0x60],R14
LEA RDI,[RBX + 0x28]
CALL 0x0012c158
MOV qword ptr [RBX + 0x10],R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_free(long param_1)
{
int8 *puVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(uint *)(param_1 + 0x18);
if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0))
{
uVar4 = *(ulong *)(param_1 + 0x28);
uVar3 = (ulong)uVar2 * 0x10 + uVar4;
do {
puVar1 = (int8 *)(uVar4 + 8);
uVar4 = uVar4 + 0x10;
(**(code **)(param_1 + 0x60))(*puVar1);
} while (uVar4 < uVar3);
}
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
|
|
19,574
|
mi_get_pointer_length
|
eloqsql/storage/myisam/mi_create.c
|
uint mi_get_pointer_length(ulonglong file_length, uint def)
{
DBUG_ASSERT(def >= 2 && def <= 7);
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
if (file_length >= 1ULL << 56)
def=8;
else
#endif
if (file_length >= 1ULL << 48)
def=7;
else if (file_length >= 1ULL << 40)
def=6;
else if (file_length >= 1ULL << 32)
def=5;
else if (file_length >= 1ULL << 24)
def=4;
else if (file_length >= 1ULL << 16)
def=3;
else
def=2;
}
return def;
}
|
O0
|
c
|
mi_get_pointer_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xd958d
cmpq $0x0, -0x8(%rbp)
je 0xd961a
movabsq $0x1000000000000, %rax # imm = 0x1000000000000
cmpq %rax, -0x8(%rbp)
jb 0xd95b1
movl $0x7, -0xc(%rbp)
jmp 0xd9618
movabsq $0x10000000000, %rax # imm = 0x10000000000
cmpq %rax, -0x8(%rbp)
jb 0xd95ca
movl $0x6, -0xc(%rbp)
jmp 0xd9616
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, -0x8(%rbp)
jb 0xd95e3
movl $0x5, -0xc(%rbp)
jmp 0xd9614
cmpq $0x1000000, -0x8(%rbp) # imm = 0x1000000
jb 0xd95f6
movl $0x4, -0xc(%rbp)
jmp 0xd9612
cmpq $0x10000, -0x8(%rbp) # imm = 0x10000
jb 0xd9609
movl $0x3, -0xc(%rbp)
jmp 0xd9610
movl $0x2, -0xc(%rbp)
jmp 0xd9612
jmp 0xd9614
jmp 0xd9616
jmp 0xd9618
jmp 0xd961a
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
|
mi_get_pointer_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_D958D:
cmp [rbp+var_8], 0
jz loc_D961A
mov rax, 1000000000000h
cmp [rbp+var_8], rax
jb short loc_D95B1
mov [rbp+var_C], 7
jmp short loc_D9618
loc_D95B1:
mov rax, 10000000000h
cmp [rbp+var_8], rax
jb short loc_D95CA
mov [rbp+var_C], 6
jmp short loc_D9616
loc_D95CA:
mov rax, 100000000h
cmp [rbp+var_8], rax
jb short loc_D95E3
mov [rbp+var_C], 5
jmp short loc_D9614
loc_D95E3:
cmp [rbp+var_8], 1000000h
jb short loc_D95F6
mov [rbp+var_C], 4
jmp short loc_D9612
loc_D95F6:
cmp [rbp+var_8], 10000h
jb short loc_D9609
mov [rbp+var_C], 3
jmp short loc_D9610
loc_D9609:
mov [rbp+var_C], 2
loc_D9610:
jmp short $+2
loc_D9612:
jmp short $+2
loc_D9614:
jmp short $+2
loc_D9616:
jmp short $+2
loc_D9618:
jmp short $+2
loc_D961A:
mov eax, [rbp+var_C]
pop rbp
retn
|
long long mi_get_pointer_length(unsigned long long a1, unsigned int a2)
{
if ( a1 )
{
if ( a1 < 0x1000000000000LL )
{
if ( a1 < 0x10000000000LL )
{
if ( a1 < 0x100000000LL )
{
if ( a1 < 0x1000000 )
{
if ( a1 < 0x10000 )
return 2;
else
return 3;
}
else
{
return 4;
}
}
else
{
return 5;
}
}
else
{
return 6;
}
}
else
{
return 7;
}
}
return a2;
}
|
mi_get_pointer_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001d958d
LAB_001d958d:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001d961a
MOV RAX,0x1000000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001d95b1
MOV dword ptr [RBP + -0xc],0x7
JMP 0x001d9618
LAB_001d95b1:
MOV RAX,0x10000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001d95ca
MOV dword ptr [RBP + -0xc],0x6
JMP 0x001d9616
LAB_001d95ca:
MOV RAX,0x100000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001d95e3
MOV dword ptr [RBP + -0xc],0x5
JMP 0x001d9614
LAB_001d95e3:
CMP qword ptr [RBP + -0x8],0x1000000
JC 0x001d95f6
MOV dword ptr [RBP + -0xc],0x4
JMP 0x001d9612
LAB_001d95f6:
CMP qword ptr [RBP + -0x8],0x10000
JC 0x001d9609
MOV dword ptr [RBP + -0xc],0x3
JMP 0x001d9610
LAB_001d9609:
MOV dword ptr [RBP + -0xc],0x2
LAB_001d9610:
JMP 0x001d9612
LAB_001d9612:
JMP 0x001d9614
LAB_001d9614:
JMP 0x001d9616
LAB_001d9616:
JMP 0x001d9618
LAB_001d9618:
JMP 0x001d961a
LAB_001d961a:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 mi_get_pointer_length(ulong param_1,int4 param_2)
{
int4 local_14;
local_14 = param_2;
if (param_1 != 0) {
if (param_1 < 0x1000000000000) {
if (param_1 < 0x10000000000) {
if (param_1 < 0x100000000) {
if (param_1 < 0x1000000) {
if (param_1 < 0x10000) {
local_14 = 2;
}
else {
local_14 = 3;
}
}
else {
local_14 = 4;
}
}
else {
local_14 = 5;
}
}
else {
local_14 = 6;
}
}
else {
local_14 = 7;
}
}
return local_14;
}
|
|
19,575
|
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)
|
monkey531[P]llama/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);
}
|
O2
|
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 0x87fd4
movq %rdi, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
leaq 0xb0(%rsp), %r13
cmpl %r8d, 0x8(%r13)
jne 0x87ff0
movl %r8d, %edi
callq 0x880a9
movq %rdx, %r12
leaq 0x68(%rsp), %r14
movq %rax, (%r14)
movl %r12d, 0x8(%r14)
movq %r13, %rdi
movq %r14, %rsi
callq 0x881de
movq %rax, %r15
movl %edx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x881de
movq %rax, %r13
movl %edx, %ebp
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x881de
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 0x8823a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28551(%rip), %rdi # 0xb052c
leaq 0x28594(%rip), %rdx # 0xb0576
leaq 0x2dd7c(%rip), %rcx # 0xb5d65
movl $0x454b, %esi # imm = 0x454B
jmp 0x8800a
leaq 0x28535(%rip), %rdi # 0xb052c
leaq 0x28578(%rip), %rdx # 0xb0576
leaq 0x2dd76(%rip), %rcx # 0xb5d7b
movl $0x454c, %esi # imm = 0x454C
xorl %eax, %eax
callq 0x23ed0
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_87FD4
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_87FF0
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, [rsp+0A8h+var_70]
movups [rsp+0A8h+var_98], xmm0
movups xmm0, [rsp+0A8h+var_60]
movups [rsp+0A8h+var_A8], xmm0
mov rdi, [rsp+0A8h+var_88]
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_87FD4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e"
mov esi, 454Bh
jmp short loc_8800A
loc_87FF0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEVE; "m_plus.e == v.e"
mov esi, 454Ch
loc_8800A:
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
int 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
int v17; // r13d
int v18; // edx
int v19; // ebp
char v20; // al
int v21; // edx
int v22; // r9d
long long v25; // [rsp+58h] [rbp-50h] BYREF
unsigned int v26; // [rsp+60h] [rbp-48h]
long long v27; // [rsp+68h] [rbp-40h] BYREF
int v28; // [rsp+70h] [rbp-38h]
v25 = a4;
v26 = 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;
v27 = cached_power_for_binary_exponent;
v28 = v13;
v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v27);
v16 = v15;
v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v25, &v27);
v19 = v18;
v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v27);
*a3 = -v12;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(
a1,
a2,
(_DWORD)a3,
v17 + 1,
v19,
v22,
v14,
v16,
v20 - 1,
v21);
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17740LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == v.e");
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/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/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
|
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 0x00187fd4
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 0x00187ff0
MOV EDI,R8D
CALL 0x001880a9
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 0x001881de
MOV R15,RAX
MOV EBX,EDX
LEA RDI,[RSP + 0x58]
MOV RSI,R14
CALL 0x001881de
MOV R13,RAX
MOV EBP,EDX
LEA RDI,[RSP + 0xc0]
MOV RSI,R14
CALL 0x001881de
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 0x0018823a
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00187fd4:
LEA RDI,[0x1b052c]
LEA RDX,[0x1b0576]
LEA RCX,[0x1b5d65]
MOV ESI,0x454b
JMP 0x0018800a
LAB_00187ff0:
LEA RDI,[0x1b052c]
LEA RDX,[0x1b0576]
LEA RCX,[0x1b5d7b]
MOV ESI,0x454c
LAB_0018800a:
XOR EAX,EAX
CALL 0x00123ed0
|
/* 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 [16];
int1 auVar5 [12];
int1 auVar6 [12];
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) {
auVar4 = get_cached_power_for_binary_exponent(param_5);
local_40 = auVar4._0_8_;
local_38 = auVar4._8_4_;
uVar1 = diyfp::mul((diyfp *)¶m_7,(diyfp *)&local_40);
auVar5 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40);
auVar6 = diyfp::mul((diyfp *)¶m_9,(diyfp *)&local_40);
*param_3 = -auVar4._12_4_;
grisu2_digit_gen(param_1,param_2,param_3,auVar5._0_8_ + 1,auVar5._8_4_,param_6,uVar1,
extraout_EDX,auVar6._0_8_ + -1,CONCAT44(uStack_64,auVar6._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/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
19,576
|
end_key_cache_internal
|
eloqsql/mysys/mf_keycache.c
|
static
void end_key_cache_internal(KEY_CACHE *keycache, my_bool cleanup,
my_bool use_op_lock)
{
if (keycache->key_cache_inited)
{
keycache->interface_funcs->end(keycache->keycache_cb, cleanup);
if (cleanup)
{
if (keycache->keycache_cb)
{
my_free(keycache->keycache_cb);
keycache->keycache_cb= 0;
}
/*
We do not destroy op_lock if we are going to reuse the same key cache.
This happens if we are called from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_destroy(&keycache->op_lock);
keycache->key_cache_inited= 0;
}
keycache->can_be_used= 0;
}
}
|
O0
|
c
|
end_key_cache_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x48(%rax)
je 0xe7a68
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movsbl -0x9(%rbp), %esi
callq *%rax
cmpb $0x0, -0x9(%rbp)
je 0xe7a60
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe7a45
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xfa370
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpb $0x0, -0xa(%rbp)
je 0xe7a58
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a100
movq -0x8(%rbp), %rax
movb $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x49(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
|
end_key_cache_internal:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, dl
mov cl, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], cl
mov [rbp+var_A], al
mov rax, [rbp+var_8]
cmp byte ptr [rax+48h], 0
jz short loc_E7A68
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+40h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
movsx esi, [rbp+var_9]
call rax
cmp [rbp+var_9], 0
jz short loc_E7A60
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_E7A45
mov rax, [rbp+var_8]
mov rdi, [rax+8]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
loc_E7A45:
cmp [rbp+var_A], 0
jz short loc_E7A58
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_mutex_destroy
loc_E7A58:
mov rax, [rbp+var_8]
mov byte ptr [rax+48h], 0
loc_E7A60:
mov rax, [rbp+var_8]
mov byte ptr [rax+49h], 0
loc_E7A68:
add rsp, 10h
pop rbp
retn
|
long long end_key_cache_internal(long long a1, char a2, char a3)
{
long long result; // rax
result = a1;
if ( *(_BYTE *)(a1 + 72) )
{
(*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 64LL))(*(_QWORD *)(a1 + 8), (unsigned int)a2);
if ( a2 )
{
if ( *(_QWORD *)(a1 + 8) )
{
my_free(*(_QWORD *)(a1 + 8));
*(_QWORD *)(a1 + 8) = 0LL;
}
if ( a3 )
pthread_mutex_destroy(a1 + 88);
*(_BYTE *)(a1 + 72) = 0;
}
result = a1;
*(_BYTE *)(a1 + 73) = 0;
}
return result;
}
|
end_key_cache_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,DL
MOV CL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],CL
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x48],0x0
JZ 0x001e7a68
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOVSX ESI,byte ptr [RBP + -0x9]
CALL RAX
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001e7a60
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001e7a45
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001fa370
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
LAB_001e7a45:
CMP byte ptr [RBP + -0xa],0x0
JZ 0x001e7a58
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a100
LAB_001e7a58:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x48],0x0
LAB_001e7a60:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x49],0x0
LAB_001e7a68:
ADD RSP,0x10
POP RBP
RET
|
void end_key_cache_internal(long param_1,char param_2,char param_3)
{
if (*(char *)(param_1 + 0x48) != '\0') {
(**(code **)(*(long *)(param_1 + 0x10) + 0x40))(*(int8 *)(param_1 + 8),(int)param_2);
if (param_2 != '\0') {
if (*(long *)(param_1 + 8) != 0) {
my_free(*(int8 *)(param_1 + 8));
*(int8 *)(param_1 + 8) = 0;
}
if (param_3 != '\0') {
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x58));
}
*(int1 *)(param_1 + 0x48) = 0;
}
*(int1 *)(param_1 + 0x49) = 0;
}
return;
}
|
|
19,577
|
qh_nostatistic
|
aimrt_mujoco_sim/_deps/qhull-src/src/libqhull_r/stat_r.c
|
boolT qh_nostatistic(qhT *qh, int i) {
if ((qh->qhstat.type[i] > ZTYPEreal
&&qh->qhstat.stats[i].r == qh->qhstat.init[(unsigned char)(qh->qhstat.type[i])].r)
|| (qh->qhstat.type[i] < ZTYPEreal
&&qh->qhstat.stats[i].i == qh->qhstat.init[(unsigned char)(qh->qhstat.type[i])].i))
return True;
return False;
}
|
O0
|
c
|
qh_nostatistic:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movsbl 0x1fea(%rax,%rcx), %eax
cmpl $0x5, %eax
jle 0x4bd0d9
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movsd 0xd60(%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq -0x14(%rsp), %rdx
movzbl 0x1fea(%rcx,%rdx), %ecx
ucomisd 0x21e0(%rax,%rcx,8), %xmm0
jne 0x4bd0d9
jp 0x4bd0d9
jmp 0x4bd121
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movsbl 0x1fea(%rax,%rcx), %eax
cmpl $0x5, %eax
jge 0x4bd12b
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movl 0xd60(%rax,%rcx,8), %eax
movq -0x10(%rsp), %rcx
movq -0x10(%rsp), %rdx
movslq -0x14(%rsp), %rsi
movzbl 0x1fea(%rdx,%rsi), %edx
cmpl 0x21e0(%rcx,%rdx,8), %eax
jne 0x4bd12b
movl $0x1, -0x4(%rsp)
jmp 0x4bd133
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
|
qh_nostatistic:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_14]
movsx eax, byte ptr [rax+rcx+1FEAh]
cmp eax, 5
jle short loc_4BD0D9
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_14]
movsd xmm0, qword ptr [rax+rcx*8+0D60h]
mov rax, [rsp+var_10]
mov rcx, [rsp+var_10]
movsxd rdx, [rsp+var_14]
movzx ecx, byte ptr [rcx+rdx+1FEAh]
ucomisd xmm0, qword ptr [rax+rcx*8+21E0h]
jnz short loc_4BD0D9
jp short loc_4BD0D9
jmp short loc_4BD121
loc_4BD0D9:
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_14]
movsx eax, byte ptr [rax+rcx+1FEAh]
cmp eax, 5
jge short loc_4BD12B
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_14]
mov eax, [rax+rcx*8+0D60h]
mov rcx, [rsp+var_10]
mov rdx, [rsp+var_10]
movsxd rsi, [rsp+var_14]
movzx edx, byte ptr [rdx+rsi+1FEAh]
cmp eax, [rcx+rdx*8+21E0h]
jnz short loc_4BD12B
loc_4BD121:
mov [rsp+var_4], 1
jmp short loc_4BD133
loc_4BD12B:
mov [rsp+var_4], 0
loc_4BD133:
mov eax, [rsp+var_4]
retn
|
_BOOL8 qh_nostatistic(long long a1, int a2)
{
return *(char *)(a1 + a2 + 8170) > 5
&& *(double *)(a1 + 8LL * a2 + 3424) == *(double *)(a1 + 8LL * *(unsigned __int8 *)(a1 + a2 + 8170) + 8672)
|| *(char *)(a1 + a2 + 8170) < 5
&& *(_DWORD *)(a1 + 8LL * a2 + 3424) == *(_DWORD *)(a1 + 8LL * *(unsigned __int8 *)(a1 + a2 + 8170) + 8672);
}
|
__normal_iterator:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
RET
|
/* __gnu_cxx::__normal_iterator<mjCMesh* const*, std::vector<mjCMesh*, std::allocator<mjCMesh*> >
>::__normal_iterator(mjCMesh* const* const&) */
void __thiscall
__gnu_cxx::__normal_iterator<mjCMesh*const*,std::vector<mjCMesh*,std::allocator<mjCMesh*>>>::
__normal_iterator(__normal_iterator<mjCMesh*const*,std::vector<mjCMesh*,std::allocator<mjCMesh*>>>
*this,mjCMesh ***param_1)
{
*(mjCMesh ***)this = *param_1;
return;
}
|
|
19,578
|
my_hash_sort_utf32_nopad
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_utf32_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_utf32(uni_plane, &wc);
MY_HASH_ADD(m1, m2, (uint) (wc >> 24));
MY_HASH_ADD(m1, m2, (uint) (wc >> 16) & 0xFF);
MY_HASH_ADD(m1, m2, (uint) (wc >> 8) & 0xFF);
MY_HASH_ADD(m1, m2, (uint) (wc & 0xFF));
s+= res;
}
*nr1= m1;
*nr2= m2;
}
|
O3
|
c
|
my_hash_sort_utf32_nopad:
movq (%rcx), %r10
movq (%r8), %rax
cmpq $0x4, %rdx
jl 0xc8439
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
addq %rsi, %rdx
movq 0x78(%rdi), %rdi
movl $0xff, %r9d
movzbl (%rsi), %ebx
shll $0x18, %ebx
movzbl 0x1(%rsi), %r11d
shll $0x10, %r11d
orl %ebx, %r11d
cmpl $0x10ffff, %r11d # imm = 0x10FFFF
ja 0xc8433
movzbl 0x2(%rsi), %r14d
shll $0x8, %r14d
movzbl 0x3(%rsi), %ebx
orq %rbx, %r14
orq %r11, %r14
movl $0xfffd, %r11d # imm = 0xFFFD
cmpq (%rdi), %r14
ja 0xc8389
movq 0x8(%rdi), %r11
movl %r14d, %r15d
shrl $0x8, %r15d
movq (%r11,%r15,8), %r15
movq %r14, %r11
testq %r15, %r15
je 0xc8389
leaq (%rbx,%rbx,2), %r11
movl 0x8(%r15,%r11,4), %r11d
movl %r10d, %ebx
andl $0x3f, %ebx
addq %rax, %rbx
movl %r11d, %r14d
shrl $0x18, %r14d
imulq %rbx, %r14
movq %r10, %rbx
shlq $0x8, %rbx
addq %r14, %rbx
xorq %r10, %rbx
movl %ebx, %r10d
andl $0x3f, %r10d
addq %rax, %r10
addq $0x3, %r10
movl %r11d, %r14d
shrl $0x10, %r14d
andl %r9d, %r14d
imulq %r10, %r14
movq %rbx, %r10
shlq $0x8, %r10
addq %r14, %r10
xorq %rbx, %r10
movl %r10d, %ebx
andl $0x3f, %ebx
addq %rax, %rbx
addq $0x6, %rbx
movl %r11d, %r14d
shrl $0x8, %r14d
andl %r9d, %r14d
imulq %rbx, %r14
movq %r10, %rbx
shlq $0x8, %rbx
addq %r14, %rbx
xorq %r10, %rbx
movl %ebx, %r10d
andl $0x3f, %r10d
addq %rax, %r10
addq $0x9, %r10
movzbl %r11b, %r11d
imulq %r10, %r11
movq %rbx, %r10
shlq $0x8, %r10
addq %r11, %r10
xorq %rbx, %r10
addq $0xc, %rax
leaq 0x8(%rsi), %r11
addq $0x4, %rsi
cmpq %rdx, %r11
jbe 0xc832c
popq %rbx
popq %r14
popq %r15
popq %rbp
movq %r10, (%rcx)
movq %rax, (%r8)
retq
|
my_hash_sort_utf32_nopad:
mov r10, [rcx]
mov rax, [r8]
cmp rdx, 4
jl loc_C8439
push rbp
mov rbp, rsp
push r15
push r14
push rbx
add rdx, rsi
mov rdi, [rdi+78h]
mov r9d, 0FFh
loc_C832C:
movzx ebx, byte ptr [rsi]
shl ebx, 18h
movzx r11d, byte ptr [rsi+1]
shl r11d, 10h
or r11d, ebx
cmp r11d, offset unk_10FFFF
ja loc_C8433
movzx r14d, byte ptr [rsi+2]
shl r14d, 8
movzx ebx, byte ptr [rsi+3]
or r14, rbx
or r14, r11
mov r11d, 0FFFDh
cmp r14, [rdi]
ja short loc_C8389
mov r11, [rdi+8]
mov r15d, r14d
shr r15d, 8
mov r15, [r11+r15*8]
mov r11, r14
test r15, r15
jz short loc_C8389
lea r11, [rbx+rbx*2]
mov r11d, [r15+r11*4+8]
loc_C8389:
mov ebx, r10d
and ebx, 3Fh
add rbx, rax
mov r14d, r11d
shr r14d, 18h
imul r14, rbx
mov rbx, r10
shl rbx, 8
add rbx, r14
xor rbx, r10
mov r10d, ebx
and r10d, 3Fh
add r10, rax
add r10, 3
mov r14d, r11d
shr r14d, 10h
and r14d, r9d
imul r14, r10
mov r10, rbx
shl r10, 8
add r10, r14
xor r10, rbx
mov ebx, r10d
and ebx, 3Fh
add rbx, rax
add rbx, 6
mov r14d, r11d
shr r14d, 8
and r14d, r9d
imul r14, rbx
mov rbx, r10
shl rbx, 8
add rbx, r14
xor rbx, r10
mov r10d, ebx
and r10d, 3Fh
add r10, rax
add r10, 9
movzx r11d, r11b
imul r11, r10
mov r10, rbx
shl r10, 8
add r10, r11
xor r10, rbx
add rax, 0Ch
lea r11, [rsi+8]
add rsi, 4
cmp r11, rdx
jbe loc_C832C
loc_C8433:
pop rbx
pop r14
pop r15
pop rbp
loc_C8439:
mov [rcx], r10
mov [r8], rax
retn
|
long long my_hash_sort_utf32_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long v5; // r10
long long result; // rax
unsigned __int8 *v7; // rdx
unsigned long long *v8; // rdi
long long v9; // r11
long long v10; // rbx
unsigned long long v11; // r14
unsigned int v12; // r11d
long long v13; // r15
long long v14; // r10
long long v15; // r14
unsigned __int8 *v16; // r11
v5 = *a4;
result = *a5;
if ( a3 >= 4 )
{
v7 = &a2[a3];
v8 = *(unsigned long long **)(a1 + 120);
do
{
v9 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v9 > (unsigned int)&unk_10FFFF )
break;
v10 = a2[3];
v11 = v9 | v10 | (a2[2] << 8);
v12 = 65533;
if ( v11 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v11 >> 8));
v12 = v11;
if ( v13 )
v12 = *(_DWORD *)(v13 + 12 * v10 + 8);
}
v14 = v5 ^ ((result + (v5 & 0x3F)) * HIBYTE(v12) + (v5 << 8)) ^ ((result
+ (((unsigned __int8)v5 ^ (unsigned __int8)((result + (v5 & 0x3F)) * HIBYTE(v12))) & 0x3F)
+ 3)
* BYTE2(v12)
+ ((v5 ^ ((result + (v5 & 0x3F)) * HIBYTE(v12)
+ (v5 << 8))) << 8));
v15 = (result + (v14 & 0x3F) + 6) * BYTE1(v12);
v5 = v14 ^ (v15 + (v14 << 8)) ^ ((result + (((unsigned __int8)v14 ^ (unsigned __int8)v15) & 0x3F) + 9)
* (unsigned __int8)v12
+ ((v14 ^ (v15 + (v14 << 8))) << 8));
result += 12LL;
v16 = a2 + 8;
a2 += 4;
}
while ( v16 <= v7 );
}
*a4 = v5;
*a5 = result;
return result;
}
|
my_hash_sort_utf32_nopad:
MOV R10,qword ptr [RCX]
MOV RAX,qword ptr [R8]
CMP RDX,0x4
JL 0x001c8439
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
ADD RDX,RSI
MOV RDI,qword ptr [RDI + 0x78]
MOV R9D,0xff
LAB_001c832c:
MOVZX EBX,byte ptr [RSI]
SHL EBX,0x18
MOVZX R11D,byte ptr [RSI + 0x1]
SHL R11D,0x10
OR R11D,EBX
CMP R11D,0x10ffff
JA 0x001c8433
MOVZX R14D,byte ptr [RSI + 0x2]
SHL R14D,0x8
MOVZX EBX,byte ptr [RSI + 0x3]
OR R14,RBX
OR R14,R11
MOV R11D,0xfffd
CMP R14,qword ptr [RDI]
JA 0x001c8389
MOV R11,qword ptr [RDI + 0x8]
MOV R15D,R14D
SHR R15D,0x8
MOV R15,qword ptr [R11 + R15*0x8]
MOV R11,R14
TEST R15,R15
JZ 0x001c8389
LEA R11,[RBX + RBX*0x2]
MOV R11D,dword ptr [R15 + R11*0x4 + 0x8]
LAB_001c8389:
MOV EBX,R10D
AND EBX,0x3f
ADD RBX,RAX
MOV R14D,R11D
SHR R14D,0x18
IMUL R14,RBX
MOV RBX,R10
SHL RBX,0x8
ADD RBX,R14
XOR RBX,R10
MOV R10D,EBX
AND R10D,0x3f
ADD R10,RAX
ADD R10,0x3
MOV R14D,R11D
SHR R14D,0x10
AND R14D,R9D
IMUL R14,R10
MOV R10,RBX
SHL R10,0x8
ADD R10,R14
XOR R10,RBX
MOV EBX,R10D
AND EBX,0x3f
ADD RBX,RAX
ADD RBX,0x6
MOV R14D,R11D
SHR R14D,0x8
AND R14D,R9D
IMUL R14,RBX
MOV RBX,R10
SHL RBX,0x8
ADD RBX,R14
XOR RBX,R10
MOV R10D,EBX
AND R10D,0x3f
ADD R10,RAX
ADD R10,0x9
MOVZX R11D,R11B
IMUL R11,R10
MOV R10,RBX
SHL R10,0x8
ADD R10,R11
XOR R10,RBX
ADD RAX,0xc
LEA R11,[RSI + 0x8]
ADD RSI,0x4
CMP R11,RDX
JBE 0x001c832c
LAB_001c8433:
POP RBX
POP R14
POP R15
POP RBP
LAB_001c8439:
MOV qword ptr [RCX],R10
MOV qword ptr [R8],RAX
RET
|
void my_hash_sort_utf32_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
long lVar3;
byte *pbVar4;
ulong uVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
uVar5 = *param_4;
lVar3 = *param_5;
if (3 < param_3) {
pbVar4 = param_2 + param_3;
do {
uVar6 = (uint)param_2[1] << 0x10 | (uint)*param_2 << 0x18;
if (0x10ffff < uVar6) break;
uVar8 = (ulong)CONCAT11(param_2[2],param_2[3]) | (ulong)uVar6;
uVar7 = 0xfffd;
if ((uVar8 <= **(ulong **)(param_1 + 0x78)) &&
(lVar2 = *(long *)((*(ulong **)(param_1 + 0x78))[1] + (uVar8 >> 8) * 8), uVar7 = uVar8,
lVar2 != 0)) {
uVar7 = (ulong)*(uint *)(lVar2 + 8 + (ulong)param_2[3] * 0xc);
}
uVar5 = uVar5 * 0x100 + (uVar7 >> 0x18) * ((ulong)((uint)uVar5 & 0x3f) + lVar3) ^ uVar5;
uVar5 = uVar5 * 0x100 +
(ulong)((uint)(uVar7 >> 0x10) & 0xff) * ((ulong)((uint)uVar5 & 0x3f) + lVar3 + 3) ^
uVar5;
uVar5 = uVar5 * 0x100 +
(ulong)((uint)(uVar7 >> 8) & 0xff) * ((ulong)((uint)uVar5 & 0x3f) + lVar3 + 6) ^ uVar5
;
uVar5 = uVar5 * 0x100 + (uVar7 & 0xff) * ((ulong)((uint)uVar5 & 0x3f) + lVar3 + 9) ^ uVar5;
lVar3 = lVar3 + 0xc;
pbVar1 = param_2 + 8;
param_2 = param_2 + 4;
} while (pbVar1 <= pbVar4);
}
*param_4 = uVar5;
*param_5 = lVar3;
return;
}
|
|
19,579
|
ConfigGamepadAxis::set_inverted(bool)
|
untodesu[P]voxelius/game/client/gamepad_axis.cc
|
void ConfigGamepadAxis::set_inverted(bool inverted)
{
m_inverted = inverted;
m_full_string = fmt::format("{}:{}", m_name, m_inverted ? 1U : 0U);
}
|
O1
|
cpp
|
ConfigGamepadAxis::set_inverted(bool):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movb %sil, 0x8(%rdi)
movq 0x30(%rdi), %rax
leaq 0x20(%rsp), %r8
movq %rax, (%r8)
movl %esi, %eax
movq %rax, 0x10(%r8)
leaq 0x14c727(%rip), %rsi # 0x19a276
movq %rsp, %r14
movl $0x5, %edx
movl $0x2c, %ecx
movq %r14, %rdi
callq 0x147c0b
addq $0x10, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26ac0
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4db8d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x268d0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN17ConfigGamepadAxis12set_invertedEb:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
mov [rdi+8], sil
mov rax, [rdi+30h]
lea r8, [rsp+58h+var_38]
mov [r8], rax
mov eax, esi
mov [r8+10h], rax
lea rsi, asc_19A276; "{}:{}"
mov r14, rsp
mov edx, 5
mov ecx, 2Ch ; ','
mov rdi, r14
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>)
add rbx, 10h
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_4DB8D
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4DB8D:
add rsp, 48h
pop rbx
pop r14
retn
|
void ConfigGamepadAxis::set_inverted(
ConfigGamepadAxis *this,
unsigned int a2,
double a3,
long long a4,
long long a5,
long long a6,
int a7)
{
void *v7[2]; // [rsp+0h] [rbp-58h] BYREF
long long v8; // [rsp+10h] [rbp-48h] BYREF
_QWORD v9[7]; // [rsp+20h] [rbp-38h] BYREF
*((_BYTE *)this + 8) = a2;
v9[0] = *((_QWORD *)this + 6);
v9[2] = a2;
fmt::v11::vformat[abi:cxx11]((unsigned int)v7, (unsigned int)"{}:{}", 5, 44, (unsigned int)v9, a7);
std::string::operator=((char *)this + 16, v7, a3);
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
}
|
set_inverted:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV byte ptr [RDI + 0x8],SIL
MOV RAX,qword ptr [RDI + 0x30]
LEA R8,[RSP + 0x20]
MOV qword ptr [R8],RAX
MOV EAX,ESI
MOV qword ptr [R8 + 0x10],RAX
LEA RSI,[0x29a276]
MOV R14,RSP
MOV EDX,0x5
MOV ECX,0x2c
MOV RDI,R14
CALL 0x00247c0b
ADD RBX,0x10
MOV RDI,RBX
MOV RSI,R14
CALL 0x00126ac0
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0014db8d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001268d0
LAB_0014db8d:
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* ConfigGamepadAxis::set_inverted(bool) */
void __thiscall ConfigGamepadAxis::set_inverted(ConfigGamepadAxis *this,bool param_1)
{
int7 in_register_00000031;
long *local_58 [2];
long local_48 [2];
int8 local_38;
ulong local_28;
this[8] = (ConfigGamepadAxis)param_1;
local_38 = *(int8 *)(this + 0x30);
local_28 = CONCAT71(in_register_00000031,param_1) & 0xffffffff;
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;
}
|
|
19,580
|
stbi__pnm_info(stbi__context*, int*, int*, int*)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
{
int maxv, dummy;
char c, p, t;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
stbi__rewind(s);
// Get identifier
p = (char) stbi__get8(s);
t = (char) stbi__get8(s);
if (p != 'P' || (t != '5' && t != '6')) {
stbi__rewind(s);
return 0;
}
*comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm
c = (char) stbi__get8(s);
stbi__pnm_skip_whitespace(s, &c);
*x = stbi__pnm_getinteger(s, &c); // read width
if(*x == 0)
return stbi__err("invalid width", "PPM image header had zero or overflowing width");
stbi__pnm_skip_whitespace(s, &c);
*y = stbi__pnm_getinteger(s, &c); // read height
if (*y == 0)
return stbi__err("invalid width", "PPM image header had zero or overflowing width");
stbi__pnm_skip_whitespace(s, &c);
maxv = stbi__pnm_getinteger(s, &c); // read max value
if (maxv > 65535)
return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images");
else if (maxv > 255)
return 16;
else
return 8;
}
|
O2
|
c
|
stbi__pnm_info(stbi__context*, int*, int*, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movups 0xd0(%rdi), %xmm0
movups %xmm0, 0xc0(%rdi)
callq 0x3cc3c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x3cc3c
cmpb $0x50, %bpl
sete %cl
leal -0x37(%rax), %edx
cmpb $-0x2, %dl
setae %dl
testb %dl, %cl
jne 0x417f8
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
jmp 0x418ba
testq %r12, %r12
je 0x4180f
xorl %ecx, %ecx
cmpb $0x36, %al
sete %cl
leal 0x1(,%rcx,2), %eax
movl %eax, (%r12)
movq %rbx, %rdi
callq 0x3cc3c
leaq 0xf(%rsp), %r12
movb %al, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4198e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x41a06
testq %r15, %r15
je 0x4183e
movl %eax, (%r15)
testl %eax, %eax
je 0x418a0
leaq 0xf(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4198e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x41a06
testq %r14, %r14
je 0x41865
movl %eax, (%r14)
testl %eax, %eax
je 0x418a0
leaq 0xf(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4198e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41a06
cmpl $0x10000, %eax # imm = 0x10000
jl 0x418c9
movq %fs:0x0, %rax
leaq 0x85f43(%rip), %rcx # 0xc77e1
jmp 0x418b3
movq %fs:0x0, %rax
leaq 0x85f20(%rip), %rcx # 0xc77d3
movq %rcx, -0x20(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
cmpl $0x100, %eax # imm = 0x100
setge %cl
leal 0x8(,%rcx,8), %eax
jmp 0x418bc
|
_ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12, rcx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
movups xmm0, xmmword ptr [rdi+0D0h]
movups xmmword ptr [rdi+0C0h], xmm0
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
mov ebp, eax
mov rdi, rbx
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp bpl, 50h ; 'P'
setz cl
lea edx, [rax-37h]
cmp dl, 0FEh
setnb dl
test cl, dl
jnz short loc_417F8
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
jmp loc_418BA
loc_417F8:
test r12, r12
jz short loc_4180F
xor ecx, ecx
cmp al, 36h ; '6'
setz cl
lea eax, ds:1[rcx*2]
mov [r12], eax
loc_4180F:
mov rdi, rbx
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
lea r12, [rsp+38h+var_29]
mov [r12], al
mov rdi, rbx
mov rsi, r12
call _ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc; stbi__pnm_skip_whitespace(stbi__context *,char *)
mov rdi, rbx
mov rsi, r12
call _ZL20stbi__pnm_getintegerP13stbi__contextPc; stbi__pnm_getinteger(stbi__context *,char *)
test r15, r15
jz short loc_4183E
mov [r15], eax
loc_4183E:
test eax, eax
jz short loc_418A0
lea r15, [rsp+38h+var_29]
mov rdi, rbx
mov rsi, r15
call _ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc; stbi__pnm_skip_whitespace(stbi__context *,char *)
mov rdi, rbx
mov rsi, r15
call _ZL20stbi__pnm_getintegerP13stbi__contextPc; stbi__pnm_getinteger(stbi__context *,char *)
test r14, r14
jz short loc_41865
mov [r14], eax
loc_41865:
test eax, eax
jz short loc_418A0
lea r14, [rsp+38h+var_29]
mov rdi, rbx
mov rsi, r14
call _ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc; stbi__pnm_skip_whitespace(stbi__context *,char *)
mov rdi, rbx
mov rsi, r14
call _ZL20stbi__pnm_getintegerP13stbi__contextPc; stbi__pnm_getinteger(stbi__context *,char *)
cmp eax, 10000h
jl short loc_418C9
mov rax, fs:0
lea rcx, aMaxValue65535; "max value > 65535"
jmp short loc_418B3
loc_418A0:
mov rax, fs:0
lea rcx, aInvalidWidth; "invalid width"
loc_418B3:
mov [rax-20h], rcx
loc_418BA:
xor eax, eax
loc_418BC:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_418C9:
xor ecx, ecx
cmp eax, 100h
setnl cl
lea eax, ds:8[rcx*8]
jmp short loc_418BC
|
long long stbi__pnm_info(long long a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
char v6; // bp
char v7; // al
int v8; // eax
int v9; // eax
int v10; // eax
unsigned long long v11; // rax
const char *v12; // rcx
_BYTE v14[41]; // [rsp+Fh] [rbp-29h] BYREF
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
v6 = stbi__get8(a1);
v7 = stbi__get8(a1);
if ( (unsigned __int8)(v7 - 55) < 0xFEu || v6 != 80 )
{
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return 0LL;
}
if ( a4 )
*a4 = 2 * (v7 == 54) + 1;
v14[0] = stbi__get8(a1);
stbi__pnm_skip_whitespace(a1, v14);
v8 = stbi__pnm_getinteger(a1, v14);
if ( a2 )
*a2 = v8;
if ( !v8 )
goto LABEL_13;
stbi__pnm_skip_whitespace(a1, v14);
v9 = stbi__pnm_getinteger(a1, v14);
if ( a3 )
*a3 = v9;
if ( !v9 )
{
LABEL_13:
v11 = __readfsqword(0);
v12 = "invalid width";
goto LABEL_14;
}
stbi__pnm_skip_whitespace(a1, v14);
v10 = stbi__pnm_getinteger(a1, v14);
if ( v10 >= 0x10000 )
{
v11 = __readfsqword(0);
v12 = "max value > 65535";
LABEL_14:
*(_QWORD *)(v11 - 32) = v12;
return 0LL;
}
return 8 * (unsigned int)(v10 >= 256) + 8;
}
|
stbi__pnm_info:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,RCX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RDI + 0xd0]
MOVUPS xmmword ptr [RDI + 0xc0],XMM0
CALL 0x0013cc3c
MOV EBP,EAX
MOV RDI,RBX
CALL 0x0013cc3c
CMP BPL,0x50
SETZ CL
LEA EDX,[RAX + -0x37]
CMP DL,0xfe
SETNC DL
TEST CL,DL
JNZ 0x001417f8
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
JMP 0x001418ba
LAB_001417f8:
TEST R12,R12
JZ 0x0014180f
XOR ECX,ECX
CMP AL,0x36
SETZ CL
LEA EAX,[0x1 + RCX*0x2]
MOV dword ptr [R12],EAX
LAB_0014180f:
MOV RDI,RBX
CALL 0x0013cc3c
LEA R12,[RSP + 0xf]
MOV byte ptr [R12],AL
MOV RDI,RBX
MOV RSI,R12
CALL 0x0014198e
MOV RDI,RBX
MOV RSI,R12
CALL 0x00141a06
TEST R15,R15
JZ 0x0014183e
MOV dword ptr [R15],EAX
LAB_0014183e:
TEST EAX,EAX
JZ 0x001418a0
LEA R15,[RSP + 0xf]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0014198e
MOV RDI,RBX
MOV RSI,R15
CALL 0x00141a06
TEST R14,R14
JZ 0x00141865
MOV dword ptr [R14],EAX
LAB_00141865:
TEST EAX,EAX
JZ 0x001418a0
LEA R14,[RSP + 0xf]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014198e
MOV RDI,RBX
MOV RSI,R14
CALL 0x00141a06
CMP EAX,0x10000
JL 0x001418c9
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x1c77e1]
JMP 0x001418b3
LAB_001418a0:
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x1c77d3]
LAB_001418b3:
MOV qword ptr [RAX + -0x20],RCX
LAB_001418ba:
XOR EAX,EAX
LAB_001418bc:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001418c9:
XOR ECX,ECX
CMP EAX,0x100
SETGE CL
LEA EAX,[0x8 + RCX*0x8]
JMP 0x001418bc
|
/* stbi__pnm_info(stbi__context*, int*, int*, int*) */
char stbi__pnm_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
char cVar1;
char cVar2;
int iVar3;
long lVar4;
char *pcVar5;
long *in_FS_OFFSET;
char local_29;
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
cVar1 = stbi__get8(param_1);
cVar2 = stbi__get8(param_1);
if (cVar1 != 'P' || (byte)(cVar2 - 0x37U) < 0xfe) {
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
return '\0';
}
if (param_4 != (int *)0x0) {
*param_4 = (uint)(cVar2 == '6') * 2 + 1;
}
local_29 = stbi__get8(param_1);
stbi__pnm_skip_whitespace(param_1,&local_29);
iVar3 = stbi__pnm_getinteger(param_1,&local_29);
if (param_2 != (int *)0x0) {
*param_2 = iVar3;
}
if (iVar3 != 0) {
stbi__pnm_skip_whitespace(param_1,&local_29);
iVar3 = stbi__pnm_getinteger(param_1,&local_29);
if (param_3 != (int *)0x0) {
*param_3 = iVar3;
}
if (iVar3 != 0) {
stbi__pnm_skip_whitespace(param_1,&local_29);
iVar3 = stbi__pnm_getinteger(param_1,&local_29);
if (iVar3 < 0x10000) {
return (0xff < iVar3) * '\b' + '\b';
}
lVar4 = *in_FS_OFFSET;
pcVar5 = "max value > 65535";
goto LAB_001418b3;
}
}
lVar4 = *in_FS_OFFSET;
pcVar5 = "invalid width";
LAB_001418b3:
*(char **)(lVar4 + -0x20) = pcVar5;
return '\0';
}
|
|
19,581
|
LefDefParser::lefwLayerRoutingDiagPitchXYDistance(double, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwLayerRoutingDiagPitchXYDistance(double xDistance,
double yDistance)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTING_START &&
lefwState != LEFW_LAYERROUTING)
return LEFW_BAD_ORDER;
if (!lefwIsRouting)
return LEFW_BAD_DATA; // only routing calls this func
if (prtSemiColon) {
// the previous statement hasn't written the ; yet
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) ";\n");
else
fprintf(lefwFile, ";\n");
prtSemiColon = 0;
}
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " DIAGPITCH %.11g %.11g ;\n",
xDistance, yDistance);
else
fprintf(lefwFile, " DIAGPITCH %.11g %.11g ;\n", xDistance, yDistance);
lefwLines++;
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwLayerRoutingDiagPitchXYDistance(double, double):
pushq %rbx
subq $0x10, %rsp
leaq 0x7a82c(%rip), %rbx # 0x8d0f0
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x12924
leaq 0x7aa6d(%rip), %rax # 0x8d340
movl (%rax), %edx
cmpl $0x1f, %edx
je 0x128e8
movl $0x2, %eax
cmpl $0x7, %edx
jne 0x1298f
leaq 0x7aac5(%rip), %rax # 0x8d3b4
cmpl $0x0, (%rax)
je 0x1292b
cmpb $0x1, 0x7aae9(%rip) # 0x8d3e4
jne 0x1295a
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
cmpb $0x1, 0x7aacd(%rip) # 0x8d3dc
jne 0x12932
leaq 0x47ee9(%rip), %rsi # 0x5a801
movq %rcx, %rdi
xorl %eax, %eax
callq 0x55afd
jmp 0x12948
movl $0x1, %eax
jmp 0x1298f
movl $0x3, %eax
jmp 0x1298f
leaq 0x47ec8(%rip), %rdi # 0x5a801
movl $0x2, %esi
movl $0x1, %edx
callq 0x23d0
movb $0x0, 0x7aa95(%rip) # 0x8d3e4
movsd 0x8(%rsp), %xmm1
movsd (%rsp), %xmm0
movq (%rbx), %rdi
cmpb $0x1, 0x7aa78(%rip) # 0x8d3dc
jne 0x12976
leaq 0x482d6(%rip), %rsi # 0x5ac43
movb $0x2, %al
callq 0x55afd
jmp 0x12984
leaq 0x482c6(%rip), %rsi # 0x5ac43
movb $0x2, %al
callq 0x22e0
leaq 0x7a9b1(%rip), %rax # 0x8d33c
incl (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
|
_ZN12LefDefParser35lefwLayerRoutingDiagPitchXYDistanceEdd:
push rbx
sub rsp, 10h
lea rbx, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [rbx]
test rcx, rcx
jz short loc_12924
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov edx, [rax]
cmp edx, 1Fh
jz short loc_128E8
mov eax, 2
cmp edx, 7
jnz loc_1298F
loc_128E8:
lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting
cmp dword ptr [rax], 0
jz short loc_1292B
cmp cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon
jnz short loc_1295A
movsd [rsp+18h+var_18], xmm0
movsd [rsp+18h+var_10], xmm1
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_12932
lea rsi, aDividercharS+11h; ";\n"
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_12948
loc_12924:
mov eax, 1
jmp short loc_1298F
loc_1292B:
mov eax, 3
jmp short loc_1298F
loc_12932:
lea rdi, aDividercharS+11h; ";\n"
mov esi, 2
mov edx, 1
call _fwrite
loc_12948:
mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon
movsd xmm1, [rsp+18h+var_10]
movsd xmm0, [rsp+18h+var_18]
loc_1295A:
mov rdi, [rbx]
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_12976
lea rsi, aDiagpitch11g11; " DIAGPITCH %.11g %.11g ;\n"
mov al, 2
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_12984
loc_12976:
lea rsi, aDiagpitch11g11; " DIAGPITCH %.11g %.11g ;\n"
mov al, 2
call _fprintf
loc_12984:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
loc_1298F:
add rsp, 10h
pop rbx
retn
|
long long LefDefParser::lefwLayerRoutingDiagPitchXYDistance(
LefDefParser *this,
double a2,
double a3,
long long a4,
long long a5,
long long a6,
int a7,
int a8)
{
int v8; // ecx
unsigned int v9; // edx
long long result; // rax
v8 = LefDefParser::lefwFile;
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
v9 = LefDefParser::lefwState;
if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) )
{
if ( LefDefParser::lefwIsRouting )
{
if ( LefDefParser::prtSemiColon == 1 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)";\n",
LefDefParser::lefwState,
LefDefParser::lefwFile,
a7,
a8);
else
fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
LefDefParser::prtSemiColon = 0;
}
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" DIAGPITCH %.11g %.11g ;\n", v9, v8, a7, a8);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " DIAGPITCH %.11g %.11g ;\n", a2, a3);
++LefDefParser::lefwLines;
return 0LL;
}
else
{
return 3LL;
}
}
return result;
}
|
lefwLayerRoutingDiagPitchXYDistance:
PUSH RBX
SUB RSP,0x10
LEA RBX,[0x18d0f0]
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x00112924
LEA RAX,[0x18d340]
MOV EDX,dword ptr [RAX]
CMP EDX,0x1f
JZ 0x001128e8
MOV EAX,0x2
CMP EDX,0x7
JNZ 0x0011298f
LAB_001128e8:
LEA RAX,[0x18d3b4]
CMP dword ptr [RAX],0x0
JZ 0x0011292b
CMP byte ptr [0x0018d3e4],0x1
JNZ 0x0011295a
MOVSD qword ptr [RSP],XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x00112932
LEA RSI,[0x15a801]
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00155afd
JMP 0x00112948
LAB_00112924:
MOV EAX,0x1
JMP 0x0011298f
LAB_0011292b:
MOV EAX,0x3
JMP 0x0011298f
LAB_00112932:
LEA RDI,[0x15a801]
MOV ESI,0x2
MOV EDX,0x1
CALL 0x001023d0
LAB_00112948:
MOV byte ptr [0x0018d3e4],0x0
MOVSD XMM1,qword ptr [RSP + 0x8]
MOVSD XMM0,qword ptr [RSP]
LAB_0011295a:
MOV RDI,qword ptr [RBX]
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x00112976
LEA RSI,[0x15ac43]
MOV AL,0x2
CALL 0x00155afd
JMP 0x00112984
LAB_00112976:
LEA RSI,[0x15ac43]
MOV AL,0x2
CALL 0x001022e0
LAB_00112984:
LEA RAX,[0x18d33c]
INC dword ptr [RAX]
XOR EAX,EAX
LAB_0011298f:
ADD RSP,0x10
POP RBX
RET
|
/* LefDefParser::lefwLayerRoutingDiagPitchXYDistance(double, double) */
int8 LefDefParser::lefwLayerRoutingDiagPitchXYDistance(double param_1,double param_2)
{
int8 uVar1;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else if ((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) {
if (lefwIsRouting == 0) {
uVar1 = 3;
}
else {
if (prtSemiColon == '\x01') {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile,";\n");
}
else {
fwrite(";\n",2,1,lefwFile);
}
prtSemiColon = '\0';
}
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile," DIAGPITCH %.11g %.11g ;\n");
}
else {
fprintf(lefwFile," DIAGPITCH %.11g %.11g ;\n",param_1,param_2);
}
lefwLines = lefwLines + 1;
uVar1 = 0;
}
}
return uVar1;
}
|
|
19,582
|
js_get_function_name
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_get_function_name(JSContext *ctx, JSAtom name)
{
JSValue name_str;
name_str = JS_AtomToString(ctx, name);
if (JS_AtomSymbolHasDescription(ctx, name)) {
name_str = JS_ConcatString3(ctx, "[", name_str, "]");
}
return name_str;
}
|
O1
|
c
|
js_get_function_name:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x1, %edx
callq 0x2075a
movq %rdx, %rcx
testl %ebp, %ebp
js 0x41ef8
movq 0x18(%rbx), %rdx
movq 0x68(%rdx), %rdx
movl %ebp, %esi
movq (%rdx,%rsi,8), %rdx
movq 0x4(%rdx), %r8
movq %r8, %rsi
shrq $0x3e, %rsi
cmpq $0x3, %rsi
setb %dl
movabsq $0x3fffffff00000000, %rdi # imm = 0x3FFFFFFF00000000
testq %rdi, %r8
setne %dil
cmpq $0x2, %rsi
setne %sil
negl %r8d
jo 0x41ef8
orb %dil, %dl
andb %dl, %sil
jne 0x41ef8
leaq 0x5d644(%rip), %rsi # 0x9f527
leaq 0x5cece(%rip), %r8 # 0x9edb8
movq %rbx, %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x41f02
movq %rcx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
js_get_function_name:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov edx, 1
call __JS_AtomToValue
mov rcx, rdx
test ebp, ebp
js short loc_41EF8
mov rdx, [rbx+18h]
mov rdx, [rdx+68h]
mov esi, ebp
mov rdx, [rdx+rsi*8]
mov r8, [rdx+4]
mov rsi, r8
shr rsi, 3Eh
cmp rsi, 3
setb dl
mov rdi, 3FFFFFFF00000000h
test r8, rdi
setnz dil
cmp rsi, 2
setnz sil
neg r8d
jo short loc_41EF8
or dl, dil
and sil, dl
jnz short loc_41EF8
lea rsi, asc_9F527; "["
lea r8, aUninitialized+0Eh; "]"
mov rdi, rbx
mov rdx, rax
add rsp, 8
pop rbx
pop rbp
jmp short JS_ConcatString3
loc_41EF8:
mov rdx, rcx
add rsp, 8
pop rbx
pop rbp
retn
|
long long js_get_function_name(long long a1, int a2)
{
long long result; // rax
long long v3; // rdx
unsigned long long v4; // r8
result = _JS_AtomToValue(a1, a2, 1);
if ( a2 >= 0 )
{
v4 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a2) + 4LL);
if ( !__OFSUB__(-(int)v4, 1) && ((v4 & 0x3FFFFFFF00000000LL) == 0 && v4 >> 62 == 3 || v4 >> 62 == 2) )
return JS_ConcatString3(a1, "[", result, v3, "]");
}
return result;
}
|
js_get_function_name:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
MOV EDX,0x1
CALL 0x0012075a
MOV RCX,RDX
TEST EBP,EBP
JS 0x00141ef8
MOV RDX,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RDX + 0x68]
MOV ESI,EBP
MOV RDX,qword ptr [RDX + RSI*0x8]
MOV R8,qword ptr [RDX + 0x4]
MOV RSI,R8
SHR RSI,0x3e
CMP RSI,0x3
SETC DL
MOV RDI,0x3fffffff00000000
TEST R8,RDI
SETNZ DIL
CMP RSI,0x2
SETNZ SIL
NEG R8D
JO 0x00141ef8
OR DL,DIL
AND SIL,DL
JNZ 0x00141ef8
LEA RSI,[0x19f527]
LEA R8,[0x19edb8]
MOV RDI,RBX
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00141f02
LAB_00141ef8:
MOV RDX,RCX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void js_get_function_name(long param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
int1 auVar3 [16];
auVar3 = __JS_AtomToValue(param_1,param_2,1);
if ((-1 < (int)param_2) &&
(uVar1 = *(ulong *)(*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) +
(param_2 & 0xffffffff) * 8) + 4), uVar2 = uVar1 >> 0x3e,
uVar2 == 2 || 2 < uVar2 && (uVar1 & 0x3fffffff00000000) == 0)) {
JS_ConcatString3(param_1,&DAT_0019f527,auVar3._0_8_,auVar3._8_8_,"]");
return;
}
return;
}
|
|
19,583
|
js_set_isSubsetOf
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_set_isSubsetOf(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, iter, keys, has, next, rv, rval;
BOOL done, found;
JSMapState *s;
int64_t size;
int ok;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
rval = JS_EXCEPTION;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
found = FALSE;
if (s->record_count > size)
goto fini;
iter = js_create_map_iterator(ctx, this_val, 0, NULL, MAGIC_SET);
if (JS_IsException(iter))
goto exception;
found = TRUE;
do {
item = js_map_iterator_next(ctx, iter, 0, NULL, &done, MAGIC_SET);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
rv = JS_Call(ctx, has, argv[0], 1, &item);
JS_FreeValue(ctx, item);
ok = JS_ToBoolFree(ctx, rv); // returns -1 if rv is JS_EXCEPTION
if (ok < 0)
goto exception;
found = (ok > 0);
} while (found);
fini:
rval = found ? JS_TRUE : JS_FALSE;
exception:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return rval;
}
|
O1
|
c
|
js_set_isSubsetOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r12
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
xorl %r15d, %r15d
movl %r15d, 0x30(%rsp)
movl $0x3, %ecx
movq %rcx, 0x38(%rsp)
movl %r15d, 0x40(%rsp)
movl $0x3, %eax
movq %rax, 0x20(%rsp)
movq %rcx, 0x48(%rsp)
movl $0x24, %ecx
callq 0x269a1
testq %rax, %rax
je 0x4fa02
movq %rax, %r14
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
callq 0x511d5
testl %eax, %eax
js 0x4f9ff
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
callq 0x512a9
testl %eax, %eax
js 0x4f9ff
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
callq 0x51343
testl %eax, %eax
js 0x4f9ff
movl 0x18(%r14), %eax
movl $0x1, %r14d
cmpq %rax, 0x70(%rsp)
jge 0x4fa59
xorl %r15d, %r15d
xorl %ebp, %ebp
jmp 0x4fa0a
xorl %r15d, %r15d
xorl %ebp, %ebp
movl $0x6, %r14d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
callq 0x1ccb2
movq %rbp, %rax
movq %r14, %rdx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r14d
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x1, %r9d
callq 0x4f395
movq %rax, %r15
movq %rdx, 0x20(%rsp)
cmpl $0x6, %edx
je 0x4fa02
movq 0x30(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
xorl %ebp, %ebp
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
leaq 0x2c(%rsp), %r9
callq 0x513dd
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
cmpl $0x6, %edx
je 0x4fa04
cmpl $0x0, 0x2c(%rsp)
jne 0x4fb5c
movq (%r12), %rcx
movq 0x8(%r12), %r8
movl $0x0, 0x78(%rsp)
movq $0x3, 0x80(%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %rbx, %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl $0x1, %r9d
callq 0x278b6
movq %rax, %r14
movq %rdx, %r13
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x220f9
testl %eax, %eax
js 0x4fa04
setne %al
movzbl %al, %r14d
jne 0x4fa96
xorl %ebp, %ebp
testl %r14d, %r14d
setne %bpl
movl $0x1, %r14d
jmp 0x4fa0a
|
js_set_isSubsetOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r12, r8
mov rbp, rdx
mov r13, rsi
mov rbx, rdi
xor r15d, r15d
mov dword ptr [rsp+0B8h+var_88], r15d
mov ecx, 3
mov [rsp+0B8h+var_80], rcx
mov dword ptr [rsp+0B8h+var_78], r15d
mov eax, 3
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_70], rcx
mov ecx, 24h ; '$'
call JS_GetOpaque2
test rax, rax
jz short loc_4FA02
mov r14, rax
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+0B8h+var_48]
mov rdi, rbx
call js_setlike_get_size
test eax, eax
js short loc_4F9FF
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+0B8h+var_88]
mov rdi, rbx
call js_setlike_get_has
test eax, eax
js short loc_4F9FF
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+0B8h+var_78]
mov rdi, rbx
call js_setlike_get_keys
test eax, eax
js short loc_4F9FF
mov eax, [r14+18h]
mov r14d, 1
cmp [rsp+0B8h+var_48], rax
jge short loc_4FA59
xor r15d, r15d
xor ebp, ebp
jmp short loc_4FA0A
loc_4F9FF:
xor r15d, r15d
loc_4FA02:
xor ebp, ebp
loc_4FA04:
mov r14d, 6
loc_4FA0A:
mov rsi, [rsp+0B8h+var_88]
mov rdx, [rsp+0B8h+var_80]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, [rsp+0B8h+var_78]
mov rdx, [rsp+0B8h+var_70]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, [rsp+0B8h+var_98]
call JS_FreeValueRT
mov rax, rbp
mov rdx, r14
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4FA59:
mov r14d, 1
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov r9d, 1
call js_create_map_iterator
mov r15, rax
mov [rsp+0B8h+var_98], rdx
cmp edx, 6
jz short loc_4FA02
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_50], rax
mov rax, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_58], rax
xor ebp, ebp
loc_4FA96:
mov dword ptr [rsp+0B8h+var_B8], 1
mov rdi, rbx
mov rsi, r15
mov rdx, [rsp+0B8h+var_98]
lea r9, [rsp+0B8h+var_8C]
call js_map_iterator_next
mov [rsp+0B8h+var_68], rax
mov [rsp+0B8h+var_60], rdx
cmp edx, 6
jz loc_4FA04
cmp [rsp+0B8h+var_8C], 0
jnz loc_4FB5C
mov rcx, [r12]
mov r8, [r12+8]
mov dword ptr [rsp+0B8h+var_40], 0
mov qword ptr [rsp+0B8h+var_40+8], 3
movups xmm0, [rsp+0B8h+var_40]
movups [rsp+0B8h+var_B8], xmm0
lea rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_A0], 2
mov rdi, rbx
mov rsi, [rsp+0B8h+var_50]
mov rdx, [rsp+0B8h+var_58]
mov r9d, 1
call JS_CallInternal
mov r14, rax
mov r13, rdx
mov rsi, [rsp+0B8h+var_68]
mov rdx, [rsp+0B8h+var_60]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_ToBoolFree
test eax, eax
js loc_4FA04
setnz al
movzx r14d, al
jnz loc_4FA96
loc_4FB5C:
xor ebp, ebp
test r14d, r14d
setnz bpl
mov r14d, 1
jmp loc_4FA0A
|
_BOOL8 js_set_isSubsetOf(
long long a1,
_DWORD *a2,
long long a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long *a13)
{
_DWORD *map_iterator; // r15
long long Opaque2; // rax
long long v17; // r14
long long v18; // rcx
long long v19; // r8
_BOOL8 v20; // rbp
BOOL v22; // r14d
int v23; // ecx
int v24; // r8d
long long v25; // rdx
__m128 v26; // xmm4
__m128 v27; // xmm5
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
unsigned long long v31; // r14
long long v32; // rdx
long long v33; // r13
int v34; // eax
long long v35; // [rsp+20h] [rbp-98h]
int v36; // [rsp+2Ch] [rbp-8Ch] BYREF
_DWORD *v37; // [rsp+30h] [rbp-88h] BYREF
long long v38; // [rsp+38h] [rbp-80h]
_DWORD *v39; // [rsp+40h] [rbp-78h] BYREF
long long v40; // [rsp+48h] [rbp-70h]
_DWORD *v41; // [rsp+50h] [rbp-68h] BYREF
long long v42; // [rsp+58h] [rbp-60h]
long long v43; // [rsp+60h] [rbp-58h]
_DWORD *v44; // [rsp+68h] [rbp-50h]
long long v45; // [rsp+70h] [rbp-48h] BYREF
__m128 v46; // [rsp+78h] [rbp-40h]
map_iterator = 0LL;
LODWORD(v37) = 0;
v38 = 3LL;
LODWORD(v39) = 0;
v35 = 3LL;
v40 = 3LL;
Opaque2 = JS_GetOpaque2(a1, (long long)a2, a3, 0x24u);
if ( !Opaque2 )
goto LABEL_8;
v17 = Opaque2;
if ( (int)js_setlike_get_size(a1, *a13, a13[1], &v45) < 0
|| (int)js_setlike_get_has(a1, *a13, a13[1], &v37) < 0
|| (int)js_setlike_get_keys(a1, *a13, a13[1], &v39) < 0 )
{
map_iterator = 0LL;
goto LABEL_8;
}
if ( v45 < *(unsigned int *)(v17 + 24) )
{
map_iterator = 0LL;
v20 = 0LL;
goto LABEL_9;
}
v22 = 1;
map_iterator = (_DWORD *)js_create_map_iterator(a1, a2, a3, v18, v19, 1);
v35 = v25;
if ( (_DWORD)v25 == 6 )
{
LABEL_8:
v20 = 0LL;
goto LABEL_9;
}
v44 = v37;
v43 = v38;
v20 = 0LL;
while ( 1 )
{
v41 = (_DWORD *)js_map_iterator_next(a1, (_DWORD)map_iterator, v35, v23, v24, (unsigned int)&v36, 1);
v42 = v28;
if ( (_DWORD)v28 == 6 )
break;
if ( !v36 )
{
v29 = *a13;
v30 = a13[1];
v46.m128_i32[0] = 0;
v46.m128_u64[1] = 3LL;
v31 = JS_CallInternal(
a1,
(long long)v44,
v43,
v29,
v30,
1LL,
v46,
a5,
a6,
a7,
v26,
v27,
a10,
a11,
0,
3,
(long long)&v41,
2u);
v33 = v32;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v41, v42);
v34 = JS_ToBoolFree(a1, v31, v33);
if ( v34 < 0 )
break;
v22 = v34 != 0;
if ( v34 )
continue;
}
v20 = v22;
break;
}
LABEL_9:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v37, v38);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v40);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), map_iterator, v35);
return v20;
}
|
js_set_isSubsetOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R12,R8
MOV RBP,RDX
MOV R13,RSI
MOV RBX,RDI
XOR R15D,R15D
MOV dword ptr [RSP + 0x30],R15D
MOV ECX,0x3
MOV qword ptr [RSP + 0x38],RCX
MOV dword ptr [RSP + 0x40],R15D
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x48],RCX
MOV ECX,0x24
CALL 0x001269a1
TEST RAX,RAX
JZ 0x0014fa02
MOV R14,RAX
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x70]
MOV RDI,RBX
CALL 0x001511d5
TEST EAX,EAX
JS 0x0014f9ff
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x001512a9
TEST EAX,EAX
JS 0x0014f9ff
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x00151343
TEST EAX,EAX
JS 0x0014f9ff
MOV EAX,dword ptr [R14 + 0x18]
MOV R14D,0x1
CMP qword ptr [RSP + 0x70],RAX
JGE 0x0014fa59
XOR R15D,R15D
XOR EBP,EBP
JMP 0x0014fa0a
LAB_0014f9ff:
XOR R15D,R15D
LAB_0014fa02:
XOR EBP,EBP
LAB_0014fa04:
MOV R14D,0x6
LAB_0014fa0a:
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011ccb2
MOV RAX,RBP
MOV RDX,R14
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014fa59:
MOV R14D,0x1
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV R9D,0x1
CALL 0x0014f395
MOV R15,RAX
MOV qword ptr [RSP + 0x20],RDX
CMP EDX,0x6
JZ 0x0014fa02
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
XOR EBP,EBP
LAB_0014fa96:
MOV dword ptr [RSP],0x1
MOV RDI,RBX
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x20]
LEA R9,[RSP + 0x2c]
CALL 0x001513dd
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
CMP EDX,0x6
JZ 0x0014fa04
CMP dword ptr [RSP + 0x2c],0x0
JNZ 0x0014fb5c
MOV RCX,qword ptr [R12]
MOV R8,qword ptr [R12 + 0x8]
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x78]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x60]
MOV R9D,0x1
CALL 0x001278b6
MOV R14,RAX
MOV R13,RDX
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x001220f9
TEST EAX,EAX
JS 0x0014fa04
SETNZ AL
MOVZX R14D,AL
JNZ 0x0014fa96
LAB_0014fb5c:
XOR EBP,EBP
TEST R14D,R14D
SETNZ BPL
MOV R14D,0x1
JMP 0x0014fa0a
|
bool js_set_isSubsetOf(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
bool bVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 local_98;
int local_8c;
int4 local_88;
int4 uStack_84;
int8 local_80;
int4 local_78;
int4 uStack_74;
int8 local_70;
int1 local_68 [16];
int8 local_58;
int8 local_50;
long local_48;
int4 local_40;
int8 uStack_38;
local_88 = 0;
local_80 = 3;
local_78 = 0;
auVar4 = ZEXT816(3) << 0x40;
local_70 = 3;
lVar2 = JS_GetOpaque2();
if (lVar2 != 0) {
iVar1 = js_setlike_get_size(param_1,*param_5,param_5[1],&local_48);
if ((-1 < iVar1) &&
(iVar1 = js_setlike_get_has(param_1,*param_5,param_5[1],&local_88), -1 < iVar1)) {
iVar1 = js_setlike_get_keys(param_1,*param_5,param_5[1],&local_78);
if (-1 < iVar1) {
if (local_48 < (long)(ulong)*(uint *)(lVar2 + 0x18)) {
auVar4 = ZEXT816(3) << 0x40;
bVar3 = false;
goto LAB_0014fa0a;
}
bVar3 = true;
auVar4 = js_create_map_iterator(param_1,param_2,param_3);
if (auVar4._8_4_ != 6) {
local_50 = CONCAT44(uStack_84,local_88);
local_58 = local_80;
do {
auVar5 = js_map_iterator_next(param_1,auVar4._0_8_,auVar4._8_8_);
local_68 = auVar5;
if (auVar5._8_4_ == 6) goto LAB_0014fa04;
if (local_8c != 0) break;
local_40 = 0;
uStack_38 = 3;
auVar5 = JS_CallInternal(param_1,local_50,local_58,*param_5,param_5[1],1,0,3,local_68,2)
;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_68._0_8_,local_68._8_8_);
iVar1 = JS_ToBoolFree(param_1,auVar5._0_8_,auVar5._8_8_);
bVar3 = iVar1 != 0;
if (iVar1 < 0) goto LAB_0014fa04;
} while (bVar3);
goto LAB_0014fa0a;
}
goto LAB_0014fa04;
}
}
auVar4 = ZEXT816(3) << 0x40;
}
LAB_0014fa04:
bVar3 = false;
LAB_0014fa0a:
local_98 = auVar4._8_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),CONCAT44(uStack_84,local_88),local_80);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),CONCAT44(uStack_74,local_78),local_70);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar4._0_8_,local_98);
return bVar3;
}
|
|
19,584
|
PAIRING_Aggregate_PK_in_G2
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/aggregate.c
|
static BLST_ERROR PAIRING_Aggregate_PK_in_G2(PAIRING *ctx,
const POINTonE2_affine *PK,
size_t pk_groupcheck,
const POINTonE1_affine *sig,
size_t sig_groupcheck,
const byte *scalar, size_t nbits,
const void *msg, size_t msg_len,
const void *aug, size_t aug_len)
{
if (ctx->ctrl & AGGR_MIN_PK)
return BLST_AGGR_TYPE_MISMATCH;
ctx->ctrl |= AGGR_MIN_SIG;
/*
* Since we don't know if the signature is individual or aggregated,
* the only sensible thing to do is to skip over infinite one and
* count on the corresponding infinite public key to be rejected,
* in case the signature is non-aggregated that is.
*/
if (sig != NULL && !vec_is_zero(sig, sizeof(*sig))) {
POINTonE1 *S = &ctx->AggrSign.e1;
POINTonE1 P[1];
FROM_AFFINE(P, sig);
if (sig_groupcheck && !POINTonE1_in_G1(P))
return BLST_POINT_NOT_IN_GROUP;
if (ctx->ctrl & AGGR_SIGN_SET) {
if (nbits != 0 && scalar != NULL) {
POINTonE1_mult_w5(P, P, scalar, nbits);
POINTonE1_dadd(S, S, P, NULL);
} else {
POINTonE1_dadd_affine(S, S, sig);
}
} else {
ctx->ctrl |= AGGR_SIGN_SET;
if (nbits != 0 && scalar != NULL)
POINTonE1_mult_w5(S, P, scalar, nbits);
else
vec_copy(S, P, sizeof(P));
}
}
if (PK != NULL) {
unsigned int n;
POINTonE1 H[1];
const void *DST = pairing_get_dst(ctx);
/*
* Reject infinite public keys.
*/
if (vec_is_zero(PK, sizeof(*PK)))
return BLST_PK_IS_INFINITY;
if (pk_groupcheck) {
POINTonE2 P[1];
FROM_AFFINE(P, PK);
if (!POINTonE2_in_G2(P))
return BLST_POINT_NOT_IN_GROUP;
}
if (ctx->ctrl & AGGR_HASH_OR_ENCODE)
Hash_to_G1(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len);
else
Encode_to_G1(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len);
if (nbits != 0 && scalar != NULL)
POINTonE1_mult_w5(H, H, scalar, nbits);
POINTonE1_from_Jacobian(H, H);
n = ctx->nelems;
vec_copy(ctx->Q + n, PK, sizeof(POINTonE2_affine));
vec_copy(ctx->P + n, H, sizeof(POINTonE1_affine));
if (++n == N_MAX) {
if (ctx->ctrl & AGGR_GT_SET) {
vec384fp12 GT;
miller_loop_n(GT, ctx->Q, ctx->P, n);
mul_fp12(ctx->GT, ctx->GT, GT);
} else {
miller_loop_n(ctx->GT, ctx->Q, ctx->P, n);
ctx->ctrl |= AGGR_GT_SET;
}
n = 0;
}
ctx->nelems = n;
}
return BLST_SUCCESS;
}
|
O1
|
c
|
PAIRING_Aggregate_PK_in_G2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp # imm = 0x2D8
movq %r9, -0x30(%rbp)
movq %rcx, %r12
movl (%rdi), %ecx
movl $0x4, %eax
testb $0x2, %cl
jne 0x63b11
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
orl $0x1, %ecx
movl %ecx, (%rdi)
testq %r12, %r12
je 0x63811
movq %r8, %r15
movl $0x60, %esi
movq %r12, %rdi
callq 0x72d40
testq %rax, %rax
je 0x6384f
testq %r14, %r14
je 0x63b0f
movq 0x8(%rbx), %rax
leaq 0xc78(%rbx), %r12
cmpq $0x2a, %rax
cmovneq %rax, %r12
movl $0xc0, %esi
movq %r14, %rdi
callq 0x72d40
testq %rax, %rax
je 0x638e9
movl $0x6, %eax
xorl %ecx, %ecx
jmp 0x63b0b
leaq -0x300(%rbp), %rdi
movl $0xc, %ecx
movq %r12, %rsi
rep movsq (%rsi), %es:(%rdi)
movl $0x60, %esi
movq %r12, %rdi
callq 0x72d40
leaq 0x2b073(%rip), %rdx # 0x8e8e8
leaq -0x2a0(%rbp), %rdi
movq %r12, %rsi
movq %rax, %rcx
callq 0x726a0
testq %r15, %r15
je 0x638a1
leaq -0x300(%rbp), %rdi
callq 0x5e5b0
testq %rax, %rax
je 0x63aa0
leaq 0x258(%rbx), %r15
movl (%rbx), %eax
testb $0x10, %al
jne 0x63981
orl $0x10, %eax
movl %eax, (%rbx)
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
sete %al
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
sete %sil
orb %al, %sil
jne 0x63ab0
leaq -0x300(%rbp), %rsi
movq %r15, %rdi
callq 0x5de50
jmp 0x63811
testq %r13, %r13
je 0x6393f
leaq -0x300(%rbp), %r15
movl $0xc0, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x211a0
leaq -0x240(%rbp), %r13
movl $0xc0, %esi
movq %r14, %rdi
callq 0x72d40
leaq 0x2afc8(%rip), %rdx # 0x8e8e8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq 0x72720
movq %r15, %rdi
callq 0x6186b
testq %rax, %rax
je 0x63aa7
movq 0x30(%rbp), %rcx
movq 0x28(%rbp), %rdx
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r8
testb $0x40, (%rbx)
movq 0x10(%rbx), %rax
leaq -0x300(%rbp), %r15
jne 0x639c6
movl $0x1, %esi
movq %r15, %rdi
pushq %rax
pushq %r12
callq 0x694a2
addq $0x10, %rsp
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
jmp 0x639eb
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
sete %al
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
sete %sil
orb %al, %sil
jne 0x63ac9
leaq -0x300(%rbp), %r12
movq %r12, %rdi
movq %r12, %rsi
callq 0x5de50
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x5c73e
jmp 0x63811
movl $0x2, %esi
movq %r15, %rdi
pushq %rax
pushq %r12
callq 0x694a2
addq $0x10, %rsp
leaq -0x2d0(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
callq 0x5e0d5
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
sete %al
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
sete %sil
orb %al, %sil
jne 0x63a19
leaq -0xc0(%rbp), %rdi
movq %rdi, %rsi
callq 0x5de50
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
movq %r15, %rsi
callq 0x5b9a4
movl 0x4(%rbx), %r12d
leaq (%r12,%r12,2), %r13
movq %r13, %rax
shlq $0x6, %rax
leaq (%rbx,%rax), %rdi
addq $0x378, %rdi # imm = 0x378
movl $0xc0, %edx
movq %r14, %rsi
callq 0x211a0
shlq $0x5, %r13
leaq (%rbx,%r13), %rdi
addq $0x978, %rdi # imm = 0x978
movl $0xc, %ecx
movq %r15, %rsi
rep movsq (%rsi), %es:(%rdi)
leal 0x1(%r12), %eax
cmpl $0x8, %eax
jne 0x63b01
leaq 0x378(%rbx), %rsi
leaq 0x978(%rbx), %rdx
testb $0x20, (%rbx)
jne 0x63adc
leaq 0x18(%rbx), %rdi
movl $0x8, %ecx
callq 0x62b1d
orb $0x20, (%rbx)
jmp 0x63aff
movl $0x3, %eax
jmp 0x63b11
xorl %ecx, %ecx
movl $0x3, %eax
jmp 0x63b0b
leaq -0x300(%rbp), %rsi
movl $0x90, %edx
movq %r15, %rdi
callq 0x211a0
jmp 0x63811
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5ce03
jmp 0x63811
leaq -0x300(%rbp), %r14
movl $0x8, %ecx
movq %r14, %rdi
callq 0x62b1d
leaq 0x18(%rbx), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x61d42
xorl %eax, %eax
movl %eax, 0x4(%rbx)
movl $0x3, %eax
movb $0x1, %cl
testb %cl, %cl
je 0x63b11
xorl %eax, %eax
addq $0x2d8, %rsp # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
PAIRING_Aggregate_PK_in_G2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2D8h
mov [rbp+var_30], r9
mov r12, rcx
mov ecx, [rdi]
mov eax, 4
test cl, 2
jnz loc_63B11
mov r13, rdx
mov r14, rsi
mov rbx, rdi
or ecx, 1
mov [rdi], ecx
test r12, r12
jz short loc_63811
mov r15, r8
mov esi, 60h ; '`'
mov rdi, r12
call vec_is_zero_16x
test rax, rax
jz short loc_6384F
loc_63811:
test r14, r14
jz loc_63B0F
mov rax, [rbx+8]
lea r12, [rbx+0C78h]
cmp rax, 2Ah ; '*'
cmovnz r12, rax
mov esi, 0C0h
mov rdi, r14
call vec_is_zero_16x
test rax, rax
jz loc_638E9
mov eax, 6
xor ecx, ecx
jmp loc_63B0B
loc_6384F:
lea rdi, [rbp+var_300]
mov ecx, 0Ch
mov rsi, r12
rep movsq
mov esi, 60h ; '`'
mov rdi, r12
call vec_is_zero_16x
lea rdx, BLS12_381_Rx
lea rdi, [rbp+var_2A0]
mov rsi, r12
mov rcx, rax
call vec_select_48
test r15, r15
jz short loc_638A1
lea rdi, [rbp+var_300]
call POINTonE1_in_G1
test rax, rax
jz loc_63AA0
loc_638A1:
lea r15, [rbx+258h]
mov eax, [rbx]
test al, 10h
jnz loc_63981
or eax, 10h
mov [rbx], eax
mov rcx, [rbp+arg_0]
test rcx, rcx
setz al
mov rdx, [rbp+var_30]
test rdx, rdx
setz sil
or sil, al
jnz loc_63AB0
lea rsi, [rbp+var_300]
mov rdi, r15
call POINTonE1_mult_w5
jmp loc_63811
loc_638E9:
test r13, r13
jz short loc_6393F
lea r15, [rbp+var_300]
mov edx, 0C0h
mov rdi, r15
mov rsi, r14
call _memcpy
lea r13, [rbp+var_240]
mov esi, 0C0h
mov rdi, r14
call vec_is_zero_16x
lea rdx, BLS12_381_Rx
mov rdi, r13
mov rsi, r14
mov rcx, rax
call vec_select_96
mov rdi, r15
call POINTonE2_in_G2
test rax, rax
jz loc_63AA7
loc_6393F:
mov rcx, [rbp+arg_20]
mov rdx, [rbp+arg_18]
mov r9, [rbp+arg_10]
mov r8, [rbp+arg_8]
test byte ptr [rbx], 40h
mov rax, [rbx+10h]
lea r15, [rbp+var_300]
jnz short loc_639C6
mov esi, 1
mov rdi, r15
push rax
push r12
call hash_to_field
add rsp, 10h
lea rdi, [rbp+var_C0]
mov rsi, r15
xor edx, edx
jmp short loc_639EB
loc_63981:
mov rcx, [rbp+arg_0]
test rcx, rcx
setz al
mov rdx, [rbp+var_30]
test rdx, rdx
setz sil
or sil, al
jnz loc_63AC9
lea r12, [rbp+var_300]
mov rdi, r12
mov rsi, r12
call POINTonE1_mult_w5
mov rdi, r15
mov rsi, r15
mov rdx, r12
xor ecx, ecx
call POINTonE1_dadd
jmp loc_63811
loc_639C6:
mov esi, 2
mov rdi, r15
push rax
push r12
call hash_to_field
add rsp, 10h
lea rdx, [rbp+var_2D0]
lea rdi, [rbp+var_C0]
mov rsi, r15
loc_639EB:
call map_to_g1
mov rcx, [rbp+arg_0]
test rcx, rcx
setz al
mov rdx, [rbp+var_30]
test rdx, rdx
setz sil
or sil, al
jnz short loc_63A19
lea rdi, [rbp+var_C0]
mov rsi, rdi
call POINTonE1_mult_w5
loc_63A19:
lea r15, [rbp+var_C0]
mov rdi, r15
mov rsi, r15
call POINTonE1_from_Jacobian
mov r12d, [rbx+4]
lea r13, [r12+r12*2]
mov rax, r13
shl rax, 6
lea rdi, [rbx+rax]
add rdi, 378h
mov edx, 0C0h
mov rsi, r14
call _memcpy
shl r13, 5
lea rdi, [rbx+r13]
add rdi, 978h
mov ecx, 0Ch
mov rsi, r15
rep movsq
lea eax, [r12+1]
cmp eax, 8
jnz loc_63B01
lea rsi, [rbx+378h]
lea rdx, [rbx+978h]
test byte ptr [rbx], 20h
jnz short loc_63ADC
lea rdi, [rbx+18h]
mov ecx, 8
call miller_loop_n
or byte ptr [rbx], 20h
jmp short loc_63AFF
loc_63AA0:
mov eax, 3
jmp short loc_63B11
loc_63AA7:
xor ecx, ecx
mov eax, 3
jmp short loc_63B0B
loc_63AB0:
lea rsi, [rbp+var_300]
mov edx, 90h
mov rdi, r15
call _memcpy
jmp loc_63811
loc_63AC9:
mov rdi, r15
mov rsi, r15
mov rdx, r12
call POINTonE1_dadd_affine
jmp loc_63811
loc_63ADC:
lea r14, [rbp+var_300]
mov ecx, 8
mov rdi, r14
call miller_loop_n
lea rdi, [rbx+18h]
mov rsi, rdi
mov rdx, r14
call mul_fp12
loc_63AFF:
xor eax, eax
loc_63B01:
mov [rbx+4], eax
mov eax, 3
mov cl, 1
loc_63B0B:
test cl, cl
jz short loc_63B11
loc_63B0F:
xor eax, eax
loc_63B11:
add rsp, 2D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long PAIRING_Aggregate_PK_in_G2(
long long a1,
long long a2,
long long a3,
const void *a4,
long long a5,
unsigned __int8 *a6,
unsigned long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
long long result; // rax
long long v15; // r12
char v16; // cl
long long is_zero_16x; // rax
long long v18; // rax
char *v19; // rdx
long long v20; // r12
int v21; // eax
long long v22; // rsi
long long v23; // rdx
char v24[96]; // [rsp+0h] [rbp-300h] BYREF
_BYTE v25[96]; // [rsp+60h] [rbp-2A0h] BYREF
_BYTE v26[384]; // [rsp+C0h] [rbp-240h] BYREF
_BYTE v27[144]; // [rsp+240h] [rbp-C0h] BYREF
unsigned __int8 *v28; // [rsp+2D0h] [rbp-30h]
v28 = a6;
result = 4LL;
if ( (*(_DWORD *)a1 & 2) == 0 )
{
*(_DWORD *)a1 |= 1u;
if ( a4 && !vec_is_zero_16x(a4, 96LL) )
{
qmemcpy(v24, a4, sizeof(v24));
is_zero_16x = vec_is_zero_16x(a4, 96LL);
vec_select_48(v25, a4, &BLS12_381_Rx, is_zero_16x);
if ( a5 && !POINTonE1_in_G1(v24) )
return 3LL;
if ( (*(_DWORD *)a1 & 0x10) != 0 )
{
if ( a7 == 0 || v28 == 0LL )
{
POINTonE1_dadd_affine(a1 + 600, a1 + 600, (long long)a4);
}
else
{
POINTonE1_mult_w5((long long)v24, (long long)v24, v28, a7);
POINTonE1_dadd(a1 + 600, a1 + 600, (long long)v24, 0LL);
}
}
else
{
*(_DWORD *)a1 |= 0x10u;
if ( a7 == 0 || v28 == 0LL )
memcpy(a1 + 600);
else
POINTonE1_mult_w5(a1 + 600, (long long)v24, v28, a7);
}
}
if ( !a2 )
return 0LL;
v15 = a1 + 3192;
if ( *(_QWORD *)(a1 + 8) != 42LL )
v15 = *(_QWORD *)(a1 + 8);
if ( vec_is_zero_16x(a2, 192LL) )
{
result = 6LL;
v16 = 0;
}
else if ( a3
&& (memcpy(v24),
v18 = vec_is_zero_16x(a2, 192LL),
vec_select_96(v26, a2, &BLS12_381_Rx, v18),
!POINTonE2_in_G2((long long)v24)) )
{
v16 = 0;
result = 3LL;
}
else
{
if ( (*(_BYTE *)a1 & 0x40) != 0 )
{
hash_to_field((unsigned int)v24, 2, a10, a11, a8, a9, v15, *(_QWORD *)(a1 + 16));
v19 = &v24[48];
}
else
{
hash_to_field((unsigned int)v24, 1, a10, a11, a8, a9, v15, *(_QWORD *)(a1 + 16));
v19 = 0LL;
}
map_to_g1((long long)v27, (long long)v24, (long long)v19);
if ( a7 != 0 && v28 != 0LL )
POINTonE1_mult_w5((long long)v27, (long long)v27, v28, a7);
POINTonE1_from_Jacobian((long long)v27, (long long)v27);
v20 = *(unsigned int *)(a1 + 4);
memcpy(a1 + 192 * v20 + 888);
qmemcpy((void *)(a1 + 96 * v20 + 2424), v27, 0x60uLL);
v21 = v20 + 1;
if ( (_DWORD)v20 == 7 )
{
v22 = a1 + 888;
v23 = a1 + 2424;
if ( (*(_BYTE *)a1 & 0x20) != 0 )
{
miller_loop_n((long long)v24, v22, v23, 8LL);
mul_fp12(a1 + 24, a1 + 24, (long long)v24);
}
else
{
miller_loop_n(a1 + 24, v22, v23, 8LL);
*(_BYTE *)a1 |= 0x20u;
}
v21 = 0;
}
*(_DWORD *)(a1 + 4) = v21;
result = 3LL;
v16 = 1;
}
if ( v16 )
return 0LL;
}
return result;
}
|
PAIRING_Aggregate_PK_in_G2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2d8
MOV qword ptr [RBP + -0x30],R9
MOV R12,RCX
MOV ECX,dword ptr [RDI]
MOV EAX,0x4
TEST CL,0x2
JNZ 0x00163b11
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
OR ECX,0x1
MOV dword ptr [RDI],ECX
TEST R12,R12
JZ 0x00163811
MOV R15,R8
MOV ESI,0x60
MOV RDI,R12
CALL 0x00172d40
TEST RAX,RAX
JZ 0x0016384f
LAB_00163811:
TEST R14,R14
JZ 0x00163b0f
MOV RAX,qword ptr [RBX + 0x8]
LEA R12,[RBX + 0xc78]
CMP RAX,0x2a
CMOVNZ R12,RAX
MOV ESI,0xc0
MOV RDI,R14
CALL 0x00172d40
TEST RAX,RAX
JZ 0x001638e9
MOV EAX,0x6
XOR ECX,ECX
JMP 0x00163b0b
LAB_0016384f:
LEA RDI,[RBP + -0x300]
MOV ECX,0xc
MOV RSI,R12
MOVSQ.REP RDI,RSI
MOV ESI,0x60
MOV RDI,R12
CALL 0x00172d40
LEA RDX,[0x18e8e8]
LEA RDI,[RBP + -0x2a0]
MOV RSI,R12
MOV RCX,RAX
CALL 0x001726a0
TEST R15,R15
JZ 0x001638a1
LEA RDI,[RBP + -0x300]
CALL 0x0015e5b0
TEST RAX,RAX
JZ 0x00163aa0
LAB_001638a1:
LEA R15,[RBX + 0x258]
MOV EAX,dword ptr [RBX]
TEST AL,0x10
JNZ 0x00163981
OR EAX,0x10
MOV dword ptr [RBX],EAX
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
SETZ AL
MOV RDX,qword ptr [RBP + -0x30]
TEST RDX,RDX
SETZ SIL
OR SIL,AL
JNZ 0x00163ab0
LEA RSI,[RBP + -0x300]
MOV RDI,R15
CALL 0x0015de50
JMP 0x00163811
LAB_001638e9:
TEST R13,R13
JZ 0x0016393f
LEA R15,[RBP + -0x300]
MOV EDX,0xc0
MOV RDI,R15
MOV RSI,R14
CALL 0x001211a0
LEA R13,[RBP + -0x240]
MOV ESI,0xc0
MOV RDI,R14
CALL 0x00172d40
LEA RDX,[0x18e8e8]
MOV RDI,R13
MOV RSI,R14
MOV RCX,RAX
CALL 0x00172720
MOV RDI,R15
CALL 0x0016186b
TEST RAX,RAX
JZ 0x00163aa7
LAB_0016393f:
MOV RCX,qword ptr [RBP + 0x30]
MOV RDX,qword ptr [RBP + 0x28]
MOV R9,qword ptr [RBP + 0x20]
MOV R8,qword ptr [RBP + 0x18]
TEST byte ptr [RBX],0x40
MOV RAX,qword ptr [RBX + 0x10]
LEA R15,[RBP + -0x300]
JNZ 0x001639c6
MOV ESI,0x1
MOV RDI,R15
PUSH RAX
PUSH R12
CALL 0x001694a2
ADD RSP,0x10
LEA RDI,[RBP + -0xc0]
MOV RSI,R15
XOR EDX,EDX
JMP 0x001639eb
LAB_00163981:
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
SETZ AL
MOV RDX,qword ptr [RBP + -0x30]
TEST RDX,RDX
SETZ SIL
OR SIL,AL
JNZ 0x00163ac9
LEA R12,[RBP + -0x300]
MOV RDI,R12
MOV RSI,R12
CALL 0x0015de50
MOV RDI,R15
MOV RSI,R15
MOV RDX,R12
XOR ECX,ECX
CALL 0x0015c73e
JMP 0x00163811
LAB_001639c6:
MOV ESI,0x2
MOV RDI,R15
PUSH RAX
PUSH R12
CALL 0x001694a2
ADD RSP,0x10
LEA RDX,[RBP + -0x2d0]
LEA RDI,[RBP + -0xc0]
MOV RSI,R15
LAB_001639eb:
CALL 0x0015e0d5
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
SETZ AL
MOV RDX,qword ptr [RBP + -0x30]
TEST RDX,RDX
SETZ SIL
OR SIL,AL
JNZ 0x00163a19
LEA RDI,[RBP + -0xc0]
MOV RSI,RDI
CALL 0x0015de50
LAB_00163a19:
LEA R15,[RBP + -0xc0]
MOV RDI,R15
MOV RSI,R15
CALL 0x0015b9a4
MOV R12D,dword ptr [RBX + 0x4]
LEA R13,[R12 + R12*0x2]
MOV RAX,R13
SHL RAX,0x6
LEA RDI,[RBX + RAX*0x1]
ADD RDI,0x378
MOV EDX,0xc0
MOV RSI,R14
CALL 0x001211a0
SHL R13,0x5
LEA RDI,[RBX + R13*0x1]
ADD RDI,0x978
MOV ECX,0xc
MOV RSI,R15
MOVSQ.REP RDI,RSI
LEA EAX,[R12 + 0x1]
CMP EAX,0x8
JNZ 0x00163b01
LEA RSI,[RBX + 0x378]
LEA RDX,[RBX + 0x978]
TEST byte ptr [RBX],0x20
JNZ 0x00163adc
LEA RDI,[RBX + 0x18]
MOV ECX,0x8
CALL 0x00162b1d
OR byte ptr [RBX],0x20
JMP 0x00163aff
LAB_00163aa0:
MOV EAX,0x3
JMP 0x00163b11
LAB_00163aa7:
XOR ECX,ECX
MOV EAX,0x3
JMP 0x00163b0b
LAB_00163ab0:
LEA RSI,[RBP + -0x300]
MOV EDX,0x90
MOV RDI,R15
CALL 0x001211a0
JMP 0x00163811
LAB_00163ac9:
MOV RDI,R15
MOV RSI,R15
MOV RDX,R12
CALL 0x0015ce03
JMP 0x00163811
LAB_00163adc:
LEA R14,[RBP + -0x300]
MOV ECX,0x8
MOV RDI,R14
CALL 0x00162b1d
LEA RDI,[RBX + 0x18]
MOV RSI,RDI
MOV RDX,R14
CALL 0x00161d42
LAB_00163aff:
XOR EAX,EAX
LAB_00163b01:
MOV dword ptr [RBX + 0x4],EAX
MOV EAX,0x3
MOV CL,0x1
LAB_00163b0b:
TEST CL,CL
JZ 0x00163b11
LAB_00163b0f:
XOR EAX,EAX
LAB_00163b11:
ADD RSP,0x2d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
PAIRING_Aggregate_PK_in_G2
(uint *param_1,void *param_2,long param_3,int8 *param_4,long param_5,long param_6,
long param_7,int8 param_8,int8 param_9,int8 param_10,int8 param_11
)
{
bool bVar1;
uint uVar2;
long lVar3;
int8 uVar4;
int1 *puVar5;
int8 *puVar6;
int8 *puVar7;
uint *puVar8;
byte bVar9;
int8 local_308 [6];
int1 local_2d8 [48];
int1 local_2a8 [96];
int1 local_248 [384];
int8 local_c8 [18];
long local_38;
bVar9 = 0;
if ((*param_1 & 2) != 0) {
return 4;
}
*param_1 = *param_1 | 1;
local_38 = param_6;
if ((param_4 != (int8 *)0x0) && (lVar3 = vec_is_zero_16x(param_4,0x60), lVar3 == 0)) {
puVar6 = param_4;
puVar7 = local_308;
for (lVar3 = 0xc; lVar3 != 0; lVar3 = lVar3 + -1) {
*puVar7 = *puVar6;
puVar6 = puVar6 + (ulong)bVar9 * -2 + 1;
puVar7 = puVar7 + (ulong)bVar9 * -2 + 1;
}
uVar4 = vec_is_zero_16x(param_4,0x60);
vec_select_48(local_2a8,param_4,&BLS12_381_Rx,uVar4);
if ((param_5 != 0) && (lVar3 = POINTonE1_in_G1(local_308), lVar3 == 0)) {
return 3;
}
puVar8 = param_1 + 0x96;
if ((*param_1 & 0x10) == 0) {
*param_1 = *param_1 | 0x10;
if (local_38 == 0 || param_7 == 0) {
memcpy(puVar8,local_308,0x90);
}
else {
POINTonE1_mult_w5(puVar8,local_308);
}
}
else if (local_38 == 0 || param_7 == 0) {
POINTonE1_dadd_affine(puVar8,puVar8,param_4);
}
else {
POINTonE1_mult_w5(local_308,local_308);
POINTonE1_dadd(puVar8,puVar8,local_308);
}
}
if (param_2 == (void *)0x0) {
return 0;
}
puVar8 = param_1 + 0x31e;
if (*(uint **)(param_1 + 2) != (uint *)0x2a) {
puVar8 = *(uint **)(param_1 + 2);
}
lVar3 = vec_is_zero_16x(param_2,0xc0);
if (lVar3 == 0) {
if (param_3 != 0) {
memcpy(local_308,param_2,0xc0);
vec_is_zero_16x(param_2,0xc0);
vec_select_96(local_248,param_2,&BLS12_381_Rx);
lVar3 = POINTonE2_in_G2(local_308);
if (lVar3 == 0) {
bVar1 = false;
uVar4 = 3;
goto LAB_00163b0b;
}
}
if ((*param_1 & 0x40) == 0) {
hash_to_field(local_308,1,param_10,param_11,param_8,param_9,puVar8,
*(int8 *)(param_1 + 4));
puVar5 = (int1 *)0x0;
}
else {
hash_to_field(local_308,2,param_10,param_11,param_8,param_9,puVar8,
*(int8 *)(param_1 + 4));
puVar5 = local_2d8;
}
map_to_g1(local_c8,local_308,puVar5);
if (local_38 != 0 && param_7 != 0) {
POINTonE1_mult_w5(local_c8,local_c8);
}
POINTonE1_from_Jacobian(local_c8,local_c8);
uVar2 = param_1[1];
memcpy(param_1 + (ulong)uVar2 * 0x30 + 0xde,param_2,0xc0);
puVar6 = local_c8;
puVar8 = param_1 + (ulong)uVar2 * 0x18 + 0x25e;
for (lVar3 = 0xc; lVar3 != 0; lVar3 = lVar3 + -1) {
*(int8 *)puVar8 = *puVar6;
puVar6 = puVar6 + (ulong)bVar9 * -2 + 1;
puVar8 = puVar8 + (ulong)bVar9 * -4 + 2;
}
uVar2 = uVar2 + 1;
if (uVar2 == 8) {
if ((*param_1 & 0x20) == 0) {
miller_loop_n(param_1 + 6,param_1 + 0xde,param_1 + 0x25e,8);
*(byte *)param_1 = (byte)*param_1 | 0x20;
}
else {
miller_loop_n(local_308,param_1 + 0xde,param_1 + 0x25e,8);
mul_fp12(param_1 + 6,param_1 + 6,local_308);
}
uVar2 = 0;
}
param_1[1] = uVar2;
uVar4 = 3;
bVar1 = true;
}
else {
uVar4 = 6;
bVar1 = false;
}
LAB_00163b0b:
if (bVar1) {
return 0;
}
return uVar4;
}
|
|
19,585
|
quantize_q5_1
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
size_t quantize_q5_1(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
if (!quant_weights) {
quantize_row_q5_1_ref(src, dst, (int64_t)nrow*n_per_row);
return nrow * ggml_row_size(GGML_TYPE_Q5_1, n_per_row);
}
size_t row_size = ggml_row_size(GGML_TYPE_Q5_1, n_per_row);
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q5_1_impl(src, (block_q5_1*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
return nrow * row_size;
}
|
O0
|
c
|
quantize_q5_1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x77600
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
imulq -0x28(%rbp), %rdx
callq 0x47ca0
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rsi
movl $0x7, %edi
callq 0x47a50
movq %rax, %rcx
movq -0x50(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x77678
movq -0x28(%rbp), %rsi
movl $0x7, %edi
callq 0x47a50
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x7766b
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x77690
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x77622
movq -0x20(%rbp), %rax
imulq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
quantize_q5_1:
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], rcx
mov [rbp+var_30], r8
cmp [rbp+var_30], 0
jnz short loc_77600
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
imul rdx, [rbp+var_28]
call _quantize_row_q5_1_ref
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rsi, [rbp+var_28]
mov edi, 7
call _ggml_row_size
mov rcx, rax
mov rax, [rbp+var_50]
imul rax, rcx
mov [rbp+var_8], rax
jmp short loc_77678
loc_77600:
mov rsi, [rbp+var_28]
mov edi, 7
call _ggml_row_size
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov [rbp+var_48], 0
loc_77622:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_20]
jge short loc_7766B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call quantize_row_q5_1_impl
mov rax, [rbp+var_28]
shl rax, 2
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_77622
loc_7766B:
mov rax, [rbp+var_20]
imul rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_77678:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
unsigned long long quantize_q5_1(long long a1, long long a2, long long a3, long long a4, long long a5, double a6)
{
long long i; // [rsp+8h] [rbp-48h]
long long v8; // [rsp+10h] [rbp-40h]
unsigned long long v9; // [rsp+18h] [rbp-38h]
long long v13; // [rsp+40h] [rbp-10h]
v13 = a1;
if ( a5 )
{
v9 = ggml_row_size(7u, a4, a6);
v8 = a2;
for ( i = 0LL; i < a3; ++i )
{
quantize_row_q5_1_impl(v13, v8, a4, a5);
v13 += 4 * a4;
v8 += v9;
}
return v9 * a3;
}
else
{
quantize_row_q5_1_ref(a1, a2, a4 * a3);
return ggml_row_size(7u, a4, a6) * a3;
}
}
|
quantize_q5_1:
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],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00177600
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
IMUL RDX,qword ptr [RBP + -0x28]
CALL 0x00147ca0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RSI,qword ptr [RBP + -0x28]
MOV EDI,0x7
CALL 0x00147a50
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
IMUL RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00177678
LAB_00177600:
MOV RSI,qword ptr [RBP + -0x28]
MOV EDI,0x7
CALL 0x00147a50
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x48],0x0
LAB_00177622:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x20]
JGE 0x0017766b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00177690
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x2
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00177622
LAB_0017766b:
MOV RAX,qword ptr [RBP + -0x20]
IMUL RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00177678:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long quantize_q5_1(long param_1,long param_2,long param_3,long param_4,long param_5)
{
int8 local_50;
int8 local_48;
int8 local_18;
int8 local_10;
if (param_5 == 0) {
quantize_row_q5_1_ref(param_1,param_2,param_3 * param_4);
local_10 = ggml_row_size(7,param_4);
}
else {
local_10 = ggml_row_size(7,param_4);
local_48 = param_2;
local_18 = param_1;
for (local_50 = 0; local_50 < param_3; local_50 = local_50 + 1) {
quantize_row_q5_1_impl(local_18,local_48,param_4,param_5);
local_18 = param_4 * 4 + local_18;
local_48 = local_10 + local_48;
}
}
local_10 = param_3 * local_10;
return local_10;
}
|
|
19,586
|
quantize_q5_1
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
size_t quantize_q5_1(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
if (!quant_weights) {
quantize_row_q5_1_ref(src, dst, (int64_t)nrow*n_per_row);
return nrow * ggml_row_size(GGML_TYPE_Q5_1, n_per_row);
}
size_t row_size = ggml_row_size(GGML_TYPE_Q5_1, n_per_row);
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q5_1_impl(src, (block_q5_1*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
return nrow * row_size;
}
|
O3
|
c
|
quantize_q5_1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %r8, 0x38(%rsp)
testq %r8, %r8
je 0x329c9
movl $0x7, %edi
movq %r14, %rsi
callq 0x178b0
testq %rbx, %rbx
jle 0x329e8
cvtsi2ss %r14, %xmm0
movss %xmm0, 0x1c(%rsp)
movq %r14, %rcx
shrq $0x5, %rcx
movq %rcx, 0x60(%rsp)
leaq (,%r14,4), %rcx
movq %rcx, 0x40(%rsp)
leaq 0x8(%r15), %rcx
movq %rcx, 0x28(%rsp)
xorl %ecx, %ecx
movq %rbx, 0x50(%rsp)
movq %r14, 0x30(%rsp)
movq %rax, 0x48(%rsp)
movq %rcx, 0x58(%rsp)
movq %r12, 0x10(%rsp)
testq %r14, %r14
jle 0x32995
xorps %xmm1, %xmm1
xorl %eax, %eax
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rdx
movss (%rdx,%rax,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm1
incq %rax
cmpq %rax, %rcx
jne 0x3267c
cmpq $0x20, %rcx
jl 0x32995
divss 0x1c(%rsp), %xmm1
movq 0x28(%rsp), %rbx
movq 0x38(%rsp), %rbp
movq 0x10(%rsp), %r12
xorl %r14d, %r14d
movss %xmm1, 0xc(%rsp)
movq %r15, 0x68(%rsp)
movq %r14, %r13
shlq $0x7, %r13
addq 0x10(%rsp), %r13
xorl %r15d, %r15d
movss (%rbp,%r15,4), %xmm2
movss (%r12,%r15,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss 0x1ebdb(%rip), %xmm0 # 0x512c4
jb 0x326f1
sqrtss %xmm0, %xmm0
jmp 0x32708
movss %xmm2, 0x20(%rsp)
callq 0x17f80
movss 0x20(%rsp), %xmm2
movss 0xc(%rsp), %xmm1
mulss %xmm0, %xmm2
movss %xmm2, 0xb0(%rsp,%r15,4)
incq %r15
cmpq $0x20, %r15
jne 0x326cd
leaq 0x90(%rsp), %rax
movq %rax, (%rsp)
movl $0x20, %edi
movl $0x1f, %esi
movq %r13, %rdx
leaq 0xb0(%rsp), %rcx
leaq 0x70(%rsp), %r8
leaq 0x24(%rsp), %r9
callq 0x3bef2
movss 0x24(%rsp), %xmm2
movaps %xmm0, %xmm1
unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps 0x1991e(%rip), %xmm3 # 0x4c080
xorps %xmm3, %xmm2
unpcklps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movaps %xmm1, %xmm2
paddd %xmm1, %xmm2
pxor %xmm3, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd 0x1e701(%rip), %xmm3 # 0x50e80
movdqa %xmm1, %xmm4
pand 0x1e705(%rip), %xmm4 # 0x50e90
paddd 0x1e70d(%rip), %xmm4 # 0x50ea0
pand %xmm3, %xmm4
pandn 0x1e711(%rip), %xmm3 # 0x50eb0
por %xmm4, %xmm3
andps 0x19876(%rip), %xmm0 # 0x4c020
mulps 0x1e6af(%rip), %xmm0 # 0x50e60
mulps 0x1e6b8(%rip), %xmm0 # 0x50e70
addps %xmm0, %xmm3
movaps %xmm3, %xmm0
psrld $0xd, %xmm0
pand 0x1e6f5(%rip), %xmm0 # 0x50ec0
andps 0x1e6fe(%rip), %xmm3 # 0x50ed0
paddd %xmm0, %xmm3
pcmpgtd 0x1e712(%rip), %xmm2 # 0x50ef0
movdqa %xmm2, %xmm0
pandn %xmm3, %xmm0
psrld $0x10, %xmm1
pand 0x1e6ed(%rip), %xmm1 # 0x50ee0
pand 0x1e705(%rip), %xmm2 # 0x50f00
por %xmm1, %xmm2
leaq (%r14,%r14,2), %rax
movq 0x68(%rsp), %r15
leaq (%r15,%rax,8), %rax
por %xmm0, %xmm2
pshuflw $0xe8, %xmm2, %xmm0 # xmm0 = xmm2[0,2,2,3,4,5,6,7]
movd %xmm0, (%rax)
pxor %xmm0, %xmm0
xorl %ecx, %ecx
movdqa 0x19809(%rip), %xmm1 # 0x4c030
movdqa 0x1e800(%rip), %xmm8 # 0x51030
movdqa 0x1e807(%rip), %xmm9 # 0x51040
movdqa 0x1e5fe(%rip), %xmm10 # 0x50e40
movdqa 0x1e605(%rip), %xmm11 # 0x50e50
movdqa 0x1e6dc(%rip), %xmm12 # 0x50f30
pxor %xmm13, %xmm13
movdqa 0x1e6de(%rip), %xmm14 # 0x50f40
movdqa 0x197d5(%rip), %xmm15 # 0x4c040
movd 0x70(%rsp,%rcx), %xmm5
movq %rcx, %xmm2
pshufd $0x44, %xmm2, %xmm2 # xmm2 = xmm2[0,1,0,1]
movdqa %xmm2, %xmm4
por %xmm8, %xmm4
por %xmm9, %xmm2
movq %xmm2, %rdx
movd 0x70(%rsp,%rdx), %xmm3
movdqa %xmm5, %xmm6
pand %xmm10, %xmm6
movdqa %xmm3, %xmm7
psllw $0x4, %xmm7
pand %xmm11, %xmm7
por %xmm6, %xmm7
movd %xmm7, (%rbx,%rcx)
psrlw $0x4, %xmm5
pand %xmm12, %xmm5
punpcklbw %xmm13, %xmm5 # xmm5 = xmm5[0],xmm13[0],xmm5[1],xmm13[1],xmm5[2],xmm13[2],xmm5[3],xmm13[3],xmm5[4],xmm13[4],xmm5[5],xmm13[5],xmm5[6],xmm13[6],xmm5[7],xmm13[7]
punpcklwd %xmm13, %xmm5 # xmm5 = xmm5[0],xmm13[0],xmm5[1],xmm13[1],xmm5[2],xmm13[2],xmm5[3],xmm13[3]
movdqa %xmm1, %xmm6
pslld $0x17, %xmm6
paddd %xmm14, %xmm6
cvttps2dq %xmm6, %xmm6
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pmuludq %xmm6, %xmm5
pshufd $0xe8, %xmm5, %xmm5 # xmm5 = xmm5[0,2,2,3]
pshufd $0xf5, %xmm6, %xmm6 # xmm6 = xmm6[1,1,3,3]
pmuludq %xmm7, %xmm6
pshufd $0xe8, %xmm6, %xmm6 # xmm6 = xmm6[0,2,2,3]
punpckldq %xmm6, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
psrlw $0x4, %xmm3
pand %xmm12, %xmm3
punpcklbw %xmm13, %xmm3 # xmm3 = xmm3[0],xmm13[0],xmm3[1],xmm13[1],xmm3[2],xmm13[2],xmm3[3],xmm13[3],xmm3[4],xmm13[4],xmm3[5],xmm13[5],xmm3[6],xmm13[6],xmm3[7],xmm13[7]
punpcklwd %xmm13, %xmm3 # xmm3 = xmm3[0],xmm13[0],xmm3[1],xmm13[1],xmm3[2],xmm13[2],xmm3[3],xmm13[3]
shufps $0x88, %xmm4, %xmm2 # xmm2 = xmm2[0,2],xmm4[0,2]
pslld $0x17, %xmm2
paddd %xmm14, %xmm2
cvttps2dq %xmm2, %xmm2
pshufd $0xf5, %xmm3, %xmm4 # xmm4 = xmm3[1,1,3,3]
pmuludq %xmm2, %xmm3
pshufd $0xe8, %xmm3, %xmm3 # xmm3 = xmm3[0,2,2,3]
pshufd $0xf5, %xmm2, %xmm2 # xmm2 = xmm2[1,1,3,3]
pmuludq %xmm4, %xmm2
pshufd $0xe8, %xmm2, %xmm2 # xmm2 = xmm2[0,2,2,3]
punpckldq %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
paddd %xmm5, %xmm3
por %xmm3, %xmm0
addq $0x4, %rcx
paddd %xmm15, %xmm1
cmpq $0x10, %rcx
jne 0x3286b
pshufd $0xee, %xmm0, %xmm1 # xmm1 = xmm0[2,3,2,3]
por %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0 # xmm0 = xmm1[1,1,1,1]
por %xmm1, %xmm0
movd %xmm0, 0x4(%rax)
incq %r14
movl $0x80, %eax
addq %rax, %r12
addq %rax, %rbp
addq $0x18, %rbx
cmpq 0x60(%rsp), %r14
movss 0xc(%rsp), %xmm1
jne 0x326be
movq 0x10(%rsp), %r12
addq 0x40(%rsp), %r12
movq 0x48(%rsp), %rax
addq %rax, %r15
movq 0x58(%rsp), %rcx
incq %rcx
addq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rbx
cmpq %rbx, %rcx
movq 0x30(%rsp), %r14
jne 0x3265a
jmp 0x329e8
movq %r14, %rdx
imulq %rbx, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x17980
movl $0x7, %edi
movq %r14, %rsi
callq 0x178b0
imulq %rbx, %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
quantize_q5_1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov r14, rcx
mov rbx, rdx
mov r15, rsi
mov r12, rdi
mov [rsp+168h+var_130], r8
test r8, r8
jz loc_329C9
mov edi, 7
mov rsi, r14
call _ggml_row_size
test rbx, rbx
jle loc_329E8
cvtsi2ss xmm0, r14
movss [rsp+168h+var_14C], xmm0
mov rcx, r14
shr rcx, 5
mov [rsp+168h+var_108], rcx
lea rcx, ds:0[r14*4]
mov [rsp+168h+var_128], rcx
lea rcx, [r15+8]
mov [rsp+168h+var_140], rcx
xor ecx, ecx
mov [rsp+168h+var_118], rbx
mov [rsp+168h+var_138], r14
mov [rsp+168h+var_120], rax
loc_3265A:
mov [rsp+168h+var_110], rcx
mov [rsp+168h+var_158], r12
test r14, r14
jle loc_32995
xorps xmm1, xmm1
xor eax, eax
mov rcx, [rsp+168h+var_138]
mov rdx, [rsp+168h+var_158]
loc_3267C:
movss xmm0, dword ptr [rdx+rax*4]
mulss xmm0, xmm0
addss xmm1, xmm0
inc rax
cmp rcx, rax
jnz short loc_3267C
cmp rcx, 20h ; ' '
jl loc_32995
divss xmm1, [rsp+168h+var_14C]
mov rbx, [rsp+168h+var_140]
mov rbp, [rsp+168h+var_130]
mov r12, [rsp+168h+var_158]
xor r14d, r14d
movss [rsp+168h+var_15C], xmm1
mov [rsp+168h+var_100], r15
loc_326BE:
mov r13, r14
shl r13, 7
add r13, [rsp+168h+var_158]
xor r15d, r15d
loc_326CD:
movss xmm2, dword ptr [rbp+r15*4+0]
movss xmm0, dword ptr [r12+r15*4]
mulss xmm0, xmm0
addss xmm0, xmm1
ucomiss xmm0, cs:dword_512C4
jb short loc_326F1
sqrtss xmm0, xmm0
jmp short loc_32708
loc_326F1:
movss [rsp+168h+var_148], xmm2
call _sqrtf
movss xmm2, [rsp+168h+var_148]
movss xmm1, [rsp+168h+var_15C]
loc_32708:
mulss xmm2, xmm0
movss [rsp+r15*4+168h+var_B8], xmm2
inc r15
cmp r15, 20h ; ' '
jnz short loc_326CD
lea rax, [rsp+168h+var_D8]
mov [rsp+168h+var_168], rax
mov edi, 20h ; ' '
mov esi, 1Fh
mov rdx, r13
lea rcx, [rsp+168h+var_B8]
lea r8, [rsp+168h+var_F8]
lea r9, [rsp+168h+var_144]
call make_qkx3_quants
movss xmm2, [rsp+168h+var_144]
movaps xmm1, xmm0
unpcklps xmm0, xmm2
movaps xmm3, cs:xmmword_4C080
xorps xmm2, xmm3
unpcklps xmm1, xmm2
movaps xmm2, xmm1
paddd xmm2, xmm1
pxor xmm2, xmm3
movdqa xmm3, xmm2
pcmpgtd xmm3, cs:xmmword_50E80
movdqa xmm4, xmm1
pand xmm4, cs:xmmword_50E90
paddd xmm4, cs:xmmword_50EA0
pand xmm4, xmm3
pandn xmm3, cs:xmmword_50EB0
por xmm3, xmm4
andps xmm0, cs:xmmword_4C020
mulps xmm0, cs:xmmword_50E60
mulps xmm0, cs:xmmword_50E70
addps xmm3, xmm0
movaps xmm0, xmm3
psrld xmm0, 0Dh
pand xmm0, cs:xmmword_50EC0
andps xmm3, cs:xmmword_50ED0
paddd xmm3, xmm0
pcmpgtd xmm2, cs:xmmword_50EF0
movdqa xmm0, xmm2
pandn xmm0, xmm3
psrld xmm1, 10h
pand xmm1, cs:xmmword_50EE0
pand xmm2, cs:xmmword_50F00
por xmm2, xmm1
lea rax, [r14+r14*2]
mov r15, [rsp+168h+var_100]
lea rax, [r15+rax*8]
por xmm2, xmm0
pshuflw xmm0, xmm2, 0E8h
movd dword ptr [rax], xmm0
pxor xmm0, xmm0
xor ecx, ecx
movdqa xmm1, cs:xmmword_4C030
movdqa xmm8, cs:xmmword_51030
movdqa xmm9, cs:xmmword_51040
movdqa xmm10, cs:xmmword_50E40
movdqa xmm11, cs:xmmword_50E50
movdqa xmm12, cs:xmmword_50F30
pxor xmm13, xmm13
movdqa xmm14, cs:xmmword_50F40
movdqa xmm15, cs:xmmword_4C040
loc_3286B:
movd xmm5, [rsp+rcx+168h+var_F8]
movq xmm2, rcx
pshufd xmm2, xmm2, 44h ; 'D'
movdqa xmm4, xmm2
por xmm4, xmm8
por xmm2, xmm9
movq rdx, xmm2
movd xmm3, [rsp+rdx+168h+var_F8]
movdqa xmm6, xmm5
pand xmm6, xmm10
movdqa xmm7, xmm3
psllw xmm7, 4
pand xmm7, xmm11
por xmm7, xmm6
movd dword ptr [rbx+rcx], xmm7
psrlw xmm5, 4
pand xmm5, xmm12
punpcklbw xmm5, xmm13
punpcklwd xmm5, xmm13
movdqa xmm6, xmm1
pslld xmm6, 17h
paddd xmm6, xmm14
cvttps2dq xmm6, xmm6
pshufd xmm7, xmm5, 0F5h
pmuludq xmm5, xmm6
pshufd xmm5, xmm5, 0E8h
pshufd xmm6, xmm6, 0F5h
pmuludq xmm6, xmm7
pshufd xmm6, xmm6, 0E8h
punpckldq xmm5, xmm6
psrlw xmm3, 4
pand xmm3, xmm12
punpcklbw xmm3, xmm13
punpcklwd xmm3, xmm13
shufps xmm2, xmm4, 88h
pslld xmm2, 17h
paddd xmm2, xmm14
cvttps2dq xmm2, xmm2
pshufd xmm4, xmm3, 0F5h
pmuludq xmm3, xmm2
pshufd xmm3, xmm3, 0E8h
pshufd xmm2, xmm2, 0F5h
pmuludq xmm2, xmm4
pshufd xmm2, xmm2, 0E8h
punpckldq xmm3, xmm2
paddd xmm3, xmm5
por xmm0, xmm3
add rcx, 4
paddd xmm1, xmm15
cmp rcx, 10h
jnz loc_3286B
pshufd xmm1, xmm0, 0EEh
por xmm1, xmm0
pshufd xmm0, xmm1, 55h ; 'U'
por xmm0, xmm1
movd dword ptr [rax+4], xmm0
inc r14
mov eax, 80h
add r12, rax
add rbp, rax
add rbx, 18h
cmp r14, [rsp+168h+var_108]
movss xmm1, [rsp+168h+var_15C]
jnz loc_326BE
loc_32995:
mov r12, [rsp+168h+var_158]
add r12, [rsp+168h+var_128]
mov rax, [rsp+168h+var_120]
add r15, rax
mov rcx, [rsp+168h+var_110]
inc rcx
add [rsp+168h+var_140], rax
mov rbx, [rsp+168h+var_118]
cmp rcx, rbx
mov r14, [rsp+168h+var_138]
jnz loc_3265A
jmp short loc_329E8
loc_329C9:
mov rdx, r14
imul rdx, rbx
mov rdi, r12
mov rsi, r15
call _quantize_row_q5_1_ref
mov edi, 7
mov rsi, r14
call _ggml_row_size
loc_329E8:
imul rax, rbx
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long quantize_q5_1(long long a1, long long a2, long long a3, long long a4, long long a5, double a6)
{
long long v6; // r14
long long v7; // rbx
long long v8; // r15
long long v9; // r12
unsigned long long v10; // rax
long long v11; // rcx
float v12; // xmm1_4
long long v13; // rax
float v14; // xmm1_4
long long v15; // rbx
long long v16; // rbp
long long v17; // r14
long long i; // r15
float v19; // xmm2_4
__m128 v20; // xmm0
__m128i v21; // xmm1
__m128i v22; // xmm2
__m128i v23; // xmm3
__m128 v24; // xmm3
__m128i v25; // xmm2
_DWORD *v26; // rax
__m128i v27; // xmm0
long long v28; // rcx
__m128i si128; // xmm1
__m128i v30; // xmm8
__m128i v31; // xmm9
__m128i v32; // xmm10
__m128i v33; // xmm11
__m128i v34; // xmm12
__m128i v35; // xmm14
__m128i v36; // xmm15
__m128i v37; // xmm5
__m128i v38; // xmm2
__m128 v39; // xmm4
__m128 v40; // xmm2
__m128i v41; // xmm3
__m128i v42; // xmm5
__m128i v43; // xmm6
__m128i v44; // xmm3
__m128i v45; // xmm2
__m128i v46; // xmm1
double v47; // xmm0_8
float v49; // [rsp+Ch] [rbp-15Ch]
long long v50; // [rsp+10h] [rbp-158h]
float v51; // [rsp+1Ch] [rbp-14Ch]
unsigned int v52; // [rsp+24h] [rbp-144h] BYREF
long long v53; // [rsp+28h] [rbp-140h]
long long v54; // [rsp+30h] [rbp-138h]
long long v55; // [rsp+38h] [rbp-130h]
long long v56; // [rsp+40h] [rbp-128h]
unsigned long long v57; // [rsp+48h] [rbp-120h]
long long v58; // [rsp+50h] [rbp-118h]
long long v59; // [rsp+58h] [rbp-110h]
unsigned long long v60; // [rsp+60h] [rbp-108h]
long long v61; // [rsp+68h] [rbp-100h]
_DWORD v62[8]; // [rsp+70h] [rbp-F8h] BYREF
char v63[32]; // [rsp+90h] [rbp-D8h] BYREF
float v64[46]; // [rsp+B0h] [rbp-B8h] BYREF
v6 = a4;
v7 = a3;
v8 = a2;
v9 = a1;
v55 = a5;
if ( a5 )
{
v10 = ggml_row_size(7u, a4, a6);
if ( v7 > 0 )
{
v51 = (float)(int)v6;
v60 = (unsigned long long)v6 >> 5;
v56 = 4 * v6;
v53 = a2 + 8;
v11 = 0LL;
v58 = v7;
v54 = v6;
v57 = v10;
do
{
v59 = v11;
v50 = v9;
if ( v6 > 0 )
{
v12 = 0.0;
v13 = 0LL;
do
{
v12 = v12 + (float)(*(float *)(v9 + 4 * v13) * *(float *)(v9 + 4 * v13));
++v13;
}
while ( v54 != v13 );
if ( v54 >= 32 )
{
v14 = v12 / v51;
v15 = v53;
v16 = v55;
v17 = 0LL;
v49 = v14;
v61 = v8;
do
{
for ( i = 0LL; i != 32; ++i )
{
v19 = *(float *)(v16 + 4 * i);
v20 = (__m128)*(unsigned int *)(v9 + 4 * i);
v20.m128_f32[0] = (float)(v20.m128_f32[0] * v20.m128_f32[0]) + v14;
if ( v20.m128_f32[0] < 0.0 )
{
*(double *)v20.m128_u64 = sqrtf(*(double *)v20.m128_u64);
v14 = v49;
}
else
{
v20.m128_f32[0] = fsqrt(v20.m128_f32[0]);
}
v64[i] = v19 * v20.m128_f32[0];
}
*(double *)v20.m128_u64 = make_qkx3_quants(
32,
31,
(int)v50 + ((_DWORD)v17 << 7),
(unsigned int)v64,
(unsigned int)v62,
(unsigned int)&v52,
(long long)v63);
v21 = (__m128i)_mm_unpacklo_ps(v20, _mm_xor_ps((__m128)v52, (__m128)xmmword_4C080));
v22 = _mm_xor_si128(_mm_add_epi32(v21, v21), (__m128i)xmmword_4C080);
v23 = _mm_cmpgt_epi32(v22, (__m128i)xmmword_50E80);
v24 = _mm_add_ps(
(__m128)_mm_or_si128(
_mm_andnot_si128(v23, (__m128i)xmmword_50EB0),
_mm_and_si128(
_mm_add_epi32(_mm_and_si128(v21, (__m128i)xmmword_50E90), (__m128i)xmmword_50EA0),
v23)),
_mm_mul_ps(
_mm_mul_ps(
_mm_and_ps(_mm_unpacklo_ps(v20, (__m128)v52), (__m128)xmmword_4C020),
(__m128)xmmword_50E60),
(__m128)xmmword_50E70));
v25 = _mm_cmpgt_epi32(v22, (__m128i)xmmword_50EF0);
v8 = v61;
v26 = (_DWORD *)(v61 + 24 * v17);
*v26 = _mm_cvtsi128_si32(
_mm_shufflelo_epi16(
_mm_or_si128(
_mm_or_si128(
_mm_and_si128(v25, (__m128i)xmmword_50F00),
_mm_and_si128(_mm_srli_epi32(v21, 0x10u), (__m128i)xmmword_50EE0)),
_mm_andnot_si128(
v25,
_mm_add_epi32(
(__m128i)_mm_and_ps(v24, (__m128)xmmword_50ED0),
_mm_and_si128(_mm_srli_epi32((__m128i)v24, 0xDu), (__m128i)xmmword_50EC0)))),
232));
v27 = 0LL;
v28 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_4C030);
v30 = _mm_load_si128((const __m128i *)&xmmword_51030);
v31 = _mm_load_si128((const __m128i *)&xmmword_51040);
v32 = _mm_load_si128((const __m128i *)&xmmword_50E40);
v33 = _mm_load_si128((const __m128i *)&xmmword_50E50);
v34 = _mm_load_si128((const __m128i *)&xmmword_50F30);
v35 = _mm_load_si128((const __m128i *)&xmmword_50F40);
v36 = _mm_load_si128((const __m128i *)&xmmword_4C040);
do
{
v37 = _mm_cvtsi32_si128(v62[v28]);
v38 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v28 * 4), 68);
v39 = (__m128)_mm_or_si128(v38, v30);
v40 = (__m128)_mm_or_si128(v38, v31);
v41 = _mm_cvtsi32_si128(*(_DWORD *)((char *)v62 + v40.m128_u64[0]));
*(_DWORD *)(v15 + v28 * 4) = _mm_cvtsi128_si32(
_mm_or_si128(
_mm_and_si128(_mm_slli_epi16(v41, 4u), v33),
_mm_and_si128(v37, v32)));
v42 = _mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_and_si128(_mm_srli_epi16(v37, 4u), v34), (__m128i)0LL),
(__m128i)0LL);
v43 = _mm_cvttps_epi32((__m128)_mm_add_epi32(_mm_slli_epi32(si128, 0x17u), v35));
v44 = _mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_and_si128(_mm_srli_epi16(v41, 4u), v34), (__m128i)0LL),
(__m128i)0LL);
v45 = _mm_cvttps_epi32((__m128)_mm_add_epi32(
_mm_slli_epi32((__m128i)_mm_shuffle_ps(v40, v39, 136), 0x17u),
v35));
v27 = _mm_or_si128(
v27,
_mm_add_epi32(
_mm_unpacklo_epi32(
_mm_shuffle_epi32(_mm_mul_epu32(v44, v45), 232),
_mm_shuffle_epi32(
_mm_mul_epu32(_mm_shuffle_epi32(v45, 245), _mm_shuffle_epi32(v44, 245)),
232)),
_mm_unpacklo_epi32(
_mm_shuffle_epi32(_mm_mul_epu32(v42, v43), 232),
_mm_shuffle_epi32(
_mm_mul_epu32(_mm_shuffle_epi32(v43, 245), _mm_shuffle_epi32(v42, 245)),
232))));
++v28;
si128 = _mm_add_epi32(si128, v36);
}
while ( v28 != 4 );
v46 = _mm_or_si128(_mm_shuffle_epi32(v27, 238), v27);
v26[1] = _mm_cvtsi128_si32(_mm_or_si128(_mm_shuffle_epi32(v46, 85), v46));
++v17;
v9 += 128LL;
v16 += 128LL;
v15 += 24LL;
v14 = v49;
}
while ( v17 != v60 );
}
}
v9 = v56 + v50;
v10 = v57;
v8 += v57;
v11 = v59 + 1;
v53 += v57;
v7 = v58;
v6 = v54;
}
while ( v59 + 1 != v58 );
}
}
else
{
quantize_row_q5_1_ref(a1, a2, a3 * a4);
v10 = ggml_row_size(7u, v6, v47);
}
return v7 * v10;
}
|
quantize_q5_1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV R14,RCX
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
MOV qword ptr [RSP + 0x38],R8
TEST R8,R8
JZ 0x001329c9
MOV EDI,0x7
MOV RSI,R14
CALL 0x001178b0
TEST RBX,RBX
JLE 0x001329e8
CVTSI2SS XMM0,R14
MOVSS dword ptr [RSP + 0x1c],XMM0
MOV RCX,R14
SHR RCX,0x5
MOV qword ptr [RSP + 0x60],RCX
LEA RCX,[R14*0x4]
MOV qword ptr [RSP + 0x40],RCX
LEA RCX,[R15 + 0x8]
MOV qword ptr [RSP + 0x28],RCX
XOR ECX,ECX
MOV qword ptr [RSP + 0x50],RBX
MOV qword ptr [RSP + 0x30],R14
MOV qword ptr [RSP + 0x48],RAX
LAB_0013265a:
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x10],R12
TEST R14,R14
JLE 0x00132995
XORPS XMM1,XMM1
XOR EAX,EAX
MOV RCX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0013267c:
MOVSS XMM0,dword ptr [RDX + RAX*0x4]
MULSS XMM0,XMM0
ADDSS XMM1,XMM0
INC RAX
CMP RCX,RAX
JNZ 0x0013267c
CMP RCX,0x20
JL 0x00132995
DIVSS XMM1,dword ptr [RSP + 0x1c]
MOV RBX,qword ptr [RSP + 0x28]
MOV RBP,qword ptr [RSP + 0x38]
MOV R12,qword ptr [RSP + 0x10]
XOR R14D,R14D
MOVSS dword ptr [RSP + 0xc],XMM1
MOV qword ptr [RSP + 0x68],R15
LAB_001326be:
MOV R13,R14
SHL R13,0x7
ADD R13,qword ptr [RSP + 0x10]
XOR R15D,R15D
LAB_001326cd:
MOVSS XMM2,dword ptr [RBP + R15*0x4]
MOVSS XMM0,dword ptr [R12 + R15*0x4]
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
UCOMISS XMM0,dword ptr [0x001512c4]
JC 0x001326f1
SQRTSS XMM0,XMM0
JMP 0x00132708
LAB_001326f1:
MOVSS dword ptr [RSP + 0x20],XMM2
CALL 0x00117f80
MOVSS XMM2,dword ptr [RSP + 0x20]
MOVSS XMM1,dword ptr [RSP + 0xc]
LAB_00132708:
MULSS XMM2,XMM0
MOVSS dword ptr [RSP + R15*0x4 + 0xb0],XMM2
INC R15
CMP R15,0x20
JNZ 0x001326cd
LEA RAX,[RSP + 0x90]
MOV qword ptr [RSP],RAX
MOV EDI,0x20
MOV ESI,0x1f
MOV RDX,R13
LEA RCX,[RSP + 0xb0]
LEA R8,[RSP + 0x70]
LEA R9,[RSP + 0x24]
CALL 0x0013bef2
MOVSS XMM2,dword ptr [RSP + 0x24]
MOVAPS XMM1,XMM0
UNPCKLPS XMM0,XMM2
MOVAPS XMM3,xmmword ptr [0x0014c080]
XORPS XMM2,XMM3
UNPCKLPS XMM1,XMM2
MOVAPS XMM2,XMM1
PADDD XMM2,XMM1
PXOR XMM2,XMM3
MOVDQA XMM3,XMM2
PCMPGTD XMM3,xmmword ptr [0x00150e80]
MOVDQA XMM4,XMM1
PAND XMM4,xmmword ptr [0x00150e90]
PADDD XMM4,xmmword ptr [0x00150ea0]
PAND XMM4,XMM3
PANDN XMM3,xmmword ptr [0x00150eb0]
POR XMM3,XMM4
ANDPS XMM0,xmmword ptr [0x0014c020]
MULPS XMM0,xmmword ptr [0x00150e60]
MULPS XMM0,xmmword ptr [0x00150e70]
ADDPS XMM3,XMM0
MOVAPS XMM0,XMM3
PSRLD XMM0,0xd
PAND XMM0,xmmword ptr [0x00150ec0]
ANDPS XMM3,xmmword ptr [0x00150ed0]
PADDD XMM3,XMM0
PCMPGTD XMM2,xmmword ptr [0x00150ef0]
MOVDQA XMM0,XMM2
PANDN XMM0,XMM3
PSRLD XMM1,0x10
PAND XMM1,xmmword ptr [0x00150ee0]
PAND XMM2,xmmword ptr [0x00150f00]
POR XMM2,XMM1
LEA RAX,[R14 + R14*0x2]
MOV R15,qword ptr [RSP + 0x68]
LEA RAX,[R15 + RAX*0x8]
POR XMM2,XMM0
PSHUFLW XMM0,XMM2,0xe8
MOVD dword ptr [RAX],XMM0
PXOR XMM0,XMM0
XOR ECX,ECX
MOVDQA XMM1,xmmword ptr [0x0014c030]
MOVDQA XMM8,xmmword ptr [0x00151030]
MOVDQA XMM9,xmmword ptr [0x00151040]
MOVDQA XMM10,xmmword ptr [0x00150e40]
MOVDQA XMM11,xmmword ptr [0x00150e50]
MOVDQA XMM12,xmmword ptr [0x00150f30]
PXOR XMM13,XMM13
MOVDQA XMM14,xmmword ptr [0x00150f40]
MOVDQA XMM15,xmmword ptr [0x0014c040]
LAB_0013286b:
MOVD XMM5,dword ptr [RSP + RCX*0x1 + 0x70]
MOVQ XMM2,RCX
PSHUFD XMM2,XMM2,0x44
MOVDQA XMM4,XMM2
POR XMM4,XMM8
POR XMM2,XMM9
MOVQ RDX,XMM2
MOVD XMM3,dword ptr [RSP + RDX*0x1 + 0x70]
MOVDQA XMM6,XMM5
PAND XMM6,XMM10
MOVDQA XMM7,XMM3
PSLLW XMM7,0x4
PAND XMM7,XMM11
POR XMM7,XMM6
MOVD dword ptr [RBX + RCX*0x1],XMM7
PSRLW XMM5,0x4
PAND XMM5,XMM12
PUNPCKLBW XMM5,XMM13
PUNPCKLWD XMM5,XMM13
MOVDQA XMM6,XMM1
PSLLD XMM6,0x17
PADDD XMM6,XMM14
CVTTPS2DQ XMM6,XMM6
PSHUFD XMM7,XMM5,0xf5
PMULUDQ XMM5,XMM6
PSHUFD XMM5,XMM5,0xe8
PSHUFD XMM6,XMM6,0xf5
PMULUDQ XMM6,XMM7
PSHUFD XMM6,XMM6,0xe8
PUNPCKLDQ XMM5,XMM6
PSRLW XMM3,0x4
PAND XMM3,XMM12
PUNPCKLBW XMM3,XMM13
PUNPCKLWD XMM3,XMM13
SHUFPS XMM2,XMM4,0x88
PSLLD XMM2,0x17
PADDD XMM2,XMM14
CVTTPS2DQ XMM2,XMM2
PSHUFD XMM4,XMM3,0xf5
PMULUDQ XMM3,XMM2
PSHUFD XMM3,XMM3,0xe8
PSHUFD XMM2,XMM2,0xf5
PMULUDQ XMM2,XMM4
PSHUFD XMM2,XMM2,0xe8
PUNPCKLDQ XMM3,XMM2
PADDD XMM3,XMM5
POR XMM0,XMM3
ADD RCX,0x4
PADDD XMM1,XMM15
CMP RCX,0x10
JNZ 0x0013286b
PSHUFD XMM1,XMM0,0xee
POR XMM1,XMM0
PSHUFD XMM0,XMM1,0x55
POR XMM0,XMM1
MOVD dword ptr [RAX + 0x4],XMM0
INC R14
MOV EAX,0x80
ADD R12,RAX
ADD RBP,RAX
ADD RBX,0x18
CMP R14,qword ptr [RSP + 0x60]
MOVSS XMM1,dword ptr [RSP + 0xc]
JNZ 0x001326be
LAB_00132995:
MOV R12,qword ptr [RSP + 0x10]
ADD R12,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x48]
ADD R15,RAX
MOV RCX,qword ptr [RSP + 0x58]
INC RCX
ADD qword ptr [RSP + 0x28],RAX
MOV RBX,qword ptr [RSP + 0x50]
CMP RCX,RBX
MOV R14,qword ptr [RSP + 0x30]
JNZ 0x0013265a
JMP 0x001329e8
LAB_001329c9:
MOV RDX,R14
IMUL RDX,RBX
MOV RDI,R12
MOV RSI,R15
CALL 0x00117980
MOV EDI,0x7
MOV RSI,R14
CALL 0x001178b0
LAB_001329e8:
IMUL RAX,RBX
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long quantize_q5_1(long param_1,long param_2,long param_3,ulong param_4,long param_5)
{
int4 *puVar1;
int1 auVar2 [14];
int1 auVar3 [14];
int1 auVar4 [14];
int1 auVar5 [15];
unkuint9 Var6;
int1 auVar7 [11];
int1 auVar8 [13];
int1 auVar9 [14];
int1 auVar10 [11];
int1 auVar11 [14];
int1 auVar12 [15];
int1 auVar13 [15];
int1 auVar14 [15];
int1 auVar15 [15];
uint6 uVar16;
uint6 uVar17;
int iVar18;
int iVar19;
int iVar20;
int iVar21;
int iVar22;
int iVar23;
int iVar24;
int iVar25;
ulong uVar26;
long lVar27;
long lVar28;
long lVar29;
long lVar30;
float fVar31;
uint extraout_XMM0_Da;
uint extraout_XMM0_Db;
int1 auVar32 [16];
float fVar33;
int iVar34;
int iVar35;
int iVar36;
int iVar37;
uint uVar38;
uint uVar39;
uint uVar43;
uint uVar44;
uint uVar45;
int1 auVar40 [16];
int1 auVar41 [16];
int1 auVar42 [16];
uint uVar46;
float fVar47;
int1 auVar48 [15];
uint uVar50;
uint uVar51;
float fVar52;
uint uVar53;
float fVar54;
int1 auVar49 [16];
ushort uVar55;
int1 auVar56 [15];
int1 auVar57 [16];
int1 auVar58 [16];
uint local_144;
long local_140;
ulong local_138;
long local_130;
long local_128;
long local_120;
long local_118;
long local_110;
ulong local_108;
long local_100;
uint local_f8 [8];
int1 local_d8 [32];
float local_b8 [34];
local_130 = param_5;
if (param_5 == 0) {
quantize_row_q5_1_ref(param_1,param_2,param_4 * param_3);
local_120 = ggml_row_size(7,param_4);
}
else {
local_120 = ggml_row_size(7,param_4);
if (0 < param_3) {
local_108 = param_4 >> 5;
local_128 = param_4 * 4;
local_140 = param_2 + 8;
local_110 = 0;
local_100 = param_2;
local_138 = param_4;
local_118 = param_3;
do {
if (0 < (long)local_138) {
fVar33 = 0.0;
uVar26 = 0;
do {
fVar47 = *(float *)(param_1 + uVar26 * 4);
fVar33 = fVar33 + fVar47 * fVar47;
uVar26 = uVar26 + 1;
} while (local_138 != uVar26);
if (0x1f < (long)local_138) {
uVar26 = 0;
lVar27 = local_140;
lVar28 = local_130;
lVar29 = param_1;
do {
lVar30 = 0;
do {
fVar47 = *(float *)(lVar28 + lVar30 * 4);
fVar31 = *(float *)(lVar29 + lVar30 * 4);
fVar31 = fVar31 * fVar31 + fVar33 / (float)(long)param_4;
if (fVar31 < DAT_001512c4) {
fVar31 = sqrtf(fVar31);
}
else {
fVar31 = SQRT(fVar31);
}
local_b8[lVar30] = fVar47 * fVar31;
lVar30 = lVar30 + 1;
} while (lVar30 != 0x20);
make_qkx3_quants(0x20,0x1f,uVar26 * 0x80 + param_1,local_b8,local_f8,&local_144,
local_d8);
uVar38 = local_144 ^ _DAT_0014c080;
uVar39 = extraout_XMM0_Da * 2 ^ _DAT_0014c080;
uVar43 = uVar38 * 2 ^ _UNK_0014c084;
uVar44 = extraout_XMM0_Db * 2 ^ _UNK_0014c088;
uVar45 = _UNK_0014c084 * 2 ^ _UNK_0014c08c;
uVar46 = -(uint)(_DAT_00150e80 < (int)uVar39);
uVar50 = -(uint)(_UNK_00150e84 < (int)uVar43);
uVar51 = -(uint)(_UNK_00150e88 < (int)uVar44);
uVar53 = -(uint)(_UNK_00150e8c < (int)uVar45);
fVar47 = (float)(~uVar46 & _DAT_00150eb0 |
(extraout_XMM0_Da & _DAT_00150e90) + _DAT_00150ea0 & uVar46) +
(float)(extraout_XMM0_Da & _DAT_0014c020) * _DAT_00150e60 * _DAT_00150e70;
fVar31 = (float)(~uVar50 & _UNK_00150eb4 |
(uVar38 & _UNK_00150e94) + _UNK_00150ea4 & uVar50) +
(float)(local_144 & _UNK_0014c024) * _UNK_00150e64 * _UNK_00150e74;
fVar52 = (float)(~uVar51 & _UNK_00150eb8 |
(extraout_XMM0_Db & _UNK_00150e98) + _UNK_00150ea8 & uVar51) +
(float)(extraout_XMM0_Db & _UNK_0014c028) * _UNK_00150e68 * _UNK_00150e78;
fVar54 = (float)(~uVar53 & _UNK_00150ebc |
(_UNK_0014c084 & _UNK_00150e9c) + _UNK_00150eac & uVar53) +
_UNK_00150e6c * 0.0 * _UNK_00150e7c;
auVar49._0_4_ = ((uint)fVar47 & _DAT_00150ed0) + ((uint)fVar47 >> 0xd & _DAT_00150ec0)
;
auVar49._4_4_ = ((uint)fVar31 & _UNK_00150ed4) + ((uint)fVar31 >> 0xd & _UNK_00150ec4)
;
auVar49._8_4_ = ((uint)fVar52 & _UNK_00150ed8) + ((uint)fVar52 >> 0xd & _UNK_00150ec8)
;
auVar49._12_4_ =
((uint)fVar54 & _UNK_00150edc) + ((uint)fVar54 >> 0xd & _UNK_00150ecc);
auVar40._0_4_ = -(uint)(_DAT_00150ef0 < (int)uVar39);
auVar40._4_4_ = -(uint)(_UNK_00150ef4 < (int)uVar43);
auVar40._8_4_ = -(uint)(_UNK_00150ef8 < (int)uVar44);
auVar40._12_4_ = -(uint)(_UNK_00150efc < (int)uVar45);
auVar32._0_4_ = extraout_XMM0_Da >> 0x10;
auVar32._4_4_ = uVar38 >> 0x10;
auVar32._8_4_ = extraout_XMM0_Db >> 0x10;
auVar32._12_4_ = _UNK_0014c084 >> 0x10;
puVar1 = (int4 *)(local_100 + uVar26 * 0x18);
auVar32 = pshuflw(~auVar40 & auVar49,
auVar40 & _DAT_00150f00 | auVar32 & _DAT_00150ee0 |
~auVar40 & auVar49,0xe8);
*puVar1 = auVar32._0_4_;
auVar49 = _DAT_00151040;
auVar40 = _DAT_00151030;
iVar25 = _UNK_00150f4c;
iVar24 = _UNK_00150f48;
iVar23 = _UNK_00150f44;
iVar22 = _DAT_00150f40;
auVar32 = _DAT_00150f30;
uVar39 = _DAT_00150e50;
uVar38 = _DAT_00150e40;
iVar21 = _UNK_0014c04c;
iVar20 = _UNK_0014c048;
iVar19 = _UNK_0014c044;
iVar18 = _DAT_0014c040;
uVar43 = 0;
uVar44 = 0;
uVar45 = 0;
uVar46 = 0;
lVar30 = 0;
iVar34 = _DAT_0014c030;
iVar35 = _UNK_0014c034;
iVar36 = _UNK_0014c038;
iVar37 = _UNK_0014c03c;
do {
uVar50 = *(uint *)((long)local_f8 + lVar30);
auVar41._8_4_ = (int)lVar30;
auVar41._0_8_ = lVar30;
auVar41._12_4_ = (int)((ulong)lVar30 >> 0x20);
auVar42 = auVar41 | auVar49;
uVar51 = *(uint *)((long)local_f8 + auVar42._0_8_);
auVar58 = psllw(ZEXT416(uVar51),4);
*(uint *)(lVar27 + lVar30) = auVar58._0_4_ & uVar39 | uVar50 & uVar38;
auVar56 = ZEXT415(CONCAT22((ushort)(uVar50 >> 0x14),(ushort)uVar50 >> 4)) &
auVar32._0_15_;
Var6 = CONCAT81(SUB158(ZEXT115(0) << 0x40,7),auVar56[3]);
auVar12._9_6_ = 0;
auVar12._0_9_ = Var6;
auVar7._1_10_ = SUB1510(auVar12 << 0x30,5);
auVar7[0] = auVar56[2];
auVar13._11_4_ = 0;
auVar13._0_11_ = auVar7;
auVar8._1_12_ = SUB1512(auVar13 << 0x20,3);
auVar8[0] = auVar56[1];
uVar55 = CONCAT11(0,auVar56[0]);
auVar48._2_13_ = auVar8;
auVar48._0_2_ = uVar55;
auVar3._10_2_ = 0;
auVar3._0_10_ = auVar48._0_10_;
auVar3._12_2_ = (short)Var6;
uVar16 = CONCAT42(auVar3._10_4_,auVar7._0_2_);
auVar9._6_8_ = 0;
auVar9._0_6_ = uVar16;
auVar57._4_4_ = (int)(float)(iVar35 * 0x800000 + iVar23);
auVar57._12_4_ = (int)(float)(iVar37 * 0x800000 + iVar25);
auVar57._0_4_ = auVar57._4_4_;
auVar57._8_4_ = auVar57._12_4_;
auVar48 = ZEXT415(CONCAT22((ushort)(uVar51 >> 0x14),(ushort)uVar51 >> 4)) &
auVar32._0_15_;
Var6 = CONCAT81(SUB158(ZEXT115(0) << 0x40,7),auVar48[3]);
auVar14._9_6_ = 0;
auVar14._0_9_ = Var6;
auVar10._1_10_ = SUB1510(auVar14 << 0x30,5);
auVar10[0] = auVar48[2];
auVar15._11_4_ = 0;
auVar15._0_11_ = auVar10;
auVar56[2] = auVar48[1];
auVar56._0_2_ = auVar48._0_2_;
auVar56._3_12_ = SUB1512(auVar15 << 0x20,3);
auVar5._2_13_ = auVar56._2_13_;
auVar5._0_2_ = auVar48._0_2_ & 0xff;
auVar2._10_2_ = 0;
auVar2._0_10_ = auVar5._0_10_;
auVar2._12_2_ = (short)Var6;
uVar17 = CONCAT42(auVar2._10_4_,auVar10._0_2_);
auVar11._6_8_ = 0;
auVar11._0_6_ = uVar17;
auVar4._4_2_ = auVar56._2_2_;
auVar4._0_4_ = auVar5._0_4_;
auVar4._6_8_ = SUB148(auVar11 << 0x40,6);
auVar58._4_4_ = (int)(float)(auVar42._8_4_ * 0x800000 + iVar23);
auVar58._12_4_ = (int)(float)(SUB164(auVar41 | auVar40,8) * 0x800000 + iVar25);
auVar58._0_4_ = auVar58._4_4_;
auVar58._8_4_ = auVar58._12_4_;
uVar43 = uVar43 | (auVar5._0_4_ & 0xffff) *
(int)(float)(auVar42._0_4_ * 0x800000 + iVar22) +
(uint)uVar55 * (int)(float)(iVar34 * 0x800000 + iVar22);
uVar44 = uVar44 | auVar58._4_4_ * auVar4._4_4_ +
auVar57._4_4_ *
(int)CONCAT82(SUB148(auVar9 << 0x40,6),auVar8._0_2_);
uVar45 = uVar45 | (int)(((ulong)uVar17 & 0xffffffff) *
(ulong)(uint)(int)(float)(SUB164(auVar41 | auVar40,0) *
0x800000 + iVar24)) +
(int)(((ulong)uVar16 & 0xffffffff) *
(ulong)(uint)(int)(float)(iVar36 * 0x800000 + iVar24));
uVar46 = uVar46 | (int)((auVar58._8_8_ & 0xffffffff) *
(ulong)(auVar2._10_4_ >> 0x10)) +
(int)((auVar57._8_8_ & 0xffffffff) *
(ulong)(auVar3._10_4_ >> 0x10));
lVar30 = lVar30 + 4;
iVar34 = iVar34 + iVar18;
iVar35 = iVar35 + iVar19;
iVar36 = iVar36 + iVar20;
iVar37 = iVar37 + iVar21;
} while (lVar30 != 0x10);
puVar1[1] = uVar46 | uVar44 | uVar45 | uVar43;
uVar26 = uVar26 + 1;
lVar29 = lVar29 + 0x80;
lVar28 = lVar28 + 0x80;
lVar27 = lVar27 + 0x18;
} while (uVar26 != local_108);
}
}
param_1 = param_1 + local_128;
local_100 = local_100 + local_120;
local_110 = local_110 + 1;
local_140 = local_140 + local_120;
param_3 = local_118;
} while (local_110 != local_118);
}
}
return local_120 * param_3;
}
|
|
19,587
|
test_bug6058
|
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
|
static int test_bug6058(MYSQL *mysql)
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[1];
MYSQL_RES *res;
MYSQL_ROW row;
const char *stmt_text;
char buffer[30];
ulong length;
int rc;
stmt_text= "SELECT CAST('0000-00-00' AS DATE)";
rc= mysql_real_query(mysql, SL(stmt_text));
check_mysql_rc(rc, mysql);
res= mysql_store_result(mysql);
row= mysql_fetch_row(res);
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, SL(stmt_text));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
memset(my_bind, '\0', sizeof(my_bind));
my_bind[0].buffer_type = MYSQL_TYPE_STRING;
my_bind[0].buffer = &buffer;
my_bind[0].buffer_length = sizeof(buffer);
my_bind[0].length = &length;
mysql_stmt_bind_result(stmt, my_bind);
rc= mysql_stmt_fetch(stmt);
check_stmt_rc(rc, stmt);
FAIL_UNLESS(strcmp(row[0], buffer) == 0, "row[0] != buffer");
mysql_free_result(res);
mysql_stmt_close(stmt);
return OK;
}
|
O0
|
c
|
test_bug6058:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
leaq 0x40e2d(%rip), %rax # 0x69bd0
movq %rax, -0xd8(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x141a0
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq %rax, %rdx
callq 0x377f0
movl %eax, -0xe4(%rbp)
cmpl $0x0, -0xe4(%rbp)
je 0x28e4f
movl -0xe4(%rbp), %eax
movl %eax, -0x104(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x100(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3c3c0
movl -0x104(%rbp), %esi
movq -0x100(%rbp), %rdx
movl %eax, %ecx
leaq 0x3c8a6(%rip), %rdi # 0x656d5
leaq 0x3d237(%rip), %r8 # 0x6606d
movl $0xb69, %r9d # imm = 0xB69
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x34(%rbp)
jmp 0x29041
jmp 0x28e51
movq -0x40(%rbp), %rdi
callq 0x3a0c0
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x3a400
movq %rax, -0xd0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x44950
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x141a0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0xe4(%rbp)
cmpl $0x0, -0xe4(%rbp)
je 0x28efd
movq -0x48(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3c6b2(%rip), %rdi # 0x65590
leaq 0x3d188(%rip), %rdx # 0x6606d
movl $0xb6f, %ecx # imm = 0xB6F
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x34(%rbp)
jmp 0x29041
jmp 0x28eff
movq -0x48(%rbp), %rdi
callq 0x46580
movl %eax, -0xe4(%rbp)
cmpl $0x0, -0xe4(%rbp)
je 0x28f49
movq -0x48(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3c666(%rip), %rdi # 0x65590
leaq 0x3d13c(%rip), %rdx # 0x6606d
movl $0xb71, %ecx # imm = 0xB71
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x34(%rbp)
jmp 0x29041
jmp 0x28f4b
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x14260
movl $0xfe, -0x60(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x1e, -0x80(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x43940
movq -0x48(%rbp), %rdi
callq 0x44020
movl %eax, -0xe4(%rbp)
cmpl $0x0, -0xe4(%rbp)
je 0x28fdd
movq -0x48(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3c5cf(%rip), %rdi # 0x65590
leaq 0x3d0a5(%rip), %rdx # 0x6606d
movl $0xb7a, %ecx # imm = 0xB7A
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x34(%rbp)
jmp 0x29041
jmp 0x28fdf
jmp 0x28fe1
movq -0xd0(%rbp), %rax
movq (%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x14600
cmpl $0x0, %eax
je 0x29023
leaq 0x3c590(%rip), %rdi # 0x65590
leaq 0x40bb8(%rip), %rsi # 0x69bbf
leaq 0x3d05f(%rip), %rdx # 0x6606d
movl $0xb7c, %ecx # imm = 0xB7C
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x34(%rbp)
jmp 0x29041
jmp 0x29025
movq -0xc8(%rbp), %rdi
callq 0x31900
movq -0x48(%rbp), %rdi
callq 0x43eb0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x11c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2906b
movl -0x11c(%rbp), %eax
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
callq 0x144c0
|
test_bug6058:
push rbp
mov rbp, rsp
sub rsp, 120h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
lea rax, aSelectCast0000; "SELECT CAST('0000-00-00' AS DATE)"
mov [rbp+var_D8], rax
mov rax, [rbp+var_40]
mov [rbp+var_F8], rax
mov rax, [rbp+var_D8]
mov [rbp+var_F0], rax
mov rdi, [rbp+var_D8]
call _strlen
mov rdi, [rbp+var_F8]
mov rsi, [rbp+var_F0]
mov rdx, rax
call mysql_real_query
mov [rbp+var_E4], eax
cmp [rbp+var_E4], 0
jz short loc_28E4F
mov eax, [rbp+var_E4]
mov [rbp+var_104], eax
mov rdi, [rbp+var_40]
call mysql_error
mov [rbp+var_100], rax
mov rdi, [rbp+var_40]
call mysql_errno
mov esi, [rbp+var_104]
mov rdx, [rbp+var_100]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 0B69h
mov al, 0
call diag
mov [rbp+var_34], 1
jmp loc_29041
loc_28E4F:
jmp short $+2
loc_28E51:
mov rdi, [rbp+var_40]
call mysql_store_result
mov [rbp+var_C8], rax
mov rdi, [rbp+var_C8]
call mysql_fetch_row
mov [rbp+var_D0], rax
mov rdi, [rbp+var_40]
call mysql_stmt_init
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_118], rax
mov rax, [rbp+var_D8]
mov [rbp+var_110], rax
mov rdi, [rbp+var_D8]
call _strlen
mov rdi, [rbp+var_118]
mov rsi, [rbp+var_110]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_E4], eax
cmp [rbp+var_E4], 0
jz short loc_28EFD
mov rdi, [rbp+var_48]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0B6Fh
mov al, 0
call diag
mov [rbp+var_34], 1
jmp loc_29041
loc_28EFD:
jmp short $+2
loc_28EFF:
mov rdi, [rbp+var_48]
call mysql_stmt_execute
mov [rbp+var_E4], eax
cmp [rbp+var_E4], 0
jz short loc_28F49
mov rdi, [rbp+var_48]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0B71h
mov al, 0
call diag
mov [rbp+var_34], 1
jmp loc_29041
loc_28F49:
jmp short $+2
loc_28F4B:
lea rdi, [rbp+var_C0]
xor esi, esi
mov edx, 70h ; 'p'
call _memset
mov [rbp+var_60], 0FEh
lea rax, [rbp+var_30]
mov [rbp+var_B0], rax
mov [rbp+var_80], 1Eh
lea rax, [rbp+var_E0]
mov [rbp+var_C0], rax
mov rdi, [rbp+var_48]
lea rsi, [rbp+var_C0]
call mysql_stmt_bind_result
mov rdi, [rbp+var_48]
call mysql_stmt_fetch
mov [rbp+var_E4], eax
cmp [rbp+var_E4], 0
jz short loc_28FDD
mov rdi, [rbp+var_48]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0B7Ah
mov al, 0
call diag
mov [rbp+var_34], 1
jmp short loc_29041
loc_28FDD:
jmp short $+2
loc_28FDF:
jmp short $+2
loc_28FE1:
mov rax, [rbp+var_D0]
mov rdi, [rax]
lea rsi, [rbp+var_30]
call _strcmp
cmp eax, 0
jz short loc_29023
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRow0Buffer; "row[0] != buffer"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0B7Ch
mov al, 0
call diag
mov [rbp+var_34], 1
jmp short loc_29041
loc_29023:
jmp short $+2
loc_29025:
mov rdi, [rbp+var_C8]
call mysql_free_result
mov rdi, [rbp+var_48]
call mysql_stmt_close
mov [rbp+var_34], 0
loc_29041:
mov eax, [rbp+var_34]
mov [rbp+var_11C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2906B
mov eax, [rbp+var_11C]
add rsp, 120h
pop rbp
retn
loc_2906B:
call ___stack_chk_fail
|
long long test_bug6058(long long a1)
{
long long v1; // rax
int v2; // eax
long long v3; // rax
int v4; // eax
int v5; // r8d
int v6; // r9d
int v7; // eax
int v8; // r8d
int v9; // r9d
int v10; // eax
int v11; // r8d
int v12; // r9d
int v13; // r8d
int v14; // r9d
int v16; // [rsp+20h] [rbp-100h]
int v17; // [rsp+3Ch] [rbp-E4h]
char v18; // [rsp+40h] [rbp-E0h] BYREF
const char *v19; // [rsp+48h] [rbp-D8h]
_QWORD *row; // [rsp+50h] [rbp-D0h]
long long v21; // [rsp+58h] [rbp-C8h]
_QWORD v22[12]; // [rsp+60h] [rbp-C0h] BYREF
int v23; // [rsp+C0h] [rbp-60h]
long long v24; // [rsp+D8h] [rbp-48h]
long long v25; // [rsp+E0h] [rbp-40h]
_BYTE v27[40]; // [rsp+F0h] [rbp-30h] BYREF
unsigned long long v28; // [rsp+118h] [rbp-8h]
v28 = __readfsqword(0x28u);
v25 = a1;
v19 = "SELECT CAST('0000-00-00' AS DATE)";
v1 = strlen("SELECT CAST('0000-00-00' AS DATE)");
v17 = mysql_real_query(a1, "SELECT CAST('0000-00-00' AS DATE)", v1);
if ( v17 )
{
v16 = mysql_error(v25);
v2 = mysql_errno(v25);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v17,
v16,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2921);
return 1;
}
else
{
v21 = mysql_store_result(v25);
row = (_QWORD *)mysql_fetch_row(v21);
v24 = mysql_stmt_init(v25);
v3 = strlen(v19);
if ( (unsigned int)mysql_stmt_prepare(v24, v19, v3) )
{
v4 = mysql_stmt_error(v24);
diag(
(unsigned int)"Error: %s (%s: %d)",
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2927,
v5,
v6);
return 1;
}
else if ( (unsigned int)mysql_stmt_execute(v24) )
{
v7 = mysql_stmt_error(v24);
diag(
(unsigned int)"Error: %s (%s: %d)",
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2929,
v8,
v9);
return 1;
}
else
{
memset(v22, 0LL, 112LL);
v23 = 254;
v22[2] = v27;
v22[8] = 30LL;
v22[0] = &v18;
mysql_stmt_bind_result(v24, v22);
if ( (unsigned int)mysql_stmt_fetch(v24) )
{
v10 = mysql_stmt_error(v24);
diag(
(unsigned int)"Error: %s (%s: %d)",
v10,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2938,
v11,
v12);
return 1;
}
else if ( !(unsigned int)strcmp(*row, v27) )
{
mysql_free_result(v21);
mysql_stmt_close(v24);
return 0;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"row[0] != buffer",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2940,
v13,
v14);
return 1;
}
}
}
}
|
test_bug6058:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
LEA RAX,[0x169bd0]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0xf0],RAX
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0xf8]
MOV RSI,qword ptr [RBP + -0xf0]
MOV RDX,RAX
CALL 0x001377f0
MOV dword ptr [RBP + -0xe4],EAX
CMP dword ptr [RBP + -0xe4],0x0
JZ 0x00128e4f
MOV EAX,dword ptr [RBP + -0xe4]
MOV dword ptr [RBP + -0x104],EAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x100],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x104]
MOV RDX,qword ptr [RBP + -0x100]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0xb69
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x34],0x1
JMP 0x00129041
LAB_00128e4f:
JMP 0x00128e51
LAB_00128e51:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0013a0c0
MOV qword ptr [RBP + -0xc8],RAX
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x0013a400
MOV qword ptr [RBP + -0xd0],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00144950
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x118],RAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x110],RAX
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x110]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0xe4],EAX
CMP dword ptr [RBP + -0xe4],0x0
JZ 0x00128efd
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xb6f
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x34],0x1
JMP 0x00129041
LAB_00128efd:
JMP 0x00128eff
LAB_00128eff:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00146580
MOV dword ptr [RBP + -0xe4],EAX
CMP dword ptr [RBP + -0xe4],0x0
JZ 0x00128f49
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xb71
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x34],0x1
JMP 0x00129041
LAB_00128f49:
JMP 0x00128f4b
LAB_00128f4b:
LEA RDI,[RBP + -0xc0]
XOR ESI,ESI
MOV EDX,0x70
CALL 0x00114260
MOV dword ptr [RBP + -0x60],0xfe
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xb0],RAX
MOV qword ptr [RBP + -0x80],0x1e
LEA RAX,[RBP + -0xe0]
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0xc0]
CALL 0x00143940
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00144020
MOV dword ptr [RBP + -0xe4],EAX
CMP dword ptr [RBP + -0xe4],0x0
JZ 0x00128fdd
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xb7a
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x34],0x1
JMP 0x00129041
LAB_00128fdd:
JMP 0x00128fdf
LAB_00128fdf:
JMP 0x00128fe1
LAB_00128fe1:
MOV RAX,qword ptr [RBP + -0xd0]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0x30]
CALL 0x00114600
CMP EAX,0x0
JZ 0x00129023
LEA RDI,[0x165590]
LEA RSI,[0x169bbf]
LEA RDX,[0x16606d]
MOV ECX,0xb7c
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x34],0x1
JMP 0x00129041
LAB_00129023:
JMP 0x00129025
LAB_00129025:
MOV RDI,qword ptr [RBP + -0xc8]
CALL 0x00131900
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00143eb0
MOV dword ptr [RBP + -0x34],0x0
LAB_00129041:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x11c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012906b
MOV EAX,dword ptr [RBP + -0x11c]
ADD RSP,0x120
POP RBP
RET
LAB_0012906b:
CALL 0x001144c0
|
int4 test_bug6058(int8 param_1)
{
char *pcVar1;
int iVar2;
int4 uVar3;
size_t sVar4;
int8 uVar5;
long in_FS_OFFSET;
int1 local_e8 [8];
char *local_e0;
int8 *local_d8;
int8 local_d0;
int1 *local_c8 [2];
char *local_b8;
int8 local_88;
int4 local_68;
int8 local_50;
int8 local_48;
int4 local_3c;
char local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_e0 = "SELECT CAST(\'0000-00-00\' AS DATE)";
local_48 = param_1;
sVar4 = strlen("SELECT CAST(\'0000-00-00\' AS DATE)");
iVar2 = mysql_real_query(param_1,"SELECT CAST(\'0000-00-00\' AS DATE)",sVar4);
if (iVar2 == 0) {
local_d0 = mysql_store_result(local_48);
local_d8 = (int8 *)mysql_fetch_row(local_d0);
uVar5 = mysql_stmt_init(local_48);
pcVar1 = local_e0;
local_50 = uVar5;
sVar4 = strlen(local_e0);
iVar2 = mysql_stmt_prepare(uVar5,pcVar1,sVar4);
if (iVar2 == 0) {
iVar2 = mysql_stmt_execute(local_50);
if (iVar2 == 0) {
memset(local_c8,0,0x70);
local_68 = 0xfe;
local_b8 = local_38;
local_88 = 0x1e;
local_c8[0] = local_e8;
mysql_stmt_bind_result(local_50,local_c8);
iVar2 = mysql_stmt_fetch(local_50);
if (iVar2 == 0) {
iVar2 = strcmp((char *)*local_d8,local_38);
if (iVar2 == 0) {
mysql_free_result(local_d0);
mysql_stmt_close(local_50);
local_3c = 0;
}
else {
diag("Error: %s (%s: %d)","row[0] != buffer",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0xb7c);
local_3c = 1;
}
}
else {
uVar5 = mysql_stmt_error(local_50);
diag("Error: %s (%s: %d)",uVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0xb7a);
local_3c = 1;
}
}
else {
uVar5 = mysql_stmt_error(local_50);
diag("Error: %s (%s: %d)",uVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0xb71);
local_3c = 1;
}
}
else {
uVar5 = mysql_stmt_error(local_50);
diag("Error: %s (%s: %d)",uVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xb6f
);
local_3c = 1;
}
}
else {
uVar5 = mysql_error(local_48);
uVar3 = mysql_errno(local_48);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar5,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xb69);
local_3c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_3c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
19,588
|
Balloc
|
eloqsql/strings/dtoa.c
|
static Bigint *Balloc(int k, Stack_alloc *alloc)
{
Bigint *rv;
DBUG_ASSERT(k <= Kmax);
if (k <= Kmax && alloc->freelist[k])
{
rv= alloc->freelist[k];
alloc->freelist[k]= rv->p.next;
}
else
{
int x, len;
x= 1 << k;
len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP);
if (alloc->free + len <= alloc->end)
{
rv= (Bigint*) alloc->free;
alloc->free+= len;
}
else
rv= (Bigint*) malloc(len);
rv->k= k;
rv->maxwds= x;
}
rv->sign= rv->wds= 0;
rv->p.x= (ULong*) (rv + 1);
return rv;
}
|
O3
|
c
|
Balloc:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0xf, %edi
jg 0x5bbc1
movslq %ebx, %rcx
movq 0x18(%rsi,%rcx,8), %rax
testq %rax, %rax
je 0x5bbc1
movq (%rax), %rdx
movq %rdx, 0x18(%rsi,%rcx,8)
jmp 0x5bbfc
movl $0x1, %r14d
movl %ebx, %ecx
shll %cl, %r14d
movl $0x4, %edx
shll %cl, %edx
addl $0x1f, %edx
andl $-0x8, %edx
movq 0x8(%rsi), %rax
movslq %edx, %rdi
leaq (%rax,%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jbe 0x5bbf1
callq 0x24460
jmp 0x5bbf5
movq %rcx, 0x8(%rsi)
movl %ebx, 0x8(%rax)
movl %r14d, 0xc(%rax)
movq $0x0, 0x10(%rax)
leaq 0x18(%rax), %rcx
movq %rcx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
|
Balloc:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
cmp edi, 0Fh
jg short loc_5BBC1
movsxd rcx, ebx
mov rax, [rsi+rcx*8+18h]
test rax, rax
jz short loc_5BBC1
mov rdx, [rax]
mov [rsi+rcx*8+18h], rdx
jmp short loc_5BBFC
loc_5BBC1:
mov r14d, 1
mov ecx, ebx
shl r14d, cl
mov edx, 4
shl edx, cl
add edx, 1Fh
and edx, 0FFFFFFF8h
mov rax, [rsi+8]
movsxd rdi, edx
lea rcx, [rax+rdi]
cmp rcx, [rsi+10h]
jbe short loc_5BBF1
call _malloc
jmp short loc_5BBF5
loc_5BBF1:
mov [rsi+8], rcx
loc_5BBF5:
mov [rax+8], ebx
mov [rax+0Ch], r14d
loc_5BBFC:
mov qword ptr [rax+10h], 0
lea rcx, [rax+18h]
mov [rax], rcx
pop rbx
pop r14
pop rbp
retn
|
long long Balloc(int a1, long long a2)
{
long long result; // rax
long long v4; // rdi
if ( a1 <= 15 && (result = *(_QWORD *)(a2 + 8LL * a1 + 24)) != 0 )
{
*(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)result;
}
else
{
result = *(_QWORD *)(a2 + 8);
v4 = (int)(((4 << a1) + 31) & 0xFFFFFFF8);
if ( (unsigned long long)(result + v4) <= *(_QWORD *)(a2 + 16) )
*(_QWORD *)(a2 + 8) = result + v4;
else
result = malloc(v4);
*(_DWORD *)(result + 8) = a1;
*(_DWORD *)(result + 12) = 1 << a1;
}
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)result = result + 24;
return result;
}
|
Balloc:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
CMP EDI,0xf
JG 0x0015bbc1
MOVSXD RCX,EBX
MOV RAX,qword ptr [RSI + RCX*0x8 + 0x18]
TEST RAX,RAX
JZ 0x0015bbc1
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSI + RCX*0x8 + 0x18],RDX
JMP 0x0015bbfc
LAB_0015bbc1:
MOV R14D,0x1
MOV ECX,EBX
SHL R14D,CL
MOV EDX,0x4
SHL EDX,CL
ADD EDX,0x1f
AND EDX,0xfffffff8
MOV RAX,qword ptr [RSI + 0x8]
MOVSXD RDI,EDX
LEA RCX,[RAX + RDI*0x1]
CMP RCX,qword ptr [RSI + 0x10]
JBE 0x0015bbf1
CALL 0x00124460
JMP 0x0015bbf5
LAB_0015bbf1:
MOV qword ptr [RSI + 0x8],RCX
LAB_0015bbf5:
MOV dword ptr [RAX + 0x8],EBX
MOV dword ptr [RAX + 0xc],R14D
LAB_0015bbfc:
MOV qword ptr [RAX + 0x10],0x0
LEA RCX,[RAX + 0x18]
MOV qword ptr [RAX],RCX
POP RBX
POP R14
POP RBP
RET
|
void Balloc(int param_1,long param_2)
{
ulong uVar1;
long *plVar2;
size_t __size;
if (param_1 < 0x10) {
plVar2 = *(long **)(param_2 + 0x18 + (long)param_1 * 8);
if (plVar2 != (long *)0x0) {
*(long *)(param_2 + 0x18 + (long)param_1 * 8) = *plVar2;
goto LAB_0015bbfc;
}
}
plVar2 = *(long **)(param_2 + 8);
__size = (size_t)(int)((4 << ((byte)param_1 & 0x1f)) + 0x1fU & 0xfffffff8);
uVar1 = (long)plVar2 + __size;
if (*(ulong *)(param_2 + 0x10) < uVar1) {
plVar2 = (long *)malloc(__size);
}
else {
*(ulong *)(param_2 + 8) = uVar1;
}
*(int *)(plVar2 + 1) = param_1;
*(int *)((long)plVar2 + 0xc) = 1 << ((byte)param_1 & 0x1f);
LAB_0015bbfc:
plVar2[2] = 0;
*plVar2 = (long)(plVar2 + 3);
return;
}
|
|
19,589
|
stbi__hdr_test_core(stbi__context*, char const*)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
static int stbi__hdr_test_core(stbi__context *s, const char *signature)
{
int i;
for (i=0; signature[i]; ++i)
if (stbi__get8(s) != signature[i])
return 0;
stbi__rewind(s);
return 1;
}
|
O0
|
c
|
stbi__hdr_test_core(stbi__context*, char const*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0xa2ece
movq 0x18(%rsp), %rdi
callq 0x8ecc0
movzbl %al, %eax
movq 0x10(%rsp), %rcx
movslq 0xc(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0xa2ebf
movl $0x0, 0x24(%rsp)
jmp 0xa2ee0
jmp 0xa2ec1
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xa2e86
movq 0x18(%rsp), %rdi
callq 0x8ec80
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZL19stbi__hdr_test_coreP13stbi__contextPKc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_1C], 0
loc_A2E86:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_1C]
cmp byte ptr [rax+rcx], 0
jz short loc_A2ECE
mov rdi, [rsp+28h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov rcx, [rsp+28h+var_18]
movsxd rdx, [rsp+28h+var_1C]
movsx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_A2EBF
mov [rsp+28h+var_4], 0
jmp short loc_A2EE0
loc_A2EBF:
jmp short $+2
loc_A2EC1:
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
jmp short loc_A2E86
loc_A2ECE:
mov rdi, [rsp+28h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+28h+var_4], 1
loc_A2EE0:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long stbi__hdr_test_core(_QWORD *a1, long long a2)
{
int i; // [rsp+Ch] [rbp-1Ch]
for ( i = 0; *(_BYTE *)(a2 + i); ++i )
{
if ( (unsigned __int8)stbi__get8((long long)a1) != *(char *)(a2 + i) )
return 0;
}
stbi__rewind(a1);
return 1;
}
|
stbi__hdr_test_core:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],0x0
LAB_001a2e86:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0xc]
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x001a2ece
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0018ecc0
MOVZX EAX,AL
MOV RCX,qword ptr [RSP + 0x10]
MOVSXD RDX,dword ptr [RSP + 0xc]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x001a2ebf
MOV dword ptr [RSP + 0x24],0x0
JMP 0x001a2ee0
LAB_001a2ebf:
JMP 0x001a2ec1
LAB_001a2ec1:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001a2e86
LAB_001a2ece:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0018ec80
MOV dword ptr [RSP + 0x24],0x1
LAB_001a2ee0:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* stbi__hdr_test_core(stbi__context*, char const*) */
int4 stbi__hdr_test_core(stbi__context *param_1,char *param_2)
{
byte bVar1;
int local_1c;
local_1c = 0;
while( true ) {
if (param_2[local_1c] == '\0') {
stbi__rewind(param_1);
return 1;
}
bVar1 = stbi__get8(param_1);
if ((uint)bVar1 != (int)param_2[local_1c]) break;
local_1c = local_1c + 1;
}
return 0;
}
|
|
19,590
|
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, float>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR20 auto write_float(OutputIt out, T value,
format_specs<Char> specs, locale_ref loc)
-> OutputIt {
float_specs fspecs = parse_float_type_spec(specs);
fspecs.sign = specs.sign;
if (detail::signbit(value)) { // value < 0 is false for NaN so use signbit.
fspecs.sign = sign::minus;
value = -value;
} else if (fspecs.sign == sign::minus) {
fspecs.sign = sign::none;
}
if (!detail::isfinite(value))
return write_nonfinite(out, detail::isnan(value), specs, fspecs);
if (specs.align == align::numeric && fspecs.sign) {
auto it = reserve(out, 1);
*it++ = detail::sign<Char>(fspecs.sign);
out = base_iterator(out, it);
fspecs.sign = sign::none;
if (specs.width != 0) --specs.width;
}
memory_buffer buffer;
if (fspecs.format == float_format::hex) {
if (fspecs.sign) buffer.push_back(detail::sign<char>(fspecs.sign));
format_hexfloat(convert_float(value), specs.precision, fspecs, buffer);
return write_bytes<align::right>(out, {buffer.data(), buffer.size()},
specs);
}
int precision = specs.precision >= 0 || specs.type == presentation_type::none
? specs.precision
: 6;
if (fspecs.format == float_format::exp) {
if (precision == max_value<int>())
throw_format_error("number is too big");
else
++precision;
} else if (fspecs.format != float_format::fixed && precision == 0) {
precision = 1;
}
if (const_check(std::is_same<T, float>())) fspecs.binary32 = true;
int exp = format_float(convert_float(value), precision, fspecs, buffer);
fspecs.precision = precision;
auto f = big_decimal_fp{buffer.data(), static_cast<int>(buffer.size()), exp};
return write_float(out, f, specs, fspecs, loc);
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, float>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref):
subq $0x358, %rsp # imm = 0x358
movq %rdi, 0x340(%rsp)
movq %rsi, 0x330(%rsp)
movq %rdx, 0x338(%rsp)
movq %rcx, 0x328(%rsp)
movsd %xmm0, 0x320(%rsp)
leaq 0x330(%rsp), %rdi
callq 0xa0e90
movq %rax, 0x318(%rsp)
movw 0x339(%rsp), %ax
shrw $0x4, %ax
andw $0x7, %ax
movzbl %al, %ecx
movl 0x31c(%rsp), %eax
andl $0xff, %ecx
shll $0x8, %ecx
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl %ecx, %eax
movl %eax, 0x31c(%rsp)
movsd 0x320(%rsp), %xmm0
movsd %xmm0, 0x350(%rsp)
movsd 0x350(%rsp), %xmm0
callq 0x9ac30
testb $0x1, %al
jne 0xb43fc
jmp 0xb443f
movl 0x31c(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x100, %eax # imm = 0x100
movl %eax, 0x31c(%rsp)
movsd 0x320(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x320(%rsp)
jmp 0xb446e
movl 0x31c(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xb446c
movl 0x31c(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x0, %eax
movl %eax, 0x31c(%rsp)
jmp 0xb446e
movsd 0x320(%rsp), %xmm0
callq 0xb4a00
testb $0x1, %al
jne 0xb44f6
movq 0x340(%rsp), %rax
movq %rax, 0x310(%rsp)
movsd 0x320(%rsp), %xmm0
callq 0xb4a30
movq 0x330(%rsp), %rcx
movq %rcx, 0x300(%rsp)
movq 0x338(%rsp), %rcx
movq %rcx, 0x308(%rsp)
movq 0x310(%rsp), %rdi
movq 0x300(%rsp), %rdx
movq 0x308(%rsp), %rcx
movzbl %al, %esi
andl $0x1, %esi
leaq 0x318(%rsp), %r8
callq 0x9aa00
movq %rax, 0x348(%rsp)
jmp 0xb492c
movw 0x339(%rsp), %ax
andw $0xf, %ax
movzbl %al, %eax
cmpl $0x4, %eax
jne 0xb4614
movl 0x31c(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
cmpb $0x0, %al
je 0xb4614
leaq 0x340(%rsp), %rdi
movl $0x1, %esi
callq 0x96090
movq (%rax), %rax
movq %rax, 0x2f8(%rsp)
movl 0x31c(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %edi
callq 0x9af50
movb %al, 0x2f7(%rsp)
leaq 0x2f8(%rsp), %rdi
xorl %esi, %esi
callq 0x2a2b0
movq %rax, 0x2e8(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x2a2d0
movq %rax, %rdi
leaq 0x2f7(%rsp), %rsi
callq 0x2a2e0
movq 0x340(%rsp), %rax
movq %rax, 0x2d8(%rsp)
movq 0x2f8(%rsp), %rax
movq %rax, 0x2d0(%rsp)
movq 0x2d8(%rsp), %rdi
movq 0x2d0(%rsp), %rsi
callq 0x961c0
movq %rax, 0x2e0(%rsp)
movq 0x2e0(%rsp), %rax
movq %rax, 0x340(%rsp)
movl 0x31c(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x0, %eax
movl %eax, 0x31c(%rsp)
cmpl $0x0, 0x330(%rsp)
je 0xb4612
movl 0x330(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x330(%rsp)
jmp 0xb4614
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x16d00
movq 0x38(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x90340
jmp 0xb463a
leaq 0xb7(%rsp), %rdi
callq 0x16790
movl 0x31c(%rsp), %eax
andl $0xff, %eax
cmpb $0x3, %al
jne 0xb47af
movl 0x31c(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
cmpb $0x0, %al
je 0xb46e7
movzbl 0x31d(%rsp), %edi
callq 0x9af50
movb %al, 0xa3(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xa3(%rsp), %rsi
callq 0x2a310
jmp 0xb4699
jmp 0xb46e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb7(%rsp), %rdi
callq 0x16790
jmp 0xb493c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x903a0
jmp 0xb493c
movsd 0x320(%rsp), %xmm0
callq 0xb3ce0
movl 0x334(%rsp), %edi
movq 0x318(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xb29f0
jmp 0xb4723
movq 0x340(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x29aa0
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x29ab0
movq 0x28(%rsp), %rsi
movq %rax, %rdx
leaq 0x80(%rsp), %rdi
callq 0x29ac0
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x330(%rsp), %rcx
callq 0xa1670
movq %rax, 0x30(%rsp)
jmp 0xb4795
movq 0x30(%rsp), %rax
movq %rax, 0x348(%rsp)
movl $0x1, 0x7c(%rsp)
jmp 0xb491f
cmpl $0x0, 0x334(%rsp)
jge 0xb47c3
cmpb $0x0, 0x338(%rsp)
jne 0xb47d0
movl 0x334(%rsp), %eax
movl %eax, 0x1c(%rsp)
jmp 0xb47db
movl $0x6, %eax
movl %eax, 0x1c(%rsp)
jmp 0xb47db
movl 0x1c(%rsp), %eax
movl %eax, 0x78(%rsp)
movl 0x31c(%rsp), %eax
andl $0xff, %eax
cmpb $0x1, %al
jne 0xb4825
movl 0x78(%rsp), %eax
movl %eax, 0x18(%rsp)
callq 0x9c830
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jne 0xb4818
leaq 0x656ad(%rip), %rdi # 0x119ebe
callq 0x8ecd0
jmp 0xb4818
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0xb4846
movl 0x31c(%rsp), %eax
andl $0xff, %eax
cmpb $0x2, %al
je 0xb4844
cmpl $0x0, 0x78(%rsp)
jne 0xb4844
movl $0x1, 0x78(%rsp)
jmp 0xb4846
movsd 0x320(%rsp), %xmm0
callq 0xb3ce0
movl 0x78(%rsp), %edi
movq 0x318(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xb2e40
movl %eax, 0x14(%rsp)
jmp 0xb487d
movl 0x14(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x318(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x29aa0
movq (%rsp), %rdi
movq %rax, 0x58(%rsp)
callq 0x29ab0
movl %eax, 0x60(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x64(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x318(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x328(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r8
leaq 0x58(%rsp), %rsi
leaq 0x330(%rsp), %rdx
callq 0xa1b30
movq %rax, 0x8(%rsp)
jmp 0xb490a
movq 0x8(%rsp), %rax
movq %rax, 0x348(%rsp)
movl $0x1, 0x7c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x903a0
movq 0x348(%rsp), %rax
addq $0x358, %rsp # imm = 0x358
retq
movq 0xa8(%rsp), %rdi
callq 0x16cf0
nopl (%rax)
|
_ZN3fmt3v106detail11write_floatIcNS0_8appenderEdEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE:
sub rsp, 358h
mov [rsp+358h+var_18], rdi
mov [rsp+358h+var_28], rsi
mov [rsp+358h+var_20], rdx
mov [rsp+358h+var_30], rcx
movsd [rsp+358h+var_38], xmm0
lea rdi, [rsp+358h+var_28]
call _ZN3fmt3v106detail21parse_float_type_specIcEENS1_11float_specsERKNS0_12format_specsIT_EE; fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&)
mov [rsp+358h+var_40], rax
mov ax, word ptr [rsp+358h+var_20+1]
shr ax, 4
and ax, 7
movzx ecx, al
mov eax, dword ptr [rsp+358h+var_40+4]
and ecx, 0FFh
shl ecx, 8
and eax, 0FFFF00FFh
or eax, ecx
mov dword ptr [rsp+358h+var_40+4], eax
movsd xmm0, [rsp+358h+var_38]
movsd [rsp+358h+var_8], xmm0
movsd xmm0, [rsp+358h+var_8]; double
call _ZSt7signbitd; std::signbit(double)
test al, 1
jnz short loc_B43FC
jmp short loc_B443F
loc_B43FC:
mov eax, dword ptr [rsp+358h+var_40+4]
and eax, 0FFFF00FFh
or eax, 100h
mov dword ptr [rsp+358h+var_40+4], eax
movsd xmm0, [rsp+358h+var_38]
movq rax, xmm0
mov rcx, 8000000000000000h
xor rax, rcx
movq xmm0, rax
movsd [rsp+358h+var_38], xmm0
jmp short loc_B446E
loc_B443F:
mov eax, dword ptr [rsp+358h+var_40+4]
shr eax, 8
and eax, 0FFh
movzx eax, al
cmp eax, 1
jnz short loc_B446C
mov eax, dword ptr [rsp+358h+var_40+4]
and eax, 0FFFF00FFh
or eax, 0
mov dword ptr [rsp+358h+var_40+4], eax
loc_B446C:
jmp short $+2
loc_B446E:
movsd xmm0, [rsp+358h+var_38]
call _ZN3fmt3v106detail8isfiniteIdTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_
test al, 1
jnz short loc_B44F6
mov rax, [rsp+358h+var_18]
mov [rsp+358h+var_48], rax
movsd xmm0, [rsp+358h+var_38]
call _ZN3fmt3v106detail5isnanIdEEbT_; fmt::v10::detail::isnan<double>(double)
mov rcx, [rsp+358h+var_28]
mov [rsp+358h+var_58], rcx
mov rcx, [rsp+358h+var_20]
mov [rsp+358h+var_50], rcx
mov rdi, [rsp+358h+var_48]
mov rdx, [rsp+358h+var_58]
mov rcx, [rsp+358h+var_50]
movzx esi, al
and esi, 1
lea r8, [rsp+358h+var_40]
call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&)
mov [rsp+358h+var_10], rax
jmp loc_B492C
loc_B44F6:
mov ax, word ptr [rsp+358h+var_20+1]
and ax, 0Fh
movzx eax, al
cmp eax, 4
jnz loc_B4614
mov eax, dword ptr [rsp+358h+var_40+4]
shr eax, 8
and eax, 0FFh
cmp al, 0
jz loc_B4614
lea rdi, [rsp+358h+var_18]
mov esi, 1
call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong)
mov rax, [rax]
mov [rsp+358h+var_60], rax
mov eax, dword ptr [rsp+358h+var_40+4]
shr eax, 8
and eax, 0FFh
movzx edi, al
call _ZN3fmt3v106detail4signIcNS0_4sign4typeEEET_T0_; fmt::v10::detail::sign<char,fmt::v10::sign::type>(fmt::v10::sign::type)
mov [rsp+358h+var_61], al
lea rdi, [rsp+358h+var_60]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+358h+var_70], rax
lea rdi, [rsp+358h+var_70]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+358h+var_61]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&)
mov rax, [rsp+358h+var_18]
mov [rsp+358h+var_80], rax
mov rax, [rsp+358h+var_60]
mov [rsp+358h+var_88], rax
mov rdi, [rsp+358h+var_80]
mov rsi, [rsp+358h+var_88]
call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender)
mov [rsp+358h+var_78], rax
mov rax, [rsp+358h+var_78]
mov [rsp+358h+var_18], rax
mov eax, dword ptr [rsp+358h+var_40+4]
and eax, 0FFFF00FFh
or eax, 0
mov dword ptr [rsp+358h+var_40+4], eax
cmp dword ptr [rsp+358h+var_28], 0
jz short loc_B4612
mov eax, dword ptr [rsp+358h+var_28]
add eax, 0FFFFFFFFh
mov dword ptr [rsp+358h+var_28], eax
loc_B4612:
jmp short $+2
loc_B4614:
lea rdi, [rsp+358h+var_2A1]
mov [rsp+358h+var_320], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+358h+var_320]; char *
lea rdi, [rsp+358h+var_2A0]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_B463A:
lea rdi, [rsp+358h+var_2A1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, dword ptr [rsp+358h+var_40+4]
and eax, 0FFh
cmp al, 3
jnz loc_B47AF
mov eax, dword ptr [rsp+358h+var_40+4]
shr eax, 8
and eax, 0FFh
cmp al, 0
jz short loc_B46E7
movzx edi, byte ptr [rsp+358h+var_40+5]
call _ZN3fmt3v106detail4signIcNS0_4sign4typeEEET_T0_; fmt::v10::detail::sign<char,fmt::v10::sign::type>(fmt::v10::sign::type)
mov [rsp+358h+var_2B5], al
lea rdi, [rsp+358h+var_2A0]
lea rsi, [rsp+358h+var_2B5]
call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&)
jmp short $+2
loc_B4699:
jmp short loc_B46E7
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_AF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_B493C
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_B0]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp loc_B493C
loc_B46E7:
movsd xmm0, [rsp+358h+var_38]
call _ZN3fmt3v106detail13convert_floatIdEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_
mov edi, dword ptr [rsp+358h+var_28+4]
mov rax, [rsp+358h+var_40]
mov [rsp+358h+var_2C0], rax
mov rsi, [rsp+358h+var_2C0]
lea rdx, [rsp+358h+var_2A0]
call _ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE
jmp short $+2
loc_B4723:
mov rax, [rsp+358h+var_18]
mov [rsp+358h+var_2C8], rax
lea rdi, [rsp+358h+var_2A0]
mov [rsp+358h+var_338], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, [rsp+358h+var_338]
mov [rsp+358h+var_330], rax
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov rsi, [rsp+358h+var_330]
mov rdx, rax
lea rdi, [rsp+358h+var_2D8]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+358h+var_2C8]
mov rsi, [rsp+358h+var_2D8]
mov rdx, [rsp+358h+var_2D0]
lea rcx, [rsp+358h+var_28]
call _ZN3fmt3v106detail11write_bytesILNS0_5align4typeE2EcNS0_8appenderEEET1_S6_NS0_17basic_string_viewIcEERKNS0_12format_specsIT0_EE; fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)
mov [rsp+358h+var_328], rax
jmp short $+2
loc_B4795:
mov rax, [rsp+358h+var_328]
mov [rsp+358h+var_10], rax
mov [rsp+358h+var_2DC], 1
jmp loc_B491F
loc_B47AF:
cmp dword ptr [rsp+358h+var_28+4], 0
jge short loc_B47C3
cmp byte ptr [rsp+358h+var_20], 0
jnz short loc_B47D0
loc_B47C3:
mov eax, dword ptr [rsp+358h+var_28+4]
mov [rsp+358h+var_33C], eax
jmp short loc_B47DB
loc_B47D0:
mov eax, 6
mov [rsp+358h+var_33C], eax
jmp short $+2
loc_B47DB:
mov eax, [rsp+358h+var_33C]
mov [rsp+358h+var_2E0], eax
mov eax, dword ptr [rsp+358h+var_40+4]
and eax, 0FFh
cmp al, 1
jnz short loc_B4825
mov eax, [rsp+358h+var_2E0]
mov [rsp+358h+var_340], eax
call _ZN3fmt3v106detail9max_valueIiEET_v; fmt::v10::detail::max_value<int>(void)
mov ecx, eax
mov eax, [rsp+358h+var_340]
cmp eax, ecx
jnz short loc_B4818
lea rdi, aNumberIsTooBig; "number is too big"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
jmp short $+2
loc_B4818:
mov eax, [rsp+358h+var_2E0]
add eax, 1
mov [rsp+358h+var_2E0], eax
jmp short loc_B4846
loc_B4825:
mov eax, dword ptr [rsp+358h+var_40+4]
and eax, 0FFh
cmp al, 2
jz short loc_B4844
cmp [rsp+358h+var_2E0], 0
jnz short loc_B4844
mov [rsp+358h+var_2E0], 1
loc_B4844:
jmp short $+2
loc_B4846:
movsd xmm0, [rsp+358h+var_38]
call _ZN3fmt3v106detail13convert_floatIdEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_
mov edi, [rsp+358h+var_2E0]
mov rax, [rsp+358h+var_40]
mov [rsp+358h+var_2F0], rax
mov rsi, [rsp+358h+var_2F0]
lea rdx, [rsp+358h+var_2A0]
call _ZN3fmt3v106detail12format_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE; fmt::v10::detail::format_float<double>(double,int,fmt::v10::detail::float_specs,fmt::v10::detail::buffer<char> &)
mov [rsp+358h+var_344], eax
jmp short $+2
loc_B487D:
mov eax, [rsp+358h+var_344]
mov [rsp+358h+var_2E4], eax
mov eax, [rsp+358h+var_2E0]
mov dword ptr [rsp+358h+var_40], eax
lea rdi, [rsp+358h+var_2A0]
mov [rsp+358h+var_358], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, [rsp+358h+var_358]
mov [rsp+358h+var_300], rax
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov [rsp+358h+var_2F8], eax
mov eax, [rsp+358h+var_2E4]
mov [rsp+358h+var_2F4], eax
mov rax, [rsp+358h+var_18]
mov [rsp+358h+var_308], rax
mov rax, [rsp+358h+var_40]
mov [rsp+358h+var_310], rax
mov rax, [rsp+358h+var_30]
mov [rsp+358h+var_318], rax
mov rdi, [rsp+358h+var_308]
mov rcx, [rsp+358h+var_310]
mov r8, [rsp+358h+var_318]
lea rsi, [rsp+358h+var_300]
lea rdx, [rsp+358h+var_28]
call _ZN3fmt3v106detail11write_floatINS0_8appenderENS1_14big_decimal_fpEcEET_S5_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>(fmt::v10::appender,fmt::v10::detail::big_decimal_fp const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref)
mov [rsp+358h+var_350], rax
jmp short $+2
loc_B490A:
mov rax, [rsp+358h+var_350]
mov [rsp+358h+var_10], rax
mov [rsp+358h+var_2DC], 1
loc_B491F:
lea rdi, [rsp+358h+var_2A0]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
loc_B492C:
mov rax, [rsp+358h+var_10]
add rsp, 358h
retn
loc_B493C:
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
|
long long fmt::v10::detail::write_float<char,fmt::v10::appender,double>(
long long a1,
const char *a2,
long long a3,
long long a4,
double a5)
{
long long v5; // rax
char v6; // al
_QWORD *v7; // rax
double v8; // xmm0_8
long long v9; // rax
const char *v10; // rsi
double v11; // xmm0_8
int v13; // [rsp+1Ch] [rbp-33Ch]
long long v14; // [rsp+28h] [rbp-330h]
long long v15; // [rsp+58h] [rbp-300h] BYREF
int v16; // [rsp+60h] [rbp-2F8h]
int v17; // [rsp+64h] [rbp-2F4h]
long long v18; // [rsp+68h] [rbp-2F0h]
int v19; // [rsp+74h] [rbp-2E4h]
signed int v20; // [rsp+78h] [rbp-2E0h]
int v21; // [rsp+7Ch] [rbp-2DCh]
long long v22[2]; // [rsp+80h] [rbp-2D8h] BYREF
long long v23; // [rsp+90h] [rbp-2C8h]
long long v24; // [rsp+98h] [rbp-2C0h]
char v25[20]; // [rsp+A3h] [rbp-2B5h] BYREF
char v26; // [rsp+B7h] [rbp-2A1h] BYREF
_QWORD v27[69]; // [rsp+B8h] [rbp-2A0h] BYREF
long long v28; // [rsp+2E0h] [rbp-78h]
long long v29; // [rsp+2E8h] [rbp-70h] BYREF
char v30; // [rsp+2F7h] [rbp-61h] BYREF
long long v31[3]; // [rsp+2F8h] [rbp-60h] BYREF
long long v32; // [rsp+310h] [rbp-48h]
long long v33; // [rsp+318h] [rbp-40h] BYREF
double v34; // [rsp+320h] [rbp-38h]
long long v35; // [rsp+328h] [rbp-30h]
const char *v36; // [rsp+330h] [rbp-28h] BYREF
long long v37; // [rsp+338h] [rbp-20h]
long long v38; // [rsp+340h] [rbp-18h] BYREF
long long v39; // [rsp+348h] [rbp-10h]
double v40; // [rsp+350h] [rbp-8h]
v38 = a1;
v36 = a2;
v37 = a3;
v35 = a4;
v34 = a5;
v5 = fmt::v10::detail::parse_float_type_spec<char>((long long)&v36, a2);
LODWORD(v33) = v5;
HIDWORD(v33) = (((*(_WORD *)((char *)&v37 + 1) >> 4) & 7) << 8) | HIDWORD(v5) & 0xFFFF00FF;
v40 = a5;
if ( std::signbit(a5) )
{
HIDWORD(v33) = HIDWORD(v33) & 0xFFFF00FF | 0x100;
*(_QWORD *)&v34 ^= 0x8000000000000000LL;
}
else if ( BYTE5(v33) == 1 )
{
HIDWORD(v33) &= 0xFFFF00FF;
}
if ( (ZN3fmt3v106detail8isfiniteIdTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_(v34) & 1) != 0 )
{
if ( (BYTE1(v37) & 0xF) == 4 )
{
if ( BYTE5(v33) )
{
v31[0] = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v38);
v30 = fmt::v10::detail::sign<char,fmt::v10::sign::type>(BYTE5(v33));
v29 = fmt::v10::appender::operator++((long long)v31);
v7 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v29);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v7, (long long)&v30);
v27[68] = v38;
v27[67] = v31[0];
v28 = fmt::v10::detail::base_iterator<fmt::v10::appender>(v38, v31[0]);
v38 = v28;
HIDWORD(v33) &= 0xFFFF00FF;
if ( (_DWORD)v36 )
LODWORD(v36) = (_DWORD)v36 - 1;
}
}
std::allocator<char>::allocator();
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(v27, (long long)&v26);
std::allocator<char>::~allocator(&v26, &v26);
if ( BYTE4(v33) == 3 )
{
if ( BYTE5(v33) )
{
v25[0] = fmt::v10::detail::sign<char,fmt::v10::sign::type>(BYTE5(v33));
fmt::v10::detail::buffer<char>::push_back((long long)v27, v25);
}
v8 = v34;
fmt::v10::detail::convert_float<double>();
v24 = v33;
ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE(
SHIDWORD(v36),
v33,
(long long)v27,
v8);
v23 = v38;
v14 = fmt::v10::detail::buffer<char>::data((long long)v27);
v9 = fmt::v10::detail::buffer<char>::size((long long)v27);
fmt::v10::basic_string_view<char>::basic_string_view(v22, v14, v9);
v10 = (const char *)v22[0];
v39 = fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(
v23,
v22[0],
v22[1],
(long long)&v36);
v21 = 1;
}
else
{
if ( SHIDWORD(v36) < 0 && (_BYTE)v37 )
v13 = 6;
else
v13 = HIDWORD(v36);
v20 = v13;
if ( BYTE4(v33) == 1 )
{
if ( v20 == (unsigned int)fmt::v10::detail::max_value<int>((long long)&v26) )
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", &v26);
++v20;
}
else if ( BYTE4(v33) != 2 && !v20 )
{
v20 = 1;
}
v11 = v34;
fmt::v10::detail::convert_float<double>();
v18 = v33;
v19 = fmt::v10::detail::format_float<double>(v20, v33, (long long)v27, v11);
LODWORD(v33) = v20;
v15 = fmt::v10::detail::buffer<char>::data((long long)v27);
v16 = fmt::v10::detail::buffer<char>::size((long long)v27);
v17 = v19;
v10 = (const char *)&v15;
v39 = fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>(
v38,
&v15,
&v36,
v33,
v35);
v21 = 1;
}
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)v27, v10);
}
else
{
v32 = v38;
v6 = fmt::v10::detail::isnan<double>(v34);
v31[1] = (long long)v36;
v31[2] = v37;
return fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(v32, v6 & 1, (long long)v36, v37, (long long)&v33);
}
return v39;
}
|
write_float<char,fmt::v10::appender,double>:
SUB RSP,0x358
MOV qword ptr [RSP + 0x340],RDI
MOV qword ptr [RSP + 0x330],RSI
MOV qword ptr [RSP + 0x338],RDX
MOV qword ptr [RSP + 0x328],RCX
MOVSD qword ptr [RSP + 0x320],XMM0
LEA RDI,[RSP + 0x330]
CALL 0x001a0e90
MOV qword ptr [RSP + 0x318],RAX
MOV AX,word ptr [RSP + 0x339]
SHR AX,0x4
AND AX,0x7
MOVZX ECX,AL
MOV EAX,dword ptr [RSP + 0x31c]
AND ECX,0xff
SHL ECX,0x8
AND EAX,0xffff00ff
OR EAX,ECX
MOV dword ptr [RSP + 0x31c],EAX
MOVSD XMM0,qword ptr [RSP + 0x320]
MOVSD qword ptr [RSP + 0x350],XMM0
MOVSD XMM0,qword ptr [RSP + 0x350]
CALL 0x0019ac30
TEST AL,0x1
JNZ 0x001b43fc
JMP 0x001b443f
LAB_001b43fc:
MOV EAX,dword ptr [RSP + 0x31c]
AND EAX,0xffff00ff
OR EAX,0x100
MOV dword ptr [RSP + 0x31c],EAX
MOVSD XMM0,qword ptr [RSP + 0x320]
MOVQ RAX,XMM0
MOV RCX,-0x8000000000000000
XOR RAX,RCX
MOVQ XMM0,RAX
MOVSD qword ptr [RSP + 0x320],XMM0
JMP 0x001b446e
LAB_001b443f:
MOV EAX,dword ptr [RSP + 0x31c]
SHR EAX,0x8
AND EAX,0xff
MOVZX EAX,AL
CMP EAX,0x1
JNZ 0x001b446c
MOV EAX,dword ptr [RSP + 0x31c]
AND EAX,0xffff00ff
OR EAX,0x0
MOV dword ptr [RSP + 0x31c],EAX
LAB_001b446c:
JMP 0x001b446e
LAB_001b446e:
MOVSD XMM0,qword ptr [RSP + 0x320]
CALL 0x001b4a00
TEST AL,0x1
JNZ 0x001b44f6
MOV RAX,qword ptr [RSP + 0x340]
MOV qword ptr [RSP + 0x310],RAX
MOVSD XMM0,qword ptr [RSP + 0x320]
CALL 0x001b4a30
MOV RCX,qword ptr [RSP + 0x330]
MOV qword ptr [RSP + 0x300],RCX
MOV RCX,qword ptr [RSP + 0x338]
MOV qword ptr [RSP + 0x308],RCX
MOV RDI,qword ptr [RSP + 0x310]
MOV RDX,qword ptr [RSP + 0x300]
MOV RCX,qword ptr [RSP + 0x308]
MOVZX ESI,AL
AND ESI,0x1
LEA R8,[RSP + 0x318]
CALL 0x0019aa00
MOV qword ptr [RSP + 0x348],RAX
JMP 0x001b492c
LAB_001b44f6:
MOV AX,word ptr [RSP + 0x339]
AND AX,0xf
MOVZX EAX,AL
CMP EAX,0x4
JNZ 0x001b4614
MOV EAX,dword ptr [RSP + 0x31c]
SHR EAX,0x8
AND EAX,0xff
CMP AL,0x0
JZ 0x001b4614
LEA RDI,[RSP + 0x340]
MOV ESI,0x1
CALL 0x00196090
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x2f8],RAX
MOV EAX,dword ptr [RSP + 0x31c]
SHR EAX,0x8
AND EAX,0xff
MOVZX EDI,AL
CALL 0x0019af50
MOV byte ptr [RSP + 0x2f7],AL
LEA RDI,[RSP + 0x2f8]
XOR ESI,ESI
CALL 0x0012a2b0
MOV qword ptr [RSP + 0x2e8],RAX
LEA RDI,[RSP + 0x2e8]
CALL 0x0012a2d0
MOV RDI,RAX
LEA RSI,[RSP + 0x2f7]
CALL 0x0012a2e0
MOV RAX,qword ptr [RSP + 0x340]
MOV qword ptr [RSP + 0x2d8],RAX
MOV RAX,qword ptr [RSP + 0x2f8]
MOV qword ptr [RSP + 0x2d0],RAX
MOV RDI,qword ptr [RSP + 0x2d8]
MOV RSI,qword ptr [RSP + 0x2d0]
CALL 0x001961c0
MOV qword ptr [RSP + 0x2e0],RAX
MOV RAX,qword ptr [RSP + 0x2e0]
MOV qword ptr [RSP + 0x340],RAX
MOV EAX,dword ptr [RSP + 0x31c]
AND EAX,0xffff00ff
OR EAX,0x0
MOV dword ptr [RSP + 0x31c],EAX
CMP dword ptr [RSP + 0x330],0x0
JZ 0x001b4612
MOV EAX,dword ptr [RSP + 0x330]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x330],EAX
LAB_001b4612:
JMP 0x001b4614
LAB_001b4614:
LEA RDI,[RSP + 0xb7]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00116d00
MOV RSI,qword ptr [RSP + 0x38]
LAB_001b462b:
LEA RDI,[RSP + 0xb8]
CALL 0x00190340
JMP 0x001b463a
LAB_001b463a:
LEA RDI,[RSP + 0xb7]
CALL 0x00116790
MOV EAX,dword ptr [RSP + 0x31c]
AND EAX,0xff
CMP AL,0x3
JNZ 0x001b47af
MOV EAX,dword ptr [RSP + 0x31c]
SHR EAX,0x8
AND EAX,0xff
CMP AL,0x0
JZ 0x001b46e7
MOVZX EDI,byte ptr [RSP + 0x31d]
CALL 0x0019af50
MOV byte ptr [RSP + 0xa3],AL
LAB_001b4682:
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0xa3]
CALL 0x0012a310
JMP 0x001b4699
LAB_001b4699:
JMP 0x001b46e7
LAB_001b46e7:
MOVSD XMM0,qword ptr [RSP + 0x320]
CALL 0x001b3ce0
MOV EDI,dword ptr [RSP + 0x334]
MOV RAX,qword ptr [RSP + 0x318]
MOV qword ptr [RSP + 0x98],RAX
MOV RSI,qword ptr [RSP + 0x98]
LEA RDX,[RSP + 0xb8]
CALL 0x001b29f0
JMP 0x001b4723
LAB_001b4723:
MOV RAX,qword ptr [RSP + 0x340]
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00129aa0
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x00129ab0
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RAX
LEA RDI,[RSP + 0x80]
CALL 0x00129ac0
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
LEA RCX,[RSP + 0x330]
CALL 0x001a1670
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001b4795
LAB_001b4795:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x348],RAX
MOV dword ptr [RSP + 0x7c],0x1
JMP 0x001b491f
LAB_001b47af:
CMP dword ptr [RSP + 0x334],0x0
JGE 0x001b47c3
CMP byte ptr [RSP + 0x338],0x0
JNZ 0x001b47d0
LAB_001b47c3:
MOV EAX,dword ptr [RSP + 0x334]
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001b47db
LAB_001b47d0:
MOV EAX,0x6
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001b47db
LAB_001b47db:
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x78],EAX
MOV EAX,dword ptr [RSP + 0x31c]
AND EAX,0xff
CMP AL,0x1
JNZ 0x001b4825
MOV EAX,dword ptr [RSP + 0x78]
MOV dword ptr [RSP + 0x18],EAX
CALL 0x0019c830
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x18]
CMP EAX,ECX
JNZ 0x001b4818
LEA RDI,[0x219ebe]
CALL 0x0018ecd0
LAB_001b4818:
MOV EAX,dword ptr [RSP + 0x78]
ADD EAX,0x1
MOV dword ptr [RSP + 0x78],EAX
JMP 0x001b4846
LAB_001b4825:
MOV EAX,dword ptr [RSP + 0x31c]
AND EAX,0xff
CMP AL,0x2
JZ 0x001b4844
CMP dword ptr [RSP + 0x78],0x0
JNZ 0x001b4844
MOV dword ptr [RSP + 0x78],0x1
LAB_001b4844:
JMP 0x001b4846
LAB_001b4846:
MOVSD XMM0,qword ptr [RSP + 0x320]
CALL 0x001b3ce0
MOV EDI,dword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x318]
MOV qword ptr [RSP + 0x68],RAX
MOV RSI,qword ptr [RSP + 0x68]
LEA RDX,[RSP + 0xb8]
CALL 0x001b2e40
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001b487d
LAB_001b487d:
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x74],EAX
MOV EAX,dword ptr [RSP + 0x78]
MOV dword ptr [RSP + 0x318],EAX
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP],RDI
CALL 0x00129aa0
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x58],RAX
CALL 0x00129ab0
MOV dword ptr [RSP + 0x60],EAX
MOV EAX,dword ptr [RSP + 0x74]
MOV dword ptr [RSP + 0x64],EAX
MOV RAX,qword ptr [RSP + 0x340]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x318]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x328]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x58]
LEA RDX,[RSP + 0x330]
CALL 0x001a1b30
LAB_001b4903:
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001b490a
LAB_001b490a:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x348],RAX
MOV dword ptr [RSP + 0x7c],0x1
LAB_001b491f:
LEA RDI,[RSP + 0xb8]
CALL 0x001903a0
LAB_001b492c:
MOV RAX,qword ptr [RSP + 0x348]
ADD RSP,0x358
RET
|
/* fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender,
double>(fmt::v10::appender, double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
*/
int8 __thiscall
fmt::v10::detail::write_float<char,fmt::v10::appender,double>
(double param_1,detail *this,long param_3,int8 param_4,int8 param_5)
{
bool bVar1;
char cVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
int8 *puVar6;
back_insert_iterator<fmt::v10::detail::buffer<char>> *this_00;
char *pcVar7;
int local_33c;
int8 local_300;
int4 local_2f8;
int local_2f4;
ulong local_2f0;
int local_2e4;
int local_2e0;
int4 local_2dc;
int8 local_2d8;
int8 local_2d0;
detail *local_2c8;
ulong local_2c0;
char local_2b5 [20];
allocator<char> local_2a1;
allocator local_2a0 [536];
int8 local_88;
detail *local_80;
detail *local_78;
int8 local_70;
char local_61;
int8 local_60;
long local_58;
int8 local_50;
detail *local_48;
int8 local_40;
double local_38;
int8 local_30;
int8 local_28;
int8 local_20;
detail *local_18;
int8 local_10;
double local_8;
local_38 = param_1;
local_30 = param_5;
local_28 = param_3;
local_20 = param_4;
local_18 = this;
uVar4 = parse_float_type_spec<char>((format_specs *)&local_28);
local_40._4_4_ = (uint)((ulong)uVar4 >> 0x20);
local_40 = CONCAT44(local_40._4_4_ & 0xffff00ff | (uint)((byte)(local_20._1_2_ >> 4) & 7) << 8,
(int)uVar4);
local_8 = local_38;
uVar5 = std::signbit(local_38);
if ((uVar5 & 1) == 0) {
if ((local_40._4_4_ >> 8 & 0xff) == 1) {
local_40 = local_40 & 0xffff00ffffffffff;
}
}
else {
local_40 = local_40 & 0xffff00ffffffffff | 0x10000000000;
local_38 = -local_38;
}
uVar5 = _ZN3fmt3v106detail8isfiniteIdTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_
(local_38);
if ((uVar5 & 1) == 0) {
local_48 = local_18;
bVar1 = isnan<double>(local_38);
local_58 = local_28;
local_50 = local_20;
local_10 = write_nonfinite<char,fmt::v10::appender>(local_48,bVar1,local_28,local_20,&local_40);
}
else {
if ((((byte)((ulong)local_20 >> 8) & 0xf) == 4) && ((char)(local_40 >> 0x28) != '\0')) {
puVar6 = (int8 *)reserve<fmt::v10::appender>((appender *)&local_18,1);
local_60 = *puVar6;
local_61 = sign<char,fmt::v10::sign::type>(local_40._4_4_ >> 8 & 0xff);
local_70 = appender::operator++((appender *)&local_60,0);
this_00 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_70);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(this_00,&local_61);
local_80 = local_18;
local_88 = local_60;
local_78 = (detail *)base_iterator<fmt::v10::appender>(local_18,local_60);
local_40 = local_40 & 0xffff00ffffffffff;
local_18 = local_78;
if ((int)local_28 != 0) {
local_28 = CONCAT44(local_28._4_4_,(int)local_28 + -1);
}
}
std::allocator<char>::allocator();
/* try { // try from 001b462b to 001b4637 has its CatchHandler @ 001b469b */
basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_2a0);
std::allocator<char>::~allocator(&local_2a1);
cVar2 = (char)(local_40 >> 0x20);
if (cVar2 == '\x03') {
cVar2 = (char)(local_40 >> 0x28);
if (cVar2 != '\0') {
local_2b5[0] = sign<char,fmt::v10::sign::type>(cVar2);
/* try { // try from 001b4682 to 001b4902 has its CatchHandler @ 001b46c1 */
buffer<char>::push_back((buffer<char> *)local_2a0,local_2b5);
}
convert_float<double>(local_38);
local_2c0 = local_40;
_ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE
(local_28._4_4_,local_40,local_2a0);
local_2c8 = local_18;
pcVar7 = (char *)buffer<char>::data((buffer<char> *)local_2a0);
uVar5 = buffer<char>::size((buffer<char> *)local_2a0);
basic_string_view<char>::basic_string_view((basic_string_view<char> *)&local_2d8,pcVar7,uVar5)
;
local_10 = write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>
(local_2c8,local_2d8,local_2d0,&local_28);
}
else {
if ((local_28 < 0) && ((char)local_20 != '\0')) {
local_33c = 6;
}
else {
local_33c = local_28._4_4_;
}
local_2e0 = local_33c;
if (cVar2 == '\x01') {
iVar3 = max_value<int>();
if (local_33c == iVar3) {
/* WARNING: Subroutine does not return */
throw_format_error("number is too big");
}
local_2e0 = local_2e0 + 1;
}
else if ((cVar2 != '\x02') && (local_33c == 0)) {
local_2e0 = 1;
}
convert_float<double>(local_38);
local_2f0 = local_40;
local_2e4 = format_float<double>(local_2e0,local_40,local_2a0);
local_40 = CONCAT44(local_40._4_4_,local_2e0);
local_300 = buffer<char>::data((buffer<char> *)local_2a0);
local_2f8 = buffer<char>::size((buffer<char> *)local_2a0);
local_2f4 = local_2e4;
local_10 = write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>
(local_18,&local_300,&local_28,local_40,local_30);
}
local_2dc = 1;
basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_2a0);
}
return local_10;
}
|
|
19,591
|
my_mb_wc_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
hi=s[0];
if (hi<0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1])))
return -2;
return 2;
}
|
O3
|
c
|
my_mb_wc_gbk:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x39501
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x39485
movq %rdi, (%rsi)
movl $0x1, %eax
jmp 0x39501
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x39501
movzbl %dil, %ecx
xorl %eax, %eax
cmpl $0x80, %ecx
je 0x39501
cmpl $0xff, %ecx
je 0x39501
movzbl 0x1(%rdx), %edx
leal -0x7f(%rdx), %edi
cmpb $-0x3f, %dil
setb %dil
cmpb $-0x1, %dl
setge %r8b
testb %dil, %r8b
jne 0x39501
shll $0x8, %ecx
leal (%rcx,%rdx), %eax
addl $0xffff7ec0, %eax # imm = 0xFFFF7EC0
cmpl $0x7d10, %eax # imm = 0x7D10
jae 0x394f5
movl %eax, %eax
leaq 0x146e01(%rip), %rcx # 0x1802e0
movzwl (%rcx,%rax,2), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x39501
jmp 0x394fc
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
|
my_mb_wc_gbk:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_39501
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_39485
mov [rsi], rdi
mov eax, 1
jmp short loc_39501
loc_39485:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_39501
movzx ecx, dil
xor eax, eax
cmp ecx, 80h
jz short loc_39501
cmp ecx, 0FFh
jz short loc_39501
movzx edx, byte ptr [rdx+1]
lea edi, [rdx-7Fh]
cmp dil, 0C1h
setb dil
cmp dl, 0FFh
setnl r8b
test r8b, dil
jnz short loc_39501
shl ecx, 8
lea eax, [rcx+rdx]
add eax, 0FFFF7EC0h
cmp eax, 7D10h
jnb short loc_394F5
mov eax, eax
lea rcx, tab_gbk_uni0
movzx eax, word ptr [rcx+rax*2]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_39501
jmp short loc_394FC
loc_394F5:
mov qword ptr [rsi], 0
loc_394FC:
mov eax, 0FFFFFFFEh
loc_39501:
pop rbp
retn
|
long long my_mb_wc_gbk(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // edx
unsigned int v7; // eax
long long v8; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 - 127) >= 0xC1u || (char)v6 < -1 )
{
v7 = ((unsigned __int8)v5 << 8) + v6 - 33088;
if ( v7 >= 0x7D10 )
{
*a2 = 0LL;
}
else
{
v8 = tab_gbk_uni0[v7];
*a2 = v8;
result = 2LL;
if ( (_WORD)v8 )
return result;
}
return 4294967294LL;
}
}
}
}
return result;
}
|
my_mb_wc_gbk:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00139501
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x00139485
MOV qword ptr [RSI],RDI
MOV EAX,0x1
JMP 0x00139501
LAB_00139485:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00139501
MOVZX ECX,DIL
XOR EAX,EAX
CMP ECX,0x80
JZ 0x00139501
CMP ECX,0xff
JZ 0x00139501
MOVZX EDX,byte ptr [RDX + 0x1]
LEA EDI,[RDX + -0x7f]
CMP DIL,0xc1
SETC DIL
CMP DL,0xff
SETGE R8B
TEST R8B,DIL
JNZ 0x00139501
SHL ECX,0x8
LEA EAX,[RCX + RDX*0x1]
ADD EAX,0xffff7ec0
CMP EAX,0x7d10
JNC 0x001394f5
MOV EAX,EAX
LEA RCX,[0x2802e0]
MOVZX EAX,word ptr [RCX + RAX*0x2]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00139501
JMP 0x001394fc
LAB_001394f5:
MOV qword ptr [RSI],0x0
LAB_001394fc:
MOV EAX,0xfffffffe
LAB_00139501:
POP RBP
RET
|
int8 my_mb_wc_gbk(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
uint uVar4;
int8 uVar5;
uVar5 = 0xffffff9b;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((long)(char)bVar1 < 0) {
uVar5 = 0xffffff9a;
if ((((param_3 + 2 <= param_4) && (uVar5 = 0, bVar1 != 0x80)) && (bVar1 != 0xff)) &&
(bVar2 = param_3[1], (char)bVar2 < -1 || 0xc0 < (byte)(bVar2 + 0x81))) {
uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8140;
if (uVar4 < 0x7d10) {
uVar3 = *(ushort *)(&tab_gbk_uni0 + (ulong)uVar4 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 != 0) {
return 2;
}
}
else {
*param_2 = 0;
}
uVar5 = 0xfffffffe;
}
}
else {
*param_2 = (long)(char)bVar1;
uVar5 = 1;
}
}
return uVar5;
}
|
|
19,592
|
void reaction::Log::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)
|
reaction/include/reaction/log.h
|
static void log(const std::string &level, const std::string &format_str, Args &&...args) {
std::ostringstream oss;
replace_placeholders(oss, format_str, std::forward<Args>(args)...);
std::cout << "[" << level << "] " << oss.str() << std::endl;
}
|
O0
|
c
|
void reaction::Log::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&):
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x3200
movq -0x1c8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x14ab0
jmp 0x149a0
movq 0x1f621(%rip), %rdi # 0x33fc8
leaq 0xc85c(%rip), %rsi # 0x2120a
callq 0x3180
movq %rax, -0x1d0(%rbp)
jmp 0x149bc
movq -0x1d0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x3170
movq %rax, -0x1d8(%rbp)
jmp 0x149d5
movq -0x1d8(%rbp), %rdi
leaq 0xc829(%rip), %rsi # 0x2120c
callq 0x3180
movq %rax, -0x1e0(%rbp)
jmp 0x149f1
leaq -0x1c0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x3270
jmp 0x14a06
movq -0x1e0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3170
movq %rax, -0x1e8(%rbp)
jmp 0x14a22
movq -0x1e8(%rbp), %rdi
movq 0x1f570(%rip), %rsi # 0x33fa0
callq 0x31b0
jmp 0x14a37
leaq -0x1c0(%rbp), %rdi
callq 0x8d30
leaq -0x190(%rbp), %rdi
callq 0x3040
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x14a8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x8d30
leaq -0x190(%rbp), %rdi
callq 0x3040
movq -0x198(%rbp), %rdi
callq 0x32a0
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN8reaction3Log3logIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRKS7_S9_DpOT_:
push rbp
mov rbp, rsp
sub rsp, 1F0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_190]
mov [rbp+var_1C8], rdi
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, [rbp+var_1C8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _ZN8reaction3Log20replace_placeholdersINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJEEEvRNS2_19basic_ostringstreamIcS5_S6_EERKS7_OT_DpOT0_; reaction::Log::replace_placeholders<std::string>(std::ostringstream &,std::string const&,std::string &&)
jmp short $+2
loc_149A0:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, asc_2120A; "["
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1D0], rax
jmp short $+2
loc_149BC:
mov rdi, [rbp+var_1D0]
mov rsi, [rbp+var_8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_1D8], rax
jmp short $+2
loc_149D5:
mov rdi, [rbp+var_1D8]
lea rsi, asc_2120C; "] "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1E0], rax
jmp short $+2
loc_149F1:
lea rdi, [rbp+var_1C0]
lea rsi, [rbp+var_190]
call __ZNKRSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_14A06:
mov rdi, [rbp+var_1E0]
lea rsi, [rbp+var_1C0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_1E8], rax
jmp short $+2
loc_14A22:
mov rdi, [rbp+var_1E8]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_14A37:
lea rdi, [rbp+var_1C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
add rsp, 1F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_198], rcx
mov [rbp+var_19C], eax
jmp short loc_14A8A
mov rcx, rax
mov eax, edx
mov [rbp+var_198], rcx
mov [rbp+var_19C], eax
lea rdi, [rbp+var_1C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_14A8A:
lea rdi, [rbp+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rdi, [rbp+var_198]
call __Unwind_Resume
|
long long reaction::Log::log<std::string>(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-1E8h]
long long v5; // [rsp+10h] [rbp-1E0h]
long long v6; // [rsp+18h] [rbp-1D8h]
long long v7; // [rsp+20h] [rbp-1D0h]
_BYTE v8[36]; // [rsp+30h] [rbp-1C0h] BYREF
_BYTE v9[376]; // [rsp+60h] [rbp-190h] BYREF
long long v10; // [rsp+1D8h] [rbp-18h]
long long v11; // [rsp+1E0h] [rbp-10h]
long long v12; // [rsp+1E8h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
std::ostringstream::basic_ostringstream();
reaction::Log::replace_placeholders<std::string>(v9, v11, v10);
v7 = std::operator<<<std::char_traits<char>>(&std::cout, "[");
v6 = std::operator<<<char>(v7, v12);
v5 = std::operator<<<std::char_traits<char>>(v6, "] ");
std::ostringstream::str(v8, v9);
v4 = std::operator<<<char>(v5, v8);
std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>);
std::string::~string((long long)v8);
return std::ostringstream::~ostringstream(v9);
}
|
log<std::__cxx11::string>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1f0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0x190]
MOV qword ptr [RBP + -0x1c8],RDI
CALL 0x00103200
MOV RDI,qword ptr [RBP + -0x1c8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LAB_00114999:
CALL 0x00114ab0
JMP 0x001149a0
LAB_001149a0:
MOV RDI,qword ptr [0x00133fc8]
LEA RSI,[0x12120a]
CALL 0x00103180
MOV qword ptr [RBP + -0x1d0],RAX
JMP 0x001149bc
LAB_001149bc:
MOV RDI,qword ptr [RBP + -0x1d0]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00103170
MOV qword ptr [RBP + -0x1d8],RAX
JMP 0x001149d5
LAB_001149d5:
MOV RDI,qword ptr [RBP + -0x1d8]
LEA RSI,[0x12120c]
CALL 0x00103180
MOV qword ptr [RBP + -0x1e0],RAX
JMP 0x001149f1
LAB_001149f1:
LEA RDI,[RBP + -0x1c0]
LEA RSI,[RBP + -0x190]
CALL 0x00103270
JMP 0x00114a06
LAB_00114a06:
MOV RDI,qword ptr [RBP + -0x1e0]
LEA RSI,[RBP + -0x1c0]
CALL 0x00103170
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x00114a22
LAB_00114a22:
MOV RDI,qword ptr [RBP + -0x1e8]
MOV RSI,qword ptr [0x00133fa0]
CALL 0x001031b0
LAB_00114a35:
JMP 0x00114a37
LAB_00114a37:
LEA RDI,[RBP + -0x1c0]
CALL 0x00108d30
LEA RDI,[RBP + -0x190]
CALL 0x00103040
ADD RSP,0x1f0
POP RBP
RET
|
/* void reaction::Log::log<std::__cxx11::string >(std::__cxx11::string const&, std::__cxx11::string
const&, std::__cxx11::string&&) */
void reaction::Log::log<std::__cxx11::string>(string *param_1,string *param_2,string *param_3)
{
ostream *poVar1;
string local_1c8 [48];
ostringstream local_198 [376];
string *local_20;
string *local_18;
string *local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::__cxx11::ostringstream::ostringstream(local_198);
/* try { // try from 00114999 to 00114a03 has its CatchHandler @ 00114a58 */
replace_placeholders<std::__cxx11::string>(local_198,local_18,local_20);
poVar1 = std::operator<<((ostream *)PTR_cout_00133fc8,"[");
poVar1 = std::operator<<(poVar1,local_10);
poVar1 = std::operator<<(poVar1,"] ");
std::__cxx11::ostringstream::str();
/* try { // try from 00114a06 to 00114a34 has its CatchHandler @ 00114a6c */
poVar1 = std::operator<<(poVar1,local_1c8);
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00133fa0);
std::__cxx11::string::~string(local_1c8);
std::__cxx11::ostringstream::~ostringstream(local_198);
return;
}
|
|
19,593
|
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 0x89daa
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 0x89da8
cmpq $0x2, -0x38(%rbp)
jb 0x89d82
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 0x89d80
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 0x89da6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movl $0x80, %esi
leaq 0x2c9ff(%rip), %rdx # 0xb6798
movb $0x0, %al
callq 0xaf930
movb $0x1, -0x1(%rbp)
jmp 0x89dcb
jmp 0x89da8
jmp 0x89dc7
jmp 0x89dac
jmp 0x89dae
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_89DAA
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_89DA8
cmp [rbp+var_38], 2
jb short loc_89D82
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_89D80
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_89D80:
jmp short loc_89DA6
loc_89D82:
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_89DCB
loc_89DA6:
jmp short $+2
loc_89DA8:
jmp short loc_89DC7
loc_89DAA:
jmp short $+2
loc_89DAC:
jmp short $+2
loc_89DAE:
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_89DC7:
mov [rbp+var_1], 0
loc_89DCB:
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 0x00189daa
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 0x00189da8
CMP qword ptr [RBP + -0x38],0x2
JC 0x00189d82
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 0x00189d80
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_00189d80:
JMP 0x00189da6
LAB_00189d82:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV ESI,0x80
LEA RDX,[0x1b6798]
MOV AL,0x0
CALL 0x001af930
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00189dcb
LAB_00189da6:
JMP 0x00189da8
LAB_00189da8:
JMP 0x00189dc7
LAB_00189daa:
JMP 0x00189dac
LAB_00189dac:
JMP 0x00189dae
LAB_00189dae:
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_00189dc7:
MOV byte ptr [RBP + -0x1],0x0
LAB_00189dcb:
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;
}
|
|
19,594
|
flux::parser::Parser::dataType()
|
kvthweatt[P]FluxLang/src/parser/parser.cpp
|
std::unique_ptr<TypeExpr> Parser::dataType() {
bool isSigned = !previous_.is(lexer::TokenType::KEYWORD_UNSIGNED);
// Parse 'data' keyword if not already consumed
if (!previous_.is(lexer::TokenType::KEYWORD_DATA)) {
consume(lexer::TokenType::KEYWORD_DATA, "Expected 'data' keyword");
}
// Parse the bit size
consume(lexer::TokenType::LEFT_BRACE, "Expected '{' after 'data'");
// Parse the size expression
auto sizeToken = consume(lexer::TokenType::INTEGER_LITERAL, "Expected bit size");
int64_t bits = sizeToken.intValue();
consume(lexer::TokenType::RIGHT_BRACE, "Expected '}' after bit size");
return std::make_unique<DataTypeExpr>(
bits,
isSigned,
makeRange(previous_)
);
}
|
O0
|
cpp
|
flux::parser::Parser::dataType():
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %rdi, -0x230(%rbp)
movq %rdi, %rax
movq %rax, -0x228(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x220(%rbp)
addq $0x68, %rdi
movl $0x2c, %esi
callq 0x58f10
movq -0x220(%rbp), %rdi
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x11(%rbp)
addq $0x68, %rdi
movl $0xe, %esi
callq 0x58f10
testb $0x1, %al
jne 0x58b49
leaq -0x88(%rbp), %rdi
leaq 0xba0b(%rip), %rsi # 0x64526
callq 0xd130
movq -0x220(%rbp), %rsi
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
leaq -0x78(%rbp), %rdi
movl $0xe, %edx
callq 0x43180
leaq -0x78(%rbp), %rdi
callq 0xa300
leaq 0xb9ee(%rip), %rsi # 0x6453e
leaq -0xf8(%rbp), %rdi
callq 0xd130
movq -0x220(%rbp), %rsi
movq -0xf8(%rbp), %rcx
movq -0xf0(%rbp), %r8
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
movl $0x5f, %edx
callq 0x43180
movq -0x248(%rbp), %rdi
callq 0xa300
leaq 0xb9bc(%rip), %rsi # 0x64558
leaq -0x168(%rbp), %rdi
callq 0xd130
movq -0x220(%rbp), %rsi
movq -0x168(%rbp), %rcx
movq -0x160(%rbp), %r8
leaq -0x158(%rbp), %rdi
movq %rdi, -0x240(%rbp)
movl $0x1, %edx
callq 0x43180
movq -0x240(%rbp), %rdi
callq 0x171d0
movq %rax, -0x238(%rbp)
jmp 0x58bea
movq -0x238(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq 0xb96b(%rip), %rsi # 0x6456a
leaq -0x1f0(%rbp), %rdi
callq 0xd130
movq -0x220(%rbp), %rsi
movq -0x1f0(%rbp), %rcx
movq -0x1e8(%rbp), %r8
leaq -0x1e0(%rbp), %rdi
movl $0x60, %edx
callq 0x43180
jmp 0x58c33
leaq -0x1e0(%rbp), %rdi
callq 0xa300
movq -0x220(%rbp), %rsi
movq %rsi, %rdx
addq $0x68, %rdx
leaq -0x218(%rbp), %rdi
callq 0x435d0
jmp 0x58c5b
leaq -0x1f8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x11(%rbp), %rdx
leaq -0x218(%rbp), %rcx
callq 0x5b210
jmp 0x58c7b
movq -0x230(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x23130
leaq -0x1f8(%rbp), %rdi
callq 0x23180
leaq -0x158(%rbp), %rdi
callq 0xa300
movq -0x228(%rbp), %rax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x178(%rbp)
movl %eax, -0x17c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0xa300
movq -0x178(%rbp), %rdi
callq 0x75a0
|
_ZN4flux6parser6Parser8dataTypeEv:
push rbp
mov rbp, rsp
sub rsp, 250h
mov [rbp+var_230], rdi
mov rax, rdi
mov [rbp+var_228], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
mov [rbp+var_220], rdi
add rdi, 68h ; 'h'
mov esi, 2Ch ; ','
call _ZNK4flux5lexer5Token2isENS0_9TokenTypeE; flux::lexer::Token::is(flux::lexer::TokenType)
mov rdi, [rbp+var_220]
xor al, 0FFh
and al, 1
mov [rbp+var_11], al
add rdi, 68h ; 'h'
mov esi, 0Eh
call _ZNK4flux5lexer5Token2isENS0_9TokenTypeE; flux::lexer::Token::is(flux::lexer::TokenType)
test al, 1
jnz short loc_58B49
lea rdi, [rbp+var_88]
lea rsi, aExpectedDataKe; "Expected 'data' keyword"
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_88]
mov r8, [rbp+var_80]
lea rdi, [rbp+var_78]
mov edx, 0Eh
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
lea rdi, [rbp+var_78]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
loc_58B49:
lea rsi, aExpectedAfterD; "Expected '{' after 'data'"
lea rdi, [rbp+var_F8]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_F8]
mov r8, [rbp+var_F0]
lea rdi, [rbp+var_E8]
mov [rbp+var_248], rdi
mov edx, 5Fh ; '_'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
mov rdi, [rbp+var_248]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
lea rsi, aExpectedBitSiz; "Expected bit size"
lea rdi, [rbp+var_168]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_168]
mov r8, [rbp+var_160]
lea rdi, [rbp+var_158]
mov [rbp+var_240], rdi
mov edx, 1
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
mov rdi, [rbp+var_240]; this
call _ZNK4flux5lexer5Token8intValueEv; flux::lexer::Token::intValue(void)
mov [rbp+var_238], rax
jmp short $+2
loc_58BEA:
mov rax, [rbp+var_238]
mov [rbp+var_170], rax
lea rsi, aExpectedAfterB; "Expected '}' after bit size"
lea rdi, [rbp+var_1F0]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_1F0]
mov r8, [rbp+var_1E8]
lea rdi, [rbp+var_1E0]
mov edx, 60h ; '`'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
jmp short $+2
loc_58C33:
lea rdi, [rbp+var_1E0]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rsi, [rbp+var_220]; flux::lexer::Token *
mov rdx, rsi
add rdx, 68h ; 'h'
lea rdi, [rbp+var_218]; this
call _ZNK4flux6parser6Parser9makeRangeERKNS_5lexer5TokenE; flux::parser::Parser::makeRange(flux::lexer::Token const&)
jmp short $+2
loc_58C5B:
lea rdi, [rbp+var_1F8]
lea rsi, [rbp+var_170]
lea rdx, [rbp+var_11]
lea rcx, [rbp+var_218]
call _ZSt11make_uniqueIN4flux6parser12DataTypeExprEJRlRbNS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::DataTypeExpr,long &,bool &,flux::common::SourceRange>(long &,bool &,flux::common::SourceRange &&)
jmp short $+2
loc_58C7B:
mov rdi, [rbp+var_230]
lea rsi, [rbp+var_1F8]
call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EEC2INS1_12DataTypeExprES3_IS7_EvEEOS_IT_T0_E; std::unique_ptr<flux::parser::TypeExpr>::unique_ptr<flux::parser::DataTypeExpr,std::default_delete<flux::parser::DataTypeExpr>,void>(std::unique_ptr&&<flux::parser::DataTypeExpr,std::default_delete<flux::parser::DataTypeExpr>>)
lea rdi, [rbp+var_1F8]
call _ZNSt10unique_ptrIN4flux6parser12DataTypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::DataTypeExpr>::~unique_ptr()
lea rdi, [rbp+var_158]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rax, [rbp+var_228]
add rsp, 250h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_178], rcx
mov [rbp+var_17C], eax
lea rdi, [rbp+var_158]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rdi, [rbp+var_178]
call __Unwind_Resume
|
flux::parser::Parser * flux::parser::Parser::dataType(flux::parser::Parser *this, _BYTE *a2)
{
_BYTE v3[32]; // [rsp+38h] [rbp-218h] BYREF
_BYTE v4[8]; // [rsp+58h] [rbp-1F8h] BYREF
long long v5[2]; // [rsp+60h] [rbp-1F0h] BYREF
_BYTE v6[100]; // [rsp+70h] [rbp-1E0h] BYREF
long long v7; // [rsp+E0h] [rbp-170h] BYREF
long long v8[2]; // [rsp+E8h] [rbp-168h] BYREF
_BYTE v9[96]; // [rsp+F8h] [rbp-158h] BYREF
long long v10[2]; // [rsp+158h] [rbp-F8h] BYREF
_BYTE v11[96]; // [rsp+168h] [rbp-E8h] BYREF
long long v12[2]; // [rsp+1C8h] [rbp-88h] BYREF
_BYTE v13[103]; // [rsp+1D8h] [rbp-78h] BYREF
bool v14; // [rsp+23Fh] [rbp-11h] BYREF
_BYTE *v15; // [rsp+240h] [rbp-10h]
flux::parser::Parser *v16; // [rsp+248h] [rbp-8h]
v16 = this;
v15 = a2;
v14 = (flux::lexer::Token::is(a2 + 104, 44LL) & 1) == 0;
if ( (flux::lexer::Token::is(a2 + 104, 14LL) & 1) == 0 )
{
std::string_view::basic_string_view(v12, (long long)"Expected 'data' keyword");
flux::parser::Parser::consume((flux::parser::Parser *)v13, a2, 14, v12[0], v12[1]);
flux::lexer::Token::~Token((flux::lexer::Token *)v13);
}
std::string_view::basic_string_view(v10, (long long)"Expected '{' after 'data'");
flux::parser::Parser::consume((flux::parser::Parser *)v11, a2, 95, v10[0], v10[1]);
flux::lexer::Token::~Token((flux::lexer::Token *)v11);
std::string_view::basic_string_view(v8, (long long)"Expected bit size");
flux::parser::Parser::consume((flux::parser::Parser *)v9, a2, 1, v8[0], v8[1]);
v7 = flux::lexer::Token::intValue((flux::lexer::Token *)v9);
std::string_view::basic_string_view(v5, (long long)"Expected '}' after bit size");
flux::parser::Parser::consume((flux::parser::Parser *)v6, a2, 96, v5[0], v5[1]);
flux::lexer::Token::~Token((flux::lexer::Token *)v6);
flux::parser::Parser::makeRange(
(flux::parser::Parser *)v3,
(const flux::lexer::Token *)a2,
(flux::lexer::Token *)(a2 + 104));
std::make_unique<flux::parser::DataTypeExpr,long &,bool &,flux::common::SourceRange>(v4, &v7, &v14, v3);
std::unique_ptr<flux::parser::TypeExpr>::unique_ptr<flux::parser::DataTypeExpr,std::default_delete<flux::parser::DataTypeExpr>,void>(
(long long)this,
(long long)v4);
std::unique_ptr<flux::parser::DataTypeExpr>::~unique_ptr((long long)v4);
flux::lexer::Token::~Token((flux::lexer::Token *)v9);
return this;
}
|
dataType:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV qword ptr [RBP + -0x230],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x228],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x220],RDI
ADD RDI,0x68
MOV ESI,0x2c
CALL 0x00158f10
MOV RDI,qword ptr [RBP + -0x220]
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
ADD RDI,0x68
MOV ESI,0xe
CALL 0x00158f10
TEST AL,0x1
JNZ 0x00158b49
LEA RDI,[RBP + -0x88]
LEA RSI,[0x164526]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x88]
MOV R8,qword ptr [RBP + -0x80]
LEA RDI,[RBP + -0x78]
MOV EDX,0xe
CALL 0x00143180
LEA RDI,[RBP + -0x78]
CALL 0x0010a300
LAB_00158b49:
LEA RSI,[0x16453e]
LEA RDI,[RBP + -0xf8]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0xf8]
MOV R8,qword ptr [RBP + -0xf0]
LEA RDI,[RBP + -0xe8]
MOV qword ptr [RBP + -0x248],RDI
MOV EDX,0x5f
CALL 0x00143180
MOV RDI,qword ptr [RBP + -0x248]
CALL 0x0010a300
LEA RSI,[0x164558]
LEA RDI,[RBP + -0x168]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x168]
MOV R8,qword ptr [RBP + -0x160]
LEA RDI,[RBP + -0x158]
MOV qword ptr [RBP + -0x240],RDI
MOV EDX,0x1
CALL 0x00143180
MOV RDI,qword ptr [RBP + -0x240]
LAB_00158bdc:
CALL 0x001171d0
MOV qword ptr [RBP + -0x238],RAX
JMP 0x00158bea
LAB_00158bea:
MOV RAX,qword ptr [RBP + -0x238]
MOV qword ptr [RBP + -0x170],RAX
LEA RSI,[0x16456a]
LEA RDI,[RBP + -0x1f0]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x1f0]
MOV R8,qword ptr [RBP + -0x1e8]
LEA RDI,[RBP + -0x1e0]
MOV EDX,0x60
CALL 0x00143180
JMP 0x00158c33
LAB_00158c33:
LEA RDI,[RBP + -0x1e0]
CALL 0x0010a300
MOV RSI,qword ptr [RBP + -0x220]
MOV RDX,RSI
ADD RDX,0x68
LEA RDI,[RBP + -0x218]
CALL 0x001435d0
JMP 0x00158c5b
LAB_00158c5b:
LEA RDI,[RBP + -0x1f8]
LEA RSI,[RBP + -0x170]
LEA RDX,[RBP + -0x11]
LEA RCX,[RBP + -0x218]
CALL 0x0015b210
LAB_00158c79:
JMP 0x00158c7b
LAB_00158c7b:
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[RBP + -0x1f8]
CALL 0x00123130
LEA RDI,[RBP + -0x1f8]
CALL 0x00123180
LEA RDI,[RBP + -0x158]
CALL 0x0010a300
MOV RAX,qword ptr [RBP + -0x228]
ADD RSP,0x250
POP RBP
RET
|
/* flux::parser::Parser::dataType() */
unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *
flux::parser::Parser::dataType(void)
{
byte bVar1;
ulong uVar2;
long in_RSI;
unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *in_RDI;
Token local_220 [32];
unique_ptr local_200 [8];
int8 local_1f8;
int8 local_1f0;
Token local_1e8 [112];
int8 local_178;
int8 local_170;
int8 local_168;
Token local_160 [96];
int8 local_100;
int8 local_f8;
Token local_f0 [96];
int8 local_90;
int8 local_88;
Token local_80 [103];
SourceRange local_19 [17];
bVar1 = lexer::Token::is((Token *)(in_RSI + 0x68),0x2c);
local_19[0] = (SourceRange)((bVar1 ^ 0xff) & 1);
uVar2 = lexer::Token::is((Token *)(in_RSI + 0x68),0xe);
if ((uVar2 & 1) == 0) {
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_90,
"Expected \'data\' keyword");
consume(local_80,in_RSI,0xe,local_90,local_88);
lexer::Token::~Token(local_80);
}
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_100,
"Expected \'{\' after \'data\'");
consume(local_f0,in_RSI,0x5f,local_100,local_f8);
lexer::Token::~Token(local_f0);
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_170,"Expected bit size");
consume(local_160,in_RSI,1,local_170,local_168);
/* try { // try from 00158bdc to 00158c78 has its CatchHandler @ 00158cb6 */
local_178 = lexer::Token::intValue(local_160);
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_1f8,
"Expected \'}\' after bit size");
consume(local_1e8,in_RSI,0x60,local_1f8,local_1f0);
lexer::Token::~Token(local_1e8);
makeRange(local_220);
std::make_unique<flux::parser::DataTypeExpr,long&,bool&,flux::common::SourceRange>
((long *)local_200,(bool *)&local_178,local_19);
std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>::
unique_ptr<flux::parser::DataTypeExpr,std::default_delete<flux::parser::DataTypeExpr>,void>
(in_RDI,local_200);
std::unique_ptr<flux::parser::DataTypeExpr,std::default_delete<flux::parser::DataTypeExpr>>::
~unique_ptr((unique_ptr<flux::parser::DataTypeExpr,std::default_delete<flux::parser::DataTypeExpr>>
*)local_200);
lexer::Token::~Token(local_160);
return in_RDI;
}
|
|
19,595
|
ha_federated::close()
|
eloqsql/storage/federated/ha_federated.cc
|
int ha_federated::close(void)
{
DBUG_ENTER("ha_federated::close");
free_result();
delete_dynamic(&results);
/* Disconnect from mysql */
THD *thd= ha_thd();
Net_error_handler err_handler;
if (thd)
thd->push_internal_handler(&err_handler);
mysql_close(mysql);
if (thd)
thd->pop_internal_handler();
mysql= NULL;
DBUG_RETURN(free_share(share));
}
|
O3
|
cpp
|
ha_federated::close():
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
callq 0x8030
leaq 0x550(%rbx), %rdi
callq 0x8470
movq %rbx, %rdi
callq 0x8540
movq %rax, %r14
movq $0x0, -0x18(%rbp)
movq 0x7783(%rip), %rax # 0x10fa8
addq $0x10, %rax
movq %rax, -0x20(%rbp)
testq %r14, %r14
je 0x9854
leaq -0x20(%rbp), %rsi
movq %r14, %rdi
callq 0x8430
movq 0x540(%rbx), %rdi
callq 0x80a0
movq %r14, %rdi
callq 0x8210
jmp 0x9860
movq 0x540(%rbx), %rdi
callq 0x80a0
movq $0x0, 0x540(%rbx)
movq 0x538(%rbx), %rbx
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x30(%rbx), %xmm3
movaps %xmm3, -0x30(%rbp)
movaps %xmm2, -0x40(%rbp)
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movq 0x7718(%rip), %rdi # 0x10fb0
leaq 0x3a27(%rip), %rsi # 0xd2c6
movl $0x636, %edx # imm = 0x636
callq 0x83d0
decq 0xd8(%rbx)
jne 0x990b
leaq 0x78cf(%rip), %rdi # 0x11188
movq %rbx, %rsi
callq 0x84f0
leaq 0x128(%rbx), %rdi
callq 0x81c0
leaq 0xe0(%rbx), %r14
movq 0x120(%rbx), %rdi
testq %rdi, %rdi
je 0x98f8
movq 0x76e1(%rip), %rax # 0x10fc8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x120(%rbx)
movq %r14, %rdi
callq 0x83e0
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x83f0
movq 0x769e(%rip), %rdi # 0x10fb0
callq 0x81e0
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
_ZN12ha_federated5closeEv:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
call __ZN12ha_federated11free_resultEv; ha_federated::free_result(void)
lea rdi, [rbx+550h]
call _delete_dynamic
mov rdi, rbx; this
call __ZNK7handler6ha_thdEv; handler::ha_thd(void)
mov r14, rax
mov [rbp+var_18], 0
mov rax, cs:_ZTV17Net_error_handler_ptr
add rax, 10h
mov [rbp+var_20], rax
test r14, r14
jz short loc_9854
lea rsi, [rbp+var_20]; Internal_error_handler *
mov rdi, r14; this
call __ZN3THD21push_internal_handlerEP22Internal_error_handler; THD::push_internal_handler(Internal_error_handler *)
mov rdi, [rbx+540h]
call _mysql_close
mov rdi, r14; this
call __ZN3THD20pop_internal_handlerEv; THD::pop_internal_handler(void)
jmp short loc_9860
loc_9854:
mov rdi, [rbx+540h]
call _mysql_close
loc_9860:
mov qword ptr [rbx+540h], 0
mov rbx, [rbx+538h]
movups xmm0, xmmword ptr [rbx]
movups xmm1, xmmword ptr [rbx+10h]
movups xmm2, xmmword ptr [rbx+20h]
movups xmm3, xmmword ptr [rbx+30h]
movaps [rbp+var_30], xmm3
movaps [rbp+var_40], xmm2
movaps [rbp+var_50], xmm1
movaps [rbp+var_60], xmm0
mov rdi, cs:federated_mutex_ptr
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 636h
call __Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint)
dec qword ptr [rbx+0D8h]
jnz short loc_990B
lea rdi, _ZL21federated_open_tables; federated_open_tables
mov rsi, rbx
call _my_hash_delete
lea rdi, [rbx+128h]
call _thr_lock_delete
lea r14, [rbx+0E0h]
mov rdi, [rbx+120h]
test rdi, rdi
jz short loc_98F8
mov rax, cs:PSI_server_ptr
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+120h], 0
loc_98F8:
mov rdi, r14
call _pthread_mutex_destroy
lea rdi, [rbp+var_60]
xor esi, esi
call _free_root
loc_990B:
mov rdi, cs:federated_mutex_ptr
call __Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *)
xor eax, eax
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
|
long long ha_federated::close(ha_federated *this)
{
THD *v1; // r14
__int128 *v2; // rbx
__int128 v3; // xmm0
__int128 v4; // xmm1
__int128 v5; // xmm2
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
__int128 v12; // [rsp+0h] [rbp-60h] BYREF
__int128 v13; // [rsp+10h] [rbp-50h]
__int128 v14; // [rsp+20h] [rbp-40h]
__int128 v15; // [rsp+30h] [rbp-30h]
long long *v16; // [rsp+40h] [rbp-20h] BYREF
long long v17; // [rsp+48h] [rbp-18h]
ha_federated::free_result(this);
delete_dynamic((char *)this + 1360);
v1 = (THD *)handler::ha_thd(this);
v17 = 0LL;
v16 = &`vtable for'Net_error_handler + 2;
if ( v1 )
{
THD::push_internal_handler(v1, (Internal_error_handler *)&v16);
mysql_close(*((_QWORD *)this + 168));
THD::pop_internal_handler(v1);
}
else
{
mysql_close(*((_QWORD *)this + 168));
}
*((_QWORD *)this + 168) = 0LL;
v2 = (__int128 *)*((_QWORD *)this + 167);
v3 = *v2;
v4 = v2[1];
v5 = v2[2];
v15 = v2[3];
v14 = v5;
v13 = v4;
v12 = v3;
coro_mutex_lock(federated_mutex, "/workspace/llm4binary/github2025/eloqsql/storage/federated/ha_federated.cc", 1590LL);
if ( (*((_QWORD *)v2 + 27))-- == 1LL )
{
my_hash_delete(
&federated_open_tables,
v2,
v6,
v7,
v8,
v9,
v12,
*((_QWORD *)&v12 + 1),
v13,
*((_QWORD *)&v13 + 1),
v14,
*((_QWORD *)&v14 + 1),
v15,
*((_QWORD *)&v15 + 1),
v16,
v17);
thr_lock_delete((char *)v2 + 296);
if ( *((_QWORD *)v2 + 36) )
{
((void (*)(void))PSI_server[9])();
*((_QWORD *)v2 + 36) = 0LL;
}
pthread_mutex_destroy(v2 + 14);
free_root(&v12, 0LL);
}
coro_mutex_unlock(federated_mutex);
return 0LL;
}
|
close:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
CALL 0x00108030
LEA RDI,[RBX + 0x550]
CALL 0x00108470
MOV RDI,RBX
CALL 0x00108540
MOV R14,RAX
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [0x00110fa8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x20],RAX
TEST R14,R14
JZ 0x00109854
LEA RSI,[RBP + -0x20]
MOV RDI,R14
CALL 0x00108430
MOV RDI,qword ptr [RBX + 0x540]
CALL 0x001080a0
MOV RDI,R14
CALL 0x00108210
JMP 0x00109860
LAB_00109854:
MOV RDI,qword ptr [RBX + 0x540]
CALL 0x001080a0
LAB_00109860:
MOV qword ptr [RBX + 0x540],0x0
MOV RBX,qword ptr [RBX + 0x538]
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS XMM3,xmmword ptr [RBX + 0x30]
MOVAPS xmmword ptr [RBP + -0x30],XMM3
MOVAPS xmmword ptr [RBP + -0x40],XMM2
MOVAPS xmmword ptr [RBP + -0x50],XMM1
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOV RDI,qword ptr [0x00110fb0]
LEA RSI,[0x10d2c6]
MOV EDX,0x636
CALL 0x001083d0
DEC qword ptr [RBX + 0xd8]
JNZ 0x0010990b
LEA RDI,[0x111188]
MOV RSI,RBX
CALL 0x001084f0
LEA RDI,[RBX + 0x128]
CALL 0x001081c0
LEA R14,[RBX + 0xe0]
MOV RDI,qword ptr [RBX + 0x120]
TEST RDI,RDI
JZ 0x001098f8
MOV RAX,qword ptr [0x00110fc8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x120],0x0
LAB_001098f8:
MOV RDI,R14
CALL 0x001083e0
LEA RDI,[RBP + -0x60]
XOR ESI,ESI
CALL 0x001083f0
LAB_0010990b:
MOV RDI,qword ptr [0x00110fb0]
CALL 0x001081e0
XOR EAX,EAX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
|
/* ha_federated::close() */
int8 __thiscall ha_federated::close(ha_federated *this)
{
long *plVar1;
int8 *puVar2;
Internal_error_handler *pIVar3;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
int *local_28;
int8 local_20;
free_result(this);
delete_dynamic(this + 0x550);
pIVar3 = (Internal_error_handler *)handler::ha_thd();
local_20 = 0;
local_28 = PTR_vtable_00110fa8 + 0x10;
if (pIVar3 == (Internal_error_handler *)0x0) {
mysql_close(*(int8 *)(this + 0x540));
}
else {
THD::push_internal_handler(pIVar3);
mysql_close(*(int8 *)(this + 0x540));
THD::pop_internal_handler();
}
*(int8 *)(this + 0x540) = 0;
puVar2 = *(int8 **)(this + 0x538);
local_68 = *puVar2;
uStack_60 = puVar2[1];
local_58 = puVar2[2];
uStack_50 = puVar2[3];
local_48 = puVar2[4];
uStack_40 = puVar2[5];
local_38 = puVar2[6];
uStack_30 = puVar2[7];
coro_mutex_lock((st_mysql_mutex *)PTR_federated_mutex_00110fb0,
"/workspace/llm4binary/github2025/eloqsql/storage/federated/ha_federated.cc",0x636
);
plVar1 = puVar2 + 0x1b;
*plVar1 = *plVar1 + -1;
if (*plVar1 == 0) {
my_hash_delete(federated_open_tables,puVar2);
thr_lock_delete(puVar2 + 0x25);
if (puVar2[0x24] != 0) {
(**(code **)(*(long *)PTR_PSI_server_00110fc8 + 0x48))();
puVar2[0x24] = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(puVar2 + 0x1c));
free_root(&local_68,0);
}
coro_mutex_unlock((st_mysql_mutex *)PTR_federated_mutex_00110fb0);
return 0;
}
|
|
19,596
|
my_strcasecmp_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static
int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int)(uchar)s[0]) - ((int) (uchar) t[0]);
}
|
O0
|
c
|
my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x78741
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x7874d
jmp 0x78886
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x78787
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2feec5(%rip), %rax # 0x377630
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x787dc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0x3, %rcx
leaq -0x30(%rbp), %rsi
callq 0x76dd0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x787be
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x254d0
movl %eax, -0x4(%rbp)
jmp 0x78899
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x780a0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x78816
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2fee36(%rip), %rax # 0x377630
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x78868
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x3, %rcx
leaq -0x38(%rbp), %rsi
callq 0x76dd0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x7884a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x254d0
movl %eax, -0x4(%rbp)
jmp 0x78899
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x780a0
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x78881
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x78899
jmp 0x78720
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_78720:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_78741
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_78741:
mov al, [rbp+var_41]
test al, 1
jnz short loc_7874D
jmp loc_78886
loc_7874D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_78787
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_787DC
loc_78787:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_18]
add rcx, 3
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_787BE
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_78899
loc_787BE:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb3
loc_787DC:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_78816
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_78868
loc_78816:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_20]
add rcx, 3
lea rsi, [rbp+var_38]
call my_utf8mb3_uni
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_7884A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_78899
loc_7884A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb3
loc_78868:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_78881
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_78899
loc_78881:
jmp loc_78720
loc_78886:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_78899:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_strcasecmp_utf8mb3(long long a1, _BYTE *a2, _BYTE *a3, long long a4, long long a5, long long a6)
{
bool v7; // [rsp+Fh] [rbp-41h]
int v8; // [rsp+10h] [rbp-40h]
int v9; // [rsp+14h] [rbp-3Ch]
long long v10; // [rsp+18h] [rbp-38h] BYREF
long long v11; // [rsp+20h] [rbp-30h] BYREF
long long v12; // [rsp+28h] [rbp-28h]
_BYTE *v13; // [rsp+30h] [rbp-20h]
_BYTE *v14; // [rsp+38h] [rbp-18h]
long long v15; // [rsp+40h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( *v14 )
v7 = *v13 != 0;
if ( !v7 )
break;
if ( (unsigned __int8)*v14 >= 0x80u )
{
v9 = my_utf8mb3_uni(v15, (long long)&v11, (long long)v14, (long long)(v14 + 3), a5, a6);
if ( v9 <= 0 )
return (unsigned int)strcmp(v14, v13);
v14 += v9;
my_tolower_utf8mb3(v12, &v11);
}
else
{
v11 = my_unicase_default_page00[3 * (unsigned __int8)*v14++ + 1];
}
if ( (unsigned __int8)*v13 >= 0x80u )
{
v8 = my_utf8mb3_uni(v15, (long long)&v10, (long long)v13, (long long)(v13 + 3), a5, a6);
if ( v8 <= 0 )
return (unsigned int)strcmp(v14, v13);
v13 += v8;
my_tolower_utf8mb3(v12, &v10);
}
else
{
v10 = my_unicase_default_page00[3 * (unsigned __int8)*v13++ + 1];
}
if ( v11 != v10 )
return (unsigned int)(v11 - v10);
}
return (unsigned int)((unsigned __int8)*v14 - (unsigned __int8)*v13);
}
|
my_strcasecmp_utf8mb3:
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 RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_00178720:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x00178741
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00178741:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0017874d
JMP 0x00178886
LAB_0017874d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00178787
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x477630]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001787dc
LAB_00178787:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x3
LEA RSI,[RBP + -0x30]
CALL 0x00176dd0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x001787be
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001254d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00178899
LAB_001787be:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x001780a0
LAB_001787dc:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00178816
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x477630]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00178868
LAB_00178816:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x3
LEA RSI,[RBP + -0x38]
CALL 0x00176dd0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x0017884a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001254d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00178899
LAB_0017884a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x001780a0
LAB_00178868:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00178881
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00178899
LAB_00178881:
JMP 0x00178720
LAB_00178886:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_00178899:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_utf8mb3_uni(local_18,&local_38,local_20,local_20 + 3);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb3(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_utf8mb3_uni(local_18,&local_40,local_28,local_28 + 3);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb3(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
|
|
19,597
|
maria_ft_add_word
|
eloqsql/storage/maria/ma_ft_parser.c
|
static int maria_ft_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info
__attribute__((unused)))
{
TREE *wtree;
FT_WORD w;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
DBUG_ENTER("maria_ft_add_word");
wtree= ft_param->wtree;
if (param->flags & MYSQL_FTFLAGS_NEED_COPY)
{
uchar *ptr;
DBUG_ASSERT(wtree->with_delete == 0);
ptr= (uchar *)alloc_root(ft_param->mem_root, word_len);
memcpy(ptr, word, word_len);
w.pos= ptr;
}
else
w.pos= (uchar*) word;
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
|
O0
|
c
|
maria_ft_add_word:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x775f1
jmp 0x775bf
jmp 0x775c1
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xed370
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x2a090
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x775f9
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x230(%rax), %rcx
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0xfa920
cmpq $0x0, %rax
jne 0x77633
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xfa750
movl $0x1, -0x4(%rbp)
jmp 0x7763c
jmp 0x77635
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
maria_ft_add_word:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+34h]
and eax, 1
cmp eax, 0
jz short loc_775F1
jmp short $+2
loc_775BF:
jmp short $+2
loc_775C1:
mov rax, [rbp+var_50]
mov rdi, [rax+8]
movsxd rsi, [rbp+var_1C]
call alloc_root
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_18]
movsxd rdx, [rbp+var_1C]
call _memcpy
mov rax, [rbp+var_58]
mov [rbp+var_48], rax
jmp short loc_775F9
loc_775F1:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_775F9:
mov eax, [rbp+var_1C]
mov [rbp+var_40], eax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_30]
mov rcx, [rax+230h]
lea rsi, [rbp+var_48]
xor edx, edx
call tree_insert
cmp rax, 0
jnz short loc_77633
mov rdi, [rbp+var_30]
xor esi, esi
call delete_tree
mov [rbp+var_4], 1
jmp short loc_7763C
loc_77633:
jmp short $+2
loc_77635:
mov [rbp+var_4], 0
loc_7763C:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long maria_ft_add_word(long long a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-58h]
long long *v6; // [rsp+10h] [rbp-50h]
long long v7; // [rsp+18h] [rbp-48h] BYREF
int v8; // [rsp+20h] [rbp-40h]
long long v9; // [rsp+30h] [rbp-30h]
long long v10; // [rsp+38h] [rbp-28h]
int v11; // [rsp+44h] [rbp-1Ch]
long long v12; // [rsp+48h] [rbp-18h]
long long v13; // [rsp+50h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v6 = *(long long **)(a1 + 24);
v9 = *v6;
if ( (*(_DWORD *)(a1 + 52) & 1) != 0 )
{
v5 = alloc_root(v6[1], v11);
memcpy(v5, v12, v11);
v7 = v5;
}
else
{
v7 = v12;
}
v8 = v11;
if ( tree_insert(v9, &v7, 0LL, *(_QWORD *)(v9 + 560)) )
{
return 0;
}
else
{
delete_tree(v9, 0LL);
return 1;
}
}
|
maria_ft_add_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001775f1
JMP 0x001775bf
LAB_001775bf:
JMP 0x001775c1
LAB_001775c1:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x8]
MOVSXD RSI,dword ptr [RBP + -0x1c]
CALL 0x001ed370
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RDX,dword ptr [RBP + -0x1c]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001775f9
LAB_001775f1:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_001775f9:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x230]
LEA RSI,[RBP + -0x48]
XOR EDX,EDX
CALL 0x001fa920
CMP RAX,0x0
JNZ 0x00177633
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
CALL 0x001fa750
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0017763c
LAB_00177633:
JMP 0x00177635
LAB_00177635:
MOV dword ptr [RBP + -0x4],0x0
LAB_0017763c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
bool maria_ft_add_word(long param_1,void *param_2,int param_3,int8 param_4)
{
void *__dest;
long lVar1;
void *local_50;
int local_48;
long local_38;
int8 local_30;
int local_24;
void *local_20;
long local_18;
local_38 = **(long **)(param_1 + 0x18);
local_50 = param_2;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(uint *)(param_1 + 0x34) & 1) != 0) {
__dest = (void *)alloc_root((*(long **)(param_1 + 0x18))[1],(long)param_3);
memcpy(__dest,local_20,(long)local_24);
local_50 = __dest;
}
local_48 = local_24;
lVar1 = tree_insert(local_38,&local_50,0,*(int8 *)(local_38 + 0x230));
if (lVar1 == 0) {
delete_tree(local_38,0);
}
return lVar1 == 0;
}
|
|
19,598
|
ma_zlib_compress
|
eloqsql/libmariadb/plugins/compress/c_zlib.c
|
my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst,
size_t *dst_len, void *source, size_t source_len)
{
int rc;
if (!ctx)
return 1;
if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len,
ctx->compression_level)) != Z_OK)
return 1;
return 0;
}
|
O0
|
c
|
ma_zlib_compress:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x40f29
movb $0x1, -0x1(%rbp)
jmp 0x40f58
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %r8d
callq 0x13240
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x40f54
movb $0x1, -0x1(%rbp)
jmp 0x40f58
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_zlib_compress:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
cmp [rbp+var_10], 0
jnz short loc_40F29
mov [rbp+var_1], 1
jmp short loc_40F58
loc_40F29:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov r8d, [rax+10h]
call _compress2
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_40F54
mov [rbp+var_1], 1
jmp short loc_40F58
loc_40F54:
mov [rbp+var_1], 0
loc_40F58:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5)
{
return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0;
}
|
ma_zlib_compress:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00140f29
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00140f58
LAB_00140f29:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RAX + 0x10]
CALL 0x00113240
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x00140f54
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00140f58
LAB_00140f54:
MOV byte ptr [RBP + -0x1],0x0
LAB_00140f58:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
int1 local_9;
if (param_1 == 0) {
local_9 = 1;
}
else {
iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10));
if (iVar1 == 0) {
local_9 = 0;
}
else {
local_9 = 1;
}
}
return local_9;
}
|
|
19,599
|
mysql_free_result
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void STDCALL
mysql_free_result(MYSQL_RES *result)
{
if (result)
{
if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT)
{
result->handle->methods->db_skip_result(result->handle);
result->handle->status=MYSQL_STATUS_READY;
}
free_rows(result->data);
if (result->fields)
ma_free_root(&result->field_alloc,MYF(0));
if (result->row)
free(result->row);
free(result);
}
return;
}
|
O0
|
c
|
mysql_free_result:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3b08a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x3b042
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
cmpl $0x2, 0x488(%rax)
jne 0x3b042
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movl $0x0, 0x488(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3a300
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3b069
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
xorl %esi, %esi
callq 0x48b00
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x3b081
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x361a0
movq -0x8(%rbp), %rdi
callq 0x361a0
addq $0x10, %rsp
popq %rbp
retq
|
mysql_free_result:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz loc_3B08A
mov rax, [rbp+var_8]
cmp qword ptr [rax+78h], 0
jz short loc_3B042
mov rax, [rbp+var_8]
mov rax, [rax+78h]
cmp dword ptr [rax+488h], 2
jnz short loc_3B042
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov rax, [rax+4D0h]
mov rax, [rax+18h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+78h]
call rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov dword ptr [rax+488h], 0
loc_3B042:
mov rax, [rbp+var_8]
mov rdi, [rax+18h]
call free_rows
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_3B069
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
xor esi, esi
call ma_free_root
loc_3B069:
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_3B081
mov rax, [rbp+var_8]
mov rdi, [rax+60h]
call _free
loc_3B081:
mov rdi, [rbp+var_8]
call _free
loc_3B08A:
add rsp, 10h
pop rbp
retn
|
long long mysql_free_result(_QWORD *a1)
{
long long result; // rax
if ( a1 )
{
if ( a1[15] && *(_DWORD *)(a1[15] + 1160LL) == 2 )
{
(*(void ( **)(_QWORD))(*(_QWORD *)(a1[15] + 1232LL) + 24LL))(a1[15]);
*(_DWORD *)(a1[15] + 1160LL) = 0;
}
free_rows(a1[3]);
if ( a1[2] )
ma_free_root(a1 + 5, 0LL);
if ( a1[12] )
free(a1[12]);
return free(a1);
}
return result;
}
|
mysql_free_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0013b08a
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x0013b042
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
CMP dword ptr [RAX + 0x488],0x2
JNZ 0x0013b042
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x78]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV dword ptr [RAX + 0x488],0x0
LAB_0013b042:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0013a300
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0013b069
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
XOR ESI,ESI
CALL 0x00148b00
LAB_0013b069:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0013b081
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x001361a0
LAB_0013b081:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001361a0
LAB_0013b08a:
ADD RSP,0x10
POP RBP
RET
|
void mysql_free_result(void *param_1)
{
if (param_1 != (void *)0x0) {
if ((*(long *)((long)param_1 + 0x78) != 0) &&
(*(int *)(*(long *)((long)param_1 + 0x78) + 0x488) == 2)) {
(**(code **)(*(long *)(*(long *)((long)param_1 + 0x78) + 0x4d0) + 0x18))
(*(int8 *)((long)param_1 + 0x78));
*(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0;
}
free_rows(*(int8 *)((long)param_1 + 0x18));
if (*(long *)((long)param_1 + 0x10) != 0) {
ma_free_root((long)param_1 + 0x28,0);
}
if (*(long *)((long)param_1 + 0x60) != 0) {
free(*(void **)((long)param_1 + 0x60));
}
free(param_1);
}
return;
}
|
Subsets and Splits
C++ Functions Using STL
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++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
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.