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
|
---|---|---|---|---|---|---|---|---|---|---|---|
61,500 |
my_caseup_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_caseup_utf8mb3(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_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O0
|
c
|
my_caseup_utf8mb3:
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 0x6589a
jmp 0x6589c
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x658cc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x65530
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x658d5
jmp 0x65928
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x666a0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x65560
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x65901
jmp 0x65928
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 0x6589c
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
my_caseup_utf8mb3:
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_6589A:
jmp short $+2
loc_6589C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_658CC
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_658CC:
mov al, [rbp+var_59]
test al, 1
jnz short loc_658D5
jmp short loc_65928
loc_658D5:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_toupper_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf8mb3
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_65901
jmp short loc_65928
loc_65901:
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_6589C
loc_65928:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
_BYTE * my_caseup_utf8mb3(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_utf8mb3_uni(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_toupper_utf8mb3(v8, v14);
v12 = my_uni_utf8mb3(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
|
my_caseup_utf8mb3:
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 0x0016589a
LAB_0016589a:
JMP 0x0016589c
LAB_0016589c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x001658cc
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00165530
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_001658cc:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x001658d5
JMP 0x00165928
LAB_001658d5:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x001666a0
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 0x00165560
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x00165901
JMP 0x00165928
LAB_00165901:
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 0x0016589c
LAB_00165928:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_utf8mb3(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_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_utf8mb3(uVar1,&local_38);
iVar3 = my_uni_utf8mb3(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;
}
|
|
61,501 |
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::assignRegularMidEdgePoint(int edgeIndex,
Matrix & matrix) const {
Point M(matrix, 15 + edgeIndex);
CornerTopology const & corner = _corners[edgeIndex];
if (corner.epOnBoundary) {
// Trivial boundary edge case -- midway between two corners
M.Assign(0, edgeIndex, 0.5f);
M.Assign(1, (edgeIndex + 1) % 3, 0.5f);
assert(M.GetSize() == 2);
} else {
// Regular case -- two corners and two vertices opposite the edge
int oppositeInRing = corner.isBoundary ?
(corner.faceInRing - 1) : ((corner.faceInRing + 5) % 6);
int oppositeVertex = corner.ringPoints[oppositeInRing];
M.Assign(0, edgeIndex, (REAL) (1.0 / 3.0));
M.Assign(1, (edgeIndex + 1) % 3, (REAL) (1.0 / 3.0));
M.Assign(2, (edgeIndex + 2) % 3, (REAL) (1.0 / 6.0));
M.Assign(3, oppositeVertex, (REAL) (1.0 / 6.0));
assert(M.GetSize() == 4);
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0xf, %edx
leaq -0x30(%rbp), %rdi
callq 0x11c780
movq -0x48(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rcx
imulq $0xb0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movw (%rax), %ax
shrw $0x6, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x127fbd
movl -0xc(%rbp), %edx
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movsd 0xc4648(%rip), %xmm0 # 0x1ec5a8
callq 0x11c820
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
movsd 0xc4624(%rip), %xmm0 # 0x1ec5a8
callq 0x11c820
leaq -0x30(%rbp), %rdi
callq 0x11c860
cmpl $0x2, %eax
jne 0x127f99
jmp 0x127fb8
leaq 0xc7088(%rip), %rdi # 0x1ef028
leaq 0xc6af1(%rip), %rsi # 0x1eea98
movl $0x5c9, %edx # imm = 0x5C9
leaq 0xc775b(%rip), %rcx # 0x1ef70e
callq 0xc9440
jmp 0x1280b9
movq -0x38(%rbp), %rax
movw (%rax), %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x127fdf
movq -0x38(%rbp), %rax
movl 0xc(%rax), %edx
subl $0x1, %edx
movl %edx, -0x4c(%rbp)
jmp 0x127ff4
movq -0x38(%rbp), %rax
movl 0xc(%rax), %eax
addl $0x5, %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl %edx, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
callq 0xcf290
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x40(%rbp)
movl -0xc(%rbp), %edx
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movsd 0xc45ce(%rip), %xmm0 # 0x1ec5f0
callq 0x11c820
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
movsd 0xc45aa(%rip), %xmm0 # 0x1ec5f0
callq 0x11c820
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl $0x3, %ecx
cltd
idivl %ecx
leaq -0x30(%rbp), %rdi
movl $0x2, %esi
movsd 0xc4596(%rip), %xmm0 # 0x1ec600
callq 0x11c820
movl -0x40(%rbp), %edx
leaq -0x30(%rbp), %rdi
movl $0x3, %esi
movsd 0xc457d(%rip), %xmm0 # 0x1ec600
callq 0x11c820
leaq -0x30(%rbp), %rdi
callq 0x11c860
cmpl $0x4, %eax
jne 0x128098
jmp 0x1280b7
leaq 0xc7012(%rip), %rdi # 0x1ef0b1
leaq 0xc69f2(%rip), %rsi # 0x1eea98
movl $0x5d5, %edx # imm = 0x5D5
leaq 0xc765c(%rip), %rcx # 0x1ef70e
callq 0xc9440
jmp 0x1280b9
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIdEE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov rsi, [rbp+var_18]
mov edx, [rbp+var_C]
add edx, 0Fh
lea rdi, [rbp+var_30]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int)
mov rax, [rbp+var_48]
add rax, 18h
movsxd rcx, [rbp+var_C]
imul rcx, 0B0h
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov ax, [rax]
shr ax, 6
and ax, 1
movzx eax, ax
cmp eax, 0
jz short loc_127FBD
mov edx, [rbp+var_C]
lea rdi, [rbp+var_30]
xor esi, esi
movsd xmm0, cs:qword_1EC5A8
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double)
mov eax, [rbp+var_C]
add eax, 1
mov ecx, 3
cdq
idiv ecx
lea rdi, [rbp+var_30]
mov esi, 1
movsd xmm0, cs:qword_1EC5A8
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double)
lea rdi, [rbp+var_30]
call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void)
cmp eax, 2
jnz short loc_127F99
jmp short loc_127FB8
loc_127F99:
lea rdi, aMGetsize2; "M.GetSize() == 2"
lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"...
mov edx, 5C9h
lea rcx, aVoidOpensubdiv_56; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
call ___assert_fail
loc_127FB8:
jmp loc_1280B9
loc_127FBD:
mov rax, [rbp+var_38]
mov ax, [rax]
and ax, 1
movzx eax, ax
cmp eax, 0
jz short loc_127FDF
mov rax, [rbp+var_38]
mov edx, [rax+0Ch]
sub edx, 1
mov [rbp+var_4C], edx
jmp short loc_127FF4
loc_127FDF:
mov rax, [rbp+var_38]
mov eax, [rax+0Ch]
add eax, 5
mov ecx, 6
cdq
idiv ecx
mov [rbp+var_4C], edx
loc_127FF4:
mov eax, [rbp+var_4C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_38]
add rdi, 20h ; ' '
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj30ELb1EEcvPKiEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,30u,true>::operator int const*(void)
movsxd rcx, [rbp+var_3C]
mov eax, [rax+rcx*4]
mov [rbp+var_40], eax
mov edx, [rbp+var_C]
lea rdi, [rbp+var_30]
xor esi, esi
movsd xmm0, cs:qword_1EC5F0
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double)
mov eax, [rbp+var_C]
add eax, 1
mov ecx, 3
cdq
idiv ecx
lea rdi, [rbp+var_30]
mov esi, 1
movsd xmm0, cs:qword_1EC5F0
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double)
mov eax, [rbp+var_C]
add eax, 2
mov ecx, 3
cdq
idiv ecx
lea rdi, [rbp+var_30]
mov esi, 2
movsd xmm0, cs:qword_1EC600
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double)
mov edx, [rbp+var_40]
lea rdi, [rbp+var_30]
mov esi, 3
movsd xmm0, cs:qword_1EC600
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double)
lea rdi, [rbp+var_30]
call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void)
cmp eax, 4
jnz short loc_128098
jmp short loc_1280B7
loc_128098:
lea rdi, aMGetsize4; "M.GetSize() == 4"
lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"...
mov edx, 5D5h
lea rcx, aVoidOpensubdiv_56; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
call ___assert_fail
loc_1280B7:
jmp short $+2
loc_1280B9:
add rsp, 50h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(
long long a1,
int a2,
long long a3)
{
long long result; // rax
int v4; // [rsp+4h] [rbp-4Ch]
int v5; // [rsp+10h] [rbp-40h]
long long v6; // [rsp+18h] [rbp-38h]
unsigned int v7[6]; // [rsp+20h] [rbp-30h] BYREF
long long v8; // [rsp+38h] [rbp-18h]
int v9; // [rsp+44h] [rbp-Ch]
long long v10; // [rsp+48h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow((long long)v7, a3, a2 + 15);
v6 = 176LL * v9 + a1 + 24;
if ( ((*(_WORD *)v6 >> 6) & 1) != 0 )
{
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 0, v9, 0.5);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 1, (v9 + 1) % 3, 0.5);
result = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v7);
if ( (_DWORD)result != 2 )
__assert_fail(
"M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1481LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]");
}
else
{
if ( (*(_WORD *)v6 & 1) != 0 )
v4 = *(_DWORD *)(v6 + 12) - 1;
else
v4 = (*(_DWORD *)(v6 + 12) + 5) % 6;
v5 = *(_DWORD *)(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,30u,true>::operator int const*(v6 + 32)
+ 4LL * v4);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(
(long long)v7,
0,
v9,
0.3333333333333333);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(
(long long)v7,
1,
(v9 + 1) % 3,
0.3333333333333333);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(
(long long)v7,
2,
(v9 + 2) % 3,
0.1666666666666667);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(
(long long)v7,
3,
v5,
0.1666666666666667);
result = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v7);
if ( (_DWORD)result != 4 )
__assert_fail(
"M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1493LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]");
}
return result;
}
| |||
61,502 |
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::assignRegularMidEdgePoint(int edgeIndex,
Matrix & matrix) const {
Point M(matrix, 15 + edgeIndex);
CornerTopology const & corner = _corners[edgeIndex];
if (corner.epOnBoundary) {
// Trivial boundary edge case -- midway between two corners
M.Assign(0, edgeIndex, 0.5f);
M.Assign(1, (edgeIndex + 1) % 3, 0.5f);
assert(M.GetSize() == 2);
} else {
// Regular case -- two corners and two vertices opposite the edge
int oppositeInRing = corner.isBoundary ?
(corner.faceInRing - 1) : ((corner.faceInRing + 5) % 6);
int oppositeVertex = corner.ringPoints[oppositeInRing];
M.Assign(0, edgeIndex, (REAL) (1.0 / 3.0));
M.Assign(1, (edgeIndex + 1) % 3, (REAL) (1.0 / 3.0));
M.Assign(2, (edgeIndex + 2) % 3, (REAL) (1.0 / 6.0));
M.Assign(3, oppositeVertex, (REAL) (1.0 / 6.0));
assert(M.GetSize() == 4);
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const:
pushq %rax
movslq %esi, %r9
movq 0x10(%rdx), %rcx
movq 0x28(%rdx), %r8
movl 0x40(%rcx,%r9,4), %eax
movslq 0x3c(%rcx,%r9,4), %rcx
subl %ecx, %eax
movq 0x40(%rdx), %rdx
imulq $0xa8, %r9, %r9
movzwl 0x18(%rdi,%r9), %r10d
testb $0x40, %r10b
jne 0x58c50
addq %r9, %rdi
addq $0x18, %rdi
movl 0xc(%rdi), %r9d
testb $0x1, %r10b
jne 0x58cb7
addl $0x5, %r9d
movslq %r9d, %r9
imulq $0x2aaaaaab, %r9, %r10 # imm = 0x2AAAAAAB
movq %r10, %r11
shrq $0x3f, %r11
shrq $0x20, %r10
addl %r11d, %r10d
addl %r10d, %r10d
leal (%r10,%r10,2), %r10d
subl %r10d, %r9d
jmp 0x58cba
movl %esi, (%r8,%rcx,4)
movl $0x3f000000, %edi # imm = 0x3F000000
movl %edi, (%rdx,%rcx,4)
movl %esi, %r9d
incl %r9d
movslq %r9d, %r9
imulq $0x55555556, %r9, %r9 # imm = 0x55555556
movq %r9, %r10
shrq $0x3f, %r10
shrq $0x20, %r9
addl %r10d, %r9d
leal (%r9,%r9,2), %r9d
negl %r9d
addl %r9d, %esi
incl %esi
movl %esi, 0x4(%r8,%rcx,4)
movl %edi, 0x4(%rdx,%rcx,4)
cmpl $0x2, %eax
je 0x58d4e
leaq 0x5e209(%rip), %rdi # 0xb6ea8
leaq 0x5dc72(%rip), %rsi # 0xb6918
leaq 0x5e20c(%rip), %rcx # 0xb6eb9
movl $0x5c9, %edx # imm = 0x5C9
callq 0x39560
decl %r9d
movq 0x18(%rdi), %rdi
movslq %r9d, %r9
movl (%rdi,%r9,4), %edi
movl %esi, (%r8,%rcx,4)
movl $0x3eaaaaab, %r9d # imm = 0x3EAAAAAB
movl %r9d, (%rdx,%rcx,4)
leal 0x1(%rsi), %r10d
movslq %r10d, %r10
imulq $0x55555556, %r10, %r10 # imm = 0x55555556
movq %r10, %r11
shrq $0x3f, %r11
shrq $0x20, %r10
addl %r11d, %r10d
leal (%r10,%r10,2), %r10d
negl %r10d
addl %esi, %r10d
incl %r10d
movl %r10d, 0x4(%r8,%rcx,4)
movl %r9d, 0x4(%rdx,%rcx,4)
movl %esi, %r9d
addl $0x2, %r9d
movslq %r9d, %r9
imulq $0x55555556, %r9, %r9 # imm = 0x55555556
movq %r9, %r10
shrq $0x3f, %r10
shrq $0x20, %r9
addl %r10d, %r9d
leal (%r9,%r9,2), %r9d
negl %r9d
addl %r9d, %esi
addl $0x2, %esi
movl %esi, 0x8(%r8,%rcx,4)
movl $0x3e2aaaab, %esi # imm = 0x3E2AAAAB
movl %esi, 0x8(%rdx,%rcx,4)
movl %edi, 0xc(%r8,%rcx,4)
movl %esi, 0xc(%rdx,%rcx,4)
cmpl $0x4, %eax
jne 0x58d50
popq %rax
retq
leaq 0x5e1da(%rip), %rdi # 0xb6f31
leaq 0x5dbba(%rip), %rsi # 0xb6918
leaq 0x5e154(%rip), %rcx # 0xb6eb9
movl $0x5d5, %edx # imm = 0x5D5
callq 0x39560
nop
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIfEE:
push rax
movsxd r9, esi
mov rcx, [rdx+10h]
mov r8, [rdx+28h]
mov eax, [rcx+r9*4+40h]
movsxd rcx, dword ptr [rcx+r9*4+3Ch]
sub eax, ecx
mov rdx, [rdx+40h]
imul r9, 0A8h
movzx r10d, word ptr [rdi+r9+18h]
test r10b, 40h
jnz short loc_58C50
add rdi, r9
add rdi, 18h
mov r9d, [rdi+0Ch]
test r10b, 1
jnz loc_58CB7
add r9d, 5
movsxd r9, r9d
imul r10, r9, 2AAAAAABh
mov r11, r10
shr r11, 3Fh
shr r10, 20h
add r10d, r11d
add r10d, r10d
lea r10d, [r10+r10*2]
sub r9d, r10d
jmp short loc_58CBA
loc_58C50:
mov [r8+rcx*4], esi
mov edi, 3F000000h
mov [rdx+rcx*4], edi
mov r9d, esi
inc r9d
movsxd r9, r9d
imul r9, 55555556h
mov r10, r9
shr r10, 3Fh
shr r9, 20h
add r9d, r10d
lea r9d, [r9+r9*2]
neg r9d
add esi, r9d
inc esi
mov [r8+rcx*4+4], esi
mov [rdx+rcx*4+4], edi
cmp eax, 2
jz loc_58D4E
lea rdi, aMGetsize2; "M.GetSize() == 2"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_48; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
mov edx, 5C9h
call ___assert_fail
loc_58CB7:
dec r9d
loc_58CBA:
mov rdi, [rdi+18h]
movsxd r9, r9d
mov edi, [rdi+r9*4]
mov [r8+rcx*4], esi
mov r9d, 3EAAAAABh
mov [rdx+rcx*4], r9d
lea r10d, [rsi+1]
movsxd r10, r10d
imul r10, 55555556h
mov r11, r10
shr r11, 3Fh
shr r10, 20h
add r10d, r11d
lea r10d, [r10+r10*2]
neg r10d
add r10d, esi
inc r10d
mov [r8+rcx*4+4], r10d
mov [rdx+rcx*4+4], r9d
mov r9d, esi
add r9d, 2
movsxd r9, r9d
imul r9, 55555556h
mov r10, r9
shr r10, 3Fh
shr r9, 20h
add r9d, r10d
lea r9d, [r9+r9*2]
neg r9d
add esi, r9d
add esi, 2
mov [r8+rcx*4+8], esi
mov esi, 3E2AAAABh
mov [rdx+rcx*4+8], esi
mov [r8+rcx*4+0Ch], edi
mov [rdx+rcx*4+0Ch], esi
cmp eax, 4
jnz short loc_58D50
loc_58D4E:
pop rax
retn
loc_58D50:
lea rdi, aMGetsize4; "M.GetSize() == 4"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_48; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
mov edx, 5D5h
call ___assert_fail
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(
long long a1,
int a2,
_QWORD *a3)
{
long long v3; // rcx
long long v4; // r8
int v5; // eax
long long v6; // rcx
int v7; // eax
long long v8; // rdx
long long v9; // r9
__int16 v10; // r10
long long v11; // rdi
int v12; // r9d
int v13; // r9d
int v14; // edi
v3 = a3[2];
v4 = a3[5];
v5 = *(_DWORD *)(v3 + 4LL * a2 + 64);
v6 = *(int *)(v3 + 4LL * a2 + 60);
v7 = v5 - v6;
v8 = a3[8];
v9 = 168LL * a2;
v10 = *(_WORD *)(a1 + v9 + 24);
if ( (v10 & 0x40) != 0 )
{
*(_DWORD *)(v4 + 4 * v6) = a2;
*(_DWORD *)(v8 + 4 * v6) = 1056964608;
*(_DWORD *)(v4 + 4 * v6 + 4) = -3 * ((a2 + 1) / 3) + a2 + 1;
*(_DWORD *)(v8 + 4 * v6 + 4) = 1056964608;
if ( v7 != 2 )
__assert_fail(
"M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1481LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = float]");
}
else
{
v11 = v9 + a1 + 24;
v12 = *(_DWORD *)(v11 + 12);
if ( (v10 & 1) != 0 )
v13 = v12 - 1;
else
v13 = (v12 + 5) % 6;
v14 = *(_DWORD *)(*(_QWORD *)(v11 + 24) + 4LL * v13);
*(_DWORD *)(v4 + 4 * v6) = a2;
*(_DWORD *)(v8 + 4 * v6) = 1051372203;
*(_DWORD *)(v4 + 4 * v6 + 4) = a2 - 3 * ((a2 + 1) / 3) + 1;
*(_DWORD *)(v8 + 4 * v6 + 4) = 1051372203;
*(_DWORD *)(v4 + 4 * v6 + 8) = -3 * ((a2 + 2) / 3) + a2 + 2;
*(_DWORD *)(v8 + 4 * v6 + 8) = 1042983595;
*(_DWORD *)(v4 + 4 * v6 + 12) = v14;
*(_DWORD *)(v8 + 4 * v6 + 12) = 1042983595;
if ( v7 != 4 )
__assert_fail(
"M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1493LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = float]");
}
}
|
assignRegularMidEdgePoint:
PUSH RAX
MOVSXD R9,ESI
MOV RCX,qword ptr [RDX + 0x10]
MOV R8,qword ptr [RDX + 0x28]
MOV EAX,dword ptr [RCX + R9*0x4 + 0x40]
MOVSXD RCX,dword ptr [RCX + R9*0x4 + 0x3c]
SUB EAX,ECX
MOV RDX,qword ptr [RDX + 0x40]
IMUL R9,R9,0xa8
MOVZX R10D,word ptr [RDI + R9*0x1 + 0x18]
TEST R10B,0x40
JNZ 0x00158c50
ADD RDI,R9
ADD RDI,0x18
MOV R9D,dword ptr [RDI + 0xc]
TEST R10B,0x1
JNZ 0x00158cb7
ADD R9D,0x5
MOVSXD R9,R9D
IMUL R10,R9,0x2aaaaaab
MOV R11,R10
SHR R11,0x3f
SHR R10,0x20
ADD R10D,R11D
ADD R10D,R10D
LEA R10D,[R10 + R10*0x2]
SUB R9D,R10D
JMP 0x00158cba
LAB_00158c50:
MOV dword ptr [R8 + RCX*0x4],ESI
MOV EDI,0x3f000000
MOV dword ptr [RDX + RCX*0x4],EDI
MOV R9D,ESI
INC R9D
MOVSXD R9,R9D
IMUL R9,R9,0x55555556
MOV R10,R9
SHR R10,0x3f
SHR R9,0x20
ADD R9D,R10D
LEA R9D,[R9 + R9*0x2]
NEG R9D
ADD ESI,R9D
INC ESI
MOV dword ptr [R8 + RCX*0x4 + 0x4],ESI
MOV dword ptr [RDX + RCX*0x4 + 0x4],EDI
CMP EAX,0x2
JZ 0x00158d4e
LEA RDI,[0x1b6ea8]
LEA RSI,[0x1b6918]
LEA RCX,[0x1b6eb9]
MOV EDX,0x5c9
CALL 0x00139560
LAB_00158cb7:
DEC R9D
LAB_00158cba:
MOV RDI,qword ptr [RDI + 0x18]
MOVSXD R9,R9D
MOV EDI,dword ptr [RDI + R9*0x4]
MOV dword ptr [R8 + RCX*0x4],ESI
MOV R9D,0x3eaaaaab
MOV dword ptr [RDX + RCX*0x4],R9D
LEA R10D,[RSI + 0x1]
MOVSXD R10,R10D
IMUL R10,R10,0x55555556
MOV R11,R10
SHR R11,0x3f
SHR R10,0x20
ADD R10D,R11D
LEA R10D,[R10 + R10*0x2]
NEG R10D
ADD R10D,ESI
INC R10D
MOV dword ptr [R8 + RCX*0x4 + 0x4],R10D
MOV dword ptr [RDX + RCX*0x4 + 0x4],R9D
MOV R9D,ESI
ADD R9D,0x2
MOVSXD R9,R9D
IMUL R9,R9,0x55555556
MOV R10,R9
SHR R10,0x3f
SHR R9,0x20
ADD R9D,R10D
LEA R9D,[R9 + R9*0x2]
NEG R9D
ADD ESI,R9D
ADD ESI,0x2
MOV dword ptr [R8 + RCX*0x4 + 0x8],ESI
MOV ESI,0x3e2aaaab
MOV dword ptr [RDX + RCX*0x4 + 0x8],ESI
MOV dword ptr [R8 + RCX*0x4 + 0xc],EDI
MOV dword ptr [RDX + RCX*0x4 + 0xc],ESI
CMP EAX,0x4
JNZ 0x00158d50
LAB_00158d4e:
POP RAX
RET
LAB_00158d50:
LEA RDI,[0x1b6f31]
LEA RSI,[0x1b6918]
LEA RCX,[0x1b6eb9]
MOV EDX,0x5d5
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int,
OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint
(GregoryTriConverter<float> *this,int param_1,SparseMatrix *param_2)
{
int4 uVar1;
long lVar2;
long lVar3;
int iVar4;
int8 in_RAX;
long lVar5;
int iVar6;
long lVar7;
lVar7 = (long)param_1;
lVar2 = *(long *)(param_2 + 0x28);
iVar4 = *(int *)(*(long *)(param_2 + 0x10) + 0x3c + lVar7 * 4);
lVar5 = (long)iVar4;
iVar4 = *(int *)(*(long *)(param_2 + 0x10) + 0x40 + lVar7 * 4) - iVar4;
lVar3 = *(long *)(param_2 + 0x40);
lVar7 = lVar7 * 0xa8;
if ((*(ushort *)(this + lVar7 + 0x18) & 0x40) == 0) {
if ((*(ushort *)(this + lVar7 + 0x18) & 1) == 0) {
iVar6 = (*(int *)(this + lVar7 + 0x24) + 5) % 6;
}
else {
iVar6 = *(int *)(this + lVar7 + 0x24) + -1;
}
uVar1 = *(int4 *)(*(long *)(this + lVar7 + 0x30) + (long)iVar6 * 4);
*(int *)(lVar2 + lVar5 * 4) = param_1;
*(int4 *)(lVar3 + lVar5 * 4) = 0x3eaaaaab;
*(int *)(lVar2 + 4 + lVar5 * 4) = ((param_1 + 1) / 3) * -3 + param_1 + 1;
*(int4 *)(lVar3 + 4 + lVar5 * 4) = 0x3eaaaaab;
*(int *)(lVar2 + 8 + lVar5 * 4) = param_1 + ((param_1 + 2) / 3) * -3 + 2;
*(int4 *)(lVar3 + 8 + lVar5 * 4) = 0x3e2aaaab;
*(int4 *)(lVar2 + 0xc + lVar5 * 4) = uVar1;
*(int4 *)(lVar3 + 0xc + lVar5 * 4) = 0x3e2aaaab;
if (iVar4 != 4) {
/* WARNING: Subroutine does not return */
__assert_fail("M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp"
,0x5d5,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = float]"
);
}
}
else {
*(int *)(lVar2 + lVar5 * 4) = param_1;
*(int4 *)(lVar3 + lVar5 * 4) = 0x3f000000;
*(int *)(lVar2 + 4 + lVar5 * 4) = param_1 + ((param_1 + 1) / 3) * -3 + 1;
*(int4 *)(lVar3 + 4 + lVar5 * 4) = 0x3f000000;
if (iVar4 != 2) {
/* WARNING: Subroutine does not return */
__assert_fail("M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp"
,0x5c9,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = float]"
);
}
}
return in_RAX;
}
|
|
61,503 |
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::assignRegularMidEdgePoint(int edgeIndex,
Matrix & matrix) const {
Point M(matrix, 15 + edgeIndex);
CornerTopology const & corner = _corners[edgeIndex];
if (corner.epOnBoundary) {
// Trivial boundary edge case -- midway between two corners
M.Assign(0, edgeIndex, 0.5f);
M.Assign(1, (edgeIndex + 1) % 3, 0.5f);
assert(M.GetSize() == 2);
} else {
// Regular case -- two corners and two vertices opposite the edge
int oppositeInRing = corner.isBoundary ?
(corner.faceInRing - 1) : ((corner.faceInRing + 5) % 6);
int oppositeVertex = corner.ringPoints[oppositeInRing];
M.Assign(0, edgeIndex, (REAL) (1.0 / 3.0));
M.Assign(1, (edgeIndex + 1) % 3, (REAL) (1.0 / 3.0));
M.Assign(2, (edgeIndex + 2) % 3, (REAL) (1.0 / 6.0));
M.Assign(3, oppositeVertex, (REAL) (1.0 / 6.0));
assert(M.GetSize() == 4);
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const:
pushq %rax
movslq %esi, %rax
movq 0x10(%rdx), %r8
movq 0x28(%rdx), %r9
movl 0x40(%r8,%rax,4), %ecx
movslq 0x3c(%r8,%rax,4), %r8
subl %r8d, %ecx
movq 0x40(%rdx), %r10
imulq $0xb0, %rax, %rax
movzwl 0x18(%rdi,%rax), %edx
testb $0x40, %dl
jne 0x7155a
addq %rax, %rdi
addq $0x18, %rdi
movl 0xc(%rdi), %eax
testb $0x1, %dl
jne 0x7159d
addl $0x5, %eax
pushq $0x6
popq %r11
cltd
idivl %r11d
movl %edx, %eax
jmp 0x7159f
movl %esi, (%r9,%r8,4)
incl %esi
pushq $0x3
popq %rdi
movl %esi, %eax
cltd
idivl %edi
movl %edx, 0x4(%r9,%r8,4)
movaps 0x4ed6c(%rip), %xmm0 # 0xc02e0
movups %xmm0, (%r10,%r8,8)
cmpl $0x2, %ecx
je 0x715ed
leaq 0x4fcd3(%rip), %rdi # 0xc1258
leaq 0x4f73c(%rip), %rsi # 0xc0cc8
leaq 0x503ab(%rip), %rcx # 0xc193e
movl $0x5c9, %edx # imm = 0x5C9
callq 0x512a0
decl %eax
movq 0x20(%rdi), %rdx
cltq
movl (%rdx,%rax,4), %edi
movl %esi, (%r9,%r8,4)
leal 0x1(%rsi), %eax
pushq $0x3
popq %r11
cltd
idivl %r11d
movl %edx, 0x4(%r9,%r8,4)
movaps 0x4d05d(%rip), %xmm0 # 0xbe620
movups %xmm0, (%r10,%r8,8)
addl $0x2, %esi
movl %esi, %eax
cltd
idivl %r11d
movl %edx, 0x8(%r9,%r8,4)
movl %edi, 0xc(%r9,%r8,4)
movaps 0x4ed0e(%rip), %xmm0 # 0xc02f0
movups %xmm0, 0x10(%r10,%r8,8)
cmpl $0x4, %ecx
jne 0x715ef
popq %rax
retq
leaq 0x4fceb(%rip), %rdi # 0xc12e1
leaq 0x4f6cb(%rip), %rsi # 0xc0cc8
leaq 0x5033a(%rip), %rcx # 0xc193e
movl $0x5d5, %edx # imm = 0x5D5
callq 0x512a0
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIdEE:
push rax
movsxd rax, esi
mov r8, [rdx+10h]
mov r9, [rdx+28h]
mov ecx, [r8+rax*4+40h]
movsxd r8, dword ptr [r8+rax*4+3Ch]
sub ecx, r8d
mov r10, [rdx+40h]
imul rax, 0B0h
movzx edx, word ptr [rdi+rax+18h]
test dl, 40h
jnz short loc_7155A
add rdi, rax
add rdi, 18h
mov eax, [rdi+0Ch]
test dl, 1
jnz short loc_7159D
add eax, 5
push 6
pop r11
cdq
idiv r11d
mov eax, edx
jmp short loc_7159F
loc_7155A:
mov [r9+r8*4], esi
inc esi
push 3
pop rdi
mov eax, esi
cdq
idiv edi
mov [r9+r8*4+4], edx
movaps xmm0, cs:xmmword_C02E0
movups xmmword ptr [r10+r8*8], xmm0
cmp ecx, 2
jz short loc_715ED
lea rdi, aMGetsize2; "M.GetSize() == 2"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_56; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
mov edx, 5C9h
call ___assert_fail
loc_7159D:
dec eax
loc_7159F:
mov rdx, [rdi+20h]
cdqe
mov edi, [rdx+rax*4]
mov [r9+r8*4], esi
lea eax, [rsi+1]
push 3
pop r11
cdq
idiv r11d
mov [r9+r8*4+4], edx
movaps xmm0, cs:xmmword_BE620
movups xmmword ptr [r10+r8*8], xmm0
add esi, 2
mov eax, esi
cdq
idiv r11d
mov [r9+r8*4+8], edx
mov [r9+r8*4+0Ch], edi
movaps xmm0, cs:xmmword_C02F0
movups xmmword ptr [r10+r8*8+10h], xmm0
cmp ecx, 4
jnz short loc_715EF
loc_715ED:
pop rax
retn
loc_715EF:
lea rdi, aMGetsize4; "M.GetSize() == 4"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_56; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
mov edx, 5D5h
call ___assert_fail
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(
long long a1,
int a2,
_QWORD *a3)
{
long long v3; // r8
long long v4; // r9
int v5; // ecx
long long v6; // r8
int v7; // ecx
long long v8; // r10
long long v9; // rax
__int16 v10; // dx
long long v11; // rdi
int v12; // eax
int v13; // eax
int v14; // edi
v3 = a3[2];
v4 = a3[5];
v5 = *(_DWORD *)(v3 + 4LL * a2 + 64);
v6 = *(int *)(v3 + 4LL * a2 + 60);
v7 = v5 - v6;
v8 = a3[8];
v9 = 176LL * a2;
v10 = *(_WORD *)(a1 + v9 + 24);
if ( (v10 & 0x40) != 0 )
{
*(_DWORD *)(v4 + 4 * v6) = a2;
*(_DWORD *)(v4 + 4 * v6 + 4) = (a2 + 1) % 3;
*(_OWORD *)(v8 + 8 * v6) = xmmword_C02E0;
if ( v7 != 2 )
__assert_fail(
"M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1481LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]");
}
else
{
v11 = v9 + a1 + 24;
v12 = *(_DWORD *)(v11 + 12);
if ( (v10 & 1) != 0 )
v13 = v12 - 1;
else
v13 = (v12 + 5) % 6;
v14 = *(_DWORD *)(*(_QWORD *)(v11 + 32) + 4LL * v13);
*(_DWORD *)(v4 + 4 * v6) = a2;
*(_DWORD *)(v4 + 4 * v6 + 4) = (a2 + 1) % 3;
*(_OWORD *)(v8 + 8 * v6) = xmmword_BE620;
*(_DWORD *)(v4 + 4 * v6 + 8) = (a2 + 2) % 3;
*(_DWORD *)(v4 + 4 * v6 + 12) = v14;
*(_OWORD *)(v8 + 8 * v6 + 16) = xmmword_C02F0;
if ( v7 != 4 )
__assert_fail(
"M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1493LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]");
}
}
|
assignRegularMidEdgePoint:
PUSH RAX
MOVSXD RAX,ESI
MOV R8,qword ptr [RDX + 0x10]
MOV R9,qword ptr [RDX + 0x28]
MOV ECX,dword ptr [R8 + RAX*0x4 + 0x40]
MOVSXD R8,dword ptr [R8 + RAX*0x4 + 0x3c]
SUB ECX,R8D
MOV R10,qword ptr [RDX + 0x40]
IMUL RAX,RAX,0xb0
MOVZX EDX,word ptr [RDI + RAX*0x1 + 0x18]
TEST DL,0x40
JNZ 0x0017155a
ADD RDI,RAX
ADD RDI,0x18
MOV EAX,dword ptr [RDI + 0xc]
TEST DL,0x1
JNZ 0x0017159d
ADD EAX,0x5
PUSH 0x6
POP R11
CDQ
IDIV R11D
MOV EAX,EDX
JMP 0x0017159f
LAB_0017155a:
MOV dword ptr [R9 + R8*0x4],ESI
INC ESI
PUSH 0x3
POP RDI
MOV EAX,ESI
CDQ
IDIV EDI
MOV dword ptr [R9 + R8*0x4 + 0x4],EDX
MOVAPS XMM0,xmmword ptr [0x001c02e0]
MOVUPS xmmword ptr [R10 + R8*0x8],XMM0
CMP ECX,0x2
JZ 0x001715ed
LEA RDI,[0x1c1258]
LEA RSI,[0x1c0cc8]
LEA RCX,[0x1c193e]
MOV EDX,0x5c9
CALL 0x001512a0
LAB_0017159d:
DEC EAX
LAB_0017159f:
MOV RDX,qword ptr [RDI + 0x20]
CDQE
MOV EDI,dword ptr [RDX + RAX*0x4]
MOV dword ptr [R9 + R8*0x4],ESI
LEA EAX,[RSI + 0x1]
PUSH 0x3
POP R11
CDQ
IDIV R11D
MOV dword ptr [R9 + R8*0x4 + 0x4],EDX
MOVAPS XMM0,xmmword ptr [0x001be620]
MOVUPS xmmword ptr [R10 + R8*0x8],XMM0
ADD ESI,0x2
MOV EAX,ESI
CDQ
IDIV R11D
MOV dword ptr [R9 + R8*0x4 + 0x8],EDX
MOV dword ptr [R9 + R8*0x4 + 0xc],EDI
MOVAPS XMM0,xmmword ptr [0x001c02f0]
MOVUPS xmmword ptr [R10 + R8*0x8 + 0x10],XMM0
CMP ECX,0x4
JNZ 0x001715ef
LAB_001715ed:
POP RAX
RET
LAB_001715ef:
LEA RDI,[0x1c12e1]
LEA RSI,[0x1c0cc8]
LEA RCX,[0x1c193e]
MOV EDX,0x5d5
CALL 0x001512a0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int,
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint
(GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2)
{
int8 *puVar1;
int4 uVar2;
long lVar3;
long lVar4;
int8 uVar5;
int iVar6;
int8 in_RAX;
long lVar7;
int iVar8;
long lVar9;
lVar7 = (long)param_1;
lVar3 = *(long *)(param_2 + 0x28);
iVar8 = *(int *)(*(long *)(param_2 + 0x10) + 0x3c + lVar7 * 4);
lVar9 = (long)iVar8;
iVar8 = *(int *)(*(long *)(param_2 + 0x10) + 0x40 + lVar7 * 4) - iVar8;
lVar4 = *(long *)(param_2 + 0x40);
lVar7 = lVar7 * 0xb0;
if ((*(ushort *)(this + lVar7 + 0x18) & 0x40) == 0) {
if ((*(ushort *)(this + lVar7 + 0x18) & 1) == 0) {
iVar6 = (*(int *)(this + lVar7 + 0x24) + 5) % 6;
}
else {
iVar6 = *(int *)(this + lVar7 + 0x24) + -1;
}
uVar2 = *(int4 *)(*(long *)(this + lVar7 + 0x38) + (long)iVar6 * 4);
*(int *)(lVar3 + lVar9 * 4) = param_1;
*(int *)(lVar3 + 4 + lVar9 * 4) = (param_1 + 1) % 3;
uVar5 = _UNK_001be628;
puVar1 = (int8 *)(lVar4 + lVar9 * 8);
*puVar1 = _DAT_001be620;
puVar1[1] = uVar5;
*(int *)(lVar3 + 8 + lVar9 * 4) = (param_1 + 2) % 3;
*(int4 *)(lVar3 + 0xc + lVar9 * 4) = uVar2;
uVar5 = _UNK_001c02f8;
puVar1 = (int8 *)(lVar4 + 0x10 + lVar9 * 8);
*puVar1 = _DAT_001c02f0;
puVar1[1] = uVar5;
if (iVar8 != 4) {
/* WARNING: Subroutine does not return */
__assert_fail("M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp"
,0x5d5,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]"
);
}
}
else {
*(int *)(lVar3 + lVar9 * 4) = param_1;
*(int *)(lVar3 + 4 + lVar9 * 4) = (param_1 + 1) % 3;
uVar5 = _UNK_001c02e8;
puVar1 = (int8 *)(lVar4 + lVar9 * 8);
*puVar1 = _DAT_001c02e0;
puVar1[1] = uVar5;
if (iVar8 != 2) {
/* WARNING: Subroutine does not return */
__assert_fail("M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp"
,0x5c9,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]"
);
}
}
return in_RAX;
}
|
|
61,504 |
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::assignRegularMidEdgePoint(int edgeIndex,
Matrix & matrix) const {
Point M(matrix, 15 + edgeIndex);
CornerTopology const & corner = _corners[edgeIndex];
if (corner.epOnBoundary) {
// Trivial boundary edge case -- midway between two corners
M.Assign(0, edgeIndex, 0.5f);
M.Assign(1, (edgeIndex + 1) % 3, 0.5f);
assert(M.GetSize() == 2);
} else {
// Regular case -- two corners and two vertices opposite the edge
int oppositeInRing = corner.isBoundary ?
(corner.faceInRing - 1) : ((corner.faceInRing + 5) % 6);
int oppositeVertex = corner.ringPoints[oppositeInRing];
M.Assign(0, edgeIndex, (REAL) (1.0 / 3.0));
M.Assign(1, (edgeIndex + 1) % 3, (REAL) (1.0 / 3.0));
M.Assign(2, (edgeIndex + 2) % 3, (REAL) (1.0 / 6.0));
M.Assign(3, oppositeVertex, (REAL) (1.0 / 6.0));
assert(M.GetSize() == 4);
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const:
pushq %rax
movslq %esi, %r9
movq 0x10(%rdx), %rcx
movq 0x28(%rdx), %r8
movl 0x40(%rcx,%r9,4), %eax
movslq 0x3c(%rcx,%r9,4), %rcx
subl %ecx, %eax
movq 0x40(%rdx), %rdx
imulq $0xb0, %r9, %r9
movzwl 0x18(%rdi,%r9), %r10d
testb $0x40, %r10b
jne 0x5ef20
addq %r9, %rdi
addq $0x18, %rdi
movl 0xc(%rdi), %r9d
testb $0x1, %r10b
jne 0x5ef81
addl $0x5, %r9d
movslq %r9d, %r9
imulq $0x2aaaaaab, %r9, %r10 # imm = 0x2AAAAAAB
movq %r10, %r11
shrq $0x3f, %r11
shrq $0x20, %r10
addl %r11d, %r10d
addl %r10d, %r10d
leal (%r10,%r10,2), %r10d
subl %r10d, %r9d
jmp 0x5ef84
movl %esi, (%r8,%rcx,4)
movl %esi, %edi
incl %edi
movslq %edi, %rdi
imulq $0x55555556, %rdi, %rdi # imm = 0x55555556
movq %rdi, %r9
shrq $0x3f, %r9
shrq $0x20, %rdi
addl %r9d, %edi
leal (%rdi,%rdi,2), %edi
negl %edi
addl %edi, %esi
incl %esi
movl %esi, 0x4(%r8,%rcx,4)
movaps 0x5a3fb(%rip), %xmm0 # 0xb9350
movups %xmm0, (%rdx,%rcx,8)
cmpl $0x2, %eax
je 0x5f013
leaq 0x5b3cf(%rip), %rdi # 0xba338
leaq 0x5ae38(%rip), %rsi # 0xb9da8
leaq 0x5baa7(%rip), %rcx # 0xbaa1e
movl $0x5c9, %edx # imm = 0x5C9
callq 0x39540
decl %r9d
movq 0x20(%rdi), %rdi
movslq %r9d, %r9
movl (%rdi,%r9,4), %edi
movl %esi, (%r8,%rcx,4)
leal 0x1(%rsi), %r9d
movslq %r9d, %r9
imulq $0x55555556, %r9, %r9 # imm = 0x55555556
movq %r9, %r10
shrq $0x3f, %r10
shrq $0x20, %r9
addl %r10d, %r9d
leal (%r9,%r9,2), %r9d
negl %r9d
addl %esi, %r9d
incl %r9d
movl %r9d, 0x4(%r8,%rcx,4)
movaps 0x586f8(%rip), %xmm0 # 0xb76c0
movups %xmm0, (%rdx,%rcx,8)
movl %esi, %r9d
addl $0x2, %r9d
movslq %r9d, %r9
imulq $0x55555556, %r9, %r9 # imm = 0x55555556
movq %r9, %r10
shrq $0x3f, %r10
shrq $0x20, %r9
addl %r10d, %r9d
leal (%r9,%r9,2), %r9d
negl %r9d
addl %r9d, %esi
addl $0x2, %esi
movl %esi, 0x8(%r8,%rcx,4)
movl %edi, 0xc(%r8,%rcx,4)
movaps 0x5a357(%rip), %xmm0 # 0xb9360
movups %xmm0, 0x10(%rdx,%rcx,8)
cmpl $0x4, %eax
jne 0x5f015
popq %rax
retq
leaq 0x5b3a5(%rip), %rdi # 0xba3c1
leaq 0x5ad85(%rip), %rsi # 0xb9da8
leaq 0x5b9f4(%rip), %rcx # 0xbaa1e
movl $0x5d5, %edx # imm = 0x5D5
callq 0x39540
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25assignRegularMidEdgePointEiRNS1_12SparseMatrixIdEE:
push rax
movsxd r9, esi
mov rcx, [rdx+10h]
mov r8, [rdx+28h]
mov eax, [rcx+r9*4+40h]
movsxd rcx, dword ptr [rcx+r9*4+3Ch]
sub eax, ecx
mov rdx, [rdx+40h]
imul r9, 0B0h
movzx r10d, word ptr [rdi+r9+18h]
test r10b, 40h
jnz short loc_5EF20
add rdi, r9
add rdi, 18h
mov r9d, [rdi+0Ch]
test r10b, 1
jnz loc_5EF81
add r9d, 5
movsxd r9, r9d
imul r10, r9, 2AAAAAABh
mov r11, r10
shr r11, 3Fh
shr r10, 20h
add r10d, r11d
add r10d, r10d
lea r10d, [r10+r10*2]
sub r9d, r10d
jmp short loc_5EF84
loc_5EF20:
mov [r8+rcx*4], esi
mov edi, esi
inc edi
movsxd rdi, edi
imul rdi, 55555556h
mov r9, rdi
shr r9, 3Fh
shr rdi, 20h
add edi, r9d
lea edi, [rdi+rdi*2]
neg edi
add esi, edi
inc esi
mov [r8+rcx*4+4], esi
movaps xmm0, cs:xmmword_B9350
movups xmmword ptr [rdx+rcx*8], xmm0
cmp eax, 2
jz loc_5F013
lea rdi, aMGetsize2; "M.GetSize() == 2"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_56; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
mov edx, 5C9h
call ___assert_fail
loc_5EF81:
dec r9d
loc_5EF84:
mov rdi, [rdi+20h]
movsxd r9, r9d
mov edi, [rdi+r9*4]
mov [r8+rcx*4], esi
lea r9d, [rsi+1]
movsxd r9, r9d
imul r9, 55555556h
mov r10, r9
shr r10, 3Fh
shr r9, 20h
add r9d, r10d
lea r9d, [r9+r9*2]
neg r9d
add r9d, esi
inc r9d
mov [r8+rcx*4+4], r9d
movaps xmm0, cs:xmmword_B76C0
movups xmmword ptr [rdx+rcx*8], xmm0
mov r9d, esi
add r9d, 2
movsxd r9, r9d
imul r9, 55555556h
mov r10, r9
shr r10, 3Fh
shr r9, 20h
add r9d, r10d
lea r9d, [r9+r9*2]
neg r9d
add esi, r9d
add esi, 2
mov [r8+rcx*4+8], esi
mov [r8+rcx*4+0Ch], edi
movaps xmm0, cs:xmmword_B9360
movups xmmword ptr [rdx+rcx*8+10h], xmm0
cmp eax, 4
jnz short loc_5F015
loc_5F013:
pop rax
retn
loc_5F015:
lea rdi, aMGetsize4; "M.GetSize() == 4"
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_56; "void OpenSubdiv::v3_6_0::Far::GregoryTr"...
mov edx, 5D5h
call ___assert_fail
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(
long long a1,
int a2,
_QWORD *a3)
{
long long v3; // rcx
long long v4; // r8
int v5; // eax
long long v6; // rcx
int v7; // eax
long long v8; // rdx
long long v9; // r9
__int16 v10; // r10
long long v11; // rdi
int v12; // r9d
int v13; // r9d
int v14; // edi
v3 = a3[2];
v4 = a3[5];
v5 = *(_DWORD *)(v3 + 4LL * a2 + 64);
v6 = *(int *)(v3 + 4LL * a2 + 60);
v7 = v5 - v6;
v8 = a3[8];
v9 = 176LL * a2;
v10 = *(_WORD *)(a1 + v9 + 24);
if ( (v10 & 0x40) != 0 )
{
*(_DWORD *)(v4 + 4 * v6) = a2;
*(_DWORD *)(v4 + 4 * v6 + 4) = -3 * ((a2 + 1) / 3) + a2 + 1;
*(_OWORD *)(v8 + 8 * v6) = xmmword_B9350;
if ( v7 != 2 )
__assert_fail(
"M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1481LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]");
}
else
{
v11 = v9 + a1 + 24;
v12 = *(_DWORD *)(v11 + 12);
if ( (v10 & 1) != 0 )
v13 = v12 - 1;
else
v13 = (v12 + 5) % 6;
v14 = *(_DWORD *)(*(_QWORD *)(v11 + 32) + 4LL * v13);
*(_DWORD *)(v4 + 4 * v6) = a2;
*(_DWORD *)(v4 + 4 * v6 + 4) = a2 - 3 * ((a2 + 1) / 3) + 1;
*(_OWORD *)(v8 + 8 * v6) = xmmword_B76C0;
*(_DWORD *)(v4 + 4 * v6 + 8) = -3 * ((a2 + 2) / 3) + a2 + 2;
*(_DWORD *)(v4 + 4 * v6 + 12) = v14;
*(_OWORD *)(v8 + 8 * v6 + 16) = xmmword_B9360;
if ( v7 != 4 )
__assert_fail(
"M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp",
1493LL,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]");
}
}
|
assignRegularMidEdgePoint:
PUSH RAX
MOVSXD R9,ESI
MOV RCX,qword ptr [RDX + 0x10]
MOV R8,qword ptr [RDX + 0x28]
MOV EAX,dword ptr [RCX + R9*0x4 + 0x40]
MOVSXD RCX,dword ptr [RCX + R9*0x4 + 0x3c]
SUB EAX,ECX
MOV RDX,qword ptr [RDX + 0x40]
IMUL R9,R9,0xb0
MOVZX R10D,word ptr [RDI + R9*0x1 + 0x18]
TEST R10B,0x40
JNZ 0x0015ef20
ADD RDI,R9
ADD RDI,0x18
MOV R9D,dword ptr [RDI + 0xc]
TEST R10B,0x1
JNZ 0x0015ef81
ADD R9D,0x5
MOVSXD R9,R9D
IMUL R10,R9,0x2aaaaaab
MOV R11,R10
SHR R11,0x3f
SHR R10,0x20
ADD R10D,R11D
ADD R10D,R10D
LEA R10D,[R10 + R10*0x2]
SUB R9D,R10D
JMP 0x0015ef84
LAB_0015ef20:
MOV dword ptr [R8 + RCX*0x4],ESI
MOV EDI,ESI
INC EDI
MOVSXD RDI,EDI
IMUL RDI,RDI,0x55555556
MOV R9,RDI
SHR R9,0x3f
SHR RDI,0x20
ADD EDI,R9D
LEA EDI,[RDI + RDI*0x2]
NEG EDI
ADD ESI,EDI
INC ESI
MOV dword ptr [R8 + RCX*0x4 + 0x4],ESI
MOVAPS XMM0,xmmword ptr [0x001b9350]
MOVUPS xmmword ptr [RDX + RCX*0x8],XMM0
CMP EAX,0x2
JZ 0x0015f013
LEA RDI,[0x1ba338]
LEA RSI,[0x1b9da8]
LEA RCX,[0x1baa1e]
MOV EDX,0x5c9
CALL 0x00139540
LAB_0015ef81:
DEC R9D
LAB_0015ef84:
MOV RDI,qword ptr [RDI + 0x20]
MOVSXD R9,R9D
MOV EDI,dword ptr [RDI + R9*0x4]
MOV dword ptr [R8 + RCX*0x4],ESI
LEA R9D,[RSI + 0x1]
MOVSXD R9,R9D
IMUL R9,R9,0x55555556
MOV R10,R9
SHR R10,0x3f
SHR R9,0x20
ADD R9D,R10D
LEA R9D,[R9 + R9*0x2]
NEG R9D
ADD R9D,ESI
INC R9D
MOV dword ptr [R8 + RCX*0x4 + 0x4],R9D
MOVAPS XMM0,xmmword ptr [0x001b76c0]
MOVUPS xmmword ptr [RDX + RCX*0x8],XMM0
MOV R9D,ESI
ADD R9D,0x2
MOVSXD R9,R9D
IMUL R9,R9,0x55555556
MOV R10,R9
SHR R10,0x3f
SHR R9,0x20
ADD R9D,R10D
LEA R9D,[R9 + R9*0x2]
NEG R9D
ADD ESI,R9D
ADD ESI,0x2
MOV dword ptr [R8 + RCX*0x4 + 0x8],ESI
MOV dword ptr [R8 + RCX*0x4 + 0xc],EDI
MOVAPS XMM0,xmmword ptr [0x001b9360]
MOVUPS xmmword ptr [RDX + RCX*0x8 + 0x10],XMM0
CMP EAX,0x4
JNZ 0x0015f015
LAB_0015f013:
POP RAX
RET
LAB_0015f015:
LEA RDI,[0x1ba3c1]
LEA RSI,[0x1b9da8]
LEA RCX,[0x1baa1e]
MOV EDX,0x5d5
CALL 0x00139540
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int,
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint
(GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2)
{
int8 *puVar1;
int4 uVar2;
long lVar3;
long lVar4;
int8 uVar5;
int iVar6;
int8 in_RAX;
long lVar7;
int iVar8;
long lVar9;
lVar9 = (long)param_1;
lVar3 = *(long *)(param_2 + 0x28);
iVar6 = *(int *)(*(long *)(param_2 + 0x10) + 0x3c + lVar9 * 4);
lVar7 = (long)iVar6;
iVar6 = *(int *)(*(long *)(param_2 + 0x10) + 0x40 + lVar9 * 4) - iVar6;
lVar4 = *(long *)(param_2 + 0x40);
lVar9 = lVar9 * 0xb0;
if ((*(ushort *)(this + lVar9 + 0x18) & 0x40) == 0) {
if ((*(ushort *)(this + lVar9 + 0x18) & 1) == 0) {
iVar8 = (*(int *)(this + lVar9 + 0x24) + 5) % 6;
}
else {
iVar8 = *(int *)(this + lVar9 + 0x24) + -1;
}
uVar2 = *(int4 *)(*(long *)(this + lVar9 + 0x38) + (long)iVar8 * 4);
*(int *)(lVar3 + lVar7 * 4) = param_1;
*(int *)(lVar3 + 4 + lVar7 * 4) = ((param_1 + 1) / 3) * -3 + param_1 + 1;
uVar5 = _UNK_001b76c8;
puVar1 = (int8 *)(lVar4 + lVar7 * 8);
*puVar1 = _DAT_001b76c0;
puVar1[1] = uVar5;
*(int *)(lVar3 + 8 + lVar7 * 4) = param_1 + ((param_1 + 2) / 3) * -3 + 2;
*(int4 *)(lVar3 + 0xc + lVar7 * 4) = uVar2;
uVar5 = _UNK_001b9368;
puVar1 = (int8 *)(lVar4 + 0x10 + lVar7 * 8);
*puVar1 = _DAT_001b9360;
puVar1[1] = uVar5;
if (iVar6 != 4) {
/* WARNING: Subroutine does not return */
__assert_fail("M.GetSize() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp"
,0x5d5,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]"
);
}
}
else {
*(int *)(lVar3 + lVar7 * 4) = param_1;
*(int *)(lVar3 + 4 + lVar7 * 4) = param_1 + ((param_1 + 1) / 3) * -3 + 1;
uVar5 = _UNK_001b9358;
puVar1 = (int8 *)(lVar4 + lVar7 * 8);
*puVar1 = _DAT_001b9350;
puVar1[1] = uVar5;
if (iVar6 != 2) {
/* WARNING: Subroutine does not return */
__assert_fail("M.GetSize() == 2",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp"
,0x5c9,
"void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularMidEdgePoint(int, Matrix &) const [REAL = double]"
);
}
}
return in_RAX;
}
|
|
61,505 |
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
T& operator[](const key_type& key)
{
return emplace(key, T{}).first->second;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x5b2d4
movq %r14, %rdi
movl $0x1, %esi
callq 0x5b2d4
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x91624
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5b2d4
movq %r14, %rdi
callq 0x607c2
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x915ab
callq 0x701e6
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x915ba
callq 0x701e6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x915c9
callq 0x701e6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x915ff
movq 0x9c99e(%rip), %rax # 0x12df78
cmpb $0x0, (%rax)
je 0x915ea
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x915f4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x915ff
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x88994
movq %rbx, %rdi
callq 0x1c030
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value&&)
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+68h+var_30]
test rdi, rdi
jz short loc_915AB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_915AB:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_915BA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_915BA:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_915C9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_915C9:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_915FF
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_915EA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_915F4
loc_915EA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_915F4:
cmp eax, 1
jnz short loc_915FF
mov rax, [rdi]
call qword ptr [rax+18h]
loc_915FF:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
v2 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
a1,
a2,
&v6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
|
operator[]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015b2d4
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015b2d4
LAB_00191579:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x00191624
LAB_00191587:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015b2d4
MOV RDI,R14
CALL 0x001607c2
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x001915ab
CALL 0x001701e6
LAB_001915ab:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001915ba
CALL 0x001701e6
LAB_001915ba:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001915c9
CALL 0x001701e6
LAB_001915c9:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001915ff
MOV RAX,qword ptr [0x0022df78]
CMP byte ptr [RAX],0x0
JZ 0x001915ea
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001915f4
LAB_001915ea:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001915f4:
CMP EAX,0x1
JNZ 0x001915ff
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001915ff:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
/* try { // try from 00191579 to 00191586 has its CatchHandler @ 00191610 */
lVar3 = emplace(this,param_1,(Value *)&local_68);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022df78 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
|
|
61,506 |
my_large_free
|
eloqsql/mysys/my_largepage.c
|
void my_large_free(void *ptr, size_t size)
{
DBUG_ENTER("my_large_free");
/*
The following implementations can only fail if ptr was not allocated with
my_large_malloc(), i.e. my_malloc_lock() was used so we should free it
with my_free_lock()
For ASAN, we need to explicitly unpoison this memory region because the OS
may reuse that memory for some TLS or stack variable. It will remain
poisoned if it was explicitly poisioned before release. If this happens,
we'll have hard to debug false positives like in MDEV-21239.
For valgrind, we mark it as UNDEFINED rather than NOACCESS because of the
implict reuse possiblility.
*/
#if defined(HAVE_MMAP) && !defined(_WIN32)
if (munmap(ptr, size))
{
my_error(EE_BADMEMORYRELEASE, MYF(ME_ERROR_LOG_ONLY), ptr, size, errno);
}
# if !__has_feature(memory_sanitizer)
else
{
MEM_MAKE_ADDRESSABLE(ptr, size);
}
# endif
#elif defined(_WIN32)
/*
When RELEASE memory, the size parameter must be 0.
Do not use MEM_RELEASE with MEM_DECOMMIT.
*/
if (ptr && !VirtualFree(ptr, 0, MEM_RELEASE))
{
my_error(EE_BADMEMORYRELEASE, MYF(ME_ERROR_LOG_ONLY), ptr, size,
GetLastError());
}
# if !__has_feature(memory_sanitizer)
else
{
MEM_MAKE_ADDRESSABLE(ptr, size);
}
# endif
#else
my_free_lock(ptr);
#endif
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_large_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x294e0
testl %eax, %eax
je 0xa8ee8
callq 0x297b0
movl (%rax), %r8d
movl $0x80, %esi
movl $0x24, %edi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x9f103
popq %rbx
popq %r14
popq %rbp
retq
|
my_large_free:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
call _munmap
test eax, eax
jz short loc_A8EE8
call ___errno_location
mov r8d, [rax]
mov esi, 80h
mov edi, 24h ; '$'
mov rdx, r14
mov rcx, rbx
xor eax, eax
pop rbx
pop r14
pop rbp
jmp my_error
loc_A8EE8:
pop rbx
pop r14
pop rbp
retn
|
unsigned long long my_large_free(long long a1, long long a2)
{
unsigned long long result; // rax
unsigned int *v3; // rax
result = munmap(a1, a2);
if ( (_DWORD)result )
{
v3 = (unsigned int *)__errno_location(a1);
return my_error(0x24u, 128LL, a1, a2, *v3);
}
return result;
}
|
my_large_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x001294e0
TEST EAX,EAX
JZ 0x001a8ee8
CALL 0x001297b0
MOV R8D,dword ptr [RAX]
MOV ESI,0x80
MOV EDI,0x24
MOV RDX,R14
MOV RCX,RBX
XOR EAX,EAX
POP RBX
POP R14
POP RBP
JMP 0x0019f103
LAB_001a8ee8:
POP RBX
POP R14
POP RBP
RET
|
void my_large_free(void *param_1,size_t param_2)
{
int iVar1;
int *piVar2;
iVar1 = munmap(param_1,param_2);
if (iVar1 != 0) {
piVar2 = __errno_location();
my_error(0x24,0x80,param_1,param_2,*piVar2);
return;
}
return;
}
|
|
61,507 |
mi_check_unique
|
eloqsql/storage/myisam/mi_unique.c
|
my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record,
ha_checksum unique_hash, my_off_t disk_pos)
{
my_off_t lastpos=info->lastpos;
MI_KEYDEF *key= &info->s->keyinfo[def->key];
uchar *key_buff=info->lastkey2;
DBUG_ENTER("mi_check_unique");
/* We need to store the hash value as a key in the record, breaking const */
mi_unique_store(((uchar*) record)+key->seg->start, unique_hash);
_mi_make_key(info,def->key,key_buff,record,0);
/* The above changed info->lastkey2. Inform mi_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
if (_mi_search(info,info->s->keyinfo+def->key,key_buff,MI_UNIQUE_HASH_LENGTH,
SEARCH_FIND,info->s->state.key_root[def->key]))
{
info->page_changed=1; /* Can't optimize read next */
info->lastpos= lastpos;
DBUG_RETURN(0); /* No matching rows */
}
for (;;)
{
if (info->lastpos != disk_pos &&
!(*info->s->compare_unique)(info,def,record,info->lastpos))
{
my_errno=HA_ERR_FOUND_DUPP_UNIQUE;
info->errkey= (int) def->key;
info->dupp_key_pos= info->lastpos;
info->page_changed=1; /* Can't optimize read next */
info->lastpos=lastpos;
DBUG_PRINT("info",("Found duplicate"));
DBUG_RETURN(1); /* Found identical */
}
if (_mi_search_next(info,info->s->keyinfo+def->key, info->lastkey,
MI_UNIQUE_HASH_LENGTH, SEARCH_BIGGER,
info->s->state.key_root[def->key]) ||
memcmp(info->lastkey, key_buff, MI_UNIQUE_HASH_LENGTH))
{
info->page_changed=1; /* Can't optimize read next */
info->lastpos=lastpos;
DBUG_RETURN(0); /* end of tree */
}
}
}
|
O0
|
c
|
mi_check_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x170(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb %al, %dl
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, 0x3(%rax,%rcx)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %dl
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, 0x2(%rax,%rcx)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %dl
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, 0x1(%rax,%rcx)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %dl
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %esi
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xae590
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
andl $0xffffefff, %ecx # imm = 0xFFFFEFFF
movl %ecx, 0x1d0(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rsi
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
cltq
imulq $0x70, %rax, %rax
addq %rax, %rsi
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x98(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movq (%rax,%rcx,8), %r9
movl $0x4, %ecx
movl $0x1, %r8d
callq 0xbe7d0
cmpl $0x0, %eax
je 0xc4abd
movq -0x10(%rbp), %rax
movb $0x1, 0x33c(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
movb $0x0, -0x1(%rbp)
jmp 0xc4bfc
jmp 0xc4abf
movq -0x10(%rbp), %rax
movq 0x170(%rax), %rax
cmpq -0x30(%rbp), %rax
je 0xc4b5a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x2d8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq 0x170(%rcx), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0xc4b5a
callq 0xf6090
movl $0x8d, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1f0(%rax)
movq -0x10(%rbp), %rax
movq 0x170(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1a0(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x33c(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
jmp 0xc4b4f
jmp 0xc4b51
movb $0x1, -0x1(%rbp)
jmp 0xc4bfc
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rsi
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
cltq
imulq $0x70, %rax, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x98(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movq (%rax,%rcx,8), %r9
movl $0x4, %ecx
movl $0x8, %r8d
callq 0xc1dd0
cmpl $0x0, %eax
jne 0xc4bd7
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
movl (%rax), %eax
subl %ecx, %eax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xc4bf7
movq -0x10(%rbp), %rax
movb $0x1, 0x33c(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
movb $0x0, -0x1(%rbp)
jmp 0xc4bfc
jmp 0xc4abf
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mi_check_unique:
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_24], ecx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax+170h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+218h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+110h]
mov [rbp+var_48], rax
mov eax, [rbp+var_24]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov dl, al
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
mov rcx, [rcx+28h]
mov ecx, [rcx+8]
mov [rax+rcx+3], dl
mov rax, [rbp+var_50]
shr rax, 8
mov dl, al
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
mov rcx, [rcx+28h]
mov ecx, [rcx+8]
mov [rax+rcx+2], dl
mov rax, [rbp+var_50]
shr rax, 10h
mov dl, al
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
mov rcx, [rcx+28h]
mov ecx, [rcx+8]
mov [rax+rcx+1], dl
mov rax, [rbp+var_50]
shr rax, 18h
mov dl, al
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
mov rcx, [rcx+28h]
mov ecx, [rcx+8]
mov [rax+rcx], dl
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
movzx esi, byte ptr [rax+2]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_20]
xor eax, eax
mov r8d, eax
call _mi_make_key
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
and ecx, 0FFFFEFFFh
mov [rax+1D0h], ecx
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+218h]
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
cdqe
imul rax, 70h ; 'p'
add rsi, rax
mov rdx, [rbp+var_48]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+98h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
mov r9, [rax+rcx*8]
mov ecx, 4
mov r8d, 1
call _mi_search
cmp eax, 0
jz short loc_C4ABD
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 1
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+170h], rcx
mov [rbp+var_1], 0
jmp loc_C4BFC
loc_C4ABD:
jmp short $+2
loc_C4ABF:
mov rax, [rbp+var_10]
mov rax, [rax+170h]
cmp rax, [rbp+var_30]
jz loc_C4B5A
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+2D8h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx+170h]
call rax
cmp eax, 0
jnz short loc_C4B5A
call _my_thread_var
mov dword ptr [rax], 8Dh
mov rax, [rbp+var_18]
movzx ecx, byte ptr [rax+2]
mov rax, [rbp+var_10]
mov [rax+1F0h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+170h]
mov rax, [rbp+var_10]
mov [rax+1A0h], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 1
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+170h], rcx
jmp short $+2
loc_C4B4F:
jmp short $+2
loc_C4B51:
mov [rbp+var_1], 1
jmp loc_C4BFC
loc_C4B5A:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+218h]
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
cdqe
imul rax, 70h ; 'p'
add rsi, rax
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+98h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
mov r9, [rax+rcx*8]
mov ecx, 4
mov r8d, 8
call _mi_search_next
cmp eax, 0
jnz short loc_C4BD7
mov rax, [rbp+var_10]
mov rax, [rax+108h]
mov rcx, [rbp+var_48]
mov ecx, [rcx]
mov eax, [rax]
sub eax, ecx
setnz al
movzx eax, al
cmp eax, 0
jz short loc_C4BF7
loc_C4BD7:
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 1
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+170h], rcx
mov [rbp+var_1], 0
jmp short loc_C4BFC
loc_C4BF7:
jmp loc_C4ABF
loc_C4BFC:
mov al, [rbp+var_1]
add rsp, 50h
pop rbp
retn
|
char mi_check_unique(long long a1, long long a2, long long a3, int a4, long long a5)
{
_BYTE *v6; // [rsp+8h] [rbp-48h]
long long v7; // [rsp+10h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-38h]
v8 = *(_QWORD *)(a1 + 368);
v7 = 112LL * *(unsigned __int8 *)(a2 + 2) + *(_QWORD *)(*(_QWORD *)a1 + 536LL);
v6 = *(_BYTE **)(a1 + 272);
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v7 + 40) + 8LL) + 3) = a4;
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v7 + 40) + 8LL) + 2) = BYTE1(a4);
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v7 + 40) + 8LL) + 1) = BYTE2(a4);
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v7 + 40) + 8LL)) = HIBYTE(a4);
mi_make_key(a1, *(unsigned __int8 *)(a2 + 2), v6, a3, 0LL);
*(_DWORD *)(a1 + 464) &= ~0x1000u;
if ( (unsigned int)mi_search(
(_QWORD *)a1,
(const char *)(112LL * *(unsigned __int8 *)(a2 + 2) + *(_QWORD *)(*(_QWORD *)a1 + 536LL)),
(long long)v6,
4u,
1u,
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * *(unsigned __int8 *)(a2 + 2))) )
{
*(_BYTE *)(a1 + 828) = 1;
*(_QWORD *)(a1 + 368) = v8;
return 0;
}
else
{
do
{
if ( *(_QWORD *)(a1 + 368) != a5
&& !(*(unsigned int ( **)(long long, long long, long long, _QWORD))(*(_QWORD *)a1 + 728LL))(
a1,
a2,
a3,
*(_QWORD *)(a1 + 368)) )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 141;
*(_DWORD *)(a1 + 496) = *(unsigned __int8 *)(a2 + 2);
*(_QWORD *)(a1 + 416) = *(_QWORD *)(a1 + 368);
*(_BYTE *)(a1 + 828) = 1;
*(_QWORD *)(a1 + 368) = v8;
return 1;
}
}
while ( !(unsigned int)mi_search_next(
(_QWORD *)a1,
(const char *)(112LL * *(unsigned __int8 *)(a2 + 2) + *(_QWORD *)(*(_QWORD *)a1 + 536LL)),
*(_QWORD *)(a1 + 264),
4u,
8,
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * *(unsigned __int8 *)(a2 + 2)))
&& **(_DWORD **)(a1 + 264) == *(_DWORD *)v6 );
*(_BYTE *)(a1 + 828) = 1;
*(_QWORD *)(a1 + 368) = v8;
return 0;
}
}
|
mi_check_unique:
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 dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x170]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x110]
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX + 0x28]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1 + 0x3],DL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX + 0x28]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1 + 0x2],DL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX + 0x28]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1 + 0x1],DL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX + 0x28]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ESI,byte ptr [RAX + 0x2]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ae590
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0xffffefff
MOV dword ptr [RAX + 0x1d0],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x218]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
CDQE
IMUL RAX,RAX,0x70
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x98]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
MOV R9,qword ptr [RAX + RCX*0x8]
MOV ECX,0x4
MOV R8D,0x1
CALL 0x001be7d0
CMP EAX,0x0
JZ 0x001c4abd
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x1
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001c4bfc
LAB_001c4abd:
JMP 0x001c4abf
LAB_001c4abf:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x170]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001c4b5a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2d8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x170]
CALL RAX
CMP EAX,0x0
JNZ 0x001c4b5a
CALL 0x001f6090
MOV dword ptr [RAX],0x8d
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1f0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x170]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x1a0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x1
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
JMP 0x001c4b4f
LAB_001c4b4f:
JMP 0x001c4b51
LAB_001c4b51:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001c4bfc
LAB_001c4b5a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x218]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
CDQE
IMUL RAX,RAX,0x70
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x98]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
MOV R9,qword ptr [RAX + RCX*0x8]
MOV ECX,0x4
MOV R8D,0x8
CALL 0x001c1dd0
CMP EAX,0x0
JNZ 0x001c4bd7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x108]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX]
MOV EAX,dword ptr [RAX]
SUB EAX,ECX
SETNZ AL
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001c4bf7
LAB_001c4bd7:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x1
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001c4bfc
LAB_001c4bf7:
JMP 0x001c4abf
LAB_001c4bfc:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x50
POP RBP
RET
|
int1 mi_check_unique(long *param_1,long param_2,long param_3,int4 param_4,long param_5)
{
long lVar1;
int *piVar2;
int iVar3;
long lVar4;
int4 *puVar5;
lVar1 = param_1[0x2e];
lVar4 = *(long *)(*param_1 + 0x218) + (ulong)*(byte *)(param_2 + 2) * 0x70;
piVar2 = (int *)param_1[0x22];
*(char *)(param_3 + 3 + (ulong)*(uint *)(*(long *)(lVar4 + 0x28) + 8)) = (char)param_4;
*(char *)(param_3 + 2 + (ulong)*(uint *)(*(long *)(lVar4 + 0x28) + 8)) =
(char)((uint)param_4 >> 8);
*(char *)(param_3 + 1 + (ulong)*(uint *)(*(long *)(lVar4 + 0x28) + 8)) =
(char)((uint)param_4 >> 0x10);
*(char *)(param_3 + (ulong)*(uint *)(*(long *)(lVar4 + 0x28) + 8)) = (char)((uint)param_4 >> 0x18)
;
_mi_make_key(param_1,*(int1 *)(param_2 + 2),piVar2,param_3,0);
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0xffffefff;
iVar3 = _mi_search(param_1,*(long *)(*param_1 + 0x218) +
(long)(int)(uint)*(byte *)(param_2 + 2) * 0x70,piVar2,4,1,
*(int8 *)(*(long *)(*param_1 + 0x98) + (ulong)*(byte *)(param_2 + 2) * 8)
);
if (iVar3 == 0) {
do {
if ((param_1[0x2e] != param_5) &&
(iVar3 = (**(code **)(*param_1 + 0x2d8))(param_1,param_2,param_3,param_1[0x2e]), iVar3 == 0
)) {
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x8d;
*(uint *)(param_1 + 0x3e) = (uint)*(byte *)(param_2 + 2);
param_1[0x34] = param_1[0x2e];
*(int1 *)((long)param_1 + 0x33c) = 1;
param_1[0x2e] = lVar1;
return 1;
}
iVar3 = _mi_search_next(param_1,*(long *)(*param_1 + 0x218) +
(long)(int)(uint)*(byte *)(param_2 + 2) * 0x70,param_1[0x21],4
,8,*(int8 *)
(*(long *)(*param_1 + 0x98) + (ulong)*(byte *)(param_2 + 2) * 8));
} while ((iVar3 == 0) && (*(int *)param_1[0x21] == *piVar2));
*(int1 *)((long)param_1 + 0x33c) = 1;
param_1[0x2e] = lVar1;
}
else {
*(int1 *)((long)param_1 + 0x33c) = 1;
param_1[0x2e] = lVar1;
}
return 0;
}
|
|
61,508 |
usage
|
eloqsql/storage/maria/aria_chk.c
|
static void usage(void)
{
print_version();
puts("By Monty, for your professional use");
puts("This software comes with NO WARRANTY: see the PUBLIC for details.\n");
puts("Description, check and repair of Aria tables.");
puts("Used without options all tables on the command will be checked for errors");
printf("Usage: %s [OPTIONS] tables[.MAI]\n", my_progname_short);
printf("\nGlobal options:\n");
#ifndef DBUG_OFF
printf("\
-#, --debug=... Output debug log. Often this is 'd:t:o,filename'.\n");
#endif
printf("\
-H, --HELP Print all argument options sorted alphabetically.\n\
-?, --help Print all options by groups\n\
--datadir=path Path for control file (and logs if --logdir not used)\n\
--logdir=path Path for log files\n\
--ignore-control-file Don't open the control file. Only use this if you\n\
are sure the tables are not in use by another\n\
program!\n\
--require-control-file Abort if we can't find/read the aria_log_control\n\
file\n\
-s, --silent Only print errors. One can use two -s to make\n\
maria_chk very silent.\n\
-t, --tmpdir=path Path for temporary files. Multiple paths can be\n\
specified, separated by ");
#if defined( _WIN32)
printf("semicolon (;)");
#else
printf("colon (:)");
#endif
printf(", they will be used\n\
in a round-robin fashion.\n\
-v, --verbose Print more information. This can be used with\n\
--description and --check. Use many -v for more verbosity.\n\
-V, --version Print version and exit.\n\
-w, --wait Wait if table is locked.\n\n");
#ifdef DEBUG
puts(" --start-check-pos=# Start reading file at given offset.\n");
#endif
puts("Check options (check is the default action for aria_chk):\n\
-c, --check Check table for errors.\n\
-e, --extend-check Check the table VERY throughly. Only use this in\n\
extreme cases as aria_chk should normally be able to\n\
find out if the table is ok even without this switch.\n\
-F, --fast Check only tables that haven't been closed properly.\n\
-C, --check-only-changed\n\
Check only tables that have changed since last check.\n\
-f, --force Restart with '-r' if there are any errors in the table.\n\
States will be updated as with '--update-state'.\n\
-i, --information Print statistics information about table that is checked.\n\
-m, --medium-check Faster than extend-check, but only finds 99.99% of\n\
all errors. Should be good enough for most cases.\n\
-T, --read-only Don't mark table as checked.\n\
-U, --update-state Mark tables as crashed if any errors were found and\n\
clean if check didn't find any errors but table was\n\
marked as 'not clean' before. This allows one to get\n\
rid of warnings like 'table not properly closed'. If\n\
table was updated, update also the timestamp for when\n\
the check was made. This option is on by default!\n\
Use --skip-update-state to disable.\n\
--warning-for-wrong-transaction-id\n\
Give a warning if we find a transaction id in the table that is bigger\n\
than what exists in the control file. Use --skip-... to disable warning\n\
");
puts("\
Recover (repair)/ options (When using '--recover' or '--safe-recover'):\n\
-B, --backup Make a backup of the .MAD file as 'filename-time.BAK'.\n\
--correct-checksum Correct checksum information for table.\n\
-D, --data-file-length=# Max length of data file (when recreating data\n\
file when it's full).\n\
--create-missing-keys\n\
Create missing keys. This assumes that the data\n\
file is correct and that the the number of rows stored\n\
in the index file is correct. Enables --quick.\n\
-e, --extend-check Try to recover every possible row from the data file\n\
Normally this will also find a lot of garbage rows;\n\
Don't use this option if you are not totally desperate.\n\
-f, --force Overwrite old temporary files. Add another --force to\n\
avoid 'sort_buffer_size is too small' errors.\n\
In this case we will attempt to do the repair with the\n\
given sort_buffer_size and dynamically allocate\n\
as many management buffers as needed.\n\
-k, --keys-used=# Tell Aria to update only some specific keys. # is a\n\
bit mask of which keys to use. This can be used to\n\
get faster inserts.\n\
--max-record-length=#\n\
Skip rows bigger than this if aria_chk can't allocate\n\
memory to hold it.\n\
-r, --recover Can fix almost anything except unique keys that aren't\n\
unique.\n\
-n, --sort-recover Forces recovering with sorting even if the temporary\n\
file would be very big.\n\
-p, --parallel-recover\n\
Uses the same technique as '-r' and '-n', but creates\n\
all the keys in parallel, in different threads.");
puts("\
-o, --safe-recover Uses old recovery method; Slower than '-r' but can\n \
handle a couple of cases where '-r' reports that it\n\
can't fix the data file.\n\
--transaction-log Log repair command to transaction log. This is needed\n\
if one wants to use the aria_read_log to repeat the \n\
repair\n\
--character-sets-dir=...\n\
Directory where character sets are.\n\
--set-collation=name\n\
Change the collation used by the index.\n\
-q, --quick Faster repair by not modifying the data file.\n\
One can give a second '-q' to force aria_chk to\n\
modify the original datafile in case of duplicate keys.\n\
NOTE: Tables where the data file is corrupted can't be\n\
fixed with this option.\n\
-u, --unpack Unpack file packed with ariapack.\n\
");
puts("Other actions:\n\
-a, --analyze Analyze distribution of keys. Will make some joins in\n\
MariaDB faster. You can check the calculated distribution\n\
by using '--description --verbose table_name'.\n\
--stats_method=name Specifies how index statistics collection code should\n\
treat NULLs. Possible values of name are \"nulls_unequal\"\n\
(default for 4.1/5.0), \"nulls_equal\" (emulate 4.0), and \n\
\"nulls_ignored\".\n\
-d, --description Prints some information about table.\n\
-A, --set-auto-increment[=value]\n\
Force auto_increment to start at this or higher value\n\
If no value is given, then sets the next auto_increment\n\
value to the highest used value for the auto key + 1.\n\
-S, --sort-index Sort index blocks. This speeds up 'read-next' in\n\
applications.\n\
-R, --sort-records=#\n\
Sort records according to an index. This makes your\n\
data much more localized and may speed up things\n\
(It may be VERY slow to do a sort the first time!).\n\
-b, --block-search=#\n\
Find a record, a block at given offset belongs to.\n\
-z, --zerofill Fill empty space in data and index files with zeroes.\n\
This makes the data file movable between different \n\
servers. It also fixes any wrong transaction or LSN\n\
numbers in the table after a crash or if someone\n\
removed the Aria log files.\n\
--zerofill-keep-lsn Like --zerofill but does not zero out LSN of\n\
data/index pages.");
puts("Variables:\n\
--page_buffer_size=# Size of page buffer. Used by --safe-repair\n\
--read_buffer_size=# Read buffer size for sequential reads during scanning\n\
--sort_buffer_size=# Size of sort buffer. Used by --recover\n\
--sort_key_blocks=# Internal buffer for sorting keys; Don't touch :)\n\
--write_buffer_size=# Write buffer size for sequential writes during repair");
print_defaults("my", load_default_groups);
my_print_variables(my_long_options);
}
|
O3
|
c
|
usage:
pushq %rbp
movq %rsp, %rbp
leaq 0xc24b09(%rip), %rax # 0xc5b5e0
movq (%rax), %rdx
leaq 0xc889a(%rip), %rsi # 0xff37b
leaq 0xc88ad(%rip), %rcx # 0xff395
leaq 0xc88ac(%rip), %r8 # 0xff39b
movl $0x1, %edi
xorl %eax, %eax
callq 0x2b9b0
leaq 0xc88a0(%rip), %rdi # 0xff3a2
callq 0x2b980
leaq 0xc88b8(%rip), %rdi # 0xff3c6
callq 0x2b980
leaq 0xc88ef(%rip), %rdi # 0xff409
callq 0x2b980
leaq 0xc8911(%rip), %rdi # 0xff437
callq 0x2b980
leaq 0xc24ab6(%rip), %rax # 0xc5b5e8
movq (%rax), %rdx
leaq 0xc8945(%rip), %rsi # 0xff481
movl $0x1, %edi
xorl %eax, %eax
callq 0x2b9b0
leaq 0xc8954(%rip), %rsi # 0xff4a3
movl $0x1, %edi
xorl %eax, %eax
callq 0x2b9b0
leaq 0xc8953(%rip), %rsi # 0xff4b5
movl $0x1, %edi
xorl %eax, %eax
callq 0x2b9b0
leaq 0xc8c25(%rip), %rsi # 0xff79a
movl $0x1, %edi
xorl %eax, %eax
callq 0x2b9b0
leaq 0xc8c1c(%rip), %rsi # 0xff7a4
movl $0x1, %edi
xorl %eax, %eax
callq 0x2b9b0
leaq 0xc8d41(%rip), %rdi # 0xff8dc
callq 0x2b980
leaq 0xc9321(%rip), %rdi # 0xffec8
callq 0x2b980
leaq 0xc9a1a(%rip), %rdi # 0x1005cd
callq 0x2b980
leaq 0xc9d68(%rip), %rdi # 0x100927
callq 0x2b980
leaq 0xca3a9(%rip), %rdi # 0x100f74
callq 0x2b980
leaq 0xc738a(%rip), %rdi # 0xfdf61
leaq 0x37e732(%rip), %rsi # 0x3b5310
callq 0xb3676
leaq 0x37e736(%rip), %rdi # 0x3b5320
popq %rbp
jmp 0xc1a9f
|
usage:
push rbp
mov rbp, rsp
lea rax, my_progname
mov rdx, [rax]
lea rsi, aSVer13ForSOnS; "%s Ver 1.3 for %s on %s\n"
lea rcx, aLinux; "Linux"
lea r8, aX8664; "x86_64"
mov edi, 1
xor eax, eax
call ___printf_chk
lea rdi, aByMontyForYour; "By Monty, for your professional use"
call _puts
lea rdi, aThisSoftwareCo; "This software comes with NO WARRANTY: s"...
call _puts
lea rdi, aDescriptionChe; "Description, check and repair of Aria t"...
call _puts
lea rdi, aUsedWithoutOpt; "Used without options all tables on the "...
call _puts
lea rax, my_progname_short
mov rdx, [rax]
lea rsi, aUsageSOptionsT; "Usage: %s [OPTIONS] tables[.MAI]\n"
mov edi, 1
xor eax, eax
call ___printf_chk
lea rsi, aGlobalOptions; "\nGlobal options:\n"
mov edi, 1
xor eax, eax
call ___printf_chk
lea rsi, aHHelpPrintAllA; " -H, --HELP Print all argumen"...
mov edi, 1
xor eax, eax
call ___printf_chk
lea rsi, aColon; "colon (:)"
mov edi, 1
xor eax, eax
call ___printf_chk
lea rsi, aTheyWillBeUsed; ", they will be used\n "...
mov edi, 1
xor eax, eax
call ___printf_chk
lea rdi, aCheckOptionsCh; "Check options (check is the default act"...
call _puts
lea rdi, aRecoverRepairO; "Recover (repair)/ options (When using '"...
call _puts
lea rdi, aOSafeRecoverUs; " -o, --safe-recover Uses old recovery"...
call _puts
lea rdi, aOtherActionsAA; "Other actions:\n -a, --analyze\t "...
call _puts
lea rdi, aVariablesPageB; "Variables:\n--page_buffer_size=# Size"...
call _puts
lea rdi, aMy; "my"
lea rsi, load_default_groups
call print_defaults
lea rdi, my_long_options
pop rbp
jmp my_print_variables
|
long long usage()
{
__printf_chk(1LL, "%s Ver 1.3 for %s on %s\n", my_progname, "Linux", "x86_64");
puts("By Monty, for your professional use");
puts("This software comes with NO WARRANTY: see the PUBLIC for details.\n");
puts("Description, check and repair of Aria tables.");
puts("Used without options all tables on the command will be checked for errors");
__printf_chk(1LL, "Usage: %s [OPTIONS] tables[.MAI]\n", my_progname_short);
__printf_chk(1LL, "\nGlobal options:\n");
__printf_chk(
1LL,
" -H, --HELP Print all argument options sorted alphabetically.\n"
" -?, --help Print all options by groups\n"
" --datadir=path Path for control file (and logs if --logdir not used)\n"
" --logdir=path Path for log files\n"
" --ignore-control-file Don't open the control file. Only use this if you\n"
" are sure the tables are not in use by another\n"
" program!\n"
" --require-control-file Abort if we can't find/read the aria_log_control\n"
" file\n"
" -s, --silent\t Only print errors. One can use two -s to make\n"
"\t\t maria_chk very silent.\n"
" -t, --tmpdir=path Path for temporary files. Multiple paths can be\n"
" specified, separated by ");
__printf_chk(1LL, "colon (:)");
__printf_chk(
1LL,
", they will be used\n"
" in a round-robin fashion.\n"
" -v, --verbose Print more information. This can be used with\n"
" --description and --check. Use many -v for more verbosity.\n"
" -V, --version Print version and exit.\n"
" -w, --wait Wait if table is locked.\n"
"\n");
puts(
"Check options (check is the default action for aria_chk):\n"
" -c, --check\t Check table for errors.\n"
" -e, --extend-check Check the table VERY throughly. Only use this in\n"
" extreme cases as aria_chk should normally be able to\n"
" find out if the table is ok even without this switch.\n"
" -F, --fast\t Check only tables that haven't been closed properly.\n"
" -C, --check-only-changed\n"
"\t\t Check only tables that have changed since last check.\n"
" -f, --force Restart with '-r' if there are any errors in the table.\n"
"\t\t States will be updated as with '--update-state'.\n"
" -i, --information Print statistics information about table that is checked.\n"
" -m, --medium-check Faster than extend-check, but only finds 99.99% of\n"
"\t\t all errors. Should be good enough for most cases.\n"
" -T, --read-only Don't mark table as checked.\n"
" -U, --update-state Mark tables as crashed if any errors were found and\n"
" clean if check didn't find any errors but table was\n"
"\t marked as 'not clean' before. This allows one to get\n"
" \t\t rid of warnings like 'table not properly closed'. If\n"
"\t\t table was updated, update also the timestamp for when\n"
" \t\t the check was made. This option is on by default!\n"
"\t\t Use --skip-update-state to disable.\n"
" --warning-for-wrong-transaction-id\n"
" Give a warning if we find a transaction id in the table that is bigger\n"
" than what exists in the control file. Use --skip-... to disable warning\n"
" ",
(unsigned int)", they will be used\n"
" in a round-robin fashion.\n"
" -v, --verbose Print more information. This can be used with\n"
" --description and --check. Use many -v for more verbosity.\n"
" -V, --version Print version and exit.\n"
" -w, --wait Wait if table is locked.\n"
"\n");
puts(
"Recover (repair)/ options (When using '--recover' or '--safe-recover'):\n"
" -B, --backup\t Make a backup of the .MAD file as 'filename-time.BAK'.\n"
" --correct-checksum Correct checksum information for table.\n"
" -D, --data-file-length=# Max length of data file (when recreating data\n"
" file when it's full).\n"
" --create-missing-keys\n"
" Create missing keys. This assumes that the data\n"
" file is correct and that the the number of rows stored\n"
" in the index file is correct. Enables --quick.\n"
" -e, --extend-check Try to recover every possible row from the data file\n"
"\t\t Normally this will also find a lot of garbage rows;\n"
"\t\t Don't use this option if you are not totally desperate.\n"
" -f, --force Overwrite old temporary files. Add another --force to\n"
" avoid 'sort_buffer_size is too small' errors.\n"
" In this case we will attempt to do the repair with the\n"
" given sort_buffer_size and dynamically allocate\n"
" as many management buffers as needed.\n"
" -k, --keys-used=# Tell Aria to update only some specific keys. # is a\n"
"\t bit mask of which keys to use. This can be used to\n"
"\t\t get faster inserts.\n"
" --max-record-length=#\n"
" Skip rows bigger than this if aria_chk can't allocate\n"
"\t\t memory to hold it.\n"
" -r, --recover Can fix almost anything except unique keys that aren't\n"
" unique.\n"
" -n, --sort-recover Forces recovering with sorting even if the temporary\n"
"\t\t file would be very big.\n"
" -p, --parallel-recover\n"
" Uses the same technique as '-r' and '-n', but creates\n"
" all the keys in parallel, in different threads.");
puts(
" -o, --safe-recover Uses old recovery method; Slower than '-r' but can\n"
" \t\t handle a couple of cases where '-r' reports that it\n"
"\t\t can't fix the data file.\n"
" --transaction-log Log repair command to transaction log. This is needed\n"
" if one wants to use the aria_read_log to repeat the \n"
" repair\n"
" --character-sets-dir=...\n"
" Directory where character sets are.\n"
" --set-collation=name\n"
" \t\t Change the collation used by the index.\n"
" -q, --quick Faster repair by not modifying the data file.\n"
" One can give a second '-q' to force aria_chk to\n"
"\t\t modify the original datafile in case of duplicate keys.\n"
"\t\t NOTE: Tables where the data file is corrupted can't be\n"
"\t\t fixed with this option.\n"
" -u, --unpack Unpack file packed with ariapack.\n");
puts(
"Other actions:\n"
" -a, --analyze\t Analyze distribution of keys. Will make some joins in\n"
"\t\t MariaDB faster. You can check the calculated distribution\n"
"\t\t by using '--description --verbose table_name'.\n"
" --stats_method=name Specifies how index statistics collection code should\n"
" treat NULLs. Possible values of name are \"nulls_unequal\"\n"
" (default for 4.1/5.0), \"nulls_equal\" (emulate 4.0), and \n"
" \"nulls_ignored\".\n"
" -d, --description Prints some information about table.\n"
" -A, --set-auto-increment[=value]\n"
"\t\t Force auto_increment to start at this or higher value\n"
"\t\t If no value is given, then sets the next auto_increment\n"
"\t\t value to the highest used value for the auto key + 1.\n"
" -S, --sort-index Sort index blocks. This speeds up 'read-next' in\n"
"\t\t applications.\n"
" -R, --sort-records=#\n"
"\t\t Sort records according to an index. This makes your\n"
"\t\t data much more localized and may speed up things\n"
"\t\t (It may be VERY slow to do a sort the first time!).\n"
" -b, --block-search=#\n"
" Find a record, a block at given offset belongs to.\n"
" -z, --zerofill Fill empty space in data and index files with zeroes.\n"
" This makes the data file movable between different \n"
" servers. It also fixes any wrong transaction or LSN\n"
" numbers in the table after a crash or if someone\n"
" removed the Aria log files.\n"
" --zerofill-keep-lsn Like --zerofill but does not zero out LSN of\n"
" data/index pages.");
puts(
"Variables:\n"
"--page_buffer_size=# Size of page buffer. Used by --safe-repair\n"
"--read_buffer_size=# Read buffer size for sequential reads during scanning\n"
"--sort_buffer_size=# Size of sort buffer. Used by --recover\n"
"--sort_key_blocks=# Internal buffer for sorting keys; Don't touch :)\n"
"--write_buffer_size=# Write buffer size for sequential writes during repair");
print_defaults("my", &load_default_groups);
return my_print_variables(&my_long_options);
}
|
usage:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0xd5b5e0]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1ff37b]
LEA RCX,[0x1ff395]
LEA R8,[0x1ff39b]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012b9b0
LEA RDI,[0x1ff3a2]
CALL 0x0012b980
LEA RDI,[0x1ff3c6]
CALL 0x0012b980
LEA RDI,[0x1ff409]
CALL 0x0012b980
LEA RDI,[0x1ff437]
CALL 0x0012b980
LEA RAX,[0xd5b5e8]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1ff481]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012b9b0
LEA RSI,[0x1ff4a3]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012b9b0
LEA RSI,[0x1ff4b5]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012b9b0
LEA RSI,[0x1ff79a]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012b9b0
LEA RSI,[0x1ff7a4]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012b9b0
LEA RDI,[0x1ff8dc]
CALL 0x0012b980
LEA RDI,[0x1ffec8]
CALL 0x0012b980
LEA RDI,[0x2005cd]
CALL 0x0012b980
LEA RDI,[0x200927]
CALL 0x0012b980
LEA RDI,[0x200f74]
CALL 0x0012b980
LEA RDI,[0x1fdf61]
LEA RSI,[0x4b5310]
CALL 0x001b3676
LEA RDI,[0x4b5320]
POP RBP
JMP 0x001c1a9f
|
void usage(void)
{
__printf_chk(1,"%s Ver 1.3 for %s on %s\n",my_progname,"Linux","x86_64");
puts("By Monty, for your professional use");
puts("This software comes with NO WARRANTY: see the PUBLIC for details.\n");
puts("Description, check and repair of Aria tables.");
puts("Used without options all tables on the command will be checked for errors");
__printf_chk(1,"Usage: %s [OPTIONS] tables[.MAI]\n",my_progname_short);
__printf_chk(1,"\nGlobal options:\n");
__printf_chk(1,
" -H, --HELP Print all argument options sorted alphabetically.\n -?, --help Print all options by groups\n --datadir=path Path for control file (and logs if --logdir not used)\n --logdir=path Path for log files\n --ignore-control-file Don\'t open the control file. Only use this if you\n are sure the tables are not in use by another\n program!\n --require-control-file Abort if we can\'t find/read the aria_log_control\n file\n -s, --silent\t Only print errors. One can use two -s to make\n\t\t maria_chk very silent.\n -t, --tmpdir=path Path for temporary files. Multiple paths can be\n specified, separated by "
);
__printf_chk(1,"colon (:)");
__printf_chk(1,
", they will be used\n in a round-robin fashion.\n -v, --verbose Print more information. This can be used with\n --description and --check. Use many -v for more verbosity.\n -V, --version Print version and exit.\n -w, --wait Wait if table is locked.\n\n"
);
puts(
"Check options (check is the default action for aria_chk):\n -c, --check\t Check table for errors.\n -e, --extend-check Check the table VERY throughly. Only use this in\n extreme cases as aria_chk should normally be able to\n find out if the table is ok even without this switch.\n -F, --fast\t Check only tables that haven\'t been closed properly.\n -C, --check-only-changed\n\t\t Check only tables that have changed since last check.\n -f, --force Restart with \'-r\' if there are any errors in the table.\n\t\t States will be updated as with \'--update-state\'.\n -i, --information Print statistics information about table that is checked.\n -m, --medium-check Faster than extend-check, but only finds 99.99% of\n\t\t all errors. Should be good enough for most cases.\n -T, --read-only Don\'t mark table as checked.\n -U, --update-state Mark tables as crashed if any errors were found and\n clean if check didn\'t find any errors but table was\n\t marked as \'not clean\' before. This allows one to get\n \t\t rid of warnings like \'table not properly closed\'. If\n\t\t table was updated, update also the timestamp for when\n \t\t the check was made. This option is on by default!\n\t\t Use --skip-update-state to disable.\n --warning-for-wrong-transaction-id\n Give a warning if we find a transaction id in the table that is bigger\n than what exists in the control file. Use --skip-... to disable warning\n "
);
puts(
"Recover (repair)/ options (When using \'--recover\' or \'--safe-recover\'):\n -B, --backup\t Make a backup of the .MAD file as \'filename-time.BAK\'.\n --correct-checksum Correct checksum information for table.\n -D, --data-file-length=# Max length of data file (when recreating data\n file when it\'s full).\n --create-missing-keys\n Create missing keys. This assumes that the data\n file is correct and that the the number of rows stored\n in the index file is correct. Enables --quick.\n -e, --extend-check Try to recover every possible row from the data file\n\t\t Normally this will also find a lot of garbage rows;\n\t\t Don\'t use this option if you are not totally desperate.\n -f, --force Overwrite old temporary files. Add another --force to\n avoid \'sort_buffer_size is too small\' errors.\n In this case we will attempt to do the repair with the\n given sort_buffer_size and dynamically allocate\n as many management buffers as needed.\n -k, --keys-used=# Tell Aria to update only some specific keys. # is a\n\t bit mask of which keys to use. This can be used to\n\t\t get faster inserts.\n --max-record-length=#\n Skip rows bigger than this if aria_chk can\'t allocate\n\t\t memory to hold it.\n -r, --recover Can fix almost anything except unique keys that aren\'t\n unique.\n -n, --sort-recover Forces recovering with sorting even if the temporary\n\t\t file would be very big.\n -p, --parallel-recover\n Uses the same technique as \'-r\' and \'-n\', but creates\n all the keys in parallel, in different threads."
);
puts(
" -o, --safe-recover Uses old recovery method; Slower than \'-r\' but can\n \t\t handle a couple of cases where \'-r\' reports that it\n\t\t can\'t fix the data file.\n --transaction-log Log repair command to transaction log. This is needed\n if one wants to use the aria_read_log to repeat the \n repair\n --character-sets-dir=...\n Directory where character sets are.\n --set-collation=name\n \t\t Change the collation used by the index.\n -q, --quick Faster repair by not modifying the data file.\n One can give a second \'-q\' to force aria_chk to\n\t\t modify the original datafile in case of duplicate keys.\n\t\t NOTE: Tables where the data file is corrupted can\'t be\n\t\t fixed with this option.\n -u, --unpack Unpack file packed with ariapack.\n"
);
puts(
"Other actions:\n -a, --analyze\t Analyze distribution of keys. Will make some joins in\n\t\t MariaDB faster. You can check the calculated distribution\n\t\t by using \'--description --verbose table_name\'.\n --stats_method=name Specifies how index statistics collection code should\n treat NULLs. Possible values of name are \"nulls_unequal\"\n (default for 4.1/5.0), \"nulls_equal\" (emulate 4.0), and \n \"nulls_ignored\".\n -d, --description Prints some information about table.\n -A, --set-auto-increment[=value]\n\t\t Force auto_increment to start at this or higher value\n\t\t If no value is given, then sets the next auto_increment\n\t\t value to the highest used value for the auto key + 1.\n -S, --sort-index Sort index blocks. This speeds up \'read-next\' in\n\t\t applications.\n -R, --sort-records=#\n\t\t Sort records according to an index. This makes your\n\t\t data much more localized and may speed up things\n\t\t (It may be VERY slow to do a sort the first time!).\n -b, --block-search=#\n Find a record, a block at given offset belongs to.\n -z, --zerofill Fill empty space in data and index files with zeroes.\n This makes the data file movable between different \n servers. It also fixes any wrong transaction or LSN\n numbers in the table after a crash or if someone\n removed the Aria log files.\n --zerofill-keep-lsn Like --zerofill but does not zero out LSN of\n data/index pages."
);
puts(
"Variables:\n--page_buffer_size=# Size of page buffer. Used by --safe-repair\n--read_buffer_size=# Read buffer size for sequential reads during scanning\n--sort_buffer_size=# Size of sort buffer. Used by --recover\n--sort_key_blocks=# Internal buffer for sorting keys; Don\'t touch :)\n--write_buffer_size=# Write buffer size for sequential writes during repair"
);
print_defaults(&DAT_001fdf61,load_default_groups);
my_print_variables(my_long_options);
return;
}
|
|
61,509 |
LefDefParser::lefwEndNoiseTable()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwEndNoiseTable()
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_NOISETABLE_START &&
lefwState != LEFW_NOISETABLE)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) "END NOISETABLE\n\n");
else
fprintf(lefwFile, "END NOISETABLE\n\n");
lefwLines++;
lefwState = LEFW_NOISETABLE_END;
lefwIsNoiseTable = 0;
lefwIsOutResist = 0;
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwEndNoiseTable():
pushq %rbx
leaq 0x140e9(%rip), %rax # 0x24e00
movq (%rax), %rcx
testq %rcx, %rcx
je 0x10d53
leaq 0x1432a(%rip), %rbx # 0x25050
movl (%rbx), %edx
cmpl $0x3e, %edx
je 0x10d37
movl $0x2, %eax
cmpl $0xa, %edx
jne 0x10d93
cmpb $0x1, 0x143ae(%rip) # 0x250ec
jne 0x10d5a
leaq 0xa8aa(%rip), %rsi # 0x1b5f1
movq %rcx, %rdi
xorl %eax, %eax
callq 0x18c35
jmp 0x10d70
movl $0x1, %eax
jmp 0x10d93
leaq 0xa890(%rip), %rdi # 0x1b5f1
movl $0x10, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x142d5(%rip), %rax # 0x2504c
incl (%rax)
movl $0x58, (%rbx)
leaq 0x14332(%rip), %rcx # 0x250b8
xorl %eax, %eax
movl %eax, (%rcx)
leaq 0x1432f(%rip), %rcx # 0x250c0
movl %eax, (%rcx)
popq %rbx
retq
|
_ZN12LefDefParser17lefwEndNoiseTableEv:
push rbx
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [rax]
test rcx, rcx
jz short loc_10D53
lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov edx, [rbx]
cmp edx, 3Eh ; '>'
jz short loc_10D37
mov eax, 2
cmp edx, 0Ah
jnz short loc_10D93
loc_10D37:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_10D5A
lea rsi, aEndNoisetable; "END NOISETABLE\n\n"
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_10D70
loc_10D53:
mov eax, 1
jmp short loc_10D93
loc_10D5A:
lea rdi, aEndNoisetable; "END NOISETABLE\n\n"
mov esi, 10h
mov edx, 1
call _fwrite
loc_10D70:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
mov dword ptr [rbx], 58h ; 'X'
lea rcx, _ZN12LefDefParser16lefwIsNoiseTableE; LefDefParser::lefwIsNoiseTable
xor eax, eax
mov [rcx], eax
lea rcx, _ZN12LefDefParser15lefwIsOutResistE; LefDefParser::lefwIsOutResist
mov [rcx], eax
loc_10D93:
pop rbx
retn
|
long long LefDefParser::lefwEndNoiseTable(
LefDefParser *this,
long long a2,
long long a3,
long long a4,
int a5,
int a6)
{
long long result; // rax
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
if ( LefDefParser::lefwState == 62 || (result = 2LL, LefDefParser::lefwState == 10) )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)"END NOISETABLE\n\n",
LefDefParser::lefwState,
LefDefParser::lefwFile,
a5,
a6);
else
fwrite("END NOISETABLE\n\n", 16LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 88;
result = 0LL;
LefDefParser::lefwIsNoiseTable = 0;
LefDefParser::lefwIsOutResist = 0;
}
return result;
}
|
lefwEndNoiseTable:
PUSH RBX
LEA RAX,[0x124e00]
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x00110d53
LEA RBX,[0x125050]
MOV EDX,dword ptr [RBX]
CMP EDX,0x3e
JZ 0x00110d37
MOV EAX,0x2
CMP EDX,0xa
JNZ 0x00110d93
LAB_00110d37:
CMP byte ptr [0x001250ec],0x1
JNZ 0x00110d5a
LEA RSI,[0x11b5f1]
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00118c35
JMP 0x00110d70
LAB_00110d53:
MOV EAX,0x1
JMP 0x00110d93
LAB_00110d5a:
LEA RDI,[0x11b5f1]
MOV ESI,0x10
MOV EDX,0x1
CALL 0x00101110
LAB_00110d70:
LEA RAX,[0x12504c]
INC dword ptr [RAX]
MOV dword ptr [RBX],0x58
LEA RCX,[0x1250b8]
XOR EAX,EAX
MOV dword ptr [RCX],EAX
LEA RCX,[0x1250c0]
MOV dword ptr [RCX],EAX
LAB_00110d93:
POP RBX
RET
|
/* LefDefParser::lefwEndNoiseTable() */
int8 LefDefParser::lefwEndNoiseTable(void)
{
int8 uVar1;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else if ((lefwState == 0x3e) || (uVar1 = 2, lefwState == 10)) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile,"END NOISETABLE\n\n");
}
else {
fwrite("END NOISETABLE\n\n",0x10,1,lefwFile);
}
lefwLines = lefwLines + 1;
lefwState = 0x58;
uVar1 = 0;
lefwIsNoiseTable = 0;
lefwIsOutResist = 0;
}
return uVar1;
}
|
|
61,510 |
js_set_union
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_set_union(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue newset, item, iter, next, rv;
struct list_head *el;
JSMapState *s, *t;
JSMapRecord *mr;
int64_t size;
BOOL done;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
return JS_EXCEPTION;
// order matters! they're JS-observable side effects
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
return JS_EXCEPTION;
if (js_setlike_get_has(ctx, argv[0], &rv) < 0)
return JS_EXCEPTION;
JS_FreeValue(ctx, rv);
newset = js_map_constructor(ctx, JS_UNDEFINED, 0, NULL, MAGIC_SET);
if (JS_IsException(newset))
return JS_EXCEPTION;
t = JS_GetOpaque(newset, JS_CLASS_SET);
iter = JS_UNDEFINED;
next = JS_UNDEFINED;
list_for_each(el, &s->records) {
mr = list_entry(el, JSMapRecord, link);
if (mr->empty)
continue;
mr = map_add_record(ctx, t, js_dup(mr->key));
if (!mr)
goto exception;
mr->value = JS_UNDEFINED;
}
iter = JS_GetProperty(ctx, argv[0], JS_ATOM_keys);
if (JS_IsException(iter))
goto exception;
iter = JS_CallFree(ctx, iter, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
for (;;) {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
rv = js_map_set(ctx, newset, 1, &item, MAGIC_SET);
JS_FreeValue(ctx, item);
if (JS_IsException(rv))
goto exception;
JS_FreeValue(ctx, rv);
}
goto fini;
exception:
JS_FreeValue(ctx, newset);
newset = JS_EXCEPTION;
fini:
JS_FreeValue(ctx, next);
JS_FreeValue(ctx, iter);
return newset;
}
|
O0
|
c
|
js_set_union:
subq $0x198, %rsp # imm = 0x198
movq %rsi, 0x178(%rsp)
movq %rdx, 0x180(%rsp)
movq %rdi, 0x170(%rsp)
movl %ecx, 0x16c(%rsp)
movq %r8, 0x160(%rsp)
movq 0x170(%rsp), %rdi
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
movl $0x24, %ecx
callq 0x370f0
movq %rax, 0x100(%rsp)
cmpq $0x0, 0x100(%rsp)
jne 0x8eb6f
movl $0x0, 0x188(%rsp)
movq $0x6, 0x190(%rsp)
jmp 0x8f19c
movq 0x170(%rsp), %rdi
movq 0x160(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0xe8(%rsp), %rcx
callq 0x8f1c0
cmpl $0x0, %eax
jge 0x8ebb4
movl $0x0, 0x188(%rsp)
movq $0x6, 0x190(%rsp)
jmp 0x8f19c
movq 0x170(%rsp), %rdi
movq 0x160(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x110(%rsp), %rcx
callq 0x8f330
cmpl $0x0, %eax
jge 0x8ebf9
movl $0x0, 0x188(%rsp)
movq $0x6, 0x190(%rsp)
jmp 0x8f19c
movq 0x170(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x229d0
movq 0x170(%rsp), %rdi
movl $0x0, 0xc0(%rsp)
movq $0x3, 0xc8(%rsp)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x518f0
movq %rax, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x150(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x150(%rsp), %rdi
movq 0x158(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8ecbd
movl $0x0, 0x188(%rsp)
movq $0x6, 0x190(%rsp)
jmp 0x8f19c
movq 0x150(%rsp), %rdi
movq 0x158(%rsp), %rsi
movl $0x24, %edx
callq 0x37090
movq %rax, 0xf8(%rsp)
movl $0x0, 0xb0(%rsp)
movq $0x3, 0xb8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x138(%rsp)
movl $0x0, 0xa0(%rsp)
movq $0x3, 0xa8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x100(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rax
movq 0x100(%rsp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
je 0x8ee6b
movq 0x108(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x8eda5
jmp 0x8ee52
movq 0x170(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xf0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x20410
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
movq 0x90(%rsp), %rdx
movq 0x98(%rsp), %rcx
callq 0x7caa0
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x8ee1b
jmp 0x8f0fa
movq 0xf0(%rsp), %rax
movl $0x0, 0x80(%rsp)
movq $0x3, 0x88(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x88(%rsp), %rcx
movq %rcx, 0x48(%rax)
movq 0x108(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x108(%rsp)
jmp 0x8ed61
movq 0x170(%rsp), %rdi
movq 0x160(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movl $0x30, %ecx
callq 0x28ac0
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8eecf
jmp 0x8f0fa
movq 0x170(%rsp), %rdi
movq 0x160(%rsp), %rax
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movq (%rax), %rcx
movq 0x8(%rax), %r8
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x2cfc0
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8ef4b
jmp 0x8f0fa
movq 0x170(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movl $0x6b, %ecx
callq 0x28ac0
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8efb0
jmp 0x8f0fa
jmp 0x8efb2
movq 0x170(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
movq 0x120(%rsp), %rcx
movq 0x128(%rsp), %r8
xorl %r9d, %r9d
xorl %eax, %eax
leaq 0xe4(%rsp), %rax
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x6dbf0
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x140(%rsp), %rdi
movq 0x148(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8f03c
jmp 0x8f0fa
cmpl $0x0, 0xe4(%rsp)
je 0x8f04b
jmp 0x8f0f8
movq 0x170(%rsp), %rdi
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdx
movl $0x1, %r9d
leaq 0x140(%rsp), %r8
movl %r9d, %ecx
callq 0x7c670
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x170(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
callq 0x229d0
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8f0d6
jmp 0x8f0fa
movq 0x170(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x229d0
jmp 0x8efb2
jmp 0x8f142
movq 0x170(%rsp), %rdi
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x20(%rsp)
movq $0x6, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x150(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x170(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x229d0
movq 0x170(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
callq 0x229d0
movq 0x150(%rsp), %rax
movq %rax, 0x188(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x190(%rsp)
movq 0x188(%rsp), %rax
movq 0x190(%rsp), %rdx
addq $0x198, %rsp # imm = 0x198
retq
nopw %cs:(%rax,%rax)
|
js_set_union:
sub rsp, 198h
mov [rsp+198h+var_20], rsi
mov [rsp+198h+var_18], rdx
mov [rsp+198h+var_28], rdi
mov [rsp+198h+var_2C], ecx
mov [rsp+198h+var_38], r8
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_20]
mov rdx, [rsp+198h+var_18]
mov ecx, 24h ; '$'
call JS_GetOpaque2
mov [rsp+198h+var_98], rax
cmp [rsp+198h+var_98], 0
jnz short loc_8EB6F
mov dword ptr [rsp+198h+var_10], 0
mov [rsp+198h+var_8], 6
jmp loc_8F19C
loc_8EB6F:
mov rdi, [rsp+198h+var_28]
mov rax, [rsp+198h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
lea rcx, [rsp+198h+var_B0]
call js_setlike_get_size
cmp eax, 0
jge short loc_8EBB4
mov dword ptr [rsp+198h+var_10], 0
mov [rsp+198h+var_8], 6
jmp loc_8F19C
loc_8EBB4:
mov rdi, [rsp+198h+var_28]
mov rax, [rsp+198h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
lea rcx, [rsp+198h+var_88]
call js_setlike_get_has
cmp eax, 0
jge short loc_8EBF9
mov dword ptr [rsp+198h+var_10], 0
mov [rsp+198h+var_8], 6
jmp loc_8F19C
loc_8EBF9:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_88]
mov rdx, [rsp+198h+var_80]
call JS_FreeValue
mov rdi, [rsp+198h+var_28]
mov dword ptr [rsp+198h+var_D8], 0
mov [rsp+198h+var_D0], 3
mov rsi, [rsp+198h+var_D8]
mov rdx, [rsp+198h+var_D0]
xor ecx, ecx
xor eax, eax
mov r8d, eax
mov r9d, 1
call js_map_constructor
mov [rsp+198h+var_C8], rax
mov [rsp+198h+var_C0], rdx
mov rax, [rsp+198h+var_C8]
mov [rsp+198h+var_48], rax
mov rax, [rsp+198h+var_C0]
mov [rsp+198h+var_40], rax
mov rdi, [rsp+198h+var_48]
mov rsi, [rsp+198h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_8ECBD
mov dword ptr [rsp+198h+var_10], 0
mov [rsp+198h+var_8], 6
jmp loc_8F19C
loc_8ECBD:
mov rdi, [rsp+198h+var_48]
mov rsi, [rsp+198h+var_40]
mov edx, 24h ; '$'
call JS_GetOpaque
mov [rsp+198h+var_A0], rax
mov dword ptr [rsp+198h+var_E8], 0
mov [rsp+198h+var_E0], 3
mov rax, [rsp+198h+var_E8]
mov [rsp+198h+var_68], rax
mov rax, [rsp+198h+var_E0]
mov [rsp+198h+var_60], rax
mov dword ptr [rsp+198h+var_F8], 0
mov [rsp+198h+var_F0], 3
mov rax, [rsp+198h+var_F8]
mov [rsp+198h+var_78], rax
mov rax, [rsp+198h+var_F0]
mov [rsp+198h+var_70], rax
mov rax, [rsp+198h+var_98]
mov rax, [rax+10h]
mov [rsp+198h+var_90], rax
loc_8ED61:
mov rax, [rsp+198h+var_90]
mov rcx, [rsp+198h+var_98]
add rcx, 8
cmp rax, rcx
jz loc_8EE6B
mov rax, [rsp+198h+var_90]
add rax, 0FFFFFFFFFFFFFFF0h
mov [rsp+198h+var_A8], rax
mov rax, [rsp+198h+var_A8]
cmp dword ptr [rax+4], 0
jz short loc_8EDA5
jmp loc_8EE52
loc_8EDA5:
mov rax, [rsp+198h+var_28]
mov [rsp+198h+var_188], rax
mov rax, [rsp+198h+var_A0]
mov [rsp+198h+var_180], rax
mov rax, [rsp+198h+var_A8]
mov rdi, [rax+30h]
mov rsi, [rax+38h]
call js_dup
mov rdi, [rsp+198h+var_188]
mov rsi, [rsp+198h+var_180]
mov [rsp+198h+var_108], rax
mov [rsp+198h+var_100], rdx
mov rdx, [rsp+198h+var_108]
mov rcx, [rsp+198h+var_100]
call map_add_record
mov [rsp+198h+var_A8], rax
cmp [rsp+198h+var_A8], 0
jnz short loc_8EE1B
jmp loc_8F0FA
loc_8EE1B:
mov rax, [rsp+198h+var_A8]
mov dword ptr [rsp+198h+var_118], 0
mov [rsp+198h+var_110], 3
mov rcx, [rsp+198h+var_118]
mov [rax+40h], rcx
mov rcx, [rsp+198h+var_110]
mov [rax+48h], rcx
loc_8EE52:
mov rax, [rsp+198h+var_90]
mov rax, [rax+8]
mov [rsp+198h+var_90], rax
jmp loc_8ED61
loc_8EE6B:
mov rdi, [rsp+198h+var_28]
mov rax, [rsp+198h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
mov ecx, 30h ; '0'
call JS_GetProperty
mov [rsp+198h+var_128], rax
mov [rsp+198h+var_120], rdx
mov rax, [rsp+198h+var_128]
mov [rsp+198h+var_68], rax
mov rax, [rsp+198h+var_120]
mov [rsp+198h+var_60], rax
mov rdi, [rsp+198h+var_68]
mov rsi, [rsp+198h+var_60]
call JS_IsException_1
cmp eax, 0
jz short loc_8EECF
jmp loc_8F0FA
loc_8EECF:
mov rdi, [rsp+198h+var_28]
mov rax, [rsp+198h+var_38]
mov rsi, [rsp+198h+var_68]
mov rdx, [rsp+198h+var_60]
mov rcx, [rax]
mov r8, [rax+8]
xor r9d, r9d
xor eax, eax
mov [rsp+198h+var_198], 0
call JS_CallFree
mov [rsp+198h+var_138], rax
mov [rsp+198h+var_130], rdx
mov rax, [rsp+198h+var_138]
mov [rsp+198h+var_68], rax
mov rax, [rsp+198h+var_130]
mov [rsp+198h+var_60], rax
mov rdi, [rsp+198h+var_68]
mov rsi, [rsp+198h+var_60]
call JS_IsException_1
cmp eax, 0
jz short loc_8EF4B
jmp loc_8F0FA
loc_8EF4B:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_68]
mov rdx, [rsp+198h+var_60]
mov ecx, 6Bh ; 'k'
call JS_GetProperty
mov [rsp+198h+var_148], rax
mov [rsp+198h+var_140], rdx
mov rax, [rsp+198h+var_148]
mov [rsp+198h+var_78], rax
mov rax, [rsp+198h+var_140]
mov [rsp+198h+var_70], rax
mov rdi, [rsp+198h+var_78]
mov rsi, [rsp+198h+var_70]
call JS_IsException_1
cmp eax, 0
jz short loc_8EFB0
jmp loc_8F0FA
loc_8EFB0:
jmp short $+2
loc_8EFB2:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_68]
mov rdx, [rsp+198h+var_60]
mov rcx, [rsp+198h+var_78]
mov r8, [rsp+198h+var_70]
xor r9d, r9d
xor eax, eax
lea rax, [rsp+198h+var_B4]
mov [rsp+198h+var_198], 0
mov [rsp+198h+var_190], rax
call JS_IteratorNext
mov [rsp+198h+var_158], rax
mov [rsp+198h+var_150], rdx
mov rax, [rsp+198h+var_158]
mov [rsp+198h+var_58], rax
mov rax, [rsp+198h+var_150]
mov [rsp+198h+var_50], rax
mov rdi, [rsp+198h+var_58]
mov rsi, [rsp+198h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_8F03C
jmp loc_8F0FA
loc_8F03C:
cmp [rsp+198h+var_B4], 0
jz short loc_8F04B
jmp loc_8F0F8
loc_8F04B:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_48]
mov rdx, [rsp+198h+var_40]
mov r9d, 1
lea r8, [rsp+198h+var_58]
mov ecx, r9d
call js_map_set
mov [rsp+198h+var_168], rax
mov [rsp+198h+var_160], rdx
mov rax, [rsp+198h+var_168]
mov [rsp+198h+var_88], rax
mov rax, [rsp+198h+var_160]
mov [rsp+198h+var_80], rax
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_58]
mov rdx, [rsp+198h+var_50]
call JS_FreeValue
mov rdi, [rsp+198h+var_88]
mov rsi, [rsp+198h+var_80]
call JS_IsException_1
cmp eax, 0
jz short loc_8F0D6
jmp short loc_8F0FA
loc_8F0D6:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_88]
mov rdx, [rsp+198h+var_80]
call JS_FreeValue
jmp loc_8EFB2
loc_8F0F8:
jmp short loc_8F142
loc_8F0FA:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_48]
mov rdx, [rsp+198h+var_40]
call JS_FreeValue
mov dword ptr [rsp+198h+var_178], 0
mov [rsp+198h+var_170], 6
mov rax, [rsp+198h+var_178]
mov [rsp+198h+var_48], rax
mov rax, [rsp+198h+var_170]
mov [rsp+198h+var_40], rax
loc_8F142:
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_78]
mov rdx, [rsp+198h+var_70]
call JS_FreeValue
mov rdi, [rsp+198h+var_28]
mov rsi, [rsp+198h+var_68]
mov rdx, [rsp+198h+var_60]
call JS_FreeValue
mov rax, [rsp+198h+var_48]
mov [rsp+198h+var_10], rax
mov rax, [rsp+198h+var_40]
mov [rsp+198h+var_8], rax
loc_8F19C:
mov rax, [rsp+198h+var_10]
mov rdx, [rsp+198h+var_8]
add rsp, 198h
retn
|
_DWORD * js_set_union(
long long a1,
long long a2,
long long a3,
int a4,
_QWORD *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
double v13; // xmm4_8
double v14; // xmm5_8
long long v15; // rdx
long long v16; // rdx
long long v17; // rax
long long v18; // rdx
long long v19; // rdx
long long v20; // rdx
long long v21; // rdx
double v22; // xmm4_8
double v23; // xmm5_8
long long v24; // rdx
long long v26; // [rsp+10h] [rbp-188h]
long long v27; // [rsp+18h] [rbp-180h]
_DWORD *v28; // [rsp+20h] [rbp-178h]
long long v29; // [rsp+80h] [rbp-118h]
_DWORD *v30; // [rsp+90h] [rbp-108h]
long long v31; // [rsp+A0h] [rbp-F8h]
long long v32; // [rsp+B0h] [rbp-E8h]
long long v33; // [rsp+C0h] [rbp-D8h]
int v34; // [rsp+E4h] [rbp-B4h] BYREF
_BYTE v35[8]; // [rsp+E8h] [rbp-B0h] BYREF
long long v36; // [rsp+F0h] [rbp-A8h]
long long Opaque; // [rsp+F8h] [rbp-A0h]
long long Opaque2; // [rsp+100h] [rbp-98h]
long long i; // [rsp+108h] [rbp-90h]
_DWORD *v40; // [rsp+110h] [rbp-88h] BYREF
long long v41; // [rsp+118h] [rbp-80h]
long long v42; // [rsp+120h] [rbp-78h]
long long v43; // [rsp+128h] [rbp-70h]
long long Property; // [rsp+130h] [rbp-68h]
long long v45; // [rsp+138h] [rbp-60h]
long long v46; // [rsp+140h] [rbp-58h] BYREF
long long v47; // [rsp+148h] [rbp-50h]
_DWORD *v48; // [rsp+150h] [rbp-48h]
long long v49; // [rsp+158h] [rbp-40h]
_QWORD *v50; // [rsp+160h] [rbp-38h]
int v51; // [rsp+16Ch] [rbp-2Ch]
long long v52; // [rsp+170h] [rbp-28h]
long long v53; // [rsp+178h] [rbp-20h]
long long v54; // [rsp+180h] [rbp-18h]
_DWORD *v55; // [rsp+188h] [rbp-10h]
long long v56; // [rsp+190h] [rbp-8h]
v53 = a2;
v54 = a3;
v52 = a1;
v51 = a4;
v50 = a5;
Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x24u);
if ( Opaque2 )
{
if ( (int)js_setlike_get_size(v52, *v50, v50[1], v35) >= 0 )
{
if ( (int)js_setlike_get_has(v52, *v50, v50[1], &v40) >= 0 )
{
JS_FreeValue(v52, (long long)v40, v41);
LODWORD(v33) = 0;
v48 = (_DWORD *)js_map_constructor(v52, v33, 3LL, 0, 0LL, 1, a6, a7, a8, a9, v13, v14, a12, a13);
v49 = v15;
if ( JS_IsException_1((long long)v48, v15) )
{
LODWORD(v55) = 0;
v56 = 6LL;
}
else
{
Opaque = JS_GetOpaque((long long)v48, v49, 36);
LODWORD(v32) = 0;
Property = v32;
v45 = 3LL;
LODWORD(v31) = 0;
v42 = v31;
v43 = 3LL;
for ( i = *(_QWORD *)(Opaque2 + 16); i != Opaque2 + 8; i = *(_QWORD *)(i + 8) )
{
v36 = i - 16;
if ( !*(_DWORD *)(i - 16 + 4) )
{
v26 = v52;
v27 = Opaque;
v30 = js_dup(*(_DWORD **)(v36 + 48), *(_QWORD *)(v36 + 56));
v36 = map_add_record(v26, v27, v30, v16);
if ( !v36 )
goto LABEL_23;
v17 = v36;
LODWORD(v29) = 0;
*(_QWORD *)(v36 + 64) = v29;
*(_QWORD *)(v17 + 72) = 3LL;
}
}
Property = JS_GetProperty(v52, *v50, v50[1], 48);
v45 = v18;
if ( !JS_IsException_1(Property, v18) )
{
Property = JS_CallFree(v52, Property, v45, *v50, v50[1], 0, 0LL);
v45 = v19;
if ( !JS_IsException_1(Property, v19) )
{
v42 = JS_GetProperty(v52, Property, v45, 107);
v43 = v20;
if ( !JS_IsException_1(v42, v20) )
{
while ( 1 )
{
v46 = JS_IteratorNext(v52, Property, v45, v42, v43, 0, 0LL, &v34);
v47 = v21;
if ( JS_IsException_1(v46, v21) )
break;
if ( v34 )
goto LABEL_24;
v40 = js_map_set(v52, v48, v49, a6, a7, a8, a9, v22, v23, a12, a13, 1LL, &v46, 1);
v41 = v24;
JS_FreeValue(v52, v46, v47);
if ( JS_IsException_1((long long)v40, v41) )
break;
JS_FreeValue(v52, (long long)v40, v41);
}
}
}
}
LABEL_23:
JS_FreeValue(v52, (long long)v48, v49);
LODWORD(v28) = 0;
v48 = v28;
v49 = 6LL;
LABEL_24:
JS_FreeValue(v52, v42, v43);
JS_FreeValue(v52, Property, v45);
v55 = v48;
v56 = v49;
}
}
else
{
LODWORD(v55) = 0;
v56 = 6LL;
}
}
else
{
LODWORD(v55) = 0;
v56 = 6LL;
}
}
else
{
LODWORD(v55) = 0;
v56 = 6LL;
}
return v55;
}
|
js_set_union:
SUB RSP,0x198
MOV qword ptr [RSP + 0x178],RSI
MOV qword ptr [RSP + 0x180],RDX
MOV qword ptr [RSP + 0x170],RDI
MOV dword ptr [RSP + 0x16c],ECX
MOV qword ptr [RSP + 0x160],R8
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x178]
MOV RDX,qword ptr [RSP + 0x180]
MOV ECX,0x24
CALL 0x001370f0
MOV qword ptr [RSP + 0x100],RAX
CMP qword ptr [RSP + 0x100],0x0
JNZ 0x0018eb6f
MOV dword ptr [RSP + 0x188],0x0
MOV qword ptr [RSP + 0x190],0x6
JMP 0x0018f19c
LAB_0018eb6f:
MOV RDI,qword ptr [RSP + 0x170]
MOV RAX,qword ptr [RSP + 0x160]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0xe8]
CALL 0x0018f1c0
CMP EAX,0x0
JGE 0x0018ebb4
MOV dword ptr [RSP + 0x188],0x0
MOV qword ptr [RSP + 0x190],0x6
JMP 0x0018f19c
LAB_0018ebb4:
MOV RDI,qword ptr [RSP + 0x170]
MOV RAX,qword ptr [RSP + 0x160]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0x110]
CALL 0x0018f330
CMP EAX,0x0
JGE 0x0018ebf9
MOV dword ptr [RSP + 0x188],0x0
MOV qword ptr [RSP + 0x190],0x6
JMP 0x0018f19c
LAB_0018ebf9:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x170]
MOV dword ptr [RSP + 0xc0],0x0
MOV qword ptr [RSP + 0xc8],0x3
MOV RSI,qword ptr [RSP + 0xc0]
MOV RDX,qword ptr [RSP + 0xc8]
XOR ECX,ECX
XOR EAX,EAX
MOV R8D,EAX
MOV R9D,0x1
CALL 0x001518f0
MOV qword ptr [RSP + 0xd0],RAX
MOV qword ptr [RSP + 0xd8],RDX
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x150],RAX
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0x158],RAX
MOV RDI,qword ptr [RSP + 0x150]
MOV RSI,qword ptr [RSP + 0x158]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018ecbd
MOV dword ptr [RSP + 0x188],0x0
MOV qword ptr [RSP + 0x190],0x6
JMP 0x0018f19c
LAB_0018ecbd:
MOV RDI,qword ptr [RSP + 0x150]
MOV RSI,qword ptr [RSP + 0x158]
MOV EDX,0x24
CALL 0x00137090
MOV qword ptr [RSP + 0xf8],RAX
MOV dword ptr [RSP + 0xb0],0x0
MOV qword ptr [RSP + 0xb8],0x3
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x138],RAX
MOV dword ptr [RSP + 0xa0],0x0
MOV qword ptr [RSP + 0xa8],0x3
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x128],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x108],RAX
LAB_0018ed61:
MOV RAX,qword ptr [RSP + 0x108]
MOV RCX,qword ptr [RSP + 0x100]
ADD RCX,0x8
CMP RAX,RCX
JZ 0x0018ee6b
MOV RAX,qword ptr [RSP + 0x108]
ADD RAX,-0x10
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0xf0]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0018eda5
JMP 0x0018ee52
LAB_0018eda5:
MOV RAX,qword ptr [RSP + 0x170]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0xf0]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x00120410
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x90],RAX
MOV qword ptr [RSP + 0x98],RDX
MOV RDX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RSP + 0x98]
CALL 0x0017caa0
MOV qword ptr [RSP + 0xf0],RAX
CMP qword ptr [RSP + 0xf0],0x0
JNZ 0x0018ee1b
JMP 0x0018f0fa
LAB_0018ee1b:
MOV RAX,qword ptr [RSP + 0xf0]
MOV dword ptr [RSP + 0x80],0x0
MOV qword ptr [RSP + 0x88],0x3
MOV RCX,qword ptr [RSP + 0x80]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x88]
MOV qword ptr [RAX + 0x48],RCX
LAB_0018ee52:
MOV RAX,qword ptr [RSP + 0x108]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x108],RAX
JMP 0x0018ed61
LAB_0018ee6b:
MOV RDI,qword ptr [RSP + 0x170]
MOV RAX,qword ptr [RSP + 0x160]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV ECX,0x30
CALL 0x00128ac0
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x78],RDX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x138],RAX
MOV RDI,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RSP + 0x138]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018eecf
JMP 0x0018f0fa
LAB_0018eecf:
MOV RDI,qword ptr [RSP + 0x170]
MOV RAX,qword ptr [RSP + 0x160]
MOV RSI,qword ptr [RSP + 0x130]
MOV RDX,qword ptr [RSP + 0x138]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x8]
XOR R9D,R9D
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x0012cfc0
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RDX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x130],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x138],RAX
MOV RDI,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RSP + 0x138]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018ef4b
JMP 0x0018f0fa
LAB_0018ef4b:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x130]
MOV RDX,qword ptr [RSP + 0x138]
MOV ECX,0x6b
CALL 0x00128ac0
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x128],RAX
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x128]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018efb0
JMP 0x0018f0fa
LAB_0018efb0:
JMP 0x0018efb2
LAB_0018efb2:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x130]
MOV RDX,qword ptr [RSP + 0x138]
MOV RCX,qword ptr [RSP + 0x120]
MOV R8,qword ptr [RSP + 0x128]
XOR R9D,R9D
XOR EAX,EAX
LEA RAX,[RSP + 0xe4]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0016dbf0
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x140],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x148],RAX
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x148]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018f03c
JMP 0x0018f0fa
LAB_0018f03c:
CMP dword ptr [RSP + 0xe4],0x0
JZ 0x0018f04b
JMP 0x0018f0f8
LAB_0018f04b:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x150]
MOV RDX,qword ptr [RSP + 0x158]
MOV R9D,0x1
LEA R8,[RSP + 0x140]
MOV ECX,R9D
CALL 0x0017c670
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x110],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x118],RAX
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x140]
MOV RDX,qword ptr [RSP + 0x148]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RSP + 0x118]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018f0d6
JMP 0x0018f0fa
LAB_0018f0d6:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x001229d0
JMP 0x0018efb2
LAB_0018f0f8:
JMP 0x0018f142
LAB_0018f0fa:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x150]
MOV RDX,qword ptr [RSP + 0x158]
CALL 0x001229d0
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x6
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x150],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x158],RAX
LAB_0018f142:
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x170]
MOV RSI,qword ptr [RSP + 0x130]
MOV RDX,qword ptr [RSP + 0x138]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0x188],RAX
MOV RAX,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x190],RAX
LAB_0018f19c:
MOV RAX,qword ptr [RSP + 0x188]
MOV RDX,qword ptr [RSP + 0x190]
ADD RSP,0x198
RET
|
int1 [16]
js_set_union(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int1 auVar4 [16];
uint uStack_174;
uint uStack_114;
uint uStack_f4;
uint uStack_e4;
uint uStack_d4;
int local_b4;
int1 local_b0 [8];
long local_a8;
int8 local_a0;
long local_98;
long local_90;
int1 local_88 [16];
int1 local_78 [16];
int1 local_68 [16];
int1 local_58 [16];
int1 local_48 [16];
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_98 = JS_GetOpaque2(param_1,param_2,param_3,0x24);
if (local_98 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
iVar3 = js_setlike_get_size(local_28,*local_38,local_38[1],local_b0);
if (iVar3 < 0) {
local_10 = 0;
local_8 = 6;
}
else {
iVar3 = js_setlike_get_has(local_28,*local_38,local_38[1],local_88);
if (iVar3 < 0) {
local_10 = 0;
local_8 = 6;
}
else {
JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_);
local_48 = js_map_constructor(local_28,(ulong)uStack_d4 << 0x20,3,0,0,1);
iVar3 = JS_IsException(local_48._0_8_,local_48._8_8_);
if (iVar3 == 0) {
local_a0 = JS_GetOpaque(local_48._0_8_,local_48._8_8_,0x24);
local_68._0_8_ = (ulong)uStack_e4 << 0x20;
local_68._8_8_ = 3;
local_78._0_8_ = (ulong)uStack_f4 << 0x20;
local_78._8_8_ = 3;
for (local_90 = *(long *)(local_98 + 0x10); uVar2 = local_28, uVar1 = local_a0,
local_90 != local_98 + 8; local_90 = *(long *)(local_90 + 8)) {
local_a8 = local_90 + -0x10;
if (*(int *)(local_90 + -0xc) == 0) {
auVar4 = js_dup(*(int8 *)(local_90 + 0x20),*(int8 *)(local_90 + 0x28));
local_a8 = map_add_record(uVar2,uVar1,auVar4._0_8_,auVar4._8_8_);
if (local_a8 == 0) goto LAB_0018f0fa;
*(ulong *)(local_a8 + 0x40) = (ulong)uStack_114 << 0x20;
*(int8 *)(local_a8 + 0x48) = 3;
}
}
local_68 = JS_GetProperty(local_28,*local_38,local_38[1],0x30);
iVar3 = JS_IsException(local_68._0_8_,local_68._8_8_);
if (iVar3 == 0) {
auVar4 = JS_CallFree(local_28,local_68._0_8_,local_68._8_8_,*local_38,local_38[1],0,0);
local_68 = auVar4;
iVar3 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar3 == 0) {
local_78 = JS_GetProperty(local_28,local_68._0_8_,local_68._8_8_,0x6b);
iVar3 = JS_IsException(local_78._0_8_,local_78._8_8_);
if (iVar3 == 0) {
while( true ) {
auVar4 = JS_IteratorNext(local_28,local_68._0_8_,local_68._8_8_,local_78._0_8_,
local_78._8_8_,0,0,&local_b4);
local_58 = auVar4;
iVar3 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar3 != 0) break;
if (local_b4 != 0) goto LAB_0018f142;
auVar4 = js_map_set(local_28,local_48._0_8_,local_48._8_8_,1,local_58);
local_88 = auVar4;
JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_);
iVar3 = JS_IsException(local_88._0_8_,local_88._8_8_);
if (iVar3 != 0) break;
JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_);
}
}
}
}
LAB_0018f0fa:
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_48._8_8_ = 6;
local_48._0_8_ = (ulong)uStack_174 << 0x20;
LAB_0018f142:
JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_);
JS_FreeValue(local_28,local_68._0_8_,local_68._8_8_);
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
}
else {
local_10 = 0;
local_8 = 6;
}
}
}
}
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
61,511 |
js_set_union
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_set_union(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue newset, item, iter, next, rv;
struct list_head *el;
JSMapState *s, *t;
JSMapRecord *mr;
int64_t size;
BOOL done;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
return JS_EXCEPTION;
// order matters! they're JS-observable side effects
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
return JS_EXCEPTION;
if (js_setlike_get_has(ctx, argv[0], &rv) < 0)
return JS_EXCEPTION;
JS_FreeValue(ctx, rv);
newset = js_map_constructor(ctx, JS_UNDEFINED, 0, NULL, MAGIC_SET);
if (JS_IsException(newset))
return JS_EXCEPTION;
t = JS_GetOpaque(newset, JS_CLASS_SET);
iter = JS_UNDEFINED;
next = JS_UNDEFINED;
list_for_each(el, &s->records) {
mr = list_entry(el, JSMapRecord, link);
if (mr->empty)
continue;
mr = map_add_record(ctx, t, js_dup(mr->key));
if (!mr)
goto exception;
mr->value = JS_UNDEFINED;
}
iter = JS_GetProperty(ctx, argv[0], JS_ATOM_keys);
if (JS_IsException(iter))
goto exception;
iter = JS_CallFree(ctx, iter, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
for (;;) {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
rv = js_map_set(ctx, newset, 1, &item, MAGIC_SET);
JS_FreeValue(ctx, item);
if (JS_IsException(rv))
goto exception;
JS_FreeValue(ctx, rv);
}
goto fini;
exception:
JS_FreeValue(ctx, newset);
newset = JS_EXCEPTION;
fini:
JS_FreeValue(ctx, next);
JS_FreeValue(ctx, iter);
return newset;
}
|
O1
|
c
|
js_set_union:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r12
movq %rdi, %rbx
movl $0x24, %ecx
callq 0x269a1
movl $0x6, %ebp
testq %rax, %rax
je 0x50f2d
movq %rax, %r13
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
callq 0x511d5
testl %eax, %eax
js 0x50f2d
movq (%r12), %rsi
movq 0x8(%r12), %rdx
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
callq 0x512a9
testl %eax, %eax
js 0x50f2d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
xorl %r15d, %r15d
movl $0x3, %edx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x34ef8
movq %rax, %r14
movq %rdx, 0x8(%rsp)
movl %edx, %ecx
movl $0x0, %eax
cmpq $0x6, %rcx
je 0x50f32
movq %r13, %rax
movq %r14, 0x48(%rsp)
cmpl $-0x1, %ecx
jne 0x50f4a
movq 0x48(%rsp), %rcx
cmpw $0x24, 0x6(%rcx)
jne 0x50f4a
movq 0x30(%rcx), %r15
jmp 0x50f4d
xorl %r15d, %r15d
xorl %eax, %eax
orq %rax, %r15
movq %r15, %rax
movq %rbp, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
addq $0x8, %r13
movq 0x10(%rax), %rbp
cmpq %r13, %rbp
je 0x50f9a
movq $0x0, 0x28(%rsp)
cmpl $0x0, -0xc(%rbp)
je 0x50f74
movq 0x8(%rbp), %rbp
cmpq %r13, %rbp
jne 0x50f63
jmp 0x50f9a
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1352c
testb $0x1, %al
je 0x50f69
movl $0x3, %eax
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
movl $0x3, %ebp
jmp 0x5100b
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
movl $0x30, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x50ff8
movq (%r12), %rcx
movq 0x8(%r12), %r8
subq $0x8, %rsp
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %r9d, %r9d
pushq $0x0
callq 0x22089
addq $0x10, %rsp
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x5105f
movl $0x3, %eax
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rdx
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x1ccb2
movl $0x6, %r12d
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1ccb2
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %r14
movq %r14, %rax
movq %r12, %rbp
jmp 0x50f32
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x6b, %ecx
movq %r13, %r8
movq %rbp, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rdx, %r8
cmpl $0x6, %r8d
movq %rax, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
je 0x5100b
movq 0x30(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x14(%rsp), %r10
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rax, %rcx
xorl %r9d, %r9d
pushq %r10
pushq $0x0
callq 0x40ee8
addq $0x10, %rsp
movq %rdx, %r12
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x6, %r12d
jne 0x510f8
movq 0x18(%rsp), %rdx
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
jmp 0x5100b
cmpl $0x0, 0x14(%rsp)
je 0x51120
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movl %r14d, %r15d
movq 0x8(%rsp), %r12
jmp 0x51025
movq %rax, %r15
movq %r13, 0x58(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %r8
movl $0x1, %r9d
callq 0x466a7
movq %rax, %r13
movq %rdx, 0x18(%rsp)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ccb2
movq 0x18(%rsp), %rdx
cmpl $0x6, %edx
movq %r13, 0x40(%rsp)
je 0x511cb
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0x1ccb2
movq %rbx, %rdi
movq 0x58(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
xorl %r9d, %r9d
leaq 0x14(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x40ee8
addq $0x10, %rsp
movq %rdx, %r12
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x6, %r12d
je 0x510df
movq %rax, %r15
cmpl $0x0, 0x14(%rsp)
je 0x51128
jmp 0x510ff
movq 0x58(%rsp), %r13
jmp 0x510e4
|
js_set_union:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, r8
mov rbx, rdi
mov ecx, 24h ; '$'
call JS_GetOpaque2
mov ebp, 6
test rax, rax
jz loc_50F2D
mov r13, rax
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+98h+var_38]
mov rdi, rbx
call js_setlike_get_size
test eax, eax
js short loc_50F2D
mov rsi, [r12]
mov rdx, [r12+8]
lea rcx, [rsp+98h+var_68]
mov rdi, rbx
call js_setlike_get_has
test eax, eax
js short loc_50F2D
mov rsi, [rsp+98h+var_68]
mov rdx, [rsp+98h+var_60]
mov rdi, [rbx+18h]
call JS_FreeValueRT
xor r15d, r15d
mov edx, 3
mov rdi, rbx
xor esi, esi
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
call js_map_constructor
mov r14, rax
mov [rsp+98h+var_90], rdx
mov ecx, edx
mov eax, 0
cmp rcx, 6
jz short loc_50F32
mov rax, r13
mov [rsp+98h+var_50], r14
cmp ecx, 0FFFFFFFFh
jnz short loc_50F4A
mov rcx, [rsp+98h+var_50]
cmp word ptr [rcx+6], 24h ; '$'
jnz short loc_50F4A
mov r15, [rcx+30h]
jmp short loc_50F4D
loc_50F2D:
xor r15d, r15d
xor eax, eax
loc_50F32:
or r15, rax
mov rax, r15
mov rdx, rbp
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_50F4A:
xor r15d, r15d
loc_50F4D:
add r13, 8
mov rbp, [rax+10h]
cmp rbp, r13
jz short loc_50F9A
mov [rsp+98h+var_70], 0
loc_50F63:
cmp dword ptr [rbp-0Ch], 0
jz short loc_50F74
loc_50F69:
mov rbp, [rbp+8]
cmp rbp, r13
jnz short loc_50F63
jmp short loc_50F9A
loc_50F74:
mov rdi, rbp
mov rsi, rbx
mov rdx, r15
call js_set_union_cold_1
test al, 1
jz short loc_50F69
mov eax, 3
mov [rsp+98h+var_78], rax
xor r13d, r13d
mov ebp, 3
jmp short loc_5100B
loc_50F9A:
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, rbx
mov ecx, 30h ; '0'
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jz short loc_50FF8
mov rcx, [r12]
mov r8, [r12+8]
sub rsp, 8
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
xor r9d, r9d
push 0
call JS_CallFree
add rsp, 10h
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jnz short loc_5105F
loc_50FF8:
mov eax, 3
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], 0
loc_5100B:
mov rdx, [rsp+98h+var_90]
mov rdi, [rbx+18h]
mov rsi, r14
call JS_FreeValueRT
mov r12d, 6
xor r15d, r15d
loc_51025:
mov rdi, [rbx+18h]
mov rsi, [rsp+98h+var_70]
mov rdx, [rsp+98h+var_78]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, rbp
call JS_FreeValueRT
mov rax, 0FFFFFFFF00000000h
and r14, rax
mov rax, r14
mov rbp, r12
jmp loc_50F32
loc_5105F:
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov ecx, 6Bh ; 'k'
mov r8, r13
mov r9, rbp
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r8, rdx
cmp r8d, 6
mov [rsp+98h+var_70], rax
mov [rsp+98h+var_78], rdx
jz loc_5100B
mov rcx, [rsp+98h+var_68]
mov [rsp+98h+var_58], rcx
mov rcx, [rsp+98h+var_60]
mov [rsp+98h+var_80], rcx
lea r10, [rsp+98h+var_84]
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov rcx, rax
xor r9d, r9d
push r10
push 0
call JS_IteratorNext
add rsp, 10h
mov r12, rdx
mov [rsp+98h+var_50], rax
mov [rsp+98h+var_48], rdx
cmp r12d, 6
jnz short loc_510F8
loc_510DF:
mov rdx, [rsp+98h+var_80]
loc_510E4:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_68], rax
mov [rsp+98h+var_60], rdx
jmp loc_5100B
loc_510F8:
cmp [rsp+98h+var_84], 0
jz short loc_51120
loc_510FF:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_68], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_60], rax
mov r15d, r14d
mov r12, [rsp+98h+var_90]
jmp loc_51025
loc_51120:
mov r15, rax
mov [rsp+98h+var_40], r13
loc_51128:
mov rdi, rbx
mov rsi, r14
mov rdx, [rsp+98h+var_90]
lea r8, [rsp+98h+var_50]
mov r9d, 1
call js_map_set
mov r13, rax
mov [rsp+98h+var_80], rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
mov rdx, [rsp+98h+var_80]
cmp edx, 6
mov [rsp+98h+var_58], r13
jz short loc_511CB
mov rdi, [rbx+18h]
mov rsi, r13
call JS_FreeValueRT
mov rdi, rbx
mov r13, [rsp+98h+var_40]
mov rsi, r13
mov rdx, rbp
mov rcx, [rsp+98h+var_70]
mov r8, [rsp+98h+var_78]
xor r9d, r9d
lea rax, [rsp+98h+var_84]
push rax
push 0
call JS_IteratorNext
add rsp, 10h
mov r12, rdx
mov [rsp+98h+var_50], rax
mov [rsp+98h+var_48], rdx
cmp r12d, 6
jz loc_510DF
mov r15, rax
cmp [rsp+98h+var_84], 0
jz loc_51128
jmp loc_510FF
loc_511CB:
mov r13, [rsp+98h+var_40]
jmp loc_510E4
|
unsigned long long js_set_union(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long *a13)
{
long long Opaque2; // rax
long long v15; // r13
long long v16; // r15
double v17; // xmm4_8
double v18; // xmm5_8
long long v19; // rdx
unsigned long long v20; // r14
unsigned long long v21; // rax
long long v22; // rax
long long v23; // r15
long long v25; // r13
long long v26; // rbp
_DWORD *v27; // r13
long long v28; // rbp
_DWORD *PropertyInternal2; // rax
long long v30; // rdx
long long v31; // rax
long long v32; // rdx
_DWORD *v33; // rax
long long v34; // rdx
unsigned long long v35; // rax
long long v36; // rcx
double v37; // xmm4_8
double v38; // xmm5_8
long long v39; // rdx
long long v40; // r12
long long v41; // rdx
_DWORD *v42; // r15
_DWORD *v43; // r13
long long v44; // rdx
unsigned long long v45; // rax
long long v46; // rdx
long long v47; // [rsp+8h] [rbp-90h]
int v48; // [rsp+14h] [rbp-84h] BYREF
long long v49; // [rsp+18h] [rbp-80h]
long long v50; // [rsp+20h] [rbp-78h]
_DWORD *v51; // [rsp+28h] [rbp-70h]
_DWORD *v52; // [rsp+30h] [rbp-68h] BYREF
long long v53; // [rsp+38h] [rbp-60h]
_DWORD *v54; // [rsp+40h] [rbp-58h]
unsigned long long v55; // [rsp+48h] [rbp-50h] BYREF
long long v56; // [rsp+50h] [rbp-48h]
_DWORD *v57; // [rsp+58h] [rbp-40h]
char v58[56]; // [rsp+60h] [rbp-38h] BYREF
Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x24u);
if ( Opaque2
&& (v15 = Opaque2, (int)js_setlike_get_size(a1, *a13, a13[1], v58) >= 0)
&& (int)js_setlike_get_has(a1, *a13, a13[1], &v52) >= 0 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v52, v53);
v16 = 0LL;
v20 = js_map_constructor(a1, 0LL, 3LL, 0, 0LL, 1u, a4, a5, a6, a7, v17, v18, a10, a11);
v47 = v19;
v21 = 0LL;
if ( (unsigned int)v19 != 6LL )
{
v22 = v15;
v55 = v20;
if ( (_DWORD)v19 == -1 && *(_WORD *)(v55 + 6) == 36 )
v23 = *(_QWORD *)(v55 + 48);
else
v23 = 0LL;
v25 = v15 + 8;
v26 = *(_QWORD *)(v22 + 16);
if ( v26 == v25 )
{
LABEL_18:
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, *a13, a13[1], 0x30u, *a13, a13[1], 0LL, 0);
v27 = PropertyInternal2;
v28 = v30;
if ( (_DWORD)v30 == 6
|| (v31 = JS_CallFree(a1, PropertyInternal2, v30, *a13, a13[1], 0, 0LL),
v27 = (_DWORD *)v31,
v28 = v32,
(_DWORD)v32 == 6) )
{
v50 = 3LL;
v51 = 0LL;
}
else
{
v33 = (_DWORD *)JS_GetPropertyInternal2(a1, v31, v32, 0x6Bu, v31, v32, 0LL, 0);
v51 = v33;
v50 = v34;
if ( (_DWORD)v34 != 6 )
{
v54 = v52;
v49 = v53;
v35 = JS_IteratorNext(a1, (int)v27, v28, (int)v33, v34, 0, 0LL, &v48);
v40 = v39;
v55 = v35;
v56 = v39;
if ( (_DWORD)v39 == 6 )
{
LABEL_25:
v41 = v49;
}
else
{
if ( v48 )
{
LABEL_28:
v52 = v54;
v53 = v49;
v16 = (unsigned int)v20;
goto LABEL_22;
}
v42 = (_DWORD *)v35;
v57 = v27;
while ( 1 )
{
v43 = (_DWORD *)js_map_set(a1, v20, v47, a4, a5, a6, a7, v37, v38, a10, a11, v36, (long long *)&v55, 1);
v49 = v44;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v42, v40);
v41 = v49;
v54 = v43;
if ( (_DWORD)v49 == 6 )
break;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v43, v49);
v27 = v57;
v45 = JS_IteratorNext(a1, (int)v57, v28, (int)v51, v50, 0, 0LL, &v48);
v40 = v46;
v55 = v45;
v56 = v46;
if ( (_DWORD)v46 == 6 )
goto LABEL_25;
v42 = (_DWORD *)v45;
if ( v48 )
goto LABEL_28;
}
v27 = v57;
}
v52 = v54;
v53 = v41;
}
}
}
else
{
v51 = 0LL;
while ( *(_DWORD *)(v26 - 12) || (js_set_union_cold_1(v26, a1, v23) & 1) == 0 )
{
v26 = *(_QWORD *)(v26 + 8);
if ( v26 == v25 )
goto LABEL_18;
}
v50 = 3LL;
v27 = 0LL;
v28 = 3LL;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v20, v47);
v16 = 0LL;
LABEL_22:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v51, v50);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v27, v28);
v21 = v20 & 0xFFFFFFFF00000000LL;
}
}
else
{
v16 = 0LL;
v21 = 0LL;
}
return v21 | v16;
}
|
js_set_union:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,R8
MOV RBX,RDI
MOV ECX,0x24
CALL 0x001269a1
MOV EBP,0x6
TEST RAX,RAX
JZ 0x00150f2d
MOV R13,RAX
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x60]
MOV RDI,RBX
CALL 0x001511d5
TEST EAX,EAX
JS 0x00150f2d
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LEA RCX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x001512a9
TEST EAX,EAX
JS 0x00150f2d
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
XOR R15D,R15D
MOV EDX,0x3
MOV RDI,RBX
XOR ESI,ESI
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
CALL 0x00134ef8
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RDX
MOV ECX,EDX
MOV EAX,0x0
CMP RCX,0x6
JZ 0x00150f32
MOV RAX,R13
MOV qword ptr [RSP + 0x48],R14
CMP ECX,-0x1
JNZ 0x00150f4a
MOV RCX,qword ptr [RSP + 0x48]
CMP word ptr [RCX + 0x6],0x24
JNZ 0x00150f4a
MOV R15,qword ptr [RCX + 0x30]
JMP 0x00150f4d
LAB_00150f2d:
XOR R15D,R15D
XOR EAX,EAX
LAB_00150f32:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBP
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00150f4a:
XOR R15D,R15D
LAB_00150f4d:
ADD R13,0x8
MOV RBP,qword ptr [RAX + 0x10]
CMP RBP,R13
JZ 0x00150f9a
MOV qword ptr [RSP + 0x28],0x0
LAB_00150f63:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00150f74
LAB_00150f69:
MOV RBP,qword ptr [RBP + 0x8]
CMP RBP,R13
JNZ 0x00150f63
JMP 0x00150f9a
LAB_00150f74:
MOV RDI,RBP
MOV RSI,RBX
MOV RDX,R15
CALL 0x0011352c
TEST AL,0x1
JZ 0x00150f69
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
XOR R13D,R13D
MOV EBP,0x3
JMP 0x0015100b
LAB_00150f9a:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,RBX
MOV ECX,0x30
MOV R8,RSI
MOV R9,RDX
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JZ 0x00150ff8
MOV RCX,qword ptr [R12]
MOV R8,qword ptr [R12 + 0x8]
SUB RSP,0x8
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
XOR R9D,R9D
PUSH 0x0
CALL 0x00122089
ADD RSP,0x10
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0015105f
LAB_00150ff8:
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],0x0
LAB_0015100b:
MOV RDX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
CALL 0x0011ccb2
MOV R12D,0x6
XOR R15D,R15D
LAB_00151025:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011ccb2
MOV RAX,-0x100000000
AND R14,RAX
MOV RAX,R14
MOV RBP,R12
JMP 0x00150f32
LAB_0015105f:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV ECX,0x6b
MOV R8,R13
MOV R9,RBP
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R8,RDX
CMP R8D,0x6
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RDX
JZ 0x0015100b
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x18],RCX
LEA R10,[RSP + 0x14]
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV RCX,RAX
XOR R9D,R9D
PUSH R10
PUSH 0x0
CALL 0x00140ee8
ADD RSP,0x10
MOV R12,RDX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
CMP R12D,0x6
JNZ 0x001510f8
LAB_001510df:
MOV RDX,qword ptr [RSP + 0x18]
LAB_001510e4:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0015100b
LAB_001510f8:
CMP dword ptr [RSP + 0x14],0x0
JZ 0x00151120
LAB_001510ff:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV R15D,R14D
MOV R12,qword ptr [RSP + 0x8]
JMP 0x00151025
LAB_00151120:
MOV R15,RAX
MOV qword ptr [RSP + 0x58],R13
LAB_00151128:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,qword ptr [RSP + 0x8]
LEA R8,[RSP + 0x48]
MOV R9D,0x1
CALL 0x001466a7
MOV R13,RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011ccb2
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,0x6
MOV qword ptr [RSP + 0x40],R13
JZ 0x001511cb
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
CALL 0x0011ccb2
MOV RDI,RBX
MOV R13,qword ptr [RSP + 0x58]
MOV RSI,R13
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x20]
XOR R9D,R9D
LEA RAX,[RSP + 0x14]
PUSH RAX
PUSH 0x0
CALL 0x00140ee8
ADD RSP,0x10
MOV R12,RDX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
CMP R12D,0x6
JZ 0x001510df
MOV R15,RAX
CMP dword ptr [RSP + 0x14],0x0
JZ 0x00151128
JMP 0x001510ff
LAB_001511cb:
MOV R13,qword ptr [RSP + 0x58]
JMP 0x001510e4
|
int1 [16] js_set_union(long param_1)
{
int iVar1;
long lVar2;
ulong uVar4;
int8 uVar5;
int8 uVar7;
ulong uVar8;
long lVar9;
int8 *in_R8;
int8 uVar10;
ulong uVar11;
int8 uVar12;
int1 auVar13 [16];
int1 auVar14 [16];
int1 auVar15 [16];
int local_84;
int8 local_80;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
int1 local_50 [16];
int8 local_40;
int1 local_38 [8];
ulong uVar3;
ulong uVar6;
lVar2 = JS_GetOpaque2();
uVar8 = 6;
if (((lVar2 == 0) || (iVar1 = js_setlike_get_size(param_1,*in_R8,in_R8[1],local_38), iVar1 < 0))
|| (iVar1 = js_setlike_get_has(param_1,*in_R8,in_R8[1],&local_68), iVar1 < 0)) {
uVar11 = 0;
uVar4 = 0;
goto LAB_00150f32;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_68,local_60);
uVar11 = 0;
auVar13 = js_map_constructor(param_1,0,3,0,0,1);
uVar6 = auVar13._8_8_;
uVar3 = auVar13._0_8_;
uVar4 = 0;
if ((uVar6 & 0xffffffff) == 6) goto LAB_00150f32;
if ((auVar13._8_4_ == -1) && (*(short *)(uVar3 + 6) == 0x24)) {
uVar10 = *(int8 *)(uVar3 + 0x30);
}
else {
uVar10 = 0;
}
lVar9 = *(long *)(lVar2 + 0x10);
local_50._0_8_ = uVar3;
if (lVar9 != lVar2 + 8) {
local_70 = 0;
do {
if (*(int *)(lVar9 + -0xc) == 0) {
uVar8 = js_set_union_cold_1(lVar9,param_1,uVar10);
if ((uVar8 & 1) != 0) {
auVar15._8_8_ = 3;
auVar15._0_8_ = local_70;
auVar13 = ZEXT816(3) << 0x40;
goto LAB_0015100b;
}
}
lVar9 = *(long *)(lVar9 + 8);
} while (lVar9 != lVar2 + 8);
}
auVar13 = JS_GetPropertyInternal2(param_1,*in_R8,in_R8[1],0x30,*in_R8,in_R8[1],0,0);
if (auVar13._8_4_ == 6) {
LAB_00150ff8:
auVar15 = ZEXT816(3) << 0x40;
}
else {
auVar13 = JS_CallFree(param_1,auVar13._0_8_,auVar13._8_8_,*in_R8,in_R8[1],0,0);
uVar7 = auVar13._8_8_;
uVar10 = auVar13._0_8_;
if (auVar13._8_4_ == 6) goto LAB_00150ff8;
auVar15 = JS_GetPropertyInternal2(param_1,uVar10,uVar7,0x6b,uVar10,uVar7,0,0);
local_78 = auVar15._8_8_;
local_70 = auVar15._0_8_;
if (auVar15._8_4_ != 6) {
local_58 = local_68;
local_80 = local_60;
local_50 = JS_IteratorNext(param_1,uVar10,uVar7,local_70,local_78,0,0,&local_84);
iVar1 = local_50._8_4_;
uVar5 = uVar10;
local_68 = local_58;
uVar12 = local_40;
while (local_40 = uVar5, local_58 = local_68, iVar1 != 6) {
if (local_84 != 0) {
auVar13._8_8_ = uVar7;
auVar13._0_8_ = uVar10;
uVar11 = uVar3 & 0xffffffff;
uVar8 = uVar6;
local_60 = local_80;
local_40 = uVar12;
goto LAB_00151025;
}
uVar10 = local_50._8_8_;
uVar12 = local_50._0_8_;
auVar13 = js_map_set(param_1,uVar3,uVar6);
local_80 = auVar13._8_8_;
uVar5 = auVar13._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar12,uVar10);
uVar10 = local_40;
local_58 = uVar5;
uVar12 = local_40;
if ((int)local_80 == 6) break;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5);
uVar10 = local_40;
auVar13 = JS_IteratorNext(param_1,local_40,uVar7,local_70,local_78,0,0,&local_84);
uVar5 = local_40;
local_68 = local_58;
uVar12 = local_40;
local_50 = auVar13;
iVar1 = auVar13._8_4_;
}
local_40 = uVar12;
auVar15._8_8_ = local_78;
auVar15._0_8_ = local_70;
auVar13._8_8_ = uVar7;
auVar13._0_8_ = uVar10;
local_68 = local_58;
local_60 = local_80;
}
}
LAB_0015100b:
local_78 = auVar15._8_8_;
local_70 = auVar15._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar6);
uVar11 = 0;
uVar8 = 6;
LAB_00151025:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_70,local_78);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar13._0_8_,auVar13._8_8_);
uVar4 = uVar3 & 0xffffffff00000000;
LAB_00150f32:
auVar14._8_8_ = uVar8;
auVar14._0_8_ = uVar11 | uVar4;
return auVar14;
}
|
|
61,512 |
file_write_line
|
tsotchke[P]eshkol/src/core/utils/file_io.c
|
bool file_write_line(File* file, const char* line, size_t size) {
assert(line != NULL);
if (!file || !file->handle) {
set_last_error(FILE_ERROR_INVALID_HANDLE);
return false;
}
// Write the line
size_t bytes_written = fwrite(line, 1, size, file->handle);
if (bytes_written != size) {
set_last_error(errno_to_file_error(errno));
return false;
}
// Write a newline
if (fputc('\n', file->handle) == EOF) {
set_last_error(errno_to_file_error(errno));
return false;
}
set_last_error(FILE_ERROR_NONE);
return true;
}
|
O0
|
c
|
file_write_line:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x576d
jmp 0x578c
leaq 0x1ef5(%rip), %rdi # 0x7669
leaq 0x2656(%rip), %rsi # 0x7dd1
movl $0x239, %edx # imm = 0x239
leaq 0x28af(%rip), %rcx # 0x8036
callq 0x2170
cmpq $0x0, -0x10(%rbp)
je 0x579d
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x57ad
movl $0x5, %edi
callq 0x4920
movb $0x0, -0x1(%rbp)
jmp 0x5827
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x1, %esi
callq 0x22d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x57ed
callq 0x2060
movl (%rax), %edi
callq 0x4940
movl %eax, %edi
callq 0x4920
movb $0x0, -0x1(%rbp)
jmp 0x5827
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl $0xa, %edi
callq 0x21b0
cmpl $-0x1, %eax
jne 0x581c
callq 0x2060
movl (%rax), %edi
callq 0x4940
movl %eax, %edi
callq 0x4920
movb $0x0, -0x1(%rbp)
jmp 0x5827
xorl %edi, %edi
callq 0x4920
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
file_write_line:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 0
jz short loc_576D
jmp short loc_578C
loc_576D:
lea rdi, aLineNull; "line != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 239h
lea rcx, aBoolFileWriteL; "_Bool file_write_line(File *, const cha"...
call ___assert_fail
loc_578C:
cmp [rbp+var_10], 0
jz short loc_579D
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_57AD
loc_579D:
mov edi, 5
call set_last_error
mov [rbp+var_1], 0
jmp short loc_5827
loc_57AD:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rax]
mov esi, 1
call _fwrite
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jz short loc_57ED
call ___errno_location
mov edi, [rax]
call errno_to_file_error
mov edi, eax
call set_last_error
mov [rbp+var_1], 0
jmp short loc_5827
loc_57ED:
mov rax, [rbp+var_10]
mov rsi, [rax]
mov edi, 0Ah
call _fputc
cmp eax, 0FFFFFFFFh
jnz short loc_581C
call ___errno_location
mov edi, [rax]
call errno_to_file_error
mov edi, eax
call set_last_error
mov [rbp+var_1], 0
jmp short loc_5827
loc_581C:
xor edi, edi
call set_last_error
mov [rbp+var_1], 1
loc_5827:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char file_write_line(_QWORD *a1, long long a2, long long a3)
{
int *v3; // rax
unsigned int v4; // eax
if ( !a2 )
__assert_fail(
"line != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
569LL,
"_Bool file_write_line(File *, const char *, size_t)");
if ( a1 && *a1 )
{
if ( fwrite(a2, 1LL, a3, *a1) != a3 || (unsigned int)fputc(10LL, *a1) == -1 )
{
v3 = (int *)__errno_location();
v4 = errno_to_file_error(*v3);
set_last_error(v4);
return 0;
}
else
{
set_last_error(0);
return 1;
}
}
else
{
set_last_error(5u);
return 0;
}
}
|
file_write_line:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0010576d
JMP 0x0010578c
LAB_0010576d:
LEA RDI,[0x107657]
LEA RSI,[0x107dad]
MOV EDX,0x239
LEA RCX,[0x108000]
CALL 0x00102170
LAB_0010578c:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010579d
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x001057ad
LAB_0010579d:
MOV EDI,0x5
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00105827
LAB_001057ad:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV ESI,0x1
CALL 0x001022d0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001057ed
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104940
MOV EDI,EAX
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00105827
LAB_001057ed:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x001021b0
CMP EAX,-0x1
JNZ 0x0010581c
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104940
MOV EDI,EAX
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00105827
LAB_0010581c:
XOR EDI,EDI
CALL 0x00104920
MOV byte ptr [RBP + -0x1],0x1
LAB_00105827:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
int1 file_write_line(long *param_1,void *param_2,size_t param_3)
{
int4 uVar1;
int iVar2;
size_t sVar3;
int *piVar4;
int1 local_9;
if (param_2 != (void *)0x0) {
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
set_last_error(5);
local_9 = 0;
}
else {
sVar3 = fwrite(param_2,1,param_3,(FILE *)*param_1);
if (sVar3 == param_3) {
iVar2 = fputc(10,(FILE *)*param_1);
if (iVar2 == -1) {
piVar4 = __errno_location();
uVar1 = errno_to_file_error(*piVar4);
set_last_error(uVar1);
local_9 = 0;
}
else {
set_last_error(0);
local_9 = 1;
}
}
else {
piVar4 = __errno_location();
uVar1 = errno_to_file_error(*piVar4);
set_last_error(uVar1);
local_9 = 0;
}
}
return local_9;
}
/* WARNING: Subroutine does not return */
__assert_fail("line != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/file_io.c",
0x239,"_Bool file_write_line(File *, const char *, size_t)");
}
|
|
61,513 |
file_write_line
|
tsotchke[P]eshkol/src/core/utils/file_io.c
|
bool file_write_line(File* file, const char* line, size_t size) {
assert(line != NULL);
if (!file || !file->handle) {
set_last_error(FILE_ERROR_INVALID_HANDLE);
return false;
}
// Write the line
size_t bytes_written = fwrite(line, 1, size, file->handle);
if (bytes_written != size) {
set_last_error(errno_to_file_error(errno));
return false;
}
// Write a newline
if (fputc('\n', file->handle) == EOF) {
set_last_error(errno_to_file_error(errno));
return false;
}
set_last_error(FILE_ERROR_NONE);
return true;
}
|
O3
|
c
|
file_write_line:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x48fb
movq %rdi, %rbx
movl $0x5, %eax
testq %rdi, %rdi
je 0x48e9
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x48e9
movq %rdx, %r14
movq %rsi, %rdx
movl $0x1, %esi
movq %rdx, %rdi
movq %r14, %rdx
callq 0x22c0
cmpq %r14, %rax
jne 0x48dd
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x21b0
cmpl $-0x1, %eax
je 0x48dd
movb $0x1, %cl
xorl %eax, %eax
jmp 0x48eb
callq 0x2060
movl (%rax), %edi
callq 0x4002
xorl %ecx, %ecx
movl %eax, 0x4893(%rip) # 0x9184
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b7c(%rip), %rdi # 0x647e
leaq 0x24a4(%rip), %rsi # 0x6dad
leaq 0x2702(%rip), %rcx # 0x7012
movl $0x239, %edx # imm = 0x239
callq 0x2170
|
file_write_line:
push r14
push rbx
push rax
test rsi, rsi
jz short loc_48FB
mov rbx, rdi
mov eax, 5
test rdi, rdi
jz short loc_48E9
mov rcx, [rbx]
test rcx, rcx
jz short loc_48E9
mov r14, rdx
mov rdx, rsi
mov esi, 1
mov rdi, rdx
mov rdx, r14
call _fwrite
cmp rax, r14
jnz short loc_48DD
mov rsi, [rbx]
mov edi, 0Ah
call _fputc
cmp eax, 0FFFFFFFFh
jz short loc_48DD
mov cl, 1
xor eax, eax
jmp short loc_48EB
loc_48DD:
call ___errno_location
mov edi, [rax]
call errno_to_file_error
loc_48E9:
xor ecx, ecx
loc_48EB:
mov cs:g_last_error, eax
mov eax, ecx
add rsp, 8
pop rbx
pop r14
retn
loc_48FB:
lea rdi, aLineNull; "line != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolFileWriteL; "_Bool file_write_line(File *, const cha"...
mov edx, 239h
call ___assert_fail
|
long long file_write_line(_QWORD *a1, long long a2, long long a3)
{
int v4; // eax
long long v5; // rcx
long long v6; // rdi
unsigned int v7; // ecx
unsigned int *v8; // rax
if ( !a2 )
__assert_fail(
"line != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
569LL,
"_Bool file_write_line(File *, const char *, size_t)");
v4 = 5;
if ( !a1 )
goto LABEL_8;
v5 = *a1;
if ( !*a1 )
goto LABEL_8;
v6 = a2;
if ( fwrite(a2, 1LL, a3, v5) != a3 || (v6 = 10LL, (unsigned int)fputc(10LL, *a1) == -1) )
{
v8 = (unsigned int *)__errno_location(v6);
v4 = errno_to_file_error(*v8);
LABEL_8:
v7 = 0;
goto LABEL_9;
}
LOBYTE(v7) = 1;
v4 = 0;
LABEL_9:
g_last_error = v4;
return v7;
}
|
file_write_line:
PUSH R14
PUSH RBX
PUSH RAX
TEST RSI,RSI
JZ 0x001048fb
MOV RBX,RDI
MOV EAX,0x5
TEST RDI,RDI
JZ 0x001048e9
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x001048e9
MOV R14,RDX
MOV RDX,RSI
MOV ESI,0x1
MOV RDI,RDX
MOV RDX,R14
CALL 0x001022c0
CMP RAX,R14
JNZ 0x001048dd
MOV RSI,qword ptr [RBX]
MOV EDI,0xa
CALL 0x001021b0
CMP EAX,-0x1
JZ 0x001048dd
MOV CL,0x1
XOR EAX,EAX
JMP 0x001048eb
LAB_001048dd:
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104002
LAB_001048e9:
XOR ECX,ECX
LAB_001048eb:
MOV dword ptr [0x00109184],EAX
MOV EAX,ECX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001048fb:
LEA RDI,[0x10647e]
LEA RSI,[0x106dad]
LEA RCX,[0x107012]
MOV EDX,0x239
CALL 0x00102170
|
ulong file_write_line(int8 *param_1,void *param_2,size_t param_3)
{
int iVar1;
int4 uVar2;
size_t sVar3;
int *piVar4;
FILE *__s;
ulong uVar5;
if (param_2 == (void *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("line != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c"
,0x239,"_Bool file_write_line(File *, const char *, size_t)");
}
uVar2 = 5;
if ((param_1 != (int8 *)0x0) && (__s = (FILE *)*param_1, __s != (FILE *)0x0)) {
sVar3 = fwrite(param_2,1,param_3,__s);
if (sVar3 == param_3) {
iVar1 = fputc(10,(FILE *)*param_1);
if (iVar1 != -1) {
uVar5 = CONCAT71((int7)((ulong)__s >> 8),1);
uVar2 = 0;
goto LAB_001048eb;
}
}
piVar4 = __errno_location();
uVar2 = errno_to_file_error(*piVar4);
}
uVar5 = 0;
LAB_001048eb:
g_last_error = uVar2;
return uVar5 & 0xffffffff;
}
|
|
61,514 |
my_string_repertoire
|
eloqsql/strings/ctype.c
|
my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
}
|
O3
|
c
|
my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x1, 0x98(%rdi)
jne 0x35993
testb $0x20, 0xd(%r15)
jne 0x35993
movl $0x1, %eax
testq %rbx, %rbx
jle 0x359f9
addq %r14, %rbx
cmpb $0x0, (%r14)
js 0x35a06
incq %r14
cmpq %rbx, %r14
jb 0x35983
jmp 0x359f9
addq %r14, %rbx
movq 0xb8(%r15), %rax
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0x359ef
cmpq $0x7f, -0x28(%rbp)
ja 0x359ef
leaq -0x28(%rbp), %r12
movq %r14, %rcx
movl %eax, %r14d
addq %rcx, %r14
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0x359ef
cmpq $0x80, -0x28(%rbp)
jb 0x359bf
movzbl %cl, %eax
leal 0x1(,%rax,2), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %eax
jmp 0x359f9
|
my_string_repertoire:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rdi+98h], 1
jnz short loc_35993
test byte ptr [r15+0Dh], 20h
jnz short loc_35993
mov eax, 1
test rbx, rbx
jle short loc_359F9
add rbx, r14
loc_35983:
cmp byte ptr [r14], 0
js short loc_35A06
inc r14
cmp r14, rbx
jb short loc_35983
jmp short loc_359F9
loc_35993:
add rbx, r14
mov rax, [r15+0B8h]
lea rsi, [rbp+var_28]
mov rdi, r15
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_359EF
cmp [rbp+var_28], 7Fh
ja short loc_359EF
lea r12, [rbp+var_28]
loc_359BF:
mov rcx, r14
mov r14d, eax
add r14, rcx
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r12
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_359EF
cmp [rbp+var_28], 80h
jb short loc_359BF
loc_359EF:
movzx eax, cl
lea eax, ds:1[rax*2]
loc_359F9:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_35A06:
mov eax, 3
jmp short loc_359F9
|
long long my_string_repertoire(long long a1, char *a2, long long a3)
{
char *v3; // r14
long long result; // rax
char *v5; // rbx
int v6; // eax
bool v7; // cl
_QWORD v8[5]; // [rsp+8h] [rbp-28h] BYREF
v3 = a2;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_BYTE *)(a1 + 13) & 0x20) != 0 )
{
v5 = &a2[a3];
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
a2,
&a2[a3]);
v7 = v6 > 0;
if ( v6 > 0 && v8[0] <= 0x7FuLL )
{
do
{
v3 += (unsigned int)v6;
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
v3,
v5);
v7 = v6 > 0;
}
while ( v6 > 0 && v8[0] < 0x80uLL );
}
return 2 * (unsigned int)v7 + 1;
}
else
{
result = 1LL;
if ( a3 > 0 )
{
while ( *v3 >= 0 )
{
if ( ++v3 >= &a2[a3] )
return result;
}
return 3LL;
}
}
return result;
}
|
my_string_repertoire:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RDI + 0x98],0x1
JNZ 0x00135993
TEST byte ptr [R15 + 0xd],0x20
JNZ 0x00135993
MOV EAX,0x1
TEST RBX,RBX
JLE 0x001359f9
ADD RBX,R14
LAB_00135983:
CMP byte ptr [R14],0x0
JS 0x00135a06
INC R14
CMP R14,RBX
JC 0x00135983
JMP 0x001359f9
LAB_00135993:
ADD RBX,R14
MOV RAX,qword ptr [R15 + 0xb8]
LEA RSI,[RBP + -0x28]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x001359ef
CMP qword ptr [RBP + -0x28],0x7f
JA 0x001359ef
LEA R12,[RBP + -0x28]
LAB_001359bf:
MOV RCX,R14
MOV R14D,EAX
ADD R14,RCX
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x001359ef
CMP qword ptr [RBP + -0x28],0x80
JC 0x001359bf
LAB_001359ef:
MOVZX EAX,CL
LEA EAX,[0x1 + RAX*0x2]
LAB_001359f9:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00135a06:
MOV EAX,0x3
JMP 0x001359f9
|
char my_string_repertoire(long param_1,char *param_2,long param_3)
{
char cVar1;
uint uVar2;
bool bVar3;
char *pcVar4;
ulong local_30;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(byte *)(param_1 + 0xd) & 0x20) == 0)) {
cVar1 = '\x01';
if (0 < param_3) {
pcVar4 = param_2 + param_3;
do {
if (*param_2 < '\0') {
return '\x03';
}
param_2 = param_2 + 1;
} while (param_2 < pcVar4);
}
}
else {
pcVar4 = param_2 + param_3;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((0 < (int)uVar2) && (local_30 < 0x80)) {
do {
param_2 = param_2 + uVar2;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((int)uVar2 < 1) break;
} while (local_30 < 0x80);
}
cVar1 = bVar3 * '\x02' + '\x01';
}
return cVar1;
}
|
|
61,515 |
ggml_compute_forward_sqr
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_sqr(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_sqr_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O0
|
c
|
ggml_compute_forward_sqr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x1456a
jmp 0x1455b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x250c0
jmp 0x14584
leaq 0x5f5f1(%rip), %rdi # 0x73b62
movl $0x14b5, %esi # imm = 0x14B5
leaq 0x5f840(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ggml_compute_forward_sqr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_1456A
jmp short $+2
loc_1455B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_sqr_f32
jmp short loc_14584
loc_1456A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 14B5h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_14584:
add rsp, 20h
pop rbp
retn
|
double ggml_compute_forward_sqr(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
5301LL,
"fatal error");
ggml_compute_forward_sqr_f32(a1, a2);
return result;
}
|
ggml_compute_forward_sqr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x0011456a
JMP 0x0011455b
LAB_0011455b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001250c0
JMP 0x00114584
LAB_0011456a:
LEA RDI,[0x173b62]
MOV ESI,0x14b5
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00114584:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_sqr(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_sqr_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x14b5,"fatal error");
}
return;
}
|
|
61,516 |
my_atoll
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static long long my_atoll(const char *str, const char *end_str, int *error)
{
const char *p=str;
const char *end;
long long ret;
while (p < end_str && isspace(*p))
p++;
ret = my_strtoll(p, end_str - p, &end, error);
while(end < end_str && isspace(*end))
end++;
if(end != end_str)
*error= 1;
return ret;
}
|
O0
|
c
|
my_atoll:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x31(%rbp)
jae 0x621cf
callq 0x38120
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x621d8
jmp 0x621e6
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6219c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
movq -0x18(%rbp), %rcx
leaq -0x28(%rbp), %rdx
callq 0x62360
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x32(%rbp)
jae 0x62239
callq 0x38120
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x62242
jmp 0x62250
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x62206
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x62264
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
|
my_atoll:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_6219C:
mov rcx, [rbp+var_20]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_31], al
jnb short loc_621CF
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_20]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_621CF:
mov al, [rbp+var_31]
test al, 1
jnz short loc_621D8
jmp short loc_621E6
loc_621D8:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_6219C
loc_621E6:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_20]
sub rsi, rax
mov rcx, [rbp+var_18]
lea rdx, [rbp+var_28]
call my_strtoll
mov [rbp+var_30], rax
loc_62206:
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_32], al
jnb short loc_62239
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_28]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_32], al
loc_62239:
mov al, [rbp+var_32]
test al, 1
jnz short loc_62242
jmp short loc_62250
loc_62242:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_62206
loc_62250:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jz short loc_62264
mov rax, [rbp+var_18]
mov dword ptr [rax], 1
loc_62264:
mov rax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
|
long long my_atoll(char *a1, char *a2, _DWORD *a3)
{
bool v4; // [rsp+Eh] [rbp-32h]
bool v5; // [rsp+Fh] [rbp-31h]
long long v6; // [rsp+10h] [rbp-30h]
char *v7; // [rsp+18h] [rbp-28h] BYREF
char *i; // [rsp+20h] [rbp-20h]
_DWORD *v9; // [rsp+28h] [rbp-18h]
char *v10; // [rsp+30h] [rbp-10h]
char *v11; // [rsp+38h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
for ( i = a1; ; ++i )
{
v5 = 0;
if ( i < v10 )
v5 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *i) & 0x2000) != 0;
if ( !v5 )
break;
}
v6 = my_strtoll(i, v10 - i, &v7, v9);
while ( 1 )
{
v4 = 0;
if ( v7 < v10 )
v4 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *v7) & 0x2000) != 0;
if ( !v4 )
break;
++v7;
}
if ( v7 != v10 )
*v9 = 1;
return v6;
}
|
my_atoll:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0016219c:
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x31],AL
JNC 0x001621cf
CALL 0x00138120
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001621cf:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001621d8
JMP 0x001621e6
LAB_001621d8:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016219c
LAB_001621e6:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
SUB RSI,RAX
MOV RCX,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x28]
CALL 0x00162360
MOV qword ptr [RBP + -0x30],RAX
LAB_00162206:
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x32],AL
JNC 0x00162239
CALL 0x00138120
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x32],AL
LAB_00162239:
MOV AL,byte ptr [RBP + -0x32]
TEST AL,0x1
JNZ 0x00162242
JMP 0x00162250
LAB_00162242:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00162206
LAB_00162250:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x00162264
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x1
LAB_00162264:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
|
int8 my_atoll(char *param_1,char *param_2,int4 *param_3)
{
ushort **ppuVar1;
int8 uVar2;
bool bVar3;
char *local_30;
char *local_28;
int4 *local_20;
char *local_18;
char *local_10;
local_28 = param_1;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar3 = false;
if (local_28 < local_18) {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_28] & 0x2000) != 0;
}
if (!bVar3) break;
local_28 = local_28 + 1;
}
uVar2 = my_strtoll(local_28,(long)local_18 - (long)local_28,&local_30,local_20);
while( true ) {
bVar3 = false;
if (local_30 < local_18) {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_30] & 0x2000) != 0;
}
if (!bVar3) break;
local_30 = local_30 + 1;
}
if (local_30 != local_18) {
*local_20 = 1;
}
return uVar2;
}
|
|
61,517 |
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/stencilTable.h
|
inline void
StencilTableReal<REAL>::finalize() {
shrinkToFit();
generateOffsets();
}
|
O1
|
c
|
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3b810
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x28(%r14), %rbx
shrq $0x2, %rax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x39690
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x71b7f
movq (%rbx), %rdx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %edi, %edi
movl %edi, (%rdx,%rsi,4)
addl (%rax,%rsi,4), %edi
incq %rsi
cmpq %rsi, %rcx
jne 0x71b71
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIfE8finalizeEv:
push r14
push rbx
push rax
mov r14, rdi
call __ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIfE11shrinkToFitEv; OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::shrinkToFit(void)
mov rax, [r14+18h]
sub rax, [r14+10h]
lea rbx, [r14+28h]
shr rax, 2
movsxd rsi, eax
mov rdi, rbx
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r14+10h]
mov rcx, [r14+18h]
sub rcx, rax
shr rcx, 2
test ecx, ecx
jle short loc_71B7F
mov rdx, [rbx]
and ecx, 7FFFFFFFh
xor esi, esi
xor edi, edi
loc_71B71:
mov [rdx+rsi*4], edi
add edi, [rax+rsi*4]
inc rsi
cmp rcx, rsi
jnz short loc_71B71
loc_71B7F:
add rsp, 8
pop rbx
pop r14
retn
|
long long OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize(_QWORD *a1)
{
long long result; // rax
long long v2; // rdx
long long v3; // rcx
long long v4; // rsi
int v5; // edi
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::shrinkToFit(a1);
std::vector<int>::resize(a1 + 5, (int)((a1[3] - a1[2]) >> 2));
result = a1[2];
if ( (int)((unsigned long long)(a1[3] - result) >> 2) > 0 )
{
v2 = a1[5];
v3 = ((unsigned long long)(a1[3] - result) >> 2) & 0x7FFFFFFF;
v4 = 0LL;
v5 = 0;
do
{
*(_DWORD *)(v2 + 4 * v4) = v5;
v5 += *(_DWORD *)(result + 4 * v4++);
}
while ( v3 != v4 );
}
return result;
}
|
finalize:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
CALL 0x0013b810
MOV RAX,qword ptr [R14 + 0x18]
SUB RAX,qword ptr [R14 + 0x10]
LEA RBX,[R14 + 0x28]
SHR RAX,0x2
MOVSXD RSI,EAX
MOV RDI,RBX
CALL 0x00139690
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [R14 + 0x18]
SUB RCX,RAX
SHR RCX,0x2
TEST ECX,ECX
JLE 0x00171b7f
MOV RDX,qword ptr [RBX]
AND ECX,0x7fffffff
XOR ESI,ESI
XOR EDI,EDI
LAB_00171b71:
MOV dword ptr [RDX + RSI*0x4],EDI
ADD EDI,dword ptr [RAX + RSI*0x4]
INC RSI
CMP RCX,RSI
JNZ 0x00171b71
LAB_00171b7f:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize() */
void __thiscall
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize(StencilTableReal<float> *this)
{
long lVar1;
long lVar2;
uint uVar3;
ulong uVar4;
int iVar5;
shrinkToFit(this);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(this + 0x28),
(long)(int)((ulong)(*(long *)(this + 0x18) - *(long *)(this + 0x10)) >> 2));
lVar1 = *(long *)(this + 0x10);
uVar3 = (uint)((ulong)(*(long *)(this + 0x18) - lVar1) >> 2);
if (0 < (int)uVar3) {
lVar2 = *(long *)(this + 0x28);
uVar4 = 0;
iVar5 = 0;
do {
*(int *)(lVar2 + uVar4 * 4) = iVar5;
iVar5 = iVar5 + *(int *)(lVar1 + uVar4 * 4);
uVar4 = uVar4 + 1;
} while ((uVar3 & 0x7fffffff) != uVar4);
}
return;
}
|
|
61,518 |
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/stencilTable.h
|
inline void
StencilTableReal<REAL>::finalize() {
shrinkToFit();
generateOffsets();
}
|
O3
|
c
|
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3b7d0
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x28(%r14), %rbx
shrq $0x2, %rax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x39670
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x7316f
movq (%rbx), %rdx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %edi, %edi
movl %edi, (%rdx,%rsi,4)
addl (%rax,%rsi,4), %edi
incq %rsi
cmpq %rsi, %rcx
jne 0x73161
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIfE8finalizeEv:
push r14
push rbx
push rax
mov r14, rdi
call __ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIfE11shrinkToFitEv; OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::shrinkToFit(void)
mov rax, [r14+18h]
sub rax, [r14+10h]
lea rbx, [r14+28h]
shr rax, 2
movsxd rsi, eax
mov rdi, rbx
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r14+10h]
mov rcx, [r14+18h]
sub rcx, rax
shr rcx, 2
test ecx, ecx
jle short loc_7316F
mov rdx, [rbx]
and ecx, 7FFFFFFFh
xor esi, esi
xor edi, edi
loc_73161:
mov [rdx+rsi*4], edi
add edi, [rax+rsi*4]
inc rsi
cmp rcx, rsi
jnz short loc_73161
loc_7316F:
add rsp, 8
pop rbx
pop r14
retn
|
long long OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize(_QWORD *a1)
{
long long result; // rax
long long v2; // rdx
long long v3; // rcx
long long v4; // rsi
int v5; // edi
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::shrinkToFit(a1);
std::vector<int>::resize(a1 + 5, (int)((a1[3] - a1[2]) >> 2));
result = a1[2];
if ( (int)((unsigned long long)(a1[3] - result) >> 2) > 0 )
{
v2 = a1[5];
v3 = ((unsigned long long)(a1[3] - result) >> 2) & 0x7FFFFFFF;
v4 = 0LL;
v5 = 0;
do
{
*(_DWORD *)(v2 + 4 * v4) = v5;
v5 += *(_DWORD *)(result + 4 * v4++);
}
while ( v3 != v4 );
}
return result;
}
|
finalize:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
CALL 0x0013b7d0
MOV RAX,qword ptr [R14 + 0x18]
SUB RAX,qword ptr [R14 + 0x10]
LEA RBX,[R14 + 0x28]
SHR RAX,0x2
MOVSXD RSI,EAX
MOV RDI,RBX
CALL 0x00139670
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [R14 + 0x18]
SUB RCX,RAX
SHR RCX,0x2
TEST ECX,ECX
JLE 0x0017316f
MOV RDX,qword ptr [RBX]
AND ECX,0x7fffffff
XOR ESI,ESI
XOR EDI,EDI
LAB_00173161:
MOV dword ptr [RDX + RSI*0x4],EDI
ADD EDI,dword ptr [RAX + RSI*0x4]
INC RSI
CMP RCX,RSI
JNZ 0x00173161
LAB_0017316f:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize() */
void __thiscall
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::finalize(StencilTableReal<float> *this)
{
long lVar1;
long lVar2;
uint uVar3;
ulong uVar4;
int iVar5;
shrinkToFit(this);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(this + 0x28),
(long)(int)((ulong)(*(long *)(this + 0x18) - *(long *)(this + 0x10)) >> 2));
lVar1 = *(long *)(this + 0x10);
uVar3 = (uint)((ulong)(*(long *)(this + 0x18) - lVar1) >> 2);
if (0 < (int)uVar3) {
lVar2 = *(long *)(this + 0x28);
uVar4 = 0;
iVar5 = 0;
do {
*(int *)(lVar2 + uVar4 * 4) = iVar5;
iVar5 = iVar5 + *(int *)(lVar1 + uVar4 * 4);
uVar4 = uVar4 + 1;
} while ((uVar3 & 0x7fffffff) != uVar4);
}
return;
}
|
|
61,519 |
mbedtls_cipher_aead_encrypt
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher.c
|
static int mbedtls_cipher_aead_encrypt(mbedtls_cipher_context_t *ctx,
const unsigned char *iv, size_t iv_len,
const unsigned char *ad, size_t ad_len,
const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen,
unsigned char *tag, size_t tag_len)
{
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if (ctx->psa_enabled == 1) {
/* As in the non-PSA case, we don't check that
* a key has been set. If not, the key slot will
* still be in its default state of 0, which is
* guaranteed to be invalid, hence the PSA-call
* below will gracefully fail. */
mbedtls_cipher_context_psa * const cipher_psa =
(mbedtls_cipher_context_psa *) ctx->cipher_ctx;
psa_status_t status;
/* PSA Crypto API always writes the authentication tag
* at the end of the encrypted message. */
if (output == NULL || tag != output + ilen) {
return MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
}
status = psa_aead_encrypt(cipher_psa->slot,
cipher_psa->alg,
iv, iv_len,
ad, ad_len,
input, ilen,
output, ilen + tag_len, olen);
if (status != PSA_SUCCESS) {
return MBEDTLS_ERR_CIPHER_HW_ACCEL_FAILED;
}
*olen -= tag_len;
return 0;
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */
#if defined(MBEDTLS_GCM_C)
if (MBEDTLS_MODE_GCM == ctx->cipher_info->mode) {
*olen = ilen;
return mbedtls_gcm_crypt_and_tag(ctx->cipher_ctx, MBEDTLS_GCM_ENCRYPT,
ilen, iv, iv_len, ad, ad_len,
input, output, tag_len, tag);
}
#endif /* MBEDTLS_GCM_C */
#if defined(MBEDTLS_CCM_C)
if (MBEDTLS_MODE_CCM == ctx->cipher_info->mode) {
*olen = ilen;
return mbedtls_ccm_encrypt_and_tag(ctx->cipher_ctx, ilen,
iv, iv_len, ad, ad_len, input, output,
tag, tag_len);
}
#endif /* MBEDTLS_CCM_C */
#if defined(MBEDTLS_CHACHAPOLY_C)
if (MBEDTLS_CIPHER_CHACHA20_POLY1305 == ctx->cipher_info->type) {
/* ChachaPoly has fixed length nonce and MAC (tag) */
if ((iv_len != ctx->cipher_info->iv_size) ||
(tag_len != 16U)) {
return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA;
}
*olen = ilen;
return mbedtls_chachapoly_encrypt_and_tag(ctx->cipher_ctx,
ilen, iv, ad, ad_len, input, output, tag);
}
#endif /* MBEDTLS_CHACHAPOLY_C */
return MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
}
|
O3
|
c
|
mbedtls_cipher_aead_encrypt:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r11
movq %r8, %r10
movq %rcx, %r9
movq %rdx, %r8
movq %rsi, %rcx
movq 0x50(%rsp), %r15
movq 0x48(%rsp), %r14
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %rdx
movq (%rdi), %r12
movl 0x4(%r12), %eax
cmpl $0x8, %eax
je 0x9aeaa
cmpl $0x6, %eax
jne 0x9aed2
movq %rdx, (%rsi)
movq 0x50(%rdi), %rdi
subq $0x8, %rsp
movl $0x1, %esi
pushq %r14
pushq %r15
pushq %rbx
pushq %r11
pushq %r10
callq 0x9d06a
addq $0x38, %rsp
jmp 0x9af1b
movq %rdx, (%rsi)
movq 0x50(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movq %r9, %r8
movq %r10, %r9
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
callq 0x9f77d
addq $0x28, %rsp
jmp 0x9af1b
movl $0xffff9f80, %eax # imm = 0xFFFF9F80
cmpl $0x49, (%r12)
jne 0x9af17
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
cmpq $0x10, %r15
jne 0x9af17
movl 0x18(%r12), %r15d
cmpq %r8, %r15
jne 0x9af17
movq %rdx, (%rsi)
movq 0x50(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r9, %rcx
movq %r10, %r8
movq %r11, %r9
pushq %r14
pushq %rbx
callq 0xa0441
addq $0x18, %rsp
jmp 0x9af1b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
mbedtls_cipher_aead_encrypt:
push r15
push r14
push r12
push rbx
push rax
mov r11, r9
mov r10, r8
mov r9, rcx
mov r8, rdx
mov rcx, rsi
mov r15, [rsp+28h+arg_20]
mov r14, [rsp+28h+arg_18]
mov rsi, [rsp+28h+arg_10]
mov rbx, [rsp+28h+arg_8]
mov rdx, [rsp+28h+arg_0]
mov r12, [rdi]
mov eax, [r12+4]
cmp eax, 8
jz short loc_9AEAA
cmp eax, 6
jnz short loc_9AED2
mov [rsi], rdx
mov rdi, [rdi+50h]
sub rsp, 8
mov esi, 1
push r14
push r15
push rbx
push r11
push r10
call mbedtls_gcm_crypt_and_tag
add rsp, 38h
jmp short loc_9AF1B
loc_9AEAA:
mov [rsi], rdx
mov rdi, [rdi+50h]
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
mov r8, r9
mov r9, r10
push r15
push r14
push rbx
push r11
call mbedtls_ccm_encrypt_and_tag
add rsp, 28h
jmp short loc_9AF1B
loc_9AED2:
mov eax, 0FFFF9F80h
cmp dword ptr [r12], 49h ; 'I'
jnz short loc_9AF17
mov eax, 0FFFF9F00h
cmp r15, 10h
jnz short loc_9AF17
mov r15d, [r12+18h]
cmp r15, r8
jnz short loc_9AF17
mov [rsi], rdx
mov rdi, [rdi+50h]
mov rsi, rdx
mov rdx, rcx
mov rcx, r9
mov r8, r10
mov r9, r11
push r14
push rbx
call mbedtls_chachapoly_encrypt_and_tag
add rsp, 18h
jmp short loc_9AF1B
loc_9AF17:
add rsp, 8
loc_9AF1B:
pop rbx
pop r12
pop r14
pop r15
retn
|
long long mbedtls_cipher_aead_encrypt(
_QWORD *a1,
int a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8,
_QWORD *a9,
long long a10,
long long a11)
{
_DWORD *v11; // r12
int v12; // eax
long long result; // rax
__int128 v14; // [rsp-18h] [rbp-38h]
v11 = (_DWORD *)*a1;
v12 = *(_DWORD *)(*a1 + 4LL);
if ( v12 == 8 )
{
*a9 = a7;
return mbedtls_ccm_encrypt_and_tag(a1[10], a7, a2, a3, a4, a5, a6, a8, a10, a11);
}
else if ( v12 == 6 )
{
*a9 = a7;
return mbedtls_gcm_crypt_and_tag(a1[10], 1, a7, a2, a3, a4, a5, a6, a8, a11, a10);
}
else
{
result = 4294942592LL;
if ( *v11 == 73 )
{
result = 4294942464LL;
if ( a11 == 16 && v11[6] == a3 )
{
*a9 = a7;
*((_QWORD *)&v14 + 1) = a10;
*(_QWORD *)&v14 = a8;
return mbedtls_chachapoly_encrypt_and_tag(a1[10], a7, a2, a4, a5, a6, v14);
}
}
}
return result;
}
|
mbedtls_cipher_aead_encrypt:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R11,R9
MOV R10,R8
MOV R9,RCX
MOV R8,RDX
MOV RCX,RSI
MOV R15,qword ptr [RSP + 0x50]
MOV R14,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RBX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x30]
MOV R12,qword ptr [RDI]
MOV EAX,dword ptr [R12 + 0x4]
CMP EAX,0x8
JZ 0x0019aeaa
CMP EAX,0x6
JNZ 0x0019aed2
MOV qword ptr [RSI],RDX
MOV RDI,qword ptr [RDI + 0x50]
SUB RSP,0x8
MOV ESI,0x1
PUSH R14
PUSH R15
PUSH RBX
PUSH R11
PUSH R10
CALL 0x0019d06a
ADD RSP,0x38
JMP 0x0019af1b
LAB_0019aeaa:
MOV qword ptr [RSI],RDX
MOV RDI,qword ptr [RDI + 0x50]
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
MOV R8,R9
MOV R9,R10
PUSH R15
PUSH R14
PUSH RBX
PUSH R11
CALL 0x0019f77d
ADD RSP,0x28
JMP 0x0019af1b
LAB_0019aed2:
MOV EAX,0xffff9f80
CMP dword ptr [R12],0x49
JNZ 0x0019af17
MOV EAX,0xffff9f00
CMP R15,0x10
JNZ 0x0019af17
MOV R15D,dword ptr [R12 + 0x18]
CMP R15,R8
JNZ 0x0019af17
MOV qword ptr [RSI],RDX
MOV RDI,qword ptr [RDI + 0x50]
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R9
MOV R8,R10
MOV R9,R11
PUSH R14
PUSH RBX
CALL 0x001a0441
ADD RSP,0x18
JMP 0x0019af1b
LAB_0019af17:
ADD RSP,0x8
LAB_0019af1b:
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
mbedtls_cipher_aead_encrypt
(int8 *param_1,int8 param_2,ulong param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 *param_9,int8 param_10,long param_11)
{
int *piVar1;
int8 uVar2;
piVar1 = (int *)*param_1;
if (piVar1[1] == 8) {
*param_9 = param_7;
uVar2 = mbedtls_ccm_encrypt_and_tag
(param_1[10],param_7,param_2,param_3,param_4,param_5,param_6,param_8,param_10,
param_11);
}
else if (piVar1[1] == 6) {
*param_9 = param_7;
uVar2 = mbedtls_gcm_crypt_and_tag(param_1[10],1);
}
else {
uVar2 = 0xffff9f80;
if (((*piVar1 == 0x49) && (uVar2 = 0xffff9f00, param_11 == 0x10)) &&
((uint)piVar1[6] == param_3)) {
*param_9 = param_7;
uVar2 = mbedtls_chachapoly_encrypt_and_tag
(param_1[10],param_7,param_2,param_4,param_5,param_6,param_8,param_10);
}
}
return uVar2;
}
|
|
61,520 |
my_numchars_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
}
|
O0
|
c
|
my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5c100
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x589cc
jmp 0x589e6
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x589ac
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
|
my_numchars_utf16:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_589AC:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_1
mov eax, eax
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_589CC
jmp short loc_589E6
loc_589CC:
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_589AC
loc_589E6:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
|
long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long i; // [rsp+10h] [rbp-20h]
for ( i = 0LL; ; ++i )
{
v3 = my_ismbchar_1(a1, a2, a3);
if ( !v3 )
break;
a2 += v3;
}
return i;
}
|
my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_001589ac:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0015c100
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001589cc
JMP 0x001589e6
LAB_001589cc:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001589ac
LAB_001589e6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_utf16(int8 param_1,long param_2,int8 param_3)
{
uint uVar1;
int8 local_28;
int8 local_18;
local_28 = 0;
local_18 = param_2;
while( true ) {
uVar1 = my_ismbchar(param_1,local_18,param_3);
if ((ulong)uVar1 == 0) break;
local_18 = (ulong)uVar1 + local_18;
local_28 = local_28 + 1;
}
return local_28;
}
|
|
61,521 |
dirname_length
|
eloqsql/mysys/mf_dirname.c
|
size_t dirname_length(const char *name)
{
register char *pos, *gpos;
#ifdef BASKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
#ifdef FN_DEVCHAR
if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0)
#endif
pos=(char*) name-1;
gpos= pos++;
for ( ; *pos ; pos++) /* Find last FN_LIBCHAR */
{
#ifdef BASKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3)))
{
pos+= l - 1;
continue;
}
#endif
if (*pos == FN_LIBCHAR || *pos == '/')
gpos=pos;
}
return (size_t) (gpos+1-(char*) name);
}
|
O0
|
c
|
dirname_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2e100
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x2e0e8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2e0f0
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2e0f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2e0c7
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
dirname_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov [rbp+var_18], rax
loc_2E0C7:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_2E100
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jz short loc_2E0E8
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2E0F0
loc_2E0E8:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_2E0F0:
jmp short $+2
loc_2E0F2:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_2E0C7
loc_2E100:
mov rax, [rbp+var_18]
add rax, 1
mov rcx, [rbp+var_8]
sub rax, rcx
pop rbp
retn
|
long long dirname_length(_BYTE *a1)
{
_BYTE *v2; // [rsp+0h] [rbp-18h]
_BYTE *v3; // [rsp+8h] [rbp-10h]
v3 = a1;
v2 = a1 - 1;
while ( *v3 )
{
if ( *v3 == 47 )
v2 = v3;
++v3;
}
return v2 + 1 - a1;
}
|
dirname_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_0012e0c7:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0012e100
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JZ 0x0012e0e8
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012e0f0
LAB_0012e0e8:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012e0f0:
JMP 0x0012e0f2
LAB_0012e0f2:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0012e0c7
LAB_0012e100:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
POP RBP
RET
|
char * dirname_length(char *param_1)
{
char *local_20;
char *local_18;
local_20 = param_1 + -1;
for (local_18 = param_1; *local_18 != '\0'; local_18 = local_18 + 1) {
if ((*local_18 == '/') || (*local_18 == '/')) {
local_20 = local_18;
}
}
return local_20 + (1 - (long)param_1);
}
|
|
61,522 |
my_wc_mb_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
int count;
if (r >= e)
return MY_CS_TOOSMALL;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else return MY_CS_ILUNI;
if (r + count > e)
return MY_CS_TOOSMALLN(count);
switch (count) {
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
}
|
O0
|
c
|
my_wc_mb_utf8mb4:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x5d20a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x5d356
cmpq $0x80, -0x18(%rbp)
jae 0x5d21d
movl $0x1, -0x2c(%rbp)
jmp 0x5d268
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x5d230
movl $0x2, -0x2c(%rbp)
jmp 0x5d266
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x5d243
movl $0x3, -0x2c(%rbp)
jmp 0x5d264
cmpq $0x200000, -0x18(%rbp) # imm = 0x200000
jae 0x5d256
movl $0x4, -0x2c(%rbp)
jmp 0x5d262
movl $0x0, -0x4(%rbp)
jmp 0x5d356
jmp 0x5d264
jmp 0x5d266
jmp 0x5d268
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
jbe 0x5d289
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
subl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5d356
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x3, %eax
ja 0x5d350
movq -0x38(%rbp), %rax
leaq 0x14f978(%rip), %rcx # 0x1acc20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x800, %rax # imm = 0x800
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0xc0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_wc_mb_utf8mb4:
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 rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_5D20A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_5D356
loc_5D20A:
cmp [rbp+var_18], 80h
jnb short loc_5D21D
mov [rbp+var_2C], 1
jmp short loc_5D268
loc_5D21D:
cmp [rbp+var_18], 800h
jnb short loc_5D230
mov [rbp+var_2C], 2
jmp short loc_5D266
loc_5D230:
cmp [rbp+var_18], 10000h
jnb short loc_5D243
mov [rbp+var_2C], 3
jmp short loc_5D264
loc_5D243:
cmp [rbp+var_18], offset unk_200000
jnb short loc_5D256
mov [rbp+var_2C], 4
jmp short loc_5D262
loc_5D256:
mov [rbp+var_4], 0
jmp loc_5D356
loc_5D262:
jmp short $+2
loc_5D264:
jmp short $+2
loc_5D266:
jmp short $+2
loc_5D268:
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_2C]
add rax, rcx
cmp rax, [rbp+var_28]
jbe short loc_5D289
mov eax, 0FFFFFF9Ch
sub eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp loc_5D356
loc_5D289:
mov eax, [rbp+var_2C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 3
ja def_5D2AF; jumptable 000000000005D2AF default case
mov rax, [rbp+var_38]
lea rcx, jpt_5D2AF
movsxd rax, ds:(jpt_5D2AF - 1ACC20h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5D2B1:
mov rax, [rbp+var_18]; jumptable 000000000005D2AF case 4
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+3], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 10000h
mov [rbp+var_18], rax
loc_5D2E2:
mov rax, [rbp+var_18]; jumptable 000000000005D2AF case 3
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 800h
mov [rbp+var_18], rax
loc_5D313:
mov rax, [rbp+var_18]; jumptable 000000000005D2AF case 2
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 0C0h
mov [rbp+var_18], rax
loc_5D344:
mov rax, [rbp+var_18]; jumptable 000000000005D2AF case 1
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
def_5D2AF:
mov eax, [rbp+var_2C]; jumptable 000000000005D2AF default case
mov [rbp+var_4], eax
loc_5D356:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+Ch] [rbp-2Ch]
unsigned long long v6; // [rsp+20h] [rbp-18h]
v6 = a2;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= 0x10000 )
{
if ( a2 >= (unsigned long long)&unk_200000 )
return 0;
v5 = 4;
}
else
{
v5 = 3;
}
}
else
{
v5 = 2;
}
}
else
{
v5 = 1;
}
if ( (unsigned long long)&a3[v5] <= a4 )
{
switch ( v5 )
{
case 1:
goto LABEL_18;
case 2:
goto LABEL_17;
case 3:
goto LABEL_16;
case 4:
a3[3] = a2 & 0x3F | 0x80;
v6 = (a2 >> 6) | 0x10000;
LABEL_16:
a3[2] = v6 & 0x3F | 0x80;
v6 = (v6 >> 6) | 0x800;
LABEL_17:
a3[1] = v6 & 0x3F | 0x80;
v6 = (v6 >> 6) | 0xC0;
LABEL_18:
*a3 = v6;
break;
default:
break;
}
return (unsigned int)v5;
}
else
{
return (unsigned int)(-100 - v5);
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_utf8mb4:
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 RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0015d20a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0015d356
LAB_0015d20a:
CMP qword ptr [RBP + -0x18],0x80
JNC 0x0015d21d
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0015d268
LAB_0015d21d:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x0015d230
MOV dword ptr [RBP + -0x2c],0x2
JMP 0x0015d266
LAB_0015d230:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x0015d243
MOV dword ptr [RBP + -0x2c],0x3
JMP 0x0015d264
LAB_0015d243:
CMP qword ptr [RBP + -0x18],0x200000
JNC 0x0015d256
MOV dword ptr [RBP + -0x2c],0x4
JMP 0x0015d262
LAB_0015d256:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015d356
LAB_0015d262:
JMP 0x0015d264
LAB_0015d264:
JMP 0x0015d266
LAB_0015d266:
JMP 0x0015d268
LAB_0015d268:
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0015d289
MOV EAX,0xffffff9c
SUB EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d356
LAB_0015d289:
MOV EAX,dword ptr [RBP + -0x2c]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0x3
JA 0x0015d350
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x2acc20]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x800
MOV qword ptr [RBP + -0x18],RAX
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0xc0
MOV qword ptr [RBP + -0x18],RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
default:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0015d356:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_wc_mb_utf8mb4(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int local_34;
ulong local_20;
int local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
local_34 = 1;
}
else if (param_2 < 0x800) {
local_34 = 2;
}
else if (param_2 < 0x10000) {
local_34 = 3;
}
else {
if (0x1fffff < param_2) {
return 0;
}
local_34 = 4;
}
if (param_4 < param_3 + local_34) {
local_c = -100 - local_34;
}
else {
local_20 = param_2;
switch(local_34) {
case 4:
param_3[3] = (byte)param_2 & 0x3f | 0x80;
local_20 = param_2 >> 6 | 0x10000;
case 3:
param_3[2] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0x800;
case 2:
param_3[1] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0xc0;
case 1:
*param_3 = (char)local_20;
default:
local_c = local_34;
}
}
}
else {
local_c = -0x65;
}
return local_c;
}
|
|
61,523 |
my_strnncoll_simple
|
eloqsql/strings/ctype-simple.c
|
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
}
|
O3
|
c
|
my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %r10
cmovbq %rdx, %r10
movq 0x58(%rdi), %rdi
testb %r9b, %r9b
cmovneq %r10, %rdx
xorl %r9d, %r9d
cmpq %r9, %r10
je 0xb4daa
movzbl (%rsi,%r9), %eax
movzbl (%rdi,%rax), %eax
movzbl (%rcx,%r9), %r11d
movzbl (%rdi,%r11), %r11d
incq %r9
cmpb %r11b, %al
je 0xb4d85
subl %r11d, %eax
jmp 0xb4dbc
xorl %ecx, %ecx
cmpq %r8, %rdx
sbbl %ecx, %ecx
cmpq %r8, %rdx
movl $0x1, %eax
cmovbel %ecx, %eax
popq %rbp
retq
|
my_strnncoll_simple:
push rbp
mov rbp, rsp
cmp rdx, r8
mov r10, r8
cmovb r10, rdx
mov rdi, [rdi+58h]
test r9b, r9b
cmovnz rdx, r10
xor r9d, r9d
loc_B4D85:
cmp r10, r9
jz short loc_B4DAA
movzx eax, byte ptr [rsi+r9]
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx+r9]
movzx r11d, byte ptr [rdi+r11]
inc r9
cmp al, r11b
jz short loc_B4D85
sub eax, r11d
jmp short loc_B4DBC
loc_B4DAA:
xor ecx, ecx
cmp rdx, r8
sbb ecx, ecx
cmp rdx, r8
mov eax, 1
cmovbe eax, ecx
loc_B4DBC:
pop rbp
retn
|
long long my_strnncoll_simple(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v6; // r10
long long v7; // rdi
long long v8; // r9
int v9; // eax
int v10; // r11d
long long result; // rax
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = *(_QWORD *)(a1 + 88);
if ( a6 )
a3 = v6;
v8 = 0LL;
while ( v6 != v8 )
{
v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8));
v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++));
if ( (_BYTE)v9 != (_BYTE)v10 )
return (unsigned int)(v9 - v10);
}
result = 1LL;
if ( a3 <= a5 )
return (unsigned int)-(a3 < a5);
return result;
}
|
my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV R10,R8
CMOVC R10,RDX
MOV RDI,qword ptr [RDI + 0x58]
TEST R9B,R9B
CMOVNZ RDX,R10
XOR R9D,R9D
LAB_001b4d85:
CMP R10,R9
JZ 0x001b4daa
MOVZX EAX,byte ptr [RSI + R9*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX + R9*0x1]
MOVZX R11D,byte ptr [RDI + R11*0x1]
INC R9
CMP AL,R11B
JZ 0x001b4d85
SUB EAX,R11D
JMP 0x001b4dbc
LAB_001b4daa:
XOR ECX,ECX
CMP RDX,R8
SBB ECX,ECX
CMP RDX,R8
MOV EAX,0x1
CMOVBE EAX,ECX
LAB_001b4dbc:
POP RBP
RET
|
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5,
char param_6)
{
byte bVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
uVar4 = param_5;
if (param_3 < param_5) {
uVar4 = param_3;
}
if (param_6 != '\0') {
param_3 = uVar4;
}
uVar3 = 0;
do {
if (uVar4 == uVar3) {
if (param_5 < param_3) {
return 1;
}
return -(uint)(param_3 < param_5);
}
bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3));
bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3));
uVar3 = uVar3 + 1;
} while (bVar1 == bVar2);
return (uint)bVar1 - (uint)bVar2;
}
|
|
61,524 |
my_mb_wc_sjis
|
eloqsql/strings/ctype-sjis.c
|
static int
my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= sjis_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]]))
return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
}
|
O0
|
c
|
my_mb_wc_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x7d75a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x7d8b8
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x7d782
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7d8b8
cmpl $0xa1, -0x2c(%rbp)
jl 0x7d7b8
cmpl $0xdf, -0x2c(%rbp)
jg 0x7d7b8
movslq -0x2c(%rbp), %rcx
leaq 0x243a81(%rip), %rax # 0x2c1220
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7d8b8
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x7d7d2
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x7d8b8
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x243a34(%rip), %rax # 0x2c1220
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x7d8b1
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x7d81d
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0x9f, %eax
jle 0x7d844
movl -0x2c(%rbp), %eax
movzbl %al, %edx
xorl %eax, %eax
movl $0xe0, %ecx
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0x7d89c
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0xfc, %ecx
movb %al, -0x2d(%rbp)
jg 0x7d89c
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x7d867
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x7e, %ecx
movb %al, -0x2e(%rbp)
jle 0x7d896
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %edx
xorl %eax, %eax
movl $0x80, %ecx
cmpl %edx, %ecx
movb %al, -0x2f(%rbp)
jg 0x7d890
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfc, %eax
setle %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
xorl %eax, %eax
movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x7d8b8
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
my_mb_wc_sjis:
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 rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_7D75A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_7D8B8
loc_7D75A:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_7D782
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_7D8B8
loc_7D782:
cmp [rbp+var_2C], 0A1h
jl short loc_7D7B8
cmp [rbp+var_2C], 0DFh
jg short loc_7D7B8
movsxd rcx, [rbp+var_2C]
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_7D8B8
loc_7D7B8:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_7D7D2
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_7D8B8
loc_7D7D2:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz loc_7D8B1
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 81h
cmp eax, ecx
jg short loc_7D81D
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 9Fh
jle short loc_7D844
loc_7D81D:
mov eax, [rbp+var_2C]
movzx edx, al
xor eax, eax
mov ecx, 0E0h
cmp ecx, edx
mov [rbp+var_2D], al
jg short loc_7D89C
mov eax, [rbp+var_2C]
movzx ecx, al
xor eax, eax
cmp ecx, 0FCh
mov [rbp+var_2D], al
jg short loc_7D89C
loc_7D844:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_7D867
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 7Eh ; '~'
mov [rbp+var_2E], al
jle short loc_7D896
loc_7D867:
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+1]
xor eax, eax
mov ecx, 80h
cmp ecx, edx
mov [rbp+var_2F], al
jg short loc_7D890
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FCh
setle al
mov [rbp+var_2F], al
loc_7D890:
mov al, [rbp+var_2F]
mov [rbp+var_2E], al
loc_7D896:
mov al, [rbp+var_2E]
mov [rbp+var_2D], al
loc_7D89C:
mov dl, [rbp+var_2D]
xor eax, eax
mov ecx, 0FFFFFFFEh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_7D8B8
loc_7D8B1:
mov [rbp+var_4], 2
loc_7D8B8:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
bool v7; // [rsp+1h] [rbp-2Fh]
char v8; // [rsp+2h] [rbp-2Eh]
char v9; // [rsp+3h] [rbp-2Dh]
unsigned int v10; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v10 = *a3;
if ( v10 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 > 0xDFu )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = sjis_to_unicode[a3[1] + (v10 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu
|| (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) )
{
if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) )
{
v7 = 0;
if ( a3[1] >= 0x80u )
v7 = a3[1] <= 0xFCu;
v8 = v7;
}
v9 = v8;
}
v5 = 0;
if ( (v9 & 1) != 0 )
return (unsigned int)-2;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = sjis_to_unicode[*a3];
return 1;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_sjis:
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 RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0017d75a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0017d8b8
LAB_0017d75a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x0017d782
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0017d8b8
LAB_0017d782:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x0017d7b8
CMP dword ptr [RBP + -0x2c],0xdf
JG 0x0017d7b8
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x3c1220]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0017d8b8
LAB_0017d7b8:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0017d7d2
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0017d8b8
LAB_0017d7d2:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3c1220]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x0017d8b1
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0x81
CMP EAX,ECX
JG 0x0017d81d
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0x9f
JLE 0x0017d844
LAB_0017d81d:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EDX,AL
XOR EAX,EAX
MOV ECX,0xe0
CMP ECX,EDX
MOV byte ptr [RBP + -0x2d],AL
JG 0x0017d89c
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
XOR EAX,EAX
CMP ECX,0xfc
MOV byte ptr [RBP + -0x2d],AL
JG 0x0017d89c
LAB_0017d844:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x0017d867
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0x7e
MOV byte ptr [RBP + -0x2e],AL
JLE 0x0017d896
LAB_0017d867:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x1]
XOR EAX,EAX
MOV ECX,0x80
CMP ECX,EDX
MOV byte ptr [RBP + -0x2f],AL
JG 0x0017d890
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfc
SETLE AL
MOV byte ptr [RBP + -0x2f],AL
LAB_0017d890:
MOV AL,byte ptr [RBP + -0x2f]
MOV byte ptr [RBP + -0x2e],AL
LAB_0017d896:
MOV AL,byte ptr [RBP + -0x2e]
MOV byte ptr [RBP + -0x2d],AL
LAB_0017d89c:
MOV DL,byte ptr [RBP + -0x2d]
XOR EAX,EAX
MOV ECX,0xfffffffe
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017d8b8
LAB_0017d8b1:
MOV dword ptr [RBP + -0x4],0x2
LAB_0017d8b8:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xdf < uVar3)) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)(sjis_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
if ((((0x80 < uVar3) && (uVar3 < 0xa0)) ||
((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) &&
(((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) &&
(bVar2 = false, 0x7f < param_3[1])))) {
bVar2 = param_3[1] < 0xfd;
}
local_c = 0;
if (bVar2) {
local_c = 0xfffffffe;
}
}
else {
local_c = 2;
}
}
}
else {
*param_2 = (ulong)*(ushort *)(sjis_to_unicode + (long)(int)uVar3 * 2);
local_c = 1;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
61,525 |
nglog::LogDestination::RemoveLogSink(nglog::LogSink*)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::RemoveLogSink(LogSink* destination) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
SinkLock l{sink_mutex_};
// This doesn't keep the sinks in order, but who cares?
if (sinks_) {
sinks_->erase(std::remove(sinks_->begin(), sinks_->end(), destination),
sinks_->end());
}
}
|
O2
|
cpp
|
nglog::LogDestination::RemoveLogSink(nglog::LogSink*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x214ad(%rip), %rdi # 0x31cb8
callq 0x1cce6
movq 0x21499(%rip), %rbx # 0x31cb0
testq %rbx, %rbx
je 0x10843
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdx
callq 0x11620
movq 0x2147c(%rip), %rcx # 0x31cb0
movq 0x8(%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x115cc
leaq 0x2146e(%rip), %rdi # 0x31cb8
callq 0x87a0
addq $0x10, %rsp
popq %rbx
retq
jmp 0x10857
movq %rax, %rbx
leaq 0x21457(%rip), %rdi # 0x31cb8
callq 0x87a0
movq %rbx, %rdi
callq 0x8a40
|
_ZN5nglog14LogDestination13RemoveLogSinkEPNS_7LogSinkE:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this
call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void)
mov rbx, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test rbx, rbx
jz short loc_10843
mov rdi, [rbx]
mov rsi, [rbx+8]
lea rdx, [rsp+18h+var_10]
call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPN5nglog7LogSinkESt6vectorIS4_SaIS4_EEEENS0_5__ops16_Iter_equals_valIKS4_EEET_SE_SE_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>)
mov rcx, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov rdx, [rcx+8]
mov rdi, rbx
mov rsi, rax
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EES9_; std::vector<nglog::LogSink *>::erase(__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink * const*,std::vector<nglog::LogSink *>>)
loc_10843:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
retn
jmp short $+2
loc_10857:
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::LogDestination::RemoveLogSink(nglog::LogDestination *this, nglog::LogSink *a2)
{
long long v2; // rbx
long long v3; // rax
nglog::LogDestination *v5; // [rsp+8h] [rbp-10h] BYREF
v5 = this;
std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
v2 = nglog::LogDestination::sinks_;
if ( nglog::LogDestination::sinks_ )
{
v3 = std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(
*(_QWORD *)nglog::LogDestination::sinks_,
*(_QWORD *)(nglog::LogDestination::sinks_ + 8),
&v5);
std::vector<nglog::LogSink *>::erase(v2, v3, *(_QWORD *)(nglog::LogDestination::sinks_ + 8));
}
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
|
RemoveLogSink:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x131cb8]
CALL 0x0011cce6
MOV RBX,qword ptr [0x00131cb0]
TEST RBX,RBX
JZ 0x00110843
MOV RDI,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x8]
LAB_00110823:
LEA RDX,[RSP + 0x8]
CALL 0x00111620
MOV RCX,qword ptr [0x00131cb0]
MOV RDX,qword ptr [RCX + 0x8]
LAB_00110838:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001115cc
LAB_00110843:
LEA RDI,[0x131cb8]
CALL 0x001087a0
ADD RSP,0x10
POP RBX
RET
|
/* nglog::LogDestination::RemoveLogSink(nglog::LogSink*) */
void nglog::LogDestination::RemoveLogSink(LogSink *param_1)
{
int8 uVar1;
vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *pvVar2;
LogSink *local_10;
local_10 = param_1;
std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_);
pvVar2 = sinks_;
if (sinks_ != (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) {
/* try { // try from 00110823 to 0011082c has its CatchHandler @ 00110857 */
uVar1 = std::
__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink**,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink*const>>
(*(int8 *)sinks_,*(int8 *)(sinks_ + 8),&local_10);
/* try { // try from 00110838 to 00110842 has its CatchHandler @ 00110855 */
std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::erase
(pvVar2,uVar1,*(int8 *)(sinks_ + 8));
}
pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_);
return;
}
|
|
61,526 |
insert_sql_functions()
|
eloqsql/sql/gen_lex_hash.cc
|
void insert_sql_functions()
{
int i= 0;
SYMBOL *cur;
for (cur= sql_functions; i < (int) array_elements(sql_functions); cur++, i++)
{
hash_lex_struct *root=
get_hash_struct_by_len(&root_by_len,cur->length,&max_len);
insert_into_hash(root,cur->name,0,-i-1,1);
}
}
|
O3
|
cpp
|
insert_sql_functions():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x8842(%rip), %r12 # 0x13150
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
leaq 0x8cfe(%rip), %r14 # 0x13618
leaq 0x8cff(%rip), %r15 # 0x13620
movl 0xc(%r12), %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0xa21c
movq (%r12), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl %ebx, %ecx
callq 0xa3d1
addq $0x18, %r12
decl %ebx
cmpl $-0x33, %ebx
jne 0xa921
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_Z20insert_sql_functionsv:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
lea r12, sql_functions
mov ebx, 0FFFFFFFFh
lea r14, root_by_len
lea r15, max_len
loc_A921:
mov esi, [r12+0Ch]
mov rdi, r14
mov rdx, r15
call _Z22get_hash_struct_by_lenPP15hash_lex_structiPi; get_hash_struct_by_len(hash_lex_struct **,int,int *)
mov rsi, [r12]
mov rdi, rax
xor edx, edx
mov ecx, ebx
call _Z16insert_into_hashP15hash_lex_structPKciii; insert_into_hash(hash_lex_struct *,char const*,int,int,int)
add r12, 18h
dec ebx
cmp ebx, 0FFFFFFCDh
jnz short loc_A921
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long insert_sql_functions(void)
{
char **v0; // r12
unsigned int i; // ebx
long long hash_struct_by_len; // rax
long long result; // rax
v0 = &sql_functions;
for ( i = -1; i != -51; --i )
{
hash_struct_by_len = get_hash_struct_by_len(&root_by_len, *((_DWORD *)v0 + 3), &max_len);
result = insert_into_hash(hash_struct_by_len, *v0, 0, i);
v0 += 3;
}
return result;
}
|
insert_sql_functions:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
LEA R12,[0x113150]
MOV EBX,0xffffffff
LEA R14,[0x113618]
LEA R15,[0x113620]
LAB_0010a921:
MOV ESI,dword ptr [R12 + 0xc]
MOV RDI,R14
MOV RDX,R15
CALL 0x0010a21c
MOV RSI,qword ptr [R12]
MOV RDI,RAX
XOR EDX,EDX
MOV ECX,EBX
CALL 0x0010a3d1
ADD R12,0x18
DEC EBX
CMP EBX,-0x33
JNZ 0x0010a921
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* insert_sql_functions() */
void insert_sql_functions(void)
{
hash_lex_struct *phVar1;
int iVar2;
int in_R8D;
int **ppuVar3;
ppuVar3 = &sql_functions;
iVar2 = -1;
do {
phVar1 = (hash_lex_struct *)
get_hash_struct_by_len
((hash_lex_struct **)&root_by_len,*(int *)((long)ppuVar3 + 0xc),&max_len);
insert_into_hash(phVar1,*ppuVar3,0,iVar2,in_R8D);
ppuVar3 = ppuVar3 + 3;
iVar2 = iVar2 + -1;
} while (iVar2 != -0x33);
return;
}
|
|
61,527 |
lf_pinbox_real_free
|
eloqsql/mysys/lf_alloc-pin.c
|
static void lf_pinbox_real_free(LF_PINS *pins)
{
int npins;
void *list;
void **addr= NULL;
void *first= NULL, *last= NULL;
struct st_my_thread_var *var= my_thread_var;
void *stack_ends_here= var ? var->stack_ends_here : NULL;
LF_PINBOX *pinbox= pins->pinbox;
npins= pinbox->pins_in_array+1;
#ifdef HAVE_ALLOCA
if (stack_ends_here != NULL)
{
int alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins;
/* create a sorted list of pinned addresses, to speed up searches */
if (available_stack_size(&pinbox, stack_ends_here) >
alloca_size + ALLOCA_SAFETY_MARGIN)
{
struct st_harvester hv;
addr= (void **) alloca(alloca_size);
hv.granary= addr;
hv.npins= npins;
/* scan the dynarray and accumulate all pinned addresses */
lf_dynarray_iterate(&pinbox->pinarray,
(lf_dynarray_func)harvest_pins, &hv);
npins= (int)(hv.granary-addr);
/* and sort them */
if (npins)
qsort(addr, npins, sizeof(void *), (qsort_cmp)ptr_cmp);
}
}
#endif
list= pins->purgatory;
pins->purgatory= 0;
pins->purgatory_count= 0;
while (list)
{
void *cur= list;
list= *(void **)((char *)cur+pinbox->free_ptr_offset);
if (npins)
{
if (addr) /* use binary search */
{
void **a, **b, **c;
for (a= addr, b= addr+npins-1, c= a+(b-a)/2; (b-a) > 1; c= a+(b-a)/2)
if (cur == *c)
a= b= c;
else if (cur > *c)
a= c;
else
b= c;
if (cur == *a || cur == *b)
goto found;
}
else /* no alloca - no cookie. linear search here */
{
if (lf_dynarray_iterate(&pinbox->pinarray,
(lf_dynarray_func)match_pins, cur))
goto found;
}
}
/* not pinned - freeing */
if (last)
last= next_node(pinbox, last)= (uchar *)cur;
else
first= last= (uchar *)cur;
continue;
found:
/* pinned - keeping */
add_to_purgatory(pins, cur);
}
if (last)
pinbox->free_func(first, last, pinbox->free_func_arg);
}
|
O3
|
c
|
lf_pinbox_real_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0xc14ee
testq %rax, %rax
je 0xc5646
movq 0xb8(%rax), %rax
movq 0x20(%rbx), %rdi
movq %rdi, -0x38(%rbp)
movl 0x40(%rdi), %r8d
incl %r8d
testq %rax, %rax
je 0xc5655
movl %r8d, %ecx
shll $0x5, %ecx
leaq -0x38(%rbp), %rdx
subq %rdx, %rax
leal 0x2000(%rcx), %edx
movslq %edx, %rdx
cmpq %rdx, %rax
jle 0xc5655
movslq %ecx, %rax
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
leaq -0x70(%rbp), %r12
movq %r14, (%r12)
movl %r8d, 0x8(%r12)
leaq 0x38d(%rip), %rsi # 0xc599c
movq %r12, %rdx
callq 0xc5b65
movq (%r12), %r8
subq %r14, %r8
shrq $0x3, %r8
testl %r8d, %r8d
je 0xc5658
movslq %r8d, %rsi
leaq 0x3c3(%rip), %rcx # 0xc59f4
movl $0x8, %edx
movq %r14, %rdi
movq %r8, %r15
callq 0x2a640
movq %r15, %r8
jmp 0xc5658
movq 0x20(%rbx), %rax
movq %rax, -0x38(%rbp)
movl 0x40(%rax), %r8d
incl %r8d
xorl %r14d, %r14d
movq 0x28(%rbx), %r15
movq $0x0, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
testq %r15, %r15
je 0xc57a0
movslq %r8d, %rax
leaq (%r14,%rax,8), %r13
addq $-0x8, %r13
leaq -0x8(,%rax,8), %rcx
movq %rcx, %rax
sarq $0x3, %rax
movq %rcx, -0x60(%rbp)
shrq $0x3f, %rcx
addq %rax, %rcx
andq $-0x2, %rcx
leaq (%r14,%rcx,4), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
xorl %r10d, %r10d
movq %rbx, -0x58(%rbp)
movq %r14, -0x50(%rbp)
movq %r15, %r12
movq -0x38(%rbp), %rdi
movl 0x38(%rdi), %eax
movq (%r15,%rax), %r15
testl %r8d, %r8d
je 0xc5725
testq %r14, %r14
je 0xc573a
movq %r14, %rcx
movq %r13, %rax
cmpq $0x9, -0x60(%rbp)
jl 0xc571b
movq -0x48(%rbp), %rdx
movq %r13, %rax
movq %r14, %rcx
cmpq (%rdx), %r12
cmovbeq %rdx, %rax
cmovaeq %rdx, %rcx
cmoveq %rdx, %rax
movq %rax, %rsi
subq %rcx, %rsi
movq %rsi, %rdx
sarq $0x3, %rdx
movq %rsi, %rdi
shrq $0x3f, %rdi
addq %rdx, %rdi
andq $-0x2, %rdi
leaq (%rcx,%rdi,4), %rdx
cmpq $0x8, %rsi
jg 0xc56e7
cmpq (%rcx), %r12
je 0xc5761
cmpq (%rax), %r12
je 0xc5761
testq %r10, %r10
je 0xc5779
movq -0x38(%rbp), %rax
movl 0x38(%rax), %eax
movq %r12, (%r10,%rax)
movq %r12, %r10
jmp 0xc5780
leaq 0x2cc(%rip), %rsi # 0xc5a0d
movq %r12, %rdx
movq %r8, %r14
movq %r10, %rbx
callq 0xc5b65
movq %rbx, %r10
movq %r14, %r8
movq -0x50(%rbp), %r14
movq -0x58(%rbp), %rbx
testl %eax, %eax
je 0xc5725
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movl 0x38(%rax), %eax
movq %rcx, (%r12,%rax)
movq %r12, 0x28(%rbx)
incl 0x30(%rbx)
jmp 0xc5780
movq %r12, %r10
movq %r12, -0x40(%rbp)
testq %r15, %r15
jne 0xc56b8
testq %r10, %r10
je 0xc57a0
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x40(%rbp), %rdi
movq %r10, %rsi
callq *0x28(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xc57be
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
|
lf_pinbox_real_free:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call _my_thread_var
test rax, rax
jz loc_C5646
mov rax, [rax+0B8h]
mov rdi, [rbx+20h]
mov [rbp+var_38], rdi
mov r8d, [rdi+40h]
inc r8d
test rax, rax
jz loc_C5655
mov ecx, r8d
shl ecx, 5
lea rdx, [rbp+var_38]
sub rax, rdx
lea edx, [rcx+2000h]
movsxd rdx, edx
cmp rax, rdx
jle short loc_C5655
movsxd rax, ecx
mov r14, rsp
add rax, 0Fh
and rax, 0FFFFFFFFFFFFFFF0h
sub r14, rax
mov rsp, r14
lea r12, [rbp+var_70]
mov [r12], r14
mov [r12+8], r8d
lea rsi, harvest_pins
mov rdx, r12
call lf_dynarray_iterate
mov r8, [r12]
sub r8, r14
shr r8, 3
test r8d, r8d
jz short loc_C5658
movsxd rsi, r8d
lea rcx, ptr_cmp
mov edx, 8
mov rdi, r14
mov r15, r8
call _qsort
mov r8, r15
jmp short loc_C5658
loc_C5646:
mov rax, [rbx+20h]
mov [rbp+var_38], rax
mov r8d, [rax+40h]
inc r8d
loc_C5655:
xor r14d, r14d
loc_C5658:
mov r15, [rbx+28h]
mov qword ptr [rbx+28h], 0
mov dword ptr [rbx+30h], 0
test r15, r15
jz loc_C57A0
movsxd rax, r8d
lea r13, [r14+rax*8]
add r13, 0FFFFFFFFFFFFFFF8h
lea rcx, ds:0FFFFFFFFFFFFFFF8h[rax*8]
mov rax, rcx
sar rax, 3
mov [rbp+var_60], rcx
shr rcx, 3Fh
add rcx, rax
and rcx, 0FFFFFFFFFFFFFFFEh
lea rax, [r14+rcx*4]
mov [rbp+var_48], rax
mov [rbp+var_40], 0
xor r10d, r10d
mov [rbp+var_58], rbx
mov [rbp+var_50], r14
loc_C56B8:
mov r12, r15
mov rdi, [rbp+var_38]
mov eax, [rdi+38h]
mov r15, [r15+rax]
test r8d, r8d
jz short loc_C5725
test r14, r14
jz short loc_C573A
mov rcx, r14
mov rax, r13
cmp [rbp+var_60], 9
jl short loc_C571B
mov rdx, [rbp+var_48]
mov rax, r13
mov rcx, r14
loc_C56E7:
cmp r12, [rdx]
cmovbe rax, rdx
cmovnb rcx, rdx
cmovz rax, rdx
mov rsi, rax
sub rsi, rcx
mov rdx, rsi
sar rdx, 3
mov rdi, rsi
shr rdi, 3Fh
add rdi, rdx
and rdi, 0FFFFFFFFFFFFFFFEh
lea rdx, [rcx+rdi*4]
cmp rsi, 8
jg short loc_C56E7
loc_C571B:
cmp r12, [rcx]
jz short loc_C5761
cmp r12, [rax]
jz short loc_C5761
loc_C5725:
test r10, r10
jz short loc_C5779
mov rax, [rbp+var_38]
mov eax, [rax+38h]
mov [r10+rax], r12
mov r10, r12
jmp short loc_C5780
loc_C573A:
lea rsi, match_pins
mov rdx, r12
mov r14, r8
mov rbx, r10
call lf_dynarray_iterate
mov r10, rbx
mov r8, r14
mov r14, [rbp+var_50]
mov rbx, [rbp+var_58]
test eax, eax
jz short loc_C5725
loc_C5761:
mov rax, [rbx+20h]
mov rcx, [rbx+28h]
mov eax, [rax+38h]
mov [r12+rax], rcx
mov [rbx+28h], r12
inc dword ptr [rbx+30h]
jmp short loc_C5780
loc_C5779:
mov r10, r12
mov [rbp+var_40], r12
loc_C5780:
test r15, r15
jnz loc_C56B8
test r10, r10
jz short loc_C57A0
mov rax, [rbp+var_38]
mov rdx, [rax+30h]
mov rdi, [rbp+var_40]
mov rsi, r10
call qword ptr [rax+28h]
loc_C57A0:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_C57BE
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C57BE:
call ___stack_chk_fail
|
unsigned long long lf_pinbox_real_free(long long a1)
{
long long v1; // rbx
long long v2; // rax
long long v3; // rax
long long v4; // rdi
unsigned long long v5; // r8
char *v6; // r14
unsigned long long v7; // r15
unsigned long long v8; // r15
long long v9; // r13
unsigned long long v10; // rcx
unsigned long long v11; // r10
unsigned long long v12; // r12
_QWORD *v13; // rax
char *v14; // rdx
unsigned long long v15; // r14
unsigned long long v16; // rbx
int v17; // eax
char *v19; // [rsp+0h] [rbp-70h] BYREF
int v20; // [rsp+8h] [rbp-68h]
long long v21; // [rsp+10h] [rbp-60h]
long long v22; // [rsp+18h] [rbp-58h]
char *v23; // [rsp+20h] [rbp-50h]
char *v24; // [rsp+28h] [rbp-48h]
unsigned long long v25; // [rsp+30h] [rbp-40h]
_QWORD v26[7]; // [rsp+38h] [rbp-38h] BYREF
v1 = a1;
v26[1] = __readfsqword(0x28u);
v2 = my_thread_var();
if ( v2 )
{
v3 = *(_QWORD *)(v2 + 184);
v4 = *(_QWORD *)(a1 + 32);
v26[0] = v4;
v5 = (unsigned int)(*(_DWORD *)(v4 + 64) + 1);
if ( v3 && v3 - (long long)v26 > 32 * (int)v5 + 0x2000 )
{
v6 = (char *)&v19 - ((32 * (int)v5 + 15LL) & 0xFFFFFFFFFFFFFFF0LL);
v19 = v6;
v20 = v5;
lf_dynarray_iterate(v4, harvest_pins, &v19);
v5 = (unsigned long long)(v19 - v6) >> 3;
if ( (_DWORD)v5 )
{
v7 = (unsigned long long)(v19 - v6) >> 3;
qsort(v6, (int)v5, 8LL, ptr_cmp);
v5 = v7;
}
goto LABEL_8;
}
}
else
{
v26[0] = *(_QWORD *)(a1 + 32);
v5 = (unsigned int)(*(_DWORD *)(v26[0] + 64LL) + 1);
}
v6 = 0LL;
LABEL_8:
v8 = *(_QWORD *)(v1 + 40);
*(_QWORD *)(v1 + 40) = 0LL;
*(_DWORD *)(v1 + 48) = 0;
if ( !v8 )
return __readfsqword(0x28u);
v9 = (long long)&v6[8 * (int)v5 - 8];
v21 = 8LL * (int)v5 - 8;
v10 = ((v21 >> 3) + ((unsigned long long)v21 >> 63)) & 0xFFFFFFFFFFFFFFFELL;
v24 = &v6[4 * v10];
v25 = 0LL;
v11 = 0LL;
v22 = v1;
v23 = v6;
do
{
v12 = v8;
v8 = *(_QWORD *)(v8 + *(unsigned int *)(v26[0] + 56LL));
if ( (_DWORD)v5 )
{
if ( v6 )
{
v10 = (unsigned long long)v6;
v13 = (_QWORD *)v9;
if ( v21 >= 9 )
{
v14 = v24;
v13 = (_QWORD *)v9;
v10 = (unsigned long long)v6;
do
{
if ( v12 <= *(_QWORD *)v14 )
v13 = v14;
if ( v12 >= *(_QWORD *)v14 )
v10 = (unsigned long long)v14;
if ( v12 == *(_QWORD *)v14 )
v13 = v14;
v14 = (char *)(v10
+ 4
* ((((long long)((long long)v13 - v10) >> 3) + (((unsigned long long)v13 - v10) >> 63)) & 0xFFFFFFFFFFFFFFFELL));
}
while ( (long long)((long long)v13 - v10) > 8 );
}
if ( v12 == *(_QWORD *)v10 || v12 == *v13 )
{
LABEL_26:
v10 = *(_QWORD *)(v1 + 40);
*(_QWORD *)(v12 + *(unsigned int *)(*(_QWORD *)(v1 + 32) + 56LL)) = v10;
*(_QWORD *)(v1 + 40) = v12;
++*(_DWORD *)(v1 + 48);
continue;
}
}
else
{
v15 = v5;
v16 = v11;
v17 = lf_dynarray_iterate(v26[0], match_pins, v12);
v11 = v16;
v5 = v15;
v6 = v23;
v1 = v22;
if ( v17 )
goto LABEL_26;
}
}
if ( v11 )
{
*(_QWORD *)(v11 + *(unsigned int *)(v26[0] + 56LL)) = v12;
v11 = v12;
}
else
{
v11 = v12;
v25 = v12;
}
}
while ( v8 );
if ( v11 )
(*(void ( **)(unsigned long long, unsigned long long, _QWORD, unsigned long long, unsigned long long))(v26[0] + 40LL))(
v25,
v11,
*(_QWORD *)(v26[0] + 48LL),
v10,
v5);
return __readfsqword(0x28u);
}
|
lf_pinbox_real_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x001c14ee
TEST RAX,RAX
JZ 0x001c5646
MOV RAX,qword ptr [RAX + 0xb8]
MOV RDI,qword ptr [RBX + 0x20]
MOV qword ptr [RBP + -0x38],RDI
MOV R8D,dword ptr [RDI + 0x40]
INC R8D
TEST RAX,RAX
JZ 0x001c5655
MOV ECX,R8D
SHL ECX,0x5
LEA RDX,[RBP + -0x38]
SUB RAX,RDX
LEA EDX,[RCX + 0x2000]
MOVSXD RDX,EDX
CMP RAX,RDX
JLE 0x001c5655
MOVSXD RAX,ECX
MOV R14,RSP
ADD RAX,0xf
AND RAX,-0x10
SUB R14,RAX
MOV RSP,R14
LEA R12,[RBP + -0x70]
MOV qword ptr [R12],R14
MOV dword ptr [R12 + 0x8],R8D
LEA RSI,[0x1c599c]
MOV RDX,R12
CALL 0x001c5b65
MOV R8,qword ptr [R12]
SUB R8,R14
SHR R8,0x3
TEST R8D,R8D
JZ 0x001c5658
MOVSXD RSI,R8D
LEA RCX,[0x1c59f4]
MOV EDX,0x8
MOV RDI,R14
MOV R15,R8
CALL 0x0012a640
MOV R8,R15
JMP 0x001c5658
LAB_001c5646:
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV R8D,dword ptr [RAX + 0x40]
INC R8D
LAB_001c5655:
XOR R14D,R14D
LAB_001c5658:
MOV R15,qword ptr [RBX + 0x28]
MOV qword ptr [RBX + 0x28],0x0
MOV dword ptr [RBX + 0x30],0x0
TEST R15,R15
JZ 0x001c57a0
MOVSXD RAX,R8D
LEA R13,[R14 + RAX*0x8]
ADD R13,-0x8
LEA RCX,[-0x8 + RAX*0x8]
MOV RAX,RCX
SAR RAX,0x3
MOV qword ptr [RBP + -0x60],RCX
SHR RCX,0x3f
ADD RCX,RAX
AND RCX,-0x2
LEA RAX,[R14 + RCX*0x4]
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x40],0x0
XOR R10D,R10D
MOV qword ptr [RBP + -0x58],RBX
MOV qword ptr [RBP + -0x50],R14
LAB_001c56b8:
MOV R12,R15
MOV RDI,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RDI + 0x38]
MOV R15,qword ptr [R15 + RAX*0x1]
TEST R8D,R8D
JZ 0x001c5725
TEST R14,R14
JZ 0x001c573a
MOV RCX,R14
MOV RAX,R13
CMP qword ptr [RBP + -0x60],0x9
JL 0x001c571b
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,R13
MOV RCX,R14
LAB_001c56e7:
CMP R12,qword ptr [RDX]
CMOVBE RAX,RDX
CMOVNC RCX,RDX
CMOVZ RAX,RDX
MOV RSI,RAX
SUB RSI,RCX
MOV RDX,RSI
SAR RDX,0x3
MOV RDI,RSI
SHR RDI,0x3f
ADD RDI,RDX
AND RDI,-0x2
LEA RDX,[RCX + RDI*0x4]
CMP RSI,0x8
JG 0x001c56e7
LAB_001c571b:
CMP R12,qword ptr [RCX]
JZ 0x001c5761
CMP R12,qword ptr [RAX]
JZ 0x001c5761
LAB_001c5725:
TEST R10,R10
JZ 0x001c5779
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x38]
MOV qword ptr [R10 + RAX*0x1],R12
MOV R10,R12
JMP 0x001c5780
LAB_001c573a:
LEA RSI,[0x1c5a0d]
MOV RDX,R12
MOV R14,R8
MOV RBX,R10
CALL 0x001c5b65
MOV R10,RBX
MOV R8,R14
MOV R14,qword ptr [RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x58]
TEST EAX,EAX
JZ 0x001c5725
LAB_001c5761:
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x28]
MOV EAX,dword ptr [RAX + 0x38]
MOV qword ptr [R12 + RAX*0x1],RCX
MOV qword ptr [RBX + 0x28],R12
INC dword ptr [RBX + 0x30]
JMP 0x001c5780
LAB_001c5779:
MOV R10,R12
MOV qword ptr [RBP + -0x40],R12
LAB_001c5780:
TEST R15,R15
JNZ 0x001c56b8
TEST R10,R10
JZ 0x001c57a0
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R10
CALL qword ptr [RAX + 0x28]
LAB_001c57a0:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001c57be
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c57be:
CALL 0x0012a280
|
/* WARNING: Type propagation algorithm not settling */
void lf_pinbox_real_free(long param_1)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
code *pcVar4;
ulong *puVar5;
int iVar6;
long lVar7;
ulong *puVar8;
ulong *puVar9;
ulong **__base;
long lVar10;
int iVar11;
ulong uVar12;
ulong *puVar13;
ulong *puVar14;
ulong uVar15;
long in_FS_OFFSET;
ulong *apuStack_80 [2];
int local_70;
long local_68;
long local_60;
ulong *local_58;
ulong *local_50;
ulong local_48;
long local_40;
long local_38;
__base = apuStack_80 + 1;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
apuStack_80[0] = (ulong *)0x1c55a4;
lVar7 = _my_thread_var();
if (lVar7 == 0) {
local_40 = *(long *)(param_1 + 0x20);
iVar11 = *(int *)(*(long *)(param_1 + 0x20) + 0x40) + 1;
}
else {
lVar10 = *(long *)(param_1 + 0x20);
local_40 = lVar10;
iVar11 = *(int *)(lVar10 + 0x40) + 1;
if ((*(long *)(lVar7 + 0xb8) != 0) &&
((long)(iVar11 * 0x20 + 0x2000) < *(long *)(lVar7 + 0xb8) - (long)&local_40)) {
lVar7 = -(long)(iVar11 * 0x20);
__base = (ulong **)((long)apuStack_80 + lVar7 + 8U);
apuStack_80[1] = (ulong *)__base;
local_70 = iVar11;
*(int8 *)((long)apuStack_80 + lVar7) = 0x1c5617;
lf_dynarray_iterate(lVar10,harvest_pins,apuStack_80 + 1);
iVar11 = (int)((ulong)((long)apuStack_80[1] - (long)__base) >> 3);
puVar14 = (ulong *)__base;
if (iVar11 != 0) {
*(int8 *)((long)apuStack_80 + lVar7) = 0x1c5641;
qsort(__base,(long)iVar11,8,ptr_cmp);
}
goto LAB_001c5658;
}
}
puVar14 = (ulong *)0x0;
LAB_001c5658:
uVar15 = *(ulong *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int4 *)(param_1 + 0x30) = 0;
if (uVar15 != 0) {
puVar13 = puVar14 + (long)iVar11 + -1;
local_68 = (long)iVar11 * 8 + -8;
local_50 = (ulong *)((long)puVar14 +
((local_68 >> 3) - (local_68 >> 0x3f) & 0xfffffffffffffffeU) * 4);
local_48 = 0;
uVar12 = 0;
local_60 = param_1;
local_58 = puVar14;
do {
lVar7 = local_40;
uVar1 = *(ulong *)(uVar15 + *(uint *)(local_40 + 0x38));
if (iVar11 == 0) {
LAB_001c5725:
if (uVar12 == 0) {
local_48 = uVar15;
uVar12 = uVar15;
}
else {
*(ulong *)(uVar12 + *(uint *)(local_40 + 0x38)) = uVar15;
uVar12 = uVar15;
}
}
else {
puVar8 = puVar13;
puVar9 = puVar14;
puVar5 = local_50;
lVar10 = local_68;
if (puVar14 == (ulong *)0x0) {
__base[-1] = (ulong *)0x1c574f;
iVar6 = lf_dynarray_iterate(lVar7,match_pins,uVar15);
param_1 = local_60;
puVar14 = local_58;
if (iVar6 == 0) goto LAB_001c5725;
}
else {
while (8 < lVar10) {
uVar2 = *puVar5;
if (uVar2 > uVar15 || uVar15 == uVar2) {
puVar8 = puVar5;
}
if (uVar2 <= uVar15) {
puVar9 = puVar5;
}
if (uVar15 == uVar2) {
puVar8 = puVar5;
}
lVar10 = (long)puVar8 - (long)puVar9;
puVar5 = (ulong *)((long)puVar9 +
((lVar10 >> 3) - (lVar10 >> 0x3f) & 0xfffffffffffffffeU) * 4);
}
if ((uVar15 != *puVar9) && (uVar15 != *puVar8)) goto LAB_001c5725;
}
*(int8 *)(uVar15 + *(uint *)(*(long *)(param_1 + 0x20) + 0x38)) =
*(int8 *)(param_1 + 0x28);
*(ulong *)(param_1 + 0x28) = uVar15;
*(int *)(param_1 + 0x30) = *(int *)(param_1 + 0x30) + 1;
}
uVar2 = local_48;
uVar15 = uVar1;
} while (uVar1 != 0);
if (uVar12 != 0) {
uVar3 = *(int8 *)(local_40 + 0x30);
pcVar4 = *(code **)(local_40 + 0x28);
__base[-1] = (ulong *)0x1c57a0;
(*pcVar4)(uVar2,uVar12,uVar3);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__base[-1] = (ulong *)lf_pinbox_free;
__stack_chk_fail();
}
return;
}
|
|
61,528 |
my_hash_first_from_hash_value
|
eloqsql/mysys/hash.c
|
uchar* my_hash_first_from_hash_value(const HASH *hash,
my_hash_value_type hash_value,
const uchar *key,
size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
DBUG_ENTER("my_hash_first_from_hash_value");
if (hash->records)
{
uint flag= 1;
uint idx= my_hash_mask(hash_value,
hash->blength, hash->records);
do
{
pos= dynamic_element(&hash->array,idx,HASH_LINK*);
if (!hashcmp(hash,pos,key,length))
{
DBUG_PRINT("exit",("found key at %d",idx));
*current_record= idx;
DBUG_RETURN (pos->data);
}
if (flag)
{
flag=0; /* Reset flag */
if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx)
break; /* Wrong link */
}
}
while ((idx=pos->next) != NO_RECORD);
}
*current_record= NO_RECORD;
DBUG_RETURN(0);
}
|
O0
|
c
|
my_hash_first_from_hash_value:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3633c
movl $0x1, -0x3c(%rbp)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x36360
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x363b0
cmpl $0x0, %eax
jne 0x362f7
jmp 0x362de
jmp 0x362e0
movl -0x40(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3634e
cmpl $0x0, -0x3c(%rbp)
je 0x36326
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x36450
cmpl -0x40(%rbp), %eax
je 0x36324
jmp 0x3633a
jmp 0x36326
jmp 0x36328
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
cmpl $-0x1, %eax
jne 0x362ac
jmp 0x3633c
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_hash_first_from_hash_value:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz loc_3633C
mov [rbp+var_3C], 1
mov edi, [rbp+var_14]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov [rbp+var_40], eax
loc_362AC:
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov ecx, [rbp+var_40]
shl rcx, 4
add rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call hashcmp
cmp eax, 0
jnz short loc_362F7
jmp short $+2
loc_362DE:
jmp short $+2
loc_362E0:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_3634E
loc_362F7:
cmp [rbp+var_3C], 0
jz short loc_36326
mov [rbp+var_3C], 0
mov rdi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_rec_mask
cmp eax, [rbp+var_40]
jz short loc_36324
jmp short loc_3633A
loc_36324:
jmp short $+2
loc_36326:
jmp short $+2
loc_36328:
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_40], eax
cmp eax, 0FFFFFFFFh
jnz loc_362AC
loc_3633A:
jmp short $+2
loc_3633C:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
mov [rbp+var_8], 0
loc_3634E:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long my_hash_first_from_hash_value(_QWORD *a1, unsigned int a2, long long a3, long long a4, unsigned int *a5)
{
unsigned int v6; // [rsp+0h] [rbp-40h]
int v7; // [rsp+4h] [rbp-3Ch]
long long v8; // [rsp+8h] [rbp-38h]
if ( a1[3] )
{
v7 = 1;
v6 = my_hash_mask(a2, a1[2], a1[3]);
while ( 1 )
{
v8 = 16LL * v6 + a1[5];
if ( !(unsigned int)hashcmp(a1, v8, a3, a4) )
break;
if ( !v7 || (v7 = 0, (unsigned int)my_hash_rec_mask(v8, a1[2], a1[3]) == v6) )
{
v6 = *(_DWORD *)v8;
if ( *(_DWORD *)v8 != -1 )
continue;
}
goto LABEL_8;
}
*a5 = v6;
return *(_QWORD *)(v8 + 8);
}
else
{
LABEL_8:
*a5 = -1;
return 0LL;
}
}
|
my_hash_first_from_hash_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013633c
MOV dword ptr [RBP + -0x3c],0x1
MOV EDI,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00136360
MOV dword ptr [RBP + -0x40],EAX
LAB_001362ac:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV ECX,dword ptr [RBP + -0x40]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x001363b0
CMP EAX,0x0
JNZ 0x001362f7
JMP 0x001362de
LAB_001362de:
JMP 0x001362e0
LAB_001362e0:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013634e
LAB_001362f7:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00136326
MOV dword ptr [RBP + -0x3c],0x0
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00136450
CMP EAX,dword ptr [RBP + -0x40]
JZ 0x00136324
JMP 0x0013633a
LAB_00136324:
JMP 0x00136326
LAB_00136326:
JMP 0x00136328
LAB_00136328:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CMP EAX,-0x1
JNZ 0x001362ac
LAB_0013633a:
JMP 0x0013633c
LAB_0013633c:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
MOV qword ptr [RBP + -0x8],0x0
LAB_0013634e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8
my_hash_first_from_hash_value
(long param_1,int4 param_2,int8 param_3,int8 param_4,uint *param_5)
{
bool bVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint local_48;
if (*(long *)(param_1 + 0x18) != 0) {
bVar1 = true;
local_48 = my_hash_mask(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18))
;
do {
puVar4 = (uint *)(*(long *)(param_1 + 0x28) + (ulong)local_48 * 0x10);
iVar2 = hashcmp(param_1,puVar4,param_3,param_4);
if (iVar2 == 0) {
*param_5 = local_48;
return *(int8 *)(puVar4 + 2);
}
if (bVar1) {
bVar1 = false;
uVar3 = my_hash_rec_mask(puVar4,*(int8 *)(param_1 + 0x10),
*(int8 *)(param_1 + 0x18));
if (uVar3 != local_48) break;
}
local_48 = *puVar4;
} while (local_48 != 0xffffffff);
}
*param_5 = 0xffffffff;
return 0;
}
|
|
61,529 |
my_hash_first_from_hash_value
|
eloqsql/mysys/hash.c
|
uchar* my_hash_first_from_hash_value(const HASH *hash,
my_hash_value_type hash_value,
const uchar *key,
size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
DBUG_ENTER("my_hash_first_from_hash_value");
if (hash->records)
{
uint flag= 1;
uint idx= my_hash_mask(hash_value,
hash->blength, hash->records);
do
{
pos= dynamic_element(&hash->array,idx,HASH_LINK*);
if (!hashcmp(hash,pos,key,length))
{
DBUG_PRINT("exit",("found key at %d",idx));
*current_record= idx;
DBUG_RETURN (pos->data);
}
if (flag)
{
flag=0; /* Reset flag */
if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx)
break; /* Wrong link */
}
}
while ((idx=pos->next) != NO_RECORD);
}
*current_record= NO_RECORD;
DBUG_RETURN(0);
}
|
O3
|
c
|
my_hash_first_from_hash_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x2f5b2
movq %rdx, %r15
movq %rdi, %r12
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movq 0x10(%rdi), %rbx
addl %ebx, %ecx
andl %esi, %ecx
shrq %rbx
decl %ebx
andl %esi, %ebx
cmpq %rax, %rcx
cmovbl %ecx, %ebx
xorl %r14d, %r14d
movq 0x28(%r12), %rax
movl %ebx, %ecx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq 0x2f5d9
testl %eax, %eax
je 0x2f5c0
testb $0x1, %r14b
jne 0x2f5a6
movq 0x10(%r12), %rax
movl 0x4(%r13), %ecx
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
addl %eax, %edx
andl %ecx, %edx
shrq %rax
decl %eax
andl %ecx, %eax
cmpq 0x18(%r12), %rdx
cmovbl %edx, %eax
cmpl %ebx, %eax
jne 0x2f5b2
movl (%r13), %ebx
movb $0x1, %r14b
cmpl $-0x1, %ebx
jne 0x2f554
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x2f5ca
movq -0x30(%rbp), %rax
movl %ebx, (%rax)
movq 0x8(%r13), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_first_from_hash_value:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], r8
mov [rbp+var_38], rcx
mov rax, [rdi+18h]
test rax, rax
jz loc_2F5B2
mov r15, rdx
mov r12, rdi
mov ecx, 0FFFFFFFFh
mov rbx, [rdi+10h]
add ecx, ebx
and ecx, esi
shr rbx, 1
dec ebx
and ebx, esi
cmp rcx, rax
cmovb ebx, ecx
xor r14d, r14d
loc_2F554:
mov rax, [r12+28h]
mov ecx, ebx
shl rcx, 4
lea r13, [rax+rcx]
mov rsi, [rax+rcx+8]
mov rdi, r12
mov rdx, r15
mov rcx, [rbp+var_38]
call hashcmp
test eax, eax
jz short loc_2F5C0
test r14b, 1
jnz short loc_2F5A6
mov rax, [r12+10h]
mov ecx, [r13+4]
mov edx, 0FFFFFFFFh
add edx, eax
and edx, ecx
shr rax, 1
dec eax
and eax, ecx
cmp rdx, [r12+18h]
cmovb eax, edx
cmp eax, ebx
jnz short loc_2F5B2
loc_2F5A6:
mov ebx, [r13+0]
mov r14b, 1
cmp ebx, 0FFFFFFFFh
jnz short loc_2F554
loc_2F5B2:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
xor eax, eax
jmp short loc_2F5CA
loc_2F5C0:
mov rax, [rbp+var_30]
mov [rax], ebx
mov rax, [r13+8]
loc_2F5CA:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_hash_first_from_hash_value(_QWORD *a1, int a2, long long a3, long long a4, unsigned int *a5)
{
unsigned long long v5; // rax
unsigned long long v7; // rbx
unsigned long long v8; // rcx
unsigned int v9; // ebx
char v10; // r14
long long v11; // r13
unsigned long long v12; // rax
int v13; // ecx
unsigned long long v14; // rdx
int v15; // eax
v5 = a1[3];
if ( v5 )
{
v7 = a1[2];
v8 = a2 & (unsigned int)(v7 - 1);
v9 = a2 & ((v7 >> 1) - 1);
if ( v8 < v5 )
v9 = v8;
v10 = 0;
while ( 1 )
{
v11 = a1[5] + 16LL * v9;
if ( !(unsigned int)hashcmp(a1, *(_QWORD *)(v11 + 8), a3, a4) )
break;
if ( (v10 & 1) != 0 )
goto LABEL_15;
v12 = a1[2];
v13 = *(_DWORD *)(v11 + 4);
v14 = v13 & (unsigned int)(v12 - 1);
v15 = v13 & ((v12 >> 1) - 1);
if ( v14 < a1[3] )
v15 = v14;
if ( v15 == v9 )
{
LABEL_15:
v9 = *(_DWORD *)v11;
v10 = 1;
if ( *(_DWORD *)v11 != -1 )
continue;
}
goto LABEL_11;
}
*a5 = v9;
return *(_QWORD *)(v11 + 8);
}
else
{
LABEL_11:
*a5 = -1;
return 0LL;
}
}
|
my_hash_first_from_hash_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,qword ptr [RDI + 0x18]
TEST RAX,RAX
JZ 0x0012f5b2
MOV R15,RDX
MOV R12,RDI
MOV ECX,0xffffffff
MOV RBX,qword ptr [RDI + 0x10]
ADD ECX,EBX
AND ECX,ESI
SHR RBX,0x1
DEC EBX
AND EBX,ESI
CMP RCX,RAX
CMOVC EBX,ECX
XOR R14D,R14D
LAB_0012f554:
MOV RAX,qword ptr [R12 + 0x28]
MOV ECX,EBX
SHL RCX,0x4
LEA R13,[RAX + RCX*0x1]
MOV RSI,qword ptr [RAX + RCX*0x1 + 0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x0012f5d9
TEST EAX,EAX
JZ 0x0012f5c0
TEST R14B,0x1
JNZ 0x0012f5a6
MOV RAX,qword ptr [R12 + 0x10]
MOV ECX,dword ptr [R13 + 0x4]
MOV EDX,0xffffffff
ADD EDX,EAX
AND EDX,ECX
SHR RAX,0x1
DEC EAX
AND EAX,ECX
CMP RDX,qword ptr [R12 + 0x18]
CMOVC EAX,EDX
CMP EAX,EBX
JNZ 0x0012f5b2
LAB_0012f5a6:
MOV EBX,dword ptr [R13]
MOV R14B,0x1
CMP EBX,-0x1
JNZ 0x0012f554
LAB_0012f5b2:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
XOR EAX,EAX
JMP 0x0012f5ca
LAB_0012f5c0:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],EBX
MOV RAX,qword ptr [R13 + 0x8]
LAB_0012f5ca:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_hash_first_from_hash_value
(long param_1,uint param_2,int8 param_3,int8 param_4,uint *param_5)
{
uint *puVar1;
uint uVar2;
int iVar3;
uint uVar4;
uint uVar5;
bool bVar6;
if (*(ulong *)(param_1 + 0x18) != 0) {
uVar4 = (int)*(ulong *)(param_1 + 0x10) - 1U & param_2;
uVar2 = (int)(*(ulong *)(param_1 + 0x10) >> 1) - 1U & param_2;
if ((ulong)uVar4 < *(ulong *)(param_1 + 0x18)) {
uVar2 = uVar4;
}
bVar6 = false;
do {
puVar1 = (uint *)(*(long *)(param_1 + 0x28) + (ulong)uVar2 * 0x10);
iVar3 = hashcmp(param_1,*(int8 *)(*(long *)(param_1 + 0x28) + 8 + (ulong)uVar2 * 0x10),
param_3,param_4);
if (iVar3 == 0) {
*param_5 = uVar2;
return *(int8 *)(puVar1 + 2);
}
if (!bVar6) {
uVar5 = (int)*(ulong *)(param_1 + 0x10) - 1U & puVar1[1];
uVar4 = (int)(*(ulong *)(param_1 + 0x10) >> 1) - 1U & puVar1[1];
if ((ulong)uVar5 < *(ulong *)(param_1 + 0x18)) {
uVar4 = uVar5;
}
if (uVar4 != uVar2) break;
}
uVar2 = *puVar1;
bVar6 = true;
} while (uVar2 != 0xffffffff);
}
*param_5 = 0xffffffff;
return 0;
}
|
|
61,530 |
cli::group cli::matchable_derived<cli::value>::operator+<cli::value>(cli::matchable_derived<cli::value> const&)
|
msxemulator/build_O3/_deps/picotool-src/cli.h
|
group matchable_derived<D>::operator+(const matchable_derived<T> &m) {
return group{this->to_ptr(), m.to_ptr()};
}
|
O3
|
c
|
cli::group cli::matchable_derived<cli::value>::operator+<cli::value>(cli::matchable_derived<cli::value> const&):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
callq 0x57a36
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x511f0
leaq 0x18(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x51368
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5dfa5
callq 0x4bd0a
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5dfb4
callq 0x4bd0a
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5dfd6
callq 0x4bd0a
jmp 0x5dfd6
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5dfe5
callq 0x4bd0a
movq %rbx, %rdi
callq 0xf7d0
nop
|
_ZN3cli17matchable_derivedINS_5groupEEplINS_6optionEEES1_RKNS0_IT_EE:
push r14
push rbx
sub rsp, 28h
mov r14, rdx
mov rbx, rdi
lea rdi, [rsp+38h+var_20]
call _ZNK3cli17matchable_derivedINS_5groupEE6to_ptrEv; cli::matchable_derived<cli::group>::to_ptr(void)
lea rdi, [rsp+38h+var_30]
mov rsi, r14
call _ZNK3cli17matchable_derivedINS_6optionEE6to_ptrEv; cli::matchable_derived<cli::option>::to_ptr(void)
lea rsi, [rsp+38h+var_20]
lea rdx, [rsp+38h+var_30]
mov rdi, rbx
xor eax, eax
call _ZN3cli5groupC2ISt10shared_ptrINS_9matchableEEJEEET_S5_z; cli::group::group<std::shared_ptr<cli::matchable>>(std::shared_ptr<cli::matchable>,std::shared_ptr<cli::matchable>,...)
mov rdi, [rsp+38h+var_28]
test rdi, rdi
jz short loc_5DFA5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5DFA5:
mov rdi, [rsp+38h+var_18]
test rdi, rdi
jz short loc_5DFB4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5DFB4:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_5DFD6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_5DFD6
mov rbx, rax
loc_5DFD6:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_5DFE5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5DFE5:
mov rdi, rbx
call __Unwind_Resume
|
long long cli::matchable_derived<cli::group>::operator+<cli::option>(long long a1, long long a2, long long a3)
{
cli::matchable *v5; // [rsp+8h] [rbp-30h] BYREF
volatile signed __int32 *v6; // [rsp+10h] [rbp-28h]
long long v7; // [rsp+18h] [rbp-20h] BYREF
volatile signed __int32 *v8; // [rsp+20h] [rbp-18h]
cli::matchable_derived<cli::group>::to_ptr(&v7, a2);
cli::matchable_derived<cli::option>::to_ptr(&v5, a3);
cli::group::group<std::shared_ptr<cli::matchable>>(a1, &v7, &v5);
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v8 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8);
return a1;
}
|
operator+:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV RBX,RDI
LEA RDI,[RSP + 0x18]
CALL 0x00157a36
LAB_0015df75:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001511f0
LAB_0015df82:
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00151368
LAB_0015df96:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0015dfa5
CALL 0x0014bd0a
LAB_0015dfa5:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0015dfb4
CALL 0x0014bd0a
LAB_0015dfb4:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* cli::group
cli::matchable_derived<cli::group>::TEMPNAMEPLACEHOLDERVALUE(cli::matchable_derived<cli::option>
const&) */
matchable_derived<cli::group> * __thiscall
cli::matchable_derived<cli::group>::operator+
(matchable_derived<cli::group> *this,matchable_derived *param_1)
{
int1 local_30 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
int1 local_20 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
to_ptr();
/* try { // try from 0015df75 to 0015df81 has its CatchHandler @ 0015dfd3 */
matchable_derived<cli::option>::to_ptr();
/* try { // try from 0015df82 to 0015df95 has its CatchHandler @ 0015dfbf */
group::group<std::shared_ptr<cli::matchable>>((group *)this,local_20,local_30);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18);
}
return this;
}
|
|
61,531 |
uf_varchar1
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]= 0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
*to= (uchar) length;
decode_bytes(rec,bit_buff,to+1,to+1+length);
}
}
|
O3
|
c
|
uf_varchar1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x9e8f2
movl (%r14), %r13d
decl %eax
movl %eax, 0x4(%r14)
btl %eax, %r13d
jae 0x9e90f
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x9d279
movl $0x1f, 0x4(%r14)
movl (%r14), %r13d
movl $0x1f, %eax
testl %r13d, %r13d
js 0x9e8e0
movl 0x1c(%r15), %r12d
movl %eax, %ecx
subl %r12d, %ecx
jae 0x9e954
subl %eax, %r12d
movl %eax, %eax
leaq 0x6742a(%rip), %rcx # 0x105d50
andl (%rcx,%rax,4), %r13d
movl %r12d, %ecx
shll %cl, %r13d
movq %r14, %rdi
callq 0x9d279
movl $0x20, %eax
subl %r12d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r12d
movl %r12d, %ecx
shrl %cl, %eax
addl %eax, %r13d
jmp 0x9e96a
movl %ecx, 0x4(%r14)
shrl %cl, %r13d
movl 0x1c(%r15), %eax
leaq 0x673ea(%rip), %rcx # 0x105d50
andl (%rcx,%rax,4), %r13d
movl %r13d, %eax
movb %r13b, (%rbx)
leaq (%rbx,%rax), %rcx
incq %rcx
incq %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9db6a
|
uf_varchar1_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_9E8F2
mov r13d, [r14]
dec eax
mov [r14+4], eax
bt r13d, eax
jnb short loc_9E90F
loc_9E8E0:
mov byte ptr [rbx], 0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9E8F2:
mov rdi, r14
call fill_buffer_0
mov dword ptr [r14+4], 1Fh
mov r13d, [r14]
mov eax, 1Fh
test r13d, r13d
js short loc_9E8E0
loc_9E90F:
mov r12d, [r15+1Ch]
mov ecx, eax
sub ecx, r12d
jnb short loc_9E954
sub r12d, eax
mov eax, eax
lea rcx, mask_0
and r13d, [rcx+rax*4]
mov ecx, r12d
shl r13d, cl
mov rdi, r14
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r12d
mov [r14+4], eax
mov eax, [r14]
neg r12d
mov ecx, r12d
shr eax, cl
add r13d, eax
jmp short loc_9E96A
loc_9E954:
mov [r14+4], ecx
shr r13d, cl
mov eax, [r15+1Ch]
lea rcx, mask_0
and r13d, [rcx+rax*4]
loc_9E96A:
mov eax, r13d
mov [rbx], r13b
lea rcx, [rbx+rax]
inc rcx
inc rbx
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
|
long long uf_varchar1_0(long long a1, unsigned int *a2, _BYTE *a3)
{
unsigned int v4; // eax
unsigned int v5; // r13d
long long result; // rax
unsigned int v7; // r12d
unsigned int v8; // ecx
int v9; // r12d
int v10; // r13d
unsigned int v11; // r13d
v4 = a2[1];
if ( v4 )
{
v5 = *a2;
result = v4 - 1;
a2[1] = result;
if ( _bittest((const int *)&v5, result) )
{
LABEL_3:
*a3 = 0;
return result;
}
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
v5 = *a2;
result = 31LL;
if ( (*a2 & 0x80000000) != 0 )
goto LABEL_3;
}
v7 = *(_DWORD *)(a1 + 28);
v8 = result - v7;
if ( (unsigned int)result >= v7 )
{
a2[1] = v8;
v11 = mask_0[*(unsigned int *)(a1 + 28)] & (v5 >> v8);
}
else
{
v9 = v7 - result;
v10 = (mask_0[(unsigned int)result] & v5) << v9;
fill_buffer_0((long long)a2);
a2[1] = 32 - v9;
v11 = (*a2 >> -(char)v9) + v10;
}
*a3 = v11;
return (long long)decode_bytes_0(a1, (long long)a2, a3 + 1, &a3[v11 + 1]);
}
|
uf_varchar1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x0019e8f2
MOV R13D,dword ptr [R14]
DEC EAX
MOV dword ptr [R14 + 0x4],EAX
BT R13D,EAX
JNC 0x0019e90f
LAB_0019e8e0:
MOV byte ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019e8f2:
MOV RDI,R14
CALL 0x0019d279
MOV dword ptr [R14 + 0x4],0x1f
MOV R13D,dword ptr [R14]
MOV EAX,0x1f
TEST R13D,R13D
JS 0x0019e8e0
LAB_0019e90f:
MOV R12D,dword ptr [R15 + 0x1c]
MOV ECX,EAX
SUB ECX,R12D
JNC 0x0019e954
SUB R12D,EAX
MOV EAX,EAX
LEA RCX,[0x205d50]
AND R13D,dword ptr [RCX + RAX*0x4]
MOV ECX,R12D
SHL R13D,CL
MOV RDI,R14
CALL 0x0019d279
MOV EAX,0x20
SUB EAX,R12D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R12D
MOV ECX,R12D
SHR EAX,CL
ADD R13D,EAX
JMP 0x0019e96a
LAB_0019e954:
MOV dword ptr [R14 + 0x4],ECX
SHR R13D,CL
MOV EAX,dword ptr [R15 + 0x1c]
LEA RCX,[0x205d50]
AND R13D,dword ptr [RCX + RAX*0x4]
LAB_0019e96a:
MOV EAX,R13D
MOV byte ptr [RBX],R13B
LEA RCX,[RBX + RAX*0x1]
INC RCX
INC RBX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0019db6a
|
void uf_varchar1(long param_1,uint *param_2,int1 *param_3)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if (-1 < (int)uVar5) goto LAB_0019e90f;
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_0019e90f:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
*param_3 = (char)uVar5;
decode_bytes(param_1,param_2,param_3 + 1,param_3 + (ulong)uVar5 + 1);
return;
}
}
*param_3 = 0;
return;
}
|
|
61,532 |
ma_state_info_write
|
eloqsql/storage/maria/ma_open.c
|
uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite)
{
uint res;
if (share->options & HA_OPTION_READ_ONLY_DATA)
return 0;
if (pWrite & MA_STATE_INFO_WRITE_LOCK)
mysql_mutex_lock(&share->intern_lock);
else if (maria_multi_threaded && !share->temporary)
mysql_mutex_assert_owner(&share->intern_lock);
if (share->base.born_transactional && translog_status == TRANSLOG_OK &&
!maria_in_recovery)
{
/*
In a recovery, we want to set is_of_horizon to the LSN of the last
record executed by Recovery, not the current EOF of the log (which
is too new). Recovery does it by itself.
*/
share->state.is_of_horizon= translog_get_horizon();
DBUG_PRINT("info", ("is_of_horizon set to LSN " LSN_FMT "",
LSN_IN_PARTS(share->state.is_of_horizon)));
}
res= _ma_state_info_write_sub(share->kfile.file, &share->state, pWrite);
if (pWrite & MA_STATE_INFO_WRITE_LOCK)
mysql_mutex_unlock(&share->intern_lock);
/* If open_count != 0 we have to write the state again at close */
share->changed= share->state.open_count != 0;
return res;
}
|
O3
|
c
|
ma_state_info_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
testb $0x1, 0x722(%rdi)
jne 0x378e4
movl %esi, %r14d
movq %rdi, %rbx
testb $0x4, %r14b
je 0x37872
leaq 0x8f0(%rbx), %rdi
cmpq $0x0, 0x930(%rbx)
jne 0x378f2
callq 0x2a1f0
cmpb $0x0, 0x44c(%rbx)
je 0x378a1
leaq 0x3d1e1e(%rip), %rax # 0x4096a0
cmpl $0x1, (%rax)
jne 0x378a1
leaq 0x3d1de4(%rip), %rax # 0x409672
cmpb $0x0, (%rax)
jne 0x378a1
xorl %eax, %eax
callq 0x6adbc
movq %rax, 0x180(%rbx)
movl 0x760(%rbx), %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3791a
movl %eax, %r15d
testb $0x4, %r14b
je 0x378d6
leaq 0x8f0(%rbx), %r14
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x37908
movq %r14, %rdi
callq 0x2a1c0
cmpl $0x0, 0x16c(%rbx)
setne 0x7de(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaa1c9(%rip), %rsi # 0xe1ac2
movl $0x5e3, %edx # imm = 0x5E3
callq 0x2ff2f
jmp 0x37872
leaq 0x3595c9(%rip), %rax # 0x390ed8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x378ce
|
_ma_state_info_write:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
xor r15d, r15d
test byte ptr [rdi+722h], 1
jnz loc_378E4
mov r14d, esi
mov rbx, rdi
test r14b, 4
jz short loc_37872
lea rdi, [rbx+8F0h]
cmp qword ptr [rbx+930h], 0
jnz loc_378F2
call _pthread_mutex_lock
loc_37872:
cmp byte ptr [rbx+44Ch], 0
jz short loc_378A1
lea rax, translog_status
cmp dword ptr [rax], 1
jnz short loc_378A1
lea rax, maria_in_recovery
cmp byte ptr [rax], 0
jnz short loc_378A1
xor eax, eax
call translog_get_horizon
mov [rbx+180h], rax
loc_378A1:
mov edi, [rbx+760h]
mov rsi, rbx
mov edx, r14d
call _ma_state_info_write_sub
mov r15d, eax
test r14b, 4
jz short loc_378D6
lea r14, [rbx+8F0h]
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_37908
loc_378CE:
mov rdi, r14
call _pthread_mutex_unlock
loc_378D6:
cmp dword ptr [rbx+16Ch], 0
setnz byte ptr [rbx+7DEh]
loc_378E4:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_378F2:
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5E3h
call psi_mutex_lock
jmp loc_37872
loc_37908:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_378CE
|
long long ma_state_info_write(long long a1, unsigned int a2)
{
unsigned int v2; // r15d
long long v3; // rbx
long long v4; // rdi
v2 = 0;
if ( (*(_BYTE *)(a1 + 1826) & 1) == 0 )
{
v3 = a1;
if ( (a2 & 4) != 0 )
{
a1 += 2288LL;
if ( *(_QWORD *)(v3 + 2352) )
psi_mutex_lock(a1, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x5E3u);
else
pthread_mutex_lock(a1);
}
if ( *(_BYTE *)(v3 + 1100) && translog_status == 1 && !maria_in_recovery )
*(_QWORD *)(v3 + 384) = translog_get_horizon(a1);
v2 = ma_state_info_write_sub(*(unsigned int *)(v3 + 1888), v3, a2);
if ( (a2 & 4) != 0 )
{
v4 = *(_QWORD *)(v3 + 2352);
if ( v4 )
((void ( *)(long long))PSI_server[44])(v4);
pthread_mutex_unlock(v3 + 2288);
}
*(_BYTE *)(v3 + 2014) = *(_DWORD *)(v3 + 364) != 0;
}
return v2;
}
|
_ma_state_info_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
XOR R15D,R15D
TEST byte ptr [RDI + 0x722],0x1
JNZ 0x001378e4
MOV R14D,ESI
MOV RBX,RDI
TEST R14B,0x4
JZ 0x00137872
LEA RDI,[RBX + 0x8f0]
CMP qword ptr [RBX + 0x930],0x0
JNZ 0x001378f2
CALL 0x0012a1f0
LAB_00137872:
CMP byte ptr [RBX + 0x44c],0x0
JZ 0x001378a1
LEA RAX,[0x5096a0]
CMP dword ptr [RAX],0x1
JNZ 0x001378a1
LEA RAX,[0x509672]
CMP byte ptr [RAX],0x0
JNZ 0x001378a1
XOR EAX,EAX
CALL 0x0016adbc
MOV qword ptr [RBX + 0x180],RAX
LAB_001378a1:
MOV EDI,dword ptr [RBX + 0x760]
MOV RSI,RBX
MOV EDX,R14D
CALL 0x0013791a
MOV R15D,EAX
TEST R14B,0x4
JZ 0x001378d6
LEA R14,[RBX + 0x8f0]
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x00137908
LAB_001378ce:
MOV RDI,R14
CALL 0x0012a1c0
LAB_001378d6:
CMP dword ptr [RBX + 0x16c],0x0
SETNZ byte ptr [RBX + 0x7de]
LAB_001378e4:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001378f2:
LEA RSI,[0x1e1ac2]
MOV EDX,0x5e3
CALL 0x0012ff2f
JMP 0x00137872
LAB_00137908:
LEA RAX,[0x490ed8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001378ce
|
int4 _ma_state_info_write(long param_1,uint param_2)
{
int4 uVar1;
int8 uVar2;
uVar1 = 0;
if ((*(byte *)(param_1 + 0x722) & 1) == 0) {
if ((param_2 & 4) != 0) {
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0));
}
else {
psi_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x5e3);
}
}
if (((*(char *)(param_1 + 0x44c) != '\0') && (translog_status == 1)) &&
(maria_in_recovery == '\0')) {
uVar2 = translog_get_horizon();
*(int8 *)(param_1 + 0x180) = uVar2;
}
uVar1 = _ma_state_info_write_sub(*(int4 *)(param_1 + 0x760),param_1,param_2);
if ((param_2 & 4) != 0) {
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x8f0));
}
*(bool *)(param_1 + 0x7de) = *(int *)(param_1 + 0x16c) != 0;
}
return uVar1;
}
|
|
61,533 |
my_charpos_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_charpos_utf16(CHARSET_INFO *cs,
const char *b, const char *e, size_t pos)
{
const char *b0= b;
uint charlen;
for ( ; pos; b+= charlen, pos--)
{
if (!(charlen= my_ismbchar(cs, b, e)))
return (e + 2 - b0); /* Error, return pos outside the string */
}
return (size_t) (pos ? (e + 2 - b0) : (b - b0));
}
|
O3
|
c
|
my_charpos_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %r12
testq %rcx, %rcx
je 0x7c4e5
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %r13
movq %rbx, %r12
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jle 0x7c4de
movl %eax, %eax
addq %rax, %r12
decq %r15
jne 0x7c4b7
jmp 0x7c4e5
addq $0x2, %r14
movq %r14, %r12
subq %rbx, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_charpos_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r12, rsi
test rcx, rcx
jz short loc_7C4E5
mov r15, rcx
mov r14, rdx
mov r13, rdi
mov r12, rbx
loc_7C4B7:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r12
mov rdx, r14
call qword ptr [rax+0C0h]
cmp eax, 1
jle short loc_7C4DE
mov eax, eax
add r12, rax
dec r15
jnz short loc_7C4B7
jmp short loc_7C4E5
loc_7C4DE:
add r14, 2
mov r12, r14
loc_7C4E5:
sub r12, rbx
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // r12
long long v5; // r15
int v7; // eax
v4 = a2;
if ( a4 )
{
v5 = a4;
v4 = a2;
while ( 1 )
{
v7 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v4, a3);
if ( v7 <= 1 )
break;
v4 += (unsigned int)v7;
if ( !--v5 )
return v4 - a2;
}
v4 = a3 + 2;
}
return v4 - a2;
}
|
my_charpos_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R12,RSI
TEST RCX,RCX
JZ 0x0017c4e5
MOV R15,RCX
MOV R14,RDX
MOV R13,RDI
MOV R12,RBX
LAB_0017c4b7:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JLE 0x0017c4de
MOV EAX,EAX
ADD R12,RAX
DEC R15
JNZ 0x0017c4b7
JMP 0x0017c4e5
LAB_0017c4de:
ADD R14,0x2
MOV R12,R14
LAB_0017c4e5:
SUB R12,RBX
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_charpos_utf16(long param_1,long param_2,long param_3,long param_4)
{
uint uVar1;
long lVar2;
lVar2 = param_2;
if (param_4 != 0) {
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,lVar2,param_3);
if ((int)uVar1 < 2) {
lVar2 = param_3 + 2;
break;
}
lVar2 = lVar2 + (ulong)uVar1;
param_4 = param_4 + -1;
} while (param_4 != 0);
}
return lVar2 - param_2;
}
|
|
61,534 |
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::number_float_t)
|
monkey531[P]llama/common/./json.hpp
|
static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept
{
j.m_data.m_value.destroy(j.m_data.m_type);
j.m_data.m_type = value_t::number_float;
j.m_data.m_value = val;
j.assert_invariant();
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::number_float_t):
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
addq $0x8, %rdi
movzbl (%rbx), %esi
callq 0x3729a
movb $0x7, (%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x3175a
movq %rax, %rdi
callq 0x22f37
|
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE:
push rbx
sub rsp, 10h
movsd [rsp+18h+var_18], xmm0
mov rbx, rdi
add rdi, 8
movzx esi, byte ptr [rbx]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
mov byte ptr [rbx], 7
movsd xmm0, [rsp+18h+var_18]
movsd [rsp+18h+var_10], xmm0
mov rax, [rsp+18h+var_10]
mov [rbx+8], rax
mov rdi, rbx
mov esi, 1
add rsp, 10h
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
double a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy(
(long long **)a1 + 1,
*a1);
*a1 = 7;
result = *(_QWORD *)&a2;
*((double *)a1 + 1) = a2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
|
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBX
SUB RSP,0x10
MOVSD qword ptr [RSP],XMM0
MOV RBX,RDI
ADD RDI,0x8
MOVZX ESI,byte ptr [RBX]
LAB_00138b92:
CALL 0x0013729a
MOV byte ptr [RBX],0x7
MOVSD XMM0,qword ptr [RSP]
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,RBX
MOV ESI,0x1
ADD RSP,0x10
POP RBX
JMP 0x0013175a
|
/* void
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::number_float_t) */
void nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(int8 param_1_00,int1 *param_1)
{
/* try { // try from 00138b92 to 00138b96 has its CatchHandler @ 00138bc0 */
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::destroy((json_value *)(param_1 + 8),*param_1);
*param_1 = 7;
*(int8 *)(param_1 + 8) = param_1_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return;
}
|
|
61,535 |
ulight::(anonymous namespace)::Parser::expect(bool (*)(char32_t))
|
ulight/src/main/cpp/mmml.cpp
|
[[nodiscard]]
bool expect(bool predicate(char32_t))
{
if (eof()) {
return false;
}
const auto [code_point, length] = peek_code_point();
if (!predicate(code_point)) {
return false;
}
m_pos += std::size_t(length);
return true;
}
|
O0
|
cpp
|
ulight::(anonymous namespace)::Parser::expect(bool (*)(char32_t)):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x15cd0
testb $0x1, %al
jne 0x169c3
jmp 0x169c9
movb $0x0, -0x1(%rbp)
jmp 0x169fd
movq -0x28(%rbp), %rdi
callq 0x16a10
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %edi
callq *%rax
testb $0x1, %al
jne 0x169e9
movb $0x0, -0x1(%rbp)
jmp 0x169fd
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN6ulight12_GLOBAL__N_16Parser6expectEPFbDiE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]; this
mov [rbp+var_28], rdi
call _ZNK6ulight12_GLOBAL__N_16Parser3eofEv; ulight::`anonymous namespace'::Parser::eof(void)
test al, 1
jnz short loc_169C3
jmp short loc_169C9
loc_169C3:
mov [rbp+var_1], 0
jmp short loc_169FD
loc_169C9:
mov rdi, [rbp+var_28]; this
call _ZNK6ulight12_GLOBAL__N_16Parser15peek_code_pointEv; ulight::`anonymous namespace'::Parser::peek_code_point(void)
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov edi, dword ptr [rbp+var_20]
call rax
test al, 1
jnz short loc_169E9
mov [rbp+var_1], 0
jmp short loc_169FD
loc_169E9:
mov rax, [rbp+var_28]
movsxd rcx, dword ptr [rbp+var_20+4]
add rcx, [rax+18h]
mov [rax+18h], rcx
mov [rbp+var_1], 1
loc_169FD:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char ulight::`anonymous namespace'::Parser::expect(
ulight::_anonymous_namespace_::Parser *a1,
long long ( *a2)(_QWORD))
{
long long v3; // [rsp+10h] [rbp-20h]
if ( ulight::`anonymous namespace'::Parser::eof(a1) )
return 0;
v3 = ulight::`anonymous namespace'::Parser::peek_code_point(a1);
if ( (a2((unsigned int)v3) & 1) == 0 )
return 0;
*((_QWORD *)a1 + 3) += SHIDWORD(v3);
return 1;
}
|
expect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RDI
CALL 0x00115cd0
TEST AL,0x1
JNZ 0x001169c3
JMP 0x001169c9
LAB_001169c3:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001169fd
LAB_001169c9:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00116a10
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RBP + -0x20]
CALL RAX
TEST AL,0x1
JNZ 0x001169e9
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001169fd
LAB_001169e9:
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV byte ptr [RBP + -0x1],0x1
LAB_001169fd:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
/* ulight::(anonymous namespace)::Parser::expect(bool (*)(char32_t)) */
int1 __thiscall
ulight::(anonymous_namespace)::Parser::expect(Parser *this,_func_bool_wchar32 *param_1)
{
bool bVar1;
ulong uVar2;
int8 uVar3;
int iStack_24;
int1 local_9;
uVar2 = eof(this);
if ((uVar2 & 1) == 0) {
uVar3 = peek_code_point(this);
bVar1 = (*param_1)((wchar32)uVar3);
if (bVar1) {
iStack_24 = (int)((ulong)uVar3 >> 0x20);
*(long *)(this + 0x18) = (long)iStack_24 + *(long *)(this + 0x18);
local_9 = 1;
}
else {
local_9 = 0;
}
}
else {
local_9 = 0;
}
return local_9;
}
|
|
61,536 |
bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long)
|
llama.cpp/common/json.hpp
|
bool operator==(const_reference lhs, ScalarType rhs) noexcept
{
return lhs == basic_json(rhs);
}
|
O3
|
cpp
|
bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x325ec
movq %r14, %rdi
movl $0x1, %esi
callq 0x732fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x72f7c
movl %eax, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r14, %rdi
callq 0x300e0
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov ebx, eax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
retn
|
long long ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_(
unsigned __int8 *a1,
long long a2)
{
unsigned int v2; // ebx
_OWORD v4[2]; // [rsp+0h] [rbp-28h] BYREF
v4[0] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)v4,
a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
v2 = nlohmann::json_abi_v3_11_3::operator==(a1, (unsigned __int8 *)v4, (__m128d)0LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v4);
return v2;
}
|
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R14,RSP
MOVAPS xmmword ptr [R14],XMM0
MOV RDI,R14
CALL 0x001325ec
MOV RDI,R14
MOV ESI,0x1
CALL 0x001732fc
MOV RDI,RBX
MOV RSI,R14
CALL 0x00172f7c
MOV EBX,EAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x001732fc
MOV RDI,R14
CALL 0x001300e0
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
int4
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
(basic_json *param_1)
{
int4 uVar1;
int8 local_28;
int8 uStack_20;
local_28 = 0;
uStack_20 = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
uVar1 = nlohmann::json_abi_v3_11_3::operator==(param_1,(basic_json *)&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_28);
return uVar1;
}
|
|
61,537 |
client_chat::init()
|
untodesu[P]voxelius/game/client/chat.cc
|
void client_chat::init(void)
{
globals::client_config.add_value("chat.key", key_chat);
globals::client_config.add_value("chat.history_size", history_size);
settings::add_keybind(2, key_chat, settings_location::KEYBOARD_MISC, "key.chat");
settings::add_slider(1, history_size, settings_location::VIDEO_GUI, "chat.history_size", false);
globals::dispatcher.sink<protocol::ChatMessage>().connect<&on_chat_message_packet>();
globals::dispatcher.sink<GlfwKeyEvent>().connect<&on_glfw_key>();
sfx_chat_message = resource::load<SoundEffect>("sounds/ui/chat_message.wav");
}
|
O0
|
cpp
|
client_chat::init():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x4b62c9(%rip), %rdi # 0x50e198
leaq 0x314192(%rip), %rsi # 0x36c068
leaq 0x4b5b03(%rip), %rdx # 0x50d9e0
callq 0x27feb0
leaq 0x4b62af(%rip), %rdi # 0x50e198
leaq 0x314181(%rip), %rsi # 0x36c071
leaq 0x4b5b01(%rip), %rdx # 0x50d9f8
callq 0x27feb0
movl $0x2, %edi
leaq 0x4b5ad8(%rip), %rsi # 0x50d9e0
movl $0x3, %edx
leaq 0x31416f(%rip), %rcx # 0x36c083
callq 0x128d20
movl $0x1, %edi
leaq 0x4b5ad3(%rip), %rsi # 0x50d9f8
movl $0xa, %edx
leaq 0x314140(%rip), %rcx # 0x36c071
xorl %r8d, %r8d
callq 0x1289e0
callq 0x59830
movl %eax, %esi
leaq 0x4b8b09(%rip), %rdi # 0x510a50
callq 0x597f0
movq %rax, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x57fc0
callq 0x59880
movl %eax, %esi
leaq 0x4b8ae5(%rip), %rdi # 0x510a50
callq 0x59840
movq %rax, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x58070
leaq -0x50(%rbp), %rdi
leaq 0x314100(%rip), %rsi # 0x36c08c
xorl %edx, %edx
callq 0x12e490
leaq 0x4b5b06(%rip), %rdi # 0x50daa0
leaq -0x50(%rbp), %rsi
callq 0x59890
leaq -0x50(%rbp), %rdi
callq 0x597d0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN11client_chat4initEv:
push rbp
mov rbp, rsp
sub rsp, 50h
lea rdi, _ZN7globals13client_configE; this
lea rsi, aChatKey; "chat.key"
lea rdx, _ZL8key_chat; IConfigValue *
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
lea rdi, _ZN7globals13client_configE; this
lea rsi, aChatHistorySiz; "chat.history_size"
lea rdx, _ZL12history_size; IConfigValue *
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
mov edi, 2
lea rsi, _ZL8key_chat; key_chat
mov edx, 3
lea rcx, aKeyChat; "key.chat"
call _ZN8settings11add_keybindEiR13ConfigKeyBind17settings_locationPKc; settings::add_keybind(int,ConfigKeyBind &,settings_location,char const*)
mov edi, 1
lea rsi, _ZL12history_size; history_size
mov edx, 0Ah
lea rcx, aChatHistorySiz; "chat.history_size"
xor r8d, r8d
call _ZN8settings10add_sliderEiR14ConfigUnsigned17settings_locationPKcb; settings::add_slider(int,ConfigUnsigned &,settings_location,char const*,bool)
call _ZN4entt9type_hashIN8protocol11ChatMessageEvE5valueEv; entt::type_hash<protocol::ChatMessage,void>::value(void)
mov esi, eax
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
call _ZN4entt16basic_dispatcherISaIvEE4sinkIN8protocol11ChatMessageEEEDaj
mov [rbp+var_8], rax
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_8]
call _ZN4entt4sinkINS_4sighIFvRN8protocol11ChatMessageEESaIvEEEE7connectITnDaXadL_ZL22on_chat_message_packetRKS3_EEJEEENS_10connectionEDpOT0_
call _ZN4entt9type_hashI12GlfwKeyEventvE5valueEv; entt::type_hash<GlfwKeyEvent,void>::value(void)
mov esi, eax
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
call _ZN4entt16basic_dispatcherISaIvEE4sinkI12GlfwKeyEventEEDaj
mov [rbp+var_28], rax
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_28]
call _ZN4entt4sinkINS_4sighIFvR12GlfwKeyEventESaIvEEEE7connectITnDaXadL_ZL11on_glfw_keyRKS2_EEJEEENS_10connectionEDpOT0_
lea rdi, [rbp+var_50]
lea rsi, aSoundsUiChatMe; "sounds/ui/chat_message.wav"
xor edx, edx
call _ZN8resource4loadI11SoundEffectEESt10shared_ptrIKT_EPKcj; resource::load<SoundEffect>(char const*,uint)
lea rdi, _ZL16sfx_chat_message; sfx_chat_message
lea rsi, [rbp+var_50]
call _ZNSt10shared_ptrIK11SoundEffectEaSEOS2_; std::shared_ptr<SoundEffect const>::operator=(std::shared_ptr<SoundEffect const>&&)
lea rdi, [rbp+var_50]; void *
call _ZNSt10shared_ptrIK11SoundEffectED2Ev; std::shared_ptr<SoundEffect const>::~shared_ptr()
add rsp, 50h
pop rbp
retn
|
void client_chat::init(client_chat *this)
{
unsigned int v1; // eax
unsigned int v2; // eax
_BYTE v3[16]; // [rsp+0h] [rbp-50h] BYREF
_BYTE v4[24]; // [rsp+10h] [rbp-40h] BYREF
long long v5; // [rsp+28h] [rbp-28h] BYREF
_BYTE v6[24]; // [rsp+30h] [rbp-20h] BYREF
long long v7; // [rsp+48h] [rbp-8h] BYREF
Config::add_value((Config *)&globals::client_config, "chat.key", (IConfigValue *)&key_chat);
Config::add_value((Config *)&globals::client_config, "chat.history_size", (IConfigValue *)&history_size);
settings::add_keybind(2LL, &key_chat, 3LL, "key.chat");
settings::add_slider(1LL, &history_size, 10LL, "chat.history_size");
v1 = entt::type_hash<protocol::ChatMessage,void>::value();
v7 = entt::basic_dispatcher<std::allocator<void>>::sink<protocol::ChatMessage>(&globals::dispatcher, v1);
ZN4entt4sinkINS_4sighIFvRN8protocol11ChatMessageEESaIvEEEE7connectITnDaXadL_ZL22on_chat_message_packetRKS3_EEJEEENS_10connectionEDpOT0_(
v6,
&v7);
v2 = entt::type_hash<GlfwKeyEvent,void>::value();
v5 = entt::basic_dispatcher<std::allocator<void>>::sink<GlfwKeyEvent>(&globals::dispatcher, v2);
ZN4entt4sinkINS_4sighIFvR12GlfwKeyEventESaIvEEEE7connectITnDaXadL_ZL11on_glfw_keyRKS2_EEJEEENS_10connectionEDpOT0_(
v4,
&v5);
resource::load<SoundEffect>(v3, "sounds/ui/chat_message.wav", 0LL);
std::shared_ptr<SoundEffect const>::operator=(&sfx_chat_message, v3);
std::shared_ptr<SoundEffect const>::~shared_ptr(v3);
}
|
init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
LEA RDI,[0x60e198]
LEA RSI,[0x46c068]
LEA RDX,[0x60d9e0]
CALL 0x0037feb0
LEA RDI,[0x60e198]
LEA RSI,[0x46c071]
LEA RDX,[0x60d9f8]
CALL 0x0037feb0
MOV EDI,0x2
LEA RSI,[0x60d9e0]
MOV EDX,0x3
LEA RCX,[0x46c083]
CALL 0x00228d20
MOV EDI,0x1
LEA RSI,[0x60d9f8]
MOV EDX,0xa
LEA RCX,[0x46c071]
XOR R8D,R8D
CALL 0x002289e0
CALL 0x00159830
MOV ESI,EAX
LEA RDI,[0x610a50]
CALL 0x001597f0
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x8]
CALL 0x00157fc0
CALL 0x00159880
MOV ESI,EAX
LEA RDI,[0x610a50]
CALL 0x00159840
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x28]
CALL 0x00158070
LEA RDI,[RBP + -0x50]
LEA RSI,[0x46c08c]
XOR EDX,EDX
CALL 0x0022e490
LEA RDI,[0x60daa0]
LEA RSI,[RBP + -0x50]
CALL 0x00159890
LEA RDI,[RBP + -0x50]
CALL 0x001597d0
ADD RSP,0x50
POP RBP
RET
|
/* client_chat::init() */
void client_chat::init(void)
{
uint uVar1;
resource local_58 [16];
int1 local_48 [24];
int8 local_30;
int1 local_28 [24];
int8 local_10;
Config::add_value((Config *)globals::client_config,"chat.key",(IConfigValue *)key_chat);
Config::add_value((Config *)globals::client_config,"chat.history_size",
(IConfigValue *)history_size);
settings::add_keybind(2,key_chat,3,"key.chat");
settings::add_slider(1,history_size,10,"chat.history_size",0);
uVar1 = entt::type_hash<protocol::ChatMessage,void>::value();
local_10 = entt::basic_dispatcher<std::allocator<void>>::sink<protocol::ChatMessage>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,uVar1);
_ZN4entt4sinkINS_4sighIFvRN8protocol11ChatMessageEESaIvEEEE7connectITnDaXadL_ZL22on_chat_message_packetRKS3_EEJEEENS_10connectionEDpOT0_
(local_28,&local_10);
uVar1 = entt::type_hash<GlfwKeyEvent,void>::value();
local_30 = entt::basic_dispatcher<std::allocator<void>>::sink<GlfwKeyEvent>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,uVar1);
_ZN4entt4sinkINS_4sighIFvR12GlfwKeyEventESaIvEEEE7connectITnDaXadL_ZL11on_glfw_keyRKS2_EEJEEENS_10connectionEDpOT0_
(local_48,&local_30);
resource::load<SoundEffect>(local_58,"sounds/ui/chat_message.wav",0);
std::shared_ptr<SoundEffect_const>::operator=
((shared_ptr<SoundEffect_const> *)sfx_chat_message,(shared_ptr *)local_58);
std::shared_ptr<SoundEffect_const>::~shared_ptr((shared_ptr<SoundEffect_const> *)local_58);
return;
}
|
|
61,538 |
client_chat::init()
|
untodesu[P]voxelius/game/client/chat.cc
|
void client_chat::init(void)
{
globals::client_config.add_value("chat.key", key_chat);
globals::client_config.add_value("chat.history_size", history_size);
settings::add_keybind(2, key_chat, settings_location::KEYBOARD_MISC, "key.chat");
settings::add_slider(1, history_size, settings_location::VIDEO_GUI, "chat.history_size", false);
globals::dispatcher.sink<protocol::ChatMessage>().connect<&on_chat_message_packet>();
globals::dispatcher.sink<GlfwKeyEvent>().connect<&on_glfw_key>();
sfx_chat_message = resource::load<SoundEffect>("sounds/ui/chat_message.wav");
}
|
O1
|
cpp
|
client_chat::init():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x2264d2(%rip), %rbx # 0x25df60
leaq 0x15e0fb(%rip), %rsi # 0x195b90
leaq 0x225d0c(%rip), %r14 # 0x25d7a8
movq %rbx, %rdi
movq %r14, %rdx
callq 0x130f0c
leaq 0x15e0eb(%rip), %r15 # 0x195b99
leaq 0x225d0b(%rip), %r12 # 0x25d7c0
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x130f0c
leaq 0x15e0e1(%rip), %rcx # 0x195bab
movl $0x2, %edi
movq %r14, %rsi
movl $0x3, %edx
callq 0x6aa12
movl $0x1, %edi
movq %r12, %rsi
movl $0xa, %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x6a6a0
leaq 0x228d15(%rip), %rdi # 0x260810
movl $0xfef9a3b2, %esi # imm = 0xFEF9A3B2
callq 0x38c60
movq %rax, %rbx
leaq 0x8(%rax), %r14
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
callq 0x3830e
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x83d(%rip), %rax # 0x38364
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x37b44
movaps (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x10(%rbx)
jmp 0x37b4f
movq %rsp, %rdx
movq %r14, %rdi
callq 0x39804
leaq 0x228cba(%rip), %rdi # 0x260810
movl $0x89f419c, %esi # imm = 0x89F419C
callq 0x390fa
movq %rax, %rbx
leaq 0x8(%rax), %r14
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
callq 0x387b6
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0xc8a(%rip), %rax # 0x3880c
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x37b9f
movaps (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x10(%rbx)
jmp 0x37baa
movq %rsp, %rdx
movq %r14, %rdi
callq 0x39992
leaq 0x15e003(%rip), %rsi # 0x195bb4
movq %rsp, %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6c200
movaps (%rbx), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rbx)
movq 0x225ca2(%rip), %rdi # 0x25d870
movups %xmm0, 0x225c93(%rip) # 0x25d868
testq %rdi, %rdi
je 0x37bdf
callq 0x2f77a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x37bee
callq 0x2f77a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN11client_chat4initEv:
push r15
push r14
push r12
push rbx
sub rsp, 18h
lea rbx, _ZN7globals13client_configE; globals::client_config
lea rsi, aChatKey; "chat.key"
lea r14, _ZL8key_chat; key_chat
mov rdi, rbx; this
mov rdx, r14; IConfigValue *
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
lea r15, aChatHistorySiz; "chat.history_size"
lea r12, _ZL12history_size; history_size
mov rdi, rbx; this
mov rsi, r15; char *
mov rdx, r12; IConfigValue *
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
lea rcx, aKeyChat; "key.chat"
mov edi, 2
mov rsi, r14
mov edx, 3
call _ZN8settings11add_keybindEiR13ConfigKeyBind17settings_locationPKc; settings::add_keybind(int,ConfigKeyBind &,settings_location,char const*)
mov edi, 1
mov rsi, r12
mov edx, 0Ah
mov rcx, r15
xor r8d, r8d
call _ZN8settings10add_sliderEiR14ConfigUnsigned17settings_locationPKcb; settings::add_slider(int,ConfigUnsigned &,settings_location,char const*,bool)
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 0FEF9A3B2h
call _ZN4entt16basic_dispatcherISaIvEE6assureIN8protocol11ChatMessageEEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<protocol::ChatMessage>(uint)
mov rbx, rax
lea r14, [rax+8]
lea rdi, [rsp+38h+var_28]
mov [rdi], r14
call _ZN4entt4sinkINS_4sighIFvRN8protocol11ChatMessageEESaIvEEEE10disconnectITnDaXadL_ZL22on_chat_message_packetRKS3_EEJEEEvDpOT0_
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
lea rax, _ZZN4entt8delegateIFvRN8protocol11ChatMessageEEE7connectITnDaXadL_ZL22on_chat_message_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
mov qword ptr [rsp+38h+var_38+8], rax
mov rsi, [rbx+10h]
cmp rsi, [rbx+18h]
jz short loc_37B44
movaps xmm0, [rsp+38h+var_38]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+10h], 10h
jmp short loc_37B4F
loc_37B44:
mov rdx, rsp
mov rdi, r14
call _ZNSt6vectorIN4entt8delegateIFvRN8protocol11ChatMessageEEEESaIS6_EE17_M_realloc_insertIJS6_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_; std::vector<entt::delegate<void ()(protocol::ChatMessage &)>>::_M_realloc_insert<entt::delegate<void ()(protocol::ChatMessage &)>>(__gnu_cxx::__normal_iterator<entt::delegate<void ()(protocol::ChatMessage &)>*,std::vector<entt::delegate<void ()(protocol::ChatMessage &)>>>,entt::delegate<void ()(protocol::ChatMessage &)> &&)
loc_37B4F:
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 89F419Ch
call _ZN4entt16basic_dispatcherISaIvEE6assureI12GlfwKeyEventEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<GlfwKeyEvent>(uint)
mov rbx, rax
lea r14, [rax+8]
lea rdi, [rsp+38h+var_28]
mov [rdi], r14
call _ZN4entt4sinkINS_4sighIFvR12GlfwKeyEventESaIvEEEE10disconnectITnDaXadL_ZL11on_glfw_keyRKS2_EEJEEEvDpOT0_
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
lea rax, _ZZN4entt8delegateIFvR12GlfwKeyEventEE7connectITnDaXadL_ZL11on_glfw_keyRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_
mov qword ptr [rsp+38h+var_38+8], rax
mov rsi, [rbx+10h]
cmp rsi, [rbx+18h]
jz short loc_37B9F
movaps xmm0, [rsp+38h+var_38]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+10h], 10h
jmp short loc_37BAA
loc_37B9F:
mov rdx, rsp
mov rdi, r14
call _ZNSt6vectorIN4entt8delegateIFvR12GlfwKeyEventEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_; std::vector<entt::delegate<void ()(GlfwKeyEvent &)>>::_M_realloc_insert<entt::delegate<void ()(GlfwKeyEvent &)>>(__gnu_cxx::__normal_iterator<entt::delegate<void ()(GlfwKeyEvent &)>*,std::vector<entt::delegate<void ()(GlfwKeyEvent &)>>>,entt::delegate<void ()(GlfwKeyEvent &)> &&)
loc_37BAA:
lea rsi, aSoundsUiChatMe; "sounds/ui/chat_message.wav"
mov rbx, rsp
mov rdi, rbx
xor edx, edx
call _ZN8resource4loadI11SoundEffectEESt10shared_ptrIKT_EPKcj; resource::load<SoundEffect>(char const*,uint)
movaps xmm0, xmmword ptr [rbx]
xorps xmm1, xmm1
movaps xmmword ptr [rbx], xmm1
mov rdi, qword ptr cs:_ZL16sfx_chat_message+8; sfx_chat_message
movups cs:_ZL16sfx_chat_message, xmm0; sfx_chat_message
test rdi, rdi
jz short loc_37BDF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_37BDF:
mov rdi, qword ptr [rsp+38h+var_38+8]
test rdi, rdi
jz short loc_37BEE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_37BEE:
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
init:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA RBX,[0x35df60]
LEA RSI,[0x295b90]
LEA R14,[0x35d7a8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x00230f0c
LEA R15,[0x295b99]
LEA R12,[0x35d7c0]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x00230f0c
LEA RCX,[0x295bab]
MOV EDI,0x2
MOV RSI,R14
MOV EDX,0x3
CALL 0x0016aa12
MOV EDI,0x1
MOV RSI,R12
MOV EDX,0xa
MOV RCX,R15
XOR R8D,R8D
CALL 0x0016a6a0
LEA RDI,[0x360810]
MOV ESI,0xfef9a3b2
CALL 0x00138c60
MOV RBX,RAX
LEA R14,[RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R14
CALL 0x0013830e
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
LEA RAX,[0x138364]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,qword ptr [RBX + 0x18]
JZ 0x00137b44
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x10],0x10
JMP 0x00137b4f
LAB_00137b44:
MOV RDX,RSP
MOV RDI,R14
CALL 0x00139804
LAB_00137b4f:
LEA RDI,[0x360810]
MOV ESI,0x89f419c
CALL 0x001390fa
MOV RBX,RAX
LEA R14,[RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R14
CALL 0x001387b6
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
LEA RAX,[0x13880c]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,qword ptr [RBX + 0x18]
JZ 0x00137b9f
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x10],0x10
JMP 0x00137baa
LAB_00137b9f:
MOV RDX,RSP
MOV RDI,R14
CALL 0x00139992
LAB_00137baa:
LEA RSI,[0x295bb4]
MOV RBX,RSP
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0016c200
MOVAPS XMM0,xmmword ptr [RBX]
XORPS XMM1,XMM1
MOVAPS xmmword ptr [RBX],XMM1
MOV RDI,qword ptr [0x0035d870]
MOVUPS xmmword ptr [0x0035d868],XMM0
TEST RDI,RDI
JZ 0x00137bdf
CALL 0x0012f77a
LAB_00137bdf:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00137bee
CALL 0x0012f77a
LAB_00137bee:
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* client_chat::init() */
void client_chat::init(void)
{
int8 *puVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
dispatcher_handler *pdVar3;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
vector<entt::delegate<void(protocol::ChatMessage&)>,std::allocator<entt::delegate<void(protocol::ChatMessage&)>>>
*local_28;
Config::add_value((Config *)globals::client_config,"chat.key",(IConfigValue *)key_chat);
Config::add_value((Config *)globals::client_config,"chat.history_size",
(IConfigValue *)history_size);
settings::add_keybind(2,key_chat,3,"key.chat");
settings::add_slider(1,history_size,10,"chat.history_size",0);
pdVar3 = entt::basic_dispatcher<std::allocator<void>>::assure<protocol::ChatMessage>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0xfef9a3b2);
local_28 = (vector<entt::delegate<void(protocol::ChatMessage&)>,std::allocator<entt::delegate<void(protocol::ChatMessage&)>>>
*)(pdVar3 + 8);
_ZN4entt4sinkINS_4sighIFvRN8protocol11ChatMessageEESaIvEEEE10disconnectITnDaXadL_ZL22on_chat_message_packetRKS3_EEJEEEvDpOT0_
();
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)
_ZZN4entt8delegateIFvRN8protocol11ChatMessageEEE7connectITnDaXadL_ZL22on_chat_message_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
;
puVar1 = *(int8 **)(pdVar3 + 0x10);
if (puVar1 == *(int8 **)(pdVar3 + 0x18)) {
std::
vector<entt::delegate<void(protocol::ChatMessage&)>,std::allocator<entt::delegate<void(protocol::ChatMessage&)>>>
::_M_realloc_insert<entt::delegate<void(protocol::ChatMessage&)>>
((vector<entt::delegate<void(protocol::ChatMessage&)>,std::allocator<entt::delegate<void(protocol::ChatMessage&)>>>
*)(pdVar3 + 8),puVar1,&local_38);
}
else {
*puVar1 = 0;
puVar1[1] =
_ZZN4entt8delegateIFvRN8protocol11ChatMessageEEE7connectITnDaXadL_ZL22on_chat_message_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
;
*(long *)(pdVar3 + 0x10) = *(long *)(pdVar3 + 0x10) + 0x10;
}
pdVar3 = entt::basic_dispatcher<std::allocator<void>>::assure<GlfwKeyEvent>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0x89f419c);
local_28 = (vector<entt::delegate<void(protocol::ChatMessage&)>,std::allocator<entt::delegate<void(protocol::ChatMessage&)>>>
*)(pdVar3 + 8);
_ZN4entt4sinkINS_4sighIFvR12GlfwKeyEventESaIvEEEE10disconnectITnDaXadL_ZL11on_glfw_keyRKS2_EEJEEEvDpOT0_
();
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)
_ZZN4entt8delegateIFvR12GlfwKeyEventEE7connectITnDaXadL_ZL11on_glfw_keyRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_
;
puVar1 = *(int8 **)(pdVar3 + 0x10);
if (puVar1 == *(int8 **)(pdVar3 + 0x18)) {
std::
vector<entt::delegate<void(GlfwKeyEvent&)>,std::allocator<entt::delegate<void(GlfwKeyEvent&)>>>
::_M_realloc_insert<entt::delegate<void(GlfwKeyEvent&)>>
((vector<entt::delegate<void(GlfwKeyEvent&)>,std::allocator<entt::delegate<void(GlfwKeyEvent&)>>>
*)(pdVar3 + 8),puVar1,&local_38);
}
else {
*puVar1 = 0;
puVar1[1] =
_ZZN4entt8delegateIFvR12GlfwKeyEventEE7connectITnDaXadL_ZL11on_glfw_keyRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_
;
*(long *)(pdVar3 + 0x10) = *(long *)(pdVar3 + 0x10) + 0x10;
}
resource::load<SoundEffect>((char *)&local_38,0x295bb4);
p_Var2 = p_Stack_30;
sfx_chat_message = local_38;
this = DAT_0035d870;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
DAT_0035d870 = p_Var2;
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
return;
}
|
||
61,539 |
reset_partitioned_key_cache_counters
|
eloqsql/mysys/mf_keycache.c
|
static int
reset_partitioned_key_cache_counters(const char *name __attribute__((unused)),
PARTITIONED_KEY_CACHE_CB *keycache)
{
uint i;
uint partitions= keycache->partitions;
DBUG_ENTER("partitioned_reset_key_cache_counters");
for (i = 0; i < partitions; i++)
{
reset_simple_key_cache_counters(name, keycache->partition_array[i]);
}
DBUG_RETURN(0);
}
|
O3
|
c
|
reset_partitioned_key_cache_counters:
movl 0x1c(%rsi), %eax
testq %rax, %rax
je 0x9acb8
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq 0x8(%rsi), %rdx
movq (%rdx,%rcx,8), %rdx
cmpb $0x0, (%rdx)
je 0x9acaf
movups %xmm0, 0x148(%rdx)
movups %xmm0, 0x138(%rdx)
movq $0x0, 0x158(%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x9ac89
popq %rbp
xorl %eax, %eax
retq
|
reset_partitioned_key_cache_counters:
mov eax, [rsi+1Ch]
test rax, rax
jz short loc_9ACB8
push rbp
mov rbp, rsp
xor ecx, ecx
xorps xmm0, xmm0
loc_9AC89:
mov rdx, [rsi+8]
mov rdx, [rdx+rcx*8]
cmp byte ptr [rdx], 0
jz short loc_9ACAF
movups xmmword ptr [rdx+148h], xmm0
movups xmmword ptr [rdx+138h], xmm0
mov qword ptr [rdx+158h], 0
loc_9ACAF:
inc rcx
cmp rax, rcx
jnz short loc_9AC89
pop rbp
loc_9ACB8:
xor eax, eax
retn
|
long long reset_partitioned_key_cache_counters(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
v2 = *(unsigned int *)(a2 + 28);
if ( *(_DWORD *)(a2 + 28) )
{
v3 = 0LL;
do
{
v4 = *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8 * v3);
if ( *(_BYTE *)v4 )
{
*(_OWORD *)(v4 + 328) = 0LL;
*(_OWORD *)(v4 + 312) = 0LL;
*(_QWORD *)(v4 + 344) = 0LL;
}
++v3;
}
while ( v2 != v3 );
}
return 0LL;
}
|
reset_partitioned_key_cache_counters:
MOV EAX,dword ptr [RSI + 0x1c]
TEST RAX,RAX
JZ 0x0019acb8
PUSH RBP
MOV RBP,RSP
XOR ECX,ECX
XORPS XMM0,XMM0
LAB_0019ac89:
MOV RDX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP byte ptr [RDX],0x0
JZ 0x0019acaf
MOVUPS xmmword ptr [RDX + 0x148],XMM0
MOVUPS xmmword ptr [RDX + 0x138],XMM0
MOV qword ptr [RDX + 0x158],0x0
LAB_0019acaf:
INC RCX
CMP RAX,RCX
JNZ 0x0019ac89
POP RBP
LAB_0019acb8:
XOR EAX,EAX
RET
|
int8 reset_partitioned_key_cache_counters(int8 param_1,long param_2)
{
uint uVar1;
char *pcVar2;
ulong uVar3;
uVar1 = *(uint *)(param_2 + 0x1c);
if ((ulong)uVar1 != 0) {
uVar3 = 0;
do {
pcVar2 = *(char **)(*(long *)(param_2 + 8) + uVar3 * 8);
if (*pcVar2 != '\0') {
pcVar2[0x148] = '\0';
pcVar2[0x149] = '\0';
pcVar2[0x14a] = '\0';
pcVar2[0x14b] = '\0';
pcVar2[0x14c] = '\0';
pcVar2[0x14d] = '\0';
pcVar2[0x14e] = '\0';
pcVar2[0x14f] = '\0';
pcVar2[0x150] = '\0';
pcVar2[0x151] = '\0';
pcVar2[0x152] = '\0';
pcVar2[0x153] = '\0';
pcVar2[0x154] = '\0';
pcVar2[0x155] = '\0';
pcVar2[0x156] = '\0';
pcVar2[0x157] = '\0';
pcVar2[0x138] = '\0';
pcVar2[0x139] = '\0';
pcVar2[0x13a] = '\0';
pcVar2[0x13b] = '\0';
pcVar2[0x13c] = '\0';
pcVar2[0x13d] = '\0';
pcVar2[0x13e] = '\0';
pcVar2[0x13f] = '\0';
pcVar2[0x140] = '\0';
pcVar2[0x141] = '\0';
pcVar2[0x142] = '\0';
pcVar2[0x143] = '\0';
pcVar2[0x144] = '\0';
pcVar2[0x145] = '\0';
pcVar2[0x146] = '\0';
pcVar2[0x147] = '\0';
pcVar2[0x158] = '\0';
pcVar2[0x159] = '\0';
pcVar2[0x15a] = '\0';
pcVar2[0x15b] = '\0';
pcVar2[0x15c] = '\0';
pcVar2[0x15d] = '\0';
pcVar2[0x15e] = '\0';
pcVar2[0x15f] = '\0';
}
uVar3 = uVar3 + 1;
} while (uVar1 != uVar3);
}
return 0;
}
|
|
61,540 |
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 0x7e8a4
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 0x1c090
movl %eax, %r13d
testl %eax, %eax
js 0x7af00
movl %r13d, %esi
movq %rbx, %rdi
callq 0x7e92e
jmp 0x7af3d
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7e92e
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 0x1c090
cmpl %r13d, %eax
jne 0x7af4f
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7be33(%rip), %rdi # 0xf6d89
leaq 0x72678(%rip), %rdx # 0xed5d5
leaq 0x7c4a5(%rip), %rcx # 0xf7409
movl $0x6b8, %esi # imm = 0x6B8
xorl %eax, %eax
callq 0x1bef0
jmp 0x7af72
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7af89
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1b910
movq %r14, %rdi
callq 0x1bff0
|
_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_7AF00
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_7AF3D
loc_7AF00:
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_7AF4F
loc_7AF3D:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7AF4F:
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_7AF72:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_7AF89
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7AF89:
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 0x0017e8a4
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_0017aede:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x0011c090
MOV R13D,EAX
TEST EAX,EAX
JS 0x0017af00
MOV ESI,R13D
MOV RDI,RBX
CALL 0x0017e92e
JMP 0x0017af3d
LAB_0017af00:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x0017e92e
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_0017af25:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x0011c090
CMP EAX,R13D
JNZ 0x0017af4f
LAB_0017af3d:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017af4f:
LEA RDI,[0x1f6d89]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f7409]
MOV ESI,0x6b8
XOR EAX,EAX
CALL 0x0011bef0
|
/* 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 0017aede to 0017af0d has its CatchHandler @ 0017af72 */
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 0017af25 to 0017af6f has its CatchHandler @ 0017af70 */
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;
}
|
|
61,541 |
JS_ThrowTypeErrorOrFalse
|
bluesky950520[P]quickjs/quickjs.c
|
static int __attribute__((format(printf, 3, 4))) JS_ThrowTypeErrorOrFalse(JSContext *ctx, int flags, const char *fmt, ...)
{
va_list ap;
if ((flags & JS_PROP_THROW) ||
((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) {
va_start(ap, fmt);
JS_ThrowError(ctx, JS_TYPE_ERROR, fmt, ap);
va_end(ap);
return -1;
} else {
return FALSE;
}
}
|
O0
|
c
|
JS_ThrowTypeErrorOrFalse:
subq $0xf8, %rsp
testb %al, %al
je 0x3572c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdi, 0xe8(%rsp)
movl %esi, 0xe4(%rsp)
movq %rdx, 0xd8(%rsp)
movl 0xe4(%rsp), %eax
andl $0x4000, %eax # imm = 0x4000
cmpl $0x0, %eax
jne 0x3578a
movl 0xe4(%rsp), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
je 0x357f9
movq 0xe8(%rsp), %rdi
callq 0x37f40
cmpl $0x0, %eax
je 0x357f9
leaq 0xc0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0x100(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
movq 0xe8(%rsp), %rdi
movq 0xd8(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
movl $0x4, %esi
callq 0x2d140
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
leaq 0xc0(%rsp), %rax
movl $0xffffffff, 0xf4(%rsp) # imm = 0xFFFFFFFF
jmp 0x35804
movl $0x0, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_ThrowTypeErrorOrFalse:
sub rsp, 0F8h
test al, al
jz short loc_3572C
movaps [rsp+0F8h+var_C8], xmm0
movaps [rsp+0F8h+var_B8], xmm1
movaps [rsp+0F8h+var_A8], xmm2
movaps [rsp+0F8h+var_98], xmm3
movaps [rsp+0F8h+var_88], xmm4
movaps [rsp+0F8h+var_78], xmm5
movaps [rsp+0F8h+var_68], xmm6
movaps [rsp+0F8h+var_58], xmm7
loc_3572C:
mov [rsp+0F8h+var_D0], r9
mov [rsp+0F8h+var_D8], r8
mov [rsp+0F8h+var_E0], rcx
mov [rsp+0F8h+var_10], rdi
mov [rsp+0F8h+var_14], esi
mov [rsp+0F8h+var_20], rdx
mov eax, [rsp+0F8h+var_14]
and eax, 4000h
cmp eax, 0
jnz short loc_3578A
mov eax, [rsp+0F8h+var_14]
and eax, 8000h
cmp eax, 0
jz loc_357F9
mov rdi, [rsp+0F8h+var_10]
call is_strict_mode
cmp eax, 0
jz short loc_357F9
loc_3578A:
lea rax, [rsp+0F8h+var_38]
mov rcx, rsp
mov [rax+10h], rcx
lea rcx, [rsp+0F8h+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 18h
mov rdi, [rsp+0F8h+var_10]
mov rdx, [rsp+0F8h+var_20]
lea rcx, [rsp+0F8h+var_38]
mov esi, 4
call JS_ThrowError
mov [rsp+0F8h+var_48], rax
mov [rsp+0F8h+var_40], rdx
lea rax, [rsp+0F8h+var_38]
mov [rsp+0F8h+var_4], 0FFFFFFFFh
jmp short loc_35804
loc_357F9:
mov [rsp+0F8h+var_4], 0
loc_35804:
mov eax, [rsp+0F8h+var_4]
add rsp, 0F8h
retn
|
long long JS_ThrowTypeErrorOrFalse(long long a1, int a2, long long a3, ...)
{
va_list va; // [rsp+C0h] [rbp-38h] BYREF
long long v5; // [rsp+D8h] [rbp-20h]
int v6; // [rsp+E4h] [rbp-14h]
long long v7; // [rsp+E8h] [rbp-10h]
v7 = a1;
v6 = a2;
v5 = a3;
if ( (a2 & 0x4000) != 0 || (v6 & 0x8000) != 0 && (unsigned int)is_strict_mode(v7) )
{
va_start(va, a3);
JS_ThrowError(v7, 4u, v5, (long long)va);
return (unsigned int)-1;
}
else
{
return 0;
}
}
|
JS_ThrowTypeErrorOrFalse:
SUB RSP,0xf8
TEST AL,AL
JZ 0x0013572c
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM1
MOVAPS xmmword ptr [RSP + 0x50],XMM2
MOVAPS xmmword ptr [RSP + 0x60],XMM3
MOVAPS xmmword ptr [RSP + 0x70],XMM4
MOVAPS xmmword ptr [RSP + 0x80],XMM5
MOVAPS xmmword ptr [RSP + 0x90],XMM6
MOVAPS xmmword ptr [RSP + 0xa0],XMM7
LAB_0013572c:
MOV qword ptr [RSP + 0x28],R9
MOV qword ptr [RSP + 0x20],R8
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0xe8],RDI
MOV dword ptr [RSP + 0xe4],ESI
MOV qword ptr [RSP + 0xd8],RDX
MOV EAX,dword ptr [RSP + 0xe4]
AND EAX,0x4000
CMP EAX,0x0
JNZ 0x0013578a
MOV EAX,dword ptr [RSP + 0xe4]
AND EAX,0x8000
CMP EAX,0x0
JZ 0x001357f9
MOV RDI,qword ptr [RSP + 0xe8]
CALL 0x00137f40
CMP EAX,0x0
JZ 0x001357f9
LAB_0013578a:
LEA RAX,[RSP + 0xc0]
MOV RCX,RSP
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RSP + 0x100]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x18
MOV RDI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xd8]
LEA RCX,[RSP + 0xc0]
MOV ESI,0x4
CALL 0x0012d140
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xb8],RDX
LEA RAX,[RSP + 0xc0]
MOV dword ptr [RSP + 0xf4],0xffffffff
JMP 0x00135804
LAB_001357f9:
MOV dword ptr [RSP + 0xf4],0x0
LAB_00135804:
MOV EAX,dword ptr [RSP + 0xf4]
ADD RSP,0xf8
RET
|
int4
JS_ThrowTypeErrorOrFalse
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,uint param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int iVar1;
int1 auStack_f8 [24];
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
int8 local_20;
uint local_14;
int8 local_10;
int4 local_4;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_e0 = param_12;
local_d8 = param_13;
local_d0 = param_14;
local_20 = param_11;
local_14 = param_10;
local_10 = param_9;
if ((param_10 & 0x4000) == 0) {
if ((param_10 & 0x8000) != 0) {
iVar1 = is_strict_mode(param_9);
if (iVar1 != 0) goto LAB_0013578a;
}
local_4 = 0;
}
else {
LAB_0013578a:
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x18;
local_28 = auStack_f8;
JS_ThrowError(local_10,4,local_20,&local_38);
local_4 = 0xffffffff;
}
return local_4;
}
|
|
61,542 |
JS_ThrowTypeErrorOrFalse
|
bluesky950520[P]quickjs/quickjs.c
|
static int __attribute__((format(printf, 3, 4))) JS_ThrowTypeErrorOrFalse(JSContext *ctx, int flags, const char *fmt, ...)
{
va_list ap;
if ((flags & JS_PROP_THROW) ||
((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) {
va_start(ap, fmt);
JS_ThrowError(ctx, JS_TYPE_ERROR, fmt, ap);
va_end(ap);
return -1;
} else {
return FALSE;
}
}
|
O2
|
c
|
JS_ThrowTypeErrorOrFalse:
subq $0xd8, %rsp
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x1fd57
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
btl $0xe, %esi
jb 0x1fd7a
xorl %eax, %eax
testw %si, %si
jns 0x1fdaa
movq 0x18(%rdi), %rcx
movq 0x108(%rcx), %rcx
testq %rcx, %rcx
je 0x1fdaa
cmpl $0x0, 0x40(%rcx)
jns 0x1fdaa
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax # imm = 0x3000000018
movq %rax, (%rcx)
pushq $0x4
popq %rsi
callq 0x1c551
pushq $-0x1
popq %rax
addq $0xd8, %rsp
retq
|
JS_ThrowTypeErrorOrFalse:
sub rsp, 0D8h
mov [rsp+0D8h+var_A0], rcx
mov [rsp+0D8h+var_98], r8
mov [rsp+0D8h+var_90], r9
test al, al
jz short loc_1FD57
movaps [rsp+0D8h+var_88], xmm0
movaps [rsp+0D8h+var_78], xmm1
movaps [rsp+0D8h+var_68], xmm2
movaps [rsp+0D8h+var_58], xmm3
movaps [rsp+0D8h+var_48], xmm4
movaps [rsp+0D8h+var_38], xmm5
movaps [rsp+0D8h+var_28], xmm6
movaps [rsp+0D8h+var_18], xmm7
loc_1FD57:
bt esi, 0Eh
jb short loc_1FD7A
xor eax, eax
test si, si
jns short loc_1FDAA
mov rcx, [rdi+18h]
mov rcx, [rcx+108h]
test rcx, rcx
jz short loc_1FDAA
cmp dword ptr [rcx+40h], 0
jns short loc_1FDAA
loc_1FD7A:
lea rax, [rsp+0D8h+var_B8]
mov rcx, rsp
mov [rcx+10h], rax
lea rax, [rsp+0D8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000018h
mov [rcx], rax
push 4
pop rsi
call JS_ThrowError
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_1FDAA:
add rsp, 0D8h
retn
|
long long JS_ThrowTypeErrorOrFalse(long long a1, __int16 a2, long long a3, ...)
{
long long result; // rax
long long v4; // rcx
va_list va; // [rsp+0h] [rbp-D8h] BYREF
if ( (a2 & 0x4000) != 0
|| (result = 0LL, a2 < 0) && (v4 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL)) != 0 && *(int *)(v4 + 64) < 0 )
{
va_start(va, a3);
JS_ThrowError(a1, 4LL, a3, (long long)va);
return -1LL;
}
return result;
}
|
JS_ThrowTypeErrorOrFalse:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x48],R9
TEST AL,AL
JZ 0x0011fd57
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0011fd57:
BT ESI,0xe
JC 0x0011fd7a
XOR EAX,EAX
TEST SI,SI
JNS 0x0011fdaa
MOV RCX,qword ptr [RDI + 0x18]
MOV RCX,qword ptr [RCX + 0x108]
TEST RCX,RCX
JZ 0x0011fdaa
CMP dword ptr [RCX + 0x40],0x0
JNS 0x0011fdaa
LAB_0011fd7a:
LEA RAX,[RSP + 0x20]
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RAX
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000018
MOV qword ptr [RCX],RAX
PUSH 0x4
POP RSI
CALL 0x0011c551
PUSH -0x1
POP RAX
LAB_0011fdaa:
ADD RSP,0xd8
RET
|
int8 JS_ThrowTypeErrorOrFalse(long param_1,uint param_2)
{
long lVar1;
int8 uVar2;
if (((param_2 >> 0xe & 1) != 0) ||
(((uVar2 = 0, (short)param_2 < 0 &&
(lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108), lVar1 != 0)) &&
(*(int *)(lVar1 + 0x40) < 0)))) {
JS_ThrowError(param_1,4);
uVar2 = 0xffffffffffffffff;
}
return uVar2;
}
|
|
61,543 |
JS_NewDate
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_NewDate(JSContext *ctx, double epoch_ms)
{
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_DATE);
if (JS_IsException(obj))
return JS_EXCEPTION;
JS_SetObjectData(ctx, obj, js_float64(time_clip(epoch_ms)));
return obj;
}
|
O1
|
c
|
JS_NewDate:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movapd %xmm0, (%rsp)
movq %rdi, %rbx
xorl %r12d, %r12d
movl $0x3, %edx
xorl %esi, %esi
movl $0xa, %ecx
callq 0x36d56
movq %rdx, %r15
movl $0x6, %edx
cmpl $0x6, %r15d
je 0x36d47
movq %rax, %r14
movapd 0x67a78(%rip), %xmm2 # 0x9e770
movapd (%rsp), %xmm0
andpd %xmm0, %xmm2
movsd 0x67bd7(%rip), %xmm1 # 0x9e8e0
ucomisd %xmm2, %xmm1
jae 0x36d1b
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
jmp 0x36d2d
callq 0xe140
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movq %xmm1, %rcx
movl $0x7, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x36e62
movq %r15, %rdx
movq %r14, %r12
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
JS_NewDate:
push r15
push r14
push r12
push rbx
sub rsp, 18h
movapd [rsp+38h+var_38], xmm0
mov rbx, rdi
xor r12d, r12d
mov edx, 3
xor esi, esi
mov ecx, 0Ah
call js_create_from_ctor
mov r15, rdx
mov edx, 6
cmp r15d, 6
jz short loc_36D47
mov r14, rax
movapd xmm2, cs:xmmword_9E770
movapd xmm0, [rsp+38h+var_38]
andpd xmm2, xmm0
movsd xmm1, cs:qword_9E8E0
ucomisd xmm1, xmm2
jnb short loc_36D1B
mov rcx, 7FF8000000000000h
jmp short loc_36D2D
loc_36D1B:
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
movq rcx, xmm1
loc_36D2D:
mov r8d, 7
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_SetObjectData
mov rdx, r15
mov r12, r14
loc_36D47:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
long long JS_NewDate(long long a1, double a2)
{
long long v2; // r12
long long v3; // rax
long long v4; // rdx
long long v5; // r15
long long v6; // r14
double v7; // rcx
v2 = 0LL;
v3 = js_create_from_ctor(a1, 0LL, 3LL, 10LL);
v5 = v4;
if ( (_DWORD)v4 != 6 )
{
v6 = v3;
if ( fabs(a2) <= 8.64e15 )
v7 = trunc(a1, 0LL, 6LL) + 0.0;
else
v7 = NAN;
JS_SetObjectData(a1, v6, v5, *(_QWORD *)&v7, 7LL);
return v6;
}
return v2;
}
| |||
61,544 |
JS_NewDate
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_NewDate(JSContext *ctx, double epoch_ms)
{
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_DATE);
if (JS_IsException(obj))
return JS_EXCEPTION;
JS_SetObjectData(ctx, obj, js_float64(time_clip(epoch_ms)));
return obj;
}
|
O2
|
c
|
JS_NewDate:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movapd %xmm0, (%rsp)
movq %rdi, %r15
pushq $0x3
popq %rdx
pushq $0xa
popq %rcx
xorl %esi, %esi
callq 0x3045a
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x303f8
pushq $0x6
popq %rbx
xorl %r14d, %r14d
jmp 0x3044a
movq %rax, %r14
movapd 0x552fd(%rip), %xmm2 # 0x85700
movapd (%rsp), %xmm0
andpd %xmm0, %xmm2
movsd 0x553fc(%rip), %xmm1 # 0x85810
ucomisd %xmm2, %xmm1
jae 0x30426
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
jmp 0x30438
callq 0xe150
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movq %xmm1, %rcx
pushq $0x7
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3055c
movq %r14, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
JS_NewDate:
push r15
push r14
push rbx
sub rsp, 10h
movapd [rsp+28h+var_28], xmm0
mov r15, rdi
push 3
pop rdx
push 0Ah
pop rcx
xor esi, esi
call js_create_from_ctor
mov rbx, rdx
cmp ebx, 6
jnz short loc_303F8
push 6
pop rbx
xor r14d, r14d
jmp short loc_3044A
loc_303F8:
mov r14, rax
movapd xmm2, cs:xmmword_85700
movapd xmm0, [rsp+28h+var_28]
andpd xmm2, xmm0
movsd xmm1, cs:qword_85810
ucomisd xmm1, xmm2
jnb short loc_30426
mov rcx, 7FF8000000000000h
jmp short loc_30438
loc_30426:
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
movq rcx, xmm1
loc_30438:
push 7
pop r8
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetObjectData
loc_3044A:
mov rax, r14
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long JS_NewDate(long long a1, double a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rbx
long long v5; // r14
double v6; // rcx
v2 = js_create_from_ctor(a1, 0LL, 3LL, 10LL);
v4 = v3;
if ( (_DWORD)v3 == 6 )
return 0LL;
v5 = v2;
if ( fabs(a2) <= 8.64e15 )
v6 = trunc() + 0.0;
else
v6 = NAN;
JS_SetObjectData(a1, v5, v4, *(_QWORD *)&v6, 7LL);
return v5;
}
|
JS_NewDate:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOVAPD xmmword ptr [RSP],XMM0
MOV R15,RDI
PUSH 0x3
POP RDX
PUSH 0xa
POP RCX
XOR ESI,ESI
CALL 0x0013045a
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x001303f8
PUSH 0x6
POP RBX
XOR R14D,R14D
JMP 0x0013044a
LAB_001303f8:
MOV R14,RAX
MOVAPD XMM2,xmmword ptr [0x00185700]
MOVAPD XMM0,xmmword ptr [RSP]
ANDPD XMM2,XMM0
MOVSD XMM1,qword ptr [0x00185810]
UCOMISD XMM1,XMM2
JNC 0x00130426
MOV RCX,0x7ff8000000000000
JMP 0x00130438
LAB_00130426:
CALL 0x0010e150
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
MOVQ RCX,XMM1
LAB_00130438:
PUSH 0x7
POP R8
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0013055c
LAB_0013044a:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16] JS_NewDate(double param_1,int8 param_2)
{
double dVar1;
int1 auVar2 [16];
auVar2 = js_create_from_ctor(param_2,0,3,10);
if (auVar2._8_4_ == 6) {
auVar2 = ZEXT816(6) << 0x40;
}
else {
if ((double)(_DAT_00185700 & (ulong)param_1) <= DAT_00185810) {
dVar1 = trunc(param_1);
dVar1 = dVar1 + 0.0;
}
else {
dVar1 = NAN;
}
JS_SetObjectData(param_2,auVar2._0_8_,auVar2._8_8_,dVar1,7);
}
return auVar2;
}
|
|
61,545 |
ggml_diag
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
struct ggml_tensor * ggml_diag(
struct ggml_context * ctx,
struct ggml_tensor * a) {
GGML_ASSERT(a->ne[1] == 1);
bool is_node = false;
if (a->grad) {
is_node = true;
}
const int64_t ne[4] = { a->ne[0], a->ne[0], a->ne[2], a->ne[3] };
struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, 4, ne);
result->op = GGML_OP_DIAG;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O2
|
c
|
ggml_diag:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x1, 0x18(%rsi)
jne 0x6c9c1
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r12
vinsertf128 $0x1, 0x20(%rsi), %ymm0, %ymm0
vmovddup 0x10(%rsi), %xmm1 # xmm1 = mem[0,0]
vblendps $0xf0, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7]
movq %rsp, %rcx
vmovups %ymm0, (%rcx)
movl (%rsi), %esi
pushq $0x4
popq %rdx
vzeroupper
callq 0x6835b
movq %rax, %r15
movl $0x24, 0x50(%rax)
testq %r12, %r12
je 0x6c9a2
movq %r14, %rdi
movq %r15, %rsi
callq 0x68a65
jmp 0x6c9a4
xorl %eax, %eax
movq %rax, 0x98(%r15)
movq %rbx, 0xa0(%r15)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x69580(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x695d1(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2d83d(%rip), %rsi # 0x9a21e
leaq 0x34e96(%rip), %rdx # 0xa187e
leaq 0x3557a(%rip), %r8 # 0xa1f69
movl $0x12d0, %ecx # imm = 0x12D0
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
|
ggml_diag:
push r15
push r14
push r12
push rbx
sub rsp, 28h
cmp qword ptr [rsi+18h], 1
jnz short loc_6C9C1
mov rbx, rsi
mov r14, rdi
mov r12, [rsi+98h]
vinsertf128 ymm0, ymm0, xmmword ptr [rsi+20h], 1
vmovddup xmm1, qword ptr [rsi+10h]
vblendps ymm0, ymm1, ymm0, 0F0h
mov rcx, rsp
vmovups ymmword ptr [rcx], ymm0
mov esi, [rsi]
push 4
pop rdx
vzeroupper
call ggml_new_tensor
mov r15, rax
mov dword ptr [rax+50h], 24h ; '$'
test r12, r12
jz short loc_6C9A2
mov rdi, r14
mov rsi, r15
call ggml_dup_tensor
jmp short loc_6C9A4
loc_6C9A2:
xor eax, eax
loc_6C9A4:
mov [r15+98h], rax
mov [r15+0A0h], rbx
mov rax, r15
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_6C9C1:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aANe11; "a->ne[1] == 1"
mov ecx, 12D0h
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
|
unsigned int * ggml_diag(long long a1, unsigned int *_RSI)
{
long long v4; // r12
unsigned int *v9; // rax
unsigned int *v10; // r15
long long v11; // rax
long long v13; // rdi
_BYTE v14[72]; // [rsp+0h] [rbp-48h] BYREF
if ( *((_QWORD *)_RSI + 3) != 1LL )
{
fflush(stdout);
v13 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4816,
"a->ne[1] == 1");
ggml_print_backtrace();
abort(v13);
}
v4 = *((_QWORD *)_RSI + 19);
__asm
{
vinsertf128 ymm0, ymm0, xmmword ptr [rsi+20h], 1
vmovddup xmm1, qword ptr [rsi+10h]
vblendps ymm0, ymm1, ymm0, 0F0h
}
_RCX = v14;
__asm
{
vmovups ymmword ptr [rcx], ymm0
vzeroupper
}
v9 = (unsigned int *)ggml_new_tensor(a1, *_RSI, 4LL, (long long)v14);
v10 = v9;
v9[20] = 36;
if ( v4 )
v11 = ggml_dup_tensor(a1, v9);
else
v11 = 0LL;
*((_QWORD *)v10 + 19) = v11;
*((_QWORD *)v10 + 20) = _RSI;
return v10;
}
|
ggml_diag:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP qword ptr [RSI + 0x18],0x1
JNZ 0x0016c9c1
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RSI + 0x98]
VINSERTF128 YMM0,YMM0,xmmword ptr [RSI + 0x20],0x1
VMOVDDUP XMM1,qword ptr [RSI + 0x10]
VBLENDPS YMM0,YMM1,YMM0,0xf0
MOV RCX,RSP
VMOVUPS ymmword ptr [RCX],YMM0
MOV ESI,dword ptr [RSI]
PUSH 0x4
POP RDX
VZEROUPPER
CALL 0x0016835b
MOV R15,RAX
MOV dword ptr [RAX + 0x50],0x24
TEST R12,R12
JZ 0x0016c9a2
MOV RDI,R14
MOV RSI,R15
CALL 0x00168a65
JMP 0x0016c9a4
LAB_0016c9a2:
XOR EAX,EAX
LAB_0016c9a4:
MOV qword ptr [R15 + 0x98],RAX
MOV qword ptr [R15 + 0xa0],RBX
MOV RAX,R15
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0016c9c1:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1f69]
MOV ECX,0x12d0
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_diag(int8 param_1,int4 *param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int1 auVar4 [32];
int1 in_ZMM0 [64];
if (*(long *)(param_2 + 6) != 1) {
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
0x12d0,"a->ne[1] == 1");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
lVar1 = *(long *)(param_2 + 0x26);
auVar4._0_16_ = in_ZMM0._0_16_;
auVar4._16_16_ = *(int1 (*) [16])(param_2 + 8);
vblendps_avx(ZEXT1632(CONCAT88(*(int8 *)(param_2 + 4),*(int8 *)(param_2 + 4))),auVar4,
0xf0);
lVar2 = ggml_new_tensor(param_1,*param_2,4);
*(int4 *)(lVar2 + 0x50) = 0x24;
if (lVar1 == 0) {
uVar3 = 0;
}
else {
uVar3 = ggml_dup_tensor(param_1,lVar2);
}
*(int8 *)(lVar2 + 0x98) = uVar3;
*(int4 **)(lVar2 + 0xa0) = param_2;
return lVar2;
}
|
|
61,546 |
ggml_diag
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
struct ggml_tensor * ggml_diag(
struct ggml_context * ctx,
struct ggml_tensor * a) {
GGML_ASSERT(a->ne[1] == 1);
bool is_node = false;
if (a->grad) {
is_node = true;
}
const int64_t ne[4] = { a->ne[0], a->ne[0], a->ne[2], a->ne[3] };
struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, 4, ne);
result->op = GGML_OP_DIAG;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O3
|
c
|
ggml_diag:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
cmpq $0x1, 0x18(%rsi)
jne 0x926ad
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r13
vinsertf128 $0x1, 0x20(%rsi), %ymm0, %ymm0
vmovddup 0x10(%rsi), %xmm1 # xmm1 = mem[0,0]
vblendps $0xf0, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7]
movq %rsp, %rcx
vmovups %ymm0, (%rcx)
movl (%rsi), %esi
xorl %r12d, %r12d
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
vzeroupper
callq 0x8d64f
movq %rax, %r15
movl $0x24, 0x50(%rax)
testq %r13, %r13
je 0x9268e
movl (%r15), %esi
movq %r15, %rcx
addq $0x10, %rcx
movq %r14, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r12
movq %r12, 0x98(%r15)
movq %rbx, 0xa0(%r15)
movq %r15, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0xdc7e
|
ggml_diag:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
cmp qword ptr [rsi+18h], 1
jnz loc_926AD
mov rbx, rsi
mov r14, rdi
mov r13, [rsi+98h]
vinsertf128 ymm0, ymm0, xmmword ptr [rsi+20h], 1
vmovddup xmm1, qword ptr [rsi+10h]
vblendps ymm0, ymm1, ymm0, 0F0h
mov rcx, rsp
vmovups ymmword ptr [rcx], ymm0
mov esi, [rsi]
xor r12d, r12d
mov edx, 4
xor r8d, r8d
xor r9d, r9d
vzeroupper
call ggml_new_tensor_impl
mov r15, rax
mov dword ptr [rax+50h], 24h ; '$'
test r13, r13
jz short loc_9268E
mov esi, [r15]
mov rcx, r15
add rcx, 10h
mov rdi, r14
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r12, rax
loc_9268E:
mov [r15+98h], r12
mov [r15+0A0h], rbx
mov rax, r15
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_926AD:
call ggml_diag_cold_1
|
long long ggml_diag(long long a1, long long _RSI, __m128 a3)
{
long long v5; // r13
long long v10; // r12
long long v11; // rax
long long v12; // r15
_QWORD v14[9]; // [rsp+0h] [rbp-48h] BYREF
if ( *(_QWORD *)(_RSI + 24) != 1LL )
ggml_diag_cold_1();
v5 = *(_QWORD *)(_RSI + 152);
__asm
{
vinsertf128 ymm0, ymm0, xmmword ptr [rsi+20h], 1
vmovddup xmm1, qword ptr [rsi+10h]
vblendps ymm0, ymm1, ymm0, 0F0h
}
_RCX = v14;
__asm { vmovups ymmword ptr [rcx], ymm0 }
v10 = 0LL;
__asm { vzeroupper }
v11 = ggml_new_tensor_impl(a1, *(_DWORD *)_RSI, 4, v14, 0LL, 0LL, a3, _XMM1);
v12 = v11;
*(_DWORD *)(v11 + 80) = 36;
if ( v5 )
v10 = ggml_new_tensor_impl(a1, *(_DWORD *)v11, 4, (_QWORD *)(v11 + 16), 0LL, 0LL, a3, _XMM1);
*(_QWORD *)(v12 + 152) = v10;
*(_QWORD *)(v12 + 160) = _RSI;
return v12;
}
| |||
61,547 |
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/arg.cpp
|
static ggml_type kv_cache_type_from_str(const std::string & s) {
for (const auto & type : kv_cache_types) {
if (ggml_type_name(type) == s) {
return type;
}
}
throw std::runtime_error("Unsupported cache type: " + s);
}
|
O3
|
cpp
|
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x101eea(%rip), %rbx # 0x162ec8
movq 0x101eeb(%rip), %r15 # 0x162ed0
cmpq %r15, %rbx
je 0x61013
movl (%rbx), %edi
callq 0x212b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x20f10
testl %eax, %eax
je 0x61006
addq $0x4, %rbx
jmp 0x60fe5
movl (%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20620
movq %rax, %rbx
leaq 0xba799(%rip), %rsi # 0x11b7c0
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x65321
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x20450
xorl %ebp, %ebp
movq 0x100f73(%rip), %rsi # 0x161fc0
movq 0x100f2c(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a30
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6107a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
testb %bpl, %bpl
jne 0x61084
jmp 0x6108c
movq %rax, %r14
movq %rbx, %rdi
callq 0x20eb0
movq %r14, %rdi
callq 0x20ad0
|
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov r14, rdi
mov rbx, cs:_ZL14kv_cache_types; kv_cache_types
mov r15, cs:qword_162ED0
loc_60FE5:
cmp rbx, r15
jz short loc_61013
mov edi, [rbx]
call _ggml_type_name
mov rdi, r14
mov rsi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_61006
add rbx, 4
jmp short loc_60FE5
loc_61006:
mov eax, [rbx]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_61013:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnsupportedCac; "Unsupported cache type: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6107A
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6107A:
test bpl, bpl
jnz short loc_61084
jmp short loc_6108C
mov r14, rax
loc_61084:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6108C:
mov rdi, r14
call __Unwind_Resume
|
long long kv_cache_type_from_str(long long a1)
{
unsigned int *v1; // rbx
long long v2; // r15
long long v3; // rax
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-40h] BYREF
v1 = (unsigned int *)kv_cache_types;
v2 = qword_162ED0;
while ( 1 )
{
if ( v1 == (unsigned int *)v2 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v6, "Unsupported cache type: ", a1);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = ggml_type_name(*v1);
if ( !(unsigned int)std::string::compare(a1, v3) )
break;
++v1;
}
return *v1;
}
|
kv_cache_type_from_str:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RBX,qword ptr [0x00262ec8]
MOV R15,qword ptr [0x00262ed0]
LAB_00160fe5:
CMP RBX,R15
JZ 0x00161013
MOV EDI,dword ptr [RBX]
CALL 0x001212b0
MOV RDI,R14
MOV RSI,RAX
CALL 0x00120f10
TEST EAX,EAX
JZ 0x00161006
ADD RBX,0x4
JMP 0x00160fe5
LAB_00161006:
MOV EAX,dword ptr [RBX]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00161013:
MOV EDI,0x10
CALL 0x00120620
MOV RBX,RAX
LAB_00161020:
LEA RSI,[0x21b7c0]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00165321
MOV BPL,0x1
LAB_00161037:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00120450
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a30
|
/* kv_cache_type_from_str(std::__cxx11::string const&) */
int4 kv_cache_type_from_str(string *param_1)
{
int4 *puVar1;
int iVar2;
runtime_error *this;
int4 *puVar3;
string local_40 [32];
puVar1 = DAT_00262ed0;
puVar3 = kv_cache_types;
while( true ) {
if (puVar3 == puVar1) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00161020 to 00161033 has its CatchHandler @ 00161081 */
std::operator+((char *)local_40,(string *)"Unsupported cache type: ");
/* try { // try from 00161037 to 0016105b has its CatchHandler @ 0016105c */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
ggml_type_name(*puVar3);
iVar2 = std::__cxx11::string::compare((char *)param_1);
if (iVar2 == 0) break;
puVar3 = puVar3 + 1;
}
return *puVar3;
}
|
|
61,548 |
tokenize_mixed(llama_vocab const*, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, bool)
|
monkey531[P]llama/examples/server/utils.hpp
|
static llama_tokens tokenize_mixed(const llama_vocab * vocab, const json & json_prompt, bool add_special, bool parse_special) {
// If `add_bos` is true, we only add BOS, when json_prompt is a string,
// or the first element of the json_prompt array is a string.
llama_tokens prompt_tokens;
if (json_prompt.is_array()) {
bool first = true;
for (const auto & p : json_prompt) {
if (p.is_string()) {
auto s = p.template get<std::string>();
llama_tokens p;
if (first) {
p = common_tokenize(vocab, s, add_special, parse_special);
first = false;
} else {
p = common_tokenize(vocab, s, false, parse_special);
}
prompt_tokens.insert(prompt_tokens.end(), p.begin(), p.end());
} else {
if (first) {
first = false;
}
prompt_tokens.push_back(p.template get<llama_token>());
}
}
} else {
auto s = json_prompt.template get<std::string>();
prompt_tokens = common_tokenize(vocab, s, add_special, parse_special);
}
return prompt_tokens;
}
|
O1
|
cpp
|
tokenize_mixed(llama_vocab const*, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpb $0x2, (%rdx)
jne 0x326c5
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x7ba16
leaq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0x7bada
movl %ebp, %ecx
movb $0x1, %bpl
leaq 0x38(%rsp), %r13
movzbl %r14b, %eax
movl %eax, 0x1c(%rsp)
movzbl %cl, %eax
movl %eax, 0xc(%rsp)
movq %r15, %rdi
leaq 0x78(%rsp), %rsi
callq 0x7bb92
testb %al, %al
jne 0x32731
movq %r15, %rdi
callq 0x786e4
cmpb $0x3, (%rax)
jne 0x32606
movq %r13, %rdi
movq %rax, %rsi
callq 0x7bf0e
testb $0x1, %bpl
je 0x32643
leaq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movl 0x1c(%rsp), %ecx
movl 0xc(%rsp), %r8d
callq 0x10d8d2
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r14
xorl %ebp, %ebp
jmp 0x3266b
movzbl %bpl, %ebp
testb $0x1, %bpl
movl $0x0, %ecx
cmovnel %ecx, %ebp
movl %ecx, 0x38(%rsp)
movq %rax, %rdi
movq %r13, %rsi
callq 0x7753b
movl 0x38(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x326ab
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x326b8
leaq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl 0xc(%rsp), %r8d
callq 0x10d8d2
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r14
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x88e48
testq %r12, %r12
je 0x3268d
subq %r12, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x1fae0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x326b8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x326b8
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x89080
movq %r15, %rdi
callq 0x78a4e
jmp 0x325a5
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x7bf0e
movzbl %r14b, %ecx
movzbl %bpl, %r8d
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq 0x10(%rsp), %rsi
callq 0x10d8d2
leaq 0x78(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x79b38
movq (%r14), %rdi
testq %rdi, %rdi
je 0x32716
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x1fae0
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32731
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x327aa
movq 0x68(%rsp), %rsi
jmp 0x32799
jmp 0x327a7
jmp 0x32762
movq %rax, %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
jmp 0x32772
jmp 0x327a7
movq %rax, %r15
testq %r12, %r12
je 0x32785
subq %r12, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x1fae0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x327aa
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x327aa
jmp 0x327a7
jmp 0x327a7
movq %rax, %r15
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x327be
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1fae0
movq %r15, %rdi
callq 0x20380
|
_ZL14tokenize_mixedPK11llama_vocabRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov [rsp+0C8h+var_B8], rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
cmp byte ptr [rdx], 2
jnz loc_326C5
lea r15, [rsp+0C8h+var_70]
mov rdi, r15
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void)
lea rdi, [rsp+0C8h+var_50]
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void)
mov ecx, ebp
mov bpl, 1
lea r13, [rsp+0C8h+var_90]
movzx eax, r14b
mov [rsp+0C8h+var_AC], eax
movzx eax, cl
mov [rsp+0C8h+var_BC], eax
loc_325A5:
mov rdi, r15
lea rsi, [rsp+0C8h+var_50]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_32731
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
cmp byte ptr [rax], 3
jnz short loc_32606
mov rdi, r13
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
test bpl, 1
jz short loc_32643
lea rdi, [rsp+0C8h+var_A8]
mov rsi, [rsp+0C8h+var_B8]
mov rdx, r13
mov ecx, [rsp+0C8h+var_AC]
mov r8d, [rsp+0C8h+var_BC]
call _Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; common_tokenize(llama_vocab const*,std::string const&,bool,bool)
mov r12, [rsp+0C8h+var_A8]
mov rcx, [rsp+0C8h+var_A0]
mov r14, [rsp+0C8h+var_98]
xor ebp, ebp
jmp short loc_3266B
loc_32606:
movzx ebp, bpl
test bpl, 1
mov ecx, 0
cmovnz ebp, ecx
mov dword ptr [rsp+0C8h+var_90], ecx
mov rdi, rax
mov rsi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov eax, dword ptr [rsp+0C8h+var_90]
mov dword ptr [rsp+0C8h+var_A8], eax
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_326AB
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_326B8
loc_32643:
lea rdi, [rsp+0C8h+var_A8]
mov rsi, [rsp+0C8h+var_B8]
mov rdx, r13
xor ecx, ecx
mov r8d, [rsp+0C8h+var_BC]
call _Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; common_tokenize(llama_vocab const*,std::string const&,bool,bool)
mov r12, [rsp+0C8h+var_A8]
mov rcx, [rsp+0C8h+var_A0]
mov r14, [rsp+0C8h+var_98]
loc_3266B:
mov rsi, [rbx+8]
mov rdi, rbx
mov rdx, r12
call _ZNSt6vectorIiSaIiEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEEEvS6_T_S7_St20forward_iterator_tag; std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::forward_iterator_tag)
test r12, r12
jz short loc_3268D
sub r14, r12
mov rdi, r12; void *
mov rsi, r14; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3268D:
mov rdi, [rsp+0C8h+var_90]; void *
lea rax, [rsp+0C8h+var_80]
cmp rdi, rax
jz short loc_326B8
mov rsi, [rsp+0C8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_326B8
loc_326AB:
mov rdi, rbx
lea rdx, [rsp+0C8h+var_A8]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
loc_326B8:
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator++(void)
jmp loc_325A5
loc_326C5:
lea rdi, [rsp+0C8h+var_70]
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
movzx ecx, r14b
movzx r8d, bpl
lea rdi, [rsp+0C8h+var_50]
lea rdx, [rsp+0C8h+var_70]
mov rsi, [rsp+0C8h+var_B8]
call _Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; common_tokenize(llama_vocab const*,std::string const&,bool,bool)
lea r14, [rsp+0C8h+var_50]
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorIiSaIiEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<int>::_M_move_assign(std::vector<int>&&,std::integral_constant<bool,true>)
mov rdi, [r14]; void *
test rdi, rdi
jz short loc_32716
mov rsi, [rsp+0C8h+var_40]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_32716:
lea rax, [rsp+0C8h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_32731
mov rsi, [rsp+0C8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_32731:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
lea rax, [rsp+arg_60]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_327AA
mov rsi, [rsp+arg_60]
jmp short loc_32799
jmp short loc_327A7
jmp short $+2
loc_32762:
mov r15, rax
xor r14d, r14d
xor r12d, r12d
jmp short loc_32772
jmp short loc_327A7
mov r15, rax
loc_32772:
test r12, r12
jz short loc_32785
sub r14, r12
mov rdi, r12; void *
mov rsi, r14; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_32785:
mov rdi, [rsp+arg_30]; void *
lea rax, [rsp+arg_40]
cmp rdi, rax
jz short loc_327AA
mov rsi, [rsp+arg_40]
loc_32799:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_327AA
jmp short loc_327A7
jmp short $+2
loc_327A7:
mov r15, rax
loc_327AA:
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_327BE
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_327BE:
mov rdi, r15
call __Unwind_Resume
|
long long tokenize_mixed(long long a1, long long a2, _BYTE *a3, unsigned __int8 a4, unsigned __int8 a5)
{
unsigned __int8 v8; // cl
char v9; // bp
_BYTE *v10; // rax
void *v11; // r12
long long v12; // rcx
long long v13; // r14
_DWORD *v14; // rsi
unsigned int v16; // [rsp+Ch] [rbp-BCh]
unsigned int v18; // [rsp+1Ch] [rbp-ACh]
void *v19; // [rsp+20h] [rbp-A8h] BYREF
long long v20; // [rsp+28h] [rbp-A0h]
long long v21; // [rsp+30h] [rbp-98h]
void *v22[2]; // [rsp+38h] [rbp-90h] BYREF
long long v23; // [rsp+48h] [rbp-80h] BYREF
void *v24[2]; // [rsp+58h] [rbp-70h] BYREF
long long v25; // [rsp+68h] [rbp-60h] BYREF
void *v26[10]; // [rsp+78h] [rbp-50h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
if ( *a3 == 2 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin(
v24,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend(
v26,
a3);
v8 = a5;
v9 = 1;
v18 = a4;
v16 = v8;
while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
v24,
v26) )
{
v10 = (_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(v24);
if ( *v10 == 3 )
{
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v22,
v10);
if ( (v9 & 1) != 0 )
{
common_tokenize(&v19, a2, v22, v18, v16);
v11 = v19;
v12 = v20;
v13 = v21;
v9 = 0;
}
else
{
common_tokenize(&v19, a2, v22, 0LL, v16);
v11 = v19;
v12 = v20;
v13 = v21;
}
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(
a1,
*(_QWORD *)(a1 + 8),
v11,
v12);
if ( v11 )
operator delete(v11, v13 - (_QWORD)v11);
if ( v22[0] != &v23 )
operator delete(v22[0], v23 + 1);
}
else
{
if ( (v9 & 1) != 0 )
v9 = 0;
LODWORD(v22[0]) = 0;
ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
v10,
v22);
LODWORD(v19) = v22[0];
v14 = *(_DWORD **)(a1 + 8);
if ( v14 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int>(a1, v14, &v19);
}
else
{
*v14 = v22[0];
*(_QWORD *)(a1 + 8) = v14 + 1;
}
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(v24);
}
}
else
{
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v24,
a3);
common_tokenize(v26, a2, v24, a4, a5);
std::vector<int>::_M_move_assign(a1, v26);
if ( v26[0] )
operator delete(v26[0], (char *)v26[2] - (char *)v26[0]);
if ( v24[0] != &v25 )
operator delete(v24[0], v25 + 1);
}
return a1;
}
|
tokenize_mixed:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV qword ptr [RSP + 0x10],RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
CMP byte ptr [RDX],0x2
JNZ 0x001326c5
LEA R15,[RSP + 0x58]
MOV RDI,R15
MOV RSI,R12
CALL 0x0017ba16
LEA RDI,[RSP + 0x78]
MOV RSI,R12
CALL 0x0017bada
MOV ECX,EBP
MOV BPL,0x1
LEA R13,[RSP + 0x38]
MOVZX EAX,R14B
MOV dword ptr [RSP + 0x1c],EAX
MOVZX EAX,CL
MOV dword ptr [RSP + 0xc],EAX
LAB_001325a5:
MOV RDI,R15
LEA RSI,[RSP + 0x78]
CALL 0x0017bb92
TEST AL,AL
JNZ 0x00132731
LAB_001325ba:
MOV RDI,R15
CALL 0x001786e4
CMP byte ptr [RAX],0x3
JNZ 0x00132606
LAB_001325c7:
MOV RDI,R13
MOV RSI,RAX
CALL 0x0017bf0e
TEST BPL,0x1
JZ 0x00132643
LAB_001325d8:
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R13
MOV ECX,dword ptr [RSP + 0x1c]
MOV R8D,dword ptr [RSP + 0xc]
CALL 0x0020d8d2
MOV R12,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
MOV R14,qword ptr [RSP + 0x30]
XOR EBP,EBP
JMP 0x0013266b
LAB_00132606:
MOVZX EBP,BPL
TEST BPL,0x1
MOV ECX,0x0
CMOVNZ EBP,ECX
MOV dword ptr [RSP + 0x38],ECX
LAB_0013261a:
MOV RDI,RAX
MOV RSI,R13
CALL 0x0017753b
MOV EAX,dword ptr [RSP + 0x38]
MOV dword ptr [RSP + 0x20],EAX
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001326ab
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001326b8
LAB_00132643:
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R13
XOR ECX,ECX
MOV R8D,dword ptr [RSP + 0xc]
CALL 0x0020d8d2
MOV R12,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
MOV R14,qword ptr [RSP + 0x30]
LAB_0013266b:
MOV RSI,qword ptr [RBX + 0x8]
LAB_0013266f:
MOV RDI,RBX
MOV RDX,R12
CALL 0x00188e48
TEST R12,R12
JZ 0x0013268d
SUB R14,R12
MOV RDI,R12
MOV RSI,R14
CALL 0x0011fae0
LAB_0013268d:
MOV RDI,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x001326b8
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011fae0
JMP 0x001326b8
LAB_001326ab:
MOV RDI,RBX
LEA RDX,[RSP + 0x20]
CALL 0x00189080
LAB_001326b8:
MOV RDI,R15
CALL 0x00178a4e
JMP 0x001325a5
LAB_001326c5:
LEA RDI,[RSP + 0x58]
MOV RSI,R12
CALL 0x0017bf0e
LAB_001326d2:
MOVZX ECX,R14B
MOVZX R8D,BPL
LEA RDI,[RSP + 0x78]
LEA RDX,[RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0020d8d2
LAB_001326ee:
LEA R14,[RSP + 0x78]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00179b38
MOV RDI,qword ptr [R14]
TEST RDI,RDI
JZ 0x00132716
MOV RSI,qword ptr [RSP + 0x88]
SUB RSI,RDI
CALL 0x0011fae0
LAB_00132716:
LEA RAX,[RSP + 0x68]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00132731
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x0011fae0
LAB_00132731:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* tokenize_mixed(llama_vocab 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> const&, bool, bool) */
llama_vocab * tokenize_mixed(llama_vocab *param_1,basic_json *param_2,bool param_3,bool param_4)
{
int4 *puVar1;
bool bVar2;
long lVar3;
char cVar4;
char *pcVar5;
bool bVar6;
int7 in_register_00000011;
void *pvVar7;
int4 local_a8;
int4 uStack_a4;
long local_98;
int4 local_90;
int4 uStack_8c;
long local_80 [2];
long *local_70 [2];
long local_60 [2];
void *local_50 [2];
long local_40;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if (*(char *)CONCAT71(in_register_00000011,param_3) == '\x02') {
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>
::cbegin();
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>
::cend();
bVar2 = true;
while( true ) {
/* try { // try from 001325a5 to 001325b1 has its CatchHandler @ 001327a7 */
cVar4 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)local_70,local_50);
if (cVar4 != '\0') break;
/* try { // try from 001325ba to 001325c1 has its CatchHandler @ 001327a5 */
pcVar5 = (char *)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)local_70);
if (*pcVar5 == '\x03') {
/* try { // try from 001325c7 to 001325d1 has its CatchHandler @ 0013276d */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(&local_90,pcVar5);
bVar6 = SUB81(&local_90,0);
if (bVar2) {
/* try { // try from 001325d8 to 001325f2 has its CatchHandler @ 00132760 */
common_tokenize((llama_vocab *)&local_a8,(string *)param_2,bVar6,param_4);
pvVar7 = (void *)CONCAT44(uStack_a4,local_a8);
bVar2 = false;
}
else {
/* try { // try from 00132643 to 0013265b has its CatchHandler @ 00132762 */
common_tokenize((llama_vocab *)&local_a8,(string *)param_2,bVar6,false);
pvVar7 = (void *)CONCAT44(uStack_a4,local_a8);
}
lVar3 = local_98;
/* try { // try from 0013266f to 00132679 has its CatchHandler @ 0013276f */
std::vector<int,std::allocator<int>>::
_M_range_insert<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>>
(param_1,*(int8 *)(param_1 + 8),pvVar7);
if (pvVar7 != (void *)0x0) {
operator_delete(pvVar7,lVar3 - (long)pvVar7);
}
if ((long *)CONCAT44(uStack_8c,local_90) != local_80) {
operator_delete((long *)CONCAT44(uStack_8c,local_90),local_80[0] + 1);
}
}
else {
if (bVar2) {
bVar2 = false;
}
local_90 = 0;
/* try { // try from 0013261a to 00132624 has its CatchHandler @ 001327a3 */
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(pcVar5,&local_90);
local_a8 = local_90;
puVar1 = *(int4 **)(param_1 + 8);
if (puVar1 == *(int4 **)(param_1 + 0x10)) {
/* try { // try from 001326ab to 001326b7 has its CatchHandler @ 001327a3 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)param_1,puVar1,&local_a8);
}
else {
*puVar1 = local_90;
*(int4 **)(param_1 + 8) = puVar1 + 1;
}
}
/* try { // try from 001326b8 to 001326bf has its CatchHandler @ 001327a7 */
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)local_70);
}
}
else {
/* try { // try from 001326c5 to 001326d1 has its CatchHandler @ 0013275e */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_70,(char *)CONCAT71(in_register_00000011,param_3));
/* try { // try from 001326d2 to 001326ed has its CatchHandler @ 00132746 */
common_tokenize((llama_vocab *)local_50,(string *)param_2,SUB81(local_70,0),param_4);
std::vector<int,std::allocator<int>>::_M_move_assign(param_1,local_50);
if (local_50[0] != (void *)0x0) {
operator_delete(local_50[0],local_40 - (long)local_50[0]);
}
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
}
return param_1;
}
|
|
61,549 |
tokenize_mixed(llama_vocab const*, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, bool)
|
monkey531[P]llama/examples/server/utils.hpp
|
static llama_tokens tokenize_mixed(const llama_vocab * vocab, const json & json_prompt, bool add_special, bool parse_special) {
// If `add_bos` is true, we only add BOS, when json_prompt is a string,
// or the first element of the json_prompt array is a string.
llama_tokens prompt_tokens;
if (json_prompt.is_array()) {
bool first = true;
for (const auto & p : json_prompt) {
if (p.is_string()) {
auto s = p.template get<std::string>();
llama_tokens p;
if (first) {
p = common_tokenize(vocab, s, add_special, parse_special);
first = false;
} else {
p = common_tokenize(vocab, s, false, parse_special);
}
prompt_tokens.insert(prompt_tokens.end(), p.begin(), p.end());
} else {
if (first) {
first = false;
}
prompt_tokens.push_back(p.template get<llama_token>());
}
}
} else {
auto s = json_prompt.template get<std::string>();
prompt_tokens = common_tokenize(vocab, s, add_special, parse_special);
}
return prompt_tokens;
}
|
O3
|
cpp
|
tokenize_mixed(llama_vocab const*, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpb $0x2, (%rdx)
jne 0x319b1
leaq 0x78(%rsp), %r15
movq %r13, (%r15)
movups %xmm0, 0x8(%r15)
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq %r12, 0x18(%r15)
movq %r15, %rdi
callq 0x79bd4
leaq 0x30(%rsp), %rdi
movq %r13, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %r12, 0x18(%rdi)
callq 0x79c46
movb $0x1, %r12b
leaq 0x58(%rsp), %r13
movzbl %r14b, %eax
movl %eax, 0x14(%rsp)
movzbl %bpl, %eax
movl %eax, 0x4(%rsp)
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
callq 0x79cac
testb %al, %al
jne 0x31a48
movq %r15, %rdi
callq 0x768b6
cmpb $0x3, (%rax)
jne 0x318f1
movq %r13, %rdi
movq %rax, %rsi
callq 0x7a024
testb $0x1, %r12b
je 0x3192f
leaq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl 0x14(%rsp), %ecx
movl 0x4(%rsp), %r8d
callq 0x10923a
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rbp
xorl %r12d, %r12d
jmp 0x31957
movzbl %r12b, %r12d
testb $0x1, %r12b
movl $0x0, %ecx
cmovnel %ecx, %r12d
movl %ecx, 0x58(%rsp)
movq %rax, %rdi
movq %r13, %rsi
callq 0x75763
movl 0x58(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x31997
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x319a4
leaq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl 0x4(%rsp), %r8d
callq 0x10923a
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rbp
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x86c7a
testq %r14, %r14
je 0x31979
subq %r14, %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1fae0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x319a4
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x319a4
movq %rbx, %rdi
leaq 0x18(%rsp), %rdx
callq 0x86e7a
movq %r15, %rdi
callq 0x76c3c
jmp 0x3188f
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x7a024
movzbl %r14b, %ecx
movzbl %bpl, %r8d
leaq 0x30(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq 0x8(%rsp), %rsi
callq 0x10923a
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testq %rdi, %rdi
je 0x31a27
subq %rdi, %rsi
callq 0x1fae0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x31a27
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1fae0
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31a48
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x1fae0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31abe
movq 0x88(%rsp), %rsi
jmp 0x31aad
jmp 0x31abb
jmp 0x31a7c
movq %rax, %r15
jmp 0x31a99
jmp 0x31abb
movq %rax, %r15
testq %r14, %r14
je 0x31a99
subq %r14, %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1fae0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x31abe
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x31abe
jmp 0x31abb
jmp 0x31abb
movq %rax, %r15
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x31ad2
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1fae0
movq %r15, %rdi
callq 0x20380
|
_ZL14tokenize_mixedPK11llama_vocabRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov ebp, r8d
mov r14d, ecx
mov r13, rdx
mov [rsp+0C8h+var_C0], rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
cmp byte ptr [rdx], 2
jnz loc_319B1
lea r15, [rsp+0C8h+var_50]
mov [r15], r13
movups xmmword ptr [r15+8], xmm0
mov r12, 8000000000000000h
mov [r15+18h], r12
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void)
lea rdi, [rsp+0C8h+var_98]
mov [rdi], r13
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], r12
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
mov r12b, 1
lea r13, [rsp+0C8h+var_70]
movzx eax, r14b
mov [rsp+0C8h+var_B4], eax
movzx eax, bpl
mov [rsp+0C8h+var_C4], eax
loc_3188F:
mov rdi, r15
lea rsi, [rsp+0C8h+var_98]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_31A48
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
cmp byte ptr [rax], 3
jnz short loc_318F1
mov rdi, r13
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
test r12b, 1
jz short loc_3192F
lea rdi, [rsp+0C8h+var_B0]
mov rsi, [rsp+0C8h+var_C0]
mov rdx, r13
mov ecx, [rsp+0C8h+var_B4]
mov r8d, [rsp+0C8h+var_C4]
call _Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; common_tokenize(llama_vocab const*,std::string const&,bool,bool)
mov r14, [rsp+0C8h+var_B0]
mov rcx, [rsp+0C8h+var_A8]
mov rbp, [rsp+0C8h+var_A0]
xor r12d, r12d
jmp short loc_31957
loc_318F1:
movzx r12d, r12b
test r12b, 1
mov ecx, 0
cmovnz r12d, ecx
mov dword ptr [rsp+0C8h+var_70], ecx
mov rdi, rax
mov rsi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov eax, dword ptr [rsp+0C8h+var_70]
mov dword ptr [rsp+0C8h+var_B0], eax
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_31997
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_319A4
loc_3192F:
lea rdi, [rsp+0C8h+var_B0]
mov rsi, [rsp+0C8h+var_C0]
mov rdx, r13
xor ecx, ecx
mov r8d, [rsp+0C8h+var_C4]
call _Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; common_tokenize(llama_vocab const*,std::string const&,bool,bool)
mov r14, [rsp+0C8h+var_B0]
mov rcx, [rsp+0C8h+var_A8]
mov rbp, [rsp+0C8h+var_A0]
loc_31957:
mov rsi, [rbx+8]
mov rdi, rbx
mov rdx, r14
call _ZNSt6vectorIiSaIiEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEEEvS6_T_S7_St20forward_iterator_tag; std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::forward_iterator_tag)
test r14, r14
jz short loc_31979
sub rbp, r14
mov rdi, r14; void *
mov rsi, rbp; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31979:
mov rdi, [rsp+0C8h+var_70]; void *
lea rax, [rsp+0C8h+var_60]
cmp rdi, rax
jz short loc_319A4
mov rsi, [rsp+0C8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_319A4
loc_31997:
mov rdi, rbx
lea rdx, [rsp+0C8h+var_B0]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
loc_319A4:
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator++(void)
jmp loc_3188F
loc_319B1:
lea rdi, [rsp+0C8h+var_50]
mov rsi, r13
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
movzx ecx, r14b
movzx r8d, bpl
lea rdi, [rsp+0C8h+var_98]
lea rdx, [rsp+0C8h+var_50]
mov rsi, [rsp+0C8h+var_C0]
call _Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; common_tokenize(llama_vocab const*,std::string const&,bool,bool)
mov rdi, [rbx]; void *
mov rsi, [rbx+10h]
movaps xmm0, xmmword ptr [rsp+0C8h+var_98]
movups xmmword ptr [rbx], xmm0
mov rax, [rsp+0C8h+var_88]
mov [rbx+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [rsp+0C8h+var_98], xmm0
mov [rsp+0C8h+var_88], 0
test rdi, rdi
jz short loc_31A27
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rsp+0C8h+var_98]; void *
test rdi, rdi
jz short loc_31A27
mov rsi, [rsp+0C8h+var_88]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31A27:
lea rax, [rsp+0C8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_31A48
mov rsi, [rsp+0C8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31A48:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
lea rax, [rsp+arg_80]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_31ABE
mov rsi, [rsp+arg_80]
jmp short loc_31AAD
jmp short loc_31ABB
jmp short $+2
loc_31A7C:
mov r15, rax
jmp short loc_31A99
jmp short loc_31ABB
mov r15, rax
test r14, r14
jz short loc_31A99
sub rbp, r14
mov rdi, r14; void *
mov rsi, rbp; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31A99:
mov rdi, [rsp+arg_50]; void *
lea rax, [rsp+arg_60]
cmp rdi, rax
jz short loc_31ABE
mov rsi, [rsp+arg_60]
loc_31AAD:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_31ABE
jmp short loc_31ABB
jmp short $+2
loc_31ABB:
mov r15, rax
loc_31ABE:
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_31AD2
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31AD2:
mov rdi, r15
call __Unwind_Resume
|
void tokenize_mixed(long long a1, long long a2, char *a3, unsigned __int8 a4, unsigned __int8 a5)
{
char v9; // r12
_BYTE *v10; // rax
void *v11; // r14
long long v12; // rcx
long long v13; // rbp
_DWORD *v14; // rsi
void *v15; // rdi
long long v16; // rsi
unsigned int v17; // [rsp+4h] [rbp-C4h]
unsigned int v19; // [rsp+14h] [rbp-B4h]
void *v20; // [rsp+18h] [rbp-B0h] BYREF
long long v21; // [rsp+20h] [rbp-A8h]
long long v22; // [rsp+28h] [rbp-A0h]
void *v23[5]; // [rsp+30h] [rbp-98h] BYREF
void *v24[2]; // [rsp+58h] [rbp-70h] BYREF
long long v25; // [rsp+68h] [rbp-60h] BYREF
char *v26; // [rsp+78h] [rbp-50h] BYREF
__int128 v27; // [rsp+80h] [rbp-48h] BYREF
unsigned long long v28; // [rsp+90h] [rbp-38h]
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
if ( *a3 == 2 )
{
v26 = a3;
v27 = 0LL;
v9 = 1;
v28 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v26);
v23[0] = a3;
*(_OWORD *)&v23[1] = 0LL;
v23[3] = (void *)0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(v23);
v19 = a4;
v17 = a5;
while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
v23) )
{
v10 = (_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v26);
if ( *v10 == 3 )
{
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v24,
v10);
if ( (v9 & 1) != 0 )
{
common_tokenize(&v20, a2, v24, v19, v17);
v11 = v20;
v12 = v21;
v13 = v22;
v9 = 0;
}
else
{
common_tokenize(&v20, a2, v24, 0LL, v17);
v11 = v20;
v12 = v21;
v13 = v22;
}
std::vector<int>::_M_range_insert<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(
a1,
*(_QWORD *)(a1 + 8),
v11,
v12);
if ( v11 )
operator delete(v11, v13 - (_QWORD)v11);
if ( v24[0] != &v25 )
operator delete(v24[0], v25 + 1);
}
else
{
if ( (v9 & 1) != 0 )
v9 = 0;
LODWORD(v24[0]) = 0;
ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
v10,
v24);
LODWORD(v20) = v24[0];
v14 = *(_DWORD **)(a1 + 8);
if ( v14 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int>(a1, v14, &v20);
}
else
{
*v14 = v24[0];
*(_QWORD *)(a1 + 8) = v14 + 1;
}
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(&v26);
}
}
else
{
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
&v26,
a3);
common_tokenize(v23, a2, &v26, a4, a5);
v15 = *(void **)a1;
v16 = *(_QWORD *)(a1 + 16);
*(_OWORD *)a1 = *(_OWORD *)v23;
*(void **)(a1 + 16) = v23[2];
memset(v23, 0, 24);
if ( v15 )
{
operator delete(v15, v16 - (_QWORD)v15);
if ( v23[0] )
operator delete(v23[0], (char *)v23[2] - (char *)v23[0]);
}
if ( v26 != (char *)&v27 + 8 )
operator delete(v26, *((_QWORD *)&v27 + 1) + 1LL);
}
}
|
tokenize_mixed:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV EBP,R8D
MOV R14D,ECX
MOV R13,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
CMP byte ptr [RDX],0x2
JNZ 0x001319b1
LEA R15,[RSP + 0x78]
MOV qword ptr [R15],R13
MOVUPS xmmword ptr [R15 + 0x8],XMM0
MOV R12,-0x8000000000000000
MOV qword ptr [R15 + 0x18],R12
MOV RDI,R15
CALL 0x00179bd4
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],R12
CALL 0x00179c46
MOV R12B,0x1
LEA R13,[RSP + 0x58]
MOVZX EAX,R14B
MOV dword ptr [RSP + 0x14],EAX
MOVZX EAX,BPL
MOV dword ptr [RSP + 0x4],EAX
LAB_0013188f:
MOV RDI,R15
LEA RSI,[RSP + 0x30]
CALL 0x00179cac
TEST AL,AL
JNZ 0x00131a48
LAB_001318a4:
MOV RDI,R15
CALL 0x001768b6
CMP byte ptr [RAX],0x3
JNZ 0x001318f1
LAB_001318b1:
MOV RDI,R13
MOV RSI,RAX
CALL 0x0017a024
TEST R12B,0x1
JZ 0x0013192f
LAB_001318c2:
LEA RDI,[RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R13
MOV ECX,dword ptr [RSP + 0x14]
MOV R8D,dword ptr [RSP + 0x4]
CALL 0x0020923a
MOV R14,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + 0x28]
XOR R12D,R12D
JMP 0x00131957
LAB_001318f1:
MOVZX R12D,R12B
TEST R12B,0x1
MOV ECX,0x0
CMOVNZ R12D,ECX
MOV dword ptr [RSP + 0x58],ECX
LAB_00131906:
MOV RDI,RAX
MOV RSI,R13
CALL 0x00175763
MOV EAX,dword ptr [RSP + 0x58]
MOV dword ptr [RSP + 0x18],EAX
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00131997
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001319a4
LAB_0013192f:
LEA RDI,[RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R13
XOR ECX,ECX
MOV R8D,dword ptr [RSP + 0x4]
CALL 0x0020923a
MOV R14,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + 0x28]
LAB_00131957:
MOV RSI,qword ptr [RBX + 0x8]
LAB_0013195b:
MOV RDI,RBX
MOV RDX,R14
CALL 0x00186c7a
TEST R14,R14
JZ 0x00131979
SUB RBP,R14
MOV RDI,R14
MOV RSI,RBP
CALL 0x0011fae0
LAB_00131979:
MOV RDI,qword ptr [RSP + 0x58]
LEA RAX,[RSP + 0x68]
CMP RDI,RAX
JZ 0x001319a4
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x0011fae0
JMP 0x001319a4
LAB_00131997:
MOV RDI,RBX
LEA RDX,[RSP + 0x18]
CALL 0x00186e7a
LAB_001319a4:
MOV RDI,R15
CALL 0x00176c3c
JMP 0x0013188f
LAB_001319b1:
LEA RDI,[RSP + 0x78]
MOV RSI,R13
CALL 0x0017a024
LAB_001319be:
MOVZX ECX,R14B
MOVZX R8D,BPL
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0020923a
LAB_001319da:
MOV RDI,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x10]
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RBX],XMM0
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RBX + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],0x0
TEST RDI,RDI
JZ 0x00131a27
SUB RSI,RDI
CALL 0x0011fae0
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00131a27
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x0011fae0
LAB_00131a27:
LEA RAX,[RSP + 0x88]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00131a48
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x0011fae0
LAB_00131a48:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* tokenize_mixed(llama_vocab 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> const&, bool, bool) */
void tokenize_mixed(llama_vocab *param_1,basic_json *param_2,bool param_3,bool param_4)
{
int4 *puVar1;
long lVar2;
bool bVar3;
char cVar4;
char *pcVar5;
bool bVar6;
int7 in_register_00000011;
long *plVar7;
void *pvVar8;
int4 local_b0;
int4 uStack_ac;
long local_a0;
char *local_98;
int8 uStack_90;
long lStack_88;
int8 local_80;
int4 local_70;
int4 uStack_6c;
long local_60 [2];
long *local_50;
int8 local_48;
long alStack_40 [2];
plVar7 = (long *)CONCAT71(in_register_00000011,param_3);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if ((char)*plVar7 == '\x02') {
local_48 = 0;
alStack_40[0] = 0;
alStack_40[1] = 0x8000000000000000;
local_50 = plVar7;
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_begin((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50);
uStack_90 = 0;
lStack_88 = 0;
local_80 = 0x8000000000000000;
local_98 = (char *)plVar7;
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_98);
bVar3 = true;
while( true ) {
/* try { // try from 0013188f to 0013189b has its CatchHandler @ 00131abb */
cVar4 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50,&local_98);
if (cVar4 != '\0') break;
/* try { // try from 001318a4 to 001318ab has its CatchHandler @ 00131ab9 */
pcVar5 = (char *)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50);
if (*pcVar5 == '\x03') {
/* try { // try from 001318b1 to 001318bb has its CatchHandler @ 00131a81 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(&local_70,pcVar5);
bVar6 = SUB81(&local_70,0);
if (bVar3) {
/* try { // try from 001318c2 to 001318dc has its CatchHandler @ 00131a7a */
common_tokenize((llama_vocab *)&local_b0,(string *)param_2,bVar6,param_4);
pvVar8 = (void *)CONCAT44(uStack_ac,local_b0);
bVar3 = false;
}
else {
/* try { // try from 0013192f to 00131947 has its CatchHandler @ 00131a7c */
common_tokenize((llama_vocab *)&local_b0,(string *)param_2,bVar6,false);
pvVar8 = (void *)CONCAT44(uStack_ac,local_b0);
}
lVar2 = local_a0;
/* try { // try from 0013195b to 00131965 has its CatchHandler @ 00131a83 */
std::vector<int,std::allocator<int>>::
_M_range_insert<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>>
(param_1,*(int8 *)(param_1 + 8),pvVar8);
if (pvVar8 != (void *)0x0) {
operator_delete(pvVar8,lVar2 - (long)pvVar8);
}
if ((long *)CONCAT44(uStack_6c,local_70) != local_60) {
operator_delete((long *)CONCAT44(uStack_6c,local_70),local_60[0] + 1);
}
}
else {
if (bVar3) {
bVar3 = false;
}
local_70 = 0;
/* try { // try from 00131906 to 00131910 has its CatchHandler @ 00131ab7 */
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(pcVar5,&local_70);
local_b0 = local_70;
puVar1 = *(int4 **)(param_1 + 8);
if (puVar1 == *(int4 **)(param_1 + 0x10)) {
/* try { // try from 00131997 to 001319a3 has its CatchHandler @ 00131ab7 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)param_1,puVar1,&local_b0);
}
else {
*puVar1 = local_70;
*(int4 **)(param_1 + 8) = puVar1 + 1;
}
}
/* try { // try from 001319a4 to 001319ab has its CatchHandler @ 00131abb */
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50);
}
}
else {
/* try { // try from 001319b1 to 001319bd has its CatchHandler @ 00131a78 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(&local_50,plVar7);
/* try { // try from 001319be to 001319d9 has its CatchHandler @ 00131a5a */
common_tokenize((llama_vocab *)&local_98,(string *)param_2,SUB81(&local_50,0),param_4);
pvVar8 = *(void **)param_1;
lVar2 = *(long *)(param_1 + 0x10);
*(char **)param_1 = local_98;
*(int8 *)(param_1 + 8) = uStack_90;
*(long *)(param_1 + 0x10) = lStack_88;
local_98 = (char *)0x0;
uStack_90 = 0;
lStack_88 = 0;
if (pvVar8 != (void *)0x0) {
operator_delete(pvVar8,lVar2 - (long)pvVar8);
if (local_98 != (char *)0x0) {
operator_delete(local_98,lStack_88 - (long)local_98);
}
}
if (local_50 != alStack_40) {
operator_delete(local_50,alStack_40[0] + 1);
}
}
return;
}
|
|
61,550 |
PVG_FT_MulDiv
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
|
PVG_FT_Long PVG_FT_MulDiv(PVG_FT_Long a, PVG_FT_Long b, PVG_FT_Long c)
{
PVG_FT_Int s = 1;
PVG_FT_Long d;
PVG_FT_MOVE_SIGN(a, s);
PVG_FT_MOVE_SIGN(b, s);
PVG_FT_MOVE_SIGN(c, s);
d = (PVG_FT_Long)(c > 0 ? ((PVG_FT_Int64)a * b + (c >> 1)) / c : 0x7FFFFFFFL);
return (s > 0) ? d : -d;
}
|
O1
|
c
|
PVG_FT_MulDiv:
movq %rdx, %rcx
testq %rdx, %rdx
je 0x22249
movq %rcx, %r8
negq %r8
cmovsq %rcx, %r8
movq %rsi, %rax
imulq %rdi, %rax
movq %rax, %rdx
negq %rdx
cmovsq %rax, %rdx
movq %r8, %rax
shrq %rax
addq %rdx, %rax
xorl %edx, %edx
divq %r8
jmp 0x2224e
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
sarq $0x3f, %rdi
orl $0x1, %edi
movl %edi, %edx
negl %edx
testq %rsi, %rsi
cmovnsl %edi, %edx
movl %edx, %esi
negl %esi
testq %rcx, %rcx
cmovnsl %edx, %esi
movq %rax, %rcx
negq %rcx
testl %esi, %esi
cmovgq %rax, %rcx
movq %rcx, %rax
retq
|
PVG_FT_MulDiv:
mov rcx, rdx
test rdx, rdx
jz short loc_22249
mov r8, rcx
neg r8
cmovs r8, rcx
mov rax, rsi
imul rax, rdi
mov rdx, rax
neg rdx
cmovs rdx, rax
mov rax, r8
shr rax, 1
add rax, rdx
xor edx, edx
div r8
jmp short loc_2224E
loc_22249:
mov eax, 7FFFFFFFh
loc_2224E:
sar rdi, 3Fh
or edi, 1
mov edx, edi
neg edx
test rsi, rsi
cmovns edx, edi
mov esi, edx
neg esi
test rcx, rcx
cmovns esi, edx
mov rcx, rax
neg rcx
test esi, esi
cmovg rcx, rax
mov rax, rcx
retn
|
long long PVG_FT_MulDiv(long long a1, long long a2, long long a3)
{
unsigned long long v4; // r8
long long v5; // rdx
long long v6; // rax
int v7; // edi
int v8; // edx
int v9; // esi
long long v10; // rcx
if ( a3 )
{
v4 = -a3;
if ( a3 > 0 )
v4 = a3;
v5 = -(a1 * a2);
if ( a1 * a2 > 0 )
v5 = a1 * a2;
v6 = (v5 + (v4 >> 1)) / v4;
}
else
{
v6 = 0x7FFFFFFFLL;
}
v7 = (a1 >> 63) | 1;
v8 = -v7;
if ( a2 >= 0 )
v8 = v7;
v9 = -v8;
if ( a3 >= 0 )
v9 = v8;
v10 = -v6;
if ( v9 > 0 )
return v6;
return v10;
}
|
PVG_FT_MulDiv:
MOV RCX,RDX
TEST RDX,RDX
JZ 0x00122249
MOV R8,RCX
NEG R8
CMOVS R8,RCX
MOV RAX,RSI
IMUL RAX,RDI
MOV RDX,RAX
NEG RDX
CMOVS RDX,RAX
MOV RAX,R8
SHR RAX,0x1
ADD RAX,RDX
XOR EDX,EDX
DIV R8
JMP 0x0012224e
LAB_00122249:
MOV EAX,0x7fffffff
LAB_0012224e:
SAR RDI,0x3f
OR EDI,0x1
MOV EDX,EDI
NEG EDX
TEST RSI,RSI
CMOVNS EDX,EDI
MOV ESI,EDX
NEG ESI
TEST RCX,RCX
CMOVNS ESI,EDX
MOV RCX,RAX
NEG RCX
TEST ESI,ESI
CMOVG RCX,RAX
MOV RAX,RCX
RET
|
ulong PVG_FT_MulDiv(long param_1,long param_2,ulong param_3)
{
long lVar1;
ulong uVar2;
ulong uVar3;
uint uVar4;
long lVar5;
uint uVar6;
if (param_3 == 0) {
uVar2 = 0x7fffffff;
}
else {
uVar2 = -param_3;
if (0 < (long)param_3) {
uVar2 = param_3;
}
lVar1 = param_2 * param_1;
lVar5 = -lVar1;
if (0 < lVar1) {
lVar5 = lVar1;
}
uVar2 = ((uVar2 >> 1) + lVar5) / uVar2;
}
uVar6 = (uint)(param_1 >> 0x3f) | 1;
uVar4 = -uVar6;
if (-1 < param_2) {
uVar4 = uVar6;
}
uVar6 = -uVar4;
if (-1 < (long)param_3) {
uVar6 = uVar4;
}
uVar3 = -uVar2;
if (0 < (int)uVar6) {
uVar3 = uVar2;
}
return uVar3;
}
|
|
61,551 |
inline_mysql_file_close
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1e6788(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x4, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xd99bb
leaq 0x1e6745(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf4500
movl %eax, -0x24(%rbp)
leaq 0x1e6718(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd99d0
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf4500
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
|
inline_mysql_file_close_7:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 4
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_D99BB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_30]
mov esi, [rbp+var_24]
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_D99D0
loc_D99BB:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_D99D0:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_close_7(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 4LL);
if ( v6 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[68])(v6, v11, v10);
v7 = my_close(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[69])(v6, v7);
}
else
{
return (unsigned int)my_close(v9, v8);
}
return v7;
}
|
inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x4
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001d99bb
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f4500
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x24]
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001d99d0
LAB_001d99bb:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f4500
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001d99d0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_close(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,4);
if (local_38 == 0) {
local_c = my_close(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x220))(local_38,local_18,local_1c);
local_2c = my_close(local_20,local_28);
(**(code **)(PSI_server + 0x228))(local_38,local_2c);
local_c = local_2c;
}
return local_c;
}
|
|
61,552 |
inline_mysql_file_close
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
}
|
O3
|
c
|
inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movl %edi, %r14d
leaq 0x3400d2(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x68(%rbp), %rdi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x45f69
movl %ebx, %edi
xorl %esi, %esi
callq 0xa0585
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1c(%rbp), %r15
movq %rax, %rdi
movl %r14d, %esi
movl %ebx, %edx
movq %r15, %rcx
callq 0x2a2fd
movl (%r15), %eax
jmp 0x45f5e
|
inline_mysql_file_close:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 58h
mov ebx, esi
mov r14d, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_68]
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_45F69
mov edi, ebx
xor esi, esi
call my_close
loc_45F5E:
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_45F69:
lea r15, [rbp+var_1C]
mov rdi, rax
mov esi, r14d
mov edx, ebx
mov rcx, r15
call inline_mysql_file_close_cold_1
mov eax, [r15]
jmp short loc_45F5E
|
long long inline_mysql_file_close(unsigned int a1, long long a2)
{
long long v2; // rax
_BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF
unsigned int v5[7]; // [rsp+54h] [rbp-1Ch] BYREF
v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 4LL);
if ( !v2 )
return my_close((unsigned int)a2, 0LL);
inline_mysql_file_close_cold_1(v2, a1, a2, v5);
return v5[0];
}
|
inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV EBX,ESI
MOV R14D,EDI
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x68]
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00145f69
MOV EDI,EBX
XOR ESI,ESI
CALL 0x001a0585
LAB_00145f5e:
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00145f69:
LEA R15,[RBP + -0x1c]
MOV RDI,RAX
MOV ESI,R14D
MOV EDX,EBX
MOV RCX,R15
CALL 0x0012a2fd
MOV EAX,dword ptr [R15]
JMP 0x00145f5e
|
ulong inline_mysql_file_close(int4 param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
int1 local_70 [76];
uint local_24;
lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,4);
if (lVar1 == 0) {
uVar2 = my_close(param_2 & 0xffffffff,0);
}
else {
inline_mysql_file_close_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_24);
uVar2 = (ulong)local_24;
}
return uVar2;
}
|
|
61,553 |
ma_log_suffix
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool _ma_log_suffix(MARIA_PAGE *ma_page, uint org_length, uint new_length)
{
LSN lsn;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 10 + 7 + 2], *log_pos;
uchar *buff= ma_page->buff;
int diff;
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
pgcache_page_no_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_suffix");
DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u",
(ulong) page, org_length, new_length));
DBUG_ASSERT(ma_page->size == new_length);
DBUG_ASSERT(ma_page->org_size == org_length);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
if ((diff= (int) (new_length - org_length)) < 0)
{
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, -diff);
log_pos+= 3;
translog_parts= 1;
extra_length= 0;
}
else
{
log_pos[0]= KEY_OP_ADD_SUFFIX;
int2store(log_pos+1, diff);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= buff + org_length;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (uint) diff;
translog_parts= 2;
extra_length= (uint) diff;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
}
|
O3
|
c
|
ma_log_suffix:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
movl %edx, %r10d
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movq (%rdi), %rcx
movq 0x10(%rdi), %r9
movq 0x18(%rdi), %rax
movq (%rcx), %r11
movl 0x7bc(%r11), %ebx
xorl %r8d, %r8d
xorl %edx, %edx
divq %rbx
movl %eax, -0x2e(%rbp)
shrq $0x20, %rax
movb %al, -0x2a(%rbp)
movb $0xa, -0x29(%rbp)
movl 0x744(%r11), %eax
addl $-0x3, %eax
movb (%r9,%rax), %al
movb %al, -0x28(%rbp)
subl %esi, %r10d
js 0x40c0b
leaq -0x24(%rbp), %rax
movl %esi, %edx
addq %rdx, %r9
movq %r9, -0x70(%rbp)
movl %r10d, %edx
movq %rdx, -0x68(%rbp)
movl $0x4, %r9d
movb $0x6, %dl
movl %r10d, %r8d
jmp 0x40c1a
negl %r10d
movl $0x3, %r9d
movb $0x7, %dl
leaq -0x24(%rbp), %rax
leaq -0x30(%rbp), %r11
movb %dl, 0x9(%r11)
movw %r10w, 0xa(%r11)
leaq -0xa0(%rbp), %r10
movq %r11, 0x20(%r10)
subq %r11, %rax
movl %eax, %edx
movq %rdx, 0x28(%r10)
movl 0x20(%rdi), %edx
movl %edx, 0x24(%rdi)
movq 0x8(%rcx), %rdx
addl %eax, %r8d
subq $0x8, %rsp
leaq -0x38(%rbp), %rdi
movl $0xc, %esi
pushq $0x0
pushq %r11
pushq %r10
callq 0x29c84
addq $0x20, %rsp
movq %fs:0x28, %rcx
cmpq -0x10(%rbp), %rcx
jne 0x40c7d
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
callq 0x29260
|
_ma_log_suffix:
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
mov r10d, edx
mov rax, fs:28h
mov [rbp+var_10], rax
mov rcx, [rdi]
mov r9, [rdi+10h]
mov rax, [rdi+18h]
mov r11, [rcx]
mov ebx, [r11+7BCh]
xor r8d, r8d
xor edx, edx
div rbx
mov [rbp+var_2E], eax
shr rax, 20h
mov [rbp+var_2A], al
mov [rbp+var_29], 0Ah
mov eax, [r11+744h]
add eax, 0FFFFFFFDh
mov al, [r9+rax]
mov [rbp+var_28], al
sub r10d, esi
js short loc_40C0B
lea rax, [rbp+var_24]
mov edx, esi
add r9, rdx
mov [rbp+var_70], r9
mov edx, r10d
mov [rbp+var_68], rdx
mov r9d, 4
mov dl, 6
mov r8d, r10d
jmp short loc_40C1A
loc_40C0B:
neg r10d
mov r9d, 3
mov dl, 7
lea rax, [rbp+var_24]
loc_40C1A:
lea r11, [rbp+var_30]
mov [r11+9], dl
mov [r11+0Ah], r10w
lea r10, [rbp+var_A0]
mov [r10+20h], r11
sub rax, r11
mov edx, eax
mov [r10+28h], rdx
mov edx, [rdi+20h]
mov [rdi+24h], edx
mov rdx, [rcx+8]
add r8d, eax
sub rsp, 8
lea rdi, [rbp+var_38]
mov esi, 0Ch
push 0
push r11
push r10
call translog_write_record
add rsp, 20h
mov rcx, fs:28h
cmp rcx, [rbp+var_10]
jnz short loc_40C7D
add rsp, 98h
pop rbx
pop rbp
retn
loc_40C7D:
call ___stack_chk_fail
|
long long ma_log_suffix(long long **a1, unsigned int a2, int a3)
{
long long *v3; // rcx
long long *v4; // r9
long long v5; // r11
unsigned int v6; // r8d
unsigned long long v7; // rax
unsigned int v8; // r10d
int v9; // r9d
char v10; // dl
__int128 v12; // [rsp+0h] [rbp-A0h] BYREF
__int16 *v13; // [rsp+20h] [rbp-80h]
long long v14; // [rsp+28h] [rbp-78h]
long long v15; // [rsp+30h] [rbp-70h]
long long v16; // [rsp+38h] [rbp-68h]
_BYTE v17[8]; // [rsp+68h] [rbp-38h] BYREF
__int16 v18; // [rsp+70h] [rbp-30h] BYREF
int v19; // [rsp+72h] [rbp-2Eh]
char v20; // [rsp+76h] [rbp-2Ah]
char v21; // [rsp+77h] [rbp-29h]
char v22; // [rsp+78h] [rbp-28h]
char v23; // [rsp+79h] [rbp-27h]
__int16 v24; // [rsp+7Ah] [rbp-26h]
_BYTE v25[20]; // [rsp+7Ch] [rbp-24h] BYREF
unsigned long long v26; // [rsp+90h] [rbp-10h]
v26 = __readfsqword(0x28u);
v3 = *a1;
v4 = a1[2];
v5 = **a1;
v6 = 0;
v7 = (unsigned long long)a1[3] / *(unsigned int *)(v5 + 1980);
v19 = v7;
v20 = BYTE4(v7);
v21 = 10;
v22 = *((_BYTE *)v4 + (unsigned int)(*(_DWORD *)(v5 + 1860) - 3));
v8 = a3 - a2;
if ( (int)(a3 - a2) < 0 )
{
LOWORD(v8) = a2 - a3;
v9 = 3;
v10 = 7;
}
else
{
v15 = (long long)v4 + a2;
v16 = v8;
v9 = 4;
v10 = 6;
v6 = v8;
}
v23 = v10;
v24 = v8;
v13 = &v18;
v14 = (unsigned int)(v25 - (_BYTE *)&v18);
*((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8);
return translog_write_record(
(unsigned long long)v17,
&byte_9[3],
v3[1],
v3,
(unsigned int)(v25 - (_BYTE *)&v18) + v6,
v9,
&v12,
&v18,
0LL);
}
|
_ma_log_suffix:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
MOV R10D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV RCX,qword ptr [RDI]
MOV R9,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RDI + 0x18]
MOV R11,qword ptr [RCX]
MOV EBX,dword ptr [R11 + 0x7bc]
XOR R8D,R8D
XOR EDX,EDX
DIV RBX
MOV dword ptr [RBP + -0x2e],EAX
SHR RAX,0x20
MOV byte ptr [RBP + -0x2a],AL
MOV byte ptr [RBP + -0x29],0xa
MOV EAX,dword ptr [R11 + 0x744]
ADD EAX,-0x3
MOV AL,byte ptr [R9 + RAX*0x1]
MOV byte ptr [RBP + -0x28],AL
SUB R10D,ESI
JS 0x00140c0b
LEA RAX,[RBP + -0x24]
MOV EDX,ESI
ADD R9,RDX
MOV qword ptr [RBP + -0x70],R9
MOV EDX,R10D
MOV qword ptr [RBP + -0x68],RDX
MOV R9D,0x4
MOV DL,0x6
MOV R8D,R10D
JMP 0x00140c1a
LAB_00140c0b:
NEG R10D
MOV R9D,0x3
MOV DL,0x7
LEA RAX,[RBP + -0x24]
LAB_00140c1a:
LEA R11,[RBP + -0x30]
MOV byte ptr [R11 + 0x9],DL
MOV word ptr [R11 + 0xa],R10W
LEA R10,[RBP + -0xa0]
MOV qword ptr [R10 + 0x20],R11
SUB RAX,R11
MOV EDX,EAX
MOV qword ptr [R10 + 0x28],RDX
MOV EDX,dword ptr [RDI + 0x20]
MOV dword ptr [RDI + 0x24],EDX
MOV RDX,qword ptr [RCX + 0x8]
ADD R8D,EAX
SUB RSP,0x8
LEA RDI,[RBP + -0x38]
MOV ESI,0xc
PUSH 0x0
PUSH R11
PUSH R10
CALL 0x00129c84
ADD RSP,0x20
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x10]
JNZ 0x00140c7d
ADD RSP,0x98
POP RBX
POP RBP
RET
LAB_00140c7d:
CALL 0x00129260
|
void _ma_log_suffix(long *param_1,uint param_2,int param_3)
{
long *plVar1;
int1 auVar2 [16];
int iVar3;
uint uVar4;
int8 uVar5;
uint uVar6;
long in_FS_OFFSET;
int1 local_a8 [32];
int1 *local_88;
ulong local_80;
long local_78;
ulong local_70;
int1 local_40 [8];
int1 local_38 [2];
int4 local_36;
int1 local_32;
int1 local_31;
int1 local_30;
int1 local_2f;
int2 local_2e;
int1 local_2c [20];
long local_18;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
uVar4 = 0;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1[3];
auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc));
local_36 = auVar2._0_4_;
local_32 = auVar2[4];
local_31 = 10;
local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
uVar6 = param_3 - param_2;
if ((int)uVar6 < 0) {
uVar6 = -uVar6;
uVar5 = 3;
local_2f = 7;
iVar3 = (int)local_2c;
}
else {
iVar3 = (int)local_2c;
local_78 = param_1[2] + (ulong)param_2;
local_70 = (ulong)uVar6;
uVar5 = 4;
local_2f = 6;
uVar4 = uVar6;
}
local_88 = local_38;
local_2e = (int2)uVar6;
uVar6 = iVar3 - (int)local_88;
local_80 = (ulong)uVar6;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
translog_write_record(local_40,0xc,plVar1[1],plVar1,uVar4 + uVar6,uVar5,local_a8,local_88,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,554 |
composition_solid_destination_out
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
|
static void composition_solid_destination_out(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha)
{
uint32_t a = plutovg_alpha(~color);
if(const_alpha != 255)
a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
for(int i = 0; i < length; i++) {
dest[i] = BYTE_MUL(dest[i], a);
}
}
|
O1
|
c
|
composition_solid_destination_out:
notl %edx
shrl $0x18, %edx
cmpl $0xff, %ecx
je 0x21115
imull %ecx, %edx
movl %edx, %eax
shrl $0x8, %eax
movl $0xff00ff, %r8d # imm = 0xFF00FF
andl %r8d, %eax
addl %eax, %edx
addl $0x800080, %edx # imm = 0x800080
shrl $0x8, %edx
andl %r8d, %edx
subl %ecx, %edx
addl $0xff, %edx
testl %esi, %esi
jle 0x2117e
movl %esi, %eax
xorl %ecx, %ecx
movl $0xff00ff, %esi # imm = 0xFF00FF
movl $0x800080, %r8d # imm = 0x800080
movl (%rdi,%rcx,4), %r9d
movl %r9d, %r10d
andl %esi, %r10d
imull %edx, %r10d
movl %r10d, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
addl %r8d, %r10d
addl %r11d, %r10d
shrl $0x8, %r10d
andl %esi, %r10d
shrl $0x8, %r9d
andl %esi, %r9d
imull %edx, %r9d
movl %r9d, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
addl %r8d, %r9d
addl %r11d, %r9d
andl $0xff00ff00, %r9d # imm = 0xFF00FF00
orl %r10d, %r9d
movl %r9d, (%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x21128
retq
|
composition_solid_destination_out:
not edx
shr edx, 18h
cmp ecx, 0FFh
jz short loc_21115
imul edx, ecx
mov eax, edx
shr eax, 8
mov r8d, 0FF00FFh
and eax, r8d
add edx, eax
add edx, 800080h
shr edx, 8
and edx, r8d
sub edx, ecx
add edx, 0FFh
loc_21115:
test esi, esi
jle short locret_2117E
mov eax, esi
xor ecx, ecx
mov esi, 0FF00FFh
mov r8d, 800080h
loc_21128:
mov r9d, [rdi+rcx*4]
mov r10d, r9d
and r10d, esi
imul r10d, edx
mov r11d, r10d
shr r11d, 8
and r11d, esi
add r10d, r8d
add r10d, r11d
shr r10d, 8
and r10d, esi
shr r9d, 8
and r9d, esi
imul r9d, edx
mov r11d, r9d
shr r11d, 8
and r11d, esi
add r9d, r8d
add r9d, r11d
and r9d, 0FF00FF00h
or r9d, r10d
mov [rdi+rcx*4], r9d
inc rcx
cmp rax, rcx
jnz short loc_21128
locret_2117E:
retn
|
void composition_solid_destination_out(long long a1, int a2, int a3, int a4)
{
unsigned int v4; // edx
long long i; // rcx
v4 = (unsigned int)~a3 >> 24;
if ( a4 != 255 )
v4 = ((((((a4 * v4) >> 8) & 0xFF00FF) + a4 * v4 + 8388736) >> 8) & 0xFF00FF) - a4 + 255;
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
*(_DWORD *)(a1 + 4 * i) = (((((v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF | ((((v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00;
}
}
|
composition_solid_destination_out:
NOT EDX
SHR EDX,0x18
CMP ECX,0xff
JZ 0x00121115
IMUL EDX,ECX
MOV EAX,EDX
SHR EAX,0x8
MOV R8D,0xff00ff
AND EAX,R8D
ADD EDX,EAX
ADD EDX,0x800080
SHR EDX,0x8
AND EDX,R8D
SUB EDX,ECX
ADD EDX,0xff
LAB_00121115:
TEST ESI,ESI
JLE 0x0012117e
MOV EAX,ESI
XOR ECX,ECX
MOV ESI,0xff00ff
MOV R8D,0x800080
LAB_00121128:
MOV R9D,dword ptr [RDI + RCX*0x4]
MOV R10D,R9D
AND R10D,ESI
IMUL R10D,EDX
MOV R11D,R10D
SHR R11D,0x8
AND R11D,ESI
ADD R10D,R8D
ADD R10D,R11D
SHR R10D,0x8
AND R10D,ESI
SHR R9D,0x8
AND R9D,ESI
IMUL R9D,EDX
MOV R11D,R9D
SHR R11D,0x8
AND R11D,ESI
ADD R9D,R8D
ADD R9D,R11D
AND R9D,0xff00ff00
OR R9D,R10D
MOV dword ptr [RDI + RCX*0x4],R9D
INC RCX
CMP RAX,RCX
JNZ 0x00121128
LAB_0012117e:
RET
|
void composition_solid_destination_out(long param_1,uint param_2,uint param_3,int param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uVar2 = ~param_3 >> 0x18;
if (param_4 != 0xff) {
uVar2 = ((uVar2 * param_4 + (uVar2 * param_4 >> 8 & 0xff00ff) + 0x800080 >> 8 & 0xff00ff) -
param_4) + 0xff;
}
if (0 < (int)param_2) {
uVar1 = 0;
do {
uVar3 = *(uint *)(param_1 + uVar1 * 4);
uVar4 = (uVar3 & 0xff00ff) * uVar2;
uVar3 = (uVar3 >> 8 & 0xff00ff) * uVar2;
*(uint *)(param_1 + uVar1 * 4) =
uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) & 0xff00ff00 |
uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff) >> 8 & 0xff00ff;
uVar1 = uVar1 + 1;
} while (param_2 != uVar1);
}
return;
}
|
|
61,555 |
composition_solid_destination_out
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
|
static void composition_solid_destination_out(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha)
{
uint32_t a = plutovg_alpha(~color);
if(const_alpha != 255)
a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
for(int i = 0; i < length; i++) {
dest[i] = BYTE_MUL(dest[i], a);
}
}
|
O2
|
c
|
composition_solid_destination_out:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
notl %ebp
shrl $0x18, %ebp
cmpl $0xff, %ecx
je 0x1c6e8
movl %ecx, %r15d
movl %ebp, %edi
movl %ecx, %esi
callq 0x1c849
movl %eax, %ebp
subl %r15d, %ebp
addl $0xff, %ebp
xorl %r15d, %r15d
testl %ebx, %ebx
cmovlel %r15d, %ebx
cmpq %r15, %rbx
je 0x1c70a
movl (%r14,%r15,4), %edi
movl %ebp, %esi
callq 0x1c849
movl %eax, (%r14,%r15,4)
incq %r15
jmp 0x1c6f1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
composition_solid_destination_out:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, edx
mov ebx, esi
mov r14, rdi
not ebp
shr ebp, 18h
cmp ecx, 0FFh
jz short loc_1C6E8
mov r15d, ecx
mov edi, ebp
mov esi, ecx
call BYTE_MUL
mov ebp, eax
sub ebp, r15d
add ebp, 0FFh
loc_1C6E8:
xor r15d, r15d
test ebx, ebx
cmovle ebx, r15d
loc_1C6F1:
cmp rbx, r15
jz short loc_1C70A
mov edi, [r14+r15*4]
mov esi, ebp
call BYTE_MUL
mov [r14+r15*4], eax
inc r15
jmp short loc_1C6F1
loc_1C70A:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long composition_solid_destination_out(long long a1, int a2, int a3, unsigned int a4)
{
long long v4; // rbx
unsigned int v5; // ebp
long long result; // rax
long long v8; // r15
v4 = (unsigned int)a2;
v5 = (unsigned int)~a3 >> 24;
if ( a4 != 255 )
{
result = BYTE_MUL(v5, a4);
v5 = result - a4 + 255;
}
v8 = 0LL;
if ( a2 <= 0 )
v4 = 0LL;
while ( v4 != v8 )
{
result = BYTE_MUL(*(unsigned int *)(a1 + 4 * v8), v5);
*(_DWORD *)(a1 + 4 * v8++) = result;
}
return result;
}
|
composition_solid_destination_out:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,EDX
MOV EBX,ESI
MOV R14,RDI
NOT EBP
SHR EBP,0x18
CMP ECX,0xff
JZ 0x0011c6e8
MOV R15D,ECX
MOV EDI,EBP
MOV ESI,ECX
CALL 0x0011c849
MOV EBP,EAX
SUB EBP,R15D
ADD EBP,0xff
LAB_0011c6e8:
XOR R15D,R15D
TEST EBX,EBX
CMOVLE EBX,R15D
LAB_0011c6f1:
CMP RBX,R15
JZ 0x0011c70a
MOV EDI,dword ptr [R14 + R15*0x4]
MOV ESI,EBP
CALL 0x0011c849
MOV dword ptr [R14 + R15*0x4],EAX
INC R15
JMP 0x0011c6f1
LAB_0011c70a:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void composition_solid_destination_out(long param_1,uint param_2,uint param_3,int param_4)
{
int iVar1;
int4 uVar2;
ulong uVar3;
uint uVar4;
ulong uVar5;
uVar4 = ~param_3 >> 0x18;
if (param_4 != 0xff) {
iVar1 = BYTE_MUL(uVar4,param_4);
uVar4 = (iVar1 - param_4) + 0xff;
}
uVar5 = 0;
uVar3 = (ulong)param_2;
if ((int)param_2 < 1) {
uVar3 = uVar5;
}
for (; uVar3 != uVar5; uVar5 = uVar5 + 1) {
uVar2 = BYTE_MUL(*(int4 *)(param_1 + uVar5 * 4),uVar4);
*(int4 *)(param_1 + uVar5 * 4) = uVar2;
}
return;
}
|
|
61,556 |
ma_log_prefix
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool _ma_log_prefix(MARIA_PAGE *ma_page, uint changed_length,
int move_length,
enum en_key_debug debug_marker __attribute__((unused)))
{
uint translog_parts;
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 7 + 7 + 2 + 2];
uchar *log_pos;
uchar *buff= ma_page->buff;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
MARIA_HA *info= ma_page->info;
pgcache_page_no_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_prefix");
DBUG_PRINT("enter", ("page: %lu changed_length: %u move_length: %d",
(ulong) page, changed_length, move_length));
DBUG_ASSERT(ma_page->size == ma_page->org_size + move_length);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= debug_marker;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
if (move_length < 0)
{
/* Delete prefix */
log_pos[0]= KEY_OP_DEL_PREFIX;
int2store(log_pos+1, -move_length);
log_pos+= 3;
if (changed_length)
{
/*
We don't need a KEY_OP_OFFSET as KEY_OP_DEL_PREFIX has an implicit
offset
*/
log_pos[0]= KEY_OP_CHANGE;
int2store(log_pos+1, changed_length);
log_pos+= 3;
}
}
else
{
/* Add prefix */
DBUG_ASSERT(changed_length >0 && (int) changed_length >= move_length);
log_pos[0]= KEY_OP_ADD_PREFIX;
int2store(log_pos+1, move_length);
int2store(log_pos+3, changed_length);
log_pos+= 5;
}
translog_parts= 1;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
if (changed_length)
{
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= (buff +
info->s->keypage_header);
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= changed_length;
translog_parts= 2;
}
_ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS +
translog_parts, log_pos, &changed_length,
&translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + changed_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
}
|
O0
|
c
|
ma_log_prefix:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xd0(%rbp)
jmp 0x446d5
jmp 0x446d7
jmp 0x446d9
leaq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0xd8(%rbp), %rax
movl %ecx, (%rax)
movq -0xd0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xd8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x58(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0xa, (%rax)
movq -0x60(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq -0x58(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x58(%rbp)
movb %cl, (%rax)
cmpl $0x0, -0x40(%rbp)
jge 0x447db
movq -0x58(%rbp), %rax
movb $0x5, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe0(%rbp)
xorl %eax, %eax
subl -0x40(%rbp), %eax
movw %ax, %cx
movq -0xe0(%rbp), %rax
movw %cx, (%rax)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x447d9
movq -0x58(%rbp), %rax
movb $0x3, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0xe8(%rbp), %rax
movw %cx, (%rax)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x44832
jmp 0x447dd
jmp 0x447df
movq -0x58(%rbp), %rax
movb $0x4, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
movl -0x40(%rbp), %eax
movw %ax, %cx
movq -0xf0(%rbp), %rax
movw %cx, (%rax)
jmp 0x44807
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xf8(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0xf8(%rbp), %rax
movw %cx, (%rax)
movq -0x58(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x58(%rbp)
movl $0x1, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
leaq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x98(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x4488d
movq -0x60(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0x88(%rbp)
movl $0x2, -0x48(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xc8(%rbp), %rcx
movq -0x98(%rbp), %rax
movl %eax, %r8d
addl -0x3c(%rbp), %r8d
movl -0x48(%rbp), %r9d
addl $0x2, %r9d
leaq -0xc0(%rbp), %r10
leaq -0x30(%rbp), %rax
leaq -0x50(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x31e20
movb %al, -0xf9(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x44918
movb -0xf9(%rbp), %al
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
callq 0x2a250
nopl (%rax)
|
_ma_log_prefix:
push rbp
mov rbp, rsp
sub rsp, 120h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_40], edx
mov [rbp+var_44], ecx
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov [rbp+var_60], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_C8], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov rcx, [rbp+var_C8]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_D0], rax
jmp short $+2
loc_446D5:
jmp short $+2
loc_446D7:
jmp short $+2
loc_446D9:
lea rax, [rbp+var_30]
add rax, 2
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov [rbp+var_D8], rax
mov rax, [rbp+var_D0]
mov ecx, eax
mov rax, [rbp+var_D8]
mov [rax], ecx
mov rax, [rbp+var_D0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_D8]
mov [rax+4], cl
mov rax, [rbp+var_58]
add rax, 5
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rcx, rax
add rcx, 1
mov [rbp+var_58], rcx
mov byte ptr [rax], 0Ah
mov rax, [rbp+var_60]
mov rcx, [rbp+var_C8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov cl, [rax+rcx]
mov rax, [rbp+var_58]
mov rdx, rax
add rdx, 1
mov [rbp+var_58], rdx
mov [rax], cl
cmp [rbp+var_40], 0
jge short loc_447DB
mov rax, [rbp+var_58]
mov byte ptr [rax], 5
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_E0], rax
xor eax, eax
sub eax, [rbp+var_40]
mov cx, ax
mov rax, [rbp+var_E0]
mov [rax], cx
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
cmp [rbp+var_3C], 0
jz short loc_447D9
mov rax, [rbp+var_58]
mov byte ptr [rax], 3
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_E8], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_E8]
mov [rax], cx
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
loc_447D9:
jmp short loc_44832
loc_447DB:
jmp short $+2
loc_447DD:
jmp short $+2
loc_447DF:
mov rax, [rbp+var_58]
mov byte ptr [rax], 4
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_F0], rax
mov eax, [rbp+var_40]
mov cx, ax
mov rax, [rbp+var_F0]
mov [rax], cx
jmp short $+2
loc_44807:
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_F8], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_F8]
mov [rax], cx
mov rax, [rbp+var_58]
add rax, 5
mov [rbp+var_58], rax
loc_44832:
mov [rbp+var_48], 1
lea rax, [rbp+var_30]
mov [rbp+var_A0], rax
mov rax, [rbp+var_58]
lea rcx, [rbp+var_30]
sub rax, rcx
mov eax, eax
mov [rbp+var_98], rax
cmp [rbp+var_3C], 0
jz short loc_4488D
mov rax, [rbp+var_60]
mov rcx, [rbp+var_C8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov [rbp+var_90], rax
mov eax, [rbp+var_3C]
mov [rbp+var_88], rax
mov [rbp+var_48], 2
loc_4488D:
mov rax, [rbp+var_38]
mov ecx, [rax+20h]
mov rax, [rbp+var_38]
mov [rax+24h], ecx
mov rax, [rbp+var_C8]
mov rdx, [rax+8]
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_98]
mov r8d, eax
add r8d, [rbp+var_3C]
mov r9d, [rbp+var_48]
add r9d, 2
lea r10, [rbp+var_C0]
lea rax, [rbp+var_30]
lea rdi, [rbp+var_50]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+120h+var_120], r10
mov [rsp+120h+var_118], rax
mov [rsp+120h+var_110], 0
call translog_write_record
mov [rbp+var_F9], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_44918
mov al, [rbp+var_F9]
add rsp, 120h
pop rbp
retn
loc_44918:
call ___stack_chk_fail
|
char ma_log_prefix(long long **a1, unsigned int a2, int a3, int a4)
{
char v4; // cl
unsigned long long v6; // [rsp+50h] [rbp-D0h]
long long *v7; // [rsp+58h] [rbp-C8h]
_QWORD v8[5]; // [rsp+60h] [rbp-C0h] BYREF
long long v9; // [rsp+88h] [rbp-98h]
long long v10; // [rsp+90h] [rbp-90h]
long long v11; // [rsp+98h] [rbp-88h]
long long *v12; // [rsp+C0h] [rbp-60h]
char *v13; // [rsp+C8h] [rbp-58h]
char v14[8]; // [rsp+D0h] [rbp-50h] BYREF
int v15; // [rsp+D8h] [rbp-48h]
int v16; // [rsp+DCh] [rbp-44h]
int v17; // [rsp+E0h] [rbp-40h]
unsigned int v18; // [rsp+E4h] [rbp-3Ch]
long long **v19; // [rsp+E8h] [rbp-38h]
__int16 v20; // [rsp+F0h] [rbp-30h] BYREF
int v21; // [rsp+F2h] [rbp-2Eh]
char v22; // [rsp+F6h] [rbp-2Ah]
char v23; // [rsp+F7h] [rbp-29h]
char v24; // [rsp+F8h] [rbp-28h] BYREF
_BYTE v25[39]; // [rsp+F9h] [rbp-27h] BYREF
*(_QWORD *)&v25[31] = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v12 = a1[2];
v7 = *a1;
v6 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980);
v21 = v6;
v22 = BYTE4(v6);
v13 = &v24;
v23 = 10;
v4 = *((_BYTE *)v12 + (unsigned int)(*(_DWORD *)(*v7 + 1860) - 3));
v13 = v25;
v24 = v4;
if ( a3 >= 0 )
{
*v13 = 4;
*(_WORD *)(v13 + 1) = v17;
*(_WORD *)(v13 + 3) = v18;
v13 += 5;
}
else
{
*v13 = 5;
*(_WORD *)(v13 + 1) = -(__int16)v17;
v13 += 3;
if ( v18 )
{
*v13 = 3;
*(_WORD *)(v13 + 1) = v18;
v13 += 3;
}
}
v15 = 1;
v8[4] = &v20;
v9 = (unsigned int)v13 - (unsigned int)&v20;
if ( v18 )
{
v10 = (long long)v12 + *(unsigned int *)(*v7 + 1860);
v11 = v18;
v15 = 2;
}
*((_DWORD *)v19 + 9) = *((_DWORD *)v19 + 8);
return translog_write_record((long long)v14, 0xCu, v7[1], v7, v18 + v9, v15 + 2, v8, &v20, 0LL);
}
|
_ma_log_prefix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV dword ptr [RBP + -0x40],EDX
MOV dword ptr [RBP + -0x44],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x001446d5
LAB_001446d5:
JMP 0x001446d7
LAB_001446d7:
JMP 0x001446d9
LAB_001446d9:
LEA RAX,[RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xd0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xd8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x5
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x58],RCX
MOV byte ptr [RAX],0xa
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x58],RDX
MOV byte ptr [RAX],CL
CMP dword ptr [RBP + -0x40],0x0
JGE 0x001447db
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],0x5
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0xe0],RAX
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x40]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xe0]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001447d9
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],0x3
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0xe8],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xe8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
LAB_001447d9:
JMP 0x00144832
LAB_001447db:
JMP 0x001447dd
LAB_001447dd:
JMP 0x001447df
LAB_001447df:
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],0x4
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0xf0],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf0]
MOV word ptr [RAX],CX
JMP 0x00144807
LAB_00144807:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0xf8],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x5
MOV qword ptr [RBP + -0x58],RAX
LAB_00144832:
MOV dword ptr [RBP + -0x48],0x1
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RBP + -0x30]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0014488d
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x48],0x2
LAB_0014488d:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0xc8]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x98]
MOV R8D,EAX
ADD R8D,dword ptr [RBP + -0x3c]
MOV R9D,dword ptr [RBP + -0x48]
ADD R9D,0x2
LEA R10,[RBP + -0xc0]
LEA RAX,[RBP + -0x30]
LEA RDI,[RBP + -0x50]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00131e20
MOV byte ptr [RBP + -0xf9],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00144918
MOV AL,byte ptr [RBP + -0xf9]
ADD RSP,0x120
POP RBP
RET
LAB_00144918:
CALL 0x0012a250
|
int8 _ma_log_prefix(long *param_1,uint param_2,int param_3,int4 param_4)
{
long *plVar1;
int1 uVar2;
uint uVar3;
ulong uVar4;
long in_FS_OFFSET;
int1 local_c8 [32];
int1 *local_a8;
ulong local_a0;
long local_98;
ulong local_90;
long local_68;
int1 *local_60;
int1 local_58 [8];
int local_50;
int4 local_4c;
int local_48;
uint local_44;
long *local_40;
int1 local_38 [2];
int4 local_36;
int1 local_32;
int1 local_31;
int1 local_30;
int1 local_2f;
short local_2e;
int1 local_2c [2];
int1 uStack_2a;
int1 auStack_29 [25];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_68 = param_1[2];
plVar1 = (long *)*param_1;
uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_36 = (int4)uVar4;
local_32 = (int1)(uVar4 >> 0x20);
local_31 = 10;
local_30 = *(int1 *)(local_68 + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
local_2e = (short)param_3;
if (param_3 < 0) {
local_2f = 5;
local_2e = -local_2e;
local_60 = local_2c;
if (param_2 != 0) {
local_2c[0] = 3;
/* WARNING: Ignoring partial resolution of indirect */
stack0xffffffffffffffd5 = (short)param_2;
local_60 = auStack_29;
}
}
else {
local_2f = 4;
local_60 = &uStack_2a;
local_2c = (int1 [2])(short)param_2;
}
local_50 = 1;
local_a8 = local_38;
uVar3 = (int)local_60 - (int)local_38;
local_a0 = (ulong)uVar3;
if (param_2 != 0) {
local_98 = local_68 + (ulong)*(uint *)(*plVar1 + 0x744);
local_90 = (ulong)param_2;
local_50 = 2;
}
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_4c = param_4;
local_48 = param_3;
local_44 = param_2;
local_40 = param_1;
uVar2 = translog_write_record
(local_58,0xc,plVar1[1],plVar1,uVar3 + param_2,local_50 + 2,local_c8,local_38,0)
;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar2);
}
|
|
61,557 |
pvio_socket_has_data
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
my_bool pvio_socket_has_data(MARIADB_PVIO *pvio, ssize_t *data_len)
{
struct st_pvio_socket *csock= NULL;
char tmp_buf;
ssize_t len;
my_bool mode;
if (!pvio || !pvio->data)
return 0;
csock= (struct st_pvio_socket *)pvio->data;
/* MSG_PEEK: Peeks at the incoming data. The data is copied into the buffer,
but is not removed from the input queue.
*/
pvio_socket_blocking(pvio, 0, &mode);
len= recv(csock->socket, &tmp_buf, sizeof(tmp_buf), MSG_PEEK);
pvio_socket_blocking(pvio, mode, 0);
if (len < 0)
return 1;
*data_len= len;
return 0;
}
|
O3
|
c
|
pvio_socket_has_data:
testq %rdi, %rdi
je 0x32ee7
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq (%rdi), %r15
testq %r15, %r15
je 0x32ee3
movq %rsi, %rbx
leaq -0x21(%rbp), %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x3252e
movl (%r15), %edi
leaq -0x22(%rbp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x13170
movq %rax, %r15
movsbl (%r12), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3252e
testq %r15, %r15
js 0x32eea
movq %r15, (%rbx)
xorl %eax, %eax
jmp 0x32eec
xorl %eax, %eax
retq
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
pvio_socket_has_data:
test rdi, rdi
jz short loc_32EE7
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r14, rdi
mov r15, [rdi]
test r15, r15
jz short loc_32EE3
mov rbx, rsi
lea r12, [rbp-21h]
mov rdi, r14
xor esi, esi
mov rdx, r12
call pvio_socket_blocking
mov edi, [r15]
lea rsi, [rbp-22h]
mov edx, 1
mov ecx, 2
call _recv
mov r15, rax
movsx esi, byte ptr [r12]
mov rdi, r14
xor edx, edx
call pvio_socket_blocking
test r15, r15
js short loc_32EEA
mov [rbx], r15
loc_32EE3:
xor eax, eax
jmp short loc_32EEC
loc_32EE7:
xor eax, eax
retn
loc_32EEA:
mov al, 1
loc_32EEC:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
char pvio_socket_has_data(unsigned int **a1, long long *a2)
{
unsigned int *v2; // r15
long long v3; // r15
__int16 v5; // [rsp-2Ah] [rbp-2Ah] BYREF
if ( !a1 )
return 0;
v2 = *a1;
if ( !*a1 )
return 0;
pvio_socket_blocking(a1, 0, (bool *)&v5 + 1);
v3 = recv(*v2, &v5, 1LL, 2LL);
pvio_socket_blocking(a1, SHIBYTE(v5), 0LL);
if ( v3 >= 0 )
{
*a2 = v3;
return 0;
}
return 1;
}
|
pvio_socket_has_data:
TEST RDI,RDI
JZ 0x00132ee7
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
MOV R15,qword ptr [RDI]
TEST R15,R15
JZ 0x00132ee3
MOV RBX,RSI
LEA R12,[RBP + -0x21]
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
CALL 0x0013252e
MOV EDI,dword ptr [R15]
LEA RSI,[RBP + -0x22]
MOV EDX,0x1
MOV ECX,0x2
CALL 0x00113170
MOV R15,RAX
MOVSX ESI,byte ptr [R12]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0013252e
TEST R15,R15
JS 0x00132eea
MOV qword ptr [RBX],R15
LAB_00132ee3:
XOR EAX,EAX
JMP 0x00132eec
LAB_00132ee7:
XOR EAX,EAX
RET
LAB_00132eea:
MOV AL,0x1
LAB_00132eec:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 pvio_socket_has_data(int8 *param_1,ssize_t *param_2)
{
int *piVar1;
ssize_t sVar2;
int1 local_2a;
char local_29;
if (param_1 == (int8 *)0x0) {
return 0;
}
piVar1 = (int *)*param_1;
if (piVar1 != (int *)0x0) {
pvio_socket_blocking(param_1,0,&local_29);
sVar2 = recv(*piVar1,&local_2a,1,2);
pvio_socket_blocking(param_1,(int)local_29,0);
if (sVar2 < 0) {
return 1;
}
*param_2 = sVar2;
}
return 0;
}
|
|
61,558 |
my_mb_wc_euc_jp
|
eloqsql/strings/ctype-ujis.c
|
static int
my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_euc_jp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x6b5ba
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6b7d6
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x6b5e2
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6b7d6
cmpl $0xa1, -0x2c(%rbp)
jl 0x6b691
cmpl $0xfe, -0x2c(%rbp)
jg 0x6b691
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6b616
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x6b7d6
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x27f270(%rip), %rax # 0x2ea8a0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x6b64b
movl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0x6b686
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x31(%rbp)
jl 0x6b673
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6b7d6
cmpl $0x8e, -0x2c(%rbp)
jne 0x6b701
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6b6b4
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x6b7d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa1, %eax
jl 0x6b6d2
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xdf, %eax
jle 0x6b6de
movl $0x0, -0x4(%rbp)
jmp 0x6b7d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0xfec0, %eax # imm = 0xFEC0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x6b7d6
cmpl $0x8f, -0x2c(%rbp)
jne 0x6b7cf
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6b728
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x6b7d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x29f159(%rip), %rax # 0x30a8a0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x6b762
movl $0x3, %eax
movl %eax, -0x38(%rbp)
jmp 0x6b7c7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x6b7b4
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xfe, %ecx
movb %al, -0x39(%rbp)
jg 0x6b7b4
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x6b7b4
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6b7d6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_mb_wc_euc_jp:
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 rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_6B5BA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_6B7D6
loc_6B5BA:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_6B5E2
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_6B7D6
loc_6B5E2:
cmp [rbp+var_2C], 0A1h
jl loc_6B691
cmp [rbp+var_2C], 0FEh
jg loc_6B691
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_6B616
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_6B7D6
loc_6B616:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0208_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_6B64B
mov eax, 2
mov [rbp+var_30], eax
jmp short loc_6B686
loc_6B64B:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_31], al
jl short loc_6B673
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
setnle al
mov [rbp+var_31], al
loc_6B673:
mov dl, [rbp+var_31]
mov eax, 0FFFFFFFEh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_30], eax
loc_6B686:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp loc_6B7D6
loc_6B691:
cmp [rbp+var_2C], 8Eh
jnz short loc_6B701
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_6B6B4
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_6B7D6
loc_6B6B4:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A1h
jl short loc_6B6D2
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0DFh
jle short loc_6B6DE
loc_6B6D2:
mov [rbp+var_4], 0
jmp loc_6B7D6
loc_6B6DE:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add eax, 0FEC0h
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_6B7D6
loc_6B701:
cmp [rbp+var_2C], 8Fh
jnz loc_6B7CF
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_6B728
mov [rbp+var_4], 0FFFFFF99h
jmp loc_6B7D6
loc_6B728:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0212_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_6B762
mov eax, 3
mov [rbp+var_38], eax
jmp short loc_6B7C7
loc_6B762:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_6B7B4
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0FEh
mov [rbp+var_39], al
jg short loc_6B7B4
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+2]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_6B7B4
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
setnle al
mov [rbp+var_39], al
loc_6B7B4:
mov dl, [rbp+var_39]
mov eax, 0FFFFFFFDh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_38], eax
loc_6B7C7:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_6B7D6
loc_6B7CF:
mov [rbp+var_4], 0
loc_6B7D6:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
bool v9; // [rsp+1h] [rbp-39h]
bool v11; // [rsp+9h] [rbp-31h]
unsigned int v13; // [rsp+Eh] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v13 = *a3;
if ( v13 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 == 255 )
{
if ( v13 == 142 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu )
{
*a2 = a3[1] + 65216;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else if ( v13 == 143 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]];
*a2 = v6;
if ( v6 )
{
return 3;
}
else
{
v9 = 1;
if ( a3[1] >= 0xA1u )
{
v9 = 1;
if ( a3[1] != 255 )
{
v9 = 1;
if ( a3[2] >= 0xA1u )
v9 = a3[2] == 255;
}
}
v7 = -3;
if ( v9 )
v7 = 0;
return v7;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
v11 = 1;
if ( a3[1] >= 0xA1u )
v11 = a3[1] == 255;
v5 = -2;
if ( v11 )
v5 = 0;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_euc_jp:
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 RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0016b5ba
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016b7d6
LAB_0016b5ba:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x0016b5e2
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016b7d6
LAB_0016b5e2:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x0016b691
CMP dword ptr [RBP + -0x2c],0xfe
JG 0x0016b691
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016b616
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0016b7d6
LAB_0016b616:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3ea8a0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0016b64b
MOV EAX,0x2
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0016b686
LAB_0016b64b:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x31],AL
JL 0x0016b673
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x31],AL
LAB_0016b673:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0xfffffffe
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x30],EAX
LAB_0016b686:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b7d6
LAB_0016b691:
CMP dword ptr [RBP + -0x2c],0x8e
JNZ 0x0016b701
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016b6b4
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0016b7d6
LAB_0016b6b4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa1
JL 0x0016b6d2
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xdf
JLE 0x0016b6de
LAB_0016b6d2:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b7d6
LAB_0016b6de:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EAX,0xfec0
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0016b7d6
LAB_0016b701:
CMP dword ptr [RBP + -0x2c],0x8f
JNZ 0x0016b7cf
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016b728
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0016b7d6
LAB_0016b728:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x40a8a0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0016b762
MOV EAX,0x3
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0016b7c7
LAB_0016b762:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0016b7b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xfe
MOV byte ptr [RBP + -0x39],AL
JG 0x0016b7b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0016b7b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_0016b7b4:
MOV DL,byte ptr [RBP + -0x39]
MOV EAX,0xfffffffd
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
LAB_0016b7c7:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b7d6
LAB_0016b7cf:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016b7d6:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_40;
int4 local_38;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xfe < uVar3)) {
if (uVar3 == 0x8e) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) {
local_c = 0;
}
else {
*param_2 = (long)(int)(param_3[1] + 0xfec0);
local_c = 2;
}
}
else if (uVar3 == 0x8f) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar1 = *(ushort *)
(&jisx0212_eucjp_to_unicode +
(long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) &&
(bVar2 = true, 0xa0 < param_3[2])) {
bVar2 = 0xfe < param_3[2];
}
local_40 = 0xfffffffd;
if (bVar2) {
local_40 = 0;
}
}
else {
local_40 = 3;
}
local_c = local_40;
}
}
else {
local_c = 0;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)
(jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (0xa0 < param_3[1]) {
bVar2 = 0xfe < param_3[1];
}
local_38 = 0xfffffffe;
if (bVar2) {
local_38 = 0;
}
}
else {
local_38 = 2;
}
local_c = local_38;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
61,559 |
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
|
ng-log[P]ng-log/src/ng-log/logging.h
|
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2,
const char* exprtext) {
CheckOpMessageBuilder comb(exprtext);
MakeCheckOpValueString(comb.ForVar1(), v1);
MakeCheckOpValueString(comb.ForVar2(), v2);
return comb.NewString();
}
|
O0
|
c
|
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x35c60
movq -0x48(%rbp), %rdi
callq 0x24ae0
movq %rax, -0x40(%rbp)
jmp 0x3dc63
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3dcd0
jmp 0x3dc72
leaq -0x28(%rbp), %rdi
callq 0x35d20
movq %rax, -0x60(%rbp)
jmp 0x3dc81
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24ab0
jmp 0x3dc90
movq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x35d50
jmp 0x3dc9f
leaq -0x28(%rbp), %rdi
callq 0x35cf0
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x35cf0
movq -0x30(%rbp), %rdi
callq 0xaf50
|
_ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov rax, rdi
mov [rbp+var_50], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rsi, [rbp+var_20]; char *
lea rdi, [rbp+var_28]; this
mov [rbp+var_48], rdi
call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
mov rdi, [rbp+var_48]; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar1Ev; nglog::internal::CheckOpMessageBuilder::ForVar1(void)
mov [rbp+var_40], rax
jmp short $+2
loc_3DC63:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
call _ZN5nglog8internal22MakeCheckOpValueStringINS_11LogSeverityEEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<nglog::LogSeverity>(std::ostream *,nglog::LogSeverity const&)
jmp short $+2
loc_3DC72:
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void)
mov [rbp+var_60], rax
jmp short $+2
loc_3DC81:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_18]
call _ZN5nglog8internal22MakeCheckOpValueStringIiEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<int>(std::ostream *,int const&)
jmp short $+2
loc_3DC90:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_28]
call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void)
jmp short $+2
loc_3DC9F:
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rax, [rbp+var_50]
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rdi, [rbp+var_30]
call __Unwind_Resume
|
long long nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(
long long a1,
long long a2,
unsigned int *a3,
char *a4)
{
long long v5; // [rsp+0h] [rbp-60h]
long long v6; // [rsp+20h] [rbp-40h]
char *v7[2]; // [rsp+38h] [rbp-28h] BYREF
unsigned int *v8; // [rsp+48h] [rbp-18h]
long long v9; // [rsp+50h] [rbp-10h]
long long v10; // [rsp+58h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
v7[1] = a4;
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7, a4);
v6 = nglog::internal::CheckOpMessageBuilder::ForVar1((nglog::internal::CheckOpMessageBuilder *)v7);
nglog::internal::MakeCheckOpValueString<nglog::LogSeverity>(v6, v9);
v5 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)v7);
nglog::internal::MakeCheckOpValueString<int>(v5, v8);
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, v7);
nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7);
return a1;
}
|
MakeCheckOpString<nglog::LogSeverity,int>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0x48],RDI
CALL 0x00135c60
MOV RDI,qword ptr [RBP + -0x48]
LAB_0013dc58:
CALL 0x00124ae0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013dc63
LAB_0013dc63:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0013dcd0
JMP 0x0013dc72
LAB_0013dc72:
LEA RDI,[RBP + -0x28]
CALL 0x00135d20
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0013dc81
LAB_0013dc81:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00124ab0
JMP 0x0013dc90
LAB_0013dc90:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x28]
CALL 0x00135d50
LAB_0013dc9d:
JMP 0x0013dc9f
LAB_0013dc9f:
LEA RDI,[RBP + -0x28]
CALL 0x00135cf0
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x60
POP RBP
RET
|
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > >
nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int
const&, char const*) */
internal * __thiscall
nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>
(internal *this,LogSeverity *param_1,int *param_2,char *param_3)
{
ostream *poVar1;
CheckOpMessageBuilder local_30 [8];
char *local_28;
int *local_20;
LogSeverity *local_18;
internal *local_10;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
CheckOpMessageBuilder::CheckOpMessageBuilder(local_30,param_3);
/* try { // try from 0013dc58 to 0013dc9c has its CatchHandler @ 0013dcb2 */
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar1(local_30);
MakeCheckOpValueString<nglog::LogSeverity>(poVar1,local_18);
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar2(local_30);
MakeCheckOpValueString<int>(poVar1,local_20);
CheckOpMessageBuilder::NewString_abi_cxx11_();
CheckOpMessageBuilder::~CheckOpMessageBuilder(local_30);
return this;
}
|
|
61,560 |
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
|
ng-log[P]ng-log/src/ng-log/logging.h
|
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2,
const char* exprtext) {
CheckOpMessageBuilder comb(exprtext);
MakeCheckOpValueString(comb.ForVar1(), v1);
MakeCheckOpValueString(comb.ForVar2(), v2);
return comb.NewString();
}
|
O1
|
c
|
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x1e68e
movq (%r12), %rdi
movq (%r15), %rsi
callq 0x85d0
movq %rsp, %rdi
callq 0x1e728
movq (%r14), %rsi
movq %rax, %rdi
callq 0x85d0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1e746
movq %rsp, %rdi
callq 0x1e718
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1e718
movq %rbx, %rdi
callq 0x8bb0
nop
|
_ZN5nglog8internal17MakeCheckOpStringIllEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS8_EERKT_RKT0_PKc:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r12, rsp
mov rdi, r12; this
mov rsi, rcx; char *
call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
mov rdi, [r12]
mov rsi, [r15]
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void)
mov rsi, [r14]
mov rdi, rax
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rsi, rsp
mov rdi, rbx
call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void)
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::internal::MakeCheckOpString<long,long>(long long a1, _QWORD *a2, _QWORD *a3, const char *a4)
{
long long v4; // rax
long long v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v12; // [rsp-8h] [rbp-28h] BYREF
int v13; // [rsp+0h] [rbp-20h]
long long v14; // [rsp+8h] [rbp-18h]
v12 = v4;
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)&v12, a4);
std::ostream::_M_insert<long>(v12, *a2);
v6 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)&v12);
std::ostream::_M_insert<long>(v6, *a3);
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, (unsigned int)&v12, v7, v8, v9, v10, v12, v13, v14);
nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)&v12);
return a1;
}
|
MakeCheckOpString<long,long>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R12,RSP
MOV RDI,R12
MOV RSI,RCX
CALL 0x0011e68e
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R15]
LAB_00117e42:
CALL 0x001085d0
MOV RDI,RSP
CALL 0x0011e728
MOV RSI,qword ptr [R14]
MOV RDI,RAX
CALL 0x001085d0
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011e746
LAB_00117e65:
MOV RDI,RSP
CALL 0x0011e718
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > >
nglog::internal::MakeCheckOpString<long, long>(long const&, long const&, char const*) */
internal * __thiscall
nglog::internal::MakeCheckOpString<long,long>
(internal *this,long *param_1,long *param_2,char *param_3)
{
long in_RAX;
long lVar1;
long local_28;
local_28 = in_RAX;
CheckOpMessageBuilder::CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28,param_3);
/* try { // try from 00117e42 to 00117e64 has its CatchHandler @ 00117e7c */
std::ostream::_M_insert<long>(local_28);
lVar1 = CheckOpMessageBuilder::ForVar2((CheckOpMessageBuilder *)&local_28);
std::ostream::_M_insert<long>(lVar1);
CheckOpMessageBuilder::NewString_abi_cxx11_();
CheckOpMessageBuilder::~CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28);
return this;
}
|
|
61,561 |
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
|
ng-log[P]ng-log/src/ng-log/logging.h
|
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2,
const char* exprtext) {
CheckOpMessageBuilder comb(exprtext);
MakeCheckOpValueString(comb.ForVar1(), v1);
MakeCheckOpValueString(comb.ForVar2(), v2);
return comb.NewString();
}
|
O2
|
c
|
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x1a652
movq (%r12), %rdi
movq %r15, %rsi
callq 0x85b0
movq %rsp, %rdi
callq 0x1a6bc
movq %rax, %rdi
movq %r14, %rsi
callq 0x85b0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1a6d4
movq %rsp, %rdi
callq 0x1a6ac
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1a6ac
movq %rbx, %rdi
callq 0x8c30
nop
|
_ZN5nglog8internal17MakeCheckOpStringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_EESt10unique_ptrIS7_St14default_deleteIS7_EERKT_RKT0_PKc:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r12, rsp
mov rdi, r12; this
mov rsi, rcx; char *
call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
mov rdi, [r12]
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void)
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 rsi, rsp
mov rdi, rbx
call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void)
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::internal::MakeCheckOpString<std::string,std::string>(
long long a1,
long long a2,
long long a3,
const char *a4)
{
long long v4; // rax
long long v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
_QWORD v12[5]; // [rsp-8h] [rbp-28h] BYREF
v12[0] = v4;
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v12, a4);
std::operator<<<char>(v12[0], a2);
v6 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)v12);
std::operator<<<char>(v6, a3);
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, (unsigned int)v12, v7, v8, v9, v10, v12[0]);
nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v12);
return a1;
}
|
MakeCheckOpString<std::__cxx11::string,std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R12,RSP
MOV RDI,R12
MOV RSI,RCX
CALL 0x0011a652
MOV RDI,qword ptr [R12]
LAB_00117331:
MOV RSI,R15
CALL 0x001085b0
MOV RDI,RSP
CALL 0x0011a6bc
MOV RDI,RAX
MOV RSI,R14
CALL 0x001085b0
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011a6d4
LAB_00117357:
MOV RDI,RSP
CALL 0x0011a6ac
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > >
nglog::internal::MakeCheckOpString<std::__cxx11::string, std::__cxx11::string
>(std::__cxx11::string const&, std::__cxx11::string const&, char const*) */
internal * __thiscall
nglog::internal::MakeCheckOpString<std::__cxx11::string,std::__cxx11::string>
(internal *this,string *param_1,string *param_2,char *param_3)
{
ostream *in_RAX;
ostream *poVar1;
ostream *local_28;
local_28 = in_RAX;
CheckOpMessageBuilder::CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28,param_3);
/* try { // try from 00117331 to 00117356 has its CatchHandler @ 0011736e */
std::operator<<(local_28,param_1);
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar2((CheckOpMessageBuilder *)&local_28);
std::operator<<(poVar1,param_2);
CheckOpMessageBuilder::NewString_abi_cxx11_();
CheckOpMessageBuilder::~CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28);
return this;
}
|
|
61,562 |
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
|
ng-log[P]ng-log/src/ng-log/logging.h
|
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2,
const char* exprtext) {
CheckOpMessageBuilder comb(exprtext);
MakeCheckOpValueString(comb.ForVar1(), v1);
MakeCheckOpValueString(comb.ForVar2(), v2);
return comb.NewString();
}
|
O3
|
c
|
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x1d764
movq (%r12), %rdi
movq (%r15), %rsi
movq 0x8(%r15), %rdx
callq 0x8720
movq %rsp, %rdi
callq 0x1d7fe
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rdi
callq 0x8720
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1d81c
movq %rsp, %rdi
callq 0x1d7ee
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1d7ee
movq %rbx, %rdi
callq 0x8bb0
|
_ZN5nglog8internal17MakeCheckOpStringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_EESt10unique_ptrIS7_St14default_deleteIS7_EERKT_RKT0_PKc:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r12, rsp
mov rdi, r12; this
mov rsi, rcx; char *
call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
mov rdi, [r12]
mov rsi, [r15]
mov rdx, [r15+8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, rsp
mov rdi, rbx
call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void)
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::internal::MakeCheckOpString<std::string,std::string>(
long long a1,
_QWORD *a2,
_QWORD *a3,
const char *a4)
{
long long v4; // rax
long long v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v12; // [rsp-8h] [rbp-28h] BYREF
int v13; // [rsp+0h] [rbp-20h]
long long v14; // [rsp+8h] [rbp-18h]
v12 = v4;
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)&v12, a4);
std::__ostream_insert<char,std::char_traits<char>>(v12, *a2, a2[1]);
v6 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)&v12);
std::__ostream_insert<char,std::char_traits<char>>(v6, *a3, a3[1]);
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, (unsigned int)&v12, v7, v8, v9, v10, v12, v13, v14);
nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)&v12);
return a1;
}
|
MakeCheckOpString<std::__cxx11::string,std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R12,RSP
MOV RDI,R12
MOV RSI,RCX
CALL 0x0011d764
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_00118db3:
CALL 0x00108720
MOV RDI,RSP
CALL 0x0011d7fe
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RAX
CALL 0x00108720
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011d81c
LAB_00118dda:
MOV RDI,RSP
CALL 0x0011d7ee
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > >
nglog::internal::MakeCheckOpString<std::__cxx11::string, std::__cxx11::string
>(std::__cxx11::string const&, std::__cxx11::string const&, char const*) */
internal * __thiscall
nglog::internal::MakeCheckOpString<std::__cxx11::string,std::__cxx11::string>
(internal *this,string *param_1,string *param_2,char *param_3)
{
ostream *in_RAX;
ostream *poVar1;
ostream *local_28;
local_28 = in_RAX;
CheckOpMessageBuilder::CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28,param_3);
/* try { // try from 00118db3 to 00118dd9 has its CatchHandler @ 00118df1 */
std::__ostream_insert<char,std::char_traits<char>>
(local_28,*(char **)param_1,*(long *)(param_1 + 8));
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar2((CheckOpMessageBuilder *)&local_28);
std::__ostream_insert<char,std::char_traits<char>>
(poVar1,*(char **)param_2,*(long *)(param_2 + 8));
CheckOpMessageBuilder::NewString_abi_cxx11_();
CheckOpMessageBuilder::~CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28);
return this;
}
|
|
61,563 |
translog_flush_set_new_goal_and_wait
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_flush_set_new_goal_and_wait(TRANSLOG_ADDRESS lsn)
{
int flush_no= log_descriptor.flush_no;
DBUG_ENTER("translog_flush_set_new_goal_and_wait");
DBUG_PRINT("enter", ("LSN: " LSN_FMT, LSN_IN_PARTS(lsn)));
mysql_mutex_assert_owner(&log_descriptor.log_flush_lock);
if (cmp_translog_addr(lsn, log_descriptor.next_pass_max_lsn) > 0)
{
log_descriptor.next_pass_max_lsn= lsn;
log_descriptor.max_lsn_requester= pthread_self();
mysql_cond_broadcast(&log_descriptor.new_goal_cond);
}
while (flush_no == log_descriptor.flush_no)
{
mysql_cond_wait(&log_descriptor.log_flush_cond,
&log_descriptor.log_flush_lock);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_flush_set_new_goal_and_wait:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl 0xbf9592(%rip), %eax # 0xc8c8b4
movl %eax, -0xc(%rbp)
jmp 0x93327
jmp 0x93329
jmp 0x9332b
movq -0x8(%rbp), %rax
subq 0xbf9582(%rip), %rax # 0xc8c8b8
cmpq $0x0, %rax
jle 0x93366
movq -0x8(%rbp), %rax
movq %rax, 0xbf9571(%rip) # 0xc8c8b8
callq 0x2a560
movq %rax, 0xbf956d(%rip) # 0xc8c8c0
leaq 0x3f8686(%rip), %rdi # 0x48b9e0
addq $0x800d88, %rdi # imm = 0x800D88
callq 0x933b0
jmp 0x93368
movl -0xc(%rbp), %eax
movl 0xbf9543(%rip), %ecx # 0xc8c8b4
cmpl %ecx, %eax
jne 0x933a0
leaq 0x3f8664(%rip), %rsi # 0x48b9e0
movq %rsi, %rdi
addq $0x800d50, %rdi # imm = 0x800D50
addq $0x800d08, %rsi # imm = 0x800D08
leaq 0xcf575(%rip), %rdx # 0x162909
movl $0x1eac, %ecx # imm = 0x1EAC
callq 0x8d490
jmp 0x93368
jmp 0x933a2
jmp 0x933a4
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
translog_flush_set_new_goal_and_wait:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov eax, cs:dword_C8C8B4
mov [rbp+var_C], eax
jmp short $+2
loc_93327:
jmp short $+2
loc_93329:
jmp short $+2
loc_9332B:
mov rax, [rbp+var_8]
sub rax, cs:qword_C8C8B8
cmp rax, 0
jle short loc_93366
mov rax, [rbp+var_8]
mov cs:qword_C8C8B8, rax
call _pthread_self
mov cs:qword_C8C8C0, rax
lea rdi, log_descriptor
add rdi, 800D88h
call inline_mysql_cond_broadcast_0
loc_93366:
jmp short $+2
loc_93368:
mov eax, [rbp+var_C]
mov ecx, cs:dword_C8C8B4
cmp eax, ecx
jnz short loc_933A0
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800D50h
add rsi, 800D08h
lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1EACh
call inline_mysql_cond_wait_1
jmp short loc_93368
loc_933A0:
jmp short $+2
loc_933A2:
jmp short $+2
loc_933A4:
add rsp, 10h
pop rbp
retn
|
long long translog_flush_set_new_goal_and_wait(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+4h] [rbp-Ch]
v2 = dword_C8C8B4;
if ( a1 - qword_C8C8B8 > 0 )
{
qword_C8C8B8 = a1;
qword_C8C8C0 = pthread_self();
inline_mysql_cond_broadcast_0(&log_descriptor[1049009]);
}
while ( 1 )
{
result = v2;
if ( v2 != dword_C8C8B4 )
break;
inline_mysql_cond_wait_1(
(long long)&log_descriptor[1049002],
(long long)&log_descriptor[1048993],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x1EACu);
}
return result;
}
|
translog_flush_set_new_goal_and_wait:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV EAX,dword ptr [0x00d8c8b4]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00193327
LAB_00193327:
JMP 0x00193329
LAB_00193329:
JMP 0x0019332b
LAB_0019332b:
MOV RAX,qword ptr [RBP + -0x8]
SUB RAX,qword ptr [0x00d8c8b8]
CMP RAX,0x0
JLE 0x00193366
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [0x00d8c8b8],RAX
CALL 0x0012a560
MOV qword ptr [0x00d8c8c0],RAX
LEA RDI,[0x58b9e0]
ADD RDI,0x800d88
CALL 0x001933b0
LAB_00193366:
JMP 0x00193368
LAB_00193368:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [0x00d8c8b4]
CMP EAX,ECX
JNZ 0x001933a0
LEA RSI,[0x58b9e0]
MOV RDI,RSI
ADD RDI,0x800d50
ADD RSI,0x800d08
LEA RDX,[0x262909]
MOV ECX,0x1eac
CALL 0x0018d490
JMP 0x00193368
LAB_001933a0:
JMP 0x001933a2
LAB_001933a2:
JMP 0x001933a4
LAB_001933a4:
ADD RSP,0x10
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_flush_set_new_goal_and_wait(long param_1)
{
int iVar1;
iVar1 = _DAT_00d8c8b4;
if (0 < param_1 - _DAT_00d8c8b8) {
_DAT_00d8c8b8 = param_1;
_DAT_00d8c8c0 = pthread_self();
inline_mysql_cond_broadcast(&DAT_00d8c768);
}
while (iVar1 == _DAT_00d8c8b4) {
inline_mysql_cond_wait
(&DAT_00d8c730,&DAT_00d8c6e8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x1eac);
}
return;
}
|
|
61,564 |
my_copy_fix_mb
|
eloqsql/strings/ctype-mb.c
|
size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
}
|
O3
|
c
|
my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x10(%rbp), %rbx
cmpq %rdx, %r8
movq %r8, -0x58(%rbp)
cmovbq %r8, %rdx
addq %rcx, %rdx
movq 0xb8(%rdi), %rax
movq %rdi, -0x40(%rbp)
movq %rcx, %rsi
movq %r9, -0x30(%rbp)
movq %r9, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq %rax, %r14
movq (%rbx), %rbx
subq %r15, %rbx
je 0xb3765
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x29110
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xb3854
leaq (%rbx,%r13), %rax
movq %rbx, -0x50(%rbp)
addq %r15, %rbx
movq -0x30(%rbp), %rcx
cmpq %r14, %rcx
movq %rax, -0x48(%rbp)
je 0xb383a
addq %r12, %r13
movq %r13, -0x38(%rbp)
addq -0x58(%rbp), %r15
subq %rcx, %r14
movq %rax, %r13
movq %r15, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
testl %eax, %eax
jle 0xb37e0
movl %eax, %r15d
leaq (%r15,%r13), %r12
cmpq -0x38(%rbp), %r12
ja 0xb383f
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29080
movq %r12, %r13
jmp 0xb3828
setne %al
cmpq %r15, %rbx
setae %cl
testb %al, %cl
jne 0xb383f
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xb37fc
movq %rbx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movl $0x3f, %esi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0xb383f
movl %eax, %eax
addq %rax, %r13
movl $0x1, %r15d
movq %r13, %r12
addq %r15, %rbx
incq %r14
movq -0x30(%rbp), %r15
jne 0xb37a5
jmp 0xb3842
movq %rax, %r12
jmp 0xb3842
movq %r13, %r12
movq 0x10(%rbp), %rax
movq %rbx, (%rax)
movq -0x50(%rbp), %rbx
subq -0x48(%rbp), %rbx
addq %r12, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_copy_fix_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, [rbp+arg_0]
cmp r8, rdx
mov [rbp+var_58], r8
cmovb rdx, r8
add rdx, rcx
mov rax, [rdi+0B8h]
mov [rbp+var_40], rdi
mov rsi, rcx
mov [rbp+var_30], r9
mov rcx, r9
mov r8, rbx
call qword ptr [rax+0C8h]
mov r14, rax
mov rbx, [rbx]
sub rbx, r15
jz short loc_B3765
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memmove
loc_B3765:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jz loc_B3854
lea rax, [rbx+r13]
mov [rbp+var_50], rbx
add rbx, r15
mov rcx, [rbp+var_30]
cmp rcx, r14
mov [rbp+var_48], rax
jz loc_B383A
add r13, r12
mov [rbp+var_38], r13
add r15, [rbp+var_58]
sub r14, rcx
mov r13, rax
mov [rbp+var_30], r15
loc_B37A5:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r15
call qword ptr [rax+0C0h]
test eax, eax
jle short loc_B37E0
mov r15d, eax
lea r12, [r15+r13]
cmp r12, [rbp+var_38]
ja short loc_B383F
mov rdi, r13
mov rsi, rbx
mov rdx, r15
call _memcpy
mov r13, r12
jmp short loc_B3828
loc_B37E0:
setnz al
cmp rbx, r15
setnb cl
test cl, al
jnz short loc_B383F
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_B37FC
mov [rax+8], rbx
loc_B37FC:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov esi, 3Fh ; '?'
mov rdx, r13
mov rcx, [rbp+var_38]
call qword ptr [rax+30h]
test eax, eax
jle short loc_B383F
mov eax, eax
add r13, rax
mov r15d, 1
mov r12, r13
loc_B3828:
add rbx, r15
inc r14
mov r15, [rbp+var_30]
jnz loc_B37A5
jmp short loc_B3842
loc_B383A:
mov r12, rax
jmp short loc_B3842
loc_B383F:
mov r12, r13
loc_B3842:
mov rax, [rbp+arg_0]
mov [rax], rbx
mov rbx, [rbp+var_50]
sub rbx, [rbp+var_48]
add rbx, r12
loc_B3854:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
unsigned long long v8; // r12
long long v9; // r14
long long v10; // rbx
unsigned long long v11; // rax
unsigned long long v12; // rbx
unsigned long long v13; // r15
long long v14; // r14
long long v15; // r13
unsigned int v16; // eax
long long v17; // r15
unsigned long long v18; // r12
int v19; // eax
long long v22; // [rsp+10h] [rbp-50h]
unsigned long long v23; // [rsp+18h] [rbp-48h]
unsigned long long v24; // [rsp+28h] [rbp-38h]
unsigned long long v26; // [rsp+30h] [rbp-30h]
v8 = a3;
if ( a5 < a3 )
a3 = a5;
v9 = (*(long long ( **)(long long, long long, unsigned long long, long long, unsigned long long *))(*(_QWORD *)(a1 + 184)
+ 200LL))(
a1,
a4,
a4 + a3,
a6,
a7);
v10 = *a7 - a4;
if ( v10 )
memmove(a2, a4, v10);
if ( !a7[1] )
return v10;
v11 = v10 + a2;
v22 = v10;
v12 = a4 + v10;
v23 = v11;
if ( a6 == v9 )
{
v18 = v11;
goto LABEL_20;
}
v24 = v8 + a2;
v13 = a5 + a4;
v14 = v9 - a6;
v15 = v11;
v26 = v13;
while ( 1 )
{
v16 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v12,
v13);
if ( (int)v16 <= 0 )
break;
v17 = v16;
v18 = v16 + v15;
if ( v18 > v24 )
goto LABEL_19;
memcpy(v15, v12, v16);
v15 = v18;
LABEL_16:
v12 += v17;
++v14;
v13 = v26;
if ( !v14 )
goto LABEL_20;
}
if ( v16 == 0 || v12 < v13 )
{
if ( !a7[1] )
a7[1] = v12;
v19 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
v15,
v24);
if ( v19 > 0 )
{
v15 += (unsigned int)v19;
v17 = 1LL;
v18 = v15;
goto LABEL_16;
}
}
LABEL_19:
v18 = v15;
LABEL_20:
*a7 = v12;
return v18 + v22 - v23;
}
|
my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,qword ptr [RBP + 0x10]
CMP R8,RDX
MOV qword ptr [RBP + -0x58],R8
CMOVC RDX,R8
ADD RDX,RCX
MOV RAX,qword ptr [RDI + 0xb8]
MOV qword ptr [RBP + -0x40],RDI
MOV RSI,RCX
MOV qword ptr [RBP + -0x30],R9
MOV RCX,R9
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R14,RAX
MOV RBX,qword ptr [RBX]
SUB RBX,R15
JZ 0x001b3765
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x00129110
LAB_001b3765:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001b3854
LEA RAX,[RBX + R13*0x1]
MOV qword ptr [RBP + -0x50],RBX
ADD RBX,R15
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,R14
MOV qword ptr [RBP + -0x48],RAX
JZ 0x001b383a
ADD R13,R12
MOV qword ptr [RBP + -0x38],R13
ADD R15,qword ptr [RBP + -0x58]
SUB R14,RCX
MOV R13,RAX
MOV qword ptr [RBP + -0x30],R15
LAB_001b37a5:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
TEST EAX,EAX
JLE 0x001b37e0
MOV R15D,EAX
LEA R12,[R15 + R13*0x1]
CMP R12,qword ptr [RBP + -0x38]
JA 0x001b383f
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
CALL 0x00129080
MOV R13,R12
JMP 0x001b3828
LAB_001b37e0:
SETNZ AL
CMP RBX,R15
SETNC CL
TEST CL,AL
JNZ 0x001b383f
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001b37fc
MOV qword ptr [RAX + 0x8],RBX
LAB_001b37fc:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,0x3f
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x001b383f
MOV EAX,EAX
ADD R13,RAX
MOV R15D,0x1
MOV R12,R13
LAB_001b3828:
ADD RBX,R15
INC R14
MOV R15,qword ptr [RBP + -0x30]
JNZ 0x001b37a5
JMP 0x001b3842
LAB_001b383a:
MOV R12,RAX
JMP 0x001b3842
LAB_001b383f:
MOV R12,R13
LAB_001b3842:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RBX
MOV RBX,qword ptr [RBP + -0x50]
SUB RBX,qword ptr [RBP + -0x48]
ADD RBX,R12
LAB_001b3854:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
size_t my_copy_fix_mb(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
void *pvVar1;
uint uVar2;
long lVar3;
size_t __n;
void *__src;
void *__dest;
ulong uVar4;
uVar4 = param_3;
if (param_5 < param_3) {
uVar4 = param_5;
}
lVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 200))
(param_1,param_4,uVar4 + (long)param_4,param_6,param_7);
__n = *param_7 - (long)param_4;
if (__n != 0) {
memmove(param_2,param_4,__n);
}
if (param_7[1] != 0) {
pvVar1 = (void *)(__n + (long)param_2);
__src = (void *)(__n + (long)param_4);
__dest = pvVar1;
if (param_6 != lVar3) {
lVar3 = lVar3 - param_6;
do {
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,__src,(void *)((long)param_4 + param_5));
if ((int)uVar2 < 1) {
if ((void *)((long)param_4 + param_5) <= __src && uVar2 != 0) break;
if (param_7[1] == 0) {
param_7[1] = (long)__src;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,__dest,(void *)((long)param_2 + param_3));
if ((int)uVar2 < 1) break;
__dest = (void *)((long)__dest + (ulong)uVar2);
uVar4 = 1;
}
else {
uVar4 = (ulong)uVar2;
if ((void *)((long)param_2 + param_3) < (void *)(uVar4 + (long)__dest)) break;
memcpy(__dest,__src,uVar4);
__dest = (void *)(uVar4 + (long)__dest);
}
__src = (void *)((long)__src + uVar4);
lVar3 = lVar3 + 1;
} while (lVar3 != 0);
}
*param_7 = (long)__src;
__n = (__n - (long)pvVar1) + (long)__dest;
}
return __n;
}
|
|
61,565 |
reset_pagecache_counters
|
eloqsql/storage/maria/ma_pagecache.c
|
int reset_pagecache_counters(const char *name __attribute__((unused)),
PAGECACHE *pagecache)
{
DBUG_ENTER("reset_pagecache_counters");
if (!pagecache->inited)
{
DBUG_PRINT("info", ("Key cache %s not initialized.", name));
DBUG_RETURN(0);
}
DBUG_PRINT("info", ("Resetting counters for key cache %s.", name));
pagecache->global_blocks_changed= 0; /* Key_blocks_not_flushed */
pagecache->global_cache_r_requests= 0; /* Key_read_requests */
pagecache->global_cache_read= 0; /* Key_reads */
pagecache->global_cache_w_requests= 0; /* Key_write_requests */
pagecache->global_cache_write= 0; /* Key_writes */
DBUG_RETURN(0);
}
|
O3
|
c
|
reset_pagecache_counters:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x1a8(%rsi)
je 0x3486d
xorps %xmm0, %xmm0
movups %xmm0, 0x178(%rsi)
movups %xmm0, 0x168(%rsi)
movq $0x0, 0x188(%rsi)
xorl %eax, %eax
popq %rbp
retq
|
reset_pagecache_counters:
push rbp
mov rbp, rsp
cmp byte ptr [rsi+1A8h], 0
jz short loc_3486D
xorps xmm0, xmm0
movups xmmword ptr [rsi+178h], xmm0
movups xmmword ptr [rsi+168h], xmm0
mov qword ptr [rsi+188h], 0
loc_3486D:
xor eax, eax
pop rbp
retn
|
long long reset_pagecache_counters(long long a1, long long a2)
{
if ( *(_BYTE *)(a2 + 424) )
{
*(_OWORD *)(a2 + 376) = 0LL;
*(_OWORD *)(a2 + 360) = 0LL;
*(_QWORD *)(a2 + 392) = 0LL;
}
return 0LL;
}
|
reset_pagecache_counters:
PUSH RBP
MOV RBP,RSP
CMP byte ptr [RSI + 0x1a8],0x0
JZ 0x0013486d
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x178],XMM0
MOVUPS xmmword ptr [RSI + 0x168],XMM0
MOV qword ptr [RSI + 0x188],0x0
LAB_0013486d:
XOR EAX,EAX
POP RBP
RET
|
int8 reset_pagecache_counters(int8 param_1,long param_2)
{
if (*(char *)(param_2 + 0x1a8) != '\0') {
*(int8 *)(param_2 + 0x178) = 0;
*(int8 *)(param_2 + 0x180) = 0;
*(int8 *)(param_2 + 0x168) = 0;
*(int8 *)(param_2 + 0x170) = 0;
*(int8 *)(param_2 + 0x188) = 0;
}
return 0;
}
|
|
61,566 |
ftxui::(anonymous namespace)::Set[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode>> const&)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
|
std::string Set(const std::vector<DECMode>& parameters) {
return CSI + "?" + Serialize(parameters) + "h";
}
|
O3
|
cpp
|
ftxui::(anonymous namespace)::Set[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x2a610(%rip), %rsi # 0x5a2a0
movq 0x2a611(%rip), %rdx # 0x5a2a8
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x11be0
leaq 0xf1fb(%rip), %rsi # 0x3eea9
movq %r15, %rdi
callq 0xb7f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x2fee4
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x2fce9
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x2fd0c
leaq 0x58(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x2fd07
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x2fd18
leaq 0x28(%rsp), %rdi
callq 0xb110
jmp 0x2fd26
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb470
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x2fd4a
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2fd50
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xc528(%rip), %rsi # 0x3c29c
leaq 0x8(%rsp), %rdi
callq 0xb7f0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x2fda0
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x2fda6
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fdd8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb400
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fdf3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb400
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2fe0a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb400
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fe39
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x2fe39
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fe5b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x2fe5b
jmp 0x2fe58
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2fe72
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb400
movq %rbx, %rdi
callq 0xb780
|
_ZN5ftxui12_GLOBAL__N_13SetB5cxx11ERKSt6vectorINS0_7DECModeESaIS2_EE:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+88h+var_50]
mov [r12-10h], r12
mov rsi, cs:_ZN5ftxui12_GLOBAL__N_13CSIB5cxx11E; ftxui::`anonymous namespace'::CSI
mov rdx, cs:qword_5A2A8
add rdx, rsi
lea r15, [rsp+88h+var_60]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, asc_3EEA9; "?"
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]; int
mov rdx, [r14+8]; int
lea rdi, [rsp+88h+var_40]; int
call _ZN5ftxui12_GLOBAL__N_19SerializeB5cxx11ERKSt6vectorINS0_7DECModeESaIS2_EE; ftxui::`anonymous namespace'::Serialize(std::vector<ftxui::`anonymous namespace'::DECMode> const&)
mov rcx, [rsp+88h+var_60]
mov r8, [rsp+88h+var_58]
mov rdx, [rsp+88h+var_38]
lea rax, [rdx+r8]
mov edi, 0Fh
cmp rcx, r12
jz short loc_2FCE9
mov rdi, [rsp+88h+var_50]
loc_2FCE9:
mov rsi, qword ptr [rsp+88h+var_40]
cmp rax, rdi
jbe short loc_2FD0C
lea r9, [rsp+88h+var_30]
mov edi, 0Fh
cmp rsi, r9
jz short loc_2FD07
mov rdi, [rsp+88h+var_30]
loc_2FD07:
cmp rax, rdi
jbe short loc_2FD18
loc_2FD0C:
lea rdi, [rsp+88h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_2FD26
loc_2FD18:
lea rdi, [rsp+88h+var_40]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_2FD26:
lea rdx, [rsp+88h+var_70]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_2FD4A
mov [rsp+88h+var_80], rsi
mov rdx, [rcx]
mov [rsp+88h+var_70], rdx
jmp short loc_2FD50
loc_2FD4A:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_2FD50:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+88h+var_78], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, aWorkspaceLlm4b+53h; "h"
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_2FDA0
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_2FDA6
loc_2FDA0:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_2FDA6:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2FDD8
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FDD8:
lea rax, [rsp+88h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2FDF3
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FDF3:
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r12
jz short loc_2FE0A
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FE0A:
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2FE39
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2FE39
mov rbx, rax
loc_2FE39:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2FE5B
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2FE5B
jmp short $+2
loc_2FE58:
mov rbx, rax
loc_2FE5B:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_2FE72
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FE72:
mov rdi, rbx
call __Unwind_Resume
|
void ftxui::`anonymous namespace'::Set[abi:cxx11](long long a1, _QWORD *a2)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char *v6; // rax
unsigned long long v7; // rdi
unsigned long long v8; // rdi
long long v9; // rax
__int128 *v10; // rcx
long long v11; // rax
_OWORD *v12; // rcx
long long v13; // [rsp+0h] [rbp-88h]
__int128 *v14; // [rsp+8h] [rbp-80h] BYREF
long long v15; // [rsp+10h] [rbp-78h]
__int128 v16; // [rsp+18h] [rbp-70h] BYREF
void *v17[2]; // [rsp+28h] [rbp-60h] BYREF
_QWORD v18[2]; // [rsp+38h] [rbp-50h] BYREF
int v19[2]; // [rsp+48h] [rbp-40h] BYREF
long long v20; // [rsp+50h] [rbp-38h]
_QWORD v21[6]; // [rsp+58h] [rbp-30h] BYREF
v17[0] = v18;
std::string::_M_construct<char *>(
(long long)v17,
(_BYTE *)ftxui::`anonymous namespace'::CSI[abi:cxx11],
ftxui::`anonymous namespace'::CSI[abi:cxx11] + qword_5A2A8);
std::string::append(v17, "?");
ftxui::`anonymous namespace'::Serialize[abi:cxx11]((int)v19, *a2, a2[1], v3, v4, v5, v13, v14, v15, v16);
v6 = (char *)v17[1] + v20;
v7 = 15LL;
if ( v17[0] != v18 )
v7 = v18[0];
if ( (unsigned long long)v6 <= v7 )
goto LABEL_7;
v8 = 15LL;
if ( *(_QWORD **)v19 != v21 )
v8 = v21[0];
if ( (unsigned long long)v6 <= v8 )
v9 = std::string::replace(v19, 0LL, 0LL);
else
LABEL_7:
v9 = std::string::_M_append(v17, *(_QWORD *)v19, v20);
v14 = &v16;
v10 = (__int128 *)(v9 + 16);
if ( *(_QWORD *)v9 == v9 + 16 )
{
v16 = *v10;
}
else
{
v14 = *(__int128 **)v9;
*(_QWORD *)&v16 = *(_QWORD *)v10;
}
v15 = *(_QWORD *)(v9 + 8);
*(_QWORD *)v9 = v10;
*(_QWORD *)(v9 + 8) = 0LL;
*(_BYTE *)v10 = 0;
v11 = std::string::append(&v14, "h");
*(_QWORD *)a1 = a1 + 16;
v12 = (_OWORD *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
*(_OWORD *)(a1 + 16) = *v12;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v11;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v12;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( *(_QWORD **)v19 != v21 )
operator delete(*(void **)v19, v21[0] + 1LL);
if ( v17[0] != v18 )
operator delete(v17[0], v18[0] + 1LL);
}
|
Set[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [0x0015a2a0]
MOV RDX,qword ptr [0x0015a2a8]
ADD RDX,RSI
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x00111be0
LAB_0012fca7:
LEA RSI,[0x13eea9]
MOV RDI,R15
CALL 0x0010b7f0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_0012fcbd:
LEA RDI,[RSP + 0x48]
CALL 0x0012fee4
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV EDI,0xf
CMP RCX,R12
JZ 0x0012fce9
MOV RDI,qword ptr [RSP + 0x38]
LAB_0012fce9:
MOV RSI,qword ptr [RSP + 0x48]
CMP RAX,RDI
JBE 0x0012fd0c
LEA R9,[RSP + 0x58]
MOV EDI,0xf
CMP RSI,R9
JZ 0x0012fd07
MOV RDI,qword ptr [RSP + 0x58]
LAB_0012fd07:
CMP RAX,RDI
JBE 0x0012fd18
LAB_0012fd0c:
LEA RDI,[RSP + 0x28]
CALL 0x0010b110
JMP 0x0012fd26
LAB_0012fd18:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0010b470
LAB_0012fd26:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0012fd4a
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0012fd50
LAB_0012fd4a:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0012fd50:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0012fd6d:
LEA RSI,[0x13c29c]
LEA RDI,[RSP + 0x8]
CALL 0x0010b7f0
LAB_0012fd7e:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x0012fda0
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x0012fda6
LAB_0012fda0:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0012fda6:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0012fdd8
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010b400
LAB_0012fdd8:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0012fdf3
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0010b400
LAB_0012fdf3:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0012fe0a
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0010b400
LAB_0012fe0a:
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* ftxui::(anonymous namespace)::Set[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode,
std::allocator<ftxui::(anonymous namespace)::DECMode> > const&) */
void ftxui::(anonymous_namespace)::Set_abi_cxx11_(vector *param_1)
{
long lVar1;
int8 *puVar2;
long *plVar3;
long *plVar4;
ulong uVar5;
long *local_80;
int8 local_78;
long local_70;
int8 uStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
ulong *local_40;
long local_38;
ulong local_30 [2];
local_60 = local_50;
std::__cxx11::string::_M_construct<char*>(&local_60,CSI_abi_cxx11_,DAT_0015a2a8 + CSI_abi_cxx11_);
/* try { // try from 0012fca7 to 0012fcb5 has its CatchHandler @ 0012fe58 */
std::__cxx11::string::append((char *)&local_60);
/* try { // try from 0012fcbd to 0012fcc6 has its CatchHandler @ 0012fe56 */
Serialize_abi_cxx11_((vector *)&local_40);
uVar5 = 0xf;
if (local_60 != local_50) {
uVar5 = local_50[0];
}
if (uVar5 < (ulong)(local_38 + local_58)) {
uVar5 = 0xf;
if (local_40 != local_30) {
uVar5 = local_30[0];
}
if ((ulong)(local_38 + local_58) <= uVar5) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_40,0,(char *)0x0,(ulong)local_60);
goto LAB_0012fd26;
}
}
/* try { // try from 0012fd0c to 0012fd25 has its CatchHandler @ 0012fe36 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_60,(ulong)local_40);
LAB_0012fd26:
local_80 = &local_70;
plVar3 = puVar2 + 2;
if ((long *)*puVar2 == plVar3) {
local_70 = *plVar3;
uStack_68 = puVar2[3];
}
else {
local_70 = *plVar3;
local_80 = (long *)*puVar2;
}
local_78 = puVar2[1];
*puVar2 = plVar3;
puVar2[1] = 0;
*(int1 *)plVar3 = 0;
/* try { // try from 0012fd6d to 0012fd7d has its CatchHandler @ 0012fe16 */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_80);
*(vector **)param_1 = param_1 + 0x10;
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
lVar1 = plVar3[3];
*(long *)(param_1 + 0x10) = *plVar4;
*(long *)(param_1 + 0x18) = lVar1;
}
else {
*(long **)param_1 = (long *)*plVar3;
*(long *)(param_1 + 0x10) = *plVar4;
}
*(long *)(param_1 + 8) = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
return;
}
|
|
61,567 |
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(int*, float*, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/irregularPatchBuilder.cpp
|
void
IrregularPatchBuilder::sharpenBoundaryControlEdges(
int edgeVertPairs[], float edgeSharpness[], int * numSharpEdges) const {
//
// When extracting a manifold subset from a greater non-manifold
// region, the boundary edges for the subset sometimes occur on
// non-manifold edges. When extracting the subset topology in
// cases where faces overlap, those boundary edges can sometimes
// be misinterpreted as manifold interior edges -- as the extra
// faces connected to them that made the edge non-manifold are
// not included in the subset.
//
// So boundary edges are sharpened here -- which generally has no
// effect (as boundary edges are implicitly sharpened) but ensures
// that if the edge is misinterpreted as interior, it will remain
// sharp. And only boundary edges of the base face are sharpened
// here -- it is not necessary to deal with others.
//
// Append boundary edge sharpness to existing sharp edges:
edgeVertPairs += *numSharpEdges * 2;
edgeSharpness += *numSharpEdges;
int faceSize = _surface.GetFaceSize();
for (int corner = 0; corner < faceSize; ++corner) {
FaceVertexSubset const & cSub = _surface.GetCornerSubset(corner);
if (cSub.IsBoundary() && (cSub._numFacesBefore == 0)) {
*edgeSharpness++ = Sdc::Crease::SHARPNESS_INFINITE;
*edgeVertPairs++ = corner;
*edgeVertPairs++ = (corner + 1) % faceSize;
(*numSharpEdges) ++;
}
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(int*, float*, int*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rcx
movl (%rcx), %edx
shll %edx
movq -0x10(%rbp), %rcx
movslq %edx, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movq %rcx, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movl (%rcx), %edx
movq -0x18(%rbp), %rcx
movslq %edx, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movq %rcx, -0x18(%rbp)
movq (%rax), %rdi
callq 0xc6430
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x18f7d4
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movl -0x28(%rbp), %esi
callq 0xc87d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xc73d0
testb $0x1, %al
jne 0x18f762
jmp 0x18f7c4
movq -0x30(%rbp), %rax
movswl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x18f7c4
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x18(%rbp)
movss 0x5a886(%rip), %xmm0 # 0x1ea00c
movss %xmm0, (%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x10(%rbp)
movl %ecx, (%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
cltd
idivl -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl %edx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x18f7c6
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x18f734
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZNK10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilder27sharpenBoundaryControlEdgesEPiPfS3_:
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 rax, [rbp+var_8]
mov [rbp+var_38], rax
mov rcx, [rbp+var_20]
mov edx, [rcx]
shl edx, 1
mov rcx, [rbp+var_10]
movsxd rdx, edx
shl rdx, 2
add rcx, rdx
mov [rbp+var_10], rcx
mov rcx, [rbp+var_20]
mov edx, [rcx]
mov rcx, [rbp+var_18]
movsxd rdx, edx
shl rdx, 2
add rcx, rdx
mov [rbp+var_18], rcx
mov rdi, [rax]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr11FaceSurface11GetFaceSizeEv; OpenSubdiv::v3_6_0::Bfr::FaceSurface::GetFaceSize(void)
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_18F734:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jge loc_18F7D4
mov rax, [rbp+var_38]
mov rdi, [rax]; this
mov esi, [rbp+var_28]; int
call __ZNK10OpenSubdiv6v3_6_03Bfr11FaceSurface15GetCornerSubsetEi; OpenSubdiv::v3_6_0::Bfr::FaceSurface::GetCornerSubset(int)
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr16FaceVertexSubset10IsBoundaryEv; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset::IsBoundary(void)
test al, 1
jnz short loc_18F762
jmp short loc_18F7C4
loc_18F762:
mov rax, [rbp+var_30]
movsx eax, word ptr [rax+2]
cmp eax, 0
jnz short loc_18F7C4
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 4
mov [rbp+var_18], rcx
movss xmm0, cs:dword_1EA00C
movss dword ptr [rax], xmm0
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 4
mov [rbp+var_10], rdx
mov [rax], ecx
mov eax, [rbp+var_28]
add eax, 1
cdq
idiv [rbp+var_24]
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 4
mov [rbp+var_10], rcx
mov [rax], edx
mov rax, [rbp+var_20]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
loc_18F7C4:
jmp short $+2
loc_18F7C6:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp loc_18F734
loc_18F7D4:
add rsp, 40h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(
OpenSubdiv::v3_6_0::Bfr::FaceSurface **this,
int *a2,
float *a3,
int *a4)
{
long long result; // rax
float *v5; // rax
int *v6; // rax
OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *CornerSubset; // [rsp+10h] [rbp-30h]
int i; // [rsp+18h] [rbp-28h]
int FaceSize; // [rsp+1Ch] [rbp-24h]
float *v11; // [rsp+28h] [rbp-18h]
int *v12; // [rsp+30h] [rbp-10h]
v12 = &a2[2 * *a4];
v11 = &a3[*a4];
FaceSize = OpenSubdiv::v3_6_0::Bfr::FaceSurface::GetFaceSize(*this);
for ( i = 0; ; ++i )
{
result = (unsigned int)i;
if ( i >= FaceSize )
break;
CornerSubset = (OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *)OpenSubdiv::v3_6_0::Bfr::FaceSurface::GetCornerSubset(
*this,
i);
if ( (OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset::IsBoundary(CornerSubset) & 1) != 0 && !*((_WORD *)CornerSubset + 1) )
{
v5 = v11++;
*v5 = 10.0;
*v12 = i;
v6 = v12 + 1;
v12 += 2;
*v6 = (i + 1) % FaceSize;
++*a4;
}
}
return result;
}
| |||
61,568 |
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(int*, float*, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/irregularPatchBuilder.cpp
|
void
IrregularPatchBuilder::sharpenBoundaryControlEdges(
int edgeVertPairs[], float edgeSharpness[], int * numSharpEdges) const {
//
// When extracting a manifold subset from a greater non-manifold
// region, the boundary edges for the subset sometimes occur on
// non-manifold edges. When extracting the subset topology in
// cases where faces overlap, those boundary edges can sometimes
// be misinterpreted as manifold interior edges -- as the extra
// faces connected to them that made the edge non-manifold are
// not included in the subset.
//
// So boundary edges are sharpened here -- which generally has no
// effect (as boundary edges are implicitly sharpened) but ensures
// that if the edge is misinterpreted as interior, it will remain
// sharp. And only boundary edges of the base face are sharpened
// here -- it is not necessary to deal with others.
//
// Append boundary edge sharpness to existing sharp edges:
edgeVertPairs += *numSharpEdges * 2;
edgeSharpness += *numSharpEdges;
int faceSize = _surface.GetFaceSize();
for (int corner = 0; corner < faceSize; ++corner) {
FaceVertexSubset const & cSub = _surface.GetCornerSubset(corner);
if (cSub.IsBoundary() && (cSub._numFacesBefore == 0)) {
*edgeSharpness++ = Sdc::Crease::SHARPNESS_INFINITE;
*edgeVertPairs++ = corner;
*edgeVertPairs++ = (corner + 1) % faceSize;
(*numSharpEdges) ++;
}
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(int*, float*, int*) const:
movslq (%rcx), %rax
leaq (%rsi,%rax,8), %r8
leaq (%rdx,%rax,4), %r9
movq (%rdi), %rdi
movq (%rdi), %rax
movl 0x8(%rax), %r10d
xorl %esi, %esi
testl %r10d, %r10d
movl $0x0, %r11d
cmovgl %r10d, %r11d
imulq $0xc, %rsi, %rax
orq $0x2, %rax
cmpq %rsi, %r11
je 0x99777
movq 0x10(%rdi), %rdx
testb $0x1, -0x2(%rdx,%rax)
je 0x9974b
cmpw $0x0, (%rdx,%rax)
je 0x99754
incq %rsi
addq $0xc, %rax
jmp 0x99734
movl $0x41200000, (%r9) # imm = 0x41200000
addq $0x4, %r9
movl %esi, (%r8)
incq %rsi
movl %esi, %eax
cltd
idivl %r10d
movl %edx, 0x4(%r8)
addq $0x8, %r8
incl (%rcx)
jmp 0x9972c
retq
|
_ZNK10OpenSubdiv6v3_6_03Bfr21IrregularPatchBuilder27sharpenBoundaryControlEdgesEPiPfS3_:
movsxd rax, dword ptr [rcx]
lea r8, [rsi+rax*8]
lea r9, [rdx+rax*4]
mov rdi, [rdi]
mov rax, [rdi]
mov r10d, [rax+8]
xor esi, esi
test r10d, r10d
mov r11d, 0
cmovg r11d, r10d
loc_9972C:
imul rax, rsi, 0Ch
or rax, 2
loc_99734:
cmp r11, rsi
jz short locret_99777
mov rdx, [rdi+10h]
test byte ptr [rdx+rax-2], 1
jz short loc_9974B
cmp word ptr [rdx+rax], 0
jz short loc_99754
loc_9974B:
inc rsi
add rax, 0Ch
jmp short loc_99734
loc_99754:
mov dword ptr [r9], 41200000h
add r9, 4
mov [r8], esi
inc rsi
mov eax, esi
cdq
idiv r10d
mov [r8+4], edx
add r8, 8
inc dword ptr [rcx]
jmp short loc_9972C
locret_99777:
retn
|
long long OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder *this,
int *a2,
float *a3,
int *a4)
{
long long v4; // rax
int *v5; // r8
float *v6; // r9
_QWORD *v7; // rdi
int v8; // r10d
long long v9; // rsi
long long v10; // r11
long long result; // rax
long long v12; // rdx
v4 = *a4;
v5 = &a2[2 * v4];
v6 = &a3[v4];
v7 = *(_QWORD **)this;
v8 = *(_DWORD *)(*v7 + 8LL);
v9 = 0LL;
v10 = 0LL;
if ( v8 > 0 )
v10 = (unsigned int)v8;
LABEL_3:
result = (12 * v9) | 2;
while ( v10 != v9 )
{
v12 = v7[2];
if ( (*(_BYTE *)(v12 + result - 2) & 1) != 0 && !*(_WORD *)(v12 + result) )
{
*v6++ = 10.0;
*v5 = v9++;
v5[1] = (int)v9 % v8;
v5 += 2;
++*a4;
goto LABEL_3;
}
++v9;
result += 12LL;
}
return result;
}
|
sharpenBoundaryControlEdges:
MOVSXD RAX,dword ptr [RCX]
LEA R8,[RSI + RAX*0x8]
LEA R9,[RDX + RAX*0x4]
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV R10D,dword ptr [RAX + 0x8]
XOR ESI,ESI
TEST R10D,R10D
MOV R11D,0x0
CMOVG R11D,R10D
LAB_0019972c:
IMUL RAX,RSI,0xc
OR RAX,0x2
LAB_00199734:
CMP R11,RSI
JZ 0x00199777
MOV RDX,qword ptr [RDI + 0x10]
TEST byte ptr [RDX + RAX*0x1 + -0x2],0x1
JZ 0x0019974b
CMP word ptr [RDX + RAX*0x1],0x0
JZ 0x00199754
LAB_0019974b:
INC RSI
ADD RAX,0xc
JMP 0x00199734
LAB_00199754:
MOV dword ptr [R9],0x41200000
ADD R9,0x4
MOV dword ptr [R8],ESI
INC RSI
MOV EAX,ESI
CDQ
IDIV R10D
MOV dword ptr [R8 + 0x4],EDX
ADD R8,0x8
INC dword ptr [RCX]
JMP 0x0019972c
LAB_00199777:
RET
|
/* OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges(int*, float*, int*)
const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::IrregularPatchBuilder::sharpenBoundaryControlEdges
(IrregularPatchBuilder *this,int *param_1,float *param_2,int *param_3)
{
uint uVar1;
long *plVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int *piVar6;
float *pfVar7;
ulong uVar8;
piVar6 = param_1 + (long)*param_3 * 2;
pfVar7 = param_2 + *param_3;
plVar2 = *(long **)this;
uVar1 = *(uint *)(*plVar2 + 8);
uVar5 = 0;
uVar8 = 0;
if (0 < (int)uVar1) {
uVar8 = (ulong)uVar1;
}
do {
uVar4 = uVar5 * 0xc | 2;
while( true ) {
if (uVar8 == uVar5) {
return;
}
lVar3 = plVar2[2];
if (((*(byte *)(lVar3 + -2 + uVar4) & 1) != 0) && (*(short *)(lVar3 + uVar4) == 0)) break;
uVar5 = uVar5 + 1;
uVar4 = uVar4 + 0xc;
}
*pfVar7 = 10.0;
pfVar7 = pfVar7 + 1;
*piVar6 = (int)uVar5;
uVar5 = uVar5 + 1;
piVar6[1] = (int)((long)((ulong)(uint)((int)uVar5 >> 0x1f) << 0x20 | uVar5 & 0xffffffff) %
(long)(int)uVar1);
piVar6 = piVar6 + 2;
*param_3 = *param_3 + 1;
} while( true );
}
|
|
61,569 |
write_hook_for_undo_row_update
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool write_hook_for_undo_row_update(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
MARIA_SHARE *share= tbl_info->s;
share->state.state.checksum+= *(ha_checksum *)hook_arg;
return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg);
}
|
O3
|
c
|
write_hook_for_undo_row_update:
pushq %rbp
movq %rsp, %rbp
movq (%rdx), %rax
movl (%r8), %edx
addl %edx, 0x48(%rax)
movq (%rcx), %rax
movq %rax, 0x98(%rsi)
movq 0xa0(%rsi), %rcx
movq %rcx, %rdx
shlq $0x8, %rdx
je 0x4d53b
xorl %eax, %eax
popq %rbp
retq
orq %rax, %rcx
movq %rcx, 0xa0(%rsi)
jmp 0x4d537
|
write_hook_for_undo_row_update:
push rbp
mov rbp, rsp
mov rax, [rdx]
mov edx, [r8]
add [rax+48h], edx
mov rax, [rcx]
mov [rsi+98h], rax
mov rcx, [rsi+0A0h]
mov rdx, rcx
shl rdx, 8
jz short loc_4D53B
loc_4D537:
xor eax, eax
pop rbp
retn
loc_4D53B:
or rcx, rax
mov [rsi+0A0h], rcx
jmp short loc_4D537
|
long long write_hook_for_undo_row_update(long long a1, long long a2, long long a3, long long *a4, _DWORD *a5)
{
long long v5; // rax
*(_DWORD *)(*(_QWORD *)a3 + 72LL) += *a5;
v5 = *a4;
*(_QWORD *)(a2 + 152) = *a4;
if ( !(*(_QWORD *)(a2 + 160) << 8) )
*(_QWORD *)(a2 + 160) |= v5;
return 0LL;
}
|
write_hook_for_undo_row_update:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDX]
MOV EDX,dword ptr [R8]
ADD dword ptr [RAX + 0x48],EDX
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSI + 0x98],RAX
MOV RCX,qword ptr [RSI + 0xa0]
MOV RDX,RCX
SHL RDX,0x8
JZ 0x0014d53b
LAB_0014d537:
XOR EAX,EAX
POP RBP
RET
LAB_0014d53b:
OR RCX,RAX
MOV qword ptr [RSI + 0xa0],RCX
JMP 0x0014d537
|
int8
write_hook_for_undo_row_update
(int8 param_1,long param_2,long *param_3,ulong *param_4,int *param_5)
{
ulong uVar1;
*(int *)(*param_3 + 0x48) = *(int *)(*param_3 + 0x48) + *param_5;
uVar1 = *param_4;
*(ulong *)(param_2 + 0x98) = uVar1;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar1;
}
return 0;
}
|
|
61,570 |
blst_expand_message_xmd
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/hash_to_field.c
|
void blst_expand_message_xmd(unsigned char *bytes, size_t len_in_bytes,
const unsigned char *msg, size_t msg_len,
const unsigned char *DST, size_t DST_len)
{
size_t buf_len = (len_in_bytes+31) & ((size_t)0-32);
unsigned char *buf_ptr = bytes;
if (buf_len > 255*32)
return;
if (buf_len != len_in_bytes)
buf_ptr = alloca(buf_len);
expand_message_xmd(buf_ptr, len_in_bytes, NULL, 0, msg, msg_len,
DST, DST_len);
if (buf_ptr != bytes) {
unsigned char *ptr = buf_ptr;
while (len_in_bytes--)
*bytes++ = *ptr++;
vec_zero(buf_ptr, buf_len);
}
}
|
O0
|
c
|
blst_expand_message_xmd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x1f, %rax
andq $-0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x1fe0, -0x38(%rbp) # imm = 0x1FE0
jbe 0xa8337
jmp 0xa83e5
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0xa835a
movq -0x38(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
movq -0x28(%rbp), %r10
movq -0x30(%rbp), %rax
xorl %ecx, %ecx
subq $0x10, %rsp
movq %rcx, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xa83f0
addq $0x10, %rsp
movq -0x40(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0xa83e5
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0xa83d8
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb (%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
jmp 0xa839f
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xa87c0
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
blst_expand_message_xmd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
add rax, 1Fh
and rax, 0FFFFFFFFFFFFFFE0h
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
cmp [rbp+var_38], 1FE0h
jbe short loc_A8337
jmp loc_A83E5
loc_A8337:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_10]
jz short loc_A835A
mov rcx, [rbp+var_38]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_40], rax
loc_A835A:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
mov r8, [rbp+var_18]
mov r9, [rbp+var_20]
mov r10, [rbp+var_28]
mov rax, [rbp+var_30]
xor ecx, ecx
sub rsp, 10h
mov rdx, rcx
mov [rsp+60h+var_60], r10
mov [rsp+60h+var_58], rax
call expand_message_xmd
add rsp, 10h
mov rax, [rbp+var_40]
cmp rax, [rbp+var_8]
jz short loc_A83E5
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_A839F:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rcx
cmp rax, 0
jz short loc_A83D8
mov rax, [rbp+var_48]
mov rcx, rax
add rcx, 1
mov [rbp+var_48], rcx
mov cl, [rax]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
jmp short loc_A839F
loc_A83D8:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
call vec_zero
loc_A83E5:
mov rsp, rbp
pop rbp
retn
|
long long blst_expand_message_xmd(char *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long result; // rax
char *v8; // rax
char v9; // cl
char *v10; // rax
long long v11; // [rsp+10h] [rbp-50h] BYREF
char *v12; // [rsp+18h] [rbp-48h]
char *v13; // [rsp+20h] [rbp-40h]
unsigned long long v14; // [rsp+28h] [rbp-38h]
long long v15; // [rsp+30h] [rbp-30h]
long long v16; // [rsp+38h] [rbp-28h]
long long v17; // [rsp+40h] [rbp-20h]
long long v18; // [rsp+48h] [rbp-18h]
long long v19; // [rsp+50h] [rbp-10h]
char *v20; // [rsp+58h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = (a2 + 31) & 0xFFFFFFFFFFFFFFE0LL;
result = (long long)a1;
v13 = a1;
if ( v14 <= 0x1FE0 )
{
if ( v14 != v19 )
v13 = (char *)&v11 - ((v14 + 15) & 0xFFFFFFFFFFFFFFF0LL);
expand_message_xmd((_DWORD)v13, v19, 0, 0, v18, v17, v16, v15);
result = (long long)v13;
if ( v13 != v20 )
{
v12 = v13;
while ( v19-- )
{
v8 = v12++;
v9 = *v8;
v10 = v20++;
*v10 = v9;
}
return vec_zero(v13, v14);
}
}
return result;
}
|
blst_expand_message_xmd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1f
AND RAX,-0x20
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x38],0x1fe0
JBE 0x001a8337
JMP 0x001a83e5
LAB_001a8337:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x001a835a
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x40],RAX
LAB_001a835a:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RBP + -0x18]
MOV R9,qword ptr [RBP + -0x20]
MOV R10,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
XOR ECX,ECX
SUB RSP,0x10
MOV RDX,RCX
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001a83f0
ADD RSP,0x10
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x8]
JZ 0x001a83e5
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_001a839f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x10],RCX
CMP RAX,0x0
JZ 0x001a83d8
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x48],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
JMP 0x001a839f
LAB_001a83d8:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001a87c0
LAB_001a83e5:
MOV RSP,RBP
POP RBP
RET
|
void blst_expand_message_xmd
(int1 *param_1,ulong param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int1 *puVar1;
ulong uVar2;
int1 *puVar3;
int1 auStack_58 [8];
int1 *local_50;
int1 *local_48;
ulong local_40;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
ulong local_18;
int1 *local_10;
puVar3 = auStack_58;
local_40 = param_2 + 0x1f & 0xffffffffffffffe0;
if (local_40 < 0x1fe1) {
local_48 = param_1;
if (local_40 != param_2) {
puVar3 = auStack_58 + -local_40;
local_48 = puVar3;
}
puVar1 = local_48;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
*(int8 *)(puVar3 + -0x10) = param_5;
*(int8 *)(puVar3 + -8) = param_6;
*(int8 *)(puVar3 + -0x18) = 0x1a8389;
expand_message_xmd(puVar1,param_2,0,0,param_3,param_4);
uVar2 = local_40;
puVar1 = local_48;
if (local_48 != local_10) {
local_50 = local_48;
while (local_18 != 0) {
*local_10 = *local_50;
local_50 = local_50 + 1;
local_18 = local_18 - 1;
local_10 = local_10 + 1;
}
local_18 = local_18 - 1;
*(int8 *)(puVar3 + -8) = 0x1a83e5;
vec_zero(puVar1,uVar2);
}
}
return;
}
|
|
61,571 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/./json.hpp
|
void push_back(basic_json&& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (move semantics)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(std::move(val));
set_parent(m_data.m_value.array->back(), old_capacity);
// if val is moved from, basic_json move constructor marks it null, so we do not call the destructor
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0x2ad52
cmpl $0x2, %eax
je 0x2ad72
movl $0x20, %edi
callq 0x193b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x29b56
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8964b(%rip), %rsi # 0xb4363
leaq 0x10(%rsp), %rdi
callq 0x260c3
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x2adc2
xorl %ebp, %ebp
leaq 0xbe15d(%rip), %rsi # 0xe8ea0
leaq -0x6de6(%rip), %rdx # 0x23f64
movq %rbx, %rdi
callq 0x19d90
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x19790
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2a98c
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2adac
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x197a0
jmp 0x2adac
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x2adb9
movq %rbx, %rdi
callq 0x19560
movq %r14, %rdi
callq 0x19e00
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_2AD52
cmp eax, 2
jz short loc_2AD72
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_2AD52:
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
loc_2AD72:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov r14, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2ADAC
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2ADAC
mov r14, rax
mov bpl, 1
loc_2ADAC:
test bpl, bpl
jz short loc_2ADB9
mov rdi, rbx; void *
call ___cxa_free_exception
loc_2ADB9:
mov rdi, r14
call __Unwind_Resume
|
push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0012ad52
CMP EAX,0x2
JZ 0x0012ad72
MOV EDI,0x20
CALL 0x001193b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x00129b56
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0012ad11:
LEA RSI,[0x1b4363]
LEA RDI,[RSP + 0x10]
CALL 0x001260c3
MOV BPL,0x1
LAB_0012ad25:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0012adc2
XOR EBP,EBP
LEA RSI,[0x1e8ea0]
LEA RDX,[0x123f64]
MOV RDI,RBX
CALL 0x00119d90
LAB_0012ad52:
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x00119790
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
LAB_0012ad72:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0012a98c
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
int8 *puVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0012ad11 to 0012ad21 has its CatchHandler @ 0012ada6 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 0012ad25 to 0012ad51 has its CatchHandler @ 0012ad86 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
|
||
61,572 |
emit_atom
|
bluesky950520[P]quickjs/quickjs.c
|
static inline BOOL __JS_AtomIsConst(JSAtom v)
{
return (int32_t)v < JS_ATOM_END;
}
|
O1
|
c
|
emit_atom:
cmpl $0xe0, %esi
jl 0x5e001
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
incl (%rax)
pushq %rax
movl $0x138, %eax # imm = 0x138
addq 0x90(%rdi), %rax
leaq 0x4(%rsp), %rcx
movl %esi, (%rcx)
movl $0x4, %edx
movq %rax, %rdi
movq %rcx, %rsi
callq 0x1a80e
popq %rax
retq
|
emit_atom:
cmp esi, 0E0h
jl short loc_5E001
mov rax, [rdi]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov ecx, esi
mov rax, [rax+rcx*8]
inc dword ptr [rax]
loc_5E001:
push rax
mov eax, 138h
add rax, [rdi+90h]
lea rcx, [rsp+8+var_4]
mov [rcx], esi
mov edx, 4
mov rdi, rax
mov rsi, rcx
call dbuf_put
pop rax
retn
|
_DWORD * emit_atom(_QWORD *a1, int a2)
{
_DWORD *v2; // rax
_QWORD *v3; // rax
_DWORD *v5; // [rsp-4h] [rbp-8h] BYREF
if ( a2 >= 224 )
{
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24LL) + 104LL) + 8LL * (unsigned int)a2);
++*v2;
}
v5 = v2;
v3 = (_QWORD *)(a1[18] + 312LL);
HIDWORD(v5) = a2;
dbuf_put(v3, (long long)&v5 + 4, 4LL);
return v5;
}
|
emit_atom:
CMP ESI,0xe0
JL 0x0015e001
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8]
INC dword ptr [RAX]
LAB_0015e001:
PUSH RAX
MOV EAX,0x138
ADD RAX,qword ptr [RDI + 0x90]
LEA RCX,[RSP + 0x4]
MOV dword ptr [RCX],ESI
MOV EDX,0x4
MOV RDI,RAX
MOV RSI,RCX
CALL 0x0011a80e
POP RAX
RET
|
int8 emit_atom(long *param_1,uint param_2)
{
int *in_RAX;
int8 uStack_8;
if (0xdf < (int)param_2) {
in_RAX = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_2 * 8);
*in_RAX = *in_RAX + 1;
}
uStack_8 = CONCAT44(param_2,(int)in_RAX);
dbuf_put(param_1[0x12] + 0x138,(long)&uStack_8 + 4,4);
return uStack_8;
}
|
|
61,573 |
js_os_remove
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O0
|
c
|
js_os_remove:
subq $0x68, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x13520
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x173e2
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x17444
movq 0x8(%rsp), %rdi
callq 0xe0d0
movl %eax, 0x4(%rsp)
movslq 0x4(%rsp), %rdi
callq 0x12790
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x28b90
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_os_remove:
sub rsp, 68h
mov [rsp+68h+var_40], rsi
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_48], rdi
mov [rsp+68h+var_4C], ecx
mov [rsp+68h+var_58], r8
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+68h+var_60], rax
cmp [rsp+68h+var_60], 0
jnz short loc_173E2
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp short loc_17444
loc_173E2:
mov rdi, [rsp+68h+var_60]
call _remove
mov [rsp+68h+var_64], eax
movsxd rdi, [rsp+68h+var_64]
call js_get_errno
mov [rsp+68h+var_64], eax
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_60]
call JS_FreeCString
mov rcx, [rsp+68h+var_48]
mov eax, [rsp+68h+var_64]
mov [rsp+68h+var_18], rcx
mov [rsp+68h+var_1C], eax
mov eax, [rsp+68h+var_1C]
mov dword ptr [rsp+68h+var_10], eax
mov [rsp+68h+var_8], 0
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov [rsp+68h+var_28], rax
loc_17444:
mov rax, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_28]
add rsp, 68h
retn
|
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
int v5; // eax
int errno; // [rsp+4h] [rbp-64h]
long long v8; // [rsp+8h] [rbp-60h]
long long v9; // [rsp+38h] [rbp-30h]
long long v10; // [rsp+58h] [rbp-10h]
v8 = JS_ToCString(a1, *a5, a5[1]);
if ( v8 )
{
v5 = remove(v8);
errno = js_get_errno(v5);
JS_FreeCString(a1, v8);
LODWORD(v10) = errno;
return v10;
}
else
{
LODWORD(v9) = 0;
}
return v9;
}
|
js_os_remove:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113520
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001173e2
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x00117444
LAB_001173e2:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e0d0
MOV dword ptr [RSP + 0x4],EAX
MOVSXD RDI,dword ptr [RSP + 0x4]
CALL 0x00112790
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00128b90
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x4]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_00117444:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16] js_os_remove(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
char *__filename;
int8 *in_R8;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
__filename = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__filename == (char *)0x0) {
local_30 = 0;
local_28 = 6;
}
else {
iVar2 = remove(__filename);
local_30 = js_get_errno((long)iVar2);
JS_FreeCString(param_1,__filename);
uStack_2c = uStack_c;
local_28 = 0;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
|
|
61,574 |
js_os_remove
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O1
|
c
|
js_os_remove:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r15d, %r15d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x180e0
movq %rax, %r14
movq %rax, %rdi
callq 0xe0d0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x180ce
callq 0xe0b0
xorl %ebp, %ebp
subl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x202c9
movl %ebp, %r15d
xorl %edx, %edx
jmp 0x180e5
movl $0x6, %edx
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
js_os_remove:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r15d, r15d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_180E0
mov r14, rax
mov rdi, rax
call _remove
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_180CE
call ___errno_location
xor ebp, ebp
sub ebp, [rax]
loc_180CE:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r15d, ebp
xor edx, edx
jmp short loc_180E5
loc_180E0:
mov edx, 6
loc_180E5:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v6; // r15
long long v7; // rax
long long v8; // r14
long long v9; // rdi
unsigned int v10; // ebp
v6 = 0LL;
v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v7 )
{
v8 = v7;
v9 = v7;
v10 = remove(v7);
if ( v10 == -1 )
v10 = -*(_DWORD *)__errno_location(v9);
JS_FreeCString(a1, v8);
return v10;
}
return v6;
}
|
js_os_remove:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
XOR R15D,R15D
XOR ESI,ESI
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x001180e0
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010e0d0
MOV EBP,EAX
CMP EAX,-0x1
JNZ 0x001180ce
CALL 0x0010e0b0
XOR EBP,EBP
SUB EBP,dword ptr [RAX]
LAB_001180ce:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001202c9
MOV R15D,EBP
XOR EDX,EDX
JMP 0x001180e5
LAB_001180e0:
MOV EDX,0x6
LAB_001180e5:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int js_os_remove(int8 param_1)
{
int iVar1;
char *__filename;
int *piVar2;
int8 *in_R8;
iVar1 = 0;
__filename = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__filename != (char *)0x0) {
iVar1 = remove(__filename);
if (iVar1 == -1) {
piVar2 = __errno_location();
iVar1 = -*piVar2;
}
JS_FreeCString(param_1,__filename);
}
return iVar1;
}
|
|
61,575 |
js_os_remove
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O2
|
c
|
js_os_remove:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x10ef0
testq %rax, %rax
je 0x12e07
movq %rax, %r14
movq %rax, %rdi
callq 0xe0d0
movslq %eax, %rdi
callq 0x1082f
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a4db
movl %r15d, %eax
xorl %edx, %edx
jmp 0x12e0c
pushq $0x6
popq %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
|
js_os_remove:
push r15
push r14
push rbx
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToCString
test rax, rax
jz short loc_12E07
mov r14, rax
mov rdi, rax
call _remove
movsxd rdi, eax
call js_get_errno
mov r15, rax
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov eax, r15d
xor edx, edx
jmp short loc_12E0C
loc_12E07:
push 6
pop rdx
xor eax, eax
loc_12E0C:
pop rbx
pop r14
pop r15
retn
|
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v5; // rax
long long v6; // r14
int v7; // eax
unsigned int errno; // r15d
v5 = JS_ToCString(a1, *a5, a5[1]);
if ( !v5 )
return 0LL;
v6 = v5;
v7 = remove(v5);
errno = js_get_errno(v7);
JS_FreeCString(a1, v6);
return errno;
}
|
js_os_remove:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x00110ef0
TEST RAX,RAX
JZ 0x00112e07
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010e0d0
MOVSXD RDI,EAX
CALL 0x0011082f
MOV R15,RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011a4db
MOV EAX,R15D
XOR EDX,EDX
JMP 0x00112e0c
LAB_00112e07:
PUSH 0x6
POP RDX
XOR EAX,EAX
LAB_00112e0c:
POP RBX
POP R14
POP R15
RET
|
int4 js_os_remove(int8 param_1)
{
int iVar1;
int4 uVar2;
char *__filename;
int8 *in_R8;
__filename = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__filename == (char *)0x0) {
uVar2 = 0;
}
else {
iVar1 = remove(__filename);
uVar2 = js_get_errno((long)iVar1);
JS_FreeCString(param_1,__filename);
}
return uVar2;
}
|
|
61,576 |
js_os_remove
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_remove(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename;
int ret;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
#if defined(_WIN32)
{
struct stat st;
if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) {
ret = rmdir(filename);
} else {
ret = unlink(filename);
}
}
#else
ret = remove(filename);
#endif
ret = js_get_errno(ret);
JS_FreeCString(ctx, filename);
return JS_NewInt32(ctx, ret);
}
|
O3
|
c
|
js_os_remove:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %r15d, %r15d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20717
testq %rax, %rax
je 0x18ada
movq %rax, %r14
movq %rax, %rdi
callq 0xe0d0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x18ac8
callq 0xe0b0
xorl %ebp, %ebp
subl (%rax), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x209ed
movl %ebp, %r15d
xorl %edx, %edx
jmp 0x18adf
movl $0x6, %edx
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
js_os_remove:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor r15d, r15d
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_18ADA
mov r14, rax
mov rdi, rax
call _remove
mov ebp, eax
cmp eax, 0FFFFFFFFh
jnz short loc_18AC8
call ___errno_location
xor ebp, ebp
sub ebp, [rax]
loc_18AC8:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r15d, ebp
xor edx, edx
jmp short loc_18ADF
loc_18ADA:
mov edx, 6
loc_18ADF:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v6; // r15
long long v7; // rax
long long v8; // r14
long long v9; // rdi
unsigned int v10; // ebp
v6 = 0LL;
v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v7 )
{
v8 = v7;
v9 = v7;
v10 = remove(v7);
if ( v10 == -1 )
v10 = -*(_DWORD *)__errno_location(v9);
JS_FreeCString(a1, v8);
return v10;
}
return v6;
}
|
js_os_remove:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
XOR R15D,R15D
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00120717
TEST RAX,RAX
JZ 0x00118ada
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010e0d0
MOV EBP,EAX
CMP EAX,-0x1
JNZ 0x00118ac8
CALL 0x0010e0b0
XOR EBP,EBP
SUB EBP,dword ptr [RAX]
LAB_00118ac8:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001209ed
MOV R15D,EBP
XOR EDX,EDX
JMP 0x00118adf
LAB_00118ada:
MOV EDX,0x6
LAB_00118adf:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int js_os_remove(int8 param_1)
{
int iVar1;
char *__filename;
int *piVar2;
int8 *in_R8;
iVar1 = 0;
__filename = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__filename != (char *)0x0) {
iVar1 = remove(__filename);
if (iVar1 == -1) {
piVar2 = __errno_location();
iVar1 = -*piVar2;
}
JS_FreeCString(param_1,__filename);
}
return iVar1;
}
|
|
61,577 |
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
|
CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(
CopyingInputStream* copying_stream, int block_size)
: copying_stream_(copying_stream),
owns_copying_stream_(false),
failed_(false),
position_(0),
buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize),
buffer_used_(0),
backup_bytes_(0) {}
|
O0
|
cpp
|
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1adfe0
movq 0x10(%rsp), %rdi
leaq 0xce433(%rip), %rax # 0x27b120
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movb $0x0, 0x11(%rdi)
movq $0x0, 0x18(%rdi)
addq $0x20, %rdi
callq 0x1ae030
movq 0x10(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x24(%rsp)
jle 0x1acd35
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x1acd40
movl $0x2000, %eax # imm = 0x2000
movl %eax, 0xc(%rsp)
jmp 0x1acd40
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movl 0xc(%rsp), %edx
movl %edx, (%rcx)
movl $0x0, 0x2c(%rax)
movl $0x0, 0x30(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf2io25CopyingInputStreamAdaptorC2EPNS1_18CopyingInputStreamEi:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_14], edx
mov rdi, [rsp+38h+var_8]; this
mov [rsp+38h+var_28], rdi
call _ZN6google8protobuf2io19ZeroCopyInputStreamC2Ev; google::protobuf::io::ZeroCopyInputStream::ZeroCopyInputStream(void)
mov rdi, [rsp+38h+var_28]
lea rax, _ZTVN6google8protobuf2io25CopyingInputStreamAdaptorE; `vtable for'google::protobuf::io::CopyingInputStreamAdaptor
add rax, 10h
mov [rdi], rax
mov rax, [rsp+38h+var_10]
mov [rdi+8], rax
mov byte ptr [rdi+10h], 0
mov byte ptr [rdi+11h], 0
mov qword ptr [rdi+18h], 0
add rdi, 20h ; ' '
call _ZNSt10unique_ptrIA_hSt14default_deleteIS0_EEC2IS2_vEEv; std::unique_ptr<uchar []>::unique_ptr<std::default_delete<uchar []>,void>(void)
mov rax, [rsp+38h+var_28]
add rax, 28h ; '('
mov [rsp+38h+var_20], rax
cmp [rsp+38h+var_14], 0
jle short loc_1ACD35
mov eax, [rsp+38h+var_14]
mov [rsp+38h+var_2C], eax
jmp short loc_1ACD40
loc_1ACD35:
mov eax, 2000h
mov [rsp+38h+var_2C], eax
jmp short $+2
loc_1ACD40:
mov rax, [rsp+38h+var_28]
mov rcx, [rsp+38h+var_20]
mov edx, [rsp+38h+var_2C]
mov [rcx], edx
mov dword ptr [rax+2Ch], 0
mov dword ptr [rax+30h], 0
add rsp, 38h
retn
|
google::protobuf::io::CopyingInputStreamAdaptor * google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(
google::protobuf::io::CopyingInputStreamAdaptor *this,
google::protobuf::io::CopyingInputStream *a2,
int a3)
{
google::protobuf::io::CopyingInputStreamAdaptor *result; // rax
int v4; // [rsp+Ch] [rbp-2Ch]
google::protobuf::io::ZeroCopyInputStream::ZeroCopyInputStream(this);
*(_QWORD *)this = &`vtable for'google::protobuf::io::CopyingInputStreamAdaptor + 2;
*((_QWORD *)this + 1) = a2;
*((_BYTE *)this + 16) = 0;
*((_BYTE *)this + 17) = 0;
*((_QWORD *)this + 3) = 0LL;
std::unique_ptr<unsigned char []>::unique_ptr<std::default_delete<unsigned char []>,void>((char *)this + 32);
if ( a3 <= 0 )
v4 = 0x2000;
else
v4 = a3;
result = this;
*((_DWORD *)this + 10) = v4;
*((_DWORD *)this + 11) = 0;
*((_DWORD *)this + 12) = 0;
return result;
}
| |||
61,578 |
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
|
CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(
CopyingInputStream* copying_stream, int block_size)
: copying_stream_(copying_stream),
owns_copying_stream_(false),
failed_(false),
position_(0),
buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize),
buffer_used_(0),
backup_bytes_(0) {}
|
O3
|
cpp
|
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int):
leaq 0x63f0f(%rip), %rax # 0x101188
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movw $0x0, 0x10(%rdi)
testl %edx, %edx
movl $0x2000, %eax # imm = 0x2000
cmovgl %edx, %eax
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl %eax, 0x28(%rdi)
movq $0x0, 0x2c(%rdi)
retq
nop
|
_ZN6google8protobuf2io25CopyingInputStreamAdaptorC2EPNS1_18CopyingInputStreamEi:
lea rax, off_101188
mov [rdi], rax
mov [rdi+8], rsi
mov word ptr [rdi+10h], 0
test edx, edx
mov eax, 2000h
cmovg eax, edx
xorps xmm0, xmm0
movups xmmword ptr [rdi+18h], xmm0
mov [rdi+28h], eax
mov qword ptr [rdi+2Ch], 0
retn
|
long long google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(
google::protobuf::io::CopyingInputStreamAdaptor *this,
google::protobuf::io::CopyingInputStream *a2,
int a3)
{
long long result; // rax
*(_QWORD *)this = off_101188;
*((_QWORD *)this + 1) = a2;
*((_WORD *)this + 8) = 0;
result = 0x2000LL;
if ( a3 > 0 )
result = (unsigned int)a3;
*(_OWORD *)((char *)this + 24) = 0LL;
*((_DWORD *)this + 10) = result;
*(_QWORD *)((char *)this + 44) = 0LL;
return result;
}
|
CopyingInputStreamAdaptor:
LEA RAX,[0x201188]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],RSI
MOV word ptr [RDI + 0x10],0x0
TEST EDX,EDX
MOV EAX,0x2000
CMOVG EAX,EDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV dword ptr [RDI + 0x28],EAX
MOV qword ptr [RDI + 0x2c],0x0
RET
|
/* google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*,
int) */
void __thiscall
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor
(CopyingInputStreamAdaptor *this,CopyingInputStream *param_1,int param_2)
{
int iVar1;
*(int ***)this = &PTR__CopyingInputStreamAdaptor_00201188;
*(CopyingInputStream **)(this + 8) = param_1;
*(int2 *)(this + 0x10) = 0;
iVar1 = 0x2000;
if (0 < param_2) {
iVar1 = param_2;
}
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int *)(this + 0x28) = iVar1;
*(int8 *)(this + 0x2c) = 0;
return;
}
|
|
61,579 |
lf_hash_iterate
|
eloqsql/mysys/lf_hash.cc
|
int lf_hash_iterate(LF_HASH *hash, LF_PINS *pins,
my_hash_walk_action action, void *argument)
{
CURSOR cursor;
uint bucket= 0;
int res;
LF_SLIST **el;
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (unlikely(!el))
return 0; /* if there's no bucket==0, the hash is empty */
if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins)))
return 0; /* if there's no bucket==0, the hash is empty */
res= l_find(el, 0, 0, (uchar*)argument, 0, &cursor, pins, action);
lf_unpin(pins, 2);
lf_unpin(pins, 1);
lf_unpin(pins, 0);
return res;
}
|
O3
|
cpp
|
lf_hash_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, -0x30(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x24b54
testq %rax, %rax
je 0x25362
movq %rax, %r12
cmpq $0x0, (%rax)
jne 0x25331
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x24e62
testl %eax, %eax
jne 0x25362
xorl %r14d, %r14d
leaq -0x48(%rbp), %r9
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %r8d, %r8d
pushq -0x30(%rbp)
pushq %rbx
callq 0x25374
popq %rcx
popq %rdx
xorl %ecx, %ecx
xchgq %rcx, 0x10(%rbx)
xorl %ecx, %ecx
xchgq %rcx, 0x8(%rbx)
movl %eax, %r13d
xchgq %r14, (%rbx)
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
lf_hash_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov [rbp+var_30], rdx
mov rbx, rsi
mov r14, rdi
xor r13d, r13d
xor esi, esi
call lf_dynarray_lvalue
test rax, rax
jz short loc_25362
mov r12, rax
cmp qword ptr [rax], 0
jnz short loc_25331
xor r13d, r13d
mov rdi, r14
mov rsi, r12
xor edx, edx
mov rcx, rbx
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
test eax, eax
jnz short loc_25362
loc_25331:
xor r14d, r14d
lea r9, [rbp+var_48]
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r15
xor r8d, r8d
push [rbp+var_30]
push rbx
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
pop rcx
pop rdx
xor ecx, ecx
xchg rcx, [rbx+10h]
xor ecx, ecx
xchg rcx, [rbx+8]
mov r13d, eax
xchg r14, [rbx]
loc_25362:
mov eax, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long lf_hash_iterate(long long a1, volatile long long *a2, long long a3, int a4)
{
unsigned int v5; // r13d
volatile signed long long *v6; // rax
int v7; // r12d
unsigned int v8; // eax
char v10; // [rsp+8h] [rbp-48h] BYREF
long long v11; // [rsp+20h] [rbp-30h]
v11 = a3;
v5 = 0;
v6 = (volatile signed long long *)lf_dynarray_lvalue(a1, 0);
if ( v6 )
{
v7 = (int)v6;
if ( *v6 || (v5 = 0, !(unsigned int)initialize_bucket(a1, v6, 0, (long long)a2)) )
{
v8 = l_find(v7, 0, 0, a4, 0, (unsigned int)&v10, (long long)a2, v11);
_InterlockedExchange64(a2 + 2, 0LL);
_InterlockedExchange64(a2 + 1, 0LL);
v5 = v8;
_InterlockedExchange64(a2, 0LL);
}
}
return v5;
}
|
lf_hash_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV qword ptr [RBP + -0x30],RDX
MOV RBX,RSI
MOV R14,RDI
XOR R13D,R13D
XOR ESI,ESI
CALL 0x00124b54
TEST RAX,RAX
JZ 0x00125362
MOV R12,RAX
CMP qword ptr [RAX],0x0
JNZ 0x00125331
XOR R13D,R13D
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV RCX,RBX
CALL 0x00124e62
TEST EAX,EAX
JNZ 0x00125362
LAB_00125331:
XOR R14D,R14D
LEA R9,[RBP + -0x48]
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R15
XOR R8D,R8D
PUSH qword ptr [RBP + -0x30]
PUSH RBX
CALL 0x00125374
POP RCX
POP RDX
XOR ECX,ECX
XCHG qword ptr [RBX + 0x10],RCX
XOR ECX,ECX
XCHG qword ptr [RBX + 0x8],RCX
MOV R13D,EAX
XCHG qword ptr [RBX],R14
LAB_00125362:
MOV EAX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
lf_hash_iterate(st_lf_hash *param_1,LF_PINS *param_2,_func_char_void_ptr_void_ptr *param_3,
uchar *param_4)
{
int iVar1;
int4 uVar2;
LF_SLIST **ppLVar3;
CURSOR local_50 [24];
_func_char_void_ptr_void_ptr *local_38;
uVar2 = 0;
local_38 = param_3;
ppLVar3 = (LF_SLIST **)lf_dynarray_lvalue();
if (ppLVar3 != (LF_SLIST **)0x0) {
if ((*ppLVar3 == (LF_SLIST *)0x0) &&
(iVar1 = initialize_bucket(param_1,ppLVar3,0,param_2), iVar1 != 0)) {
return 0;
}
uVar2 = l_find(ppLVar3,(charset_info_st *)0x0,0,param_4,0,local_50,param_2,local_38);
LOCK();
*(int8 *)(param_2 + 0x10) = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)param_2 = 0;
UNLOCK();
}
return uVar2;
}
|
|
61,580 |
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
|
monkey531[P]llama/common/json.hpp
|
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x887ed(%rip), %rsi # 0x11636a
leaq 0x887f2(%rip), %rdx # 0x116376
leaq 0x28(%rsp), %rdi
callq 0x2698a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x898b8
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1e360
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1d310
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1d310
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1d310
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x8dc27
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1dc40
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8dc42
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1dc40
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8dc59
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1dc40
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x89ab4
leaq 0xc94c1(%rip), %rax # 0x157130
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8dc8d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc40
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8dd1b
movq 0x18(%rsp), %rsi
jmp 0x8dd13
movq %rax, %rbx
jmp 0x8dd04
movq %rax, %rbx
jmp 0x8dd1b
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8dcdd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc40
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1f28d
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8dd1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1dc40
movq %rbx, %rdi
callq 0x1e650
|
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aOutOfRange; "out_of_range"
lea rdx, aOutOfRange+0Ch; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_8DC27
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8DC27:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8DC42
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8DC42:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_8DC59
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8DC59:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range
add rax, 10h
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_8DC8D
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8DC8D:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_8DD1B
mov rsi, [rsp+arg_10]
jmp short loc_8DD13
mov rbx, rax
jmp short loc_8DD04
mov rbx, rax
jmp short loc_8DD1B
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_8DCDD
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8DCDD:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5__cold_1
mov rbx, [r12]
loc_8DD04:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_8DD1B
mov rsi, [rsp+arg_30]
loc_8DD13:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8DD1B:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>(v7, "out_of_range", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range + 2;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0018db76:
LEA RSI,[0x21636a]
LEA RDX,[0x216376]
LEA RDI,[RSP + 0x28]
CALL 0x0012698a
LAB_0018db8e:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x001898b8
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0018dbcd:
LEA RDI,[RSP + 0x8]
CALL 0x0011e360
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0011d310
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0011d310
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011d310
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0018dc27
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011dc40
LAB_0018dc27:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0018dc42
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011dc40
LAB_0018dc42:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0018dc59
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011dc40
LAB_0018dc59:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0018dc5e:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00189ab4
LAB_0018dc68:
LEA RAX,[0x257130]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0018dc8d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc40
LAB_0018dc8d:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0018db76 to 0018db8d has its CatchHandler @ 0018dcbb */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range","");
/* try { // try from 0018db8e to 0018db9e has its CatchHandler @ 0018dcb6 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0018dbcd to 0018dc0f has its CatchHandler @ 0018dcc0 */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0018dc5e to 0018dc67 has its CatchHandler @ 0018dca2 */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_00257140;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
|
|
61,581 |
R3D_UpdateResolution
|
r3d/src/r3d_core.c
|
void R3D_UpdateResolution(int width, int height)
{
if (width <= 0 || height <= 0) {
TraceLog(LOG_ERROR, "R3D: Invalid resolution given to 'R3D_UpdateResolution'");
return;
}
if (width == R3D.state.resolution.width && height == R3D.state.resolution.height) {
return;
}
r3d_framebuffers_unload();
r3d_framebuffers_load(width, height);
R3D.state.resolution.width = width;
R3D.state.resolution.height = height;
R3D.state.resolution.texelX = 1.0f / width;
R3D.state.resolution.texelY = 1.0f / height;
}
|
O3
|
c
|
R3D_UpdateResolution:
testl %edi, %edi
setg %al
testl %esi, %esi
setg %cl
testb %cl, %al
jne 0xc45c6
leaq 0x4e085(%rip), %rsi # 0x11263f
movl $0x5, %edi
xorl %eax, %eax
jmp 0xa9c09
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
leaq 0xeb684(%rip), %r15 # 0x1afc60
cmpl %edi, 0x1700(%r15)
jne 0xc45ee
cmpl %ebx, 0x1704(%r15)
je 0xc463c
callq 0xc0447
movl %r14d, %edi
movl %ebx, %esi
callq 0xbf62a
cvtsi2ss %r14d, %xmm0
movl %r14d, 0x1700(%r15)
movss 0x1d9f3(%rip), %xmm1 # 0xe2004
movaps %xmm1, %xmm2
divss %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
movl %ebx, 0x1704(%r15)
movss %xmm2, 0x1708(%r15)
divss %xmm0, %xmm1
movss %xmm1, 0x170c(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
R3D_UpdateResolution:
test edi, edi
setnle al
test esi, esi
setnle cl
test al, cl
jnz short loc_C45C6
lea rsi, aR3dInvalidReso; "R3D: Invalid resolution given to 'R3D_U"...
mov edi, 5
xor eax, eax
jmp TraceLog
loc_C45C6:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14d, edi
lea r15, R3D
cmp [r15+1700h], edi
jnz short loc_C45EE
cmp [r15+1704h], ebx
jz short loc_C463C
loc_C45EE:
call r3d_framebuffers_unload
mov edi, r14d
mov esi, ebx
call r3d_framebuffers_load
cvtsi2ss xmm0, r14d
mov [r15+1700h], r14d
movss xmm1, cs:dword_E2004
movaps xmm2, xmm1
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, ebx
mov [r15+1704h], ebx
movss dword ptr [r15+1708h], xmm2
divss xmm1, xmm0
movss dword ptr [r15+170Ch], xmm1
loc_C463C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
void R3D_UpdateResolution(long long a1, signed int a2)
{
if ( a2 > 0 && (int)a1 > 0 )
{
if ( *(_DWORD *)&R3D[5888] != (_DWORD)a1 || *(_DWORD *)&R3D[5892] != a2 )
{
r3d_framebuffers_unload(a1);
r3d_framebuffers_load(a1, a2);
*(_DWORD *)&R3D[5888] = a1;
*(_DWORD *)&R3D[5892] = a2;
*(float *)&R3D[5896] = 1.0 / (float)(int)a1;
*(float *)&R3D[5900] = 1.0 / (float)a2;
}
}
else
{
TraceLog(5, (long long)"R3D: Invalid resolution given to 'R3D_UpdateResolution'");
}
}
|
R3D_UpdateResolution:
TEST EDI,EDI
SETG AL
TEST ESI,ESI
SETG CL
TEST AL,CL
JNZ 0x001c45c6
LEA RSI,[0x21263f]
MOV EDI,0x5
XOR EAX,EAX
JMP 0x001a9c09
LAB_001c45c6:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14D,EDI
LEA R15,[0x2afc60]
CMP dword ptr [R15 + 0x1700],EDI
JNZ 0x001c45ee
CMP dword ptr [R15 + 0x1704],EBX
JZ 0x001c463c
LAB_001c45ee:
CALL 0x001c0447
MOV EDI,R14D
MOV ESI,EBX
CALL 0x001bf62a
CVTSI2SS XMM0,R14D
MOV dword ptr [R15 + 0x1700],R14D
MOVSS XMM1,dword ptr [0x001e2004]
MOVAPS XMM2,XMM1
DIVSS XMM2,XMM0
XORPS XMM0,XMM0
CVTSI2SS XMM0,EBX
MOV dword ptr [R15 + 0x1704],EBX
MOVSS dword ptr [R15 + 0x1708],XMM2
DIVSS XMM1,XMM0
MOVSS dword ptr [R15 + 0x170c],XMM1
LAB_001c463c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void R3D_UpdateResolution(int param_1,int param_2)
{
if (param_1 < 1 || param_2 < 1) {
TraceLog(5,"R3D: Invalid resolution given to \'R3D_UpdateResolution\'");
return;
}
if ((DAT_002b1360 != param_1) || (DAT_002b1364 != param_2)) {
r3d_framebuffers_unload();
r3d_framebuffers_load(param_1,param_2);
DAT_002b1368 = DAT_001e2004 / (float)param_1;
DAT_002b136c = DAT_001e2004 / (float)param_2;
DAT_002b1360 = param_1;
DAT_002b1364 = param_2;
}
return;
}
|
|
61,582 |
TextSplit
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
|
const char **TextSplit(const char *text, char delimiter, int *count)
{
// NOTE: Current implementation returns a copy of the provided string with '\0' (string end delimiter)
// inserted between strings defined by "delimiter" parameter. No memory is dynamically allocated,
// all used memory is static... it has some limitations:
// 1. Maximum number of possible split strings is set by MAX_TEXTSPLIT_COUNT
// 2. Maximum size of text to split is MAX_TEXT_BUFFER_LENGTH
static const char *result[MAX_TEXTSPLIT_COUNT] = { NULL };
static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 };
memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);
result[0] = buffer;
int counter = 0;
if (text != NULL)
{
counter = 1;
// Count how many substrings we have on text and point to every one
for (int i = 0; i < MAX_TEXT_BUFFER_LENGTH; i++)
{
buffer[i] = text[i];
if (buffer[i] == '\0') break;
else if (buffer[i] == delimiter)
{
buffer[i] = '\0'; // Set an end of string at this point
result[counter] = buffer + i + 1;
counter++;
if (counter == MAX_TEXTSPLIT_COUNT) break;
}
}
}
*count = counter;
return result;
}
|
O0
|
c
|
TextSplit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x13b2f3(%rip), %rdi # 0x222600
xorl %esi, %esi
movl $0x400, %edx # imm = 0x400
callq 0xa2d0
leaq 0x13b2e0(%rip), %rax # 0x222600
movq %rax, 0x13aed9(%rip) # 0x222200
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe73f4
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x400, -0x20(%rbp) # imm = 0x400
jge 0xe73f2
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb (%rax,%rcx), %dl
movslq -0x20(%rbp), %rcx
leaq 0x13b296(%rip), %rax # 0x222600
movb %dl, (%rax,%rcx)
movslq -0x20(%rbp), %rcx
leaq 0x13b288(%rip), %rax # 0x222600
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xe7383
jmp 0xe73f2
movslq -0x20(%rbp), %rcx
leaq 0x13b272(%rip), %rax # 0x222600
movsbl (%rax,%rcx), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0xe73e0
movslq -0x20(%rbp), %rcx
leaq 0x13b25b(%rip), %rax # 0x222600
movb $0x0, (%rax,%rcx)
movslq -0x20(%rbp), %rax
leaq 0x13b24c(%rip), %rdx # 0x222600
addq %rax, %rdx
addq $0x1, %rdx
movslq -0x1c(%rbp), %rcx
leaq 0x13ae3a(%rip), %rax # 0x222200
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x80, -0x1c(%rbp)
jne 0xe73de
jmp 0xe73f2
jmp 0xe73e0
jmp 0xe73e2
jmp 0xe73e4
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xe7347
jmp 0xe73f4
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
leaq 0x13adfc(%rip), %rax # 0x222200
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
TextSplit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_18], rdx
lea rdi, TextSplit_buffer
xor esi, esi
mov edx, 400h
call _memset
lea rax, TextSplit_buffer
mov cs:TextSplit_result, rax
mov [rbp+var_1C], 0
cmp [rbp+var_8], 0
jz loc_E73F4
mov [rbp+var_1C], 1
mov [rbp+var_20], 0
loc_E7347:
cmp [rbp+var_20], 400h
jge loc_E73F2
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_20]
mov dl, [rax+rcx]
movsxd rcx, [rbp+var_20]
lea rax, TextSplit_buffer
mov [rax+rcx], dl
movsxd rcx, [rbp+var_20]
lea rax, TextSplit_buffer
movsx eax, byte ptr [rax+rcx]
cmp eax, 0
jnz short loc_E7383
jmp short loc_E73F2
loc_E7383:
movsxd rcx, [rbp+var_20]
lea rax, TextSplit_buffer
movsx eax, byte ptr [rax+rcx]
movsx ecx, [rbp+var_9]
cmp eax, ecx
jnz short loc_E73E0
movsxd rcx, [rbp+var_20]
lea rax, TextSplit_buffer
mov byte ptr [rax+rcx], 0
movsxd rax, [rbp+var_20]
lea rdx, TextSplit_buffer
add rdx, rax
add rdx, 1
movsxd rcx, [rbp+var_1C]
lea rax, TextSplit_result
mov [rax+rcx*8], rdx
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 80h
jnz short loc_E73DE
jmp short loc_E73F2
loc_E73DE:
jmp short $+2
loc_E73E0:
jmp short $+2
loc_E73E2:
jmp short $+2
loc_E73E4:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp loc_E7347
loc_E73F2:
jmp short $+2
loc_E73F4:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov [rax], ecx
lea rax, TextSplit_result
add rsp, 20h
pop rbp
retn
|
long long * TextSplit(long long a1, char a2, int *a3)
{
int i; // [rsp+0h] [rbp-20h]
int v5; // [rsp+4h] [rbp-1Ch]
memset(TextSplit_buffer, 0LL, sizeof(TextSplit_buffer));
TextSplit_result[0] = (long long)TextSplit_buffer;
v5 = 0;
if ( a1 )
{
v5 = 1;
for ( i = 0; i < 1024; ++i )
{
TextSplit_buffer[i] = *(_BYTE *)(a1 + i);
if ( !TextSplit_buffer[i] )
break;
if ( TextSplit_buffer[i] == a2 )
{
TextSplit_buffer[i] = 0;
TextSplit_result[v5++] = (long long)&TextSplit_buffer[i + 1];
if ( v5 == 128 )
break;
}
}
}
*a3 = v5;
return TextSplit_result;
}
|
TextSplit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[0x322600]
XOR ESI,ESI
MOV EDX,0x400
CALL 0x0010a2d0
LEA RAX,[0x322600]
MOV qword ptr [0x00322200],RAX
MOV dword ptr [RBP + -0x1c],0x0
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001e73f4
MOV dword ptr [RBP + -0x1c],0x1
MOV dword ptr [RBP + -0x20],0x0
LAB_001e7347:
CMP dword ptr [RBP + -0x20],0x400
JGE 0x001e73f2
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + RCX*0x1]
MOVSXD RCX,dword ptr [RBP + -0x20]
LEA RAX,[0x322600]
MOV byte ptr [RAX + RCX*0x1],DL
MOVSXD RCX,dword ptr [RBP + -0x20]
LEA RAX,[0x322600]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JNZ 0x001e7383
JMP 0x001e73f2
LAB_001e7383:
MOVSXD RCX,dword ptr [RBP + -0x20]
LEA RAX,[0x322600]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOVSX ECX,byte ptr [RBP + -0x9]
CMP EAX,ECX
JNZ 0x001e73e0
MOVSXD RCX,dword ptr [RBP + -0x20]
LEA RAX,[0x322600]
MOV byte ptr [RAX + RCX*0x1],0x0
MOVSXD RAX,dword ptr [RBP + -0x20]
LEA RDX,[0x322600]
ADD RDX,RAX
ADD RDX,0x1
MOVSXD RCX,dword ptr [RBP + -0x1c]
LEA RAX,[0x322200]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x80
JNZ 0x001e73de
JMP 0x001e73f2
LAB_001e73de:
JMP 0x001e73e0
LAB_001e73e0:
JMP 0x001e73e2
LAB_001e73e2:
JMP 0x001e73e4
LAB_001e73e4:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001e7347
LAB_001e73f2:
JMP 0x001e73f4
LAB_001e73f4:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LEA RAX,[0x322200]
ADD RSP,0x20
POP RBP
RET
|
int1 * TextSplit(long param_1,char param_2,int *param_3)
{
int local_28;
int local_24;
memset(TextSplit_buffer,0,0x400);
TextSplit_result._0_8_ = TextSplit_buffer;
local_24 = 0;
if (param_1 != 0) {
local_24 = 1;
for (local_28 = 0;
(local_28 < 0x400 &&
(TextSplit_buffer[local_28] = *(int1 *)(param_1 + local_28),
TextSplit_buffer[local_28] != '\0')); local_28 = local_28 + 1) {
if (TextSplit_buffer[local_28] == param_2) {
TextSplit_buffer[local_28] = 0;
*(long *)(TextSplit_result + (long)local_24 * 8) = (long)local_28 + 0x322601;
local_24 = local_24 + 1;
if (local_24 == 0x80) break;
}
}
}
*param_3 = local_24;
return TextSplit_result;
}
|
|
61,583 |
TextSplit
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
|
const char **TextSplit(const char *text, char delimiter, int *count)
{
// NOTE: Current implementation returns a copy of the provided string with '\0' (string end delimiter)
// inserted between strings defined by "delimiter" parameter. No memory is dynamically allocated,
// all used memory is static... it has some limitations:
// 1. Maximum number of possible split strings is set by MAX_TEXTSPLIT_COUNT
// 2. Maximum size of text to split is MAX_TEXT_BUFFER_LENGTH
static const char *result[MAX_TEXTSPLIT_COUNT] = { NULL };
static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 };
memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);
result[0] = buffer;
int counter = 0;
if (text != NULL)
{
counter = 1;
// Count how many substrings we have on text and point to every one
for (int i = 0; i < MAX_TEXT_BUFFER_LENGTH; i++)
{
buffer[i] = text[i];
if (buffer[i] == '\0') break;
else if (buffer[i] == delimiter)
{
buffer[i] = '\0'; // Set an end of string at this point
result[counter] = buffer + i + 1;
counter++;
if (counter == MAX_TEXTSPLIT_COUNT) break;
}
}
}
*count = counter;
return result;
}
|
O3
|
c
|
TextSplit:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xbd784(%rip), %r15 # 0x143540
xorl %r12d, %r12d
movl $0x400, %edx # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0xa2d0
movq %r15, 0xbd36b(%rip) # 0x143140
testq %r14, %r14
je 0x85e2b
movl $0x1, %r12d
xorl %eax, %eax
leaq 0xbd357(%rip), %rcx # 0x143140
movb (%r14,%rax), %dl
movb %dl, (%rax,%r15)
testb %dl, %dl
je 0x85e2b
cmpb %bpl, %dl
jne 0x85e18
leaq (%rax,%r15), %rdx
incq %rdx
movb $0x0, -0x1(%rdx)
movslq %r12d, %r12
movq %rdx, (%rcx,%r12,8)
incl %r12d
cmpl $0x80, %r12d
je 0x85e25
incq %rax
cmpq $0x400, %rax # imm = 0x400
jne 0x85de9
jmp 0x85e2b
movl $0x80, %r12d
movl %r12d, (%rbx)
leaq 0xbd30b(%rip), %rax # 0x143140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
TextSplit:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov ebp, esi
mov r14, rdi
lea r15, TextSplit_buffer
xor r12d, r12d
mov edx, 400h
mov rdi, r15
xor esi, esi
call _memset
mov cs:TextSplit_result, r15
test r14, r14
jz short loc_85E2B
mov r12d, 1
xor eax, eax
lea rcx, TextSplit_result
loc_85DE9:
mov dl, [r14+rax]
mov [rax+r15], dl
test dl, dl
jz short loc_85E2B
cmp dl, bpl
jnz short loc_85E18
lea rdx, [rax+r15]
inc rdx
mov byte ptr [rdx-1], 0
movsxd r12, r12d
mov [rcx+r12*8], rdx
inc r12d
cmp r12d, 80h
jz short loc_85E25
loc_85E18:
inc rax
cmp rax, 400h
jnz short loc_85DE9
jmp short loc_85E2B
loc_85E25:
mov r12d, 80h
loc_85E2B:
mov [rbx], r12d
lea rax, TextSplit_result
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long * TextSplit(long long a1, char a2, int *a3)
{
int v4; // r12d
long long i; // rax
char v6; // dl
char *v7; // rdx
v4 = 0;
memset(TextSplit_buffer, 0LL, sizeof(TextSplit_buffer));
TextSplit_result[0] = (long long)TextSplit_buffer;
if ( a1 )
{
v4 = 1;
for ( i = 0LL; i != 1024; ++i )
{
v6 = *(_BYTE *)(a1 + i);
TextSplit_buffer[i] = v6;
if ( !v6 )
break;
if ( v6 == a2 )
{
v7 = &TextSplit_buffer[i + 1];
*(v7 - 1) = 0;
TextSplit_result[v4++] = (long long)v7;
if ( v4 == 128 )
{
v4 = 128;
break;
}
}
}
}
*a3 = v4;
return TextSplit_result;
}
|
TextSplit:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV EBP,ESI
MOV R14,RDI
LEA R15,[0x243540]
XOR R12D,R12D
MOV EDX,0x400
MOV RDI,R15
XOR ESI,ESI
CALL 0x0010a2d0
MOV qword ptr [0x00243140],R15
TEST R14,R14
JZ 0x00185e2b
MOV R12D,0x1
XOR EAX,EAX
LEA RCX,[0x243140]
LAB_00185de9:
MOV DL,byte ptr [R14 + RAX*0x1]
MOV byte ptr [RAX + R15*0x1],DL
TEST DL,DL
JZ 0x00185e2b
CMP DL,BPL
JNZ 0x00185e18
LEA RDX,[RAX + R15*0x1]
INC RDX
MOV byte ptr [RDX + -0x1],0x0
MOVSXD R12,R12D
MOV qword ptr [RCX + R12*0x8],RDX
INC R12D
CMP R12D,0x80
JZ 0x00185e25
LAB_00185e18:
INC RAX
CMP RAX,0x400
JNZ 0x00185de9
JMP 0x00185e2b
LAB_00185e25:
MOV R12D,0x80
LAB_00185e2b:
MOV dword ptr [RBX],R12D
LEA RAX,[0x243140]
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int1 * TextSplit(long param_1,char param_2,int *param_3)
{
char cVar1;
long lVar2;
int iVar3;
iVar3 = 0;
memset(&TextSplit_buffer,0,0x400);
TextSplit_result._0_8_ = &TextSplit_buffer;
if (param_1 != 0) {
iVar3 = 1;
lVar2 = 0;
do {
cVar1 = *(char *)(param_1 + lVar2);
(&TextSplit_buffer)[lVar2] = cVar1;
if (cVar1 == '\0') break;
if (cVar1 == param_2) {
(&TextSplit_buffer)[lVar2] = 0;
*(int1 **)(TextSplit_result + (long)iVar3 * 8) = &DAT_00243541 + lVar2;
iVar3 = iVar3 + 1;
if (iVar3 == 0x80) {
iVar3 = 0x80;
break;
}
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x400);
}
*param_3 = iVar3;
return TextSplit_result;
}
|
|
61,584 |
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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_sax_dom_callback_parser()
|
hkr04[P]cpp-mcp/common/json.hpp
|
~json_sax_dom_callback_parser() = default;
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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_sax_dom_callback_parser():
pushq %rbx
movq %rdi, %rbx
addq $0xa8, %rdi
callq 0xfb3c
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x4a779
leaq 0x80(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x48(%rbx), %rdi
callq 0x4b814
leaq 0x20(%rbx), %rdi
callq 0x4b814
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4a7a1
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
popq %rbx
jmp 0xa630
popq %rbx
retq
jmp 0x4a7a7
jmp 0x4a7a7
movq %rax, %rdi
callq 0xe901
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev:
push rbx
mov rbx, rdi
add rdi, 0A8h
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rbx+90h]
test rax, rax
jz short loc_4A779
lea rdi, [rbx+80h]
mov rsi, rdi
mov edx, 3
call rax
loc_4A779:
lea rdi, [rbx+48h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
lea rdi, [rbx+20h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
mov rdi, [rbx+8]; void *
test rdi, rdi
jz short loc_4A7A1
mov rsi, [rbx+18h]
sub rsi, rdi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_4A7A1:
pop rbx
retn
jmp short loc_4A7A7
jmp short $+2
loc_4A7A7:
mov rdi, rax
call __clang_call_terminate
|
void nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~json_sax_dom_callback_parser(
_QWORD *a1)
{
void ( *v2)(_QWORD *, _QWORD *, long long); // rax
void *v3; // rdi
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a1 + 21);
v2 = (void ( *)(_QWORD *, _QWORD *, long long))a1[18];
if ( v2 )
v2(a1 + 16, a1 + 16, 3LL);
std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 9);
std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 4);
v3 = (void *)a1[1];
if ( v3 )
operator delete(v3, a1[3] - (_QWORD)v3);
}
|
~json_sax_dom_callback_parser:
PUSH RBX
MOV RBX,RDI
ADD RDI,0xa8
CALL 0x0010fb3c
MOV RAX,qword ptr [RBX + 0x90]
TEST RAX,RAX
JZ 0x0014a779
LEA RDI,[RBX + 0x80]
LAB_0014a76f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0014a779:
LEA RDI,[RBX + 0x48]
LAB_0014a77d:
CALL 0x0014b814
LEA RDI,[RBX + 0x20]
LAB_0014a786:
CALL 0x0014b814
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0014a7a1
MOV RSI,qword ptr [RBX + 0x18]
SUB RSI,RDI
POP RBX
JMP 0x0010a630
LAB_0014a7a1:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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_sax_dom_callback_parser() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<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_sax_dom_callback_parser
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
void *pvVar1;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)(this + 0xa8));
if (*(code **)(this + 0x90) != (code *)0x0) {
/* try { // try from 0014a76f to 0014a778 has its CatchHandler @ 0014a7a3 */
(**(code **)(this + 0x90))(this + 0x80,this + 0x80,3);
}
/* try { // try from 0014a77d to 0014a781 has its CatchHandler @ 0014a7a7 */
std::_Bvector_base<std::allocator<bool>>::_M_deallocate
((_Bvector_base<std::allocator<bool>> *)(this + 0x48));
/* try { // try from 0014a786 to 0014a78a has its CatchHandler @ 0014a7a5 */
std::_Bvector_base<std::allocator<bool>>::_M_deallocate
((_Bvector_base<std::allocator<bool>> *)(this + 0x20));
pvVar1 = *(void **)(this + 8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x18) - (long)pvVar1);
return;
}
return;
}
|
|
61,585 |
ma_write_init_default
|
eloqsql/storage/maria/ma_write.c
|
MARIA_RECORD_POS _ma_write_init_default(MARIA_HA *info,
const uchar *record
__attribute__((unused)))
{
return ((info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end) ?
info->s->state.dellink :
info->state->data_file_length);
}
|
O0
|
c
|
ma_write_init_default:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0xc8(%rax)
je 0x6498e
movq -0x8(%rbp), %rax
cmpb $0x0, 0x681(%rax)
jne 0x6498e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x6499e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_write_init_default:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
cmp qword ptr [rax+0C8h], 0FFFFFFFFFFFFFFFFh
jz short loc_6498E
mov rax, [rbp+var_8]
cmp byte ptr [rax+681h], 0
jnz short loc_6498E
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+0C8h]
mov [rbp+var_18], rax
jmp short loc_6499E
loc_6498E:
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rax, [rax+28h]
mov [rbp+var_18], rax
loc_6499E:
mov rax, [rbp+var_18]
pop rbp
retn
|
long long ma_write_init_default(long long a1)
{
if ( *(_QWORD *)(*(_QWORD *)a1 + 200LL) == -1LL || *(_BYTE *)(a1 + 1665) )
return *(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL);
else
return *(_QWORD *)(*(_QWORD *)a1 + 200LL);
}
|
_ma_write_init_default:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0xc8],-0x1
JZ 0x0016498e
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x681],0x0
JNZ 0x0016498e
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xc8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016499e
LAB_0016498e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
LAB_0016499e:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
int8 _ma_write_init_default(long *param_1)
{
int8 local_20;
if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
local_20 = *(int8 *)(param_1[4] + 0x28);
}
else {
local_20 = *(int8 *)(*param_1 + 200);
}
return local_20;
}
|
|
61,586 |
free_size_to_tail_pattern
|
eloqsql/storage/maria/ma_bitmap.c
|
static uint free_size_to_tail_pattern(MARIA_FILE_BITMAP *bitmap, uint size)
{
if (size >= bitmap->sizes[0])
return 0; /* Revert to empty page */
if (size < bitmap->sizes[6])
return 7;
if (size < bitmap->sizes[5])
return 6;
return 5;
}
|
O0
|
c
|
free_size_to_tail_pattern:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x108(%rcx), %eax
jb 0x60b63
movl $0x0, -0x4(%rbp)
jmp 0x60b9a
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x120(%rcx), %eax
jae 0x60b7b
movl $0x7, -0x4(%rbp)
jmp 0x60b9a
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x11c(%rcx), %eax
jae 0x60b93
movl $0x6, -0x4(%rbp)
jmp 0x60b9a
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
|
free_size_to_tail_pattern:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+108h]
jb short loc_60B63
mov [rbp+var_4], 0
jmp short loc_60B9A
loc_60B63:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+120h]
jnb short loc_60B7B
mov [rbp+var_4], 7
jmp short loc_60B9A
loc_60B7B:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+11Ch]
jnb short loc_60B93
mov [rbp+var_4], 6
jmp short loc_60B9A
loc_60B93:
mov [rbp+var_4], 5
loc_60B9A:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long free_size_to_tail_pattern(_DWORD *a1, unsigned int a2)
{
if ( a2 < a1[66] )
{
if ( a2 >= a1[72] )
{
if ( a2 >= a1[71] )
return 5;
else
return 6;
}
else
{
return 7;
}
}
else
{
return 0;
}
}
|
free_size_to_tail_pattern:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x108]
JC 0x00160b63
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00160b9a
LAB_00160b63:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x120]
JNC 0x00160b7b
MOV dword ptr [RBP + -0x4],0x7
JMP 0x00160b9a
LAB_00160b7b:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x11c]
JNC 0x00160b93
MOV dword ptr [RBP + -0x4],0x6
JMP 0x00160b9a
LAB_00160b93:
MOV dword ptr [RBP + -0x4],0x5
LAB_00160b9a:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 free_size_to_tail_pattern(long param_1,uint param_2)
{
int4 local_c;
if (param_2 < *(uint *)(param_1 + 0x108)) {
if (param_2 < *(uint *)(param_1 + 0x120)) {
local_c = 7;
}
else if (param_2 < *(uint *)(param_1 + 0x11c)) {
local_c = 6;
}
else {
local_c = 5;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
61,587 |
minja::Parser::parseValueExpression()::'lambda'()::operator()() const
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseValueExpression() {
auto parseValue = [&]() -> std::shared_ptr<Expression> {
auto location = get_location();
auto constant = parseConstant();
if (constant) return std::make_shared<LiteralExpr>(location, *constant);
static std::regex null_regex(R"(null\b)");
if (!consumeToken(null_regex).empty()) return std::make_shared<LiteralExpr>(location, Value());
auto identifier = parseIdentifier();
if (identifier) return identifier;
auto braced = parseBracedExpressionOrArray();
if (braced) return braced;
auto array = parseArray();
if (array) return array;
auto dictionary = parseDictionary();
if (dictionary) return dictionary;
throw std::runtime_error("Expected value expression");
};
auto value = parseValue();
while (it != end && consumeSpaces() && peekSymbols({ "[", "." })) {
if (!consumeToken("[").empty()) {
std::shared_ptr<Expression> index;
if (!consumeToken(":").empty()) {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_end->location, nullptr, std::move(slice_end));
} else {
auto slice_start = parseExpression();
if (!consumeToken(":").empty()) {
consumeSpaces();
if (peekSymbols({ "]" })) {
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), nullptr);
} else {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), std::move(slice_end));
}
} else {
index = std::move(slice_start);
}
}
if (!index) throw std::runtime_error("Empty index in subscript");
if (consumeToken("]").empty()) throw std::runtime_error("Expected closing bracket in subscript");
value = std::make_shared<SubscriptExpr>(value->location, std::move(value), std::move(index));
} else if (!consumeToken(".").empty()) {
auto identifier = parseIdentifier();
if (!identifier) throw std::runtime_error("Expected identifier in subscript");
consumeSpaces();
if (peekSymbols({ "(" })) {
auto callParams = parseCallArgs();
value = std::make_shared<MethodCallExpr>(identifier->location, std::move(value), std::move(identifier), std::move(callParams));
} else {
auto key = std::make_shared<LiteralExpr>(identifier->location, Value(identifier->get_name()));
value = std::make_shared<SubscriptExpr>(identifier->location, std::move(value), std::move(key));
}
}
consumeSpaces();
}
if (peekSymbols({ "(" })) {
auto location = get_location();
auto callParams = parseCallArgs();
value = std::make_shared<CallExpr>(location, std::move(value), std::move(callParams));
}
return value;
}
|
O2
|
cpp
|
minja::Parser::parseValueExpression()::'lambda'()::operator()() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x60190
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x65d94
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x654cb
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x6602c
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4f7fe
jmp 0x65547
leaq 0x99cb6(%rip), %rax # 0xff188
movb (%rax), %al
testb %al, %al
je 0x6562c
leaq 0x99c85(%rip), %rdx # 0xff168
leaq 0x50(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x605b4
leaq 0x50(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x24208
testq %r15, %r15
je 0x6556b
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x6604e
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rdx
callq 0x65cce
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4f7fe
leaq 0x50(%rsp), %rdi
callq 0x62d12
leaq 0x30(%rsp), %rdi
callq 0x4f7fe
leaq 0x40(%rsp), %rdi
callq 0x4f7fe
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x60d28
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x6559f
movq %rax, (%rbx)
movq 0x58(%rsp), %rax
andq $0x0, 0x58(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, 0x50(%rsp)
jmp 0x65622
movq %rsp, %rdi
movq %r14, %rsi
callq 0x6606e
movq (%rsp), %rax
testq %rax, %rax
je 0x655cc
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
jmp 0x65618
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x6643e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x655fd
movq %rax, (%rbx)
movq 0x20(%rsp), %rax
andq $0x0, 0x20(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, 0x18(%rsp)
jmp 0x6560e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6680c
cmpq $0x0, (%rbx)
je 0x65681
leaq 0x20(%rsp), %rdi
callq 0x4f7fe
leaq 0x8(%rsp), %rdi
callq 0x4f7fe
leaq 0x58(%rsp), %rdi
jmp 0x654c4
leaq 0x99b55(%rip), %rdi # 0xff188
callq 0x24040
testl %eax, %eax
je 0x654dc
leaq 0x99b21(%rip), %rdi # 0xff168
leaq 0x4ea08(%rip), %rsi # 0xb4056
pushq $0x10
popq %rdx
callq 0x46350
leaq -0x1f0e7(%rip), %rdi # 0x46576
leaq 0x99b04(%rip), %rsi # 0xff168
leaq 0x9929d(%rip), %rdx # 0xfe908
callq 0x237e0
leaq 0x99b11(%rip), %rdi # 0xff188
callq 0x23600
jmp 0x654dc
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r15
leaq 0x4e9ca(%rip), %rsi # 0xb405d
movq %rax, %rdi
callq 0x23340
movq 0x9894e(%rip), %rsi # 0xfdff0
movq 0x988af(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x99acd(%rip), %rdi # 0xff188
callq 0x235f0
jmp 0x65723
movq %rax, %r14
jmp 0x656d2
movq %rax, %r14
movq %r15, %rdi
callq 0x236b0
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4f7fe
jmp 0x656e3
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4f7fe
jmp 0x656f2
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4f7fe
jmp 0x65701
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x4f7fe
jmp 0x65723
jmp 0x65720
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x62d12
jmp 0x65723
jmp 0x65720
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x4f7fe
jmp 0x65732
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x4f7fe
movq %r14, %rdi
callq 0x23fd0
|
_ZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEv:
push r15
push r14
push rbx
sub rsp, 0A0h
mov rbx, rdi
mov r14, [rsi]
lea rdi, [rsp+0B8h+var_80]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+0B8h+var_90]; this
mov rsi, r14
call _ZN5minja6Parser13parseConstantEv; minja::Parser::parseConstant(void)
mov rdx, [rsp+0B8h+var_90]
test rdx, rdx
jz short loc_654CB
lea rdi, [rsp+0B8h+var_68]
lea rsi, [rsp+0B8h+var_80]
call _ZSt11make_sharedIN5minja11LiteralExprEJRNS0_8LocationERNS0_5ValueEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value &>(minja::Location &,minja::Value &)
lea rdi, [rsp+0B8h+var_60]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
loc_654C4:
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65547
loc_654CB:
lea rax, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; `guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
mov al, [rax]
test al, al
jz loc_6562C
loc_654DC:
lea rdx, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rdi, [rsp+0B8h+var_68]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+0B8h+var_68]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_6556B
lea r14, [rsp+0B8h+var_68]
mov rdi, r14; this
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
mov rdi, rsp
lea rsi, [rsp+0B8h+var_80]
mov rdx, r14
call _ZSt11make_sharedIN5minja11LiteralExprEJRNS0_8LocationENS0_5ValueEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value>(minja::Location &,minja::Value &&)
lea rdi, [rsp+0B8h+var_B0]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_65547:
lea rdi, [rsp+0B8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0B8h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
loc_6556B:
lea rdi, [rsp+0B8h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseIdentifierEv; minja::Parser::parseIdentifier(void)
mov rax, [rsp+0B8h+var_68]
test rax, rax
jz short loc_6559F
mov [rbx], rax
mov rax, [rsp+0B8h+var_60]
and [rsp+0B8h+var_60], 0
mov [rbx+8], rax
and [rsp+0B8h+var_68], 0
jmp loc_65622
loc_6559F:
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser28parseBracedExpressionOrArrayEv; minja::Parser::parseBracedExpressionOrArray(void)
mov rax, [rsp+0B8h+var_B8]
test rax, rax
jz short loc_655CC
mov [rbx], rax
mov rax, [rsp+0B8h+var_B0]
and [rsp+0B8h+var_B0], 0
mov [rbx+8], rax
and [rsp+0B8h+var_B8], 0
jmp short loc_65618
loc_655CC:
lea rdi, [rsp+0B8h+var_A0]; this
mov rsi, r14
call _ZN5minja6Parser10parseArrayEv; minja::Parser::parseArray(void)
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_655FD
mov [rbx], rax
mov rax, [rsp+0B8h+var_98]
and [rsp+0B8h+var_98], 0
mov [rbx+8], rax
and [rsp+0B8h+var_A0], 0
jmp short loc_6560E
loc_655FD:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser15parseDictionaryEv; minja::Parser::parseDictionary(void)
cmp qword ptr [rbx], 0
jz short loc_65681
loc_6560E:
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_65618:
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_65622:
lea rdi, [rsp+0B8h+var_60]
jmp loc_654C4
loc_6562C:
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_654DC
lea rdi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rsi, aNullB; "null\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_654DC
loc_65681:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedValueE; "Expected value expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_65723
mov r14, rax
jmp short loc_656D2
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_656D2:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_656E3
mov r14, rax
loc_656E3:
lea rdi, [rsp+0B8h+var_98]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_656F2
mov r14, rax
loc_656F2:
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65701
mov r14, rax
loc_65701:
lea rdi, [rsp+0B8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65723
jmp short loc_65720
mov r14, rax
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_65723
jmp short $+2
loc_65720:
mov r14, rax
loc_65723:
lea rdi, [rsp+0B8h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65732
mov r14, rax
loc_65732:
lea rdi, [rsp+0B8h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator()(
minja::Parser *this,
_QWORD **a2)
{
_QWORD *v2; // r14
__int128 v3; // xmm0
long long v4; // r15
__int128 v5; // xmm0
long long v7; // rax
long long v8; // rax
long long v9; // rax
std::runtime_error *exception; // r15
__int128 v11; // [rsp+0h] [rbp-B8h] BYREF
long long v12; // [rsp+18h] [rbp-A0h] BYREF
long long v13; // [rsp+20h] [rbp-98h] BYREF
long long v14; // [rsp+28h] [rbp-90h] BYREF
long long v15; // [rsp+30h] [rbp-88h] BYREF
_BYTE v16[8]; // [rsp+38h] [rbp-80h] BYREF
long long v17; // [rsp+40h] [rbp-78h] BYREF
_OWORD v18[6]; // [rsp+50h] [rbp-68h] BYREF
v2 = *a2;
minja::Parser::get_location((minja::Parser *)v16, *a2);
minja::Parser::parseConstant((minja::Parser *)&v14);
if ( v14 )
{
std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value &>(v18, v16);
v3 = v18[0];
*((_QWORD *)&v18[0] + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v18[0] = 0LL;
}
else
{
if ( !(_BYTE)`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
(long long)"null\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]);
}
minja::Parser::consumeToken(
v18,
(long long)v2,
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
1u);
v4 = *((_QWORD *)&v18[0] + 1);
std::string::~string(v18);
if ( v4 )
{
minja::Value::Value((minja::Value *)v18);
std::make_shared<minja::LiteralExpr,minja::Location &,minja::Value>(&v11, v16, v18);
v5 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v5;
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1);
minja::Value::~Value((minja::Value *)v18);
goto LABEL_7;
}
minja::Parser::parseIdentifier((minja::Parser *)v18, v2);
if ( *(_QWORD *)&v18[0] )
{
*(_QWORD *)this = *(_QWORD *)&v18[0];
v7 = *((_QWORD *)&v18[0] + 1);
*((_QWORD *)&v18[0] + 1) = 0LL;
*((_QWORD *)this + 1) = v7;
*(_QWORD *)&v18[0] = 0LL;
}
else
{
minja::Parser::parseBracedExpressionOrArray((minja::Parser *)&v11);
if ( (_QWORD)v11 )
{
*(_QWORD *)this = v11;
v8 = *((_QWORD *)&v11 + 1);
*((_QWORD *)&v11 + 1) = 0LL;
*((_QWORD *)this + 1) = v8;
*(_QWORD *)&v11 = 0LL;
}
else
{
minja::Parser::parseArray((minja::Parser *)&v12);
if ( v12 )
{
*(_QWORD *)this = v12;
v9 = v13;
v13 = 0LL;
*((_QWORD *)this + 1) = v9;
v12 = 0LL;
}
else
{
minja::Parser::parseDictionary(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected value expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v11 + 1);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v18 + 1);
LABEL_7:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17);
return this;
}
|
operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
MOV R14,qword ptr [RSI]
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00160190
LAB_00165489:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x00165d94
MOV RDX,qword ptr [RSP + 0x28]
TEST RDX,RDX
JZ 0x001654cb
LAB_001654a0:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
CALL 0x0016602c
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
LAB_001654c4:
CALL 0x0014f7fe
JMP 0x00165547
LAB_001654cb:
LEA RAX,[0x1ff188]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0016562c
LAB_001654dc:
LEA RDX,[0x1ff168]
LEA RDI,[RSP + 0x50]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001605b4
LEA RDI,[RSP + 0x50]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00124208
TEST R15,R15
JZ 0x0016556b
LEA R14,[RSP + 0x50]
MOV RDI,R14
CALL 0x0016604e
LAB_00165513:
MOV RDI,RSP
LEA RSI,[RSP + 0x38]
MOV RDX,R14
CALL 0x00165cce
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014f7fe
LEA RDI,[RSP + 0x50]
CALL 0x00162d12
LAB_00165547:
LEA RDI,[RSP + 0x30]
CALL 0x0014f7fe
LEA RDI,[RSP + 0x40]
CALL 0x0014f7fe
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
LAB_0016556b:
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x00160d28
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x0016559f
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x58]
AND qword ptr [RSP + 0x58],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP + 0x50],0x0
JMP 0x00165622
LAB_0016559f:
MOV RDI,RSP
MOV RSI,R14
CALL 0x0016606e
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x001655cc
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
JMP 0x00165618
LAB_001655cc:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x0016643e
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x001655fd
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x20]
AND qword ptr [RSP + 0x20],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP + 0x18],0x0
JMP 0x0016560e
LAB_001655fd:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016680c
CMP qword ptr [RBX],0x0
JZ 0x00165681
LAB_0016560e:
LEA RDI,[RSP + 0x20]
CALL 0x0014f7fe
LAB_00165618:
LEA RDI,[RSP + 0x8]
CALL 0x0014f7fe
LAB_00165622:
LEA RDI,[RSP + 0x58]
JMP 0x001654c4
LAB_0016562c:
LEA RDI,[0x1ff188]
CALL 0x00124040
TEST EAX,EAX
JZ 0x001654dc
LAB_00165640:
LEA RDI,[0x1ff168]
LEA RSI,[0x1b4056]
PUSH 0x10
POP RDX
CALL 0x00146350
LAB_00165656:
LEA RDI,[0x146576]
LEA RSI,[0x1ff168]
LEA RDX,[0x1fe908]
CALL 0x001237e0
LEA RDI,[0x1ff188]
CALL 0x00123600
JMP 0x001654dc
LAB_00165681:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R15,RAX
LAB_0016568c:
LEA RSI,[0x1b405d]
MOV RDI,RAX
CALL 0x00123340
LAB_0016569b:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f30
|
/* minja::Parser::parseValueExpression()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */
_lambda___1_ * __thiscall
minja::Parser::parseValueExpression()::{lambda()#1}::operator()(_lambda___1_ *this)
{
int8 uVar1;
long lVar2;
int iVar3;
runtime_error *this_00;
int8 *in_RSI;
long local_b8;
int8 auStack_b0 [2];
long local_a0;
int8 local_98;
long local_90;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_88 [8];
Value local_80 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [16];
long local_68;
long alStack_60 [9];
uVar1 = *in_RSI;
get_location();
/* try { // try from 00165489 to 00165495 has its CatchHandler @ 0016572f */
parseConstant();
if (local_90 == 0) {
if ((operator()()::null_regex_abi_cxx11_ == '\0') &&
(iVar3 = __cxa_guard_acquire(&operator()()::null_regex_abi_cxx11_), iVar3 != 0)) {
/* try { // try from 00165640 to 00165655 has its CatchHandler @ 001656b1 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
operator()()::null_regex_abi_cxx11_,"null\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
operator()()::null_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&operator()()::null_regex_abi_cxx11_);
}
/* try { // try from 001654dc to 001654f2 has its CatchHandler @ 0016571e */
consumeToken(&local_68,uVar1,operator()()::null_regex_abi_cxx11_,1);
lVar2 = alStack_60[0];
std::__cxx11::string::~string((string *)&local_68);
if (lVar2 != 0) {
Value::Value((Value *)&local_68);
/* try { // try from 00165513 to 00165522 has its CatchHandler @ 0016570f */
std::make_shared<minja::LiteralExpr,minja::Location&,minja::Value>
((Location *)&local_b8,local_80);
uVar1 = auStack_b0[0];
auStack_b0[0] = 0;
*(long *)this = local_b8;
*(int8 *)(this + 8) = uVar1;
local_b8 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_b0);
Value::~Value((Value *)&local_68);
goto LAB_00165547;
}
/* try { // try from 0016556b to 00165577 has its CatchHandler @ 0016570d */
parseIdentifier();
lVar2 = alStack_60[0];
if (local_68 == 0) {
/* try { // try from 0016559f to 001655a9 has its CatchHandler @ 001656fe */
parseBracedExpressionOrArray();
uVar1 = auStack_b0[0];
if (local_b8 == 0) {
/* try { // try from 001655cc to 001655d8 has its CatchHandler @ 001656ef */
parseArray();
uVar1 = local_98;
if (local_a0 == 0) {
/* try { // try from 001655fd to 00165607 has its CatchHandler @ 001656e0 */
parseDictionary();
if (*(long *)this == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016568c to 0016569a has its CatchHandler @ 001656c7 */
std::runtime_error::runtime_error(this_00,"Expected value expression");
/* try { // try from 0016569b to 001656b0 has its CatchHandler @ 001656c2 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
}
else {
*(long *)this = local_a0;
local_98 = 0;
*(int8 *)(this + 8) = uVar1;
local_a0 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_98);
}
else {
*(long *)this = local_b8;
auStack_b0[0] = 0;
*(int8 *)(this + 8) = uVar1;
local_b8 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_b0);
}
else {
*(long *)this = local_68;
alStack_60[0] = 0;
*(long *)(this + 8) = lVar2;
local_68 = 0;
}
}
else {
/* try { // try from 001654a0 to 001654ae has its CatchHandler @ 00165720 */
std::make_shared<minja::LiteralExpr,minja::Location&,minja::Value&>
((Location *)&local_68,local_80);
lVar2 = alStack_60[0];
alStack_60[0] = 0;
*(long *)this = local_68;
*(long *)(this + 8) = lVar2;
local_68 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60);
LAB_00165547:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_88);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78);
return this;
}
|
|
61,588 |
my_xml_error_lineno
|
eloqsql/strings/xml.c
|
uint my_xml_error_lineno(MY_XML_PARSER *p)
{
uint res=0;
const char *s;
for (s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
res++;
}
return res;
}
|
O3
|
c
|
my_xml_error_lineno:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0xd87f4
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
cmpb $0xa, (%rcx)
sete %sil
addl %esi, %eax
incq %rcx
cmpq %rdx, %rcx
jne 0xd87e0
popq %rbp
retq
nopl (%rax)
|
my_xml_error_lineno:
mov rcx, [rdi+128h]
mov rdx, [rdi+130h]
xor eax, eax
cmp rcx, rdx
jnb short locret_D87F4
push rbp
mov rbp, rsp
xor eax, eax
loc_D87E0:
xor esi, esi
cmp byte ptr [rcx], 0Ah
setz sil
add eax, esi
inc rcx
cmp rcx, rdx
jnz short loc_D87E0
pop rbp
locret_D87F4:
retn
|
long long my_xml_error_lineno(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rdx
long long result; // rax
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
result = 0LL;
if ( v1 < v2 )
{
LODWORD(result) = 0;
do
result = (*v1++ == 10) + (unsigned int)result;
while ( v1 != v2 );
}
return result;
}
|
my_xml_error_lineno:
MOV RCX,qword ptr [RDI + 0x128]
MOV RDX,qword ptr [RDI + 0x130]
XOR EAX,EAX
CMP RCX,RDX
JNC 0x001d87f4
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001d87e0:
XOR ESI,ESI
CMP byte ptr [RCX],0xa
SETZ SIL
ADD EAX,ESI
INC RCX
CMP RCX,RDX
JNZ 0x001d87e0
POP RBP
LAB_001d87f4:
RET
|
int my_xml_error_lineno(long param_1)
{
int iVar1;
char *pcVar2;
pcVar2 = *(char **)(param_1 + 0x128);
iVar1 = 0;
if (pcVar2 < *(char **)(param_1 + 0x130)) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uint)(*pcVar2 == '\n');
pcVar2 = pcVar2 + 1;
} while (pcVar2 != *(char **)(param_1 + 0x130));
}
return iVar1;
}
|
|
61,589 |
my_read
|
eloqsql/mysys/my_read.c
|
size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_read(Filedes, Buffer, Count);
#else
readbytes= read(Filedes, Buffer, Count);
#endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count)
{
int got_errno= my_errno= errno;
DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d",
(int) readbytes, (ulong) Count, Filedes,
got_errno));
if (got_errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR)
{
DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld",
(long) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
}
if (readbytes == (size_t) -1 ||
((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Ok on read */
else
readbytes+= save_count;
break;
}
DBUG_RETURN(readbytes);
}
|
O3
|
c
|
my_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, -0x2c(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, %r15d
testb $0x1a, %cl
jne 0xad25f
leaq 0x37a8ac(%rip), %rax # 0x427b08
movq (%rax), %r15
orq %rcx, %r15
callq 0x39a20
movq %rax, -0x50(%rbp)
movl $0x0, (%rax)
movl -0x2c(%rbp), %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x397c0
movq %rax, %r14
movl %r15d, %eax
andl $0x6, %eax
movq %rax, -0x38(%rbp)
cmpq %r12, %r14
je 0xad333
movq %r15, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %r15
cmpq $0x0, -0x38(%rbp)
sete %r13b
movl (%r15), %r15d
callq 0xade5a
movl %r15d, (%rax)
cmpq $-0x1, %r14
sete %al
testl %r15d, %r15d
je 0xad2ca
orb %r13b, %al
jne 0xad2d5
callq 0xade5a
movl $0xaf, (%rax)
testq %r14, %r14
sete %al
cmpl $-0x1, %r14d
sete %cl
orb %al, %cl
cmpl $0x4, %r15d
sete %al
testb %al, %cl
jne 0xad30e
leaq 0x1(%r14), %rax
cmpq $0x2, %rax
jb 0xad357
movq -0x40(%rbp), %rax
andl $0x200, %eax # imm = 0x200
je 0xad357
addq %r14, %rbx
subq %r14, %r12
addq %r14, -0x48(%rbp)
movq -0x50(%rbp), %r15
movl $0x0, (%r15)
movl -0x2c(%rbp), %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x397c0
movq %rax, %r14
cmpq %r12, %rax
jne 0xad2a5
movq %r12, %r14
movq -0x48(%rbp), %rcx
addq %r14, %rcx
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
cmoveq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rax
testb $0x1a, %al
je 0xad3b7
cmpq $-0x1, %r14
je 0xad3e4
cmpq $0x0, -0x38(%rbp)
je 0xad41b
movq -0x40(%rbp), %r12
movl %r12d, %ebx
andl $0x440, %ebx # imm = 0x440
orq $0x4, %rbx
movl -0x2c(%rbp), %edi
callq 0xb0978
movl $0x9, %edi
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xa92a3
btl $0x9, %r12d
movl $0x1, %eax
movq %rax, -0x38(%rbp)
movq $-0x1, %rax
jb 0xad336
jmp 0xad348
btl $0x9, %eax
setae %cl
cmpq $0x0, -0x38(%rbp)
setne %dl
movq $-0x1, %rax
cmpq $-0x1, %r14
je 0xad348
andb %cl, %dl
je 0xad336
jmp 0xad348
movq -0x40(%rbp), %rbx
andl $0x440, %ebx # imm = 0x440
orq $0x4, %rbx
movl -0x2c(%rbp), %edi
callq 0xb0978
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xa92a3
movq $-0x1, %rax
jmp 0xad348
movq $0x0, -0x38(%rbp)
jmp 0xad336
|
my_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov rbx, rsi
mov [rbp+var_2C], edi
mov [rbp+var_48], 0
mov r15d, 0
test cl, 1Ah
jnz short loc_AD25F
lea rax, my_global_flags
mov r15, [rax]
loc_AD25F:
or r15, rcx
call ___errno_location
mov [rbp+var_50], rax
mov dword ptr [rax], 0
mov edi, [rbp+var_2C]
mov rsi, rbx
mov rdx, r12
call _read
mov r14, rax
mov eax, r15d
and eax, 6
mov [rbp+var_38], rax
cmp r14, r12
jz loc_AD333
mov [rbp+var_40], r15
mov [rbp+var_48], 0
mov r15, [rbp+var_50]
loc_AD2A5:
cmp [rbp+var_38], 0
setz r13b
mov r15d, [r15]
call _my_thread_var
mov [rax], r15d
cmp r14, 0FFFFFFFFFFFFFFFFh
setz al
test r15d, r15d
jz short loc_AD2CA
or al, r13b
jnz short loc_AD2D5
loc_AD2CA:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_AD2D5:
test r14, r14
setz al
cmp r14d, 0FFFFFFFFh
setz cl
or cl, al
cmp r15d, 4
setz al
test cl, al
jnz short loc_AD30E
lea rax, [r14+1]
cmp rax, 2
jb short loc_AD357
mov rax, [rbp+var_40]
and eax, 200h
jz short loc_AD357
add rbx, r14
sub r12, r14
add [rbp+var_48], r14
loc_AD30E:
mov r15, [rbp+var_50]
mov dword ptr [r15], 0
mov edi, [rbp+var_2C]
mov rsi, rbx
mov rdx, r12
call _read
mov r14, rax
cmp rax, r12
jnz loc_AD2A5
loc_AD333:
mov r14, r12
loc_AD336:
mov rcx, [rbp+var_48]
add rcx, r14
xor eax, eax
cmp [rbp+var_38], 0
cmovz rax, rcx
loc_AD348:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AD357:
mov rax, [rbp+var_40]
test al, 1Ah
jz short loc_AD3B7
cmp r14, 0FFFFFFFFFFFFFFFFh
jz short loc_AD3E4
cmp [rbp+var_38], 0
jz loc_AD41B
mov r12, [rbp+var_40]
mov ebx, r12d
and ebx, 440h
or rbx, 4
mov edi, [rbp+var_2C]
call my_filename
mov edi, 9
mov rsi, rbx
mov rdx, rax
mov ecx, r15d
xor eax, eax
call my_error
bt r12d, 9
mov eax, 1
mov [rbp+var_38], rax
mov rax, 0FFFFFFFFFFFFFFFFh
jb short loc_AD336
jmp short loc_AD348
loc_AD3B7:
bt eax, 9
setnb cl
cmp [rbp+var_38], 0
setnz dl
mov rax, 0FFFFFFFFFFFFFFFFh
cmp r14, 0FFFFFFFFFFFFFFFFh
jz loc_AD348
and dl, cl
jz loc_AD336
jmp loc_AD348
loc_AD3E4:
mov rbx, [rbp+var_40]
and ebx, 440h
or rbx, 4
mov edi, [rbp+var_2C]
call my_filename
mov edi, 2
mov rsi, rbx
mov rdx, rax
mov ecx, r15d
xor eax, eax
call my_error
mov rax, 0FFFFFFFFFFFFFFFFh
jmp loc_AD348
loc_AD41B:
mov [rbp+var_38], 0
jmp loc_AD336
|
long long my_read(long long a1, long long a2, long long a3, __int16 a4)
{
long long v5; // rbx
__int16 v6; // r15
__int16 v7; // r15
long long v8; // r14
unsigned int *v9; // r15
unsigned int v10; // r15d
long long result; // rax
long long v12; // rax
long long v13; // rax
unsigned int *v14; // [rsp+0h] [rbp-50h]
long long v15; // [rsp+8h] [rbp-48h]
__int16 v16; // [rsp+10h] [rbp-40h]
long long v17; // [rsp+18h] [rbp-38h]
unsigned int v18; // [rsp+24h] [rbp-2Ch]
v5 = a2;
v18 = a1;
v15 = 0LL;
v6 = 0;
if ( (a4 & 0x1A) == 0 )
v6 = my_global_flags;
v7 = a4 | v6;
v14 = (unsigned int *)__errno_location(a1);
*v14 = 0;
a1 = (unsigned int)a1;
v8 = read((unsigned int)a1, a2, a3);
v17 = v7 & 6;
if ( v8 == a3 )
{
LABEL_13:
v8 = a3;
goto LABEL_14;
}
v16 = v7;
v15 = 0LL;
v9 = v14;
while ( 1 )
{
v10 = *v9;
*(_DWORD *)my_thread_var(a1) = v10;
if ( !v10 || v17 != 0 && v8 != -1 )
*(_DWORD *)my_thread_var(a1) = 175;
if ( v10 == 4 && (v8 == 0 || (_DWORD)v8 == -1) )
goto LABEL_12;
if ( (unsigned long long)(v8 + 1) < 2 || (v16 & 0x200) == 0 )
break;
v5 += v8;
a3 -= v8;
v15 += v8;
LABEL_12:
v9 = v14;
*v14 = 0;
a1 = v18;
v8 = read(v18, v5, a3);
if ( v8 == a3 )
goto LABEL_13;
}
if ( (v16 & 0x1A) != 0 )
{
if ( v8 == -1 )
{
v13 = my_filename(v18);
my_error(2u, v16 & 0x440 | 4LL, v13, v10);
return -1LL;
}
if ( v17 )
{
v12 = my_filename(v18);
my_error(9u, v16 & 0x440 | 4LL, v12, v10);
v17 = 1LL;
result = -1LL;
if ( (v16 & 0x200) == 0 )
return result;
}
else
{
v17 = 0LL;
}
LABEL_14:
result = 0LL;
if ( !v17 )
return v8 + v15;
}
else
{
result = -1LL;
if ( v8 != -1 && ((v16 & 0x200) != 0 || v17 == 0) )
goto LABEL_14;
}
return result;
}
|
my_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV RBX,RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x48],0x0
MOV R15D,0x0
TEST CL,0x1a
JNZ 0x001ad25f
LEA RAX,[0x527b08]
MOV R15,qword ptr [RAX]
LAB_001ad25f:
OR R15,RCX
CALL 0x00139a20
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RAX],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RBX
MOV RDX,R12
CALL 0x001397c0
MOV R14,RAX
MOV EAX,R15D
AND EAX,0x6
MOV qword ptr [RBP + -0x38],RAX
CMP R14,R12
JZ 0x001ad333
MOV qword ptr [RBP + -0x40],R15
MOV qword ptr [RBP + -0x48],0x0
MOV R15,qword ptr [RBP + -0x50]
LAB_001ad2a5:
CMP qword ptr [RBP + -0x38],0x0
SETZ R13B
MOV R15D,dword ptr [R15]
CALL 0x001ade5a
MOV dword ptr [RAX],R15D
CMP R14,-0x1
SETZ AL
TEST R15D,R15D
JZ 0x001ad2ca
OR AL,R13B
JNZ 0x001ad2d5
LAB_001ad2ca:
CALL 0x001ade5a
MOV dword ptr [RAX],0xaf
LAB_001ad2d5:
TEST R14,R14
SETZ AL
CMP R14D,-0x1
SETZ CL
OR CL,AL
CMP R15D,0x4
SETZ AL
TEST CL,AL
JNZ 0x001ad30e
LEA RAX,[R14 + 0x1]
CMP RAX,0x2
JC 0x001ad357
MOV RAX,qword ptr [RBP + -0x40]
AND EAX,0x200
JZ 0x001ad357
ADD RBX,R14
SUB R12,R14
ADD qword ptr [RBP + -0x48],R14
LAB_001ad30e:
MOV R15,qword ptr [RBP + -0x50]
MOV dword ptr [R15],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RBX
MOV RDX,R12
CALL 0x001397c0
MOV R14,RAX
CMP RAX,R12
JNZ 0x001ad2a5
LAB_001ad333:
MOV R14,R12
LAB_001ad336:
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,R14
XOR EAX,EAX
CMP qword ptr [RBP + -0x38],0x0
CMOVZ RAX,RCX
LAB_001ad348:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ad357:
MOV RAX,qword ptr [RBP + -0x40]
TEST AL,0x1a
JZ 0x001ad3b7
CMP R14,-0x1
JZ 0x001ad3e4
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001ad41b
MOV R12,qword ptr [RBP + -0x40]
MOV EBX,R12D
AND EBX,0x440
OR RBX,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001b0978
MOV EDI,0x9
MOV RSI,RBX
MOV RDX,RAX
MOV ECX,R15D
XOR EAX,EAX
CALL 0x001a92a3
BT R12D,0x9
MOV EAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,-0x1
JC 0x001ad336
JMP 0x001ad348
LAB_001ad3b7:
BT EAX,0x9
SETNC CL
CMP qword ptr [RBP + -0x38],0x0
SETNZ DL
MOV RAX,-0x1
CMP R14,-0x1
JZ 0x001ad348
AND DL,CL
JZ 0x001ad336
JMP 0x001ad348
LAB_001ad3e4:
MOV RBX,qword ptr [RBP + -0x40]
AND EBX,0x440
OR RBX,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001b0978
MOV EDI,0x2
MOV RSI,RBX
MOV RDX,RAX
MOV ECX,R15D
XOR EAX,EAX
CALL 0x001a92a3
MOV RAX,-0x1
JMP 0x001ad348
LAB_001ad41b:
MOV qword ptr [RBP + -0x38],0x0
JMP 0x001ad336
|
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
uint uVar2;
int *piVar4;
size_t sVar5;
int *piVar6;
int4 *puVar7;
long lVar8;
int8 uVar9;
ulong uVar10;
long local_50;
uint uVar3;
local_50 = 0;
uVar10 = 0;
if ((param_4 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
uVar10 = uVar10 | param_4;
piVar4 = __errno_location();
*piVar4 = 0;
sVar5 = read(param_1,param_2,param_3);
uVar3 = (uint)uVar10;
uVar2 = uVar3 & 6;
if (sVar5 != param_3) {
local_50 = 0;
do {
iVar1 = *piVar4;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
if ((iVar1 == 0) || (sVar5 != 0xffffffffffffffff && (uVar10 & 6) != 0)) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0xaf;
}
if ((int)sVar5 != -1 && sVar5 != 0 || iVar1 != 4) {
if ((sVar5 + 1 < 2) || ((uVar10 & 0x200) == 0)) {
param_3 = sVar5;
if ((uVar10 & 0x1a) == 0) {
if (sVar5 == 0xffffffffffffffff) {
return -1;
}
if ((uVar10 & 6) != 0 && (uVar3 >> 9 & 1) == 0) {
return -1;
}
}
else {
if (sVar5 == 0xffffffffffffffff) {
uVar9 = my_filename(param_1);
my_error(2,uVar3 & 0x440 | 4,uVar9,iVar1);
return -1;
}
if ((uVar10 & 6) == 0) {
uVar2 = 0;
}
else {
uVar9 = my_filename(param_1);
my_error(9,uVar3 & 0x440 | 4,uVar9,iVar1);
uVar2 = 1;
if ((uVar3 >> 9 & 1) == 0) {
return -1;
}
}
}
break;
}
param_2 = (void *)((long)param_2 + sVar5);
param_3 = param_3 - sVar5;
local_50 = local_50 + sVar5;
}
*piVar4 = 0;
sVar5 = read(param_1,param_2,param_3);
} while (sVar5 != param_3);
}
lVar8 = 0;
if (uVar2 == 0) {
lVar8 = local_50 + param_3;
}
return lVar8;
}
|
|
61,590 |
ma_read_key_record
|
eloqsql/storage/maria/ma_key.c
|
int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
{
fast_ma_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf))
{
_ma_set_fatal_error(info, HA_ERR_CRASHED);
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
}
|
O3
|
c
|
ma_read_key_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x3349e
movq %r14, %rdi
xorl %esi, %esi
callq 0x33e8e
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpq $-0x1, %r12
je 0x334ee
movl 0x62c(%r14), %esi
testl %esi, %esi
js 0x334d7
movq %r14, %rdi
movl $0x1, %edx
movq %r15, %rcx
callq 0x334f9
testl %eax, %eax
je 0x334e4
movq %r14, %rdi
movl $0x7e, %esi
callq 0x32af4
jmp 0x334ee
callq 0xa13e6
movl $0x7c, (%rax)
jmp 0x334ee
orb $0x2, 0x624(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ma_read_key_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
cmp dword ptr [rax+7B8h], 0
jnz short loc_3349E
mov rdi, r14
xor esi, esi
call _ma_writeinfo
loc_3349E:
mov ebx, 0FFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_334EE
mov esi, [r14+62Ch]
test esi, esi
js short loc_334D7
mov rdi, r14
mov edx, 1
mov rcx, r15
call _ma_put_key_in_record
test eax, eax
jz short loc_334E4
mov rdi, r14
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
jmp short loc_334EE
loc_334D7:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
jmp short loc_334EE
loc_334E4:
or byte ptr [r14+624h], 2
xor ebx, ebx
loc_334EE:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ma_read_key_record(unsigned int *a1, long long a2, long long a3)
{
unsigned int v5; // ebx
long long v6; // rsi
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
int v10; // r9d
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo(a1, 0LL);
v5 = -1;
if ( a3 != -1 )
{
v6 = a1[395];
if ( (int)v6 < 0 )
{
*(_DWORD *)my_thread_var() = 124;
}
else if ( (unsigned int)ma_put_key_in_record(a1, v6, 1LL, a2) )
{
ma_set_fatal_error(a1, 126, v7, v8, v9, v10);
}
else
{
*((_BYTE *)a1 + 1572) |= 2u;
return 0;
}
}
return v5;
}
|
_ma_read_key_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0013349e
MOV RDI,R14
XOR ESI,ESI
CALL 0x00133e8e
LAB_0013349e:
MOV EBX,0xffffffff
CMP R12,-0x1
JZ 0x001334ee
MOV ESI,dword ptr [R14 + 0x62c]
TEST ESI,ESI
JS 0x001334d7
MOV RDI,R14
MOV EDX,0x1
MOV RCX,R15
CALL 0x001334f9
TEST EAX,EAX
JZ 0x001334e4
MOV RDI,R14
MOV ESI,0x7e
CALL 0x00132af4
JMP 0x001334ee
LAB_001334d7:
CALL 0x001a13e6
MOV dword ptr [RAX],0x7c
JMP 0x001334ee
LAB_001334e4:
OR byte ptr [R14 + 0x624],0x2
XOR EBX,EBX
LAB_001334ee:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _ma_read_key_record(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
int8 uVar3;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
uVar3 = 0xffffffff;
if (param_3 != -1) {
if (*(int *)((long)param_1 + 0x62c) < 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
else {
iVar1 = _ma_put_key_in_record(param_1,*(int *)((long)param_1 + 0x62c),1,param_2);
if (iVar1 == 0) {
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2;
uVar3 = 0;
}
else {
_ma_set_fatal_error(param_1,0x7e);
}
}
}
return uVar3;
}
|
|
61,591 |
my_realpath
|
eloqsql/mysys/my_symlink.c
|
int my_realpath(char *to, const char *filename, myf MyFlags)
{
#if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH)
int result=0;
char buff[BUFF_LEN];
char *ptr;
DBUG_ENTER("my_realpath");
DBUG_PRINT("info",("executing realpath"));
if ((ptr=realpath(filename,buff)))
strmake(to, ptr, FN_REFLEN-1);
else
{
/*
Realpath didn't work; Use my_load_path() which is a poor substitute
original name but will at least be able to resolve paths that starts
with '.'.
*/
if (MyFlags)
DBUG_PRINT("error",("realpath failed with errno: %d", errno));
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
my_load_path(to, filename, NullS);
if (my_errno == ENOENT)
result= 1;
else
result= -1;
}
DBUG_RETURN(result);
#elif defined(_WIN32)
int ret= GetFullPathName(filename,FN_REFLEN, to, NULL);
if (ret == 0 || ret > FN_REFLEN)
{
my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError();
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
/*
GetFullPathName didn't work : use my_load_path() which is a poor
substitute original name but will at least be able to resolve
paths that starts with '.'.
*/
my_load_path(to, filename, NullS);
return -1;
}
#else
my_load_path(to, filename, NullS);
#endif
return 0;
}
|
O0
|
c
|
my_realpath:
pushq %rbp
movq %rsp, %rbp
subq $0x1060, %rsp # imm = 0x1060
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x1020(%rbp)
movq %rsi, -0x1028(%rbp)
movq %rdx, -0x1030(%rbp)
movl $0x0, -0x1034(%rbp)
jmp 0x455e9
movq -0x1028(%rbp), %rdi
leaq -0x1010(%rbp), %rsi
callq 0x25110
movq %rax, -0x1040(%rbp)
cmpq $0x0, %rax
je 0x45626
movq -0x1020(%rbp), %rdi
movq -0x1040(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x8bc00
jmp 0x456c6
cmpq $0x0, -0x1030(%rbp)
je 0x45636
jmp 0x45632
jmp 0x45634
jmp 0x45636
callq 0x25040
movl (%rax), %eax
movl %eax, -0x1044(%rbp)
callq 0x31720
movl -0x1044(%rbp), %ecx
movl %ecx, (%rax)
movq -0x1030(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x4568d
movq -0x1028(%rbp), %rax
movq %rax, -0x1050(%rbp)
callq 0x31720
movq -0x1050(%rbp), %rdx
movl (%rax), %ecx
movl $0x1a, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x43530
movq -0x1020(%rbp), %rdi
movq -0x1028(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x46ee0
callq 0x31720
cmpl $0x2, (%rax)
jne 0x456ba
movl $0x1, -0x1034(%rbp)
jmp 0x456c4
movl $0xffffffff, -0x1034(%rbp) # imm = 0xFFFFFFFF
jmp 0x456c6
jmp 0x456c8
movl -0x1034(%rbp), %eax
movl %eax, -0x1014(%rbp)
movl -0x1014(%rbp), %eax
movl %eax, -0x1054(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x45701
movl -0x1054(%rbp), %eax
addq $0x1060, %rsp # imm = 0x1060
popq %rbp
retq
callq 0x25410
nopw %cs:(%rax,%rax)
|
my_realpath:
push rbp
mov rbp, rsp
sub rsp, 1060h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_1020], rdi
mov [rbp+var_1028], rsi
mov [rbp+var_1030], rdx
mov [rbp+var_1034], 0
jmp short $+2
loc_455E9:
mov rdi, [rbp+var_1028]
lea rsi, [rbp+var_1010]
call _realpath
mov [rbp+var_1040], rax
cmp rax, 0
jz short loc_45626
mov rdi, [rbp+var_1020]
mov rsi, [rbp+var_1040]
mov edx, 1FFh
call strmake
jmp loc_456C6
loc_45626:
cmp [rbp+var_1030], 0
jz short loc_45636
jmp short $+2
loc_45632:
jmp short $+2
loc_45634:
jmp short $+2
loc_45636:
call ___errno_location
mov eax, [rax]
mov [rbp+var_1044], eax
call _my_thread_var
mov ecx, [rbp+var_1044]
mov [rax], ecx
mov rax, [rbp+var_1030]
and rax, 10h
cmp rax, 0
jz short loc_4568D
mov rax, [rbp+var_1028]
mov [rbp+var_1050], rax
call _my_thread_var
mov rdx, [rbp+var_1050]
mov ecx, [rax]
mov edi, 1Ah
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_4568D:
mov rdi, [rbp+var_1020]
mov rsi, [rbp+var_1028]
xor eax, eax
mov edx, eax
call my_load_path
call _my_thread_var
cmp dword ptr [rax], 2
jnz short loc_456BA
mov [rbp+var_1034], 1
jmp short loc_456C4
loc_456BA:
mov [rbp+var_1034], 0FFFFFFFFh
loc_456C4:
jmp short $+2
loc_456C6:
jmp short $+2
loc_456C8:
mov eax, [rbp+var_1034]
mov [rbp+var_1014], eax
mov eax, [rbp+var_1014]
mov [rbp+var_1054], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_45701
mov eax, [rbp+var_1054]
add rsp, 1060h
pop rbp
retn
loc_45701:
call ___stack_chk_fail
|
long long my_realpath(long long a1, long long a2, char a3)
{
unsigned int *v3; // rax
long long v5; // [rsp+1Ch] [rbp-1044h]
long long v6; // [rsp+20h] [rbp-1040h]
unsigned int v7; // [rsp+2Ch] [rbp-1034h]
_BYTE v9[4104]; // [rsp+50h] [rbp-1010h] BYREF
unsigned long long v10; // [rsp+1058h] [rbp-8h]
v10 = __readfsqword(0x28u);
v7 = 0;
v6 = realpath(a2, v9);
if ( v6 )
{
strmake(a1, v6, 511LL);
}
else
{
v5 = *(unsigned int *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)my_thread_var();
my_error(0x1Au, 0LL, a2, *v3);
}
my_load_path(a1, a2, 0LL);
if ( *(_DWORD *)my_thread_var() == 2 )
return 1;
else
return (unsigned int)-1;
}
return v7;
}
|
my_realpath:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1060
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x1020],RDI
MOV qword ptr [RBP + -0x1028],RSI
MOV qword ptr [RBP + -0x1030],RDX
MOV dword ptr [RBP + -0x1034],0x0
JMP 0x001455e9
LAB_001455e9:
MOV RDI,qword ptr [RBP + -0x1028]
LEA RSI,[RBP + -0x1010]
CALL 0x00125110
MOV qword ptr [RBP + -0x1040],RAX
CMP RAX,0x0
JZ 0x00145626
MOV RDI,qword ptr [RBP + -0x1020]
MOV RSI,qword ptr [RBP + -0x1040]
MOV EDX,0x1ff
CALL 0x0018bc00
JMP 0x001456c6
LAB_00145626:
CMP qword ptr [RBP + -0x1030],0x0
JZ 0x00145636
JMP 0x00145632
LAB_00145632:
JMP 0x00145634
LAB_00145634:
JMP 0x00145636
LAB_00145636:
CALL 0x00125040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1044],EAX
CALL 0x00131720
MOV ECX,dword ptr [RBP + -0x1044]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x1030]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0014568d
MOV RAX,qword ptr [RBP + -0x1028]
MOV qword ptr [RBP + -0x1050],RAX
CALL 0x00131720
MOV RDX,qword ptr [RBP + -0x1050]
MOV ECX,dword ptr [RAX]
MOV EDI,0x1a
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x00143530
LAB_0014568d:
MOV RDI,qword ptr [RBP + -0x1020]
MOV RSI,qword ptr [RBP + -0x1028]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00146ee0
CALL 0x00131720
CMP dword ptr [RAX],0x2
JNZ 0x001456ba
MOV dword ptr [RBP + -0x1034],0x1
JMP 0x001456c4
LAB_001456ba:
MOV dword ptr [RBP + -0x1034],0xffffffff
LAB_001456c4:
JMP 0x001456c6
LAB_001456c6:
JMP 0x001456c8
LAB_001456c8:
MOV EAX,dword ptr [RBP + -0x1034]
MOV dword ptr [RBP + -0x1014],EAX
MOV EAX,dword ptr [RBP + -0x1014]
MOV dword ptr [RBP + -0x1054],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00145701
MOV EAX,dword ptr [RBP + -0x1054]
ADD RSP,0x1060
POP RBP
RET
LAB_00145701:
CALL 0x00125410
|
int4 my_realpath(int8 param_1,char *param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int4 *puVar4;
long in_FS_OFFSET;
int4 local_103c;
char local_1018 [4104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_103c = 0;
pcVar2 = realpath(param_2,local_1018);
if (pcVar2 == (char *)0x0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_3 & 0x10) != 0) {
puVar4 = (int4 *)_my_thread_var();
my_error(0x1a,0,param_2,*puVar4);
}
my_load_path(param_1,param_2,0);
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 2) {
local_103c = 1;
}
else {
local_103c = 0xffffffff;
}
}
else {
strmake(param_1,pcVar2,0x1ff);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_103c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,592 |
get_var_ref
|
bluesky950520[P]quickjs/quickjs.c
|
static JSVarRef *get_var_ref(JSContext *ctx, JSStackFrame *sf,
int var_idx, BOOL is_arg)
{
JSVarRef *var_ref;
struct list_head *el;
list_for_each(el, &sf->var_ref_list) {
var_ref = list_entry(el, JSVarRef, header.link);
if (var_ref->var_idx == var_idx && var_ref->is_arg == is_arg) {
var_ref->header.ref_count++;
return var_ref;
}
}
/* create a new one */
var_ref = js_malloc(ctx, sizeof(JSVarRef));
if (!var_ref)
return NULL;
var_ref->header.ref_count = 1;
var_ref->is_detached = FALSE;
var_ref->is_arg = is_arg;
var_ref->var_idx = var_idx;
list_add_tail(&var_ref->header.link, &sf->var_ref_list);
if (is_arg)
var_ref->pvalue = &sf->arg_buf[var_idx];
else
var_ref->pvalue = &sf->var_buf[var_idx];
var_ref->value = JS_UNDEFINED;
return var_ref;
}
|
O0
|
c
|
get_var_ref:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl %ecx, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
je 0x66046
movq 0x18(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl 0x2c(%rsp), %eax
jne 0x66034
movq 0x20(%rsp), %rax
movb 0x5(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl 0x28(%rsp), %eax
jne 0x66034
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x66145
jmp 0x66036
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x65fd4
movq 0x38(%rsp), %rdi
movl $0x30, %esi
callq 0x209f0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x66070
movq $0x0, 0x40(%rsp)
jmp 0x66145
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x20(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movl 0x28(%rsp), %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movb 0x5(%rax), %cl
andb $0x1, %dl
shlb %dl
andb $-0x3, %cl
orb %dl, %cl
movb %cl, 0x5(%rax)
movl 0x2c(%rsp), %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x6(%rax)
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
movq 0x30(%rsp), %rsi
addq $0x28, %rsi
callq 0x22790
cmpl $0x0, 0x28(%rsp)
je 0x660f5
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rcx
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x66113
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rcx
movslq 0x2c(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rax
movl $0x0, 0x8(%rsp)
movq $0x3, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop
|
get_var_ref:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_1C], edx
mov [rsp+48h+var_20], ecx
mov rax, [rsp+48h+var_18]
mov rax, [rax+30h]
mov [rsp+48h+var_30], rax
loc_65FD4:
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_18]
add rcx, 28h ; '('
cmp rax, rcx
jz short loc_66046
mov rax, [rsp+48h+var_30]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_28]
movzx eax, word ptr [rax+6]
cmp eax, [rsp+48h+var_1C]
jnz short loc_66034
mov rax, [rsp+48h+var_28]
mov al, [rax+5]
shr al, 1
and al, 1
movzx eax, al
cmp eax, [rsp+48h+var_20]
jnz short loc_66034
mov rax, [rsp+48h+var_28]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_8], rax
jmp loc_66145
loc_66034:
jmp short $+2
loc_66036:
mov rax, [rsp+48h+var_30]
mov rax, [rax+8]
mov [rsp+48h+var_30], rax
jmp short loc_65FD4
loc_66046:
mov rdi, [rsp+48h+var_10]
mov esi, 30h ; '0'
call js_malloc
mov [rsp+48h+var_28], rax
cmp [rsp+48h+var_28], 0
jnz short loc_66070
mov [rsp+48h+var_8], 0
jmp loc_66145
loc_66070:
mov rax, [rsp+48h+var_28]
mov dword ptr [rax], 1
mov rax, [rsp+48h+var_28]
mov cl, [rax+5]
and cl, 0FEh
or cl, 0
mov [rax+5], cl
mov eax, [rsp+48h+var_20]
mov dl, al
mov rax, [rsp+48h+var_28]
mov cl, [rax+5]
and dl, 1
shl dl, 1
and cl, 0FDh
or cl, dl
mov [rax+5], cl
mov eax, [rsp+48h+var_1C]
mov cx, ax
mov rax, [rsp+48h+var_28]
mov [rax+6], cx
mov rdi, [rsp+48h+var_28]
add rdi, 8
mov rsi, [rsp+48h+var_18]
add rsi, 28h ; '('
call list_add_tail_0
cmp [rsp+48h+var_20], 0
jz short loc_660F5
mov rax, [rsp+48h+var_18]
mov rcx, [rax+18h]
movsxd rax, [rsp+48h+var_1C]
shl rax, 4
add rcx, rax
mov rax, [rsp+48h+var_28]
mov [rax+18h], rcx
jmp short loc_66113
loc_660F5:
mov rax, [rsp+48h+var_18]
mov rcx, [rax+20h]
movsxd rax, [rsp+48h+var_1C]
shl rax, 4
add rcx, rax
mov rax, [rsp+48h+var_28]
mov [rax+18h], rcx
loc_66113:
mov rax, [rsp+48h+var_28]
mov dword ptr [rsp+48h+var_40], 0
mov [rsp+48h+var_38], 3
mov rcx, [rsp+48h+var_40]
mov [rax+20h], rcx
mov rcx, [rsp+48h+var_38]
mov [rax+28h], rcx
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_8], rax
loc_66145:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long get_var_ref(long long a1, _QWORD *a2, int a3, int a4)
{
long long v4; // rcx
long long v6; // [rsp+8h] [rbp-40h]
_QWORD *i; // [rsp+18h] [rbp-30h]
_QWORD *v8; // [rsp+20h] [rbp-28h]
long long v9; // [rsp+20h] [rbp-28h]
for ( i = (_QWORD *)a2[6]; i != a2 + 5; i = (_QWORD *)i[1] )
{
v8 = i - 1;
if ( *((unsigned __int16 *)i - 1) == a3 && ((*((_BYTE *)v8 + 5) & 2) != 0) == a4 )
{
++*(_DWORD *)v8;
return (long long)(i - 1);
}
}
v9 = js_malloc(a1, 48LL);
if ( !v9 )
return 0LL;
*(_DWORD *)v9 = 1;
*(_BYTE *)(v9 + 5) &= ~1u;
*(_BYTE *)(v9 + 5) = (2 * (a4 & 1)) | *(_BYTE *)(v9 + 5) & 0xFD;
*(_WORD *)(v9 + 6) = a3;
list_add_tail_0(v9 + 8, a2 + 5);
if ( a4 )
v4 = a2[3];
else
v4 = a2[4];
*(_QWORD *)(v9 + 24) = 16LL * a3 + v4;
LODWORD(v6) = 0;
*(_QWORD *)(v9 + 32) = v6;
*(_QWORD *)(v9 + 40) = 3LL;
return v9;
}
|
get_var_ref:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x2c],EDX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x18],RAX
LAB_00165fd4:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
ADD RCX,0x28
CMP RAX,RCX
JZ 0x00166046
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,dword ptr [RSP + 0x2c]
JNZ 0x00166034
MOV RAX,qword ptr [RSP + 0x20]
MOV AL,byte ptr [RAX + 0x5]
SHR AL,0x1
AND AL,0x1
MOVZX EAX,AL
CMP EAX,dword ptr [RSP + 0x28]
JNZ 0x00166034
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x00166145
LAB_00166034:
JMP 0x00166036
LAB_00166036:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00165fd4
LAB_00166046:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x30
CALL 0x001209f0
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x00166070
MOV qword ptr [RSP + 0x40],0x0
JMP 0x00166145
LAB_00166070:
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RSP + 0x20]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfe
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV EAX,dword ptr [RSP + 0x28]
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x20]
MOV CL,byte ptr [RAX + 0x5]
AND DL,0x1
SHL DL,0x1
AND CL,0xfd
OR CL,DL
MOV byte ptr [RAX + 0x5],CL
MOV EAX,dword ptr [RSP + 0x2c]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x20]
MOV word ptr [RAX + 0x6],CX
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,0x28
CALL 0x00122790
CMP dword ptr [RSP + 0x28],0x0
JZ 0x001660f5
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x18]
MOVSXD RAX,dword ptr [RSP + 0x2c]
SHL RAX,0x4
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
JMP 0x00166113
LAB_001660f5:
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x2c]
SHL RAX,0x4
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
LAB_00166113:
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x3
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
LAB_00166145:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int * get_var_ref(int8 param_1,long param_2,uint param_3,uint param_4)
{
int *piVar1;
uint uStack_3c;
long local_30;
int *local_8;
local_30 = *(long *)(param_2 + 0x30);
while( true ) {
if (local_30 == param_2 + 0x28) {
local_8 = (int *)js_malloc(param_1,0x30);
if (local_8 == (int *)0x0) {
local_8 = (int *)0x0;
}
else {
*local_8 = 1;
*(byte *)((long)local_8 + 5) = *(byte *)((long)local_8 + 5) & 0xfe;
*(byte *)((long)local_8 + 5) =
*(byte *)((long)local_8 + 5) & 0xfd | ((byte)param_4 & 1) << 1;
*(short *)((long)local_8 + 6) = (short)param_3;
list_add_tail(local_8 + 2,param_2 + 0x28);
if (param_4 == 0) {
*(long *)(local_8 + 6) = *(long *)(param_2 + 0x20) + (long)(int)param_3 * 0x10;
}
else {
*(long *)(local_8 + 6) = *(long *)(param_2 + 0x18) + (long)(int)param_3 * 0x10;
}
*(ulong *)(local_8 + 8) = (ulong)uStack_3c << 0x20;
local_8[10] = 3;
local_8[0xb] = 0;
}
return local_8;
}
piVar1 = (int *)(local_30 + -8);
if ((*(ushort *)(local_30 + -2) == param_3) && ((*(byte *)(local_30 + -3) >> 1 & 1) == param_4))
break;
local_30 = *(long *)(local_30 + 8);
}
*piVar1 = *piVar1 + 1;
return piVar1;
}
|
|
61,593 |
get_var_ref
|
bluesky950520[P]quickjs/quickjs.c
|
static JSVarRef *get_var_ref(JSContext *ctx, JSStackFrame *sf,
int var_idx, BOOL is_arg)
{
JSVarRef *var_ref;
struct list_head *el;
list_for_each(el, &sf->var_ref_list) {
var_ref = list_entry(el, JSVarRef, header.link);
if (var_ref->var_idx == var_idx && var_ref->is_arg == is_arg) {
var_ref->header.ref_count++;
return var_ref;
}
}
/* create a new one */
var_ref = js_malloc(ctx, sizeof(JSVarRef));
if (!var_ref)
return NULL;
var_ref->header.ref_count = 1;
var_ref->is_detached = FALSE;
var_ref->is_arg = is_arg;
var_ref->var_idx = var_idx;
list_add_tail(&var_ref->header.link, &sf->var_ref_list);
if (is_arg)
var_ref->pvalue = &sf->arg_buf[var_idx];
else
var_ref->pvalue = &sf->var_buf[var_idx];
var_ref->value = JS_UNDEFINED;
return var_ref;
}
|
O1
|
c
|
get_var_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x28(%rsi), %r15
movq 0x30(%rsi), %rax
cmpq %r15, %rax
je 0x3ed8f
movzwl -0x2(%rax), %ecx
cmpl %ebp, %ecx
jne 0x3ed77
movzbl -0x3(%rax), %ecx
shrl %ecx
andl $0x1, %ecx
cmpl %r14d, %ecx
je 0x3ed7d
movq 0x8(%rax), %rax
jmp 0x3ed5c
incl -0x8(%rax)
addq $-0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %esi
callq 0xed5d
testq %rax, %rax
je 0x3edfe
movl $0x1, (%rax)
movb 0x5(%rax), %cl
leal (%r14,%r14), %edx
andb $0x2, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, 0x5(%rax)
movw %bp, 0x6(%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq 0x28(%rbx), %rdx
movq %rcx, 0x8(%rdx)
movq %rdx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rcx, 0x28(%rbx)
xorl %ecx, %ecx
testl %r14d, %r14d
sete %cl
movslq %ebp, %rdx
shlq $0x4, %rdx
addq 0x18(%rbx,%rcx,8), %rdx
movq %rdx, 0x18(%rax)
movl $0x0, 0x20(%rax)
movq $0x3, 0x28(%rax)
jmp 0x3ed84
xorl %eax, %eax
jmp 0x3ed84
|
get_var_ref:
push rbp
push r15
push r14
push rbx
push rax
mov r14d, ecx
mov ebp, edx
mov rbx, rsi
lea r15, [rsi+28h]
mov rax, [rsi+30h]
loc_3ED5C:
cmp rax, r15
jz short loc_3ED8F
movzx ecx, word ptr [rax-2]
cmp ecx, ebp
jnz short loc_3ED77
movzx ecx, byte ptr [rax-3]
shr ecx, 1
and ecx, 1
cmp ecx, r14d
jz short loc_3ED7D
loc_3ED77:
mov rax, [rax+8]
jmp short loc_3ED5C
loc_3ED7D:
inc dword ptr [rax-8]
add rax, 0FFFFFFFFFFFFFFF8h
loc_3ED84:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3ED8F:
mov esi, 30h ; '0'
call js_malloc
test rax, rax
jz short loc_3EDFE
mov dword ptr [rax], 1
mov cl, [rax+5]
lea edx, [r14+r14]
and dl, 2
and cl, 0FCh
or cl, dl
mov [rax+5], cl
mov [rax+6], bp
mov rcx, rax
add rcx, 8
mov rdx, [rbx+28h]
mov [rdx+8], rcx
mov [rax+8], rdx
mov [rax+10h], r15
mov [rbx+28h], rcx
xor ecx, ecx
test r14d, r14d
setz cl
movsxd rdx, ebp
shl rdx, 4
add rdx, [rbx+rcx*8+18h]
mov [rax+18h], rdx
mov dword ptr [rax+20h], 0
mov qword ptr [rax+28h], 3
jmp short loc_3ED84
loc_3EDFE:
xor eax, eax
jmp short loc_3ED84
|
long long get_var_ref(long long a1, long long a2, int a3, int a4)
{
long long v6; // r15
long long i; // rax
long long result; // rax
long long v9; // rdx
v6 = a2 + 40;
for ( i = *(_QWORD *)(a2 + 48); i != v6; i = *(_QWORD *)(i + 8) )
{
if ( *(unsigned __int16 *)(i - 2) == a3 && ((*(unsigned __int8 *)(i - 3) >> 1) & 1) == a4 )
{
++*(_DWORD *)(i - 8);
return i - 8;
}
}
result = js_malloc(a1, 48LL);
if ( !result )
return 0LL;
*(_DWORD *)result = 1;
*(_BYTE *)(result + 5) = (2 * a4) & 2 | *(_BYTE *)(result + 5) & 0xFC;
*(_WORD *)(result + 6) = a3;
v9 = *(_QWORD *)(a2 + 40);
*(_QWORD *)(v9 + 8) = result + 8;
*(_QWORD *)(result + 8) = v9;
*(_QWORD *)(result + 16) = v6;
*(_QWORD *)(a2 + 40) = result + 8;
*(_QWORD *)(result + 24) = *(_QWORD *)(a2 + 8LL * (a4 == 0) + 24) + 16LL * a3;
*(_DWORD *)(result + 32) = 0;
*(_QWORD *)(result + 40) = 3LL;
return result;
}
|
get_var_ref:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ECX
MOV EBP,EDX
MOV RBX,RSI
LEA R15,[RSI + 0x28]
MOV RAX,qword ptr [RSI + 0x30]
LAB_0013ed5c:
CMP RAX,R15
JZ 0x0013ed8f
MOVZX ECX,word ptr [RAX + -0x2]
CMP ECX,EBP
JNZ 0x0013ed77
MOVZX ECX,byte ptr [RAX + -0x3]
SHR ECX,0x1
AND ECX,0x1
CMP ECX,R14D
JZ 0x0013ed7d
LAB_0013ed77:
MOV RAX,qword ptr [RAX + 0x8]
JMP 0x0013ed5c
LAB_0013ed7d:
INC dword ptr [RAX + -0x8]
ADD RAX,-0x8
LAB_0013ed84:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0013ed8f:
MOV ESI,0x30
CALL 0x0010ed5d
TEST RAX,RAX
JZ 0x0013edfe
MOV dword ptr [RAX],0x1
MOV CL,byte ptr [RAX + 0x5]
LEA EDX,[R14 + R14*0x1]
AND DL,0x2
AND CL,0xfc
OR CL,DL
MOV byte ptr [RAX + 0x5],CL
MOV word ptr [RAX + 0x6],BP
MOV RCX,RAX
ADD RCX,0x8
MOV RDX,qword ptr [RBX + 0x28]
MOV qword ptr [RDX + 0x8],RCX
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RBX + 0x28],RCX
XOR ECX,ECX
TEST R14D,R14D
SETZ CL
MOVSXD RDX,EBP
SHL RDX,0x4
ADD RDX,qword ptr [RBX + RCX*0x8 + 0x18]
MOV qword ptr [RAX + 0x18],RDX
MOV dword ptr [RAX + 0x20],0x0
MOV qword ptr [RAX + 0x28],0x3
JMP 0x0013ed84
LAB_0013edfe:
XOR EAX,EAX
JMP 0x0013ed84
|
int4 * get_var_ref(int8 param_1,long param_2,uint param_3,uint param_4)
{
long lVar1;
int4 *puVar2;
lVar1 = *(long *)(param_2 + 0x30);
while( true ) {
if (lVar1 == param_2 + 0x28) {
puVar2 = (int4 *)js_malloc(param_1,0x30);
if (puVar2 == (int4 *)0x0) {
puVar2 = (int4 *)0x0;
}
else {
*puVar2 = 1;
*(byte *)((long)puVar2 + 5) =
*(byte *)((long)puVar2 + 5) & 0xfc | (char)param_4 * '\x02' & 2U;
*(short *)((long)puVar2 + 6) = (short)param_3;
lVar1 = *(long *)(param_2 + 0x28);
*(int4 **)(lVar1 + 8) = puVar2 + 2;
*(long *)(puVar2 + 2) = lVar1;
*(long *)(puVar2 + 4) = param_2 + 0x28;
*(int4 **)(param_2 + 0x28) = puVar2 + 2;
*(long *)(puVar2 + 6) =
(long)(int)param_3 * 0x10 + *(long *)(param_2 + 0x18 + (ulong)(param_4 == 0) * 8);
puVar2[8] = 0;
*(int8 *)(puVar2 + 10) = 3;
}
return puVar2;
}
if ((*(ushort *)(lVar1 + -2) == param_3) && ((*(byte *)(lVar1 + -3) >> 1 & 1) == param_4))
break;
lVar1 = *(long *)(lVar1 + 8);
}
*(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
return (int4 *)(lVar1 + -8);
}
|
|
61,594 |
evmone::advanced::get_op_table(evmc_revision)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp
|
EVMC_EXPORT const OpTable& get_op_table(evmc_revision rev) noexcept
{
static constexpr auto op_tables = []() noexcept {
std::array<OpTable, EVMC_MAX_REVISION + 1> tables{};
for (size_t r = EVMC_FRONTIER; r <= EVMC_MAX_REVISION; ++r)
{
auto& table = tables[r];
for (size_t i = 0; i < table.size(); ++i)
{
auto& t = table[i];
const auto gas_cost = instr::gas_costs[r][i];
if (gas_cost == instr::undefined)
{
t.fn = op_undefined;
t.gas_cost = 0;
}
else
{
t.fn = instruction_implementations[i];
t.gas_cost = gas_cost;
t.stack_req = instr::traits[i].stack_height_required;
t.stack_change = instr::traits[i].stack_height_change;
}
}
}
return tables;
}();
return op_tables[rev];
}
|
O0
|
cpp
|
evmone::advanced::get_op_table(evmc_revision):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %esi
leaq 0x95239(%rip), %rdi # 0x126b90
callq 0x93900
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN6evmone8advanced12get_op_tableE13evmc_revision:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
mov esi, eax
lea rdi, _ZZN6evmone8advanced12get_op_tableE13evmc_revisionE9op_tables; evmone::advanced::get_op_table(evmc_revision)::op_tables
call _ZNKSt5arrayIS_IN6evmone8advanced12OpTableEntryELm256EELm16EEixEm; std::array<std::array<evmone::advanced::OpTableEntry,256ul>,16ul>::operator[](ulong)
add rsp, 10h
pop rbp
retn
|
long long evmone::advanced::get_op_table(unsigned int a1)
{
return std::array<std::array<evmone::advanced::OpTableEntry,256ul>,16ul>::operator[](
&evmone::advanced::get_op_table(evmc_revision)::op_tables,
a1);
}
|
get_op_table:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
MOV ESI,EAX
LEA RDI,[0x226b90]
CALL 0x00193900
ADD RSP,0x10
POP RBP
RET
|
/* evmone::advanced::get_op_table(evmc_revision) */
void evmone::advanced::get_op_table(uint param_1)
{
std::array<std::array<evmone::advanced::OpTableEntry,256ul>,16ul>::operator[]
((array<std::array<evmone::advanced::OpTableEntry,256ul>,16ul> *)
get_op_table(evmc_revision)::op_tables,(ulong)param_1);
return;
}
|
|
61,595 |
YogaTest_aspect_ratio_double_main_Test::TestBody()
|
yoga-mod/tests/YGAspectRatioTest.cpp
|
TEST(YogaTest, aspect_ratio_double_main) {
YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetWidth(root_child0, 50);
YGNodeStyleSetAspectRatio(root_child0, 0.5);
YGNodeInsertChild(root, root_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_EQ(50, YGNodeLayoutGetWidth(root_child0));
ASSERT_EQ(100, YGNodeLayoutGetHeight(root_child0));
YGNodeFreeRecursive(root);
}
|
O0
|
cpp
|
YogaTest_aspect_ratio_double_main_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x7047d0
movq -0x10(%rbp), %rax
leaq 0x77d40c(%rip), %rcx # 0x85d430
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN38YogaTest_aspect_ratio_double_main_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV38YogaTest_aspect_ratio_double_main_Test; `vtable for'YogaTest_aspect_ratio_double_main_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
|
void YogaTest_aspect_ratio_double_main_Test::YogaTest_aspect_ratio_double_main_Test(
YogaTest_aspect_ratio_double_main_Test *this)
{
testing::Test::Test(this);
*(_QWORD *)this = (char *)&`vtable for'YogaTest_aspect_ratio_double_main_Test + 16;
}
|
YogaTest_aspect_ratio_double_main_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x008047d0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x95d430]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* YogaTest_aspect_ratio_double_main_Test::YogaTest_aspect_ratio_double_main_Test() */
void __thiscall
YogaTest_aspect_ratio_double_main_Test::YogaTest_aspect_ratio_double_main_Test
(YogaTest_aspect_ratio_double_main_Test *this)
{
testing::Test::Test((Test *)this);
*(int ***)this = &PTR__YogaTest_aspect_ratio_double_main_Test_0095d440;
return;
}
|
|
61,596 |
fmt::v10::detail::write_int_arg<std::conditional<num_bits<long long>() <= 32 && !0, unsigned int, std::conditional<num_bits<long long>() <= 64, unsigned long, unsigned __int128>::type>::type> fmt::v10::detail::make_write_int_arg<long long>(long long, fmt::v10::sign::type)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR auto make_write_int_arg(T value, sign_t sign)
-> write_int_arg<uint32_or_64_or_128_t<T>> {
auto prefix = 0u;
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
if (is_negative(value)) {
prefix = 0x01000000 | '-';
abs_value = 0 - abs_value;
} else {
constexpr const unsigned prefixes[4] = {0, 0, 0x1000000u | '+',
0x1000000u | ' '};
prefix = prefixes[sign];
}
return {abs_value, prefix};
}
|
O0
|
c
|
fmt::v10::detail::write_int_arg<std::conditional<num_bits<long long>() <= 32 && !0, unsigned int, std::conditional<num_bits<long long>() <= 64, unsigned long, unsigned __int128>::type>::type> fmt::v10::detail::make_write_int_arg<long long>(long long, fmt::v10::sign::type):
subq $0x78, %rsp
movq %rdi, (%rsp)
movb %cl, %al
movq %rdi, 0x8(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movb %al, 0x4f(%rsp)
movl $0x0, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x8ebd0
testb $0x1, %al
jne 0xa93c6
jmp 0xa93e4
movl $0x100002d, 0x48(%rsp) # imm = 0x100002D
movq 0x38(%rsp), %rcx
xorl %eax, %eax
negq 0x30(%rsp)
sbbq %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0xa9409
movq 0x67a95(%rip), %rax # 0x110e80
movq %rax, 0x10(%rsp)
movq 0x67a91(%rip), %rax # 0x110e88
movq %rax, 0x18(%rsp)
movzbl 0x4f(%rsp), %eax
movl 0x10(%rsp,%rax,4), %eax
movl %eax, 0x48(%rsp)
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rsi
movq %rsi, 0x8(%rcx)
movq %rdx, (%rcx)
movl 0x48(%rsp), %edx
movl %edx, 0x10(%rcx)
addq $0x78, %rsp
retq
nop
|
_ZN3fmt3v106detail18make_write_int_argIoEENS1_13write_int_argINSt11conditionalIXaalecl8num_bitsIT_EELi32EntLi0EEjNS4_IXlecl8num_bitsIS5_EELi64EEmoE4typeEE4typeEEES5_NS0_4sign4typeE:
sub rsp, 78h
mov [rsp+78h+var_78], rdi
mov al, cl
mov [rsp+78h+var_70], rdi
mov [rsp+78h+var_18], rsi
mov [rsp+78h+var_10], rdx
mov rcx, [rsp+78h+var_18]
mov rdx, [rsp+78h+var_10]
mov [rsp+78h+var_20], rdx
mov [rsp+78h+var_28], rcx
mov [rsp+78h+var_29], al
mov [rsp+78h+var_30], 0
mov rax, [rsp+78h+var_28]
mov rcx, [rsp+78h+var_20]
mov [rsp+78h+var_40], rcx
mov [rsp+78h+var_48], rax
mov rax, [rsp+78h+var_28]
mov rcx, [rsp+78h+var_20]
mov [rsp+78h+var_50], rcx
mov [rsp+78h+var_58], rax
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call _ZN3fmt3v106detail11is_negativeIoTnNSt9enable_ifIXntsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_
test al, 1
jnz short loc_A93C6
jmp short loc_A93E4
loc_A93C6:
mov [rsp+78h+var_30], 100002Dh
mov rcx, [rsp+78h+var_40]
xor eax, eax
neg [rsp+78h+var_48]
sbb rax, rcx
mov [rsp+78h+var_40], rax
jmp short loc_A9409
loc_A93E4:
mov rax, cs:qword_110E80
mov [rsp+78h+var_68], rax
mov rax, cs:qword_110E88
mov [rsp+78h+var_60], rax
movzx eax, [rsp+78h+var_29]
mov eax, dword ptr [rsp+rax*4+78h+var_68]
mov [rsp+78h+var_30], eax
loc_A9409:
mov rax, [rsp+78h+var_70]
mov rcx, [rsp+78h+var_78]
mov rdx, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_40]
mov [rcx+8], rsi
mov [rcx], rdx
mov edx, [rsp+78h+var_30]
mov [rcx+10h], edx
add rsp, 78h
retn
|
long long fmt::v10::detail::make_write_int_arg<unsigned __int128>(
long long a1,
long long a2,
long long a3,
unsigned __int8 a4)
{
long long result; // rax
_QWORD v5[4]; // [rsp+10h] [rbp-68h]
__int128 v6; // [rsp+30h] [rbp-48h]
int v7; // [rsp+48h] [rbp-30h]
unsigned __int8 v8; // [rsp+4Fh] [rbp-29h]
long long v9; // [rsp+50h] [rbp-28h]
long long v10; // [rsp+58h] [rbp-20h]
long long v11; // [rsp+60h] [rbp-18h]
long long v12; // [rsp+68h] [rbp-10h]
v11 = a2;
v12 = a3;
v10 = a3;
v9 = a2;
v8 = a4;
v7 = 0;
*((_QWORD *)&v6 + 1) = a3;
*(_QWORD *)&v6 = a2;
v5[3] = a3;
v5[2] = a2;
if ( (ZN3fmt3v106detail11is_negativeIoTnNSt9enable_ifIXntsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_() & 1) != 0 )
{
v7 = 16777261;
v6 = -v6;
}
else
{
v5[0] = 0LL;
v5[1] = 0x10000200100002BLL;
v7 = *((_DWORD *)v5 + v8);
}
result = a1;
*(_OWORD *)a1 = v6;
*(_DWORD *)(a1 + 16) = v7;
return result;
}
|
make_write_int_arg<unsigned__int128>:
SUB RSP,0x78
MOV qword ptr [RSP],RDI
MOV AL,CL
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x68],RDX
MOV RCX,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x50],RCX
MOV byte ptr [RSP + 0x4f],AL
MOV dword ptr [RSP + 0x48],0x0
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0018ebd0
TEST AL,0x1
JNZ 0x001a93c6
JMP 0x001a93e4
LAB_001a93c6:
MOV dword ptr [RSP + 0x48],0x100002d
MOV RCX,qword ptr [RSP + 0x38]
XOR EAX,EAX
NEG qword ptr [RSP + 0x30]
SBB RAX,RCX
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001a9409
LAB_001a93e4:
MOV RAX,qword ptr [0x00210e80]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [0x00210e88]
MOV qword ptr [RSP + 0x18],RAX
MOVZX EAX,byte ptr [RSP + 0x4f]
MOV EAX,dword ptr [RSP + RAX*0x4 + 0x10]
MOV dword ptr [RSP + 0x48],EAX
LAB_001a9409:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RCX],RDX
MOV EDX,dword ptr [RSP + 0x48]
MOV dword ptr [RCX + 0x10],EDX
ADD RSP,0x78
RET
|
/* fmt::v10::detail::write_int_arg<std::conditional<(((num_bits<unsigned
__int128>)())<=(32))&&(!(0)), unsigned int, std::conditional<((num_bits<unsigned
__int128>)())<=(64), unsigned long, unsigned __int128>::type>::type>
fmt::v10::detail::make_write_int_arg<unsigned __int128>(unsigned __int128, fmt::v10::sign::type)
*/
long * fmt::v10::detail::write_int_arg<std::
conditional<(((num_bits<unsigned__int128>)())<=(32))&&(!(0)),unsigned_int,std::
conditional<((num_bits<unsigned__int128>)())<=(64),unsigned_long,unsigned__int128>::type>::
type>fmt::v10::detail::make_write_int_arg<unsigned__int128>
(long *param_1,long param_2,long param_3,byte param_4)
{
ulong uVar1;
bool bVar2;
int8 local_68;
int8 local_60;
long local_58;
long local_50;
long local_48;
long local_40;
int4 local_30;
byte local_29;
long local_28;
long local_20;
long local_18;
long local_10;
local_30 = 0;
local_58 = param_2;
local_50 = param_3;
local_48 = param_2;
local_40 = param_3;
local_29 = param_4;
local_28 = param_2;
local_20 = param_3;
local_18 = param_2;
local_10 = param_3;
uVar1 = _ZN3fmt3v106detail11is_negativeIoTnNSt9enable_ifIXntsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_
(param_2,param_3);
if ((uVar1 & 1) == 0) {
local_68 = DAT_00210e80;
local_60 = DAT_00210e88;
local_30 = *(int4 *)((long)&local_68 + (ulong)local_29 * 4);
}
else {
local_30 = 0x100002d;
bVar2 = local_48 != 0;
local_48 = -local_48;
local_40 = -(ulong)bVar2 - local_40;
}
param_1[1] = local_40;
*param_1 = local_48;
*(int4 *)(param_1 + 2) = local_30;
return param_1;
}
|
|
61,597 |
minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
TemplateNode(const Location & location) : location_(location) {}
|
O3
|
cpp
|
minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&):
leaq 0x8cc3f(%rip), %rax # 0x12cfb8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xa03aa
movq 0x8dbe5(%rip), %r8 # 0x12df80
cmpb $0x0, (%r8)
je 0xa03a6
incl 0x8(%rax)
jmp 0xa03aa
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x8d12f(%rip), %rax # 0x12d4e8
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
retq
nop
|
_ZN5minja10FilterNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12TemplateNodeEE:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_A03AA
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_A03A6
inc dword ptr [rax+8]
jmp short loc_A03AA
loc_A03A6:
lock inc dword ptr [rax+8]
loc_A03AA:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja10FilterNodeE; `vtable for'minja::FilterNode
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
retn
|
long long minja::FilterNode::FilterNode(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::FilterNode + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
|
FilterNode:
LEA RAX,[0x22cfb8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001a03aa
MOV R8,qword ptr [0x0022df80]
CMP byte ptr [R8],0x0
JZ 0x001a03a6
INC dword ptr [RAX + 0x8]
JMP 0x001a03aa
LAB_001a03a6:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a03aa:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22d4e8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
RET
|
/* minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::FilterNode::FilterNode
(FilterNode *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022cfc8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022d4f8;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
return;
}
|
|
61,598 |
testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*)
|
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest.cc
|
Result HandleExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
const char* location) {
// NOTE: The user code can affect the way in which Google Test handles
// exceptions by setting GTEST_FLAG(catch_exceptions), but only before
// RUN_ALL_TESTS() starts. It is technically possible to check the flag
// after the exception is caught and either report or re-throw the
// exception based on the flag's value:
//
// try {
// // Perform the test method.
// } catch (...) {
// if (GTEST_FLAG_GET(catch_exceptions))
// // Report the exception as failure.
// else
// throw; // Re-throws the original exception.
// }
//
// However, the purpose of this flag is to allow the program to drop into
// the debugger when the exception is thrown. On most platforms, once the
// control enters the catch block, the exception origin information is
// lost and the debugger will stop the program at the point of the
// re-throw in this function -- instead of at the point of the original
// throw statement in the code under test. For this reason, we perform
// the check early, sacrificing the ability to affect Google Test's
// exception handling in the method where the exception is thrown.
if (internal::GetUnitTestImpl()->catch_exceptions()) {
#if GTEST_HAS_EXCEPTIONS
try {
return HandleSehExceptionsInMethodIfSupported(object, method, location);
} catch (const AssertionException&) { // NOLINT
// This failure was reported already.
} catch (const internal::GoogleTestFailureException&) { // NOLINT
// This exception type can only be thrown by a failed Google
// Test assertion with the intention of letting another testing
// framework catch it. Therefore we just re-throw it.
throw;
} catch (const std::exception& e) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(e.what(), location));
} catch (...) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(nullptr, location));
}
return static_cast<Result>(0);
#else
return HandleSehExceptionsInMethodIfSupported(object, method, location);
#endif // GTEST_HAS_EXCEPTIONS
} else {
return (object->*method)();
}
}
|
O2
|
cpp
|
testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x24477
addq %r15, %r14
cmpb $0x1, 0x2c8(%rax)
jne 0x2660f
testb $0x1, %r12b
je 0x265fd
movq (%r14), %rax
movq -0x1(%rax,%r12), %r12
movq %r14, %rdi
callq *%r12
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testb $0x1, %r12b
movq %r12, %rcx
je 0x26620
movq (%r14), %rax
movq -0x1(%rax,%rcx), %rcx
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
movq %rdx, %r14
movq %rax, %rdi
cmpl $0x4, %r14d
jne 0x26643
callq 0x8200
jmp 0x266a2
cmpl $0x3, %r14d
je 0x266ae
callq 0x8200
cmpl $0x2, %r14d
jne 0x2667c
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2326c
pushq $0x2
popq %rdi
leaq 0x8(%rsp), %rsi
callq 0x18370
jmp 0x26698
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2326c
pushq $0x2
popq %rdi
leaq 0x8(%rsp), %rsi
callq 0x18370
leaq 0x8(%rsp), %rdi
callq 0x8ad8
callq 0x8950
xorl %eax, %eax
jmp 0x26603
callq 0x8200
callq 0x8810
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8ad8
jmp 0x266ca
movq %rax, %rbx
callq 0x8950
jmp 0x266f2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8ad8
jmp 0x266e3
movq %rax, %rbx
callq 0x8950
jmp 0x266f2
movq %rax, %rbx
callq 0x8950
movq %rbx, %rdi
callq 0x89a0
movq %rax, %rdi
callq 0xc8f7
|
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void)
add r14, r15
cmp byte ptr [rax+2C8h], 1
jnz short loc_2660F
test r12b, 1
jz short loc_265FD
mov rax, [r14]
mov r12, [rax+r12-1]
loc_265FD:
mov rdi, r14
call r12
loc_26603:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_2660F:
test r12b, 1
mov rcx, r12
jz short loc_26620
mov rax, [r14]
mov rcx, [rax+rcx-1]
loc_26620:
mov rdi, r14
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
jmp rcx
mov r14, rdx
mov rdi, rax; void *
cmp r14d, 4
jnz short loc_26643
call ___cxa_begin_catch
jmp short loc_266A2
loc_26643:
cmp r14d, 3
jz short loc_266AE
call ___cxa_begin_catch
cmp r14d, 2
jnz short loc_2667C
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+10h]
lea rdi, [rsp+48h+var_40]
mov rsi, rax
mov rdx, rbx
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
push 2
pop rdi
lea rsi, [rsp+48h+var_40]
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short loc_26698
loc_2667C:
lea rdi, [rsp+48h+var_40]
xor esi, esi
mov rdx, rbx
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
push 2
pop rdi
lea rsi, [rsp+48h+var_40]
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
loc_26698:
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266A2:
call ___cxa_end_catch
xor eax, eax
jmp loc_26603
loc_266AE:
call ___cxa_begin_catch
call ___cxa_rethrow
mov rbx, rax
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_266CA
mov rbx, rax
loc_266CA:
call ___cxa_end_catch
jmp short loc_266F2
mov rbx, rax
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_266E3
mov rbx, rax
loc_266E3:
call ___cxa_end_catch
jmp short loc_266F2
mov rbx, rax
call ___cxa_end_catch
loc_266F2:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
|
long long testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test *>(
testing::internal *a1,
long long ( *a2)(_QWORD),
long long a3)
{
long long ( *v3)(_QWORD *); // r12
_QWORD *v4; // r14
long long ( *v6)(_QWORD *); // rcx
v3 = (long long ( *)(_QWORD *))a2;
v4 = (_QWORD *)((char *)a1 + a3);
if ( *(_BYTE *)(testing::internal::GetUnitTestImpl(a1) + 712) == 1 )
{
if ( ((unsigned __int8)a2 & 1) != 0 )
v3 = *(long long ( **)(_QWORD *))((char *)a2 + *v4 - 1);
return v3(v4);
}
else
{
v6 = (long long ( *)(_QWORD *))a2;
if ( ((unsigned __int8)a2 & 1) != 0 )
v6 = *(long long ( **)(_QWORD *))((char *)a2 + *v4 - 1);
return v6(v4);
}
}
|
HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test*>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RCX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x00124477
ADD R14,R15
CMP byte ptr [RAX + 0x2c8],0x1
JNZ 0x0012660f
TEST R12B,0x1
JZ 0x001265fd
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + R12*0x1 + -0x1]
LAB_001265fd:
MOV RDI,R14
CALL R12
LAB_00126603:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0012660f:
TEST R12B,0x1
MOV RCX,R12
JZ 0x00126620
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [RAX + RCX*0x1 + -0x1]
LAB_00126620:
MOV RDI,R14
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
JMP RCX
|
/* testing::Test*
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,
testing::Test*>(testing::internal::TestFactoryBase*, testing::Test*
(testing::internal::TestFactoryBase::*)(), char const*) */
Test * testing::internal::
HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test*>
(TestFactoryBase *param_1,_func_Test_ptr *param_2,char *param_3)
{
long lVar1;
Test *pTVar2;
TestFactoryBase *pTVar3;
lVar1 = GetUnitTestImpl();
pTVar3 = param_1 + (long)param_3;
if (*(char *)(lVar1 + 0x2c8) == '\x01') {
if (((ulong)param_2 & 1) != 0) {
param_2 = *(_func_Test_ptr **)(param_2 + *(long *)pTVar3 + -1);
}
/* try { // try from 001265fd to 00126602 has its CatchHandler @ 00126630 */
pTVar2 = (*param_2)(pTVar3);
return pTVar2;
}
if (((ulong)param_2 & 1) != 0) {
param_2 = *(_func_Test_ptr **)(param_2 + *(long *)pTVar3 + -1);
}
/* WARNING: Could not recover jumptable at 0x0012662e. Too many branches */
/* WARNING: Treating indirect jump as call */
pTVar2 = (*param_2)(pTVar3);
return pTVar2;
}
|
|
61,599 |
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int)
|
monkey531[P]llama/common/sampling.cpp
|
std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) {
n = std::min(n, (int) gsmpl->prev.size());
if (n <= 0) {
return "";
}
std::string result;
result.reserve(8*n); // 8 is the average length of a token [citation needed], TODO: compute this from the vocab
for (int i = n - 1; i >= 0; i--) {
const llama_token id = gsmpl->prev.rat(i);
GGML_ASSERT(id != LLAMA_TOKEN_NULL && "null token in the sampling history - should not happen");
result += common_token_to_piece(ctx_main, id);
}
return result;
}
|
O3
|
cpp
|
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r12d
movl 0x150(%rsi), %eax
cmpl %ecx, %eax
cmovll %eax, %r12d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
testl %r12d, %r12d
jle 0xcd945
movq %rdx, %r14
movq %rsi, %r15
movq %rax, (%rsp)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leal (,%r12,8), %esi
movq %rbx, %rdi
callq 0x1ad50
addq $0x148, %r15 # imm = 0x148
leaq 0x18(%rsp), %rbp
movl %r12d, %r13d
incq %r13
leaq 0x8(%rsp), %r12
leaq -0x2(%r13), %rsi
movq %r15, %rdi
callq 0xce470
movl (%rax), %edx
cmpl $-0x1, %edx
je 0xcd969
movq %r12, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x726c5
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a250
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xcd93a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8b0
decq %r13
cmpq $0x1, %r13
ja 0xcd8ee
jmp 0xcd957
leaq 0x1d27a(%rip), %rdx # 0xeabc6
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x21b46
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26a31(%rip), %rdi # 0xf43a1
leaq 0x1d5a6(%rip), %rdx # 0xeaf1d
leaq 0x26bfe(%rip), %rcx # 0xf457c
movl $0x1a1, %esi # imm = 0x1A1
xorl %eax, %eax
callq 0x1ae70
jmp 0xcd9ac
jmp 0xcd9ac
jmp 0xcd9ac
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xcd9af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8b0
jmp 0xcd9af
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0xcd9c7
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x1a8b0
movq %r14, %rdi
callq 0x1af70
|
_Z23common_sampler_prev_strB5cxx11P14common_samplerP13llama_contexti:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12d, ecx
mov eax, [rsi+150h]
cmp eax, ecx
cmovl r12d, eax
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
test r12d, r12d
jle loc_CD945
mov r14, rdx
mov r15, rsi
mov [rsp+58h+var_58], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
lea esi, ds:0[r12*8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
add r15, 148h
lea rbp, [rsp+58h+var_40]
mov r13d, r12d
inc r13
lea r12, [rsp+58h+var_50]
loc_CD8EE:
lea rsi, [r13-2]
mov rdi, r15
call _ZNK11ring_bufferIiE3ratEm; ring_buffer<int>::rat(ulong)
mov edx, [rax]
cmp edx, 0FFFFFFFFh
jz short loc_CD969
mov rdi, r12
mov rsi, r14
mov ecx, 1
call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_CD93A
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD93A:
dec r13
cmp r13, 1
ja short loc_CD8EE
jmp short loc_CD957
loc_CD945:
lea rdx, aErrorWhileHand_0+34h; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_CD957:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CD969:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdLlamaTokenNu; "id != LLAMA_TOKEN_NULL && \"null token "...
mov esi, 1A1h
xor eax, eax
call _ggml_abort
jmp short loc_CD9AC
jmp short loc_CD9AC
jmp short loc_CD9AC
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_CD9AF
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD9AF
loc_CD9AC:
mov r14, rax
loc_CD9AF:
mov rdi, [rbx]; void *
cmp rdi, [rsp+58h+var_58]
jz short loc_CD9C7
mov rax, [rsp+58h+var_58]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD9C7:
mov rdi, r14
call __Unwind_Resume
|
long long common_sampler_prev_str[abi:cxx11](long long a1, long long a2, long long a3, int a4)
{
int v4; // r12d
long long v6; // r13
unsigned int v7; // edx
bool v8; // cf
long long v10; // rax
long long v11; // r14
_QWORD *v12; // [rsp+0h] [rbp-58h]
void *v13[2]; // [rsp+8h] [rbp-50h] BYREF
long long v14; // [rsp+18h] [rbp-40h] BYREF
v4 = a4;
if ( *(_DWORD *)(a2 + 336) < a4 )
v4 = *(_DWORD *)(a2 + 336);
*(_QWORD *)a1 = a1 + 16;
if ( v4 <= 0 )
{
std::string::_M_construct<char const*>(a1, "", (long long)"");
}
else
{
v12 = (_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, (unsigned int)(8 * v4));
v6 = (unsigned int)v4 + 1LL;
do
{
v7 = *(_DWORD *)ring_buffer<int>::rat(a2 + 328, v6 - 2);
if ( v7 == -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
417LL,
"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\"");
v11 = v10;
if ( *(_QWORD **)a1 != v12 )
operator delete(*(void **)a1, *v12 + 1LL);
_Unwind_Resume(v11);
}
common_token_to_piece[abi:cxx11]((long long)v13, a3, v7, 1u);
std::string::_M_append(a1, v13[0], v13[1]);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
v8 = v6-- == 1;
}
while ( !v8 && v6 != 1 );
}
return a1;
}
|
common_sampler_prev_str[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12D,ECX
MOV EAX,dword ptr [RSI + 0x150]
CMP EAX,ECX
CMOVL R12D,EAX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
TEST R12D,R12D
JLE 0x001cd945
MOV R14,RDX
MOV R15,RSI
MOV qword ptr [RSP],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LEA ESI,[R12*0x8]
LAB_001cd8cf:
MOV RDI,RBX
CALL 0x0011ad50
ADD R15,0x148
LEA RBP,[RSP + 0x18]
MOV R13D,R12D
INC R13
LEA R12,[RSP + 0x8]
LAB_001cd8ee:
LEA RSI,[R13 + -0x2]
LAB_001cd8f2:
MOV RDI,R15
CALL 0x001ce470
MOV EDX,dword ptr [RAX]
CMP EDX,-0x1
JZ 0x001cd969
LAB_001cd901:
MOV RDI,R12
MOV RSI,R14
MOV ECX,0x1
CALL 0x001726c5
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001cd91b:
MOV RDI,RBX
CALL 0x0011a250
LAB_001cd923:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001cd93a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8b0
LAB_001cd93a:
DEC R13
CMP R13,0x1
JA 0x001cd8ee
JMP 0x001cd957
LAB_001cd945:
LEA RDX,[0x1eabc6]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00121b46
LAB_001cd957:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cd969:
LEA RDI,[0x1f43a1]
LEA RDX,[0x1eaf1d]
LEA RCX,[0x1f457c]
MOV ESI,0x1a1
XOR EAX,EAX
CALL 0x0011ae70
|
/* common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int) */
common_sampler *
common_sampler_prev_str_abi_cxx11_(common_sampler *param_1,llama_context *param_2,int param_3)
{
int *piVar1;
uint in_ECX;
int8 in_R8;
int8 in_R9;
ulong uVar2;
common_sampler *pcVar3;
long *local_50 [2];
long local_40 [2];
if ((int)*(uint *)(param_2 + 0x150) < (int)in_ECX) {
in_ECX = *(uint *)(param_2 + 0x150);
}
pcVar3 = param_1 + 0x10;
*(common_sampler **)param_1 = pcVar3;
if ((int)in_ECX < 1) {
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
else {
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (common_sampler)0x0;
/* try { // try from 001cd8cf to 001cd8d6 has its CatchHandler @ 001cd98a */
std::__cxx11::string::reserve((ulong)param_1);
uVar2 = (ulong)in_ECX + 1;
do {
/* try { // try from 001cd8f2 to 001cd8f9 has its CatchHandler @ 001cd98c */
piVar1 = (int *)ring_buffer<int>::rat((ring_buffer<int> *)(param_2 + 0x148),uVar2 - 2);
if (*piVar1 == -1) {
/* try { // try from 001cd969 to 001cd989 has its CatchHandler @ 001cd9ac */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0x1a1,"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\""
,in_R8,in_R9,pcVar3);
}
/* try { // try from 001cd901 to 001cd910 has its CatchHandler @ 001cd98e */
common_token_to_piece_abi_cxx11_((llama_context *)local_50,param_3,SUB41(*piVar1,0));
/* try { // try from 001cd91b to 001cd922 has its CatchHandler @ 001cd990 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_50[0]);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
uVar2 = uVar2 - 1;
} while (1 < uVar2);
}
return param_1;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.